@bygd/gd-sdk-pes 1.29.21 → 1.29.24
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/classCallCheck"),s=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/helpers/createClass"),d=require("url-parse"),u=require("js-base64"),c=require("validator"),l=require("is-valid-domain"),h=require("get-value"),f=require("set-value"),p=require("lodash.clonedeep"),m=require("can-autoplay"),g=require("is-plain-object"),v=require("querystringify"),y=require("lodash.merge"),b=require("events"),_=require("uuid");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var A=w(e),k=w(t),E=w(n),x=w(r),R=w(i),S=w(s),D=w(o),T=w(d),I=w(c),O=w(l),P=w(h),C=w(f),L=w(p),U=w(m),j=w(v),M=w(y),G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},B=function(e){return e&&e.Math==Math&&e},N=B("object"==typeof globalThis&&globalThis)||B("object"==typeof window&&window)||B("object"==typeof self&&self)||B("object"==typeof G&&G)||function(){return this}()||Function("return this")(),q={exports:{}},F=N,V=Object.defineProperty,W=function(e,t){try{V(F,e,{value:t,configurable:!0,writable:!0})}catch(n){F[e]=t}return t},H=W,K=N["__core-js_shared__"]||H("__core-js_shared__",{}),z=K;(q.exports=function(e,t){return z[e]||(z[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var $,Q,Y=Function.prototype,J=Y.bind,X=Y.call,Z=J&&J.bind(X),ee=J?function(e){return e&&Z(X,e)}:function(e){return e&&function(){return X.apply(e,arguments)}},te=N.TypeError,ne=function(e){if(null==e)throw te("Can't call method on "+e);return e},re=ne,ae=N.Object,ie=function(e){return ae(re(e))},se=ie,oe=ee({}.hasOwnProperty),de=Object.hasOwn||function(e,t){return oe(se(e),t)},ue=ee,ce=0,le=Math.random(),he=ue(1..toString),fe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+he(++ce+le,36)},pe=function(e){return"function"==typeof e},me=N,ge=pe,ve=function(e){return ge(e)?e:void 0},ye=function(e,t){return arguments.length<2?ve(me[e]):me[e]&&me[e][t]},be=ye("navigator","userAgent")||"",_e=N,we=be,Ae=_e.process,ke=_e.Deno,Ee=Ae&&Ae.versions||ke&&ke.version,xe=Ee&&Ee.v8;xe&&(Q=($=xe.split("."))[0]>0&&$[0]<4?1:+($[0]+$[1])),!Q&&we&&(!($=we.match(/Edge\/(\d+)/))||$[1]>=74)&&($=we.match(/Chrome\/(\d+)/))&&(Q=+$[1]);var Re=Q,Se=function(e){try{return!!e()}catch(e){return!0}},De=Re,Te=Se,Ie=!!Object.getOwnPropertySymbols&&!Te((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&De&&De<41})),Oe=Ie&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Pe=N,Ce=q.exports,Le=de,Ue=fe,je=Ie,Me=Oe,Ge=Ce("wks"),Be=Pe.Symbol,Ne=Be&&Be.for,qe=Me?Be:Be&&Be.withoutSetter||Ue,Fe=function(e){if(!Le(Ge,e)||!je&&"string"!=typeof Ge[e]){var t="Symbol."+e;je&&Le(Be,e)?Ge[e]=Be[e]:Ge[e]=Me&&Ne?Ne(t):qe(t)}return Ge[e]},Ve={};Ve[Fe("toStringTag")]="z";var We="[object z]"===String(Ve),He={exports:{}},Ke=!Se((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),ze={},$e=pe,Qe=function(e){return"object"==typeof e?null!==e:$e(e)},Ye=Qe,Je=N.document,Xe=Ye(Je)&&Ye(Je.createElement),Ze=function(e){return Xe?Je.createElement(e):{}},et=Ze,tt=!Ke&&!Se((function(){return 7!=Object.defineProperty(et("div"),"a",{get:function(){return 7}}).a})),nt=N,rt=Qe,at=nt.String,it=nt.TypeError,st=function(e){if(rt(e))return e;throw it(at(e)+" is not an object")},ot=Function.prototype.call,dt=ot.bind?ot.bind(ot):function(){return ot.apply(ot,arguments)},ut=ee({}.isPrototypeOf),ct=ye,lt=pe,ht=ut,ft=Oe,pt=N.Object,mt=ft?function(e){return"symbol"==typeof e}:function(e){var t=ct("Symbol");return lt(t)&&ht(t.prototype,pt(e))},gt=N.String,vt=function(e){try{return gt(e)}catch(e){return"Object"}},yt=pe,bt=vt,_t=N.TypeError,wt=function(e){if(yt(e))return e;throw _t(bt(e)+" is not a function")},At=wt,kt=function(e,t){var n=e[t];return null==n?void 0:At(n)},Et=dt,xt=pe,Rt=Qe,St=N.TypeError,Dt=dt,Tt=Qe,It=mt,Ot=kt,Pt=function(e,t){var n,r;if("string"===t&&xt(n=e.toString)&&!Rt(r=Et(n,e)))return r;if(xt(n=e.valueOf)&&!Rt(r=Et(n,e)))return r;if("string"!==t&&xt(n=e.toString)&&!Rt(r=Et(n,e)))return r;throw St("Can't convert object to primitive value")},Ct=Fe,Lt=N.TypeError,Ut=Ct("toPrimitive"),jt=function(e,t){if(!Tt(e)||It(e))return e;var n,r=Ot(e,Ut);if(r){if(void 0===t&&(t="default"),n=Dt(r,e,t),!Tt(n)||It(n))return n;throw Lt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Pt(e,t)},Mt=mt,Gt=function(e){var t=jt(e,"string");return Mt(t)?t:t+""},Bt=Ke,Nt=tt,qt=st,Ft=Gt,Vt=N.TypeError,Wt=Object.defineProperty;ze.f=Bt?Wt:function(e,t,n){if(qt(e),t=Ft(t),qt(n),Nt)try{return Wt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Vt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Ht=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Kt=ze,zt=Ht,$t=Ke?function(e,t,n){return Kt.f(e,t,zt(1,n))}:function(e,t,n){return e[t]=n,e},Qt=pe,Yt=K,Jt=ee(Function.toString);Qt(Yt.inspectSource)||(Yt.inspectSource=function(e){return Jt(e)});var Xt,Zt,en,tn=Yt.inspectSource,nn=pe,rn=tn,an=N.WeakMap,sn=nn(an)&&/native code/.test(rn(an)),on=q.exports,dn=fe,un=on("keys"),cn=function(e){return un[e]||(un[e]=dn(e))},ln={},hn=sn,fn=N,pn=ee,mn=Qe,gn=$t,vn=de,yn=K,bn=cn,_n=ln,wn=fn.TypeError,An=fn.WeakMap;if(hn||yn.state){var kn=yn.state||(yn.state=new An),En=pn(kn.get),xn=pn(kn.has),Rn=pn(kn.set);Xt=function(e,t){if(xn(kn,e))throw new wn("Object already initialized");return t.facade=e,Rn(kn,e,t),t},Zt=function(e){return En(kn,e)||{}},en=function(e){return xn(kn,e)}}else{var Sn=bn("state");_n[Sn]=!0,Xt=function(e,t){if(vn(e,Sn))throw new wn("Object already initialized");return t.facade=e,gn(e,Sn,t),t},Zt=function(e){return vn(e,Sn)?e[Sn]:{}},en=function(e){return vn(e,Sn)}}var Dn={set:Xt,get:Zt,has:en,enforce:function(e){return en(e)?Zt(e):Xt(e,{})},getterFor:function(e){return function(t){var n;if(!mn(t)||(n=Zt(t)).type!==e)throw wn("Incompatible receiver, "+e+" required");return n}}},Tn=Ke,In=de,On=Function.prototype,Pn=Tn&&Object.getOwnPropertyDescriptor,Cn=In(On,"name"),Ln={EXISTS:Cn,PROPER:Cn&&"something"===function(){}.name,CONFIGURABLE:Cn&&(!Tn||Tn&&Pn(On,"name").configurable)},Un=N,jn=pe,Mn=de,Gn=$t,Bn=W,Nn=tn,qn=Ln.CONFIGURABLE,Fn=Dn.get,Vn=Dn.enforce,Wn=String(String).split("String");(He.exports=function(e,t,n,r){var a,i=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,o=!!r&&!!r.noTargetGet,d=r&&void 0!==r.name?r.name:t;jn(n)&&("Symbol("===String(d).slice(0,7)&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Mn(n,"name")||qn&&n.name!==d)&&Gn(n,"name",d),(a=Vn(n)).source||(a.source=Wn.join("string"==typeof d?d:""))),e!==Un?(i?!o&&e[t]&&(s=!0):delete e[t],s?e[t]=n:Gn(e,t,n)):s?e[t]=n:Bn(t,n)})(Function.prototype,"toString",(function(){return jn(this)&&Fn(this).source||Nn(this)}));var Hn=ee,Kn=Hn({}.toString),zn=Hn("".slice),$n=function(e){return zn(Kn(e),8,-1)},Qn=N,Yn=We,Jn=pe,Xn=$n,Zn=Fe("toStringTag"),er=Qn.Object,tr="Arguments"==Xn(function(){return arguments}()),nr=Yn?Xn: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=er(e),Zn))?n:tr?Xn(t):"Object"==(r=Xn(t))&&Jn(t.callee)?"Arguments":r},rr=nr,ar=We?{}.toString:function(){return"[object "+rr(this)+"]"},ir=We,sr=He.exports,or=ar;ir||sr(Object.prototype,"toString",or,{unsafe:!0});var dr={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},ur=Ze("span").classList,cr=ur&&ur.constructor&&ur.constructor.prototype,lr=cr===Object.prototype?void 0:cr,hr=wt,fr=ee(ee.bind),pr=function(e,t){return hr(e),void 0===t?e:fr?fr(e,t):function(){return e.apply(t,arguments)}},mr=ee,gr=Se,vr=$n,yr=N.Object,br=mr("".split),_r=gr((function(){return!yr("z").propertyIsEnumerable(0)}))?function(e){return"String"==vr(e)?br(e,""):yr(e)}:yr,wr=Math.ceil,Ar=Math.floor,kr=function(e){var t=+e;return t!=t||0===t?0:(t>0?Ar:wr)(t)},Er=kr,xr=Math.min,Rr=function(e){return e>0?xr(Er(e),9007199254740991):0},Sr=Rr,Dr=function(e){return Sr(e.length)},Tr=$n,Ir=Array.isArray||function(e){return"Array"==Tr(e)},Or=ee,Pr=Se,Cr=pe,Lr=nr,Ur=tn,jr=function(){},Mr=[],Gr=ye("Reflect","construct"),Br=/^\s*(?:class|function)\b/,Nr=Or(Br.exec),qr=!Br.exec(jr),Fr=function(e){if(!Cr(e))return!1;try{return Gr(jr,Mr,e),!0}catch(e){return!1}},Vr=!Gr||Pr((function(){var e;return Fr(Fr.call)||!Fr(Object)||!Fr((function(){e=!0}))||e}))?function(e){if(!Cr(e))return!1;switch(Lr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return qr||!!Nr(Br,Ur(e))}:Fr,Wr=N,Hr=Ir,Kr=Vr,zr=Qe,$r=Fe("species"),Qr=Wr.Array,Yr=function(e){var t;return Hr(e)&&(t=e.constructor,(Kr(t)&&(t===Qr||Hr(t.prototype))||zr(t)&&null===(t=t[$r]))&&(t=void 0)),void 0===t?Qr:t},Jr=function(e,t){return new(Yr(e))(0===t?0:t)},Xr=pr,Zr=_r,ea=ie,ta=Dr,na=Jr,ra=ee([].push),aa=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=7==e,o=5==e||i;return function(d,u,c,l){for(var h,f,p=ea(d),m=Zr(p),g=Xr(u,c),v=ta(m),y=0,b=l||na,_=t?b(d,v):n||s?b(d,0):void 0;v>y;y++)if((o||y in m)&&(f=g(h=m[y],y,p),e))if(t)_[y]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:ra(_,h)}else switch(e){case 4:return!1;case 7:ra(_,h)}return i?-1:r||a?a:_}},ia={forEach:aa(0),map:aa(1),filter:aa(2),some:aa(3),every:aa(4),find:aa(5),findIndex:aa(6),filterReject:aa(7)},sa=Se,oa=function(e,t){var n=[][e];return!!n&&sa((function(){n.call(null,t||function(){throw 1},1)}))},da=ia.forEach,ua=N,ca=dr,la=lr,ha=oa("forEach")?[].forEach:function(e){return da(this,e,arguments.length>1?arguments[1]:void 0)},fa=$t,pa=function(e){if(e&&e.forEach!==ha)try{fa(e,"forEach",ha)}catch(t){e.forEach=ha}};for(var ma in ca)ca[ma]&&pa(ua[ma]&&ua[ma].prototype);pa(la);var ga={},va={},ya={}.propertyIsEnumerable,ba=Object.getOwnPropertyDescriptor,_a=ba&&!ya.call({1:2},1);va.f=_a?function(e){var t=ba(this,e);return!!t&&t.enumerable}:ya;var wa=_r,Aa=ne,ka=function(e){return wa(Aa(e))},Ea=Ke,xa=dt,Ra=va,Sa=Ht,Da=ka,Ta=Gt,Ia=de,Oa=tt,Pa=Object.getOwnPropertyDescriptor;ga.f=Ea?Pa:function(e,t){if(e=Da(e),t=Ta(t),Oa)try{return Pa(e,t)}catch(e){}if(Ia(e,t))return Sa(!xa(Ra.f,e,t),e[t])};var Ca={},La=kr,Ua=Math.max,ja=Math.min,Ma=function(e,t){var n=La(e);return n<0?Ua(n+t,0):ja(n,t)},Ga=ka,Ba=Ma,Na=Dr,qa=function(e){return function(t,n,r){var a,i=Ga(t),s=Na(i),o=Ba(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}},Fa={includes:qa(!0),indexOf:qa(!1)},Va=de,Wa=ka,Ha=Fa.indexOf,Ka=ln,za=ee([].push),$a=function(e,t){var n,r=Wa(e),a=0,i=[];for(n in r)!Va(Ka,n)&&Va(r,n)&&za(i,n);for(;t.length>a;)Va(r,n=t[a++])&&(~Ha(i,n)||za(i,n));return i},Qa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ya=$a,Ja=Qa.concat("length","prototype");Ca.f=Object.getOwnPropertyNames||function(e){return Ya(e,Ja)};var Xa={};Xa.f=Object.getOwnPropertySymbols;var Za=ye,ei=Ca,ti=Xa,ni=st,ri=ee([].concat),ai=Za("Reflect","ownKeys")||function(e){var t=ei.f(ni(e)),n=ti.f;return n?ri(t,n(e)):t},ii=de,si=ai,oi=ga,di=ze,ui=function(e,t){for(var n=si(t),r=di.f,a=oi.f,i=0;i<n.length;i++){var s=n[i];ii(e,s)||r(e,s,a(t,s))}},ci=Se,li=pe,hi=/#|\.prototype\./,fi=function(e,t){var n=mi[pi(e)];return n==vi||n!=gi&&(li(t)?ci(t):!!t)},pi=fi.normalize=function(e){return String(e).replace(hi,".").toLowerCase()},mi=fi.data={},gi=fi.NATIVE="N",vi=fi.POLYFILL="P",yi=fi,bi=N,_i=ga.f,wi=$t,Ai=He.exports,ki=W,Ei=ui,xi=yi,Ri=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?bi:u?bi[o]||ki(o,{}):(bi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=_i(n,r))&&s.value:n[r],!xi(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Ei(i,a)}(e.sham||a&&a.sham)&&wi(i,"sham",!0),Ai(n,r,i,e)}},Si=$a,Di=Qa,Ti=Object.keys||function(e){return Si(e,Di)},Ii=ie,Oi=Ti;Ri({target:"Object",stat:!0,forced:Se((function(){Oi(1)}))},{keys:function(e){return Oi(Ii(e))}});var Pi=Array.isArray,Ci=Object.prototype.toString,Li=Pi||function(e){return!!e&&"[object Array]"==Ci.call(e)},Ui={name:"@bygd/gd-sdk-pes",version:"1.29.21",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap --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",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"}},ji=function(e){var t=Mi("object"===E.default(e)?e:a.parseJSON(e));return t&&t.version?Ui.version>=t.version?t:void 0:t},Mi=function(e){var t=this;if(!Li(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){k.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}},Gi=function(){var e;(e=console).log.apply(e,arguments)},Bi=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 Ni,qi={},Fi=Function.prototype,Vi=Fi.apply,Wi=Fi.bind,Hi=Fi.call,Ki="object"==typeof Reflect&&Reflect.apply||(Wi?Hi.bind(Vi):function(){return Hi.apply(Vi,arguments)}),zi=nr,$i=N.String,Qi=function(e){if("Symbol"===zi(e))throw TypeError("Cannot convert a Symbol value to a string");return $i(e)},Yi=ze,Ji=st,Xi=ka,Zi=Ti,es=Ke?Object.defineProperties:function(e,t){Ji(e);for(var n,r=Xi(t),a=Zi(t),i=a.length,s=0;i>s;)Yi.f(e,n=a[s++],r[n]);return e},ts=ye("document","documentElement"),ns=st,rs=es,as=Qa,is=ln,ss=ts,os=Ze,ds=cn("IE_PROTO"),us=function(){},cs=function(e){return"<script>"+e+"<\/script>"},ls=function(e){e.write(cs("")),e.close();var t=e.parentWindow.Object;return e=null,t},hs=function(){try{Ni=new ActiveXObject("htmlfile")}catch(e){}var e,t;hs="undefined"!=typeof document?document.domain&&Ni?ls(Ni):((t=os("iframe")).style.display="none",ss.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(cs("document.F=Object")),e.close(),e.F):ls(Ni);for(var n=as.length;n--;)delete hs.prototype[as[n]];return hs()};is[ds]=!0;var fs=Object.create||function(e,t){var n;return null!==e?(us.prototype=ns(e),n=new us,us.prototype=null,n[ds]=e):n=hs(),void 0===t?n:rs(n,t)},ps={},ms=ee([].slice),gs=$n,vs=ka,ys=Ca.f,bs=ms,_s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ps.f=function(e){return _s&&"Window"==gs(e)?function(e){try{return ys(e)}catch(e){return bs(_s)}}(e):ys(vs(e))};var ws={},As=Fe;ws.f=As;var ks=N,Es=de,xs=ws,Rs=ze.f,Ss=function(e){var t=ks.Symbol||(ks.Symbol={});Es(t,e)||Rs(t,e,{value:xs.f(e)})},Ds=ze.f,Ts=de,Is=Fe("toStringTag"),Os=function(e,t,n){e&&!Ts(e=n?e:e.prototype,Is)&&Ds(e,Is,{configurable:!0,value:t})},Ps=Ri,Cs=N,Ls=ye,Us=Ki,js=dt,Ms=ee,Gs=Ke,Bs=Ie,Ns=Se,Fs=de,Vs=Ir,Ws=pe,Hs=Qe,Ks=ut,zs=mt,$s=st,Qs=ie,Ys=ka,Js=Gt,Xs=Qi,Zs=Ht,eo=fs,to=Ti,no=Ca,ro=ps,ao=Xa,io=ga,so=ze,oo=va,uo=ms,co=He.exports,lo=q.exports,ho=ln,fo=fe,po=Fe,mo=ws,go=Ss,vo=Os,yo=Dn,bo=ia.forEach,_o=cn("hidden"),wo=po("toPrimitive"),Ao=yo.set,ko=yo.getterFor("Symbol"),Eo=Object.prototype,xo=Cs.Symbol,Ro=xo&&xo.prototype,So=Cs.TypeError,Do=Cs.QObject,To=Ls("JSON","stringify"),Io=io.f,Oo=so.f,Po=ro.f,Co=oo.f,Lo=Ms([].push),Uo=lo("symbols"),jo=lo("op-symbols"),Mo=lo("string-to-symbol-registry"),Go=lo("symbol-to-string-registry"),Bo=lo("wks"),No=!Do||!Do.prototype||!Do.prototype.findChild,qo=Gs&&Ns((function(){return 7!=eo(Oo({},"a",{get:function(){return Oo(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Io(Eo,t);r&&delete Eo[t],Oo(e,t,n),r&&e!==Eo&&Oo(Eo,t,r)}:Oo,Fo=function(e,t){var n=Uo[e]=eo(Ro);return Ao(n,{type:"Symbol",tag:e,description:t}),Gs||(n.description=t),n},Vo=function(e,t,n){e===Eo&&Vo(jo,t,n),$s(e);var r=Js(t);return $s(n),Fs(Uo,r)?(n.enumerable?(Fs(e,_o)&&e[_o][r]&&(e[_o][r]=!1),n=eo(n,{enumerable:Zs(0,!1)})):(Fs(e,_o)||Oo(e,_o,Zs(1,{})),e[_o][r]=!0),qo(e,r,n)):Oo(e,r,n)},Wo=function(e,t){$s(e);var n=Ys(t),r=to(n).concat($o(n));return bo(r,(function(t){Gs&&!js(Ho,n,t)||Vo(e,t,n[t])})),e},Ho=function(e){var t=Js(e),n=js(Co,this,t);return!(this===Eo&&Fs(Uo,t)&&!Fs(jo,t))&&(!(n||!Fs(this,t)||!Fs(Uo,t)||Fs(this,_o)&&this[_o][t])||n)},Ko=function(e,t){var n=Ys(e),r=Js(t);if(n!==Eo||!Fs(Uo,r)||Fs(jo,r)){var a=Io(n,r);return!a||!Fs(Uo,r)||Fs(n,_o)&&n[_o][r]||(a.enumerable=!0),a}},zo=function(e){var t=Po(Ys(e)),n=[];return bo(t,(function(e){Fs(Uo,e)||Fs(ho,e)||Lo(n,e)})),n},$o=function(e){var t=e===Eo,n=Po(t?jo:Ys(e)),r=[];return bo(n,(function(e){!Fs(Uo,e)||t&&!Fs(Eo,e)||Lo(r,Uo[e])})),r};(Bs||(co(Ro=(xo=function(){if(Ks(Ro,this))throw So("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Xs(arguments[0]):void 0,t=fo(e),n=function(e){this===Eo&&js(n,jo,e),Fs(this,_o)&&Fs(this[_o],t)&&(this[_o][t]=!1),qo(this,t,Zs(1,e))};return Gs&&No&&qo(Eo,t,{configurable:!0,set:n}),Fo(t,e)}).prototype,"toString",(function(){return ko(this).tag})),co(xo,"withoutSetter",(function(e){return Fo(fo(e),e)})),oo.f=Ho,so.f=Vo,io.f=Ko,no.f=ro.f=zo,ao.f=$o,mo.f=function(e){return Fo(po(e),e)},Gs&&(Oo(Ro,"description",{configurable:!0,get:function(){return ko(this).description}}),co(Eo,"propertyIsEnumerable",Ho,{unsafe:!0}))),Ps({global:!0,wrap:!0,forced:!Bs,sham:!Bs},{Symbol:xo}),bo(to(Bo),(function(e){go(e)})),Ps({target:"Symbol",stat:!0,forced:!Bs},{for:function(e){var t=Xs(e);if(Fs(Mo,t))return Mo[t];var n=xo(t);return Mo[t]=n,Go[n]=t,n},keyFor:function(e){if(!zs(e))throw So(e+" is not a symbol");if(Fs(Go,e))return Go[e]},useSetter:function(){No=!0},useSimple:function(){No=!1}}),Ps({target:"Object",stat:!0,forced:!Bs,sham:!Gs},{create:function(e,t){return void 0===t?eo(e):Wo(eo(e),t)},defineProperty:Vo,defineProperties:Wo,getOwnPropertyDescriptor:Ko}),Ps({target:"Object",stat:!0,forced:!Bs},{getOwnPropertyNames:zo,getOwnPropertySymbols:$o}),Ps({target:"Object",stat:!0,forced:Ns((function(){ao.f(1)}))},{getOwnPropertySymbols:function(e){return ao.f(Qs(e))}}),To)&&Ps({target:"JSON",stat:!0,forced:!Bs||Ns((function(){var e=xo();return"[null]"!=To([e])||"{}"!=To({a:e})||"{}"!=To(Object(e))}))},{stringify:function(e,t,n){var r=uo(arguments),a=t;if((Hs(t)||void 0!==e)&&!zs(e))return Vs(t)||(t=function(e,t){if(Ws(a)&&(t=js(a,this,e,t)),!zs(t))return t}),r[1]=t,Us(To,null,r)}});if(!Ro[wo]){var Qo=Ro.valueOf;co(Ro,wo,(function(e){return js(Qo,this)}))}vo(xo,"Symbol"),ho[_o]=!0;var Yo=Se,Jo=Re,Xo=Fe("species"),Zo=function(e){return Jo>=51||!Yo((function(){var t=[];return(t.constructor={})[Xo]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},ed=ia.filter;Ri({target:"Array",proto:!0,forced:!Zo("filter")},{filter:function(e){return ed(this,e,arguments.length>1?arguments[1]:void 0)}});var td=Ri,nd=Se,rd=ka,ad=ga.f,id=Ke,sd=nd((function(){ad(1)}));td({target:"Object",stat:!0,forced:!id||sd,sham:!id},{getOwnPropertyDescriptor:function(e,t){return ad(rd(e),t)}});var od=Gt,dd=ze,ud=Ht,cd=function(e,t,n){var r=od(t);r in e?dd.f(e,r,ud(0,n)):e[r]=n},ld=ai,hd=ka,fd=ga,pd=cd;Ri({target:"Object",stat:!0,sham:!Ke},{getOwnPropertyDescriptors:function(e){for(var t,n,r=hd(e),a=fd.f,i=ld(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&pd(s,t,n);return s}});var md=Ri,gd=N,vd=Ir,yd=Vr,bd=Qe,_d=Ma,wd=Dr,Ad=ka,kd=cd,Ed=Fe,xd=ms,Rd=Zo("slice"),Sd=Ed("species"),Dd=gd.Array,Td=Math.max;md({target:"Array",proto:!0,forced:!Rd},{slice:function(e,t){var n,r,a,i=Ad(this),s=wd(i),o=_d(e,s),d=_d(void 0===t?s:t,s);if(vd(i)&&(n=i.constructor,(yd(n)&&(n===Dd||vd(n.prototype))||bd(n)&&null===(n=n[Sd]))&&(n=void 0),n===Dd||void 0===n))return xd(i,o,d);for(r=new(void 0===n?Dd:n)(Td(d-o,0)),a=0;o<d;o++,a++)o in i&&kd(r,a,i[o]);return r.length=a,r}});var Id=dt,Od=st,Pd=kt,Cd=function(e,t,n){var r,a;Od(e);try{if(!(r=Pd(e,"return"))){if("throw"===t)throw n;return n}r=Id(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Od(r),n},Ld=st,Ud=Cd,jd={},Md=jd,Gd=Fe("iterator"),Bd=Array.prototype,Nd=function(e){return void 0!==e&&(Md.Array===e||Bd[Gd]===e)},qd=nr,Fd=kt,Vd=jd,Wd=Fe("iterator"),Hd=function(e){if(null!=e)return Fd(e,Wd)||Fd(e,"@@iterator")||Vd[qd(e)]},Kd=dt,zd=wt,$d=st,Qd=vt,Yd=Hd,Jd=N.TypeError,Xd=function(e,t){var n=arguments.length<2?Yd(e):t;if(zd(n))return $d(Kd(n,e));throw Jd(Qd(e)+" is not iterable")},Zd=pr,eu=dt,tu=ie,nu=function(e,t,n,r){try{return r?t(Ld(n)[0],n[1]):t(n)}catch(t){Ud(e,"throw",t)}},ru=Nd,au=Vr,iu=Dr,su=cd,ou=Xd,du=Hd,uu=N.Array,cu=Fe("iterator"),lu=!1;try{var hu=0,fu={next:function(){return{done:!!hu++}},return:function(){lu=!0}};fu[cu]=function(){return this},Array.from(fu,(function(){throw 2}))}catch(e){}var pu=function(e,t){if(!t&&!lu)return!1;var n=!1;try{var r={};r[cu]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},mu=function(e){var t=tu(e),n=au(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=Zd(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=du(t),f=0;if(!h||this==uu&&ru(h))for(s=iu(t),o=n?new this(s):uu(s);s>f;f++)l=i?a(t[f],f):t[f],su(o,f,l);else for(c=(u=ou(t,h)).next,o=n?new this:[];!(d=eu(c,u)).done;f++)l=i?nu(u,a,[d.value,f],!0):d.value,su(o,f,l);return o.length=f,o};Ri({target:"Array",stat:!0,forced:!pu((function(e){Array.from(e)}))},{from:mu});var gu,vu,yu,bu=ee,_u=kr,wu=Qi,Au=ne,ku=bu("".charAt),Eu=bu("".charCodeAt),xu=bu("".slice),Ru=function(e){return function(t,n){var r,a,i=wu(Au(t)),s=_u(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=Eu(i,s))<55296||r>56319||s+1===o||(a=Eu(i,s+1))<56320||a>57343?e?ku(i,s):r:e?xu(i,s,s+2):a-56320+(r-55296<<10)+65536}},Su={codeAt:Ru(!1),charAt:Ru(!0)},Du=!Se((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Tu=N,Iu=de,Ou=pe,Pu=ie,Cu=Du,Lu=cn("IE_PROTO"),Uu=Tu.Object,ju=Uu.prototype,Mu=Cu?Uu.getPrototypeOf:function(e){var t=Pu(e);if(Iu(t,Lu))return t[Lu];var n=t.constructor;return Ou(n)&&t instanceof n?n.prototype:t instanceof Uu?ju:null},Gu=Se,Bu=pe,Nu=Mu,qu=He.exports,Fu=Fe("iterator"),Vu=!1;[].keys&&("next"in(yu=[].keys())?(vu=Nu(Nu(yu)))!==Object.prototype&&(gu=vu):Vu=!0);var Wu=null==gu||Gu((function(){var e={};return gu[Fu].call(e)!==e}));Wu&&(gu={}),Bu(gu[Fu])||qu(gu,Fu,(function(){return this}));var Hu={IteratorPrototype:gu,BUGGY_SAFARI_ITERATORS:Vu},Ku=Hu.IteratorPrototype,zu=fs,$u=Ht,Qu=Os,Yu=jd,Ju=function(){return this},Xu=function(e,t,n){var r=t+" Iterator";return e.prototype=zu(Ku,{next:$u(1,n)}),Qu(e,r,!1),Yu[r]=Ju,e},Zu=N,ec=pe,tc=Zu.String,nc=Zu.TypeError,rc=ee,ac=st,ic=function(e){if("object"==typeof e||ec(e))return e;throw nc("Can't set "+tc(e)+" as a prototype")},sc=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=rc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return ac(n),ic(r),t?e(n,r):n.__proto__=r,n}}():void 0),oc=Ri,dc=dt,uc=Ln,cc=pe,lc=Xu,hc=Mu,fc=sc,pc=Os,mc=$t,gc=He.exports,vc=jd,yc=uc.PROPER,bc=uc.CONFIGURABLE,_c=Hu.IteratorPrototype,wc=Hu.BUGGY_SAFARI_ITERATORS,Ac=Fe("iterator"),kc=function(){return this},Ec=function(e,t,n,r,a,i,s){lc(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!wc&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Ac]||f["@@iterator"]||a&&f[a],m=!wc&&p||c(a),g="Array"==t&&f.entries||p;if(g&&(o=hc(g.call(new e)))!==Object.prototype&&o.next&&(hc(o)!==_c&&(fc?fc(o,_c):cc(o[Ac])||gc(o,Ac,kc)),pc(o,l,!0)),yc&&"values"==a&&p&&"values"!==p.name&&(bc?mc(f,"name","values"):(h=!0,m=function(){return dc(p,this)})),a)if(d={values:c("values"),keys:i?m:c("keys"),entries:c("entries")},s)for(u in d)(wc||h||!(u in f))&&gc(f,u,d[u]);else oc({target:t,proto:!0,forced:wc||h},d);return f[Ac]!==m&&gc(f,Ac,m,{name:a}),vc[t]=m,d},xc=Su.charAt,Rc=Qi,Sc=Dn,Dc=Ec,Tc=Sc.set,Ic=Sc.getterFor("String Iterator");Dc(String,"String",(function(e){Tc(this,{type:"String Iterator",string:Rc(e),index:0})}),(function(){var e,t=Ic(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=xc(n,r),t.index+=e.length,{value:e,done:!1})}));var Oc=st,Pc=function(){var e=Oc(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Cc={},Lc=Se,Uc=N.RegExp;Cc.UNSUPPORTED_Y=Lc((function(){var e=Uc("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Cc.BROKEN_CARET=Lc((function(){var e=Uc("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var jc=Se,Mc=N.RegExp,Gc=jc((function(){var e=Mc(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Bc=Se,Nc=N.RegExp,qc=Bc((function(){var e=Nc("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Fc=dt,Vc=ee,Wc=Qi,Hc=Pc,Kc=Cc,zc=q.exports,$c=fs,Qc=Dn.get,Yc=Gc,Jc=qc,Xc=zc("native-string-replace",String.prototype.replace),Zc=RegExp.prototype.exec,el=Zc,tl=Vc("".charAt),nl=Vc("".indexOf),rl=Vc("".replace),al=Vc("".slice),il=function(){var e=/a/,t=/b*/g;return Fc(Zc,e,"a"),Fc(Zc,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),sl=Kc.UNSUPPORTED_Y||Kc.BROKEN_CARET,ol=void 0!==/()??/.exec("")[1];(il||ol||sl||Yc||Jc)&&(el=function(e){var t,n,r,a,i,s,o,d=this,u=Qc(d),c=Wc(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=Fc(el,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=sl&&d.sticky,p=Fc(Hc,d),m=d.source,g=0,v=c;if(f&&(p=rl(p,"y",""),-1===nl(p,"g")&&(p+="g"),v=al(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==tl(c,d.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",p)),ol&&(n=new RegExp("^"+m+"$(?!\\s)",p)),il&&(r=d.lastIndex),a=Fc(Zc,f?n:d,v),f?a?(a.input=al(a.input,g),a[0]=al(a[0],g),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:il&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),ol&&a&&a.length>1&&Fc(Xc,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=$c(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var dl=el;Ri({target:"RegExp",proto:!0,forced:/./.exec!==dl},{exec:dl});var ul=Ri,cl=Ke,ll=N,hl=ee,fl=de,pl=pe,ml=ut,gl=Qi,vl=ze.f,yl=ui,bl=ll.Symbol,_l=bl&&bl.prototype;if(cl&&pl(bl)&&(!("description"in _l)||void 0!==bl().description)){var wl={},Al=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:gl(arguments[0]),t=ml(_l,this)?new bl(e):void 0===e?bl():bl(e);return""===e&&(wl[t]=!0),t};yl(Al,bl),Al.prototype=_l,_l.constructor=Al;var kl="Symbol(test)"==String(bl("test")),El=hl(_l.toString),xl=hl(_l.valueOf),Rl=/^Symbol\((.*)\)[^)]+$/,Sl=hl("".replace),Dl=hl("".slice);vl(_l,"description",{configurable:!0,get:function(){var e=xl(this),t=El(e);if(fl(wl,e))return"";var n=kl?Dl(t,7,-1):Sl(t,Rl,"$1");return""===n?void 0:n}}),ul({global:!0,forced:!0},{Symbol:Al})}Ss("iterator");var Tl=fs,Il=ze,Ol=Fe("unscopables"),Pl=Array.prototype;null==Pl[Ol]&&Il.f(Pl,Ol,{configurable:!0,value:Tl(null)});var Cl=function(e){Pl[Ol][e]=!0},Ll=ka,Ul=Cl,jl=jd,Ml=Dn,Gl=Ec,Bl=Ml.set,Nl=Ml.getterFor("Array Iterator"),ql=Gl(Array,"Array",(function(e,t){Bl(this,{type:"Array Iterator",target:Ll(e),index:0,kind:t})}),(function(){var e=Nl(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");jl.Arguments=jl.Array,Ul("keys"),Ul("values"),Ul("entries");var Fl=N,Vl=dr,Wl=lr,Hl=ql,Kl=$t,zl=Fe,$l=zl("iterator"),Ql=zl("toStringTag"),Yl=Hl.values,Jl=function(e,t){if(e){if(e[$l]!==Yl)try{Kl(e,$l,Yl)}catch(t){e[$l]=Yl}if(e[Ql]||Kl(e,Ql,t),Vl[t])for(var n in Hl)if(e[n]!==Hl[n])try{Kl(e,n,Hl[n])}catch(t){e[n]=Hl[n]}}};for(var Xl in Vl)Jl(Fl[Xl]&&Fl[Xl].prototype,Xl);Jl(Wl,"DOMTokenList");var Zl,eh,th,nh,rh=N.Promise,ah=He.exports,ih=function(e,t,n){for(var r in t)ah(e,r,t[r],n);return e},sh=ye,oh=ze,dh=Ke,uh=Fe("species"),ch=function(e){var t=sh(e),n=oh.f;dh&&t&&!t[uh]&&n(t,uh,{configurable:!0,get:function(){return this}})},lh=ut,hh=N.TypeError,fh=function(e,t){if(lh(t,e))return e;throw hh("Incorrect invocation")},ph=pr,mh=dt,gh=st,vh=vt,yh=Nd,bh=Dr,_h=ut,wh=Xd,Ah=Hd,kh=Cd,Eh=N.TypeError,xh=function(e,t){this.stopped=e,this.result=t},Rh=xh.prototype,Sh=Vr,Dh=vt,Th=N.TypeError,Ih=st,Oh=function(e){if(Sh(e))return e;throw Th(Dh(e)+" is not a constructor")},Ph=Fe("species"),Ch=function(e,t){var n,r=Ih(e).constructor;return void 0===r||null==(n=Ih(r)[Ph])?t:Oh(n)},Lh=/(?:ipad|iphone|ipod).*applewebkit/i.test(be),Uh="process"==$n(N.process),jh=N,Mh=Ki,Gh=pr,Bh=pe,Nh=de,qh=Se,Fh=ts,Vh=ms,Wh=Ze,Hh=Lh,Kh=Uh,zh=jh.setImmediate,$h=jh.clearImmediate,Qh=jh.process,Yh=jh.Dispatch,Jh=jh.Function,Xh=jh.MessageChannel,Zh=jh.String,ef=0,tf={};try{Zl=jh.location}catch(e){}var nf=function(e){if(Nh(tf,e)){var t=tf[e];delete tf[e],t()}},rf=function(e){return function(){nf(e)}},af=function(e){nf(e.data)},sf=function(e){jh.postMessage(Zh(e),Zl.protocol+"//"+Zl.host)};zh&&$h||(zh=function(e){var t=Vh(arguments,1);return tf[++ef]=function(){Mh(Bh(e)?e:Jh(e),void 0,t)},eh(ef),ef},$h=function(e){delete tf[e]},Kh?eh=function(e){Qh.nextTick(rf(e))}:Yh&&Yh.now?eh=function(e){Yh.now(rf(e))}:Xh&&!Hh?(nh=(th=new Xh).port2,th.port1.onmessage=af,eh=Gh(nh.postMessage,nh)):jh.addEventListener&&Bh(jh.postMessage)&&!jh.importScripts&&Zl&&"file:"!==Zl.protocol&&!qh(sf)?(eh=sf,jh.addEventListener("message",af,!1)):eh="onreadystatechange"in Wh("script")?function(e){Fh.appendChild(Wh("script")).onreadystatechange=function(){Fh.removeChild(this),nf(e)}}:function(e){setTimeout(rf(e),0)});var of,df,uf,cf,lf,hf,ff,pf,mf={set:zh,clear:$h},gf=N,vf=/ipad|iphone|ipod/i.test(be)&&void 0!==gf.Pebble,yf=/web0s(?!.*chrome)/i.test(be),bf=N,_f=pr,wf=ga.f,Af=mf.set,kf=Lh,Ef=vf,xf=yf,Rf=Uh,Sf=bf.MutationObserver||bf.WebKitMutationObserver,Df=bf.document,Tf=bf.process,If=bf.Promise,Of=wf(bf,"queueMicrotask"),Pf=Of&&Of.value;Pf||(of=function(){var e,t;for(Rf&&(e=Tf.domain)&&e.exit();df;){t=df.fn,df=df.next;try{t()}catch(e){throw df?cf():uf=void 0,e}}uf=void 0,e&&e.enter()},kf||Rf||xf||!Sf||!Df?!Ef&&If&&If.resolve?((ff=If.resolve(void 0)).constructor=If,pf=_f(ff.then,ff),cf=function(){pf(of)}):Rf?cf=function(){Tf.nextTick(of)}:(Af=_f(Af,bf),cf=function(){Af(of)}):(lf=!0,hf=Df.createTextNode(""),new Sf(of).observe(hf,{characterData:!0}),cf=function(){hf.data=lf=!lf}));var Cf=Pf||function(e){var t={fn:e,next:void 0};uf&&(uf.next=t),df||(df=t,cf()),uf=t},Lf={},Uf=wt,jf=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=Uf(t),this.reject=Uf(n)};Lf.f=function(e){return new jf(e)};var Mf,Gf,Bf,Nf,qf=st,Ff=Qe,Vf=Lf,Wf=function(e,t){if(qf(e),Ff(t)&&t.constructor===e)return t;var n=Vf.f(e);return(0,n.resolve)(t),n.promise},Hf=N,Kf="object"==typeof window,zf=Ri,$f=N,Qf=ye,Yf=dt,Jf=rh,Xf=He.exports,Zf=ih,ep=sc,tp=Os,np=ch,rp=wt,ap=pe,ip=Qe,sp=fh,op=tn,dp=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),p=ph(t,c),m=function(e){return r&&kh(r,"normal",e),new xh(!0,e)},g=function(e){return l?(gh(e),f?p(e[0],e[1],m):p(e[0],e[1])):f?p(e,m):p(e)};if(h)r=e;else{if(!(a=Ah(e)))throw Eh(vh(e)+" is not iterable");if(yh(a)){for(i=0,s=bh(e);s>i;i++)if((o=g(e[i]))&&_h(Rh,o))return o;return new xh(!1)}r=wh(e,a)}for(d=r.next;!(u=mh(d,r)).done;){try{o=g(u.value)}catch(e){kh(r,"throw",e)}if("object"==typeof o&&o&&_h(Rh,o))return o}return new xh(!1)},up=pu,cp=Ch,lp=mf.set,hp=Cf,fp=Wf,pp=function(e,t){var n=Hf.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},mp=Lf,gp=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},vp=Dn,yp=yi,bp=Kf,_p=Uh,wp=Re,Ap=Fe("species"),kp=vp.get,Ep=vp.set,xp=vp.getterFor("Promise"),Rp=Jf&&Jf.prototype,Sp=Jf,Dp=Rp,Tp=$f.TypeError,Ip=$f.document,Op=$f.process,Pp=mp.f,Cp=Pp,Lp=!!(Ip&&Ip.createEvent&&$f.dispatchEvent),Up=ap($f.PromiseRejectionEvent),jp=!1,Mp=yp("Promise",(function(){var e=op(Sp),t=e!==String(Sp);if(!t&&66===wp)return!0;if(wp>=51&&/native code/.test(e))return!1;var n=new Sp((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[Ap]=r,!(jp=n.then((function(){}))instanceof r)||!t&&bp&&!Up})),Gp=Mp||!up((function(e){Sp.all(e).catch((function(){}))})),Bp=function(e){var t;return!(!ip(e)||!ap(t=e.then))&&t},Np=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;hp((function(){for(var r=e.value,a=1==e.state,i=0;n.length>i;){var s,o,d,u=n[i++],c=a?u.ok:u.fail,l=u.resolve,h=u.reject,f=u.domain;try{c?(a||(2===e.rejection&&Wp(e),e.rejection=1),!0===c?s=r:(f&&f.enter(),s=c(r),f&&(f.exit(),d=!0)),s===u.promise?h(Tp("Promise-chain cycle")):(o=Bp(s))?Yf(o,s,l,h):l(s)):h(r)}catch(e){f&&!d&&f.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Fp(e)}))}},qp=function(e,t,n){var r,a;Lp?((r=Ip.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),$f.dispatchEvent(r)):r={promise:t,reason:n},!Up&&(a=$f["on"+e])?a(r):"unhandledrejection"===e&&pp("Unhandled promise rejection",n)},Fp=function(e){Yf(lp,$f,(function(){var t,n=e.facade,r=e.value;if(Vp(e)&&(t=gp((function(){_p?Op.emit("unhandledRejection",r,n):qp("unhandledrejection",n,r)})),e.rejection=_p||Vp(e)?2:1,t.error))throw t.value}))},Vp=function(e){return 1!==e.rejection&&!e.parent},Wp=function(e){Yf(lp,$f,(function(){var t=e.facade;_p?Op.emit("rejectionHandled",t):qp("rejectionhandled",t,e.value)}))},Hp=function(e,t,n){return function(r){e(t,r,n)}},Kp=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Np(e,!0))},zp=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Tp("Promise can't be resolved itself");var r=Bp(t);r?hp((function(){var n={done:!1};try{Yf(r,t,Hp(zp,n,e),Hp(Kp,n,e))}catch(t){Kp(n,t,e)}})):(e.value=t,e.state=1,Np(e,!1))}catch(t){Kp({done:!1},t,e)}}};if(Mp&&(Dp=(Sp=function(e){sp(this,Dp),rp(e),Yf(Mf,this);var t=kp(this);try{e(Hp(zp,t),Hp(Kp,t))}catch(e){Kp(t,e)}}).prototype,(Mf=function(e){Ep(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Zf(Dp,{then:function(e,t){var n=xp(this),r=n.reactions,a=Pp(cp(this,Sp));return a.ok=!ap(e)||e,a.fail=ap(t)&&t,a.domain=_p?Op.domain:void 0,n.parent=!0,r[r.length]=a,0!=n.state&&Np(n,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),Gf=function(){var e=new Mf,t=kp(e);this.promise=e,this.resolve=Hp(zp,t),this.reject=Hp(Kp,t)},mp.f=Pp=function(e){return e===Sp||e===Bf?new Gf(e):Cp(e)},ap(Jf)&&Rp!==Object.prototype)){Nf=Rp.then,jp||(Xf(Rp,"then",(function(e,t){var n=this;return new Sp((function(e,t){Yf(Nf,n,e,t)})).then(e,t)}),{unsafe:!0}),Xf(Rp,"catch",Dp.catch,{unsafe:!0}));try{delete Rp.constructor}catch(e){}ep&&ep(Rp,Dp)}zf({global:!0,wrap:!0,forced:Mp},{Promise:Sp}),tp(Sp,"Promise",!1),np("Promise"),Bf=Qf("Promise"),zf({target:"Promise",stat:!0,forced:Mp},{reject:function(e){var t=Pp(this);return Yf(t.reject,void 0,e),t.promise}}),zf({target:"Promise",stat:!0,forced:Mp},{resolve:function(e){return fp(this,e)}}),zf({target:"Promise",stat:!0,forced:Gp},{all:function(e){var t=this,n=Pp(t),r=n.resolve,a=n.reject,i=gp((function(){var n=rp(t.resolve),i=[],s=0,o=1;dp(e,(function(e){var d=s++,u=!1;o++,Yf(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=Pp(t),r=n.reject,a=gp((function(){var a=rp(t.resolve);dp(e,(function(e){Yf(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var $p=Ri,Qp=N,Yp=Se,Jp=Ir,Xp=Qe,Zp=ie,em=Dr,tm=cd,nm=Jr,rm=Zo,am=Re,im=Fe("isConcatSpreadable"),sm=Qp.TypeError,om=am>=51||!Yp((function(){var e=[];return e[im]=!1,e.concat()[0]!==e})),dm=rm("concat"),um=function(e){if(!Xp(e))return!1;var t=e[im];return void 0!==t?!!t:Jp(e)};$p({target:"Array",proto:!0,forced:!om||!dm},{concat:function(e){var t,n,r,a,i,s=Zp(this),o=nm(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(um(i=-1===t?s:arguments[t])){if(d+(a=em(i))>9007199254740991)throw sm("Maximum allowed index exceeded");for(n=0;n<a;n++,d++)n in i&&tm(o,d,i[n])}else{if(d>=9007199254740991)throw sm("Maximum allowed index exceeded");tm(o,d++,i)}return o.length=d,o}});var cm=Ke,lm=Ln.EXISTS,hm=ee,fm=ze.f,pm=Function.prototype,mm=hm(pm.toString),gm=/^\s*function ([^ (]*)/,vm=hm(gm.exec);function ym(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 bm(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 bm(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 bm(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 _m(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 wm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_m(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}cm&&!lm&&fm(pm,"name",{configurable:!0,get:function(){try{return vm(gm,mm(this))[1]}catch(e){return""}}});var Am,km={react:{src:"https://pm.gamedistribution.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.gamedistribution.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.gamedistribution.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.gamedistribution.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.gamedistribution.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Em={},xm=function(e,t){Em[e]=wm(wm({},t),{},{isLoading:!1})},Rm=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(k.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))},Sm=function(){var e=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u;return x.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=Em[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=ym(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=km[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Rm({id:s,src:km[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=s.id,u=s.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,Rm({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)}}(),Dm=new function e(){var t=this;R.default(this,e),S.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sm("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),S.default(this,"showLeaderboard",function(){var e=A.default(x.default.mark((function e(n){var r;return x.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)}}()),S.default(this,"addScore",function(){var e=A.default(x.default.mark((function e(n){return x.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.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},xm(this.moduleName,this.moduleConfig)},Tm=Qe,Im=$n,Om=Fe("match"),Pm=function(e){var t;return Tm(e)&&(void 0!==(t=e[Om])?!!t:"RegExp"==Im(e))},Cm=Pm,Lm=N.TypeError,Um=function(e){if(Cm(e))throw Lm("The method doesn't accept regular expressions");return e},jm=Fe("match"),Mm=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[jm]=!1,"/./"[e](t)}catch(e){}}return!1},Gm=Ri,Bm=ee,Nm=ga.f,qm=Rr,Fm=Qi,Vm=Um,Wm=ne,Hm=Mm,Km=Bm("".startsWith),zm=Bm("".slice),$m=Math.min,Qm=Hm("startsWith");Gm({target:"String",proto:!0,forced:!!(Qm||(Am=Nm(String.prototype,"startsWith"),!Am||Am.writable))&&!Qm},{startsWith:function(e){var t=Fm(Wm(this));Vm(e);var n=qm($m(arguments.length>1?arguments[1]:void 0,t.length)),r=Fm(e);return Km?Km(t,r,n):zm(t,n,n+r.length)===r}});var Ym=ee,Jm=Ln.PROPER,Xm=He.exports,Zm=st,eg=ut,tg=Qi,ng=Se,rg=Pc,ag=RegExp.prototype,ig=ag.toString,sg=Ym(rg),og=ng((function(){return"/a/b"!=ig.call({source:"a",flags:"b"})})),dg=Jm&&"toString"!=ig.name;(og||dg)&&Xm(RegExp.prototype,"toString",(function(){var e=Zm(this),t=tg(e.source),n=e.flags;return"/"+t+"/"+tg(void 0===n&&eg(ag,e)&&!("flags"in ag)?sg(e):n)}),{unsafe:!0});var ug=ee,cg=He.exports,lg=dl,hg=Se,fg=Fe,pg=$t,mg=fg("species"),gg=RegExp.prototype,vg=function(e,t,n,r){var a=fg(e),i=!hg((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!hg((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[mg]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=ug(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=ug(e),d=t.exec;return d===lg||d===gg.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));cg(String.prototype,e,d[0]),cg(gg,a,d[1])}r&&pg(gg[a],"sham",!0)},yg=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},bg=dt,_g=st,wg=pe,Ag=$n,kg=dl,Eg=N.TypeError,xg=function(e,t){var n=e.exec;if(wg(n)){var r=bg(n,e,t);return null!==r&&_g(r),r}if("RegExp"===Ag(e))return bg(kg,e,t);throw Eg("RegExp#exec called on incompatible receiver")},Rg=dt,Sg=st,Dg=ne,Tg=yg,Ig=Qi,Og=kt,Pg=xg;function Cg(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 Lg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cg(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}vg("search",(function(e,t,n){return[function(t){var n=Dg(this),r=null==t?void 0:Og(t,e);return r?Rg(r,t,n):new RegExp(t)[e](Ig(n))},function(e){var r=Sg(this),a=Ig(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;Tg(s,0)||(r.lastIndex=0);var o=Pg(r,a);return Tg(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var Ug,jg,Mg=function(){function e(){R.default(this,e)}return D.default(e,[{key:"getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,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:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup: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 T.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 T.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new T.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new T.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 T.default(e,!0);return n.query=Lg(Lg({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),Gg=function(){try{return(new Mg).getBridgeContext()}catch(e){return{}}}(),Bg={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(Ug=!1,(jg=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===jg.xanthophyll&&(Ug=!0),Ug)},Ng=Su.charAt,qg=function(e,t,n){return t+(n?Ng(e,t).length:1)},Fg=ee,Vg=ie,Wg=Math.floor,Hg=Fg("".charAt),Kg=Fg("".replace),zg=Fg("".slice),$g=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Qg=/\$([$&'`]|\d{1,2})/g,Yg=Ki,Jg=dt,Xg=ee,Zg=vg,ev=Se,tv=st,nv=pe,rv=kr,av=Rr,iv=Qi,sv=ne,ov=qg,dv=kt,uv=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=Qg;return void 0!==a&&(a=Vg(a),d=$g),Kg(i,d,(function(i,d){var u;switch(Hg(d,0)){case"$":return"$";case"&":return e;case"`":return zg(t,0,n);case"'":return zg(t,s);case"<":u=a[zg(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=Wg(c/10);return 0===l?i:l<=o?void 0===r[l-1]?Hg(d,1):r[l-1]+Hg(d,1):i}u=r[c-1]}return void 0===u?"":u}))},cv=xg,lv=Fe("replace"),hv=Math.max,fv=Math.min,pv=Xg([].concat),mv=Xg([].push),gv=Xg("".indexOf),vv=Xg("".slice),yv="$0"==="a".replace(/./,"$0"),bv=!!/./[lv]&&""===/./[lv]("a","$0");Zg("replace",(function(e,t,n){var r=bv?"$":"$0";return[function(e,n){var r=sv(this),a=null==e?void 0:dv(e,lv);return a?Jg(a,e,r,n):Jg(t,iv(r),e,n)},function(e,a){var i=tv(this),s=iv(e);if("string"==typeof a&&-1===gv(a,r)&&-1===gv(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=nv(a);d||(a=iv(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=cv(i,s);if(null===h)break;if(mv(l,h),!u)break;""===iv(h[0])&&(i.lastIndex=ov(s,av(i.lastIndex),c))}for(var f,p="",m=0,g=0;g<l.length;g++){for(var v=iv((h=l[g])[0]),y=hv(fv(rv(h.index),s.length),0),b=[],_=1;_<h.length;_++)mv(b,void 0===(f=h[_])?f:String(f));var w=h.groups;if(d){var A=pv([v],b,y,s);void 0!==w&&mv(A,w);var k=iv(Yg(a,void 0,A))}else k=uv(v,s,y,b,w,a);y>=m&&(p+=vv(s,m,y)+k,m=y+v.length)}return p+vv(s,m)}]}),!!ev((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!yv||bv);var _v=Se,wv=Fe("iterator"),Av=!_v((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.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[wv]||"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})),kv=ms,Ev=Math.floor,xv=function(e,t){var n=e.length,r=Ev(n/2);return n<8?Rv(e,t):Sv(e,xv(kv(e,0,r),t),xv(kv(e,r),t),t)},Rv=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},Sv=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},Dv=xv,Tv=Ri,Iv=N,Ov=ye,Pv=dt,Cv=ee,Lv=Av,Uv=He.exports,jv=ih,Mv=Os,Gv=Xu,Bv=Dn,Nv=fh,qv=pe,Fv=de,Vv=pr,Wv=nr,Hv=st,Kv=Qe,zv=Qi,$v=fs,Qv=Ht,Yv=Xd,Jv=Hd,Xv=Dv,Zv=Fe("iterator"),ey=Bv.set,ty=Bv.getterFor("URLSearchParams"),ny=Bv.getterFor("URLSearchParamsIterator"),ry=Ov("fetch"),ay=Ov("Request"),iy=Ov("Headers"),sy=ay&&ay.prototype,oy=iy&&iy.prototype,dy=Iv.RegExp,uy=Iv.TypeError,cy=Iv.decodeURIComponent,ly=Iv.encodeURIComponent,hy=Cv("".charAt),fy=Cv([].join),py=Cv([].push),my=Cv("".replace),gy=Cv([].shift),vy=Cv([].splice),yy=Cv("".split),by=Cv("".slice),_y=/\+/g,wy=Array(4),Ay=function(e){return wy[e-1]||(wy[e-1]=dy("((?:%[\\da-f]{2}){"+e+"})","gi"))},ky=function(e){try{return cy(e)}catch(t){return e}},Ey=function(e){var t=my(e,_y," "),n=4;try{return cy(t)}catch(e){for(;n;)t=my(t,Ay(n--),ky);return t}},xy=/[!'()~]|%20/g,Ry={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Sy=function(e){return Ry[e]},Dy=function(e){return my(ly(e),xy,Sy)},Ty=function(e,t){if(t)for(var n,r,a=yy(t,"&"),i=0;i<a.length;)(n=a[i++]).length&&(r=yy(n,"="),py(e,{key:Ey(gy(r)),value:Ey(fy(r,"="))}))},Iy=function(e){this.entries.length=0,Ty(this.entries,e)},Oy=function(e,t){if(e<t)throw uy("Not enough arguments")},Py=Gv((function(e,t){ey(this,{type:"URLSearchParamsIterator",iterator:Yv(ty(e).entries),kind:t})}),"Iterator",(function(){var e=ny(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})),Cy=function(){Nv(this,Ly);var e,t,n,r,a,i,s,o,d,u=arguments.length>0?arguments[0]:void 0,c=this,l=[];if(ey(c,{type:"URLSearchParams",entries:l,updateURL:function(){},updateSearchParams:Iy}),void 0!==u)if(Kv(u))if(e=Jv(u))for(n=(t=Yv(u,e)).next;!(r=Pv(n,t)).done;){if(i=(a=Yv(Hv(r.value))).next,(s=Pv(i,a)).done||(o=Pv(i,a)).done||!Pv(i,a).done)throw uy("Expected sequence with length 2");py(l,{key:zv(s.value),value:zv(o.value)})}else for(d in u)Fv(u,d)&&py(l,{key:d,value:zv(u[d])});else Ty(l,"string"==typeof u?"?"===hy(u,0)?by(u,1):u:zv(u))},Ly=Cy.prototype;if(jv(Ly,{append:function(e,t){Oy(arguments.length,2);var n=ty(this);py(n.entries,{key:zv(e),value:zv(t)}),n.updateURL()},delete:function(e){Oy(arguments.length,1);for(var t=ty(this),n=t.entries,r=zv(e),a=0;a<n.length;)n[a].key===r?vy(n,a,1):a++;t.updateURL()},get:function(e){Oy(arguments.length,1);for(var t=ty(this).entries,n=zv(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Oy(arguments.length,1);for(var t=ty(this).entries,n=zv(e),r=[],a=0;a<t.length;a++)t[a].key===n&&py(r,t[a].value);return r},has:function(e){Oy(arguments.length,1);for(var t=ty(this).entries,n=zv(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Oy(arguments.length,1);for(var n,r=ty(this),a=r.entries,i=!1,s=zv(e),o=zv(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?vy(a,d--,1):(i=!0,n.value=o));i||py(a,{key:s,value:o}),r.updateURL()},sort:function(){var e=ty(this);Xv(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=ty(this).entries,r=Vv(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 Py(this,"keys")},values:function(){return new Py(this,"values")},entries:function(){return new Py(this,"entries")}},{enumerable:!0}),Uv(Ly,Zv,Ly.entries,{name:"entries"}),Uv(Ly,"toString",(function(){for(var e,t=ty(this).entries,n=[],r=0;r<t.length;)e=t[r++],py(n,Dy(e.key)+"="+Dy(e.value));return fy(n,"&")}),{enumerable:!0}),Mv(Cy,"URLSearchParams"),Tv({global:!0,forced:!Lv},{URLSearchParams:Cy}),!Lv&&qv(iy)){var Uy=Cv(oy.has),jy=Cv(oy.set),My=function(e){if(Kv(e)){var t,n=e.body;if("URLSearchParams"===Wv(n))return t=e.headers?new iy(e.headers):new iy,Uy(t,"content-type")||jy(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),$v(e,{body:Qv(0,zv(n)),headers:Qv(0,t)})}return e};if(qv(ry)&&Tv({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return ry(e,arguments.length>1?My(arguments[1]):{})}}),qv(ay)){var Gy=function(e){return Nv(this,sy),new ay(e,arguments.length>1?My(arguments[1]):{})};sy.constructor=Gy,Gy.prototype=sy,Tv({global:!0,forced:!0},{Request:Gy})}}var By=Fa.includes,Ny=Cl;Ri({target:"Array",proto:!0},{includes:function(e){return By(this,e,arguments.length>1?arguments[1]:void 0)}}),Ny("includes");var qy=Ri,Fy=Um,Vy=ne,Wy=Qi,Hy=Mm,Ky=ee("".indexOf);qy({target:"String",proto:!0,forced:!Hy("includes")},{includes:function(e){return!!~Ky(Wy(Vy(this)),Wy(Fy(e)),arguments.length>1?arguments[1]:void 0)}});var zy=Ki,$y=dt,Qy=ee,Yy=vg,Jy=Pm,Xy=st,Zy=ne,eb=Ch,tb=qg,nb=Rr,rb=Qi,ab=kt,ib=ms,sb=xg,ob=dl,db=Se,ub=Cc.UNSUPPORTED_Y,cb=Math.min,lb=[].push,hb=Qy(/./.exec),fb=Qy(lb),pb=Qy("".slice);function mb(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 P.default(n,e)}function d(e,t){return C.default(n,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new T.default(e,t)}catch(e){console.log(e)}}function c(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=decodeURIComponent(o),I.default.isURL(o)))return o}}}return function(){var e;k.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(d("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],d("top.domain.from","origins");else if(0===t)a=i,d("top.domain.from","self-top");else if(1===t){var o=u(s);o&&(a=o.origin,d("top.domain.from","referrer"))}d("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(O.default(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?O.default(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",s),d("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}Yy("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=rb(Zy(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!Jy(e))return $y(t,r,e,a);for(var i,s,o,d=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,l=new RegExp(e.source,u+"g");(i=$y(ob,l,r))&&!((s=l.lastIndex)>c&&(fb(d,pb(r,c,i.index)),i.length>1&&i.index<r.length&&zy(lb,d,ib(i,1)),o=i[0].length,c=s,d.length>=a));)l.lastIndex===i.index&&l.lastIndex++;return c===r.length?!o&&hb(l,"")||fb(d,""):fb(d,pb(r,c)),d.length>a?ib(d,0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:$y(t,this,e,n)}:t,[function(t,n){var a=Zy(this),i=null==t?void 0:ab(t,e);return i?$y(i,t,a,n):$y(r,rb(a),t,n)},function(e,a){var i=Xy(this),s=rb(e),o=n(r,i,s,a,r!==t);if(o.done)return o.value;var d=eb(i,RegExp),u=i.unicode,c=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(ub?"g":"y"),l=new d(ub?"^(?:"+i.source+")":i,c),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===s.length)return null===sb(l,s)?[s]:[];for(var f=0,p=0,m=[];p<s.length;){l.lastIndex=ub?0:p;var g,v=sb(l,ub?pb(s,p):s);if(null===v||(g=cb(nb(l.lastIndex+(ub?p:0)),s.length))===f)p=tb(s,p,u);else{if(fb(m,pb(s,f,p)),m.length===h)return m;for(var y=1;y<=v.length-1;y++)if(fb(m,v[y]),m.length===h)return m;p=f=g}}return fb(m,pb(s,f)),m}]}),!!db((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),ub);var gb="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==gb&&gb,vb="URLSearchParams"in gb,yb="Symbol"in gb&&"iterator"in Symbol,bb="FileReader"in gb&&"Blob"in gb&&function(){try{return new Blob,!0}catch(e){return!1}}(),_b="FormData"in gb,wb="ArrayBuffer"in gb;if(wb)var Ab=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],kb=ArrayBuffer.isView||function(e){return e&&Ab.indexOf(Object.prototype.toString.call(e))>-1};function Eb(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 xb(e){return"string"!=typeof e&&(e=String(e)),e}function Rb(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return yb&&(t[Symbol.iterator]=function(){return t}),t}function Sb(e){this.map={},e instanceof Sb?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 Db(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Tb(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Ib(e){var t=new FileReader,n=Tb(t);return t.readAsArrayBuffer(e),n}function Ob(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Pb(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:bb&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:_b&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:vb&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():wb&&bb&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Ob(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):wb&&(ArrayBuffer.prototype.isPrototypeOf(e)||kb(e))?this._bodyArrayBuffer=Ob(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):vb&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},bb&&(this.blob=function(){var e=Db(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=Db(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(Ib)}),this.text=function(){var e=Db(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Tb(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)},_b&&(this.formData=function(){return this.text().then(Ub)}),this.json=function(){return this.text().then(JSON.parse)},this}Sb.prototype.append=function(e,t){e=Eb(e),t=xb(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Sb.prototype.delete=function(e){delete this.map[Eb(e)]},Sb.prototype.get=function(e){return e=Eb(e),this.has(e)?this.map[e]:null},Sb.prototype.has=function(e){return this.map.hasOwnProperty(Eb(e))},Sb.prototype.set=function(e,t){this.map[Eb(e)]=xb(t)},Sb.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Sb.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Rb(e)},Sb.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Rb(e)},Sb.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Rb(e)},yb&&(Sb.prototype[Symbol.iterator]=Sb.prototype.entries);var Cb=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Lb(e,t){if(!(this instanceof Lb))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 Lb){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Sb(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 Sb(t.headers)),this.method=function(e){var t=e.toUpperCase();return Cb.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 Ub(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 jb(e,t){if(!(this instanceof jb))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 Sb(t.headers),this.url=t.url||"",this._initBody(e)}Lb.prototype.clone=function(){return new Lb(this,{body:this._bodyInit})},Pb.call(Lb.prototype),Pb.call(jb.prototype),jb.prototype.clone=function(){return new jb(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Sb(this.headers),url:this.url})},jb.error=function(){var e=new jb(null,{status:0,statusText:""});return e.type="error",e};var Mb=[301,302,303,307,308];jb.redirect=function(e,t){if(-1===Mb.indexOf(t))throw new RangeError("Invalid status code");return new jb(null,{status:t,headers:{location:e}})};var Gb,Bb=gb.DOMException;try{new Bb}catch(e){Bb=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Bb.prototype=Object.create(Error.prototype),Bb.prototype.constructor=Bb}function Nb(e,t){return new Promise((function(n,r){var a=new Lb(e,t);if(a.signal&&a.signal.aborted)return r(new Bb("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 Sb,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 jb(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 Bb("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&gb.location.href?gb.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&&(bb?i.responseType="blob":wb&&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 Sb?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,xb(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)}))}Nb.polyfill=!0,gb.fetch||(gb.fetch=Nb,gb.Headers=Sb,gb.Request=Lb,gb.Response=jb);var qb,Fb=function(e){var t=this;if(!Gb){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:Gg.topDomain,domain:Gg.parentDomain,referrer:Gg.parentURL,depth:a.getIframeDepth(),version:Ui.version,byloader:Gg.isTokenGameURL,isTokenGameURL:Gg.isTokenGameURL,isMasterGameURL:Gg.isMasterGameURL,isExtHostedGameURL:Gg.isExtHostedGameURL,byloaderVersion:Gg.version,tracking:Bg.userDeclinedTracking,whitelabel:Bg.whitelabelPartner,platform:a.getMobilePlatform()};Gb=new a.MessageRouter(n)}return Gb||{send:function(){k.default(this,t)}.bind(this)}};var Vb,Wb,Hb=[],Kb=function(e){Hb.push(e)},zb=function(){var e=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Vb){e.next=4;break}return e.next=3,$b(Wb);case 3:Vb=e.sent;case 4:return e.abrupt("return",Vb);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$b=function(e){var t=this;qb.send("gdfw.loading",{message:"loading"}),Hb=[],Kb("1"),Kb("2");var n=new mb;Kb("3");var r=n.get("partner.domain.value");Kb("4");var i=function(){return k.default(this,t),{gameId:e.gameId,enableAds:!0,preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);Kb("5");var s=function(){k.default(this,t);var n=o(),a=n?"&mode=".concat(n):"";return"https://game.api.gamedistribution.com/game/v4/get/".concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(Ui.version,"&localTime=").concat((new Date).getHours())}.bind(this);Kb("6");var o=function(){var e=this;k.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return k.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);return Kb("7"),new Promise(function(e){var n=this;if(k.default(this,t),Vb)e(Vb);else{Kb("7.1");var r=i();try{Kb("7.2");var o=s();Kb("7.3"),fetch(o).then(function(e){return k.default(this,n),Kb("7.4"),e.json()}.bind(this)).then(function(t){var i=this;if(k.default(this,n),Kb("7.5"),t.success){var s,o,d,u,c=t.result.game;Kb("7.6");var l={gameId:c.gameMd5,slug:c.slug,pname:c.pname,dname:c.dname,status:c.status,description:c.description,enableAds:!0===c.enableAds||!0===(null===(s=c.enableAds)||void 0===s?void 0:s.enabled),preroll:c.preRoll,midroll:6e4*c.timeAds,rewardedAds:c.rewardedAds,title:c.title,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,__t4r:ji(c.__t4r)||{},block_exts:ji(c.push_cuda),bloc_gard:ji(c.bloc_gard),cookie:ji(c.cookie),gdpr:ji(c.gdpr),diagnostic:ji(c.diagnostic),cmp:ji(c.cmp),gft:ji(c.gft)||{},sdk:ji(c.sdk)||{},sdkfw:ji(c.sdkfw)||{},loader:ji(c.loader)||{},splash:ji(c.splash)||{},promo:ji(c.promo)||{},dAds:ji(c.dads)||{},pAds:ji(c.pads)||{},mAds:ji(c.mads)||{},rAds:ji(c.rads)||{},lp:ji(c.lp)||{},extsc:ji(c.extsc)||{},evnts:ji(c.evnts)||{},dp:ji(c.dp)||{},adflw:ji(c.adflw)||{}};Kb("7.7");var h=a.extendDefaults(L.default(r),l);Kb("7.8"),h.afg_disabled=!1===(null===(o=h.sdk)||void 0===o||null===(d=o.afg)||void 0===d?void 0:d.enabled),function(){k.default(this,i)}.bind(this),Kb("7.9"),null!==(u=h.pAds)&&void 0!==u&&u.enabled&&(h.preroll=!0),Kb("7.10"),qb.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=Hb[Hb.length-1];qb.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){k.default(this,n);var a=Hb[Hb.length-1];qb.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var d=Hb[Hb.length-1];qb.send("gdfw.err",{message:"".concat(d,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}}.bind(this))},Qb=function(){var e=A.default(x.default.mark((function e(){var t,n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zb();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)}}(),Yb=function(){var e=A.default(x.default.mark((function e(){var t,n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zb();case 2:return n=e.sent,e.next=5,Qb();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)}}(),Jb=function(){var e=A.default(x.default.mark((function e(){var t,n,r,a,i,s,o,d;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zb();case 2:return o=e.sent,d=!(null==o||null===(t=o.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==o||null===(n=o.extsc)||void 0===n?void 0:n.path:"",name:d?null==o||null===(r=o.extsc)||void 0===r?void 0:r.name:"",ref:d?null==o||null===(a=o.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==o||null===(i=o.extsc)||void 0===i?void 0:i.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==o||null===(s=o.extsc)||void 0===s||!s.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xb=function(){var e=A.default(x.default.mark((function e(){var t,n,r,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jb();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 k.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)}}(),Zb=!1,e_=!1,t_=function(){return new Promise(function(){var e=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Zb){e.next=4;break}return e.abrupt("return",t(e_));case 4:Zb=!0;case 5:return e.next=7,Jb();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 e_=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){k.default(this,d),s&&(s=!1,Zb=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){k.default(this,d),s&&i&&window[a]?(s=!1,Zb=!0,e_=!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)}}())},n_=function(e){var t=function(e){var t=this,n=function(e){return k.default(this,t),l("showAd",{adType:e})}.bind(this),r=function(e){return k.default(this,t),l("preloadAd",{adType:e})}.bind(this),a=function(e){return k.default(this,t),l("showDisplayAd",{options:e})}.bind(this),i=function(){return k.default(this,t),l("cancelAd")}.bind(this),s=function(){return k.default(this,t),l("openConsole")}.bind(this),o=function(){return k.default(this,t),l("showBanner")}.bind(this),d=function(){return k.default(this,t),l("session")}.bind(this),u=function(e){return k.default(this,t),l("sendGenericEvent",{options:e})}.bind(this),c=function(){k.default(this,t),console.log("_sendSDKReady")}.bind(this),l=function(e,n){var r=this;return k.default(this,t),n||(n={}),new Promise(function(t,a){k.default(this,r);try{var i={type:"gd-sdk",method:e,options:n};window.parent.postMessage(i,"https://html5.gamedistribution.com"),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),h=function(){k.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&&p(r)}),!1)}.bind(this),f=function(){k.default(this,t),h(),l("init")}.bind(this),p=function(n){k.default(this,t),e.onEvent&&e.onEvent(n)}.bind(this);return{showBanner:o,showAd:n,preloadAd:r,showDisplayAd:a,cancelAd:i,openConsole:s,getSession:d,onEvent:p,init:f,_sendSDKReady:c,sendGenericEvent:u}}(e);return t.init(),t},r_=function(){var e=this;return{isMasterGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),isTokenGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),isExtHostedGameURL:function(){k.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this)}},a_=function(e){var t=this;return new Promise(function(n,r){var a=this;k.default(this,t);var i={type:"gd-sdk-frame-handshake-request"},s=!1;window.addEventListener("message",(function(e){var t=e.data,r=e.origin,a=e.source,i=t.type;if("gd-sdk-frame-handshake-request"===i){var o={type:"gd-sdk-frame-handshake-response"};a.postMessage(o,r)}else"gd-sdk-frame-handshake-response"===i&&(s=!0,n({origin:r,source:a}))})),e?n():(setTimeout(function(){k.default(this,a),s||n()}.bind(this),200),window.parent!==window?window.parent.postMessage(i,"*"):n())}.bind(this))},i_=function(){var e=A.default(x.default.mark((function e(){var t,n,r,a,i,s,o,d;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qb();case 2:return t=e.sent,n=!t,e.next=6,a_(n);case 6:if(r=e.sent,t){e.next=9;break}return e.abrupt("return",!1);case 9:return a=r_(),i=a.isMasterGameURL,s=i(),e.next=13,Yb();case 13:return o=e.sent,d=!1,d=o?!s&&!!r:!s,e.abrupt("return",d);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),s_=Ke,o_=ee,d_=Ti,u_=ka,c_=o_(va.f),l_=o_([].push),h_=function(e){return function(t){for(var n,r=u_(t),a=d_(r),i=a.length,s=0,o=[];i>s;)n=a[s++],s_&&!c_(r,n)||l_(o,e?[n,r[n]]:r[n]);return o}},f_={entries:h_(!0),values:h_(!1)}.values;Ri({target:"Object",stat:!0},{values:function(e){return f_(e)}});var p_=Ri,m_=rh,g_=Se,v_=ye,y_=pe,b_=Ch,__=Wf,w_=He.exports;if(p_({target:"Promise",proto:!0,real:!0,forced:!!m_&&g_((function(){m_.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=b_(this,v_("Promise")),n=y_(e);return this.then(n?function(n){return __(t,e()).then((function(){return n}))}:e,n?function(n){return __(t,e()).then((function(){throw n}))}:e)}}),y_(m_)){var A_=v_("Promise").prototype.finally;m_.prototype.finally!==A_&&w_(m_.prototype,"finally",A_,{unsafe:!0})}var k_=ne,E_=Qi,x_=ee("".replace),R_="[\t\n\v\f\r \u2028\u2029\ufeff]",S_=RegExp("^"+R_+R_+"*"),D_=RegExp(R_+R_+"*$"),T_=function(e){return function(t){var n=E_(k_(t));return 1&e&&(n=x_(n,S_,"")),2&e&&(n=x_(n,D_,"")),n}},I_={start:T_(1),end:T_(2),trim:T_(3)},O_=Ln.PROPER,P_=Se,C_="\t\n\v\f\r \u2028\u2029\ufeff",L_=I_.trim;Ri({target:"String",proto:!0,forced:function(e){return P_((function(){return!!C_[e]()||"
"!=="
"[e]()||O_&&C_[e].name!==e}))}("trim")},{trim:function(){return L_(this)}});var U_=pe,j_=Qe,M_=sc,G_=Ke,B_=N,N_=ee,q_=yi,F_=function(e,t,n){var r,a;return M_&&U_(r=t.constructor)&&r!==n&&j_(a=r.prototype)&&a!==n.prototype&&M_(e,a),e},V_=$t,W_=ze.f,H_=Ca.f,K_=ut,z_=Pm,$_=Qi,Q_=Pc,Y_=Cc,J_=He.exports,X_=Se,Z_=de,ew=Dn.enforce,tw=ch,nw=Gc,rw=qc,aw=Fe("match"),iw=B_.RegExp,sw=iw.prototype,ow=B_.SyntaxError,dw=N_(Q_),uw=N_(sw.exec),cw=N_("".charAt),lw=N_("".replace),hw=N_("".indexOf),fw=N_("".slice),pw=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,mw=/a/g,gw=/a/g,vw=new iw(mw)!==mw,yw=Y_.UNSUPPORTED_Y,bw=G_&&(!vw||yw||nw||rw||X_((function(){return gw[aw]=!1,iw(mw)!=mw||iw(gw)==gw||"/a/i"!=iw(mw,"i")})));if(q_("RegExp",bw)){for(var _w=function(e,t){var n,r,a,i,s,o,d=K_(sw,this),u=z_(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===_w)return e;if((u||K_(sw,e))&&(e=e.source,c&&(t="flags"in h?h.flags:dw(h))),e=void 0===e?"":$_(e),t=void 0===t?"":$_(t),h=e,nw&&"dotAll"in mw&&(r=!!t&&hw(t,"s")>-1)&&(t=lw(t,/s/g,"")),n=t,yw&&"sticky"in mw&&(a=!!t&&hw(t,"y")>-1)&&(t=lw(t,/y/g,"")),rw&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,d=!1,u=0,c="";r<=n;r++){if("\\"===(t=cw(e,r)))t+=cw(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:uw(pw,fw(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||Z_(s,c))throw new ow("Invalid capture group name");s[c]=!0,i[i.length]=[c,u],d=!1,c="";continue}d?c+=t:a+=t}return[a,i]}(e),e=i[0],l=i[1]),s=F_(iw(e,t),d?this:sw,_w),(r||a||l.length)&&(o=ew(s),r&&(o.dotAll=!0,o.raw=_w(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=cw(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+cw(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{V_(s,"source",""===h?"(?:)":h)}catch(e){}return s},ww=function(e){e in _w||W_(_w,e,{configurable:!0,get:function(){return iw[e]},set:function(t){iw[e]=t}})},Aw=H_(iw),kw=0;Aw.length>kw;)ww(Aw[kw++]);sw.constructor=_w,_w.prototype=sw,J_(B_,"RegExp",_w)}tw("RegExp");var Ew=Ri,xw=ia.find,Rw=Cl,Sw=!0;"find"in[]&&Array(1).find((function(){Sw=!1})),Ew({target:"Array",proto:!0,forced:Sw},{find:function(e){return xw(this,e,arguments.length>1?arguments[1]:void 0)}}),Rw("find");var Dw=Ri,Tw=_r,Iw=ka,Ow=oa,Pw=ee([].join),Cw=Tw!=Object,Lw=Ow("join",",");Dw({target:"Array",proto:!0,forced:Cw||!Lw},{join:function(e){return Pw(Iw(this),void 0===e?",":e)}});var Uw=ia.map;Ri({target:"Array",proto:!0,forced:!Zo("map")},{map:function(e){return Uw(this,e,arguments.length>1?arguments[1]:void 0)}});var jw=Ke,Mw=ee,Gw=dt,Bw=Se,Nw=Ti,qw=Xa,Fw=va,Vw=ie,Ww=_r,Hw=Object.assign,Kw=Object.defineProperty,zw=Mw([].concat),$w=!Hw||Bw((function(){if(jw&&1!==Hw({b:1},Hw(Kw({},"a",{enumerable:!0,get:function(){Kw(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!=Hw({},e)[n]||Nw(Hw({},t)).join("")!=r}))?function(e,t){for(var n=Vw(e),r=arguments.length,a=1,i=qw.f,s=Fw.f;r>a;)for(var o,d=Ww(arguments[a++]),u=i?zw(Nw(d),i(d)):Nw(d),c=u.length,l=0;c>l;)o=u[l++],jw&&!Gw(s,d,o)||(n[o]=d[o]);return n}:Hw,Qw=$w;Ri({target:"Object",stat:!0,forced:Object.assign!==Qw},{assign:Qw});var Yw=function(){function e(t){R.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return D.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 T.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 k.default(this,e),this.customParamKeys.some(function(e){return k.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}(),Jw=function(){function e(t,n){R.default(this,e),this.adContainer=t,this.onResume=n}return D.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(){k.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}(),Xw=function(e){if(!e)return!1;var t=Zw.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)},Zw=Object.prototype.toString;function eA(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 tA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eA(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nA(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():'<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>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}function rA(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 aA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rA(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var iA=new b.EventEmitter,sA=null,oA=function(){function e(t,n,r){var i=this;if(R.default(this,e),sA)return sA;sA=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.clickCount={midroll:0,preroll:0,rewarded:0},this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==t?document.getElementById(t):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:d,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){k.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){k.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,i,s,o,d,c,l,h,f,p,m,v,y,b,_,w,E,I,O,P;return D.default(e,[{key:"start",value:(P=A.default(x.default.mark((function e(){var t,n,r,a=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.adSystemInitialize(A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_afg_script({adsense_channel:"4089988593"});case 2:case"end":return e.stop()}}),e)}))));case 3:return t=e.sent,this.afgInitSuccess=t.success,e.next=7,this.adSystemInitialize(A.default(x.default.mark((function e(){return x.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){k.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),Bi("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 P.apply(this,arguments)})},{key:"adSystemInitialize",value:(O=A.default(x.default.mark((function e(t){var n;return x.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 O.apply(this,arguments)})},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(i){var s,o,d,u,c,l,h,f,p=this;return x.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"))){r.next=6;break}return s=n.IMASampleTags[e],o=Math.floor(Math.random()*s.length),d=s[o],i({url:d}),r.abrupt("return");case 6:if(void 0!==window.idhb.requestAds){r.next=8;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 8:return r.prev=8,u=n.nextAdPosition(e),console.log("GD-SDK Position",u),n._broadcast("AD_REQUEST",{message:u}),c=n.options,"preroll"===u&&g.isPlainObject(c.preroll)?c=c.preroll:"midroll"===u&&g.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===u&&g.isPlainObject(c.rewarded)&&(c=c.rewarded),l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1",r.next=17,window.idhb.isLoaded();case 17:if(h={tnl_keys:aA(aA({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId})},!(t&&t.retry_on_success&&g.isPlainObject(c.retry_on_success)&&g.isPlainObject(c.retry_on_success.vast))){r.next=22;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_success.vast,h)));case 22:if(!(t&&t.retry_on_failure&&n.options.retry_on_failure&&g.isPlainObject(c.retry_on_failure.vast))){r.next=26;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_failure.vast,h)));case 26:if(!g.isPlainObject(c.vast)){r.next=28;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.vast,h)));case 28:return r.next=30,n._create_dp_context(u,t);case 30:f=r.sent,Gi("gd-adflow, before idhb",u,l),window.idhb.requestAds({slots:S.default({},l,{bidFloor:null!=f&&f.floor_price?f.floor_price:void 0}),callback:function(e,t){var r=this;k.default(this,p),console.log("GD-SDK After HB..."),!f||null!=t&&t.bidFloorApplied||fetch(f.skip_url).catch(function(e){k.default(this,r)}.bind(this)),i({tnl_keys:aA(aA({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId}),url:e,dp:f,hl:t})}.bind(this)}),r.next=38;break;case 35:throw r.prev=35,r.t0=r.catch(8),new Error(r.t0);case 38:case"end":return r.stop()}}),r,this,[[8,35]])})));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:"_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(k.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var i,s=null==e||null===(i=e.tnl_keys)||void 0===i?void 0:i.tnl_ad_pos;this.adSuccess=!1;var o=new google.ima.AdsRequest,d=this._transformVast(e,t),u=aA(aA({},t),{},{adTag:d,tnl_ad_pos:s});this.adCounter[s]=this.adCounter[s]||0,this.adCounter[s]++;var c=e.dp,l=e.hl;c&&(c.adtag_url=d.url,this._extend_dp_with_adsense(c,l,null==e?void 0:e.tnl_keys));var h=this._isVMAP(s);if(function(){k.default(this,a),t.shouldFail&&(c?(c.adtag_url="dp_original_broken",c.fallback_url="dp_fallback_broken"):d.url="original_broken",null==c||c.adtag_url,null==c||c.fallback_url,d.url),h=!1}.bind(this),h){var f=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new T.default(e.adtag_url_1,!0);i.query=tA(tA({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new T.default(e.adtag_url_2,!0);o.query=tA(tA({},o.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++a,output:"xml_vast3"});var d=o.toString(),u=Date.now();return'<?xml version="1.0" encoding="UTF-8"?>\n<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-1">\n <vmap:AdSource id="'.concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(nA({id:u++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(nA({id:u++,adtag_url:d,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:c,adtag:d,position:"preroll"===u.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(s)}));o.adsResponse=f}else if(c&&l.bidFloorApplied){var p=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()}(c);o.adsResponse=p}else if(c&&c.fallback_url){var m=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()}(c);o.adsResponse=m}else o.adTagUrl=d.url;o.linearAdSlotWidth=this.options.width,o.linearAdSlotHeight=this.options.height,o.nonLinearAdSlotWidth=this.options.width,o.nonLinearAdSlotHeight=this.options.height,o.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(o.vastLoadTimeout=this.options.vast_load_timeout),o.setAdWillAutoPlay(t.autoplayAllowed),o.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(o,u);try{this._broadcast("AD_SDK_REQUEST",{message:u})}catch(e){}r(o)}catch(e){throw new Error(e)}}.bind(this))}},{key:"cancel",value:function(){if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var e="AD_SDK_CANCELED";this._broadcast(e,{name:e,message:"Advertisement has been canceled.",status:"warning",analytics:{category:this.eventCategory,action:e,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(I=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;k.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):U.default.video({inline:!0,muted:!1}).then(function(t){k.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 I.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(E=A.default(x.default.mark((function e(){var t;return x.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 E.apply(this,arguments)})},{key:"startAd",value:(w=A.default(x.default.mark((function e(t){var n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.adType,r=t.params,this.adType_=n,this.adContext=aA({},r),"promo"!==(null==r?void 0:r.adapter)){e.next=5;break}return e.abrupt("return",this._startPromo(r,n));case 5:if("adsense"!==(null==r?void 0:r.adapter)){e.next=26;break}if(n!==a.AdType.Interstitial){e.next=19;break}if("preroll"!==(null==r?void 0:r.position)){e.next=11;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 11:if("start"!==(null==r?void 0:r.position)){e.next=15;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 15:if("next"!==(null==r?void 0:r.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 17:e.next=24;break;case 19:if(n!==a.AdType.Rewarded){e.next=23;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 23:case 34:throw new Error("Unsupported ad type");case 24:e.next=35;break;case 26:if(n!==a.AdType.Interstitial){e.next=30;break}return e.abrupt("return",this._startInterstitialAd(r));case 30:if(n!==a.AdType.Rewarded){e.next=34;break}return e.abrupt("return",this._startRewardedAd(r));case 35:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"preloadAd",value:(_=A.default(x.default.mark((function e(t){return x.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 _.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,t=function(){k.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new Jw(this.adContainer,t),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(b=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o,d,u,c,l,h,f,p,m=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(o=t?t.containerId:null)||i("Container id is not specified"),d=document.getElementById(o),document.getElementById(o)||i("No container is found with this id - ".concat(o)),void 0===window.idhb.requestAds&&i("Prebid.js wrapper script hit an error or didn't exist!"),u=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(u)||(c="\n .gd__banner{\n z-index: ".concat(a.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=c:l.appendChild(document.createTextNode(c)),d.appendChild(l)),(h=document.createElement("div")).id=u,h.classList.add("gd__banner"),d.appendChild(h)),e.next=10,n._create_dp_display_context();case 10:n.atom_display=e.sent,null!==(s=n.atom_display)&&void 0!==s&&s.params&&window.idhb.setAdserverTargeting(null===(f=n.atom_display)||void 0===f?void 0:f.params),(p={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:p,callback:function(e){k.default(this,m)}.bind(this)}),r(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),i(e.t0.message||e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)})},{key:"_startInterstitialAd",value:(y=A.default(x.default.mark((function e(t){var n,r=this;return x.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(){k.default(this,r)}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return n=e.sent,e.next=13,this._loadInterstitialAd(aA(aA({},n),t));case 13:if(e.sent.success){e.next=18;break}return e.abrupt("return");case 18:n.autoplayRequiresMute&&this.adsManager.setVolume(0),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 y.apply(this,arguments)})},{key:"_startPromo",value:(v=A.default(x.default.mark((function e(t,n){var r;return x.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 r=e.sent,e.next=11,this._loadPromo(aA(aA({},r),t),n);case 11:if(e.sent.success){e.next=16;break}return e.abrupt("return");case 16:r.autoplayRequiresMute&&this.adsManager.setVolume(0),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 v.apply(this,arguments)})},{key:"_loadPromo",value:(m=A.default(x.default.mark((function e(t,n){var r,i;return x.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,aA({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 m.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(p=A.default(x.default.mark((function e(t){var n;return x.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:return n=e.t0,delete this.preloadedInterstitialAdVast,e.next=11,this._requestAd(n,aA({adType:a.AdType.Interstitial},t));case 11:return 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 p.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(t,n){var r=this;k.default(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var i=function(e){var n=this;k.default(this,r),setTimeout(function(){k.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!0,args:e})}.bind(this),1)}.bind(this),s=function(e){var n=this;k.default(this,r),setTimeout(function(){k.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:(f=A.default(x.default.mark((function e(t){var n,r=this;return x.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(){k.default(this,r)}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return n=e.sent,e.next=13,this._loadRewardedAd(aA(aA({},n),t));case 13:if(e.sent.success){e.next=18;break}return e.abrupt("return");case 18:n.autoplayRequiresMute&&this.adsManager.setVolume(0),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 f.apply(this,arguments)})},{key:"_loadRewardedAd",value:(h=A.default(x.default.mark((function e(t){var n;return x.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,aA({adType:a.AdType.Rewarded},t));case 11:return 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 h.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(l=A.default(x.default.mark((function e(){return x.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 l.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(c=A.default(x.default.mark((function e(){return x.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 c.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(),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.activeAdContainer.style.visibility="visible";var n=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var r=this._isT4R(e),a=this._getT4ROptions(e);if("loaded"===n)this.activeAdContainer.style.opacity=r?.001:1,r&&this.adsManager.setVolume(0),r&&this._broadcast("AD_T4R"),r&&setTimeout(function(){k.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210));else if("click"===n||"first_quartile"===n){if(r&&"click"===n){var i,s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos;this.clickCount[s]++}this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(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.addAdResume(),this.activeAdContainer.style.visibility="hidden";var i=function(){k.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(){k.default(this,t),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t,n=this,r=new Date,i=r.getHours(),s=r.getDate(),o=r.getMonth(),d=r.getFullYear(),u=a.getKeyByValue(google.ima.AdEvent.Type,e.type),c=!1,l=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",h=!l.startsWith("image")&&!l.startsWith("text");this._sendIMAEventsToHB(e);var f="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:f="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:f="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:c=!0,f="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:f="Fired when the ad is clicked.";var p=e.getAd().getContentType();this._show({mode:"click",contentType:p});break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),c=this._is_completed(e.getAd()),f="Fired when the ad completes playing.",this.adType_===a.AdType.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:f="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:f="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",c=!0,this._hideAddResume();break;case google.ima.AdEvent.Type.DURATION_CHANGE:f="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:f="Fired when the ad playhead crosses first quartile.";var m=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:m});break;case google.ima.AdEvent.Type.IMPRESSION:f="Fired when the impression URL has been pinged.";break;case google.ima.AdEvent.Type.INTERACTION:f="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:f="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var g=e.getAd().getContentType();f=g,this._show({mode:"loaded",contentType:g});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(f=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:f="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:h&&this.adResume.show(),f="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:f="Fired when the ad is resumed.",h&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:f="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:c=this._is_completed(e.getAd()),f="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:this._hideAddResume(),f="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:f="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:c=this._is_completed(e.getAd()),f="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:f="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:f="Fired when the ad volume has been muted."}if(""!==u&&""!==f&&this._broadcast(u,{name:u,message:f,status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(i," d").concat(s," m").concat(o," y").concat(d)}}),c&&!this.adSuccess){this.adSuccess=!0;var v=e.getAd(),y="Rainbow"===(null==v?void 0:v.getAdSystem())&&(null==v?void 0:v.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this)));null==v||v.getAdSystem(),null==v||v.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:y}),this.resetForNext(e)}}},{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);iA.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,label:r}}),this._hideAddResume()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.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(){k.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(Xw(e.getInnerError)){var t=e.getInnerError();if(t)return Xw(t.getErrorCode)&&Xw(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(k.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];g.isPlainObject(i)&&(r.query[a]=j.default.stringify(i))}var s=new T.default(r.url,!0);return M.default(s.query,r.query||{}),aA({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new T.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new T.default(e.url,!0);if(i.query.cust_params){var s=j.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&&g.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&&g.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=L.default(a),g.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=j.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in o){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete o[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(t){return k.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,M.default(i,u),i.cust_params=j.default.stringify(i.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,a,i=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[i]>=(null===(n=e.t4r[i])||void 0===n?void 0:n.count))return!1;if(null!=e&&null!==(r=e.contentType)&&void 0!==r&&r.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return i&&(null===(a=e.t4r[i])||void 0===a?void 0:a.enabled);if(null!=e&&e.contentType.startsWith("video/")){var s,o=(null===(s=e.t4r[i])||void 0===s?void 0:s.viper)||0;if(o>0){var d,u=Math.random()<o;return i&&u&&(null===(d=e.t4r[i])||void 0===d?void 0:d.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;if(!e)return!1;var 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===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(f=this.gameData)||void 0===f||null===(p=f.rAds)||void 0===p||null===(m=p.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),y=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?y>=(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){var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,s=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,o=null!=r&&r.vast_1?void 0:a,d=null!=r&&r.vast_2?void 0:a;return{adtag_url_1:null==i?void 0:i.url,adtag_url_2:null==s?void 0:s.url,position:n,dp_1:o,dp_2:d}}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(t){var n=this;k.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new Yw(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(u.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return k.default(this,n),e.json()}.bind(this)).then(function(e){if(k.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();this.msgrt.send("dp.fp",{message:e.p/100}),t({params:{fp:e.p/100},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){k.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 k.default(this,n),"".concat(e,"=").concat(encodeURIComponent(r[e]))}.bind(this)).join("&");encodeURIComponent(u.Base64.encode(JSON.stringify(r)));var i=null===(t=this.gameData.promo)||void 0===t?void 0:t.rainbow,s=null==i?void 0:i.enabled,o="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a);console.log("gd-adflow openPromoUrl",o);var d=s?o:void 0;return function(){k.default(this,n)}.bind(this),{promo_url:d,promo_imp_blue_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(a){var i,s,o,d,c,l,h=this;return x.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 Yw(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(u.Base64.encode(JSON.stringify(s))),null==t||t.adapterIndex,null==t||t.isLastAdapter,c=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,l=(null==c?void 0:c.enabled)&&(null==t?void 0:t.isLastAdapter)&&"rewarded"===e,null==c||c.enabled,null==t||t.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return k.default(this,h),e.json()}.bind(this)).then(function(e){if(k.default(this,h),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(d):void 0,promo_imp_blue_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){k.default(this,h),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 T.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=j.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=j.default.stringify(a,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_init_hl_script",value:(d=A.default(x.default.mark((function e(t){var n,r,i,s,o,d,u=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._getPrebidScripts(),r=n[0],i=function(){return k.default(this,u),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:i},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"}),window.idhb.que=window.idhb.que||[],e.next=9,a.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,u),window.idhb.requestAds}.bind(this)});case 9:s=a.getQueryString("ch",window.location.href),o=a.getQueryString("ch_date",window.location.href),d={tnl_content_category:this.category.toLowerCase()},s&&(d.channel=s),o&&(d.ch_date=o),window.idhb.setAdserverTargeting(d),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;k.default(this,u);try{var n,r=e.slotId.split("@");r=1===r.length?r[0]:r[1],e.isEmpty?(null!==(n=this.atom_display)&&void 0!==n&&n.error_url&&(fetch(this.atom_display.error_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_ERROR",{message:r,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_IMPRESSION",{message:r,status:"success"}))}catch(e){}}.bind(this));case 17:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"_init_ima_script",value:(o=A.default(x.default.mark((function e(t){var n,r,i=this;return x.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 k.default(this,i),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_init_afg_script",value:(s=A.default(x.default.mark((function e(t){var n,r,i,s,o=this;return x.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(s={}).crossorigin="anonymous",s["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",s["data-ad-frequency-hint"]="30s",s.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(s["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(s["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(s["data-adbreak-test"]="on"),e.next=14,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return k.default(this,o),!!window.adsbygoogle}.bind(this),attrs:s});case 14:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(i=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,d),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=function(){k.default(this,d),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,d),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(){k.default(this,d),this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),i=function(){k.default(this,d),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),s=function(e){k.default(this,d),e()}.bind(this),o=function(e){k.default(this,d),this.resetForNext(),this.adCounter.rewarded=this.adCounter.rewarded||0,this.adCounter.rewarded++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),u={type:"reward",name:"reward-in-game",beforeAd:n,afterAd:r,adDismissed:a,adViewed:i,beforeReward:s,adBreakDone:o},window.adsbygoogle.push(u),e.next=24;break;case 20:throw e.prev=20,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 24:case"end":return e.stop()}var u}),e,this,[[1,20]])}))),function(e){return i.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(r=A.default(x.default.mark((function e(t){var n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,r),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"),n=function(e){k.default(this,r),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"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),a={type:"preroll",adBreakDone:n},window.adsbygoogle.push(a),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}var a}),e,this,[[1,15]])}))),function(e){return r.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(n=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,i),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(){k.default(this,i),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"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),s={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var s}),e,this,[[1,17]])}))),function(e){return n.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,i),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(){k.default(this,i),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.midroll=this.adCounter.midroll||0,this.adCounter.midroll++,"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),s={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var s}),e,this,[[1,17]])}))),function(e){return t.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}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){this._send(e,{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})}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;return this.adCounter.preroll=this.adCounter.preroll||0,0===this.adCounter.preroll}},{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")}e.params.position=t}},{key:"_broadcast",value:function(e,t){var n=this,r=!1;["AD_ERROR"].some(function(t){return k.default(this,n),t===e}.bind(this))&&(r=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail,console.log("gd-adflow skipForward",e,r,this.adContext.adapterIndex,this.adContext.isLastAdapter,this.adContext.extraPromoRunOnFail)),this.eventBus.broadcast(e,aA(aA({},t),{},{skipForward:r}))}}]),e}(),dA=function e(t){var n=this;R.default(this,e),S.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sm(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),S.default(this,"promo",A.default(x.default.mark((function e(){return x.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.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},xm(this.moduleName,this.moduleConfig)},uA=function e(t){var n=this;R.default(this,e),S.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sm(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),S.default(this,"splash",A.default(x.default.mark((function e(){return x.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.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},xm(this.moduleName,this.moduleConfig)},cA=function(e,t){console.log(e,t)},lA={},hA={},fA=null;function pA(){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 lA.version=r,lA.frame=e,lA.function=n,lA.version}function mA(e){var t=this;return fA||(fA=new Promise(function(n){function r(t,r){if(cA("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:lA,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}k.default(this,t),pA(),lA.frame?2===lA.version?(cA("TCF v2 CMP found. Fetching the consent."),lA.function?(cA("CMP API is directly accessible, calling it now..."),lA.function("addEventListener",lA.version,r)):(cA("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!==hA[r.callId]&&hA[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){k.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=S.default({},d,{command:e,parameter:s,callId:o,version:n});hA[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,lA.version,n)}("addEventListener",lA.frame,r))):n({result:"cmpVersionNotV2",cmp:lA}):n({result:"cmpNotFound"})}.bind(this)),fA)}var gA=new(function(){function e(){R.default(this,e),this.productName="Game Distribution"}var t;return D.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=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,d;return x.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(a=null==t||null===(r=t.visitor)||void 0===r?void 0:r.visitorId){e.next=6;break}return e.abrupt("return");case 6:return i=encodeURIComponent(this.productName),s=encodeURIComponent(a),e.prev=8,o="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(s),e.next=12,fetch(o,{method:"POST"});case 12: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(i,"/user_id/").concat(s),e.next=22,fetch(d,{method:"POST"});case 22: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 vA(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 yA(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 yA(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 yA(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 bA=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;k.default(this,t);try{var d=document.createElement("script");if(d.async=null==i||i,d.type="text/javascript",d.onload=function(){k.default(this,o),e()}.bind(this),d.onerror=function(){k.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),d.src=n,r){var u,c=vA(r);try{for(c.s();!(u=c.n()).done;){var l=u.value,h=l.key,f=l.value;d.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},_A=function(){var e=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,bA({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,bA({src:"https://cookie-cdn.cookiepro.com/consent/".concat("140feb72-7952-4420-8ae5-e8978d87bc17","/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,bA({src:"https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:"140feb72-7952-4420-8ae5-e8978d87bc17"}],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)}}(),wA=new b.EventEmitter,AA={"https://games.softgames.com":{"splash-hidden":"splash-hidden"}};function kA(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(AA).some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)&&(window.parent&&!n.type.startsWith("gd-sdk")&&window.parent.postMessage(n,"*"),a)){var i=AA[r][a];i&&wA.emit(i,n)}}),!1);var EA=_.v4(),xA=function(e){var t=this;if(!window.__msgr){var n=document.createElement("iframe");if(n.src="https://static.gamedistribution.com/message/index.html",n.style.display="none",n.name="__msgr",document.body.appendChild(n),window!==window.top){var r={gameId:e.gameId,target:e.evnts.domain,token:EA,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){DA(r)},setInterval(function(){k.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",DA(r)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){k.default(this,t);try{var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kA(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=EA,DA(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},RA=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=SA(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},SA=function e(t){try{var n,r,a=null==t?void 0:t.parent;if("game"===(null===(n=a.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return a;e(a)}catch(e){return t}},DA=function(e){window.__msgr.postMessage(e,"https://static.gamedistribution.com")};function TA(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 IA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TA(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function OA(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 PA(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 PA(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 PA(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 CA,LA=function(){function e(t){var n=this;R.default(this,e),S.default(this,"_getAdTypeByAfgPosition",function(e){var t=this;k.default(this,n);var r={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(r).find(function(n){var a=this;return k.default(this,t),r[n].some(function(t){return k.default(this,a),t===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),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._onResumeGame=t.onResumeGame.bind(t),this._setAdRequestTimer=t._setAdRequestTimer.bind(t),this._giveGift=t._giveGift.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)}var t,n,r;return D.default(e,[{key:"runAdFlow",value:(r=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,g,v,y,b,_,w,A,E,R,S,D,T,I,O,P,C,L,U,j,M,G,B=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=this._getAdTypeByAfgPosition(t),t.params.position,o=this._getAdFlow(s),d=this._gameData,u=d.afg_disabled,c=null===(n=d.promo)||void 0===n||null===(r=n.rainbow)||void 0===r?void 0:r.enabled,l=null===(a=d.promo)||void 0===a?void 0:a.onadsense,h="reward"===(null===(i=t.params)||void 0===i?void 0:i.position),f=u?o.filter(function(e){return k.default(this,B),"adsense"!==e}.bind(this)):o,p=this.get_ad_system_init_result(),m=p.afg,g=p.ima,this.adsBlocked=!m&&!g,this.adsBlocked?(Gi("gd-adflow adsBlocked so changing the flow"),f=[f[0]]):(m||(f=f.filter(function(e){return k.default(this,B),"adsense"!==e}.bind(this))),g||(f=f.filter(function(e){return k.default(this,B),"ima"!==e}.bind(this)))),v=!1,y=!1,b=[],_=0,w=!1,A=OA(f),e.prev=21,A.s();case 23:if((E=A.n()).done){e.next=59;break}if(R=E.value,t.params.adapter=R,S=_===f.length-1,"tag"!==R){e.next=36;break}return e.next=30,this._createTagDiv("gdsdk__advertisement");case 30:D=e.sent,T=D.success,_++,v=T,e.next=57;break;case 36:return c&&S&&"ima"===R&&(t.params.runPromoAsImaFallback=!0),I=S&&"adsense"===R&&c&&l&&h,t.params=IA(IA({},t.params),{},{adapterIndex:_,isLastAdapter:S,shouldFail:!1,extraPromoRunOnFail:I}),function(){k.default(this,B)}.bind(this),Gi("gd-adflow, before adInvoke",_,R,t.params.shouldFail),e.next=43,this.adInvoke(t);case 43:if(O=e.sent,P=O.success,C=O.args,!P){e.next=53;break}return Gi("gd-adflow, adapter-result-success",_,R,C),v=!0,y=!(null==C||!C.isPromoSuccess),e.abrupt("break",59);case 53:Gi("gd-adflow, adapter-result-failure",_,R,C.message),_++,b.push(C.message),S&&"adsense"===R&&c&&l&&h&&(w=!0);case 57:e.next=23;break;case 59:e.next=64;break;case 61:e.prev=61,e.t0=e.catch(21),A.e(e.t0);case 64:return e.prev=64,A.f(),e.finish(64);case 67:if(!w){e.next=76;break}return t.params.adapter="promo",e.next=72,this.adInvoke(t);case 72:e.sent.success&&(y=!0);case 76:(function(){k.default(this,B)}).bind(this),L=b.join(" /n"),v?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift()):(this._onResumeGame(L,"warning"),this._giveGift()),U="-1",j="none",v&&y?U="promo_ima":v?(U="index_".concat(_),j=f[_]):y&&(U="promo_adsense"),M=this.get_session_id(),this.adsBlocked&&"-1"===U?(G="rewarded"===s?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[G]=this.blockedAdsMap[G]?this.blockedAdsMap[G]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(G)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:G,sessionId:M,successAdapter:"none",adFlowIndex:U})):(this._msgrt.send("adflow.all.index",{message:"".concat(U)}),this._msgrt.send("adflow.all.success_adapter",{message:"".concat(j)}),this._msgrt.send("adflow.".concat(s,".index"),{message:"".concat(U)}),this._msgrt.send("adflow.".concat(s,".success_adapter"),{message:"".concat(j)}),this.send_atom_event("gd.adflow",{adFlowIndex:U,successAdapter:j,adBlocker:!1,afgBlocked:!m,imaBlocked:!g,adType:s,sessionId:M}));case 86:case"end":return e.stop()}}),e,this,[[21,61,64,67]])}))),function(e){return r.apply(this,arguments)})},{key:"adInvoke",value:(n=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,a){var i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="main.showad.".concat(t.params.adapter,".").concat(t.params.adapterIndex),s=function(e){k.default(this,d),n._eventBus.unsubscribeScope(i),r({success:!1,args:e})}.bind(this),o=function(e){k.default(this,d),n._eventBus.unsubscribeScope(i),r({success:!0,args:e})}.bind(this),n._eventBus.subscribe("AD_ERROR",s,i),n._eventBus.subscribe("AD_SDK_CANCELED",s,i),n._eventBus.subscribe("AD_SUCCESS",o,i),e.prev=6,e.next=9,n._adInstance.startAd(t);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),Bi("gd-adflow startAd error",e.t0),r({success:!1,err:e.t0});case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var t,n,r,a,i,s,o,d,u=this,c=void function(){k.default(this,u)}.bind(this),l=this._gameData.adflw;c&&(l=c);var h=null!==(t=l)&&void 0!==t&&null!==(n=t.adapters)&&void 0!==n&&n.default?null===(r=l)||void 0===r||null===(a=r.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return h=null!==(i=l)&&void 0!==i&&null!==(s=i.adapters)&&void 0!==s&&s[e]?null===(o=l)||void 0===o||null===(d=o.adapters)||void 0===d?void 0:d[e]:h}},{key:"_createTagDiv",value:(t=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,a){var i,s,o;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{console.log("gd-sdk, script creation started..."),i=document.getElementById(t),s=document.createElement("div"),o=document.createElement("script"),s.id="snack_div",o.setAttribute("src","https://tag.winister.app/v1/snack?version=0.1.17"),o.setAttribute("data-tag-id","KD7Z"),o.setAttribute("callback-fn","() => { console.log('gd-sdk, callback successfull');window.responseFunc();}"),o.setAttribute("callback-status","(status) => { console.log('gd-sdk, callback successfull',status)}"),o.setAttribute("data-content-type","game"),o.setAttribute("data-fit","v"),o.setAttribute("page-url",n._parentURL),s.style.width="100%",s.style.height="100%",s.appendChild(o),i.appendChild(s),console.log("gd-sdk, script creation completed..."),i.style.visibility="visible",window.responseFunc=function(){i.style.visibility="hidden",i.removeChild(document.getElementById("snack_div")),r({success:!0})}}catch(e){console.log("tag.error",e.message),container.style.visibility="hidden"}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(e){return t.apply(this,arguments)})}]),e}(),UA=new b.EventEmitter,jA=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp"];function MA(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 GA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MA(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=e.source;if(jA.some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system,s=n.action,o="aeriaExternalHostsConnector"===i&&"resultBoxClosed"===s;if("Softgames"===i&&"score"===s)CA=a,(window.parent||window).postMessage(n,"*"),UA.emit("aeria-event",n);else o&&CA&&CA.postMessage(n,"*")}}),!1);var BA,NA=_.v4(),qA=null,FA=null,VA=function(){function e(t){var n=this;if(R.default(this,e),qA)return qA;qA=this,this.blockedAdsMap={},this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new mb,this._location.print(),this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._giftCount=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){k.default(this,n),this._sdk_ready=!0}.bind(this)).catch(function(e){k.default(this,n),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t;k.default(this,n),!0===(null===(e=this._gameData.lp)||void 0===e?void 0:e.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(t=this._gameData.evnts)&&void 0!==t&&t.enabled&&this._isLoaderGameURL()&&xA(this._gameData)}.bind(this)),this._registerSGBridge(),this._whichFrame()}var t,n,r,i,s,o,d,c,l,h,f,p;return D.default(e,[{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(k.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:"_loadCMP",value:(p=A.default(x.default.mark((function e(){var t,n,r,a;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=6;break}if(r=new mb,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||"html5.gamedistribution.com"!==this._topDomain){e.next=6;break}return e.next=6,_A();case 6:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"testConsent",value:function(){try{pA();A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mA({});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;wA.on("splash-hidden",function(t){k.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(){if(!this._isLoaded&&(this._isLoaded=!0,"loader-frame"===this._whichFrame()))try{this._whichFrame(),this._sendTunnlEvent(1),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._bridge.isCoreSDKMode&&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||!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker()}},{key:"_initializeSDKWithGameData",value:(f=A.default(x.default.mark((function e(t,n){var r,a=this;return x.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:this._bridge.isCoreSDKMode=!(!0===this._gameData.enableAds||!0===(null===(r=this._gameData.enableAds)||void 0===r?void 0:r.enabled)),this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==this._gameData.diagnostic.close_ads&&!1!==this._gameData.diagnostic.close_ads||(this.videoAdReady=this._initializeVideoAd().then(function(){k.default(this,a),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"}))}.bind(this)).catch(function(e){k.default(this,a);var t="".concat(e).startsWith("Error: Blocked:");Gi("gd-adflow adsBlocked",t,e);var n=this.get_ad_system_init_result(),r=n.ima,i=n.afg;if(this.adsBlocked=!r&&!i,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var s=r||i?r?i?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(s)})}console.error(e.message||e)}.bind(this))),t(this._gameData),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),n(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return f.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:"_extendDefaultOptions",value:function(e,t){var n=L.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=Ui.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:"_sendTunnlEvent",value:function(e){var t=this;void 0===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://ana.headerlift.com/event?".concat(j.default.stringify(n))).catch(function(e){k.default(this,t)}.bind(this))}},{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:"_checkConsole",value:function(){try{if(!a.Ls.available)return;"developer.gamedistribution.com"===this._parentDomain?(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0),a.Ls.set("gd_tag",!0)):"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:Ui.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=["https://cdn.gamedock.io/gamedock-web-tracker/4.4.0/script/gamedock-sdk.min.js"];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;k.default(this,e),FA=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&FA.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"}),gA.track(FA,this._gameData)}.bind(this)).catch(function(t){k.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=FA)||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"];a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadGoogleAnalytics",value:function(){var e=this,t=["https://www.google-analytics.com/analytics.js"];a.getScript(t[0],"gdsdk_google_analytics",{alternates:t,error_prefix:"Blocked:",exists:function(){return k.default(this,e),window.ga}.bind(this)}).then(function(){k.default(this,e),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new a.EventBus,a.SDKEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(k.default(this,e),"developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasapi/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var t=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(t,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(t,"*")}catch(e){}}}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return k.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;k.default(this,e),this.msgrt.send("ad.impression"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&gA.track(FA,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){k.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){k.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){if(k.default(this,e),t.message.startsWith("Blocked:")){if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:t.message}),!this._hasBlocker)){this._hasBlocker=!0;var n=Math.random()<.25;this.msgrt.send("adblck.src",{message:t.message}),n&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){k.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){k.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 k.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,enableAds:!0,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;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Ui.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(h=A.default(x.default.mark((function e(){var t,n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this._gameData,t=void 0===this._gameData.dmain||this._gameData.dmain,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&(this.msgrt.send("blocked"),setTimeout(function(){k.default(this,r),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(j.default.stringify({domain:this._parentDomain,id:n.gameId,img:this._get_game_thumbnail_url(),title:n.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"_checkGameDeleted",value:function(){var e=this;6===this._gameData.status&&(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(){k.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;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;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,a=this._gameData,i=a.gdpr&&!0===a.gdpr.consent,s=a.loader,o=null===(e=a.promo)||void 0===e?void 0:e[null===(t=a.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(a,i):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||i?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):!1!==s.enabled&&this._createSplash(a,i):null!=o&&o.enabled&&this._createPromo(a,i))}},{key:"_initializeVideoAd",value:(l=A.default(x.default.mark((function e(){var t;return x.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 oA(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=Ui,this.adInstance._send("gd.location",this._location.get()),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return l.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:"_onEvent",value:function(e){a.dankLog(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(c=A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zb();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 c.apply(this,arguments)})},{key:"_createSplash",value:(d=A.default(x.default.mark((function e(t,n){var r,i,s,o,d=this;return x.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(GA(GA({},this.options),{},{isConsentDomain:n,version:Ui.version}),t,this._parentDomain),e.next=6,Jb();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e=this;if(k.default(this,d),n){var t=new Date;t.setDate(t.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(t.toUTCString(),"; path=/")}this._hideCMPButton(),o?window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e),i.hide()}.bind(this)):(function(){k.default(this,e)}.bind(this),this.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e)}.bind(this))),RA({event:"FirstInteraction",game:this._gameData})}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){k.default(this,d),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){k.default(this,d),i.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(o=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.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(GA(GA({},this.options),{},{isConsentDomain:n,version:Ui.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.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 o.apply(this,arguments)})},{key:"_createPromo",value:(s=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.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(GA(GA({},this.options),{},{isConsentDomain:n,version:Ui.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.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 s.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){k.default(this,e)}.bind(this))}},{key:"showAd",value:(i=A.default(x.default.mark((function e(t){var n,r=this,a=arguments;return x.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=A.default(x.default.mark((function e(a,i){var s,o,d,u;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o={adType:t,params:n,adTimestamp:r.adRequestTimer},e.next=5,r.sdkReady;case 5:return d=e.sent,e.next=8,r.videoAdReady;case 8:if(null!==(s=r._gameData.lp)&&void 0!==s&&s.load||r._sendLoadedEvent(),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:d,adRequest:o}),r._rejectAdIfAdDisabled({gameData:d,adRequest:o}),r._rejectAdIfUnsupportedType({adRequest:o}),"rewarded"===t&&r._setGameRewardedFlag(),null!=n&&n.isGift||r._rejectAdIfAdRateHits({gameData:d,adRequest:o}),r.adInstance.attachAfgPosition(o),!r.adFlowRunning){e.next=18;break}return e.abrupt("return",a());case 18:return r.adFlowRunning=!0,u=new LA(r),e.next=22,u.runAdFlow(o);case 22:r.adFlowRunning=!1,a(),r._post_message({topic:"adrequest.instream"}),e.next=32;break;case 27:e.prev=27,e.t0=e.catch(0),r.adFlowRunning=!1,r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 32:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_giveGift",value:function(){var e,t,n,r,a;null!==(e=this._gameData)&&void 0!==e&&null!==(t=e.gft)&&void 0!==t&&t.enabled&&(null===(n=this._gameData)||void 0===n||null===(r=n.gft)||void 0===r||null===(a=r.durations[this._giftCount])||void 0===a?void 0:a.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift()}},{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){if(!e.gameData.enableAds||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==a.AdType.Interstitial&&t.adType!==a.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=a.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===a.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,s,o,d=e.gameData,u=e.adRequest,c=null;u.adType===a.AdType.Interstitial&&null!==(t=d.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=d.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=d.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=d.midroll;if(u.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o;return x.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.enableAds&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled.");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:return e.next=18,n.adInstance.preloadAd(t);case 18:o=e.sent,r(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),i(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"cancelAd",value:(n=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(n,r){return x.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 n.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=A.default(x.default.mark((function n(r,a){var i;return x.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;this._allowExternals({enabled:!1});try{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(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||RA({event:"GameStarted",game:this._gameData})}},{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()||RA({event:"GamePaused",game:this._gameData})}},{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(k.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){k.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:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;k.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return k.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup: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:"_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:"_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 T.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 T.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new T.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new uA(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i,s;return x.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 dA(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new T.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(j.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new T.default(e,!0);return n.query=GA(GA({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=A.default(x.default.mark((function t(n,r){var a;return x.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)FA.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})}catch(e){console.log(e.message)}}},{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 k.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:"decideToGiveAGift",value:function(){var e=this;try{var t,n=null===(t=this._gameData)||void 0===t?void 0:t.gft,r=setInterval(A.default(x.default.mark((function t(){var n=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.adInstance.requestRunning||e.adFlowRunning?console.log("Advertisement already running..."):(e.showAd(a.AdType.Interstitial,{position:"midroll",isGift:!0}).catch(function(e){k.default(this,n)}.bind(this)),clearInterval(r),e._giftCount++);case 1:case"end":return t.stop()}}),t,this)}))),1e3*n.durations[this._giftCount].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 NA}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_setGameRewardedFlag",value:function(){try{if("developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasrewarded/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var e=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(e,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(e,"*")}catch(e){}}}catch(e){}}}]),e}(),WA={},HA=function(e){try{if(e.skipForward)return;if(WA.source){var t={type:"gd-sdk-on-event",event:e};WA.source.postMessage(t,WA.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},KA=function(){HA({name:"SDK_READY",status:"success",message:"Everything is ready."}),HA({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),HA({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},zA=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(!WA.source&&"init"===s)return function(e){var t=e.source,n=e.origin;WA={source:t,origin:n}}({source:a,origin:r}),void KA();var d=e[s];d&&A.default(x.default.mark((function t(){var n,r=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,function(){k.default(this,r),"showAd"===s&&qi.firstAdapterModeAdsense&&"rewarded"!==o.adType&&(console.log("promo-test, set first adapter to adssense 3"),o.params=o.params?o.params:{},o.params.adapter="adsense")}.bind(this),!(n=d.apply(e,Object.values(o)))||!n.then){t.next=6;break}return t.next=6,n;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))()}}else{var u={type:"gd-sdk",method:s,options:o};window.postMessage(u,"https://html5.gamedistribution.com")}}),!1)},$A=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){HA(e),t.apply(this,arguments)}}(e);var t=new VA(e);return zA(t),t},QA=function(e){try{var t=Fb(e);e.gameId||t.send("nogameid",{message:"".concat(Gg.parentURL)})}catch(e){}},YA={create:function(){var e=A.default(x.default.mark((function e(t){var n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,QA(t),qb=Fb(Wb=t),e.next=5,i_();case 5:return n=e.sent,r=n?n_(t):$A(t),Xb(),e.abrupt("return",r);case 11:return e.prev=11,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",$A(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}()};function JA(){return(JA=A.default(x.default.mark((function e(t,n){var r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t_();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,ZA(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 XA=!1;function ZA(e){var t=this;return new Promise(function(n,r){var a=this;if(k.default(this,t),BA)return n(BA);if(XA)var i=setInterval(function(){k.default(this,a),BA&&(XA=!1,clearInterval(i),n(BA))}.bind(this),100);else XA=!0,YA.create(e).then(function(e){k.default(this,a),BA=e,e._sendSDKReady(),XA=!1,n(BA)}.bind(this))}.bind(this))}var ek,tk=(ZA(ek=function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":E.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===E.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}()),{invoke:function(e){return function(e,t){return JA.apply(this,arguments)}(ek,e)}});function nk(){var e=this;this.AdType=a.AdType,this.preloadAd=function(e){var t=this;return tk.invoke(function(n){return k.default(this,t),n.preloadAd(e)}.bind(this))},this.showAd=function(){var e=A.default(x.default.mark((function e(t,n){var r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",tk.invoke(function(e){var i=this;if(k.default(this,r),t===a.AdType.Display)return e.showDisplayAd(n);return function(){k.default(this,i)}.bind(this),e.showAd(t,{})}.bind(this)));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return tk.invoke(function(t){return k.default(this,e),t.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return tk.invoke(function(t){return k.default(this,e),t.openConsole()}.bind(this))},this.getSession=function(){var e=this;return tk.invoke(function(t){return k.default(this,e),t.session()}.bind(this))},this.sendEvent=function(e){var t=this;return tk.invoke(function(n){return k.default(this,t),n.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){k.default(this,e),Dm.showLeaderboard()}.bind(this),addScore:function(t){k.default(this,e),Dm.addScore(t)}.bind(this)}}nk.prototype=new function(){this.showBanner=function(){var e=this;return tk.invoke(function(t){return k.default(this,e),t.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new nk,window.gdApi=window.gdsdk;
|
|
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/classCallCheck"),s=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/helpers/createClass"),d=require("url-parse"),u=require("js-base64"),c=require("validator"),l=require("is-valid-domain"),h=require("get-value"),f=require("set-value"),p=require("lodash.clonedeep"),m=require("can-autoplay"),g=require("is-plain-object"),v=require("querystringify"),y=require("lodash.merge"),b=require("events"),_=require("uuid");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var A=w(e),k=w(t),E=w(n),x=w(r),R=w(i),S=w(s),D=w(o),T=w(d),I=w(c),O=w(l),P=w(h),C=w(f),L=w(p),U=w(m),j=w(v),M=w(y),G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},B=function(e){return e&&e.Math==Math&&e},N=B("object"==typeof globalThis&&globalThis)||B("object"==typeof window&&window)||B("object"==typeof self&&self)||B("object"==typeof G&&G)||function(){return this}()||Function("return this")(),q={exports:{}},F=N,V=Object.defineProperty,W=function(e,t){try{V(F,e,{value:t,configurable:!0,writable:!0})}catch(n){F[e]=t}return t},H=W,K=N["__core-js_shared__"]||H("__core-js_shared__",{}),z=K;(q.exports=function(e,t){return z[e]||(z[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var $,Q,Y=Function.prototype,J=Y.bind,X=Y.call,Z=J&&J.bind(X),ee=J?function(e){return e&&Z(X,e)}:function(e){return e&&function(){return X.apply(e,arguments)}},te=N.TypeError,ne=function(e){if(null==e)throw te("Can't call method on "+e);return e},re=ne,ae=N.Object,ie=function(e){return ae(re(e))},se=ie,oe=ee({}.hasOwnProperty),de=Object.hasOwn||function(e,t){return oe(se(e),t)},ue=ee,ce=0,le=Math.random(),he=ue(1..toString),fe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+he(++ce+le,36)},pe=function(e){return"function"==typeof e},me=N,ge=pe,ve=function(e){return ge(e)?e:void 0},ye=function(e,t){return arguments.length<2?ve(me[e]):me[e]&&me[e][t]},be=ye("navigator","userAgent")||"",_e=N,we=be,Ae=_e.process,ke=_e.Deno,Ee=Ae&&Ae.versions||ke&&ke.version,xe=Ee&&Ee.v8;xe&&(Q=($=xe.split("."))[0]>0&&$[0]<4?1:+($[0]+$[1])),!Q&&we&&(!($=we.match(/Edge\/(\d+)/))||$[1]>=74)&&($=we.match(/Chrome\/(\d+)/))&&(Q=+$[1]);var Re=Q,Se=function(e){try{return!!e()}catch(e){return!0}},De=Re,Te=Se,Ie=!!Object.getOwnPropertySymbols&&!Te((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&De&&De<41})),Oe=Ie&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Pe=N,Ce=q.exports,Le=de,Ue=fe,je=Ie,Me=Oe,Ge=Ce("wks"),Be=Pe.Symbol,Ne=Be&&Be.for,qe=Me?Be:Be&&Be.withoutSetter||Ue,Fe=function(e){if(!Le(Ge,e)||!je&&"string"!=typeof Ge[e]){var t="Symbol."+e;je&&Le(Be,e)?Ge[e]=Be[e]:Ge[e]=Me&&Ne?Ne(t):qe(t)}return Ge[e]},Ve={};Ve[Fe("toStringTag")]="z";var We="[object z]"===String(Ve),He={exports:{}},Ke=!Se((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),ze={},$e=pe,Qe=function(e){return"object"==typeof e?null!==e:$e(e)},Ye=Qe,Je=N.document,Xe=Ye(Je)&&Ye(Je.createElement),Ze=function(e){return Xe?Je.createElement(e):{}},et=Ze,tt=!Ke&&!Se((function(){return 7!=Object.defineProperty(et("div"),"a",{get:function(){return 7}}).a})),nt=N,rt=Qe,at=nt.String,it=nt.TypeError,st=function(e){if(rt(e))return e;throw it(at(e)+" is not an object")},ot=Function.prototype.call,dt=ot.bind?ot.bind(ot):function(){return ot.apply(ot,arguments)},ut=ee({}.isPrototypeOf),ct=ye,lt=pe,ht=ut,ft=Oe,pt=N.Object,mt=ft?function(e){return"symbol"==typeof e}:function(e){var t=ct("Symbol");return lt(t)&&ht(t.prototype,pt(e))},gt=N.String,vt=function(e){try{return gt(e)}catch(e){return"Object"}},yt=pe,bt=vt,_t=N.TypeError,wt=function(e){if(yt(e))return e;throw _t(bt(e)+" is not a function")},At=wt,kt=function(e,t){var n=e[t];return null==n?void 0:At(n)},Et=dt,xt=pe,Rt=Qe,St=N.TypeError,Dt=dt,Tt=Qe,It=mt,Ot=kt,Pt=function(e,t){var n,r;if("string"===t&&xt(n=e.toString)&&!Rt(r=Et(n,e)))return r;if(xt(n=e.valueOf)&&!Rt(r=Et(n,e)))return r;if("string"!==t&&xt(n=e.toString)&&!Rt(r=Et(n,e)))return r;throw St("Can't convert object to primitive value")},Ct=Fe,Lt=N.TypeError,Ut=Ct("toPrimitive"),jt=function(e,t){if(!Tt(e)||It(e))return e;var n,r=Ot(e,Ut);if(r){if(void 0===t&&(t="default"),n=Dt(r,e,t),!Tt(n)||It(n))return n;throw Lt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Pt(e,t)},Mt=mt,Gt=function(e){var t=jt(e,"string");return Mt(t)?t:t+""},Bt=Ke,Nt=tt,qt=st,Ft=Gt,Vt=N.TypeError,Wt=Object.defineProperty;ze.f=Bt?Wt:function(e,t,n){if(qt(e),t=Ft(t),qt(n),Nt)try{return Wt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Vt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Ht=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Kt=ze,zt=Ht,$t=Ke?function(e,t,n){return Kt.f(e,t,zt(1,n))}:function(e,t,n){return e[t]=n,e},Qt=pe,Yt=K,Jt=ee(Function.toString);Qt(Yt.inspectSource)||(Yt.inspectSource=function(e){return Jt(e)});var Xt,Zt,en,tn=Yt.inspectSource,nn=pe,rn=tn,an=N.WeakMap,sn=nn(an)&&/native code/.test(rn(an)),on=q.exports,dn=fe,un=on("keys"),cn=function(e){return un[e]||(un[e]=dn(e))},ln={},hn=sn,fn=N,pn=ee,mn=Qe,gn=$t,vn=de,yn=K,bn=cn,_n=ln,wn=fn.TypeError,An=fn.WeakMap;if(hn||yn.state){var kn=yn.state||(yn.state=new An),En=pn(kn.get),xn=pn(kn.has),Rn=pn(kn.set);Xt=function(e,t){if(xn(kn,e))throw new wn("Object already initialized");return t.facade=e,Rn(kn,e,t),t},Zt=function(e){return En(kn,e)||{}},en=function(e){return xn(kn,e)}}else{var Sn=bn("state");_n[Sn]=!0,Xt=function(e,t){if(vn(e,Sn))throw new wn("Object already initialized");return t.facade=e,gn(e,Sn,t),t},Zt=function(e){return vn(e,Sn)?e[Sn]:{}},en=function(e){return vn(e,Sn)}}var Dn={set:Xt,get:Zt,has:en,enforce:function(e){return en(e)?Zt(e):Xt(e,{})},getterFor:function(e){return function(t){var n;if(!mn(t)||(n=Zt(t)).type!==e)throw wn("Incompatible receiver, "+e+" required");return n}}},Tn=Ke,In=de,On=Function.prototype,Pn=Tn&&Object.getOwnPropertyDescriptor,Cn=In(On,"name"),Ln={EXISTS:Cn,PROPER:Cn&&"something"===function(){}.name,CONFIGURABLE:Cn&&(!Tn||Tn&&Pn(On,"name").configurable)},Un=N,jn=pe,Mn=de,Gn=$t,Bn=W,Nn=tn,qn=Ln.CONFIGURABLE,Fn=Dn.get,Vn=Dn.enforce,Wn=String(String).split("String");(He.exports=function(e,t,n,r){var a,i=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,o=!!r&&!!r.noTargetGet,d=r&&void 0!==r.name?r.name:t;jn(n)&&("Symbol("===String(d).slice(0,7)&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Mn(n,"name")||qn&&n.name!==d)&&Gn(n,"name",d),(a=Vn(n)).source||(a.source=Wn.join("string"==typeof d?d:""))),e!==Un?(i?!o&&e[t]&&(s=!0):delete e[t],s?e[t]=n:Gn(e,t,n)):s?e[t]=n:Bn(t,n)})(Function.prototype,"toString",(function(){return jn(this)&&Fn(this).source||Nn(this)}));var Hn=ee,Kn=Hn({}.toString),zn=Hn("".slice),$n=function(e){return zn(Kn(e),8,-1)},Qn=N,Yn=We,Jn=pe,Xn=$n,Zn=Fe("toStringTag"),er=Qn.Object,tr="Arguments"==Xn(function(){return arguments}()),nr=Yn?Xn: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=er(e),Zn))?n:tr?Xn(t):"Object"==(r=Xn(t))&&Jn(t.callee)?"Arguments":r},rr=nr,ar=We?{}.toString:function(){return"[object "+rr(this)+"]"},ir=We,sr=He.exports,or=ar;ir||sr(Object.prototype,"toString",or,{unsafe:!0});var dr={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},ur=Ze("span").classList,cr=ur&&ur.constructor&&ur.constructor.prototype,lr=cr===Object.prototype?void 0:cr,hr=wt,fr=ee(ee.bind),pr=function(e,t){return hr(e),void 0===t?e:fr?fr(e,t):function(){return e.apply(t,arguments)}},mr=ee,gr=Se,vr=$n,yr=N.Object,br=mr("".split),_r=gr((function(){return!yr("z").propertyIsEnumerable(0)}))?function(e){return"String"==vr(e)?br(e,""):yr(e)}:yr,wr=Math.ceil,Ar=Math.floor,kr=function(e){var t=+e;return t!=t||0===t?0:(t>0?Ar:wr)(t)},Er=kr,xr=Math.min,Rr=function(e){return e>0?xr(Er(e),9007199254740991):0},Sr=Rr,Dr=function(e){return Sr(e.length)},Tr=$n,Ir=Array.isArray||function(e){return"Array"==Tr(e)},Or=ee,Pr=Se,Cr=pe,Lr=nr,Ur=tn,jr=function(){},Mr=[],Gr=ye("Reflect","construct"),Br=/^\s*(?:class|function)\b/,Nr=Or(Br.exec),qr=!Br.exec(jr),Fr=function(e){if(!Cr(e))return!1;try{return Gr(jr,Mr,e),!0}catch(e){return!1}},Vr=!Gr||Pr((function(){var e;return Fr(Fr.call)||!Fr(Object)||!Fr((function(){e=!0}))||e}))?function(e){if(!Cr(e))return!1;switch(Lr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return qr||!!Nr(Br,Ur(e))}:Fr,Wr=N,Hr=Ir,Kr=Vr,zr=Qe,$r=Fe("species"),Qr=Wr.Array,Yr=function(e){var t;return Hr(e)&&(t=e.constructor,(Kr(t)&&(t===Qr||Hr(t.prototype))||zr(t)&&null===(t=t[$r]))&&(t=void 0)),void 0===t?Qr:t},Jr=function(e,t){return new(Yr(e))(0===t?0:t)},Xr=pr,Zr=_r,ea=ie,ta=Dr,na=Jr,ra=ee([].push),aa=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=7==e,o=5==e||i;return function(d,u,c,l){for(var h,f,p=ea(d),m=Zr(p),g=Xr(u,c),v=ta(m),y=0,b=l||na,_=t?b(d,v):n||s?b(d,0):void 0;v>y;y++)if((o||y in m)&&(f=g(h=m[y],y,p),e))if(t)_[y]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:ra(_,h)}else switch(e){case 4:return!1;case 7:ra(_,h)}return i?-1:r||a?a:_}},ia={forEach:aa(0),map:aa(1),filter:aa(2),some:aa(3),every:aa(4),find:aa(5),findIndex:aa(6),filterReject:aa(7)},sa=Se,oa=function(e,t){var n=[][e];return!!n&&sa((function(){n.call(null,t||function(){throw 1},1)}))},da=ia.forEach,ua=N,ca=dr,la=lr,ha=oa("forEach")?[].forEach:function(e){return da(this,e,arguments.length>1?arguments[1]:void 0)},fa=$t,pa=function(e){if(e&&e.forEach!==ha)try{fa(e,"forEach",ha)}catch(t){e.forEach=ha}};for(var ma in ca)ca[ma]&&pa(ua[ma]&&ua[ma].prototype);pa(la);var ga={},va={},ya={}.propertyIsEnumerable,ba=Object.getOwnPropertyDescriptor,_a=ba&&!ya.call({1:2},1);va.f=_a?function(e){var t=ba(this,e);return!!t&&t.enumerable}:ya;var wa=_r,Aa=ne,ka=function(e){return wa(Aa(e))},Ea=Ke,xa=dt,Ra=va,Sa=Ht,Da=ka,Ta=Gt,Ia=de,Oa=tt,Pa=Object.getOwnPropertyDescriptor;ga.f=Ea?Pa:function(e,t){if(e=Da(e),t=Ta(t),Oa)try{return Pa(e,t)}catch(e){}if(Ia(e,t))return Sa(!xa(Ra.f,e,t),e[t])};var Ca={},La=kr,Ua=Math.max,ja=Math.min,Ma=function(e,t){var n=La(e);return n<0?Ua(n+t,0):ja(n,t)},Ga=ka,Ba=Ma,Na=Dr,qa=function(e){return function(t,n,r){var a,i=Ga(t),s=Na(i),o=Ba(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}},Fa={includes:qa(!0),indexOf:qa(!1)},Va=de,Wa=ka,Ha=Fa.indexOf,Ka=ln,za=ee([].push),$a=function(e,t){var n,r=Wa(e),a=0,i=[];for(n in r)!Va(Ka,n)&&Va(r,n)&&za(i,n);for(;t.length>a;)Va(r,n=t[a++])&&(~Ha(i,n)||za(i,n));return i},Qa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ya=$a,Ja=Qa.concat("length","prototype");Ca.f=Object.getOwnPropertyNames||function(e){return Ya(e,Ja)};var Xa={};Xa.f=Object.getOwnPropertySymbols;var Za=ye,ei=Ca,ti=Xa,ni=st,ri=ee([].concat),ai=Za("Reflect","ownKeys")||function(e){var t=ei.f(ni(e)),n=ti.f;return n?ri(t,n(e)):t},ii=de,si=ai,oi=ga,di=ze,ui=function(e,t){for(var n=si(t),r=di.f,a=oi.f,i=0;i<n.length;i++){var s=n[i];ii(e,s)||r(e,s,a(t,s))}},ci=Se,li=pe,hi=/#|\.prototype\./,fi=function(e,t){var n=mi[pi(e)];return n==vi||n!=gi&&(li(t)?ci(t):!!t)},pi=fi.normalize=function(e){return String(e).replace(hi,".").toLowerCase()},mi=fi.data={},gi=fi.NATIVE="N",vi=fi.POLYFILL="P",yi=fi,bi=N,_i=ga.f,wi=$t,Ai=He.exports,ki=W,Ei=ui,xi=yi,Ri=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?bi:u?bi[o]||ki(o,{}):(bi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=_i(n,r))&&s.value:n[r],!xi(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Ei(i,a)}(e.sham||a&&a.sham)&&wi(i,"sham",!0),Ai(n,r,i,e)}},Si=$a,Di=Qa,Ti=Object.keys||function(e){return Si(e,Di)},Ii=ie,Oi=Ti;Ri({target:"Object",stat:!0,forced:Se((function(){Oi(1)}))},{keys:function(e){return Oi(Ii(e))}});var Pi=Array.isArray,Ci=Object.prototype.toString,Li=Pi||function(e){return!!e&&"[object Array]"==Ci.call(e)},Ui={name:"@bygd/gd-sdk-pes",version:"1.29.24",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap --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",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"}},ji=function(e){var t=Mi("object"===E.default(e)?e:a.parseJSON(e));return t&&t.version?Ui.version>=t.version?t:void 0:t},Mi=function(e){var t=this;if(!Li(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){k.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}},Gi=function(){var e;(e=console).log.apply(e,arguments)},Bi=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 Ni,qi={},Fi=Function.prototype,Vi=Fi.apply,Wi=Fi.bind,Hi=Fi.call,Ki="object"==typeof Reflect&&Reflect.apply||(Wi?Hi.bind(Vi):function(){return Hi.apply(Vi,arguments)}),zi=nr,$i=N.String,Qi=function(e){if("Symbol"===zi(e))throw TypeError("Cannot convert a Symbol value to a string");return $i(e)},Yi=ze,Ji=st,Xi=ka,Zi=Ti,es=Ke?Object.defineProperties:function(e,t){Ji(e);for(var n,r=Xi(t),a=Zi(t),i=a.length,s=0;i>s;)Yi.f(e,n=a[s++],r[n]);return e},ts=ye("document","documentElement"),ns=st,rs=es,as=Qa,is=ln,ss=ts,os=Ze,ds=cn("IE_PROTO"),us=function(){},cs=function(e){return"<script>"+e+"<\/script>"},ls=function(e){e.write(cs("")),e.close();var t=e.parentWindow.Object;return e=null,t},hs=function(){try{Ni=new ActiveXObject("htmlfile")}catch(e){}var e,t;hs="undefined"!=typeof document?document.domain&&Ni?ls(Ni):((t=os("iframe")).style.display="none",ss.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(cs("document.F=Object")),e.close(),e.F):ls(Ni);for(var n=as.length;n--;)delete hs.prototype[as[n]];return hs()};is[ds]=!0;var fs=Object.create||function(e,t){var n;return null!==e?(us.prototype=ns(e),n=new us,us.prototype=null,n[ds]=e):n=hs(),void 0===t?n:rs(n,t)},ps={},ms=ee([].slice),gs=$n,vs=ka,ys=Ca.f,bs=ms,_s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ps.f=function(e){return _s&&"Window"==gs(e)?function(e){try{return ys(e)}catch(e){return bs(_s)}}(e):ys(vs(e))};var ws={},As=Fe;ws.f=As;var ks=N,Es=de,xs=ws,Rs=ze.f,Ss=function(e){var t=ks.Symbol||(ks.Symbol={});Es(t,e)||Rs(t,e,{value:xs.f(e)})},Ds=ze.f,Ts=de,Is=Fe("toStringTag"),Os=function(e,t,n){e&&!Ts(e=n?e:e.prototype,Is)&&Ds(e,Is,{configurable:!0,value:t})},Ps=Ri,Cs=N,Ls=ye,Us=Ki,js=dt,Ms=ee,Gs=Ke,Bs=Ie,Ns=Se,Fs=de,Vs=Ir,Ws=pe,Hs=Qe,Ks=ut,zs=mt,$s=st,Qs=ie,Ys=ka,Js=Gt,Xs=Qi,Zs=Ht,eo=fs,to=Ti,no=Ca,ro=ps,ao=Xa,io=ga,so=ze,oo=va,uo=ms,co=He.exports,lo=q.exports,ho=ln,fo=fe,po=Fe,mo=ws,go=Ss,vo=Os,yo=Dn,bo=ia.forEach,_o=cn("hidden"),wo=po("toPrimitive"),Ao=yo.set,ko=yo.getterFor("Symbol"),Eo=Object.prototype,xo=Cs.Symbol,Ro=xo&&xo.prototype,So=Cs.TypeError,Do=Cs.QObject,To=Ls("JSON","stringify"),Io=io.f,Oo=so.f,Po=ro.f,Co=oo.f,Lo=Ms([].push),Uo=lo("symbols"),jo=lo("op-symbols"),Mo=lo("string-to-symbol-registry"),Go=lo("symbol-to-string-registry"),Bo=lo("wks"),No=!Do||!Do.prototype||!Do.prototype.findChild,qo=Gs&&Ns((function(){return 7!=eo(Oo({},"a",{get:function(){return Oo(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Io(Eo,t);r&&delete Eo[t],Oo(e,t,n),r&&e!==Eo&&Oo(Eo,t,r)}:Oo,Fo=function(e,t){var n=Uo[e]=eo(Ro);return Ao(n,{type:"Symbol",tag:e,description:t}),Gs||(n.description=t),n},Vo=function(e,t,n){e===Eo&&Vo(jo,t,n),$s(e);var r=Js(t);return $s(n),Fs(Uo,r)?(n.enumerable?(Fs(e,_o)&&e[_o][r]&&(e[_o][r]=!1),n=eo(n,{enumerable:Zs(0,!1)})):(Fs(e,_o)||Oo(e,_o,Zs(1,{})),e[_o][r]=!0),qo(e,r,n)):Oo(e,r,n)},Wo=function(e,t){$s(e);var n=Ys(t),r=to(n).concat($o(n));return bo(r,(function(t){Gs&&!js(Ho,n,t)||Vo(e,t,n[t])})),e},Ho=function(e){var t=Js(e),n=js(Co,this,t);return!(this===Eo&&Fs(Uo,t)&&!Fs(jo,t))&&(!(n||!Fs(this,t)||!Fs(Uo,t)||Fs(this,_o)&&this[_o][t])||n)},Ko=function(e,t){var n=Ys(e),r=Js(t);if(n!==Eo||!Fs(Uo,r)||Fs(jo,r)){var a=Io(n,r);return!a||!Fs(Uo,r)||Fs(n,_o)&&n[_o][r]||(a.enumerable=!0),a}},zo=function(e){var t=Po(Ys(e)),n=[];return bo(t,(function(e){Fs(Uo,e)||Fs(ho,e)||Lo(n,e)})),n},$o=function(e){var t=e===Eo,n=Po(t?jo:Ys(e)),r=[];return bo(n,(function(e){!Fs(Uo,e)||t&&!Fs(Eo,e)||Lo(r,Uo[e])})),r};(Bs||(co(Ro=(xo=function(){if(Ks(Ro,this))throw So("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Xs(arguments[0]):void 0,t=fo(e),n=function(e){this===Eo&&js(n,jo,e),Fs(this,_o)&&Fs(this[_o],t)&&(this[_o][t]=!1),qo(this,t,Zs(1,e))};return Gs&&No&&qo(Eo,t,{configurable:!0,set:n}),Fo(t,e)}).prototype,"toString",(function(){return ko(this).tag})),co(xo,"withoutSetter",(function(e){return Fo(fo(e),e)})),oo.f=Ho,so.f=Vo,io.f=Ko,no.f=ro.f=zo,ao.f=$o,mo.f=function(e){return Fo(po(e),e)},Gs&&(Oo(Ro,"description",{configurable:!0,get:function(){return ko(this).description}}),co(Eo,"propertyIsEnumerable",Ho,{unsafe:!0}))),Ps({global:!0,wrap:!0,forced:!Bs,sham:!Bs},{Symbol:xo}),bo(to(Bo),(function(e){go(e)})),Ps({target:"Symbol",stat:!0,forced:!Bs},{for:function(e){var t=Xs(e);if(Fs(Mo,t))return Mo[t];var n=xo(t);return Mo[t]=n,Go[n]=t,n},keyFor:function(e){if(!zs(e))throw So(e+" is not a symbol");if(Fs(Go,e))return Go[e]},useSetter:function(){No=!0},useSimple:function(){No=!1}}),Ps({target:"Object",stat:!0,forced:!Bs,sham:!Gs},{create:function(e,t){return void 0===t?eo(e):Wo(eo(e),t)},defineProperty:Vo,defineProperties:Wo,getOwnPropertyDescriptor:Ko}),Ps({target:"Object",stat:!0,forced:!Bs},{getOwnPropertyNames:zo,getOwnPropertySymbols:$o}),Ps({target:"Object",stat:!0,forced:Ns((function(){ao.f(1)}))},{getOwnPropertySymbols:function(e){return ao.f(Qs(e))}}),To)&&Ps({target:"JSON",stat:!0,forced:!Bs||Ns((function(){var e=xo();return"[null]"!=To([e])||"{}"!=To({a:e})||"{}"!=To(Object(e))}))},{stringify:function(e,t,n){var r=uo(arguments),a=t;if((Hs(t)||void 0!==e)&&!zs(e))return Vs(t)||(t=function(e,t){if(Ws(a)&&(t=js(a,this,e,t)),!zs(t))return t}),r[1]=t,Us(To,null,r)}});if(!Ro[wo]){var Qo=Ro.valueOf;co(Ro,wo,(function(e){return js(Qo,this)}))}vo(xo,"Symbol"),ho[_o]=!0;var Yo=Se,Jo=Re,Xo=Fe("species"),Zo=function(e){return Jo>=51||!Yo((function(){var t=[];return(t.constructor={})[Xo]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},ed=ia.filter;Ri({target:"Array",proto:!0,forced:!Zo("filter")},{filter:function(e){return ed(this,e,arguments.length>1?arguments[1]:void 0)}});var td=Ri,nd=Se,rd=ka,ad=ga.f,id=Ke,sd=nd((function(){ad(1)}));td({target:"Object",stat:!0,forced:!id||sd,sham:!id},{getOwnPropertyDescriptor:function(e,t){return ad(rd(e),t)}});var od=Gt,dd=ze,ud=Ht,cd=function(e,t,n){var r=od(t);r in e?dd.f(e,r,ud(0,n)):e[r]=n},ld=ai,hd=ka,fd=ga,pd=cd;Ri({target:"Object",stat:!0,sham:!Ke},{getOwnPropertyDescriptors:function(e){for(var t,n,r=hd(e),a=fd.f,i=ld(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&pd(s,t,n);return s}});var md=Ri,gd=N,vd=Ir,yd=Vr,bd=Qe,_d=Ma,wd=Dr,Ad=ka,kd=cd,Ed=Fe,xd=ms,Rd=Zo("slice"),Sd=Ed("species"),Dd=gd.Array,Td=Math.max;md({target:"Array",proto:!0,forced:!Rd},{slice:function(e,t){var n,r,a,i=Ad(this),s=wd(i),o=_d(e,s),d=_d(void 0===t?s:t,s);if(vd(i)&&(n=i.constructor,(yd(n)&&(n===Dd||vd(n.prototype))||bd(n)&&null===(n=n[Sd]))&&(n=void 0),n===Dd||void 0===n))return xd(i,o,d);for(r=new(void 0===n?Dd:n)(Td(d-o,0)),a=0;o<d;o++,a++)o in i&&kd(r,a,i[o]);return r.length=a,r}});var Id=dt,Od=st,Pd=kt,Cd=function(e,t,n){var r,a;Od(e);try{if(!(r=Pd(e,"return"))){if("throw"===t)throw n;return n}r=Id(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Od(r),n},Ld=st,Ud=Cd,jd={},Md=jd,Gd=Fe("iterator"),Bd=Array.prototype,Nd=function(e){return void 0!==e&&(Md.Array===e||Bd[Gd]===e)},qd=nr,Fd=kt,Vd=jd,Wd=Fe("iterator"),Hd=function(e){if(null!=e)return Fd(e,Wd)||Fd(e,"@@iterator")||Vd[qd(e)]},Kd=dt,zd=wt,$d=st,Qd=vt,Yd=Hd,Jd=N.TypeError,Xd=function(e,t){var n=arguments.length<2?Yd(e):t;if(zd(n))return $d(Kd(n,e));throw Jd(Qd(e)+" is not iterable")},Zd=pr,eu=dt,tu=ie,nu=function(e,t,n,r){try{return r?t(Ld(n)[0],n[1]):t(n)}catch(t){Ud(e,"throw",t)}},ru=Nd,au=Vr,iu=Dr,su=cd,ou=Xd,du=Hd,uu=N.Array,cu=Fe("iterator"),lu=!1;try{var hu=0,fu={next:function(){return{done:!!hu++}},return:function(){lu=!0}};fu[cu]=function(){return this},Array.from(fu,(function(){throw 2}))}catch(e){}var pu=function(e,t){if(!t&&!lu)return!1;var n=!1;try{var r={};r[cu]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},mu=function(e){var t=tu(e),n=au(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=Zd(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=du(t),f=0;if(!h||this==uu&&ru(h))for(s=iu(t),o=n?new this(s):uu(s);s>f;f++)l=i?a(t[f],f):t[f],su(o,f,l);else for(c=(u=ou(t,h)).next,o=n?new this:[];!(d=eu(c,u)).done;f++)l=i?nu(u,a,[d.value,f],!0):d.value,su(o,f,l);return o.length=f,o};Ri({target:"Array",stat:!0,forced:!pu((function(e){Array.from(e)}))},{from:mu});var gu,vu,yu,bu=ee,_u=kr,wu=Qi,Au=ne,ku=bu("".charAt),Eu=bu("".charCodeAt),xu=bu("".slice),Ru=function(e){return function(t,n){var r,a,i=wu(Au(t)),s=_u(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=Eu(i,s))<55296||r>56319||s+1===o||(a=Eu(i,s+1))<56320||a>57343?e?ku(i,s):r:e?xu(i,s,s+2):a-56320+(r-55296<<10)+65536}},Su={codeAt:Ru(!1),charAt:Ru(!0)},Du=!Se((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Tu=N,Iu=de,Ou=pe,Pu=ie,Cu=Du,Lu=cn("IE_PROTO"),Uu=Tu.Object,ju=Uu.prototype,Mu=Cu?Uu.getPrototypeOf:function(e){var t=Pu(e);if(Iu(t,Lu))return t[Lu];var n=t.constructor;return Ou(n)&&t instanceof n?n.prototype:t instanceof Uu?ju:null},Gu=Se,Bu=pe,Nu=Mu,qu=He.exports,Fu=Fe("iterator"),Vu=!1;[].keys&&("next"in(yu=[].keys())?(vu=Nu(Nu(yu)))!==Object.prototype&&(gu=vu):Vu=!0);var Wu=null==gu||Gu((function(){var e={};return gu[Fu].call(e)!==e}));Wu&&(gu={}),Bu(gu[Fu])||qu(gu,Fu,(function(){return this}));var Hu={IteratorPrototype:gu,BUGGY_SAFARI_ITERATORS:Vu},Ku=Hu.IteratorPrototype,zu=fs,$u=Ht,Qu=Os,Yu=jd,Ju=function(){return this},Xu=function(e,t,n){var r=t+" Iterator";return e.prototype=zu(Ku,{next:$u(1,n)}),Qu(e,r,!1),Yu[r]=Ju,e},Zu=N,ec=pe,tc=Zu.String,nc=Zu.TypeError,rc=ee,ac=st,ic=function(e){if("object"==typeof e||ec(e))return e;throw nc("Can't set "+tc(e)+" as a prototype")},sc=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=rc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return ac(n),ic(r),t?e(n,r):n.__proto__=r,n}}():void 0),oc=Ri,dc=dt,uc=Ln,cc=pe,lc=Xu,hc=Mu,fc=sc,pc=Os,mc=$t,gc=He.exports,vc=jd,yc=uc.PROPER,bc=uc.CONFIGURABLE,_c=Hu.IteratorPrototype,wc=Hu.BUGGY_SAFARI_ITERATORS,Ac=Fe("iterator"),kc=function(){return this},Ec=function(e,t,n,r,a,i,s){lc(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!wc&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Ac]||f["@@iterator"]||a&&f[a],m=!wc&&p||c(a),g="Array"==t&&f.entries||p;if(g&&(o=hc(g.call(new e)))!==Object.prototype&&o.next&&(hc(o)!==_c&&(fc?fc(o,_c):cc(o[Ac])||gc(o,Ac,kc)),pc(o,l,!0)),yc&&"values"==a&&p&&"values"!==p.name&&(bc?mc(f,"name","values"):(h=!0,m=function(){return dc(p,this)})),a)if(d={values:c("values"),keys:i?m:c("keys"),entries:c("entries")},s)for(u in d)(wc||h||!(u in f))&&gc(f,u,d[u]);else oc({target:t,proto:!0,forced:wc||h},d);return f[Ac]!==m&&gc(f,Ac,m,{name:a}),vc[t]=m,d},xc=Su.charAt,Rc=Qi,Sc=Dn,Dc=Ec,Tc=Sc.set,Ic=Sc.getterFor("String Iterator");Dc(String,"String",(function(e){Tc(this,{type:"String Iterator",string:Rc(e),index:0})}),(function(){var e,t=Ic(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=xc(n,r),t.index+=e.length,{value:e,done:!1})}));var Oc=st,Pc=function(){var e=Oc(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Cc={},Lc=Se,Uc=N.RegExp;Cc.UNSUPPORTED_Y=Lc((function(){var e=Uc("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Cc.BROKEN_CARET=Lc((function(){var e=Uc("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var jc=Se,Mc=N.RegExp,Gc=jc((function(){var e=Mc(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Bc=Se,Nc=N.RegExp,qc=Bc((function(){var e=Nc("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Fc=dt,Vc=ee,Wc=Qi,Hc=Pc,Kc=Cc,zc=q.exports,$c=fs,Qc=Dn.get,Yc=Gc,Jc=qc,Xc=zc("native-string-replace",String.prototype.replace),Zc=RegExp.prototype.exec,el=Zc,tl=Vc("".charAt),nl=Vc("".indexOf),rl=Vc("".replace),al=Vc("".slice),il=function(){var e=/a/,t=/b*/g;return Fc(Zc,e,"a"),Fc(Zc,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),sl=Kc.UNSUPPORTED_Y||Kc.BROKEN_CARET,ol=void 0!==/()??/.exec("")[1];(il||ol||sl||Yc||Jc)&&(el=function(e){var t,n,r,a,i,s,o,d=this,u=Qc(d),c=Wc(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=Fc(el,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=sl&&d.sticky,p=Fc(Hc,d),m=d.source,g=0,v=c;if(f&&(p=rl(p,"y",""),-1===nl(p,"g")&&(p+="g"),v=al(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==tl(c,d.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",p)),ol&&(n=new RegExp("^"+m+"$(?!\\s)",p)),il&&(r=d.lastIndex),a=Fc(Zc,f?n:d,v),f?a?(a.input=al(a.input,g),a[0]=al(a[0],g),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:il&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),ol&&a&&a.length>1&&Fc(Xc,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=$c(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var dl=el;Ri({target:"RegExp",proto:!0,forced:/./.exec!==dl},{exec:dl});var ul=Ri,cl=Ke,ll=N,hl=ee,fl=de,pl=pe,ml=ut,gl=Qi,vl=ze.f,yl=ui,bl=ll.Symbol,_l=bl&&bl.prototype;if(cl&&pl(bl)&&(!("description"in _l)||void 0!==bl().description)){var wl={},Al=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:gl(arguments[0]),t=ml(_l,this)?new bl(e):void 0===e?bl():bl(e);return""===e&&(wl[t]=!0),t};yl(Al,bl),Al.prototype=_l,_l.constructor=Al;var kl="Symbol(test)"==String(bl("test")),El=hl(_l.toString),xl=hl(_l.valueOf),Rl=/^Symbol\((.*)\)[^)]+$/,Sl=hl("".replace),Dl=hl("".slice);vl(_l,"description",{configurable:!0,get:function(){var e=xl(this),t=El(e);if(fl(wl,e))return"";var n=kl?Dl(t,7,-1):Sl(t,Rl,"$1");return""===n?void 0:n}}),ul({global:!0,forced:!0},{Symbol:Al})}Ss("iterator");var Tl=fs,Il=ze,Ol=Fe("unscopables"),Pl=Array.prototype;null==Pl[Ol]&&Il.f(Pl,Ol,{configurable:!0,value:Tl(null)});var Cl=function(e){Pl[Ol][e]=!0},Ll=ka,Ul=Cl,jl=jd,Ml=Dn,Gl=Ec,Bl=Ml.set,Nl=Ml.getterFor("Array Iterator"),ql=Gl(Array,"Array",(function(e,t){Bl(this,{type:"Array Iterator",target:Ll(e),index:0,kind:t})}),(function(){var e=Nl(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");jl.Arguments=jl.Array,Ul("keys"),Ul("values"),Ul("entries");var Fl=N,Vl=dr,Wl=lr,Hl=ql,Kl=$t,zl=Fe,$l=zl("iterator"),Ql=zl("toStringTag"),Yl=Hl.values,Jl=function(e,t){if(e){if(e[$l]!==Yl)try{Kl(e,$l,Yl)}catch(t){e[$l]=Yl}if(e[Ql]||Kl(e,Ql,t),Vl[t])for(var n in Hl)if(e[n]!==Hl[n])try{Kl(e,n,Hl[n])}catch(t){e[n]=Hl[n]}}};for(var Xl in Vl)Jl(Fl[Xl]&&Fl[Xl].prototype,Xl);Jl(Wl,"DOMTokenList");var Zl,eh,th,nh,rh=N.Promise,ah=He.exports,ih=function(e,t,n){for(var r in t)ah(e,r,t[r],n);return e},sh=ye,oh=ze,dh=Ke,uh=Fe("species"),ch=function(e){var t=sh(e),n=oh.f;dh&&t&&!t[uh]&&n(t,uh,{configurable:!0,get:function(){return this}})},lh=ut,hh=N.TypeError,fh=function(e,t){if(lh(t,e))return e;throw hh("Incorrect invocation")},ph=pr,mh=dt,gh=st,vh=vt,yh=Nd,bh=Dr,_h=ut,wh=Xd,Ah=Hd,kh=Cd,Eh=N.TypeError,xh=function(e,t){this.stopped=e,this.result=t},Rh=xh.prototype,Sh=Vr,Dh=vt,Th=N.TypeError,Ih=st,Oh=function(e){if(Sh(e))return e;throw Th(Dh(e)+" is not a constructor")},Ph=Fe("species"),Ch=function(e,t){var n,r=Ih(e).constructor;return void 0===r||null==(n=Ih(r)[Ph])?t:Oh(n)},Lh=/(?:ipad|iphone|ipod).*applewebkit/i.test(be),Uh="process"==$n(N.process),jh=N,Mh=Ki,Gh=pr,Bh=pe,Nh=de,qh=Se,Fh=ts,Vh=ms,Wh=Ze,Hh=Lh,Kh=Uh,zh=jh.setImmediate,$h=jh.clearImmediate,Qh=jh.process,Yh=jh.Dispatch,Jh=jh.Function,Xh=jh.MessageChannel,Zh=jh.String,ef=0,tf={};try{Zl=jh.location}catch(e){}var nf=function(e){if(Nh(tf,e)){var t=tf[e];delete tf[e],t()}},rf=function(e){return function(){nf(e)}},af=function(e){nf(e.data)},sf=function(e){jh.postMessage(Zh(e),Zl.protocol+"//"+Zl.host)};zh&&$h||(zh=function(e){var t=Vh(arguments,1);return tf[++ef]=function(){Mh(Bh(e)?e:Jh(e),void 0,t)},eh(ef),ef},$h=function(e){delete tf[e]},Kh?eh=function(e){Qh.nextTick(rf(e))}:Yh&&Yh.now?eh=function(e){Yh.now(rf(e))}:Xh&&!Hh?(nh=(th=new Xh).port2,th.port1.onmessage=af,eh=Gh(nh.postMessage,nh)):jh.addEventListener&&Bh(jh.postMessage)&&!jh.importScripts&&Zl&&"file:"!==Zl.protocol&&!qh(sf)?(eh=sf,jh.addEventListener("message",af,!1)):eh="onreadystatechange"in Wh("script")?function(e){Fh.appendChild(Wh("script")).onreadystatechange=function(){Fh.removeChild(this),nf(e)}}:function(e){setTimeout(rf(e),0)});var of,df,uf,cf,lf,hf,ff,pf,mf={set:zh,clear:$h},gf=N,vf=/ipad|iphone|ipod/i.test(be)&&void 0!==gf.Pebble,yf=/web0s(?!.*chrome)/i.test(be),bf=N,_f=pr,wf=ga.f,Af=mf.set,kf=Lh,Ef=vf,xf=yf,Rf=Uh,Sf=bf.MutationObserver||bf.WebKitMutationObserver,Df=bf.document,Tf=bf.process,If=bf.Promise,Of=wf(bf,"queueMicrotask"),Pf=Of&&Of.value;Pf||(of=function(){var e,t;for(Rf&&(e=Tf.domain)&&e.exit();df;){t=df.fn,df=df.next;try{t()}catch(e){throw df?cf():uf=void 0,e}}uf=void 0,e&&e.enter()},kf||Rf||xf||!Sf||!Df?!Ef&&If&&If.resolve?((ff=If.resolve(void 0)).constructor=If,pf=_f(ff.then,ff),cf=function(){pf(of)}):Rf?cf=function(){Tf.nextTick(of)}:(Af=_f(Af,bf),cf=function(){Af(of)}):(lf=!0,hf=Df.createTextNode(""),new Sf(of).observe(hf,{characterData:!0}),cf=function(){hf.data=lf=!lf}));var Cf=Pf||function(e){var t={fn:e,next:void 0};uf&&(uf.next=t),df||(df=t,cf()),uf=t},Lf={},Uf=wt,jf=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=Uf(t),this.reject=Uf(n)};Lf.f=function(e){return new jf(e)};var Mf,Gf,Bf,Nf,qf=st,Ff=Qe,Vf=Lf,Wf=function(e,t){if(qf(e),Ff(t)&&t.constructor===e)return t;var n=Vf.f(e);return(0,n.resolve)(t),n.promise},Hf=N,Kf="object"==typeof window,zf=Ri,$f=N,Qf=ye,Yf=dt,Jf=rh,Xf=He.exports,Zf=ih,ep=sc,tp=Os,np=ch,rp=wt,ap=pe,ip=Qe,sp=fh,op=tn,dp=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),p=ph(t,c),m=function(e){return r&&kh(r,"normal",e),new xh(!0,e)},g=function(e){return l?(gh(e),f?p(e[0],e[1],m):p(e[0],e[1])):f?p(e,m):p(e)};if(h)r=e;else{if(!(a=Ah(e)))throw Eh(vh(e)+" is not iterable");if(yh(a)){for(i=0,s=bh(e);s>i;i++)if((o=g(e[i]))&&_h(Rh,o))return o;return new xh(!1)}r=wh(e,a)}for(d=r.next;!(u=mh(d,r)).done;){try{o=g(u.value)}catch(e){kh(r,"throw",e)}if("object"==typeof o&&o&&_h(Rh,o))return o}return new xh(!1)},up=pu,cp=Ch,lp=mf.set,hp=Cf,fp=Wf,pp=function(e,t){var n=Hf.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},mp=Lf,gp=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},vp=Dn,yp=yi,bp=Kf,_p=Uh,wp=Re,Ap=Fe("species"),kp=vp.get,Ep=vp.set,xp=vp.getterFor("Promise"),Rp=Jf&&Jf.prototype,Sp=Jf,Dp=Rp,Tp=$f.TypeError,Ip=$f.document,Op=$f.process,Pp=mp.f,Cp=Pp,Lp=!!(Ip&&Ip.createEvent&&$f.dispatchEvent),Up=ap($f.PromiseRejectionEvent),jp=!1,Mp=yp("Promise",(function(){var e=op(Sp),t=e!==String(Sp);if(!t&&66===wp)return!0;if(wp>=51&&/native code/.test(e))return!1;var n=new Sp((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[Ap]=r,!(jp=n.then((function(){}))instanceof r)||!t&&bp&&!Up})),Gp=Mp||!up((function(e){Sp.all(e).catch((function(){}))})),Bp=function(e){var t;return!(!ip(e)||!ap(t=e.then))&&t},Np=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;hp((function(){for(var r=e.value,a=1==e.state,i=0;n.length>i;){var s,o,d,u=n[i++],c=a?u.ok:u.fail,l=u.resolve,h=u.reject,f=u.domain;try{c?(a||(2===e.rejection&&Wp(e),e.rejection=1),!0===c?s=r:(f&&f.enter(),s=c(r),f&&(f.exit(),d=!0)),s===u.promise?h(Tp("Promise-chain cycle")):(o=Bp(s))?Yf(o,s,l,h):l(s)):h(r)}catch(e){f&&!d&&f.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Fp(e)}))}},qp=function(e,t,n){var r,a;Lp?((r=Ip.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),$f.dispatchEvent(r)):r={promise:t,reason:n},!Up&&(a=$f["on"+e])?a(r):"unhandledrejection"===e&&pp("Unhandled promise rejection",n)},Fp=function(e){Yf(lp,$f,(function(){var t,n=e.facade,r=e.value;if(Vp(e)&&(t=gp((function(){_p?Op.emit("unhandledRejection",r,n):qp("unhandledrejection",n,r)})),e.rejection=_p||Vp(e)?2:1,t.error))throw t.value}))},Vp=function(e){return 1!==e.rejection&&!e.parent},Wp=function(e){Yf(lp,$f,(function(){var t=e.facade;_p?Op.emit("rejectionHandled",t):qp("rejectionhandled",t,e.value)}))},Hp=function(e,t,n){return function(r){e(t,r,n)}},Kp=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Np(e,!0))},zp=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Tp("Promise can't be resolved itself");var r=Bp(t);r?hp((function(){var n={done:!1};try{Yf(r,t,Hp(zp,n,e),Hp(Kp,n,e))}catch(t){Kp(n,t,e)}})):(e.value=t,e.state=1,Np(e,!1))}catch(t){Kp({done:!1},t,e)}}};if(Mp&&(Dp=(Sp=function(e){sp(this,Dp),rp(e),Yf(Mf,this);var t=kp(this);try{e(Hp(zp,t),Hp(Kp,t))}catch(e){Kp(t,e)}}).prototype,(Mf=function(e){Ep(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Zf(Dp,{then:function(e,t){var n=xp(this),r=n.reactions,a=Pp(cp(this,Sp));return a.ok=!ap(e)||e,a.fail=ap(t)&&t,a.domain=_p?Op.domain:void 0,n.parent=!0,r[r.length]=a,0!=n.state&&Np(n,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),Gf=function(){var e=new Mf,t=kp(e);this.promise=e,this.resolve=Hp(zp,t),this.reject=Hp(Kp,t)},mp.f=Pp=function(e){return e===Sp||e===Bf?new Gf(e):Cp(e)},ap(Jf)&&Rp!==Object.prototype)){Nf=Rp.then,jp||(Xf(Rp,"then",(function(e,t){var n=this;return new Sp((function(e,t){Yf(Nf,n,e,t)})).then(e,t)}),{unsafe:!0}),Xf(Rp,"catch",Dp.catch,{unsafe:!0}));try{delete Rp.constructor}catch(e){}ep&&ep(Rp,Dp)}zf({global:!0,wrap:!0,forced:Mp},{Promise:Sp}),tp(Sp,"Promise",!1),np("Promise"),Bf=Qf("Promise"),zf({target:"Promise",stat:!0,forced:Mp},{reject:function(e){var t=Pp(this);return Yf(t.reject,void 0,e),t.promise}}),zf({target:"Promise",stat:!0,forced:Mp},{resolve:function(e){return fp(this,e)}}),zf({target:"Promise",stat:!0,forced:Gp},{all:function(e){var t=this,n=Pp(t),r=n.resolve,a=n.reject,i=gp((function(){var n=rp(t.resolve),i=[],s=0,o=1;dp(e,(function(e){var d=s++,u=!1;o++,Yf(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=Pp(t),r=n.reject,a=gp((function(){var a=rp(t.resolve);dp(e,(function(e){Yf(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var $p=Ri,Qp=N,Yp=Se,Jp=Ir,Xp=Qe,Zp=ie,em=Dr,tm=cd,nm=Jr,rm=Zo,am=Re,im=Fe("isConcatSpreadable"),sm=Qp.TypeError,om=am>=51||!Yp((function(){var e=[];return e[im]=!1,e.concat()[0]!==e})),dm=rm("concat"),um=function(e){if(!Xp(e))return!1;var t=e[im];return void 0!==t?!!t:Jp(e)};$p({target:"Array",proto:!0,forced:!om||!dm},{concat:function(e){var t,n,r,a,i,s=Zp(this),o=nm(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(um(i=-1===t?s:arguments[t])){if(d+(a=em(i))>9007199254740991)throw sm("Maximum allowed index exceeded");for(n=0;n<a;n++,d++)n in i&&tm(o,d,i[n])}else{if(d>=9007199254740991)throw sm("Maximum allowed index exceeded");tm(o,d++,i)}return o.length=d,o}});var cm=Ke,lm=Ln.EXISTS,hm=ee,fm=ze.f,pm=Function.prototype,mm=hm(pm.toString),gm=/^\s*function ([^ (]*)/,vm=hm(gm.exec);function ym(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 bm(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 bm(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 bm(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 _m(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 wm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_m(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}cm&&!lm&&fm(pm,"name",{configurable:!0,get:function(){try{return vm(gm,mm(this))[1]}catch(e){return""}}});var Am,km={react:{src:"https://pm.gamedistribution.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.gamedistribution.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.gamedistribution.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.gamedistribution.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.gamedistribution.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Em={},xm=function(e,t){Em[e]=wm(wm({},t),{},{isLoading:!1})},Rm=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(k.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))},Sm=function(){var e=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u;return x.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=Em[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=ym(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=km[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Rm({id:s,src:km[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=s.id,u=s.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,Rm({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)}}(),Dm=new function e(){var t=this;R.default(this,e),S.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sm("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),S.default(this,"showLeaderboard",function(){var e=A.default(x.default.mark((function e(n){var r;return x.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)}}()),S.default(this,"addScore",function(){var e=A.default(x.default.mark((function e(n){return x.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.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},xm(this.moduleName,this.moduleConfig)},Tm=Qe,Im=$n,Om=Fe("match"),Pm=function(e){var t;return Tm(e)&&(void 0!==(t=e[Om])?!!t:"RegExp"==Im(e))},Cm=Pm,Lm=N.TypeError,Um=function(e){if(Cm(e))throw Lm("The method doesn't accept regular expressions");return e},jm=Fe("match"),Mm=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[jm]=!1,"/./"[e](t)}catch(e){}}return!1},Gm=Ri,Bm=ee,Nm=ga.f,qm=Rr,Fm=Qi,Vm=Um,Wm=ne,Hm=Mm,Km=Bm("".startsWith),zm=Bm("".slice),$m=Math.min,Qm=Hm("startsWith");Gm({target:"String",proto:!0,forced:!!(Qm||(Am=Nm(String.prototype,"startsWith"),!Am||Am.writable))&&!Qm},{startsWith:function(e){var t=Fm(Wm(this));Vm(e);var n=qm($m(arguments.length>1?arguments[1]:void 0,t.length)),r=Fm(e);return Km?Km(t,r,n):zm(t,n,n+r.length)===r}});var Ym=ee,Jm=Ln.PROPER,Xm=He.exports,Zm=st,eg=ut,tg=Qi,ng=Se,rg=Pc,ag=RegExp.prototype,ig=ag.toString,sg=Ym(rg),og=ng((function(){return"/a/b"!=ig.call({source:"a",flags:"b"})})),dg=Jm&&"toString"!=ig.name;(og||dg)&&Xm(RegExp.prototype,"toString",(function(){var e=Zm(this),t=tg(e.source),n=e.flags;return"/"+t+"/"+tg(void 0===n&&eg(ag,e)&&!("flags"in ag)?sg(e):n)}),{unsafe:!0});var ug=ee,cg=He.exports,lg=dl,hg=Se,fg=Fe,pg=$t,mg=fg("species"),gg=RegExp.prototype,vg=function(e,t,n,r){var a=fg(e),i=!hg((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!hg((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[mg]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=ug(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=ug(e),d=t.exec;return d===lg||d===gg.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));cg(String.prototype,e,d[0]),cg(gg,a,d[1])}r&&pg(gg[a],"sham",!0)},yg=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},bg=dt,_g=st,wg=pe,Ag=$n,kg=dl,Eg=N.TypeError,xg=function(e,t){var n=e.exec;if(wg(n)){var r=bg(n,e,t);return null!==r&&_g(r),r}if("RegExp"===Ag(e))return bg(kg,e,t);throw Eg("RegExp#exec called on incompatible receiver")},Rg=dt,Sg=st,Dg=ne,Tg=yg,Ig=Qi,Og=kt,Pg=xg;function Cg(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 Lg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cg(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}vg("search",(function(e,t,n){return[function(t){var n=Dg(this),r=null==t?void 0:Og(t,e);return r?Rg(r,t,n):new RegExp(t)[e](Ig(n))},function(e){var r=Sg(this),a=Ig(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;Tg(s,0)||(r.lastIndex=0);var o=Pg(r,a);return Tg(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var Ug,jg,Mg=function(){function e(){R.default(this,e)}return D.default(e,[{key:"getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,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:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup: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 T.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 T.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new T.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new T.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 T.default(e,!0);return n.query=Lg(Lg({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),Gg=function(){try{return(new Mg).getBridgeContext()}catch(e){return{}}}(),Bg={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(Ug=!1,(jg=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===jg.xanthophyll&&(Ug=!0),Ug)},Ng=Su.charAt,qg=function(e,t,n){return t+(n?Ng(e,t).length:1)},Fg=ee,Vg=ie,Wg=Math.floor,Hg=Fg("".charAt),Kg=Fg("".replace),zg=Fg("".slice),$g=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Qg=/\$([$&'`]|\d{1,2})/g,Yg=Ki,Jg=dt,Xg=ee,Zg=vg,ev=Se,tv=st,nv=pe,rv=kr,av=Rr,iv=Qi,sv=ne,ov=qg,dv=kt,uv=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=Qg;return void 0!==a&&(a=Vg(a),d=$g),Kg(i,d,(function(i,d){var u;switch(Hg(d,0)){case"$":return"$";case"&":return e;case"`":return zg(t,0,n);case"'":return zg(t,s);case"<":u=a[zg(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=Wg(c/10);return 0===l?i:l<=o?void 0===r[l-1]?Hg(d,1):r[l-1]+Hg(d,1):i}u=r[c-1]}return void 0===u?"":u}))},cv=xg,lv=Fe("replace"),hv=Math.max,fv=Math.min,pv=Xg([].concat),mv=Xg([].push),gv=Xg("".indexOf),vv=Xg("".slice),yv="$0"==="a".replace(/./,"$0"),bv=!!/./[lv]&&""===/./[lv]("a","$0");Zg("replace",(function(e,t,n){var r=bv?"$":"$0";return[function(e,n){var r=sv(this),a=null==e?void 0:dv(e,lv);return a?Jg(a,e,r,n):Jg(t,iv(r),e,n)},function(e,a){var i=tv(this),s=iv(e);if("string"==typeof a&&-1===gv(a,r)&&-1===gv(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=nv(a);d||(a=iv(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=cv(i,s);if(null===h)break;if(mv(l,h),!u)break;""===iv(h[0])&&(i.lastIndex=ov(s,av(i.lastIndex),c))}for(var f,p="",m=0,g=0;g<l.length;g++){for(var v=iv((h=l[g])[0]),y=hv(fv(rv(h.index),s.length),0),b=[],_=1;_<h.length;_++)mv(b,void 0===(f=h[_])?f:String(f));var w=h.groups;if(d){var A=pv([v],b,y,s);void 0!==w&&mv(A,w);var k=iv(Yg(a,void 0,A))}else k=uv(v,s,y,b,w,a);y>=m&&(p+=vv(s,m,y)+k,m=y+v.length)}return p+vv(s,m)}]}),!!ev((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!yv||bv);var _v=Se,wv=Fe("iterator"),Av=!_v((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.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[wv]||"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})),kv=ms,Ev=Math.floor,xv=function(e,t){var n=e.length,r=Ev(n/2);return n<8?Rv(e,t):Sv(e,xv(kv(e,0,r),t),xv(kv(e,r),t),t)},Rv=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},Sv=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},Dv=xv,Tv=Ri,Iv=N,Ov=ye,Pv=dt,Cv=ee,Lv=Av,Uv=He.exports,jv=ih,Mv=Os,Gv=Xu,Bv=Dn,Nv=fh,qv=pe,Fv=de,Vv=pr,Wv=nr,Hv=st,Kv=Qe,zv=Qi,$v=fs,Qv=Ht,Yv=Xd,Jv=Hd,Xv=Dv,Zv=Fe("iterator"),ey=Bv.set,ty=Bv.getterFor("URLSearchParams"),ny=Bv.getterFor("URLSearchParamsIterator"),ry=Ov("fetch"),ay=Ov("Request"),iy=Ov("Headers"),sy=ay&&ay.prototype,oy=iy&&iy.prototype,dy=Iv.RegExp,uy=Iv.TypeError,cy=Iv.decodeURIComponent,ly=Iv.encodeURIComponent,hy=Cv("".charAt),fy=Cv([].join),py=Cv([].push),my=Cv("".replace),gy=Cv([].shift),vy=Cv([].splice),yy=Cv("".split),by=Cv("".slice),_y=/\+/g,wy=Array(4),Ay=function(e){return wy[e-1]||(wy[e-1]=dy("((?:%[\\da-f]{2}){"+e+"})","gi"))},ky=function(e){try{return cy(e)}catch(t){return e}},Ey=function(e){var t=my(e,_y," "),n=4;try{return cy(t)}catch(e){for(;n;)t=my(t,Ay(n--),ky);return t}},xy=/[!'()~]|%20/g,Ry={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Sy=function(e){return Ry[e]},Dy=function(e){return my(ly(e),xy,Sy)},Ty=function(e,t){if(t)for(var n,r,a=yy(t,"&"),i=0;i<a.length;)(n=a[i++]).length&&(r=yy(n,"="),py(e,{key:Ey(gy(r)),value:Ey(fy(r,"="))}))},Iy=function(e){this.entries.length=0,Ty(this.entries,e)},Oy=function(e,t){if(e<t)throw uy("Not enough arguments")},Py=Gv((function(e,t){ey(this,{type:"URLSearchParamsIterator",iterator:Yv(ty(e).entries),kind:t})}),"Iterator",(function(){var e=ny(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})),Cy=function(){Nv(this,Ly);var e,t,n,r,a,i,s,o,d,u=arguments.length>0?arguments[0]:void 0,c=this,l=[];if(ey(c,{type:"URLSearchParams",entries:l,updateURL:function(){},updateSearchParams:Iy}),void 0!==u)if(Kv(u))if(e=Jv(u))for(n=(t=Yv(u,e)).next;!(r=Pv(n,t)).done;){if(i=(a=Yv(Hv(r.value))).next,(s=Pv(i,a)).done||(o=Pv(i,a)).done||!Pv(i,a).done)throw uy("Expected sequence with length 2");py(l,{key:zv(s.value),value:zv(o.value)})}else for(d in u)Fv(u,d)&&py(l,{key:d,value:zv(u[d])});else Ty(l,"string"==typeof u?"?"===hy(u,0)?by(u,1):u:zv(u))},Ly=Cy.prototype;if(jv(Ly,{append:function(e,t){Oy(arguments.length,2);var n=ty(this);py(n.entries,{key:zv(e),value:zv(t)}),n.updateURL()},delete:function(e){Oy(arguments.length,1);for(var t=ty(this),n=t.entries,r=zv(e),a=0;a<n.length;)n[a].key===r?vy(n,a,1):a++;t.updateURL()},get:function(e){Oy(arguments.length,1);for(var t=ty(this).entries,n=zv(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Oy(arguments.length,1);for(var t=ty(this).entries,n=zv(e),r=[],a=0;a<t.length;a++)t[a].key===n&&py(r,t[a].value);return r},has:function(e){Oy(arguments.length,1);for(var t=ty(this).entries,n=zv(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Oy(arguments.length,1);for(var n,r=ty(this),a=r.entries,i=!1,s=zv(e),o=zv(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?vy(a,d--,1):(i=!0,n.value=o));i||py(a,{key:s,value:o}),r.updateURL()},sort:function(){var e=ty(this);Xv(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=ty(this).entries,r=Vv(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 Py(this,"keys")},values:function(){return new Py(this,"values")},entries:function(){return new Py(this,"entries")}},{enumerable:!0}),Uv(Ly,Zv,Ly.entries,{name:"entries"}),Uv(Ly,"toString",(function(){for(var e,t=ty(this).entries,n=[],r=0;r<t.length;)e=t[r++],py(n,Dy(e.key)+"="+Dy(e.value));return fy(n,"&")}),{enumerable:!0}),Mv(Cy,"URLSearchParams"),Tv({global:!0,forced:!Lv},{URLSearchParams:Cy}),!Lv&&qv(iy)){var Uy=Cv(oy.has),jy=Cv(oy.set),My=function(e){if(Kv(e)){var t,n=e.body;if("URLSearchParams"===Wv(n))return t=e.headers?new iy(e.headers):new iy,Uy(t,"content-type")||jy(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),$v(e,{body:Qv(0,zv(n)),headers:Qv(0,t)})}return e};if(qv(ry)&&Tv({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return ry(e,arguments.length>1?My(arguments[1]):{})}}),qv(ay)){var Gy=function(e){return Nv(this,sy),new ay(e,arguments.length>1?My(arguments[1]):{})};sy.constructor=Gy,Gy.prototype=sy,Tv({global:!0,forced:!0},{Request:Gy})}}var By=Fa.includes,Ny=Cl;Ri({target:"Array",proto:!0},{includes:function(e){return By(this,e,arguments.length>1?arguments[1]:void 0)}}),Ny("includes");var qy=Ri,Fy=Um,Vy=ne,Wy=Qi,Hy=Mm,Ky=ee("".indexOf);qy({target:"String",proto:!0,forced:!Hy("includes")},{includes:function(e){return!!~Ky(Wy(Vy(this)),Wy(Fy(e)),arguments.length>1?arguments[1]:void 0)}});var zy=Ki,$y=dt,Qy=ee,Yy=vg,Jy=Pm,Xy=st,Zy=ne,eb=Ch,tb=qg,nb=Rr,rb=Qi,ab=kt,ib=ms,sb=xg,ob=dl,db=Se,ub=Cc.UNSUPPORTED_Y,cb=Math.min,lb=[].push,hb=Qy(/./.exec),fb=Qy(lb),pb=Qy("".slice);function mb(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 P.default(n,e)}function d(e,t){return C.default(n,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new T.default(e,t)}catch(e){console.log(e)}}function c(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=decodeURIComponent(o),I.default.isURL(o)))return o}}}return function(){var e;k.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(d("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],d("top.domain.from","origins");else if(0===t)a=i,d("top.domain.from","self-top");else if(1===t){var o=u(s);o&&(a=o.origin,d("top.domain.from","referrer"))}d("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(O.default(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?O.default(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",s),d("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}Yy("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=rb(Zy(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!Jy(e))return $y(t,r,e,a);for(var i,s,o,d=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,l=new RegExp(e.source,u+"g");(i=$y(ob,l,r))&&!((s=l.lastIndex)>c&&(fb(d,pb(r,c,i.index)),i.length>1&&i.index<r.length&&zy(lb,d,ib(i,1)),o=i[0].length,c=s,d.length>=a));)l.lastIndex===i.index&&l.lastIndex++;return c===r.length?!o&&hb(l,"")||fb(d,""):fb(d,pb(r,c)),d.length>a?ib(d,0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:$y(t,this,e,n)}:t,[function(t,n){var a=Zy(this),i=null==t?void 0:ab(t,e);return i?$y(i,t,a,n):$y(r,rb(a),t,n)},function(e,a){var i=Xy(this),s=rb(e),o=n(r,i,s,a,r!==t);if(o.done)return o.value;var d=eb(i,RegExp),u=i.unicode,c=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(ub?"g":"y"),l=new d(ub?"^(?:"+i.source+")":i,c),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===s.length)return null===sb(l,s)?[s]:[];for(var f=0,p=0,m=[];p<s.length;){l.lastIndex=ub?0:p;var g,v=sb(l,ub?pb(s,p):s);if(null===v||(g=cb(nb(l.lastIndex+(ub?p:0)),s.length))===f)p=tb(s,p,u);else{if(fb(m,pb(s,f,p)),m.length===h)return m;for(var y=1;y<=v.length-1;y++)if(fb(m,v[y]),m.length===h)return m;p=f=g}}return fb(m,pb(s,f)),m}]}),!!db((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),ub);var gb="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==gb&&gb,vb="URLSearchParams"in gb,yb="Symbol"in gb&&"iterator"in Symbol,bb="FileReader"in gb&&"Blob"in gb&&function(){try{return new Blob,!0}catch(e){return!1}}(),_b="FormData"in gb,wb="ArrayBuffer"in gb;if(wb)var Ab=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],kb=ArrayBuffer.isView||function(e){return e&&Ab.indexOf(Object.prototype.toString.call(e))>-1};function Eb(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 xb(e){return"string"!=typeof e&&(e=String(e)),e}function Rb(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return yb&&(t[Symbol.iterator]=function(){return t}),t}function Sb(e){this.map={},e instanceof Sb?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 Db(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Tb(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Ib(e){var t=new FileReader,n=Tb(t);return t.readAsArrayBuffer(e),n}function Ob(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Pb(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:bb&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:_b&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:vb&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():wb&&bb&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Ob(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):wb&&(ArrayBuffer.prototype.isPrototypeOf(e)||kb(e))?this._bodyArrayBuffer=Ob(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):vb&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},bb&&(this.blob=function(){var e=Db(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=Db(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(Ib)}),this.text=function(){var e=Db(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Tb(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)},_b&&(this.formData=function(){return this.text().then(Ub)}),this.json=function(){return this.text().then(JSON.parse)},this}Sb.prototype.append=function(e,t){e=Eb(e),t=xb(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Sb.prototype.delete=function(e){delete this.map[Eb(e)]},Sb.prototype.get=function(e){return e=Eb(e),this.has(e)?this.map[e]:null},Sb.prototype.has=function(e){return this.map.hasOwnProperty(Eb(e))},Sb.prototype.set=function(e,t){this.map[Eb(e)]=xb(t)},Sb.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Sb.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Rb(e)},Sb.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Rb(e)},Sb.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Rb(e)},yb&&(Sb.prototype[Symbol.iterator]=Sb.prototype.entries);var Cb=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Lb(e,t){if(!(this instanceof Lb))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 Lb){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Sb(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 Sb(t.headers)),this.method=function(e){var t=e.toUpperCase();return Cb.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 Ub(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 jb(e,t){if(!(this instanceof jb))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 Sb(t.headers),this.url=t.url||"",this._initBody(e)}Lb.prototype.clone=function(){return new Lb(this,{body:this._bodyInit})},Pb.call(Lb.prototype),Pb.call(jb.prototype),jb.prototype.clone=function(){return new jb(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Sb(this.headers),url:this.url})},jb.error=function(){var e=new jb(null,{status:0,statusText:""});return e.type="error",e};var Mb=[301,302,303,307,308];jb.redirect=function(e,t){if(-1===Mb.indexOf(t))throw new RangeError("Invalid status code");return new jb(null,{status:t,headers:{location:e}})};var Gb,Bb=gb.DOMException;try{new Bb}catch(e){Bb=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Bb.prototype=Object.create(Error.prototype),Bb.prototype.constructor=Bb}function Nb(e,t){return new Promise((function(n,r){var a=new Lb(e,t);if(a.signal&&a.signal.aborted)return r(new Bb("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 Sb,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 jb(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 Bb("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&gb.location.href?gb.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&&(bb?i.responseType="blob":wb&&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 Sb?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,xb(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)}))}Nb.polyfill=!0,gb.fetch||(gb.fetch=Nb,gb.Headers=Sb,gb.Request=Lb,gb.Response=jb);var qb,Fb=function(e){var t=this;if(!Gb){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:Gg.topDomain,domain:Gg.parentDomain,referrer:Gg.parentURL,depth:a.getIframeDepth(),version:Ui.version,byloader:Gg.isTokenGameURL,isTokenGameURL:Gg.isTokenGameURL,isMasterGameURL:Gg.isMasterGameURL,isExtHostedGameURL:Gg.isExtHostedGameURL,byloaderVersion:Gg.version,tracking:Bg.userDeclinedTracking,whitelabel:Bg.whitelabelPartner,platform:a.getMobilePlatform()};Gb=new a.MessageRouter(n)}return Gb||{send:function(){k.default(this,t)}.bind(this)}};var Vb,Wb,Hb=[],Kb=function(e){Hb.push(e)},zb=function(){var e=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Vb){e.next=4;break}return e.next=3,$b(Wb);case 3:Vb=e.sent;case 4:return e.abrupt("return",Vb);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$b=function(e){var t=this;qb.send("gdfw.loading",{message:"loading"}),Hb=[],Kb("1"),Kb("2");var n=new mb;Kb("3");var r=n.get("partner.domain.value");Kb("4");var i=function(){return k.default(this,t),{gameId:e.gameId,enableAds:!0,preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);Kb("5");var s=function(){k.default(this,t);var n=o(),a=n?"&mode=".concat(n):"";return"https://game.api.gamedistribution.com/game/v4/get/".concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(Ui.version,"&localTime=").concat((new Date).getHours())}.bind(this);Kb("6");var o=function(){var e=this;k.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return k.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);return Kb("7"),new Promise(function(e){var n=this;if(k.default(this,t),Vb)e(Vb);else{Kb("7.1");var r=i();try{Kb("7.2");var o=s();Kb("7.3"),fetch(o).then(function(e){return k.default(this,n),Kb("7.4"),e.json()}.bind(this)).then(function(t){var i=this;if(k.default(this,n),Kb("7.5"),t.success){var s,o,d,u,c=t.result.game;Kb("7.6");var l={gameId:c.gameMd5,slug:c.slug,pname:c.pname,dname:c.dname,status:c.status,description:c.description,enableAds:!0===c.enableAds||!0===(null===(s=c.enableAds)||void 0===s?void 0:s.enabled),preroll:c.preRoll,midroll:6e4*c.timeAds,rewardedAds:c.rewardedAds,title:c.title,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,__t4r:ji(c.__t4r)||{},block_exts:ji(c.push_cuda),bloc_gard:ji(c.bloc_gard),cookie:ji(c.cookie),gdpr:ji(c.gdpr),diagnostic:ji(c.diagnostic),cmp:ji(c.cmp),gft:ji(c.gft)||{},sdk:ji(c.sdk)||{},sdkfw:ji(c.sdkfw)||{},loader:ji(c.loader)||{},splash:ji(c.splash)||{},promo:ji(c.promo)||{},dAds:ji(c.dads)||{},pAds:ji(c.pads)||{},mAds:ji(c.mads)||{},rAds:ji(c.rads)||{},lp:ji(c.lp)||{},extsc:ji(c.extsc)||{},evnts:ji(c.evnts)||{},dp:ji(c.dp)||{},adflw:ji(c.adflw)||{}};Kb("7.7");var h=a.extendDefaults(L.default(r),l);Kb("7.8"),h.afg_disabled=!1===(null===(o=h.sdk)||void 0===o||null===(d=o.afg)||void 0===d?void 0:d.enabled),function(){k.default(this,i)}.bind(this),Kb("7.9"),null!==(u=h.pAds)&&void 0!==u&&u.enabled&&(h.preroll=!0),Kb("7.10"),qb.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=Hb[Hb.length-1];qb.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){k.default(this,n);var a=Hb[Hb.length-1];qb.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var d=Hb[Hb.length-1];qb.send("gdfw.err",{message:"".concat(d,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}}.bind(this))},Qb=function(){var e=A.default(x.default.mark((function e(){var t,n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zb();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)}}(),Yb=function(){var e=A.default(x.default.mark((function e(){var t,n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zb();case 2:return n=e.sent,e.next=5,Qb();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)}}(),Jb=function(){var e=A.default(x.default.mark((function e(){var t,n,r,a,i,s,o,d;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zb();case 2:return o=e.sent,d=!(null==o||null===(t=o.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==o||null===(n=o.extsc)||void 0===n?void 0:n.path:"",name:d?null==o||null===(r=o.extsc)||void 0===r?void 0:r.name:"",ref:d?null==o||null===(a=o.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==o||null===(i=o.extsc)||void 0===i?void 0:i.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==o||null===(s=o.extsc)||void 0===s||!s.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xb=function(){var e=A.default(x.default.mark((function e(){var t,n,r,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jb();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 k.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)}}(),Zb=!1,e_=!1,t_=function(){return new Promise(function(){var e=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Zb){e.next=4;break}return e.abrupt("return",t(e_));case 4:Zb=!0;case 5:return e.next=7,Jb();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 e_=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){k.default(this,d),s&&(s=!1,Zb=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){k.default(this,d),s&&i&&window[a]?(s=!1,Zb=!0,e_=!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)}}())},n_=function(e){var t=function(e){var t=this,n=function(e){return k.default(this,t),l("showAd",{adType:e})}.bind(this),r=function(e){return k.default(this,t),l("preloadAd",{adType:e})}.bind(this),a=function(e){return k.default(this,t),l("showDisplayAd",{options:e})}.bind(this),i=function(){return k.default(this,t),l("cancelAd")}.bind(this),s=function(){return k.default(this,t),l("openConsole")}.bind(this),o=function(){return k.default(this,t),l("showBanner")}.bind(this),d=function(){return k.default(this,t),l("session")}.bind(this),u=function(e){return k.default(this,t),l("sendGenericEvent",{options:e})}.bind(this),c=function(){k.default(this,t),console.log("_sendSDKReady")}.bind(this),l=function(e,n){var r=this;return k.default(this,t),n||(n={}),new Promise(function(t,a){k.default(this,r);try{var i={type:"gd-sdk",method:e,options:n};window.parent.postMessage(i,"https://html5.gamedistribution.com"),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),h=function(){k.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&&p(r)}),!1)}.bind(this),f=function(){k.default(this,t),h(),l("init")}.bind(this),p=function(n){k.default(this,t),e.onEvent&&e.onEvent(n)}.bind(this);return{showBanner:o,showAd:n,preloadAd:r,showDisplayAd:a,cancelAd:i,openConsole:s,getSession:d,onEvent:p,init:f,_sendSDKReady:c,sendGenericEvent:u}}(e);return t.init(),t},r_=function(){var e=this;return{isMasterGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),isTokenGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),isExtHostedGameURL:function(){k.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this)}},a_=function(e){var t=this;return new Promise(function(n,r){var a=this;k.default(this,t);var i={type:"gd-sdk-frame-handshake-request"},s=!1;window.addEventListener("message",(function(e){var t=e.data,r=e.origin,a=e.source,i=t.type;if("gd-sdk-frame-handshake-request"===i){var o={type:"gd-sdk-frame-handshake-response"};a.postMessage(o,r)}else"gd-sdk-frame-handshake-response"===i&&(s=!0,n({origin:r,source:a}))})),e?n():(setTimeout(function(){k.default(this,a),s||n()}.bind(this),200),window.parent!==window?window.parent.postMessage(i,"*"):n())}.bind(this))},i_=function(){var e=A.default(x.default.mark((function e(){var t,n,r,a,i,s,o,d;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qb();case 2:return t=e.sent,n=!t,e.next=6,a_(n);case 6:if(r=e.sent,t){e.next=9;break}return e.abrupt("return",!1);case 9:return a=r_(),i=a.isMasterGameURL,s=i(),e.next=13,Yb();case 13:return o=e.sent,d=!1,d=o?!s&&!!r:!s,e.abrupt("return",d);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),s_=Ke,o_=ee,d_=Ti,u_=ka,c_=o_(va.f),l_=o_([].push),h_=function(e){return function(t){for(var n,r=u_(t),a=d_(r),i=a.length,s=0,o=[];i>s;)n=a[s++],s_&&!c_(r,n)||l_(o,e?[n,r[n]]:r[n]);return o}},f_={entries:h_(!0),values:h_(!1)}.values;Ri({target:"Object",stat:!0},{values:function(e){return f_(e)}});var p_=Ri,m_=rh,g_=Se,v_=ye,y_=pe,b_=Ch,__=Wf,w_=He.exports;if(p_({target:"Promise",proto:!0,real:!0,forced:!!m_&&g_((function(){m_.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=b_(this,v_("Promise")),n=y_(e);return this.then(n?function(n){return __(t,e()).then((function(){return n}))}:e,n?function(n){return __(t,e()).then((function(){throw n}))}:e)}}),y_(m_)){var A_=v_("Promise").prototype.finally;m_.prototype.finally!==A_&&w_(m_.prototype,"finally",A_,{unsafe:!0})}var k_=ne,E_=Qi,x_=ee("".replace),R_="[\t\n\v\f\r \u2028\u2029\ufeff]",S_=RegExp("^"+R_+R_+"*"),D_=RegExp(R_+R_+"*$"),T_=function(e){return function(t){var n=E_(k_(t));return 1&e&&(n=x_(n,S_,"")),2&e&&(n=x_(n,D_,"")),n}},I_={start:T_(1),end:T_(2),trim:T_(3)},O_=Ln.PROPER,P_=Se,C_="\t\n\v\f\r \u2028\u2029\ufeff",L_=I_.trim;Ri({target:"String",proto:!0,forced:function(e){return P_((function(){return!!C_[e]()||"
"!=="
"[e]()||O_&&C_[e].name!==e}))}("trim")},{trim:function(){return L_(this)}});var U_=pe,j_=Qe,M_=sc,G_=Ke,B_=N,N_=ee,q_=yi,F_=function(e,t,n){var r,a;return M_&&U_(r=t.constructor)&&r!==n&&j_(a=r.prototype)&&a!==n.prototype&&M_(e,a),e},V_=$t,W_=ze.f,H_=Ca.f,K_=ut,z_=Pm,$_=Qi,Q_=Pc,Y_=Cc,J_=He.exports,X_=Se,Z_=de,ew=Dn.enforce,tw=ch,nw=Gc,rw=qc,aw=Fe("match"),iw=B_.RegExp,sw=iw.prototype,ow=B_.SyntaxError,dw=N_(Q_),uw=N_(sw.exec),cw=N_("".charAt),lw=N_("".replace),hw=N_("".indexOf),fw=N_("".slice),pw=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,mw=/a/g,gw=/a/g,vw=new iw(mw)!==mw,yw=Y_.UNSUPPORTED_Y,bw=G_&&(!vw||yw||nw||rw||X_((function(){return gw[aw]=!1,iw(mw)!=mw||iw(gw)==gw||"/a/i"!=iw(mw,"i")})));if(q_("RegExp",bw)){for(var _w=function(e,t){var n,r,a,i,s,o,d=K_(sw,this),u=z_(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===_w)return e;if((u||K_(sw,e))&&(e=e.source,c&&(t="flags"in h?h.flags:dw(h))),e=void 0===e?"":$_(e),t=void 0===t?"":$_(t),h=e,nw&&"dotAll"in mw&&(r=!!t&&hw(t,"s")>-1)&&(t=lw(t,/s/g,"")),n=t,yw&&"sticky"in mw&&(a=!!t&&hw(t,"y")>-1)&&(t=lw(t,/y/g,"")),rw&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,d=!1,u=0,c="";r<=n;r++){if("\\"===(t=cw(e,r)))t+=cw(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:uw(pw,fw(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||Z_(s,c))throw new ow("Invalid capture group name");s[c]=!0,i[i.length]=[c,u],d=!1,c="";continue}d?c+=t:a+=t}return[a,i]}(e),e=i[0],l=i[1]),s=F_(iw(e,t),d?this:sw,_w),(r||a||l.length)&&(o=ew(s),r&&(o.dotAll=!0,o.raw=_w(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=cw(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+cw(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{V_(s,"source",""===h?"(?:)":h)}catch(e){}return s},ww=function(e){e in _w||W_(_w,e,{configurable:!0,get:function(){return iw[e]},set:function(t){iw[e]=t}})},Aw=H_(iw),kw=0;Aw.length>kw;)ww(Aw[kw++]);sw.constructor=_w,_w.prototype=sw,J_(B_,"RegExp",_w)}tw("RegExp");var Ew=Ri,xw=ia.find,Rw=Cl,Sw=!0;"find"in[]&&Array(1).find((function(){Sw=!1})),Ew({target:"Array",proto:!0,forced:Sw},{find:function(e){return xw(this,e,arguments.length>1?arguments[1]:void 0)}}),Rw("find");var Dw=Ri,Tw=_r,Iw=ka,Ow=oa,Pw=ee([].join),Cw=Tw!=Object,Lw=Ow("join",",");Dw({target:"Array",proto:!0,forced:Cw||!Lw},{join:function(e){return Pw(Iw(this),void 0===e?",":e)}});var Uw=ia.map;Ri({target:"Array",proto:!0,forced:!Zo("map")},{map:function(e){return Uw(this,e,arguments.length>1?arguments[1]:void 0)}});var jw=Ke,Mw=ee,Gw=dt,Bw=Se,Nw=Ti,qw=Xa,Fw=va,Vw=ie,Ww=_r,Hw=Object.assign,Kw=Object.defineProperty,zw=Mw([].concat),$w=!Hw||Bw((function(){if(jw&&1!==Hw({b:1},Hw(Kw({},"a",{enumerable:!0,get:function(){Kw(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!=Hw({},e)[n]||Nw(Hw({},t)).join("")!=r}))?function(e,t){for(var n=Vw(e),r=arguments.length,a=1,i=qw.f,s=Fw.f;r>a;)for(var o,d=Ww(arguments[a++]),u=i?zw(Nw(d),i(d)):Nw(d),c=u.length,l=0;c>l;)o=u[l++],jw&&!Gw(s,d,o)||(n[o]=d[o]);return n}:Hw,Qw=$w;Ri({target:"Object",stat:!0,forced:Object.assign!==Qw},{assign:Qw});var Yw=function(){function e(t){R.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return D.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 T.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 k.default(this,e),this.customParamKeys.some(function(e){return k.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}(),Jw=function(){function e(t,n){R.default(this,e),this.adContainer=t,this.onResume=n}return D.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(){k.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}(),Xw=function(e){if(!e)return!1;var t=Zw.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)},Zw=Object.prototype.toString;function eA(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 tA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eA(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nA(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():'<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>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}function rA(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 aA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rA(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var iA=new b.EventEmitter,sA=null,oA=function(){function e(t,n,r){var i=this;if(R.default(this,e),sA)return sA;sA=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.clickCount={midroll:0,preroll:0,rewarded:0},this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==t?document.getElementById(t):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:d,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){k.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){k.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,i,s,o,d,c,l,h,f,p,m,v,y,b,_,w,E,I,O,P;return D.default(e,[{key:"start",value:(P=A.default(x.default.mark((function e(){var t,n,r,a=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.adSystemInitialize(A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_afg_script({adsense_channel:"4089988593"});case 2:case"end":return e.stop()}}),e)}))));case 3:return t=e.sent,this.afgInitSuccess=t.success,e.next=7,this.adSystemInitialize(A.default(x.default.mark((function e(){return x.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){k.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),Bi("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 P.apply(this,arguments)})},{key:"adSystemInitialize",value:(O=A.default(x.default.mark((function e(t){var n;return x.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 O.apply(this,arguments)})},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(i){var s,o,d,u,c,l,h,f,p=this;return x.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"))){r.next=6;break}return s=n.IMASampleTags[e],o=Math.floor(Math.random()*s.length),d=s[o],i({url:d}),r.abrupt("return");case 6:if(void 0!==window.idhb.requestAds){r.next=8;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 8:return r.prev=8,u=n.nextAdPosition(e),console.log("GD-SDK Position",u),n._broadcast("AD_REQUEST",{message:u}),c=n.options,"preroll"===u&&g.isPlainObject(c.preroll)?c=c.preroll:"midroll"===u&&g.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===u&&g.isPlainObject(c.rewarded)&&(c=c.rewarded),l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1",r.next=17,window.idhb.isLoaded();case 17:if(h={tnl_keys:aA(aA({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId})},!(t&&t.retry_on_success&&g.isPlainObject(c.retry_on_success)&&g.isPlainObject(c.retry_on_success.vast))){r.next=22;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_success.vast,h)));case 22:if(!(t&&t.retry_on_failure&&n.options.retry_on_failure&&g.isPlainObject(c.retry_on_failure.vast))){r.next=26;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_failure.vast,h)));case 26:if(!g.isPlainObject(c.vast)){r.next=28;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.vast,h)));case 28:return r.next=30,n._create_dp_context(u,t);case 30:f=r.sent,Gi("gd-adflow, before idhb",u,l),window.idhb.requestAds({slots:S.default({},l,{bidFloor:null!=f&&f.floor_price?f.floor_price:void 0}),callback:function(e,t){var r=this;k.default(this,p),console.log("GD-SDK After HB..."),!f||null!=t&&t.bidFloorApplied||fetch(f.skip_url).catch(function(e){k.default(this,r)}.bind(this)),i({tnl_keys:aA(aA({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId}),url:e,dp:f,hl:t})}.bind(this)}),r.next=38;break;case 35:throw r.prev=35,r.t0=r.catch(8),new Error(r.t0);case 38:case"end":return r.stop()}}),r,this,[[8,35]])})));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:"_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(k.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var i,s=null==e||null===(i=e.tnl_keys)||void 0===i?void 0:i.tnl_ad_pos;this.adSuccess=!1;var o=new google.ima.AdsRequest,d=this._transformVast(e,t),u=aA(aA({},t),{},{adTag:d,tnl_ad_pos:s});this.adCounter[s]=this.adCounter[s]||0,this.adCounter[s]++;var c=e.dp,l=e.hl;c&&(c.adtag_url=d.url,this._extend_dp_with_adsense(c,l,null==e?void 0:e.tnl_keys));var h=this._isVMAP(s);if(function(){k.default(this,a),t.shouldFail&&(c?(c.adtag_url="dp_original_broken",c.fallback_url="dp_fallback_broken"):d.url="original_broken",null==c||c.adtag_url,null==c||c.fallback_url,d.url),h=!1}.bind(this),h){var f=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new T.default(e.adtag_url_1,!0);i.query=tA(tA({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new T.default(e.adtag_url_2,!0);o.query=tA(tA({},o.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++a,output:"xml_vast3"});var d=o.toString(),u=Date.now();return'<?xml version="1.0" encoding="UTF-8"?>\n<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-1">\n <vmap:AdSource id="'.concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(nA({id:u++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(nA({id:u++,adtag_url:d,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:c,adtag:d,position:"preroll"===u.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(s)}));o.adsResponse=f}else if(c&&l.bidFloorApplied){var p=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()}(c);o.adsResponse=p}else if(c&&c.fallback_url){var m=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()}(c);o.adsResponse=m}else o.adTagUrl=d.url;o.linearAdSlotWidth=this.options.width,o.linearAdSlotHeight=this.options.height,o.nonLinearAdSlotWidth=this.options.width,o.nonLinearAdSlotHeight=this.options.height,o.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(o.vastLoadTimeout=this.options.vast_load_timeout),o.setAdWillAutoPlay(t.autoplayAllowed),o.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(o,u);try{this._broadcast("AD_SDK_REQUEST",{message:u})}catch(e){}r(o)}catch(e){throw new Error(e)}}.bind(this))}},{key:"cancel",value:function(){if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var e="AD_SDK_CANCELED";this._broadcast(e,{name:e,message:"Advertisement has been canceled.",status:"warning",analytics:{category:this.eventCategory,action:e,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(I=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;k.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):U.default.video({inline:!0,muted:!1}).then(function(t){k.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 I.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(E=A.default(x.default.mark((function e(){var t;return x.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 E.apply(this,arguments)})},{key:"startAd",value:(w=A.default(x.default.mark((function e(t){var n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.adType,r=t.params,this.adType_=n,this.adContext=aA({},r),"promo"!==(null==r?void 0:r.adapter)){e.next=5;break}return e.abrupt("return",this._startPromo(r,n));case 5:if("adsense"!==(null==r?void 0:r.adapter)){e.next=26;break}if(n!==a.AdType.Interstitial){e.next=19;break}if("preroll"!==(null==r?void 0:r.position)){e.next=11;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 11:if("start"!==(null==r?void 0:r.position)){e.next=15;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 15:if("next"!==(null==r?void 0:r.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 17:e.next=24;break;case 19:if(n!==a.AdType.Rewarded){e.next=23;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 23:case 34:throw new Error("Unsupported ad type");case 24:e.next=35;break;case 26:if(n!==a.AdType.Interstitial){e.next=30;break}return e.abrupt("return",this._startInterstitialAd(r));case 30:if(n!==a.AdType.Rewarded){e.next=34;break}return e.abrupt("return",this._startRewardedAd(r));case 35:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"preloadAd",value:(_=A.default(x.default.mark((function e(t){return x.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 _.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,t=function(){k.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new Jw(this.adContainer,t),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(b=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o,d,u,c,l,h,f,p,m=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(o=t?t.containerId:null)||i("Container id is not specified"),d=document.getElementById(o),document.getElementById(o)||i("No container is found with this id - ".concat(o)),void 0===window.idhb.requestAds&&i("Prebid.js wrapper script hit an error or didn't exist!"),u=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(u)||(c="\n .gd__banner{\n z-index: ".concat(a.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=c:l.appendChild(document.createTextNode(c)),d.appendChild(l)),(h=document.createElement("div")).id=u,h.classList.add("gd__banner"),d.appendChild(h)),e.next=10,n._create_dp_display_context();case 10:n.atom_display=e.sent,null!==(s=n.atom_display)&&void 0!==s&&s.params&&window.idhb.setAdserverTargeting(null===(f=n.atom_display)||void 0===f?void 0:f.params),(p={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:p,callback:function(e){k.default(this,m)}.bind(this)}),r(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),i(e.t0.message||e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)})},{key:"_startInterstitialAd",value:(y=A.default(x.default.mark((function e(t){var n,r=this;return x.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(){k.default(this,r)}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return n=e.sent,e.next=13,this._loadInterstitialAd(aA(aA({},n),t));case 13:if(e.sent.success){e.next=18;break}return e.abrupt("return");case 18:n.autoplayRequiresMute&&this.adsManager.setVolume(0),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 y.apply(this,arguments)})},{key:"_startPromo",value:(v=A.default(x.default.mark((function e(t,n){var r;return x.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 r=e.sent,e.next=11,this._loadPromo(aA(aA({},r),t),n);case 11:if(e.sent.success){e.next=16;break}return e.abrupt("return");case 16:r.autoplayRequiresMute&&this.adsManager.setVolume(0),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 v.apply(this,arguments)})},{key:"_loadPromo",value:(m=A.default(x.default.mark((function e(t,n){var r,i;return x.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,aA({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 m.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(p=A.default(x.default.mark((function e(t){var n;return x.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:return n=e.t0,delete this.preloadedInterstitialAdVast,e.next=11,this._requestAd(n,aA({adType:a.AdType.Interstitial},t));case 11:return 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 p.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(t,n){var r=this;k.default(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var i=function(e){var n=this;k.default(this,r),setTimeout(function(){k.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!0,args:e})}.bind(this),1)}.bind(this),s=function(e){var n=this;k.default(this,r),setTimeout(function(){k.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:(f=A.default(x.default.mark((function e(t){var n,r=this;return x.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(){k.default(this,r)}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return n=e.sent,e.next=13,this._loadRewardedAd(aA(aA({},n),t));case 13:if(e.sent.success){e.next=18;break}return e.abrupt("return");case 18:n.autoplayRequiresMute&&this.adsManager.setVolume(0),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 f.apply(this,arguments)})},{key:"_loadRewardedAd",value:(h=A.default(x.default.mark((function e(t){var n;return x.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,aA({adType:a.AdType.Rewarded},t));case 11:return 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 h.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(l=A.default(x.default.mark((function e(){return x.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 l.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(c=A.default(x.default.mark((function e(){return x.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 c.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(),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.activeAdContainer.style.visibility="visible";var n=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var r=this._isT4R(e),a=this._getT4ROptions(e);if("loaded"===n)this.activeAdContainer.style.opacity=r?.001:1,r&&this.adsManager.setVolume(0),r&&this._broadcast("AD_T4R"),r&&setTimeout(function(){k.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210));else if("click"===n||"first_quartile"===n){if(r&&"click"===n){var i,s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos;this.clickCount[s]++}this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(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.addAdResume(),this.activeAdContainer.style.visibility="hidden";var i=function(){k.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(){k.default(this,t),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t,n=this,r=new Date,i=r.getHours(),s=r.getDate(),o=r.getMonth(),d=r.getFullYear(),u=a.getKeyByValue(google.ima.AdEvent.Type,e.type),c=!1,l=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",h=!l.startsWith("image")&&!l.startsWith("text");this._sendIMAEventsToHB(e);var f="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:f="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:f="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:c=!0,f="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:f="Fired when the ad is clicked.";var p=e.getAd().getContentType();this._show({mode:"click",contentType:p});break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),c=this._is_completed(e.getAd()),f="Fired when the ad completes playing.",this.adType_===a.AdType.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:f="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:f="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",c=!0,this._hideAddResume();break;case google.ima.AdEvent.Type.DURATION_CHANGE:f="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:f="Fired when the ad playhead crosses first quartile.";var m=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:m});break;case google.ima.AdEvent.Type.IMPRESSION:f="Fired when the impression URL has been pinged.";break;case google.ima.AdEvent.Type.INTERACTION:f="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:f="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var g=e.getAd().getContentType();f=g,this._show({mode:"loaded",contentType:g});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(f=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:f="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:h&&this.adResume.show(),f="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:f="Fired when the ad is resumed.",h&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:f="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:c=this._is_completed(e.getAd()),f="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:this._hideAddResume(),f="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:f="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:c=this._is_completed(e.getAd()),f="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:f="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:f="Fired when the ad volume has been muted."}if(""!==u&&""!==f&&this._broadcast(u,{name:u,message:f,status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(i," d").concat(s," m").concat(o," y").concat(d)}}),c&&!this.adSuccess){this.adSuccess=!0;var v=e.getAd(),y="Rainbow"===(null==v?void 0:v.getAdSystem())&&(null==v?void 0:v.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this)));null==v||v.getAdSystem(),null==v||v.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:y}),this.resetForNext(e)}}},{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);iA.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,label:r}}),this._hideAddResume()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.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(){k.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(Xw(e.getInnerError)){var t=e.getInnerError();if(t)return Xw(t.getErrorCode)&&Xw(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(k.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];g.isPlainObject(i)&&(r.query[a]=j.default.stringify(i))}var s=new T.default(r.url,!0);return M.default(s.query,r.query||{}),aA({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new T.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new T.default(e.url,!0);if(i.query.cust_params){var s=j.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&&g.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&&g.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=L.default(a),g.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=j.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in o){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete o[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(t){return k.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,M.default(i,u),i.cust_params=j.default.stringify(i.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,a,i=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[i]>=(null===(n=e.t4r[i])||void 0===n?void 0:n.count))return!1;if(null!=e&&null!==(r=e.contentType)&&void 0!==r&&r.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return i&&(null===(a=e.t4r[i])||void 0===a?void 0:a.enabled);if(null!=e&&e.contentType.startsWith("video/")){var s,o=(null===(s=e.t4r[i])||void 0===s?void 0:s.viper)||0;if(o>0){var d,u=Math.random()<o;return i&&u&&(null===(d=e.t4r[i])||void 0===d?void 0:d.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;if(!e)return!1;var 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===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(f=this.gameData)||void 0===f||null===(p=f.rAds)||void 0===p||null===(m=p.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),y=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?y>=(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){var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,s=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,o=null!=r&&r.vast_1?void 0:a,d=null!=r&&r.vast_2?void 0:a;return{adtag_url_1:null==i?void 0:i.url,adtag_url_2:null==s?void 0:s.url,position:n,dp_1:o,dp_2:d}}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(t){var n=this;k.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new Yw(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(u.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return k.default(this,n),e.json()}.bind(this)).then(function(e){if(k.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();this.msgrt.send("dp.fp",{message:e.p/100}),t({params:{fp:e.p/100},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){k.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 k.default(this,n),"".concat(e,"=").concat(encodeURIComponent(r[e]))}.bind(this)).join("&");encodeURIComponent(u.Base64.encode(JSON.stringify(r)));var i=null===(t=this.gameData.promo)||void 0===t?void 0:t.rainbow,s=null==i?void 0:i.enabled,o="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a);console.log("gd-adflow openPromoUrl",o);var d=s?o:void 0;return function(){k.default(this,n)}.bind(this),{promo_url:d,promo_imp_blue_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(a){var i,s,o,d,c,l,h=this;return x.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 Yw(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(u.Base64.encode(JSON.stringify(s))),null==t||t.adapterIndex,null==t||t.isLastAdapter,c=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,l=(null==c?void 0:c.enabled)&&(null==t?void 0:t.isLastAdapter)&&"rewarded"===e,null==c||c.enabled,null==t||t.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return k.default(this,h),e.json()}.bind(this)).then(function(e){if(k.default(this,h),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(d):void 0,promo_imp_blue_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){k.default(this,h),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 T.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=j.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=j.default.stringify(a,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_init_hl_script",value:(d=A.default(x.default.mark((function e(t){var n,r,i,s,o,d,u=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._getPrebidScripts(),r=n[0],i=function(){return k.default(this,u),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:i},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"}),window.idhb.que=window.idhb.que||[],e.next=9,a.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,u),window.idhb.requestAds}.bind(this)});case 9:s=a.getQueryString("ch",window.location.href),o=a.getQueryString("ch_date",window.location.href),d={tnl_content_category:this.category.toLowerCase()},s&&(d.channel=s),o&&(d.ch_date=o),window.idhb.setAdserverTargeting(d),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;k.default(this,u);try{var n,r=e.slotId.split("@");r=1===r.length?r[0]:r[1],e.isEmpty?(null!==(n=this.atom_display)&&void 0!==n&&n.error_url&&(fetch(this.atom_display.error_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_ERROR",{message:r,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_IMPRESSION",{message:r,status:"success"}))}catch(e){}}.bind(this));case 17:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"_init_ima_script",value:(o=A.default(x.default.mark((function e(t){var n,r,i=this;return x.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 k.default(this,i),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_init_afg_script",value:(s=A.default(x.default.mark((function e(t){var n,r,i,s,o=this;return x.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(s={}).crossorigin="anonymous",s["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",s["data-ad-frequency-hint"]="30s",s.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(s["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(s["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(s["data-adbreak-test"]="on"),e.next=14,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return k.default(this,o),!!window.adsbygoogle}.bind(this),attrs:s});case 14:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(i=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,d),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=function(){k.default(this,d),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,d),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(){k.default(this,d),this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),i=function(){k.default(this,d),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),s=function(e){k.default(this,d),e()}.bind(this),o=function(e){k.default(this,d),this.resetForNext(),this.adCounter.rewarded=this.adCounter.rewarded||0,this.adCounter.rewarded++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),u={type:"reward",name:"reward-in-game",beforeAd:n,afterAd:r,adDismissed:a,adViewed:i,beforeReward:s,adBreakDone:o},window.adsbygoogle.push(u),e.next=24;break;case 20:throw e.prev=20,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 24:case"end":return e.stop()}var u}),e,this,[[1,20]])}))),function(e){return i.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(r=A.default(x.default.mark((function e(t){var n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,r),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"),n=function(e){k.default(this,r),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"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),a={type:"preroll",adBreakDone:n},window.adsbygoogle.push(a),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}var a}),e,this,[[1,15]])}))),function(e){return r.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(n=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,i),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(){k.default(this,i),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"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),s={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var s}),e,this,[[1,17]])}))),function(e){return n.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,i),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(){k.default(this,i),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.midroll=this.adCounter.midroll||0,this.adCounter.midroll++,"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),s={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var s}),e,this,[[1,17]])}))),function(e){return t.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}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){this._send(e,{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})}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;return this.adCounter.preroll=this.adCounter.preroll||0,0===this.adCounter.preroll}},{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")}e.params.position=t}},{key:"_broadcast",value:function(e,t){var n=this,r=!1;["AD_ERROR"].some(function(t){return k.default(this,n),t===e}.bind(this))&&(r=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail,console.log("gd-adflow skipForward",e,r,this.adContext.adapterIndex,this.adContext.isLastAdapter,this.adContext.extraPromoRunOnFail)),this.eventBus.broadcast(e,aA(aA({},t),{},{skipForward:r}))}}]),e}(),dA=function e(t){var n=this;R.default(this,e),S.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sm(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),S.default(this,"promo",A.default(x.default.mark((function e(){return x.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.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},xm(this.moduleName,this.moduleConfig)},uA=function e(t){var n=this;R.default(this,e),S.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sm(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),S.default(this,"splash",A.default(x.default.mark((function e(){return x.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.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},xm(this.moduleName,this.moduleConfig)},cA=function(e,t){console.log(e,t)},lA={},hA={},fA=null;function pA(){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 lA.version=r,lA.frame=e,lA.function=n,lA.version}function mA(e){var t=this;return fA||(fA=new Promise(function(n){function r(t,r){if(cA("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:lA,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}k.default(this,t),pA(),lA.frame?2===lA.version?(cA("TCF v2 CMP found. Fetching the consent."),lA.function?(cA("CMP API is directly accessible, calling it now..."),lA.function("addEventListener",lA.version,r)):(cA("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!==hA[r.callId]&&hA[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){k.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=S.default({},d,{command:e,parameter:s,callId:o,version:n});hA[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,lA.version,n)}("addEventListener",lA.frame,r))):n({result:"cmpVersionNotV2",cmp:lA}):n({result:"cmpNotFound"})}.bind(this)),fA)}var gA=new(function(){function e(){R.default(this,e),this.productName="Game Distribution"}var t;return D.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=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,d;return x.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(a=null==t||null===(r=t.visitor)||void 0===r?void 0:r.visitorId){e.next=6;break}return e.abrupt("return");case 6:return i=encodeURIComponent(this.productName),s=encodeURIComponent(a),e.prev=8,o="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(s),e.next=12,fetch(o,{method:"POST"});case 12: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(i,"/user_id/").concat(s),e.next=22,fetch(d,{method:"POST"});case 22: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 vA(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 yA(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 yA(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 yA(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 bA=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;k.default(this,t);try{var d=document.createElement("script");if(d.async=null==i||i,d.type="text/javascript",d.onload=function(){k.default(this,o),e()}.bind(this),d.onerror=function(){k.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),d.src=n,r){var u,c=vA(r);try{for(c.s();!(u=c.n()).done;){var l=u.value,h=l.key,f=l.value;d.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},_A=function(){var e=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,bA({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,bA({src:"https://cookie-cdn.cookiepro.com/consent/".concat("140feb72-7952-4420-8ae5-e8978d87bc17","/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,bA({src:"https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:"140feb72-7952-4420-8ae5-e8978d87bc17"}],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)}}(),wA=new b.EventEmitter,AA={"https://games.softgames.com":{"splash-hidden":"splash-hidden"}};function kA(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(AA).some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)&&(window.parent&&!n.type.startsWith("gd-sdk")&&window.parent.postMessage(n,"*"),a)){var i=AA[r][a];i&&wA.emit(i,n)}}),!1);var EA=_.v4(),xA=function(e){var t=this;if(!window.__msgr){var n=document.createElement("iframe");if(n.src="https://static.gamedistribution.com/message/index.html",n.style.display="none",n.name="__msgr",document.body.appendChild(n),window!==window.top){var r={gameId:e.gameId,target:e.evnts.domain,token:EA,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){DA(r)},setInterval(function(){k.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",DA(r)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){k.default(this,t);try{var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kA(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=EA,DA(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},RA=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=SA(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},SA=function e(t){try{var n,r,a=null==t?void 0:t.parent;if("game"===(null===(n=a.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return a;e(a)}catch(e){return t}},DA=function(e){window.__msgr.postMessage(e,"https://static.gamedistribution.com")};function TA(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 IA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TA(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function OA(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 PA(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 PA(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 PA(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 CA,LA=function(){function e(t){var n=this;R.default(this,e),S.default(this,"_getAdTypeByAfgPosition",function(e){var t=this;k.default(this,n);var r={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(r).find(function(n){var a=this;return k.default(this,t),r[n].some(function(t){return k.default(this,a),t===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),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._onResumeGame=t.onResumeGame.bind(t),this._setAdRequestTimer=t._setAdRequestTimer.bind(t),this._giveGift=t._giveGift.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)}var t,n,r;return D.default(e,[{key:"runAdFlow",value:(r=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,g,v,y,b,_,w,A,E,R,S,D,T,I,O,P,C,L,U,j,M,G,B=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=this._getAdTypeByAfgPosition(t),t.params.position,o=this._getAdFlow(s),d=this._gameData,u=d.afg_disabled,c=null===(n=d.promo)||void 0===n||null===(r=n.rainbow)||void 0===r?void 0:r.enabled,l=null===(a=d.promo)||void 0===a?void 0:a.onadsense,h="reward"===(null===(i=t.params)||void 0===i?void 0:i.position),f=u?o.filter(function(e){return k.default(this,B),"adsense"!==e}.bind(this)):o,p=this.get_ad_system_init_result(),m=p.afg,g=p.ima,this.adsBlocked=!m&&!g,this.adsBlocked?(Gi("gd-adflow adsBlocked so changing the flow"),f=[f[0]]):(m||(f=f.filter(function(e){return k.default(this,B),"adsense"!==e}.bind(this))),g||(f=f.filter(function(e){return k.default(this,B),"ima"!==e}.bind(this)))),v=!1,y=!1,b=[],_=0,w=!1,A=OA(f),e.prev=21,A.s();case 23:if((E=A.n()).done){e.next=59;break}if(R=E.value,t.params.adapter=R,S=_===f.length-1,"tag"!==R){e.next=36;break}return e.next=30,this._createTagDiv("gdsdk__advertisement");case 30:D=e.sent,(T=D.success)||_++,v=T,e.next=57;break;case 36:return c&&S&&"ima"===R&&(t.params.runPromoAsImaFallback=!0),I=S&&"adsense"===R&&c&&l&&h,t.params=IA(IA({},t.params),{},{adapterIndex:_,isLastAdapter:S,shouldFail:!1,extraPromoRunOnFail:I}),function(){k.default(this,B)}.bind(this),Gi("gd-adflow, before adInvoke",_,R,t.params.shouldFail),e.next=43,this.adInvoke(t);case 43:if(O=e.sent,P=O.success,C=O.args,!P){e.next=53;break}return Gi("gd-adflow, adapter-result-success",_,R,C),v=!0,y=!(null==C||!C.isPromoSuccess),e.abrupt("break",59);case 53:Gi("gd-adflow, adapter-result-failure",_,R,C.message),_++,b.push(C.message),S&&"adsense"===R&&c&&l&&h&&(w=!0);case 57:e.next=23;break;case 59:e.next=64;break;case 61:e.prev=61,e.t0=e.catch(21),A.e(e.t0);case 64:return e.prev=64,A.f(),e.finish(64);case 67:if(!w){e.next=76;break}return t.params.adapter="promo",e.next=72,this.adInvoke(t);case 72:e.sent.success&&(y=!0);case 76:(function(){k.default(this,B)}).bind(this),L=b.join(" /n"),v?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift()):(this._onResumeGame(L,"warning"),this._giveGift()),U="-1",j="none",v&&y?U="promo_ima":v?(U="index_".concat(_),j=f[_]):y&&(U="promo_adsense"),M=this.get_session_id(),this.adsBlocked&&"-1"===U?(G="rewarded"===s?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[G]=this.blockedAdsMap[G]?this.blockedAdsMap[G]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(G)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:G,sessionId:M,successAdapter:"none",adFlowIndex:U})):(this._msgrt.send("adflow.all.index",{message:"".concat(U)}),this._msgrt.send("adflow.all.success_adapter",{message:"".concat(j)}),this._msgrt.send("adflow.".concat(s,".index"),{message:"".concat(U)}),this._msgrt.send("adflow.".concat(s,".success_adapter"),{message:"".concat(j)}),this.send_atom_event("gd.adflow",{adFlowIndex:U,successAdapter:j,adBlocker:!1,afgBlocked:!m,imaBlocked:!g,adType:s,sessionId:M}));case 86:case"end":return e.stop()}}),e,this,[[21,61,64,67]])}))),function(e){return r.apply(this,arguments)})},{key:"adInvoke",value:(n=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,a){var i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="main.showad.".concat(t.params.adapter,".").concat(t.params.adapterIndex),s=function(e){k.default(this,d),n._eventBus.unsubscribeScope(i),r({success:!1,args:e})}.bind(this),o=function(e){k.default(this,d),n._eventBus.unsubscribeScope(i),r({success:!0,args:e})}.bind(this),n._eventBus.subscribe("AD_ERROR",s,i),n._eventBus.subscribe("AD_SDK_CANCELED",s,i),n._eventBus.subscribe("AD_SUCCESS",o,i),e.prev=6,e.next=9,n._adInstance.startAd(t);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),Bi("gd-adflow startAd error",e.t0),r({success:!1,err:e.t0});case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var t,n,r,a,i,s,o,d,u=this,c=void function(){k.default(this,u)}.bind(this),l=this._gameData.adflw;c&&(l=c);var h=null!==(t=l)&&void 0!==t&&null!==(n=t.adapters)&&void 0!==n&&n.default?null===(r=l)||void 0===r||null===(a=r.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return h=null!==(i=l)&&void 0!==i&&null!==(s=i.adapters)&&void 0!==s&&s[e]?null===(o=l)||void 0===o||null===(d=o.adapters)||void 0===d?void 0:d[e]:h}},{key:"_createTagDiv",value:(t=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,a){var i,s,o;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{console.log("gd-sdk, script creation started..."),i=document.getElementById(t),s=document.createElement("div"),o=document.createElement("script"),s.id="snack_div",o.setAttribute("src","https://tag.winister.app/v1/snack"),o.setAttribute("data-tag-id","KD7Z"),o.setAttribute("callback-fn","() => { console.log('gd-sdk, callback successfull');window.responseFunc();}"),o.setAttribute("callback-status","(status) => { console.log('gd-sdk, callback successfull',status)}"),o.setAttribute("data-content-type","game"),o.setAttribute("data-fit","v"),o.setAttribute("page-url",n._parentURL),s.style.width="100%",s.style.height="100%",s.appendChild(o),i.appendChild(s),console.log("gd-sdk, script creation completed..."),i.style.visibility="visible",window.responseFunc=function(){i.style.visibility="hidden",i.removeChild(document.getElementById("snack_div")),r({success:!0})}}catch(e){console.log("tag.error",e.message),container.style.visibility="hidden"}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(e){return t.apply(this,arguments)})}]),e}(),UA=new b.EventEmitter,jA=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp"];function MA(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 GA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MA(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=e.source;if(jA.some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system,s=n.action,o="aeriaExternalHostsConnector"===i&&"resultBoxClosed"===s;if("Softgames"===i&&"score"===s)CA=a,(window.parent||window).postMessage(n,"*"),UA.emit("aeria-event",n);else o&&CA&&CA.postMessage(n,"*")}}),!1);var BA,NA=_.v4(),qA=null,FA=null,VA=function(){function e(t){var n=this;if(R.default(this,e),qA)return qA;qA=this,this.blockedAdsMap={},this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new mb,this._location.print(),this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._giftCount=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){k.default(this,n),this._sdk_ready=!0}.bind(this)).catch(function(e){k.default(this,n),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t;k.default(this,n),!0===(null===(e=this._gameData.lp)||void 0===e?void 0:e.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(t=this._gameData.evnts)&&void 0!==t&&t.enabled&&this._isLoaderGameURL()&&xA(this._gameData)}.bind(this)),this._registerSGBridge(),this._whichFrame()}var t,n,r,i,s,o,d,c,l,h,f,p;return D.default(e,[{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(k.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:"_loadCMP",value:(p=A.default(x.default.mark((function e(){var t,n,r,a;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=6;break}if(r=new mb,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||"html5.gamedistribution.com"!==this._topDomain){e.next=6;break}return e.next=6,_A();case 6:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"testConsent",value:function(){try{pA();A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mA({});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;wA.on("splash-hidden",function(t){k.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(){if(!this._isLoaded&&(this._isLoaded=!0,"loader-frame"===this._whichFrame()))try{this._whichFrame(),this._sendTunnlEvent(1),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._bridge.isCoreSDKMode&&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||!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker()}},{key:"_initializeSDKWithGameData",value:(f=A.default(x.default.mark((function e(t,n){var r,a=this;return x.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:this._bridge.isCoreSDKMode=!(!0===this._gameData.enableAds||!0===(null===(r=this._gameData.enableAds)||void 0===r?void 0:r.enabled)),this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==this._gameData.diagnostic.close_ads&&!1!==this._gameData.diagnostic.close_ads||(this.videoAdReady=this._initializeVideoAd().then(function(){k.default(this,a),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"}))}.bind(this)).catch(function(e){k.default(this,a);var t="".concat(e).startsWith("Error: Blocked:");Gi("gd-adflow adsBlocked",t,e);var n=this.get_ad_system_init_result(),r=n.ima,i=n.afg;if(this.adsBlocked=!r&&!i,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var s=r||i?r?i?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(s)})}console.error(e.message||e)}.bind(this))),t(this._gameData),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),n(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return f.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:"_extendDefaultOptions",value:function(e,t){var n=L.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=Ui.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:"_sendTunnlEvent",value:function(e){var t=this;void 0===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://ana.headerlift.com/event?".concat(j.default.stringify(n))).catch(function(e){k.default(this,t)}.bind(this))}},{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:"_checkConsole",value:function(){try{if(!a.Ls.available)return;"developer.gamedistribution.com"===this._parentDomain?(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0),a.Ls.set("gd_tag",!0)):"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:Ui.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=["https://cdn.gamedock.io/gamedock-web-tracker/4.4.0/script/gamedock-sdk.min.js"];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;k.default(this,e),FA=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&FA.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"}),gA.track(FA,this._gameData)}.bind(this)).catch(function(t){k.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=FA)||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"];a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadGoogleAnalytics",value:function(){var e=this,t=["https://www.google-analytics.com/analytics.js"];a.getScript(t[0],"gdsdk_google_analytics",{alternates:t,error_prefix:"Blocked:",exists:function(){return k.default(this,e),window.ga}.bind(this)}).then(function(){k.default(this,e),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new a.EventBus,a.SDKEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(k.default(this,e),"developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasapi/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var t=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(t,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(t,"*")}catch(e){}}}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return k.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;k.default(this,e),this.msgrt.send("ad.impression"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&gA.track(FA,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){k.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){k.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){if(k.default(this,e),t.message.startsWith("Blocked:")){if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:t.message}),!this._hasBlocker)){this._hasBlocker=!0;var n=Math.random()<.25;this.msgrt.send("adblck.src",{message:t.message}),n&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){k.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){k.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 k.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,enableAds:!0,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;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Ui.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(h=A.default(x.default.mark((function e(){var t,n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this._gameData,t=void 0===this._gameData.dmain||this._gameData.dmain,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&(this.msgrt.send("blocked"),setTimeout(function(){k.default(this,r),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(j.default.stringify({domain:this._parentDomain,id:n.gameId,img:this._get_game_thumbnail_url(),title:n.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"_checkGameDeleted",value:function(){var e=this;6===this._gameData.status&&(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(){k.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;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;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,a=this._gameData,i=a.gdpr&&!0===a.gdpr.consent,s=a.loader,o=null===(e=a.promo)||void 0===e?void 0:e[null===(t=a.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(a,i):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||i?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):!1!==s.enabled&&this._createSplash(a,i):null!=o&&o.enabled&&this._createPromo(a,i))}},{key:"_initializeVideoAd",value:(l=A.default(x.default.mark((function e(){var t;return x.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 oA(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=Ui,this.adInstance._send("gd.location",this._location.get()),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return l.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:"_onEvent",value:function(e){a.dankLog(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(c=A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zb();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 c.apply(this,arguments)})},{key:"_createSplash",value:(d=A.default(x.default.mark((function e(t,n){var r,i,s,o,d=this;return x.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(GA(GA({},this.options),{},{isConsentDomain:n,version:Ui.version}),t,this._parentDomain),e.next=6,Jb();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e=this;if(k.default(this,d),n){var t=new Date;t.setDate(t.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(t.toUTCString(),"; path=/")}this._hideCMPButton(),o?window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e),i.hide()}.bind(this)):(function(){k.default(this,e)}.bind(this),this.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e)}.bind(this))),RA({event:"FirstInteraction",game:this._gameData})}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){k.default(this,d),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){k.default(this,d),i.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(o=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.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(GA(GA({},this.options),{},{isConsentDomain:n,version:Ui.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.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 o.apply(this,arguments)})},{key:"_createPromo",value:(s=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.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(GA(GA({},this.options),{},{isConsentDomain:n,version:Ui.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.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 s.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){k.default(this,e)}.bind(this))}},{key:"showAd",value:(i=A.default(x.default.mark((function e(t){var n,r=this,a=arguments;return x.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=A.default(x.default.mark((function e(a,i){var s,o,d,u;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o={adType:t,params:n,adTimestamp:r.adRequestTimer},e.next=5,r.sdkReady;case 5:return d=e.sent,e.next=8,r.videoAdReady;case 8:if(null!==(s=r._gameData.lp)&&void 0!==s&&s.load||r._sendLoadedEvent(),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:d,adRequest:o}),r._rejectAdIfAdDisabled({gameData:d,adRequest:o}),r._rejectAdIfUnsupportedType({adRequest:o}),"rewarded"===t&&r._setGameRewardedFlag(),null!=n&&n.isGift||r._rejectAdIfAdRateHits({gameData:d,adRequest:o}),r.adInstance.attachAfgPosition(o),!r.adFlowRunning){e.next=18;break}return e.abrupt("return",a());case 18:return r.adFlowRunning=!0,u=new LA(r),e.next=22,u.runAdFlow(o);case 22:r.adFlowRunning=!1,a(),r._post_message({topic:"adrequest.instream"}),e.next=32;break;case 27:e.prev=27,e.t0=e.catch(0),r.adFlowRunning=!1,r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 32:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_giveGift",value:function(){var e,t,n,r,a;null!==(e=this._gameData)&&void 0!==e&&null!==(t=e.gft)&&void 0!==t&&t.enabled&&(null===(n=this._gameData)||void 0===n||null===(r=n.gft)||void 0===r||null===(a=r.durations[this._giftCount])||void 0===a?void 0:a.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift()}},{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){if(!e.gameData.enableAds||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==a.AdType.Interstitial&&t.adType!==a.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=a.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===a.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,s,o,d=e.gameData,u=e.adRequest,c=null;u.adType===a.AdType.Interstitial&&null!==(t=d.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=d.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=d.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=d.midroll;if(u.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o;return x.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.enableAds&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled.");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:return e.next=18,n.adInstance.preloadAd(t);case 18:o=e.sent,r(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),i(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"cancelAd",value:(n=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(n,r){return x.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 n.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=A.default(x.default.mark((function n(r,a){var i;return x.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;this._allowExternals({enabled:!1});try{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(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||RA({event:"GameStarted",game:this._gameData})}},{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()||RA({event:"GamePaused",game:this._gameData})}},{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(k.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){k.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:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;k.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return k.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup: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:"_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:"_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 T.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 T.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new T.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new uA(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i,s;return x.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 dA(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new T.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(j.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new T.default(e,!0);return n.query=GA(GA({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=A.default(x.default.mark((function t(n,r){var a;return x.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)FA.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})}catch(e){console.log(e.message)}}},{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 k.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:"decideToGiveAGift",value:function(){var e=this;try{var t,n=null===(t=this._gameData)||void 0===t?void 0:t.gft,r=setInterval(A.default(x.default.mark((function t(){var n=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.adInstance.requestRunning||e.adFlowRunning?console.log("Advertisement already running..."):(e.showAd(a.AdType.Interstitial,{position:"midroll",isGift:!0}).catch(function(e){k.default(this,n)}.bind(this)),clearInterval(r),e._giftCount++);case 1:case"end":return t.stop()}}),t,this)}))),1e3*n.durations[this._giftCount].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 NA}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_setGameRewardedFlag",value:function(){try{if("developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasrewarded/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var e=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(e,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(e,"*")}catch(e){}}}catch(e){}}}]),e}(),WA={},HA=function(e){try{if(e.skipForward)return;if(WA.source){var t={type:"gd-sdk-on-event",event:e};WA.source.postMessage(t,WA.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},KA=function(){HA({name:"SDK_READY",status:"success",message:"Everything is ready."}),HA({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),HA({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},zA=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(!WA.source&&"init"===s)return function(e){var t=e.source,n=e.origin;WA={source:t,origin:n}}({source:a,origin:r}),void KA();var d=e[s];d&&A.default(x.default.mark((function t(){var n,r=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,function(){k.default(this,r),"showAd"===s&&qi.firstAdapterModeAdsense&&"rewarded"!==o.adType&&(console.log("promo-test, set first adapter to adssense 3"),o.params=o.params?o.params:{},o.params.adapter="adsense")}.bind(this),!(n=d.apply(e,Object.values(o)))||!n.then){t.next=6;break}return t.next=6,n;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))()}}else{var u={type:"gd-sdk",method:s,options:o};window.postMessage(u,"https://html5.gamedistribution.com")}}),!1)},$A=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){HA(e),t.apply(this,arguments)}}(e);var t=new VA(e);return zA(t),t},QA=function(e){try{var t=Fb(e);e.gameId||t.send("nogameid",{message:"".concat(Gg.parentURL)})}catch(e){}},YA={create:function(){var e=A.default(x.default.mark((function e(t){var n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,QA(t),qb=Fb(Wb=t),e.next=5,i_();case 5:return n=e.sent,r=n?n_(t):$A(t),Xb(),e.abrupt("return",r);case 11:return e.prev=11,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",$A(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}()};function JA(){return(JA=A.default(x.default.mark((function e(t,n){var r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t_();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,ZA(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 XA=!1;function ZA(e){var t=this;return new Promise(function(n,r){var a=this;if(k.default(this,t),BA)return n(BA);if(XA)var i=setInterval(function(){k.default(this,a),BA&&(XA=!1,clearInterval(i),n(BA))}.bind(this),100);else XA=!0,YA.create(e).then(function(e){k.default(this,a),BA=e,e._sendSDKReady(),XA=!1,n(BA)}.bind(this))}.bind(this))}var ek,tk=(ZA(ek=function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":E.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===E.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}()),{invoke:function(e){return function(e,t){return JA.apply(this,arguments)}(ek,e)}});function nk(){var e=this;this.AdType=a.AdType,this.preloadAd=function(e){var t=this;return tk.invoke(function(n){return k.default(this,t),n.preloadAd(e)}.bind(this))},this.showAd=function(){var e=A.default(x.default.mark((function e(t,n){var r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",tk.invoke(function(e){var i=this;if(k.default(this,r),t===a.AdType.Display)return e.showDisplayAd(n);return function(){k.default(this,i)}.bind(this),e.showAd(t,{})}.bind(this)));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return tk.invoke(function(t){return k.default(this,e),t.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return tk.invoke(function(t){return k.default(this,e),t.openConsole()}.bind(this))},this.getSession=function(){var e=this;return tk.invoke(function(t){return k.default(this,e),t.session()}.bind(this))},this.sendEvent=function(e){var t=this;return tk.invoke(function(n){return k.default(this,t),n.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){k.default(this,e),Dm.showLeaderboard()}.bind(this),addScore:function(t){k.default(this,e),Dm.addScore(t)}.bind(this)}}nk.prototype=new function(){this.showBanner=function(){var e=this;return tk.invoke(function(t){return k.default(this,e),t.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new nk,window.gdApi=window.gdsdk;
|