@bygd/gd-sdk-pes 1.30.2 → 1.30.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/newArrowCheck"),n=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/regenerator"),a=require("@bygd/gd-sdk-era/dist/default"),i=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/classCallCheck"),o=require("@babel/runtime/helpers/defineProperty"),d=require("url-parse"),u=require("js-base64"),c=require("validator"),l=require("is-valid-domain"),h=require("get-value"),f=require("set-value"),p=require("lodash.clonedeep"),m=require("events"),g=require("can-autoplay"),v=require("is-plain-object"),b=require("querystringify"),y=require("lodash.merge"),_=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),S=w(i),R=w(s),T=w(o),D=w(d),O=w(c),I=w(l),P=w(h),C=w(f),L=w(p),U=w(g),M=w(b),j=w(y),B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},G=function(e){return e&&e.Math==Math&&e},N=G("object"==typeof globalThis&&globalThis)||G("object"==typeof window&&window)||G("object"==typeof self&&self)||G("object"==typeof B&&B)||function(){return this}()||Function("return this")(),q={exports:{}},F=N,V=Object.defineProperty,H=function(e,t){try{V(F,e,{value:t,configurable:!0,writable:!0})}catch(n){F[e]=t}return t},z=H,W=N["__core-js_shared__"]||z("__core-js_shared__",{}),K=W;(q.exports=function(e,t){return K[e]||(K[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.3/LICENSE",source:"https://github.com/zloirock/core-js"});var $,Q,J=function(e){try{return!!e()}catch(e){return!0}},Y=!J((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),X=Y,Z=Function.prototype,ee=Z.bind,te=Z.call,ne=X&&ee.bind(te,te),re=X?function(e){return e&&ne(e)}:function(e){return e&&function(){return te.apply(e,arguments)}},ae=N.TypeError,ie=function(e){if(null==e)throw ae("Can't call method on "+e);return e},se=ie,oe=N.Object,de=function(e){return oe(se(e))},ue=de,ce=re({}.hasOwnProperty),le=Object.hasOwn||function(e,t){return ce(ue(e),t)},he=re,fe=0,pe=Math.random(),me=he(1..toString),ge=function(e){return"Symbol("+(void 0===e?"":e)+")_"+me(++fe+pe,36)},ve=function(e){return"function"==typeof e},be=N,ye=ve,_e=function(e){return ye(e)?e:void 0},we=function(e,t){return arguments.length<2?_e(be[e]):be[e]&&be[e][t]},Ae=we("navigator","userAgent")||"",ke=N,Ee=Ae,xe=ke.process,Se=ke.Deno,Re=xe&&xe.versions||Se&&Se.version,Te=Re&&Re.v8;Te&&(Q=($=Te.split("."))[0]>0&&$[0]<4?1:+($[0]+$[1])),!Q&&Ee&&(!($=Ee.match(/Edge\/(\d+)/))||$[1]>=74)&&($=Ee.match(/Chrome\/(\d+)/))&&(Q=+$[1]);var De=Q,Oe=De,Ie=J,Pe=!!Object.getOwnPropertySymbols&&!Ie((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Oe&&Oe<41})),Ce=Pe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Le=N,Ue=q.exports,Me=le,je=ge,Be=Pe,Ge=Ce,Ne=Ue("wks"),qe=Le.Symbol,Fe=qe&&qe.for,Ve=Ge?qe:qe&&qe.withoutSetter||je,He=function(e){if(!Me(Ne,e)||!Be&&"string"!=typeof Ne[e]){var t="Symbol."+e;Be&&Me(qe,e)?Ne[e]=qe[e]:Ne[e]=Ge&&Fe?Fe(t):Ve(t)}return Ne[e]},ze={};ze[He("toStringTag")]="z";var We="[object z]"===String(ze),Ke={exports:{}},$e=!J((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Qe={},Je=ve,Ye=function(e){return"object"==typeof e?null!==e:Je(e)},Xe=Ye,Ze=N.document,et=Xe(Ze)&&Xe(Ze.createElement),tt=function(e){return et?Ze.createElement(e):{}},nt=tt,rt=!$e&&!J((function(){return 7!=Object.defineProperty(nt("div"),"a",{get:function(){return 7}}).a})),at=$e&&J((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),it=N,st=Ye,ot=it.String,dt=it.TypeError,ut=function(e){if(st(e))return e;throw dt(ot(e)+" is not an object")},ct=Y,lt=Function.prototype.call,ht=ct?lt.bind(lt):function(){return lt.apply(lt,arguments)},ft=re({}.isPrototypeOf),pt=we,mt=ve,gt=ft,vt=Ce,bt=N.Object,yt=vt?function(e){return"symbol"==typeof e}:function(e){var t=pt("Symbol");return mt(t)&>(t.prototype,bt(e))},_t=N.String,wt=function(e){try{return _t(e)}catch(e){return"Object"}},At=ve,kt=wt,Et=N.TypeError,xt=function(e){if(At(e))return e;throw Et(kt(e)+" is not a function")},St=xt,Rt=function(e,t){var n=e[t];return null==n?void 0:St(n)},Tt=ht,Dt=ve,Ot=Ye,It=N.TypeError,Pt=ht,Ct=Ye,Lt=yt,Ut=Rt,Mt=function(e,t){var n,r;if("string"===t&&Dt(n=e.toString)&&!Ot(r=Tt(n,e)))return r;if(Dt(n=e.valueOf)&&!Ot(r=Tt(n,e)))return r;if("string"!==t&&Dt(n=e.toString)&&!Ot(r=Tt(n,e)))return r;throw It("Can't convert object to primitive value")},jt=He,Bt=N.TypeError,Gt=jt("toPrimitive"),Nt=function(e,t){if(!Ct(e)||Lt(e))return e;var n,r=Ut(e,Gt);if(r){if(void 0===t&&(t="default"),n=Pt(r,e,t),!Ct(n)||Lt(n))return n;throw Bt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Mt(e,t)},qt=yt,Ft=function(e){var t=Nt(e,"string");return qt(t)?t:t+""},Vt=$e,Ht=rt,zt=at,Wt=ut,Kt=Ft,$t=N.TypeError,Qt=Object.defineProperty,Jt=Object.getOwnPropertyDescriptor;Qe.f=Vt?zt?function(e,t,n){if(Wt(e),t=Kt(t),Wt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=Jt(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return Qt(e,t,n)}:Qt:function(e,t,n){if(Wt(e),t=Kt(t),Wt(n),Ht)try{return Qt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw $t("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Yt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Xt=Qe,Zt=Yt,en=$e?function(e,t,n){return Xt.f(e,t,Zt(1,n))}:function(e,t,n){return e[t]=n,e},tn=ve,nn=W,rn=re(Function.toString);tn(nn.inspectSource)||(nn.inspectSource=function(e){return rn(e)});var an,sn,on,dn=nn.inspectSource,un=ve,cn=dn,ln=N.WeakMap,hn=un(ln)&&/native code/.test(cn(ln)),fn=q.exports,pn=ge,mn=fn("keys"),gn=function(e){return mn[e]||(mn[e]=pn(e))},vn={},bn=hn,yn=N,_n=re,wn=Ye,An=en,kn=le,En=W,xn=gn,Sn=vn,Rn=yn.TypeError,Tn=yn.WeakMap;if(bn||En.state){var Dn=En.state||(En.state=new Tn),On=_n(Dn.get),In=_n(Dn.has),Pn=_n(Dn.set);an=function(e,t){if(In(Dn,e))throw new Rn("Object already initialized");return t.facade=e,Pn(Dn,e,t),t},sn=function(e){return On(Dn,e)||{}},on=function(e){return In(Dn,e)}}else{var Cn=xn("state");Sn[Cn]=!0,an=function(e,t){if(kn(e,Cn))throw new Rn("Object already initialized");return t.facade=e,An(e,Cn,t),t},sn=function(e){return kn(e,Cn)?e[Cn]:{}},on=function(e){return kn(e,Cn)}}var Ln={set:an,get:sn,has:on,enforce:function(e){return on(e)?sn(e):an(e,{})},getterFor:function(e){return function(t){var n;if(!wn(t)||(n=sn(t)).type!==e)throw Rn("Incompatible receiver, "+e+" required");return n}}},Un=$e,Mn=le,jn=Function.prototype,Bn=Un&&Object.getOwnPropertyDescriptor,Gn=Mn(jn,"name"),Nn={EXISTS:Gn,PROPER:Gn&&"something"===function(){}.name,CONFIGURABLE:Gn&&(!Un||Un&&Bn(jn,"name").configurable)},qn=N,Fn=ve,Vn=le,Hn=en,zn=H,Wn=dn,Kn=Nn.CONFIGURABLE,$n=Ln.get,Qn=Ln.enforce,Jn=String(String).split("String");(Ke.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;Fn(n)&&("Symbol("===String(d).slice(0,7)&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Vn(n,"name")||Kn&&n.name!==d)&&Hn(n,"name",d),(a=Qn(n)).source||(a.source=Jn.join("string"==typeof d?d:""))),e!==qn?(i?!o&&e[t]&&(s=!0):delete e[t],s?e[t]=n:Hn(e,t,n)):s?e[t]=n:zn(t,n)})(Function.prototype,"toString",(function(){return Fn(this)&&$n(this).source||Wn(this)}));var Yn=re,Xn=Yn({}.toString),Zn=Yn("".slice),er=function(e){return Zn(Xn(e),8,-1)},tr=N,nr=We,rr=ve,ar=er,ir=He("toStringTag"),sr=tr.Object,or="Arguments"==ar(function(){return arguments}()),dr=nr?ar: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=sr(e),ir))?n:or?ar(t):"Object"==(r=ar(t))&&rr(t.callee)?"Arguments":r},ur=dr,cr=We?{}.toString:function(){return"[object "+ur(this)+"]"},lr=We,hr=Ke.exports,fr=cr;lr||hr(Object.prototype,"toString",fr,{unsafe:!0});var pr={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},mr=tt("span").classList,gr=mr&&mr.constructor&&mr.constructor.prototype,vr=gr===Object.prototype?void 0:gr,br=xt,yr=Y,_r=re(re.bind),wr=function(e,t){return br(e),void 0===t?e:yr?_r(e,t):function(){return e.apply(t,arguments)}},Ar=re,kr=J,Er=er,xr=N.Object,Sr=Ar("".split),Rr=kr((function(){return!xr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Er(e)?Sr(e,""):xr(e)}:xr,Tr=Math.ceil,Dr=Math.floor,Or=function(e){var t=+e;return t!=t||0===t?0:(t>0?Dr:Tr)(t)},Ir=Or,Pr=Math.min,Cr=function(e){return e>0?Pr(Ir(e),9007199254740991):0},Lr=Cr,Ur=function(e){return Lr(e.length)},Mr=er,jr=Array.isArray||function(e){return"Array"==Mr(e)},Br=re,Gr=J,Nr=ve,qr=dr,Fr=dn,Vr=function(){},Hr=[],zr=we("Reflect","construct"),Wr=/^\s*(?:class|function)\b/,Kr=Br(Wr.exec),$r=!Wr.exec(Vr),Qr=function(e){if(!Nr(e))return!1;try{return zr(Vr,Hr,e),!0}catch(e){return!1}},Jr=function(e){if(!Nr(e))return!1;switch(qr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $r||!!Kr(Wr,Fr(e))}catch(e){return!0}};Jr.sham=!0;var Yr=!zr||Gr((function(){var e;return Qr(Qr.call)||!Qr(Object)||!Qr((function(){e=!0}))||e}))?Jr:Qr,Xr=N,Zr=jr,ea=Yr,ta=Ye,na=He("species"),ra=Xr.Array,aa=function(e){var t;return Zr(e)&&(t=e.constructor,(ea(t)&&(t===ra||Zr(t.prototype))||ta(t)&&null===(t=t[na]))&&(t=void 0)),void 0===t?ra:t},ia=function(e,t){return new(aa(e))(0===t?0:t)},sa=wr,oa=Rr,da=de,ua=Ur,ca=ia,la=re([].push),ha=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=da(d),m=oa(p),g=sa(u,c),v=ua(m),b=0,y=l||ca,_=t?y(d,v):n||s?y(d,0):void 0;v>b;b++)if((o||b in m)&&(f=g(h=m[b],b,p),e))if(t)_[b]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:la(_,h)}else switch(e){case 4:return!1;case 7:la(_,h)}return i?-1:r||a?a:_}},fa={forEach:ha(0),map:ha(1),filter:ha(2),some:ha(3),every:ha(4),find:ha(5),findIndex:ha(6),filterReject:ha(7)},pa=J,ma=function(e,t){var n=[][e];return!!n&&pa((function(){n.call(null,t||function(){return 1},1)}))},ga=fa.forEach,va=N,ba=pr,ya=vr,_a=ma("forEach")?[].forEach:function(e){return ga(this,e,arguments.length>1?arguments[1]:void 0)},wa=en,Aa=function(e){if(e&&e.forEach!==_a)try{wa(e,"forEach",_a)}catch(t){e.forEach=_a}};for(var ka in ba)ba[ka]&&Aa(va[ka]&&va[ka].prototype);Aa(ya);var Ea={},xa={},Sa={}.propertyIsEnumerable,Ra=Object.getOwnPropertyDescriptor,Ta=Ra&&!Sa.call({1:2},1);xa.f=Ta?function(e){var t=Ra(this,e);return!!t&&t.enumerable}:Sa;var Da=Rr,Oa=ie,Ia=function(e){return Da(Oa(e))},Pa=$e,Ca=ht,La=xa,Ua=Yt,Ma=Ia,ja=Ft,Ba=le,Ga=rt,Na=Object.getOwnPropertyDescriptor;Ea.f=Pa?Na:function(e,t){if(e=Ma(e),t=ja(t),Ga)try{return Na(e,t)}catch(e){}if(Ba(e,t))return Ua(!Ca(La.f,e,t),e[t])};var qa={},Fa=Or,Va=Math.max,Ha=Math.min,za=function(e,t){var n=Fa(e);return n<0?Va(n+t,0):Ha(n,t)},Wa=Ia,Ka=za,$a=Ur,Qa=function(e){return function(t,n,r){var a,i=Wa(t),s=$a(i),o=Ka(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}},Ja={includes:Qa(!0),indexOf:Qa(!1)},Ya=le,Xa=Ia,Za=Ja.indexOf,ei=vn,ti=re([].push),ni=function(e,t){var n,r=Xa(e),a=0,i=[];for(n in r)!Ya(ei,n)&&Ya(r,n)&&ti(i,n);for(;t.length>a;)Ya(r,n=t[a++])&&(~Za(i,n)||ti(i,n));return i},ri=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ai=ni,ii=ri.concat("length","prototype");qa.f=Object.getOwnPropertyNames||function(e){return ai(e,ii)};var si={};si.f=Object.getOwnPropertySymbols;var oi=we,di=qa,ui=si,ci=ut,li=re([].concat),hi=oi("Reflect","ownKeys")||function(e){var t=di.f(ci(e)),n=ui.f;return n?li(t,n(e)):t},fi=le,pi=hi,mi=Ea,gi=Qe,vi=function(e,t,n){for(var r=pi(t),a=gi.f,i=mi.f,s=0;s<r.length;s++){var o=r[s];fi(e,o)||n&&fi(n,o)||a(e,o,i(t,o))}},bi=J,yi=ve,_i=/#|\.prototype\./,wi=function(e,t){var n=ki[Ai(e)];return n==xi||n!=Ei&&(yi(t)?bi(t):!!t)},Ai=wi.normalize=function(e){return String(e).replace(_i,".").toLowerCase()},ki=wi.data={},Ei=wi.NATIVE="N",xi=wi.POLYFILL="P",Si=wi,Ri=N,Ti=Ea.f,Di=en,Oi=Ke.exports,Ii=H,Pi=vi,Ci=Si,Li=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?Ri:u?Ri[o]||Ii(o,{}):(Ri[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=Ti(n,r))&&s.value:n[r],!Ci(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Pi(i,a)}(e.sham||a&&a.sham)&&Di(i,"sham",!0),Oi(n,r,i,e)}},Ui=ni,Mi=ri,ji=Object.keys||function(e){return Ui(e,Mi)},Bi=de,Gi=ji;Li({target:"Object",stat:!0,forced:J((function(){Gi(1)}))},{keys:function(e){return Gi(Bi(e))}});var Ni=Array.isArray,qi=Object.prototype.toString,Fi=Ni||function(e){return!!e&&"[object Array]"==qi.call(e)},Vi={name:"@bygd/gd-sdk-pes",version:"1.30.2",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"}},Hi=function(e){var t=zi("object"===E.default(e)?e:a.parseJSON(e));return t&&t.version?Vi.version>=t.version?t:void 0:t},zi=function(e){var t=this;if(!Fi(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}},Wi=function(){var e;(e=console).log.apply(e,arguments)},Ki=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 $i={},Qi=dr,Ji=N.String,Yi=function(e){if("Symbol"===Qi(e))throw TypeError("Cannot convert a Symbol value to a string");return Ji(e)},Xi={},Zi=$e,es=at,ts=Qe,ns=ut,rs=Ia,as=ji;Xi.f=Zi&&!es?Object.defineProperties:function(e,t){ns(e);for(var n,r=rs(t),a=as(t),i=a.length,s=0;i>s;)ts.f(e,n=a[s++],r[n]);return e};var is,ss=we("document","documentElement"),os=ut,ds=Xi,us=ri,cs=vn,ls=ss,hs=tt,fs=gn("IE_PROTO"),ps=function(){},ms=function(e){return"<script>"+e+"<\/script>"},gs=function(e){e.write(ms("")),e.close();var t=e.parentWindow.Object;return e=null,t},vs=function(){try{is=new ActiveXObject("htmlfile")}catch(e){}var e,t;vs="undefined"!=typeof document?document.domain&&is?gs(is):((t=hs("iframe")).style.display="none",ls.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ms("document.F=Object")),e.close(),e.F):gs(is);for(var n=us.length;n--;)delete vs.prototype[us[n]];return vs()};cs[fs]=!0;var bs=Object.create||function(e,t){var n;return null!==e?(ps.prototype=os(e),n=new ps,ps.prototype=null,n[fs]=e):n=vs(),void 0===t?n:ds.f(n,t)},ys={},_s=Ft,ws=Qe,As=Yt,ks=function(e,t,n){var r=_s(t);r in e?ws.f(e,r,As(0,n)):e[r]=n},Es=za,xs=Ur,Ss=ks,Rs=N.Array,Ts=Math.max,Ds=function(e,t,n){for(var r=xs(e),a=Es(t,r),i=Es(void 0===n?r:n,r),s=Rs(Ts(i-a,0)),o=0;a<i;a++,o++)Ss(s,o,e[a]);return s.length=o,s},Os=er,Is=Ia,Ps=qa.f,Cs=Ds,Ls="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ys.f=function(e){return Ls&&"Window"==Os(e)?function(e){try{return Ps(e)}catch(e){return Cs(Ls)}}(e):Ps(Is(e))};var Us={},Ms=He;Us.f=Ms;var js=N,Bs=le,Gs=Us,Ns=Qe.f,Fs=function(e){var t=js.Symbol||(js.Symbol={});Bs(t,e)||Ns(t,e,{value:Gs.f(e)})},Vs=ht,Hs=we,zs=He,Ws=Ke.exports,Ks=Qe.f,$s=le,Qs=He("toStringTag"),Js=function(e,t,n){e&&!n&&(e=e.prototype),e&&!$s(e,Qs)&&Ks(e,Qs,{configurable:!0,value:t})},Ys=Li,Xs=N,Zs=ht,eo=re,to=$e,no=Pe,ro=J,ao=le,io=ft,so=ut,oo=Ia,uo=Ft,co=Yi,lo=Yt,ho=bs,fo=ji,po=qa,mo=ys,go=si,vo=Ea,bo=Qe,yo=Xi,_o=xa,wo=Ke.exports,Ao=q.exports,ko=vn,Eo=ge,xo=He,So=Us,Ro=Fs,To=function(){var e=Hs("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=zs("toPrimitive");t&&!t[r]&&Ws(t,r,(function(e){return Vs(n,this)}))},Do=Js,Oo=Ln,Io=fa.forEach,Po=gn("hidden"),Co=Oo.set,Lo=Oo.getterFor("Symbol"),Uo=Object.prototype,Mo=Xs.Symbol,jo=Mo&&Mo.prototype,Bo=Xs.TypeError,Go=Xs.QObject,No=vo.f,qo=bo.f,Fo=mo.f,Vo=_o.f,Ho=eo([].push),zo=Ao("symbols"),Wo=Ao("op-symbols"),Ko=Ao("wks"),$o=!Go||!Go.prototype||!Go.prototype.findChild,Qo=to&&ro((function(){return 7!=ho(qo({},"a",{get:function(){return qo(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=No(Uo,t);r&&delete Uo[t],qo(e,t,n),r&&e!==Uo&&qo(Uo,t,r)}:qo,Jo=function(e,t){var n=zo[e]=ho(jo);return Co(n,{type:"Symbol",tag:e,description:t}),to||(n.description=t),n},Yo=function(e,t,n){e===Uo&&Yo(Wo,t,n),so(e);var r=uo(t);return so(n),ao(zo,r)?(n.enumerable?(ao(e,Po)&&e[Po][r]&&(e[Po][r]=!1),n=ho(n,{enumerable:lo(0,!1)})):(ao(e,Po)||qo(e,Po,lo(1,{})),e[Po][r]=!0),Qo(e,r,n)):qo(e,r,n)},Xo=function(e,t){so(e);var n=oo(t),r=fo(n).concat(nd(n));return Io(r,(function(t){to&&!Zs(Zo,n,t)||Yo(e,t,n[t])})),e},Zo=function(e){var t=uo(e),n=Zs(Vo,this,t);return!(this===Uo&&ao(zo,t)&&!ao(Wo,t))&&(!(n||!ao(this,t)||!ao(zo,t)||ao(this,Po)&&this[Po][t])||n)},ed=function(e,t){var n=oo(e),r=uo(t);if(n!==Uo||!ao(zo,r)||ao(Wo,r)){var a=No(n,r);return!a||!ao(zo,r)||ao(n,Po)&&n[Po][r]||(a.enumerable=!0),a}},td=function(e){var t=Fo(oo(e)),n=[];return Io(t,(function(e){ao(zo,e)||ao(ko,e)||Ho(n,e)})),n},nd=function(e){var t=e===Uo,n=Fo(t?Wo:oo(e)),r=[];return Io(n,(function(e){!ao(zo,e)||t&&!ao(Uo,e)||Ho(r,zo[e])})),r};no||(wo(jo=(Mo=function(){if(io(jo,this))throw Bo("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?co(arguments[0]):void 0,t=Eo(e),n=function(e){this===Uo&&Zs(n,Wo,e),ao(this,Po)&&ao(this[Po],t)&&(this[Po][t]=!1),Qo(this,t,lo(1,e))};return to&&$o&&Qo(Uo,t,{configurable:!0,set:n}),Jo(t,e)}).prototype,"toString",(function(){return Lo(this).tag})),wo(Mo,"withoutSetter",(function(e){return Jo(Eo(e),e)})),_o.f=Zo,bo.f=Yo,yo.f=Xo,vo.f=ed,po.f=mo.f=td,go.f=nd,So.f=function(e){return Jo(xo(e),e)},to&&(qo(jo,"description",{configurable:!0,get:function(){return Lo(this).description}}),wo(Uo,"propertyIsEnumerable",Zo,{unsafe:!0}))),Ys({global:!0,wrap:!0,forced:!no,sham:!no},{Symbol:Mo}),Io(fo(Ko),(function(e){Ro(e)})),Ys({target:"Symbol",stat:!0,forced:!no},{useSetter:function(){$o=!0},useSimple:function(){$o=!1}}),Ys({target:"Object",stat:!0,forced:!no,sham:!to},{create:function(e,t){return void 0===t?ho(e):Xo(ho(e),t)},defineProperty:Yo,defineProperties:Xo,getOwnPropertyDescriptor:ed}),Ys({target:"Object",stat:!0,forced:!no},{getOwnPropertyNames:td}),To(),Do(Mo,"Symbol"),ko[Po]=!0;var rd=Pe&&!!Symbol.for&&!!Symbol.keyFor,ad=Li,id=we,sd=le,od=Yi,dd=q.exports,ud=rd,cd=dd("string-to-symbol-registry"),ld=dd("symbol-to-string-registry");ad({target:"Symbol",stat:!0,forced:!ud},{for:function(e){var t=od(e);if(sd(cd,t))return cd[t];var n=id("Symbol")(t);return cd[t]=n,ld[n]=t,n}});var hd=Li,fd=le,pd=yt,md=wt,gd=rd,vd=(0,q.exports)("symbol-to-string-registry");hd({target:"Symbol",stat:!0,forced:!gd},{keyFor:function(e){if(!pd(e))throw TypeError(md(e)+" is not a symbol");if(fd(vd,e))return vd[e]}});var bd=Y,yd=Function.prototype,_d=yd.apply,wd=yd.call,Ad="object"==typeof Reflect&&Reflect.apply||(bd?wd.bind(_d):function(){return wd.apply(_d,arguments)}),kd=re([].slice),Ed=Li,xd=we,Sd=Ad,Rd=ht,Td=re,Dd=J,Od=jr,Id=ve,Pd=Ye,Cd=yt,Ld=kd,Ud=Pe,Md=xd("JSON","stringify"),jd=Td(/./.exec),Bd=Td("".charAt),Gd=Td("".charCodeAt),Nd=Td("".replace),qd=Td(1..toString),Fd=/[\uD800-\uDFFF]/g,Vd=/^[\uD800-\uDBFF]$/,Hd=/^[\uDC00-\uDFFF]$/,zd=!Ud||Dd((function(){var e=xd("Symbol")();return"[null]"!=Md([e])||"{}"!=Md({a:e})||"{}"!=Md(Object(e))})),Wd=Dd((function(){return'"\\udf06\\ud834"'!==Md("\udf06\ud834")||'"\\udead"'!==Md("\udead")})),Kd=function(e,t){var n=Ld(arguments),r=t;if((Pd(t)||void 0!==e)&&!Cd(e))return Od(t)||(t=function(e,t){if(Id(r)&&(t=Rd(r,this,e,t)),!Cd(t))return t}),n[1]=t,Sd(Md,null,n)},$d=function(e,t,n){var r=Bd(n,t-1),a=Bd(n,t+1);return jd(Vd,e)&&!jd(Hd,a)||jd(Hd,e)&&!jd(Vd,r)?"\\u"+qd(Gd(e,0),16):e};Md&&Ed({target:"JSON",stat:!0,forced:zd||Wd},{stringify:function(e,t,n){var r=Ld(arguments),a=Sd(zd?Kd:Md,null,r);return Wd&&"string"==typeof a?Nd(a,Fd,$d):a}});var Qd=si,Jd=de;Li({target:"Object",stat:!0,forced:!Pe||J((function(){Qd.f(1)}))},{getOwnPropertySymbols:function(e){var t=Qd.f;return t?t(Jd(e)):[]}});var Yd=J,Xd=De,Zd=He("species"),eu=function(e){return Xd>=51||!Yd((function(){var t=[];return(t.constructor={})[Zd]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},tu=fa.filter;Li({target:"Array",proto:!0,forced:!eu("filter")},{filter:function(e){return tu(this,e,arguments.length>1?arguments[1]:void 0)}});var nu=Li,ru=J,au=Ia,iu=Ea.f,su=$e,ou=ru((function(){iu(1)}));nu({target:"Object",stat:!0,forced:!su||ou,sham:!su},{getOwnPropertyDescriptor:function(e,t){return iu(au(e),t)}});var du=hi,uu=Ia,cu=Ea,lu=ks;Li({target:"Object",stat:!0,sham:!$e},{getOwnPropertyDescriptors:function(e){for(var t,n,r=uu(e),a=cu.f,i=du(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&lu(s,t,n);return s}});var hu=Li,fu=N,pu=jr,mu=Yr,gu=Ye,vu=za,bu=Ur,yu=Ia,_u=ks,wu=He,Au=kd,ku=eu("slice"),Eu=wu("species"),xu=fu.Array,Su=Math.max;hu({target:"Array",proto:!0,forced:!ku},{slice:function(e,t){var n,r,a,i=yu(this),s=bu(i),o=vu(e,s),d=vu(void 0===t?s:t,s);if(pu(i)&&(n=i.constructor,(mu(n)&&(n===xu||pu(n.prototype))||gu(n)&&null===(n=n[Eu]))&&(n=void 0),n===xu||void 0===n))return Au(i,o,d);for(r=new(void 0===n?xu:n)(Su(d-o,0)),a=0;o<d;o++,a++)o in i&&_u(r,a,i[o]);return r.length=a,r}});var Ru=ht,Tu=ut,Du=Rt,Ou=function(e,t,n){var r,a;Tu(e);try{if(!(r=Du(e,"return"))){if("throw"===t)throw n;return n}r=Ru(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Tu(r),n},Iu=ut,Pu=Ou,Cu={},Lu=Cu,Uu=He("iterator"),Mu=Array.prototype,ju=function(e){return void 0!==e&&(Lu.Array===e||Mu[Uu]===e)},Bu=dr,Gu=Rt,Nu=Cu,qu=He("iterator"),Fu=function(e){if(null!=e)return Gu(e,qu)||Gu(e,"@@iterator")||Nu[Bu(e)]},Vu=ht,Hu=xt,zu=ut,Wu=wt,Ku=Fu,$u=N.TypeError,Qu=function(e,t){var n=arguments.length<2?Ku(e):t;if(Hu(n))return zu(Vu(n,e));throw $u(Wu(e)+" is not iterable")},Ju=wr,Yu=ht,Xu=de,Zu=function(e,t,n,r){try{return r?t(Iu(n)[0],n[1]):t(n)}catch(t){Pu(e,"throw",t)}},ec=ju,tc=Yr,nc=Ur,rc=ks,ac=Qu,ic=Fu,sc=N.Array,oc=function(e){var t=Xu(e),n=tc(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=Ju(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=ic(t),f=0;if(!h||this==sc&&ec(h))for(s=nc(t),o=n?new this(s):sc(s);s>f;f++)l=i?a(t[f],f):t[f],rc(o,f,l);else for(c=(u=ac(t,h)).next,o=n?new this:[];!(d=Yu(c,u)).done;f++)l=i?Zu(u,a,[d.value,f],!0):d.value,rc(o,f,l);return o.length=f,o},dc=He("iterator"),uc=!1;try{var cc=0,lc={next:function(){return{done:!!cc++}},return:function(){uc=!0}};lc[dc]=function(){return this},Array.from(lc,(function(){throw 2}))}catch(e){}var hc=function(e,t){if(!t&&!uc)return!1;var n=!1;try{var r={};r[dc]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},fc=oc;Li({target:"Array",stat:!0,forced:!hc((function(e){Array.from(e)}))},{from:fc});var pc,mc,gc,vc=re,bc=Or,yc=Yi,_c=ie,wc=vc("".charAt),Ac=vc("".charCodeAt),kc=vc("".slice),Ec=function(e){return function(t,n){var r,a,i=yc(_c(t)),s=bc(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=Ac(i,s))<55296||r>56319||s+1===o||(a=Ac(i,s+1))<56320||a>57343?e?wc(i,s):r:e?kc(i,s,s+2):a-56320+(r-55296<<10)+65536}},xc={codeAt:Ec(!1),charAt:Ec(!0)},Sc=!J((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Rc=N,Tc=le,Dc=ve,Oc=de,Ic=Sc,Pc=gn("IE_PROTO"),Cc=Rc.Object,Lc=Cc.prototype,Uc=Ic?Cc.getPrototypeOf:function(e){var t=Oc(e);if(Tc(t,Pc))return t[Pc];var n=t.constructor;return Dc(n)&&t instanceof n?n.prototype:t instanceof Cc?Lc:null},Mc=J,jc=ve,Bc=Uc,Gc=Ke.exports,Nc=He("iterator"),qc=!1;[].keys&&("next"in(gc=[].keys())?(mc=Bc(Bc(gc)))!==Object.prototype&&(pc=mc):qc=!0);var Fc=null==pc||Mc((function(){var e={};return pc[Nc].call(e)!==e}));Fc&&(pc={}),jc(pc[Nc])||Gc(pc,Nc,(function(){return this}));var Vc={IteratorPrototype:pc,BUGGY_SAFARI_ITERATORS:qc},Hc=Vc.IteratorPrototype,zc=bs,Wc=Yt,Kc=Js,$c=Cu,Qc=function(){return this},Jc=function(e,t,n,r){var a=t+" Iterator";return e.prototype=zc(Hc,{next:Wc(+!r,n)}),Kc(e,a,!1),$c[a]=Qc,e},Yc=N,Xc=ve,Zc=Yc.String,el=Yc.TypeError,tl=re,nl=ut,rl=function(e){if("object"==typeof e||Xc(e))return e;throw el("Can't set "+Zc(e)+" as a prototype")},al=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=tl(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return nl(n),rl(r),t?e(n,r):n.__proto__=r,n}}():void 0),il=Li,sl=ht,ol=Nn,dl=ve,ul=Jc,cl=Uc,ll=al,hl=Js,fl=en,pl=Ke.exports,ml=Cu,gl=ol.PROPER,vl=ol.CONFIGURABLE,bl=Vc.IteratorPrototype,yl=Vc.BUGGY_SAFARI_ITERATORS,_l=He("iterator"),wl=function(){return this},Al=function(e,t,n,r,a,i,s){ul(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!yl&&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[_l]||f["@@iterator"]||a&&f[a],m=!yl&&p||c(a),g="Array"==t&&f.entries||p;if(g&&(o=cl(g.call(new e)))!==Object.prototype&&o.next&&(cl(o)!==bl&&(ll?ll(o,bl):dl(o[_l])||pl(o,_l,wl)),hl(o,l,!0)),gl&&"values"==a&&p&&"values"!==p.name&&(vl?fl(f,"name","values"):(h=!0,m=function(){return sl(p,this)})),a)if(d={values:c("values"),keys:i?m:c("keys"),entries:c("entries")},s)for(u in d)(yl||h||!(u in f))&&pl(f,u,d[u]);else il({target:t,proto:!0,forced:yl||h},d);return f[_l]!==m&&pl(f,_l,m,{name:a}),ml[t]=m,d},kl=xc.charAt,El=Yi,xl=Ln,Sl=Al,Rl=xl.set,Tl=xl.getterFor("String Iterator");Sl(String,"String",(function(e){Rl(this,{type:"String Iterator",string:El(e),index:0})}),(function(){var e,t=Tl(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=kl(n,r),t.index+=e.length,{value:e,done:!1})}));var Dl=ut,Ol=function(){var e=Dl(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Il=J,Pl=N.RegExp,Cl=Il((function(){var e=Pl("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ll=Cl||Il((function(){return!Pl("a","y").sticky})),Ul={BROKEN_CARET:Cl||Il((function(){var e=Pl("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ll,UNSUPPORTED_Y:Cl},Ml=J,jl=N.RegExp,Bl=Ml((function(){var e=jl(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Gl=J,Nl=N.RegExp,ql=Gl((function(){var e=Nl("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Fl=ht,Vl=re,Hl=Yi,zl=Ol,Wl=Ul,Kl=q.exports,$l=bs,Ql=Ln.get,Jl=Bl,Yl=ql,Xl=Kl("native-string-replace",String.prototype.replace),Zl=RegExp.prototype.exec,eh=Zl,th=Vl("".charAt),nh=Vl("".indexOf),rh=Vl("".replace),ah=Vl("".slice),ih=function(){var e=/a/,t=/b*/g;return Fl(Zl,e,"a"),Fl(Zl,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),sh=Wl.BROKEN_CARET,oh=void 0!==/()??/.exec("")[1];(ih||oh||sh||Jl||Yl)&&(eh=function(e){var t,n,r,a,i,s,o,d=this,u=Ql(d),c=Hl(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=Fl(eh,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=sh&&d.sticky,p=Fl(zl,d),m=d.source,g=0,v=c;if(f&&(p=rh(p,"y",""),-1===nh(p,"g")&&(p+="g"),v=ah(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==th(c,d.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",p)),oh&&(n=new RegExp("^"+m+"$(?!\\s)",p)),ih&&(r=d.lastIndex),a=Fl(Zl,f?n:d,v),f?a?(a.input=ah(a.input,g),a[0]=ah(a[0],g),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:ih&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),oh&&a&&a.length>1&&Fl(Xl,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=$l(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var dh=eh;Li({target:"RegExp",proto:!0,forced:/./.exec!==dh},{exec:dh});var uh=Li,ch=$e,lh=N,hh=re,fh=le,ph=ve,mh=ft,gh=Yi,vh=Qe.f,bh=vi,yh=lh.Symbol,_h=yh&&yh.prototype;if(ch&&ph(yh)&&(!("description"in _h)||void 0!==yh().description)){var wh={},Ah=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:gh(arguments[0]),t=mh(_h,this)?new yh(e):void 0===e?yh():yh(e);return""===e&&(wh[t]=!0),t};bh(Ah,yh),Ah.prototype=_h,_h.constructor=Ah;var kh="Symbol(test)"==String(yh("test")),Eh=hh(_h.toString),xh=hh(_h.valueOf),Sh=/^Symbol\((.*)\)[^)]+$/,Rh=hh("".replace),Th=hh("".slice);vh(_h,"description",{configurable:!0,get:function(){var e=xh(this),t=Eh(e);if(fh(wh,e))return"";var n=kh?Th(t,7,-1):Rh(t,Sh,"$1");return""===n?void 0:n}}),uh({global:!0,forced:!0},{Symbol:Ah})}Fs("iterator");var Dh=bs,Oh=Qe,Ih=He("unscopables"),Ph=Array.prototype;null==Ph[Ih]&&Oh.f(Ph,Ih,{configurable:!0,value:Dh(null)});var Ch=function(e){Ph[Ih][e]=!0},Lh=Ia,Uh=Ch,Mh=Cu,jh=Ln,Bh=Qe.f,Gh=Al,Nh=$e,qh=jh.set,Fh=jh.getterFor("Array Iterator"),Vh=Gh(Array,"Array",(function(e,t){qh(this,{type:"Array Iterator",target:Lh(e),index:0,kind:t})}),(function(){var e=Fh(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"),Hh=Mh.Arguments=Mh.Array;if(Uh("keys"),Uh("values"),Uh("entries"),Nh&&"values"!==Hh.name)try{Bh(Hh,"name",{value:"values"})}catch(e){}var zh=N,Wh=pr,Kh=vr,$h=Vh,Qh=en,Jh=He,Yh=Jh("iterator"),Xh=Jh("toStringTag"),Zh=$h.values,ef=function(e,t){if(e){if(e[Yh]!==Zh)try{Qh(e,Yh,Zh)}catch(t){e[Yh]=Zh}if(e[Xh]||Qh(e,Xh,t),Wh[t])for(var n in $h)if(e[n]!==$h[n])try{Qh(e,n,$h[n])}catch(t){e[n]=$h[n]}}};for(var tf in Wh)ef(zh[tf]&&zh[tf].prototype,tf);ef(Kh,"DOMTokenList");var nf,rf,af,sf,of="process"==er(N.process),df=Ke.exports,uf=function(e,t,n){for(var r in t)df(e,r,t[r],n);return e},cf=we,lf=Qe,hf=$e,ff=He("species"),pf=function(e){var t=cf(e),n=lf.f;hf&&t&&!t[ff]&&n(t,ff,{configurable:!0,get:function(){return this}})},mf=ft,gf=N.TypeError,vf=function(e,t){if(mf(t,e))return e;throw gf("Incorrect invocation")},bf=Yr,yf=wt,_f=N.TypeError,wf=ut,Af=function(e){if(bf(e))return e;throw _f(yf(e)+" is not a constructor")},kf=He("species"),Ef=function(e,t){var n,r=wf(e).constructor;return void 0===r||null==(n=wf(r)[kf])?t:Af(n)},xf=N.TypeError,Sf=function(e,t){if(e<t)throw xf("Not enough arguments");return e},Rf=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ae),Tf=N,Df=Ad,Of=wr,If=ve,Pf=le,Cf=J,Lf=ss,Uf=kd,Mf=tt,jf=Sf,Bf=Rf,Gf=of,Nf=Tf.setImmediate,qf=Tf.clearImmediate,Ff=Tf.process,Vf=Tf.Dispatch,Hf=Tf.Function,zf=Tf.MessageChannel,Wf=Tf.String,Kf=0,$f={};try{nf=Tf.location}catch(e){}var Qf=function(e){if(Pf($f,e)){var t=$f[e];delete $f[e],t()}},Jf=function(e){return function(){Qf(e)}},Yf=function(e){Qf(e.data)},Xf=function(e){Tf.postMessage(Wf(e),nf.protocol+"//"+nf.host)};Nf&&qf||(Nf=function(e){jf(arguments.length,1);var t=If(e)?e:Hf(e),n=Uf(arguments,1);return $f[++Kf]=function(){Df(t,void 0,n)},rf(Kf),Kf},qf=function(e){delete $f[e]},Gf?rf=function(e){Ff.nextTick(Jf(e))}:Vf&&Vf.now?rf=function(e){Vf.now(Jf(e))}:zf&&!Bf?(sf=(af=new zf).port2,af.port1.onmessage=Yf,rf=Of(sf.postMessage,sf)):Tf.addEventListener&&If(Tf.postMessage)&&!Tf.importScripts&&nf&&"file:"!==nf.protocol&&!Cf(Xf)?(rf=Xf,Tf.addEventListener("message",Yf,!1)):rf="onreadystatechange"in Mf("script")?function(e){Lf.appendChild(Mf("script")).onreadystatechange=function(){Lf.removeChild(this),Qf(e)}}:function(e){setTimeout(Jf(e),0)});var Zf,ep,tp,np,rp,ap,ip,sp,op={set:Nf,clear:qf},dp=N,up=/ipad|iphone|ipod/i.test(Ae)&&void 0!==dp.Pebble,cp=/web0s(?!.*chrome)/i.test(Ae),lp=N,hp=wr,fp=Ea.f,pp=op.set,mp=Rf,gp=up,vp=cp,bp=of,yp=lp.MutationObserver||lp.WebKitMutationObserver,_p=lp.document,wp=lp.process,Ap=lp.Promise,kp=fp(lp,"queueMicrotask"),Ep=kp&&kp.value;Ep||(Zf=function(){var e,t;for(bp&&(e=wp.domain)&&e.exit();ep;){t=ep.fn,ep=ep.next;try{t()}catch(e){throw ep?np():tp=void 0,e}}tp=void 0,e&&e.enter()},mp||bp||vp||!yp||!_p?!gp&&Ap&&Ap.resolve?((ip=Ap.resolve(void 0)).constructor=Ap,sp=hp(ip.then,ip),np=function(){sp(Zf)}):bp?np=function(){wp.nextTick(Zf)}:(pp=hp(pp,lp),np=function(){pp(Zf)}):(rp=!0,ap=_p.createTextNode(""),new yp(Zf).observe(ap,{characterData:!0}),np=function(){ap.data=rp=!rp}));var xp=Ep||function(e){var t={fn:e,next:void 0};tp&&(tp.next=t),ep||(ep=t,np()),tp=t},Sp=N,Rp=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Tp=function(){this.head=null,this.tail=null};Tp.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var Dp=Tp,Op=N.Promise,Ip="object"==typeof window&&"object"!=typeof Deno,Pp=N,Cp=Op,Lp=ve,Up=Si,Mp=dn,jp=He,Bp=Ip,Gp=De;Cp&&Cp.prototype;var Np=jp("species"),qp=!1,Fp=Lp(Pp.PromiseRejectionEvent),Vp=Up("Promise",(function(){var e=Mp(Cp),t=e!==String(Cp);if(!t&&66===Gp)return!0;if(Gp>=51&&/native code/.test(e))return!1;var n=new Cp((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[Np]=r,!(qp=n.then((function(){}))instanceof r)||!t&&Bp&&!Fp})),Hp={CONSTRUCTOR:Vp,REJECTION_EVENT:Fp,SUBCLASSING:qp},zp={},Wp=xt,Kp=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=Wp(t),this.reject=Wp(n)};zp.f=function(e){return new Kp(e)};var $p,Qp,Jp,Yp=Li,Xp=of,Zp=N,em=ht,tm=Ke.exports,nm=uf,rm=al,am=Js,im=pf,sm=xt,om=ve,dm=Ye,um=vf,cm=Ef,lm=op.set,hm=xp,fm=function(e,t){var n=Sp.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},pm=Rp,mm=Dp,gm=Ln,vm=Op,bm=zp,ym=Hp.CONSTRUCTOR,_m=Hp.REJECTION_EVENT,wm=Hp.SUBCLASSING,Am=gm.getterFor("Promise"),km=gm.set,Em=vm&&vm.prototype,xm=vm,Sm=Em,Rm=Zp.TypeError,Tm=Zp.document,Dm=Zp.process,Om=bm.f,Im=Om,Pm=!!(Tm&&Tm.createEvent&&Zp.dispatchEvent),Cm=function(e){var t;return!(!dm(e)||!om(t=e.then))&&t},Lm=function(e,t){var n,r,a,i=t.value,s=1==t.state,o=s?e.ok:e.fail,d=e.resolve,u=e.reject,c=e.domain;try{o?(s||(2===t.rejection&&Gm(t),t.rejection=1),!0===o?n=i:(c&&c.enter(),n=o(i),c&&(c.exit(),a=!0)),n===e.promise?u(Rm("Promise-chain cycle")):(r=Cm(n))?em(r,n,d,u):d(n)):u(i)}catch(e){c&&!a&&c.exit(),u(e)}},Um=function(e,t){e.notified||(e.notified=!0,hm((function(){for(var n,r=e.reactions;n=r.get();)Lm(n,e);e.notified=!1,t&&!e.rejection&&jm(e)})))},Mm=function(e,t,n){var r,a;Pm?((r=Tm.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Zp.dispatchEvent(r)):r={promise:t,reason:n},!_m&&(a=Zp["on"+e])?a(r):"unhandledrejection"===e&&fm("Unhandled promise rejection",n)},jm=function(e){em(lm,Zp,(function(){var t,n=e.facade,r=e.value;if(Bm(e)&&(t=pm((function(){Xp?Dm.emit("unhandledRejection",r,n):Mm("unhandledrejection",n,r)})),e.rejection=Xp||Bm(e)?2:1,t.error))throw t.value}))},Bm=function(e){return 1!==e.rejection&&!e.parent},Gm=function(e){em(lm,Zp,(function(){var t=e.facade;Xp?Dm.emit("rejectionHandled",t):Mm("rejectionhandled",t,e.value)}))},Nm=function(e,t,n){return function(r){e(t,r,n)}},qm=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Um(e,!0))},Fm=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Rm("Promise can't be resolved itself");var r=Cm(t);r?hm((function(){var n={done:!1};try{em(r,t,Nm(Fm,n,e),Nm(qm,n,e))}catch(t){qm(n,t,e)}})):(e.value=t,e.state=1,Um(e,!1))}catch(t){qm({done:!1},t,e)}}};if(ym&&(Sm=(xm=function(e){um(this,Sm),sm(e),em($p,this);var t=Am(this);try{e(Nm(Fm,t),Nm(qm,t))}catch(e){qm(t,e)}}).prototype,($p=function(e){km(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new mm,rejection:!1,state:0,value:void 0})}).prototype=nm(Sm,{then:function(e,t){var n=Am(this),r=Om(cm(this,xm));return n.parent=!0,r.ok=!om(e)||e,r.fail=om(t)&&t,r.domain=Xp?Dm.domain:void 0,0==n.state?n.reactions.add(r):hm((function(){Lm(r,n)})),r.promise}}),Qp=function(){var e=new $p,t=Am(e);this.promise=e,this.resolve=Nm(Fm,t),this.reject=Nm(qm,t)},bm.f=Om=function(e){return e===xm||undefined===e?new Qp(e):Im(e)},om(vm)&&Em!==Object.prototype)){Jp=Em.then,wm||tm(Em,"then",(function(e,t){var n=this;return new xm((function(e,t){em(Jp,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete Em.constructor}catch(e){}rm&&rm(Em,Sm)}Yp({global:!0,wrap:!0,forced:ym},{Promise:xm}),am(xm,"Promise",!1),im("Promise");var Vm=wr,Hm=ht,zm=ut,Wm=wt,Km=ju,$m=Ur,Qm=ft,Jm=Qu,Ym=Fu,Xm=Ou,Zm=N.TypeError,eg=function(e,t){this.stopped=e,this.result=t},tg=eg.prototype,ng=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=Vm(t,c),m=function(e){return r&&Xm(r,"normal",e),new eg(!0,e)},g=function(e){return l?(zm(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=Ym(e)))throw Zm(Wm(e)+" is not iterable");if(Km(a)){for(i=0,s=$m(e);s>i;i++)if((o=g(e[i]))&&Qm(tg,o))return o;return new eg(!1)}r=Jm(e,a)}for(d=r.next;!(u=Hm(d,r)).done;){try{o=g(u.value)}catch(e){Xm(r,"throw",e)}if("object"==typeof o&&o&&Qm(tg,o))return o}return new eg(!1)},rg=Op,ag=Hp.CONSTRUCTOR||!hc((function(e){rg.all(e).then(void 0,(function(){}))})),ig=ht,sg=xt,og=zp,dg=Rp,ug=ng;Li({target:"Promise",stat:!0,forced:ag},{all:function(e){var t=this,n=og.f(t),r=n.resolve,a=n.reject,i=dg((function(){var n=sg(t.resolve),i=[],s=0,o=1;ug(e,(function(e){var d=s++,u=!1;o++,ig(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise}});var cg=Li,lg=Hp.CONSTRUCTOR,hg=Op,fg=we,pg=ve,mg=Ke.exports,gg=hg&&hg.prototype;if(cg({target:"Promise",proto:!0,forced:lg,real:!0},{catch:function(e){return this.then(void 0,e)}}),pg(hg)){var vg=fg("Promise").prototype.catch;gg.catch!==vg&&mg(gg,"catch",vg,{unsafe:!0})}var bg=ht,yg=xt,_g=zp,wg=Rp,Ag=ng;Li({target:"Promise",stat:!0,forced:ag},{race:function(e){var t=this,n=_g.f(t),r=n.reject,a=wg((function(){var a=yg(t.resolve);Ag(e,(function(e){bg(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var kg=ht,Eg=zp;Li({target:"Promise",stat:!0,forced:Hp.CONSTRUCTOR},{reject:function(e){var t=Eg.f(this);return kg(t.reject,void 0,e),t.promise}});var xg=ut,Sg=Ye,Rg=zp,Tg=function(e,t){if(xg(e),Sg(t)&&t.constructor===e)return t;var n=Rg.f(e);return(0,n.resolve)(t),n.promise},Dg=Li,Og=Hp.CONSTRUCTOR,Ig=Tg;we("Promise"),Dg({target:"Promise",stat:!0,forced:Og},{resolve:function(e){return Ig(this,e)}});var Pg=Li,Cg=N,Lg=J,Ug=jr,Mg=Ye,jg=de,Bg=Ur,Gg=ks,Ng=ia,qg=eu,Fg=De,Vg=He("isConcatSpreadable"),Hg=Cg.TypeError,zg=Fg>=51||!Lg((function(){var e=[];return e[Vg]=!1,e.concat()[0]!==e})),Wg=qg("concat"),Kg=function(e){if(!Mg(e))return!1;var t=e[Vg];return void 0!==t?!!t:Ug(e)};Pg({target:"Array",proto:!0,forced:!zg||!Wg},{concat:function(e){var t,n,r,a,i,s=jg(this),o=Ng(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Kg(i=-1===t?s:arguments[t])){if(d+(a=Bg(i))>9007199254740991)throw Hg("Maximum allowed index exceeded");for(n=0;n<a;n++,d++)n in i&&Gg(o,d,i[n])}else{if(d>=9007199254740991)throw Hg("Maximum allowed index exceeded");Gg(o,d++,i)}return o.length=d,o}});var $g=$e,Qg=Nn.EXISTS,Jg=re,Yg=Qe.f,Xg=Function.prototype,Zg=Jg(Xg.toString),ev=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,tv=Jg(ev.exec);function nv(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 rv(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 rv(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 rv(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 av(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 iv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?av(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):av(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}$g&&!Qg&&Yg(Xg,"name",{configurable:!0,get:function(){try{return tv(ev,Zg(this))[1]}catch(e){return""}}});var sv,ov={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"}},dv={},uv=function(e,t){dv[e]=iv(iv({},t),{},{isLoading:!1})},cv=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))},lv=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=dv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=nv(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=ov[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,cv({id:s,src:ov[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,cv({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)}}(),hv=new(S.default((function e(){var t=this;R.default(this,e),T.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,lv("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),T.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)}}()),T.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"]},uv(this.moduleName,this.moduleConfig)}))),fv=Ye,pv=er,mv=He("match"),gv=function(e){var t;return fv(e)&&(void 0!==(t=e[mv])?!!t:"RegExp"==pv(e))},vv=gv,bv=N.TypeError,yv=function(e){if(vv(e))throw bv("The method doesn't accept regular expressions");return e},_v=He("match"),wv=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[_v]=!1,"/./"[e](t)}catch(e){}}return!1},Av=Li,kv=re,Ev=Ea.f,xv=Cr,Sv=Yi,Rv=yv,Tv=ie,Dv=wv,Ov=kv("".startsWith),Iv=kv("".slice),Pv=Math.min,Cv=Dv("startsWith");Av({target:"String",proto:!0,forced:!!(Cv||(sv=Ev(String.prototype,"startsWith"),!sv||sv.writable))&&!Cv},{startsWith:function(e){var t=Sv(Tv(this));Rv(e);var n=xv(Pv(arguments.length>1?arguments[1]:void 0,t.length)),r=Sv(e);return Ov?Ov(t,r,n):Iv(t,n,n+r.length)===r}});var Lv=ht,Uv=le,Mv=ft,jv=Ol,Bv=RegExp.prototype,Gv=function(e){var t=e.flags;return void 0!==t||"flags"in Bv||Uv(e,"flags")||!Mv(Bv,e)?t:Lv(jv,e)},Nv=Nn.PROPER,qv=Ke.exports,Fv=ut,Vv=Yi,Hv=J,zv=Gv,Wv=RegExp.prototype.toString,Kv=Hv((function(){return"/a/b"!=Wv.call({source:"a",flags:"b"})})),$v=Nv&&"toString"!=Wv.name;(Kv||$v)&&qv(RegExp.prototype,"toString",(function(){var e=Fv(this);return"/"+Vv(e.source)+"/"+Vv(zv(e))}),{unsafe:!0});var Qv=re,Jv=Ke.exports,Yv=dh,Xv=J,Zv=He,eb=en,tb=Zv("species"),nb=RegExp.prototype,rb=function(e,t,n,r){var a=Zv(e),i=!Xv((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!Xv((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[tb]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=Qv(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=Qv(e),d=t.exec;return d===Yv||d===nb.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Jv(String.prototype,e,d[0]),Jv(nb,a,d[1])}r&&eb(nb[a],"sham",!0)},ab=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ib=ht,sb=ut,ob=ve,db=er,ub=dh,cb=N.TypeError,lb=function(e,t){var n=e.exec;if(ob(n)){var r=ib(n,e,t);return null!==r&&sb(r),r}if("RegExp"===db(e))return ib(ub,e,t);throw cb("RegExp#exec called on incompatible receiver")},hb=ht,fb=ut,pb=ie,mb=ab,gb=Yi,vb=Rt,bb=lb;function yb(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 _b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yb(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}rb("search",(function(e,t,n){return[function(t){var n=pb(this),r=null==t?void 0:vb(t,e);return r?hb(r,t,n):new RegExp(t)[e](gb(n))},function(e){var r=fb(this),a=gb(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;mb(s,0)||(r.lastIndex=0);var o=bb(r,a);return mb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var wb,Ab,kb=function(){function e(){R.default(this,e)}return S.default(e,[{key:"getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",p);var m=(e||n)&&r.loaderEnabled,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 D.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 D.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new D.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 D.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 D.default(e,!0);return n.query=_b(_b({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),Eb=function(){try{return(new kb).getBridgeContext()}catch(e){return{}}}(),xb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(wb=!1,(Ab=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===Ab.xanthophyll&&(wb=!0),wb)},Sb=xc.charAt,Rb=function(e,t,n){return t+(n?Sb(e,t).length:1)},Tb=re,Db=de,Ob=Math.floor,Ib=Tb("".charAt),Pb=Tb("".replace),Cb=Tb("".slice),Lb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ub=/\$([$&'`]|\d{1,2})/g,Mb=Ad,jb=ht,Bb=re,Gb=rb,Nb=J,qb=ut,Fb=ve,Vb=Or,Hb=Cr,zb=Yi,Wb=ie,Kb=Rb,$b=Rt,Qb=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=Ub;return void 0!==a&&(a=Db(a),d=Lb),Pb(i,d,(function(i,d){var u;switch(Ib(d,0)){case"$":return"$";case"&":return e;case"`":return Cb(t,0,n);case"'":return Cb(t,s);case"<":u=a[Cb(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=Ob(c/10);return 0===l?i:l<=o?void 0===r[l-1]?Ib(d,1):r[l-1]+Ib(d,1):i}u=r[c-1]}return void 0===u?"":u}))},Jb=lb,Yb=He("replace"),Xb=Math.max,Zb=Math.min,ey=Bb([].concat),ty=Bb([].push),ny=Bb("".indexOf),ry=Bb("".slice),ay="$0"==="a".replace(/./,"$0"),iy=!!/./[Yb]&&""===/./[Yb]("a","$0");Gb("replace",(function(e,t,n){var r=iy?"$":"$0";return[function(e,n){var r=Wb(this),a=null==e?void 0:$b(e,Yb);return a?jb(a,e,r,n):jb(t,zb(r),e,n)},function(e,a){var i=qb(this),s=zb(e);if("string"==typeof a&&-1===ny(a,r)&&-1===ny(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=Fb(a);d||(a=zb(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=Jb(i,s);if(null===h)break;if(ty(l,h),!u)break;""===zb(h[0])&&(i.lastIndex=Kb(s,Hb(i.lastIndex),c))}for(var f,p="",m=0,g=0;g<l.length;g++){for(var v=zb((h=l[g])[0]),b=Xb(Zb(Vb(h.index),s.length),0),y=[],_=1;_<h.length;_++)ty(y,void 0===(f=h[_])?f:String(f));var w=h.groups;if(d){var A=ey([v],y,b,s);void 0!==w&&ty(A,w);var k=zb(Mb(a,void 0,A))}else k=Qb(v,s,b,y,w,a);b>=m&&(p+=ry(s,m,b)+k,m=b+v.length)}return p+ry(s,m)}]}),!!Nb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!ay||iy);var sy=J,oy=He("iterator"),dy=!sy((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[oy]||"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})),uy=Ds,cy=Math.floor,ly=function(e,t){var n=e.length,r=cy(n/2);return n<8?hy(e,t):fy(e,ly(uy(e,0,r),t),ly(uy(e,r),t),t)},hy=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},fy=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},py=ly,my=Li,gy=N,vy=ht,by=re,yy=$e,_y=dy,wy=Ke.exports,Ay=uf,ky=Js,Ey=Jc,xy=Ln,Sy=vf,Ry=ve,Ty=le,Dy=wr,Oy=dr,Iy=ut,Py=Ye,Cy=Yi,Ly=bs,Uy=Yt,My=Qu,jy=Fu,By=Sf,Gy=py,Ny=He("iterator"),qy=xy.set,Fy=xy.getterFor("URLSearchParams"),Vy=xy.getterFor("URLSearchParamsIterator"),Hy=Object.getOwnPropertyDescriptor,zy=function(e){if(!yy)return gy[e];var t=Hy(gy,e);return t&&t.value},Wy=zy("fetch"),Ky=zy("Request"),$y=zy("Headers"),Qy=Ky&&Ky.prototype,Jy=$y&&$y.prototype,Yy=gy.RegExp,Xy=gy.TypeError,Zy=gy.decodeURIComponent,e_=gy.encodeURIComponent,t_=by("".charAt),n_=by([].join),r_=by([].push),a_=by("".replace),i_=by([].shift),s_=by([].splice),o_=by("".split),d_=by("".slice),u_=/\+/g,c_=Array(4),l_=function(e){return c_[e-1]||(c_[e-1]=Yy("((?:%[\\da-f]{2}){"+e+"})","gi"))},h_=function(e){try{return Zy(e)}catch(t){return e}},f_=function(e){var t=a_(e,u_," "),n=4;try{return Zy(t)}catch(e){for(;n;)t=a_(t,l_(n--),h_);return t}},p_=/[!'()~]|%20/g,m_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},g_=function(e){return m_[e]},v_=function(e){return a_(e_(e),p_,g_)},b_=Ey((function(e,t){qy(this,{type:"URLSearchParamsIterator",iterator:My(Fy(e).entries),kind:t})}),"Iterator",(function(){var e=Vy(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),y_=function(e){this.entries=[],this.url=null,void 0!==e&&(Py(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===t_(e,0)?d_(e,1):e:Cy(e)))};y_.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,s,o,d=jy(e);if(d)for(n=(t=My(e,d)).next;!(r=vy(n,t)).done;){if(i=(a=My(Iy(r.value))).next,(s=vy(i,a)).done||(o=vy(i,a)).done||!vy(i,a).done)throw Xy("Expected sequence with length 2");r_(this.entries,{key:Cy(s.value),value:Cy(o.value)})}else for(var u in e)Ty(e,u)&&r_(this.entries,{key:u,value:Cy(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=o_(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=o_(t,"="),r_(this.entries,{key:f_(i_(n)),value:f_(n_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],r_(n,v_(e.key)+"="+v_(e.value));return n_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var __=function(){Sy(this,w_);var e=arguments.length>0?arguments[0]:void 0;qy(this,new y_(e))},w_=__.prototype;if(Ay(w_,{append:function(e,t){By(arguments.length,2);var n=Fy(this);r_(n.entries,{key:Cy(e),value:Cy(t)}),n.updateURL()},delete:function(e){By(arguments.length,1);for(var t=Fy(this),n=t.entries,r=Cy(e),a=0;a<n.length;)n[a].key===r?s_(n,a,1):a++;t.updateURL()},get:function(e){By(arguments.length,1);for(var t=Fy(this).entries,n=Cy(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){By(arguments.length,1);for(var t=Fy(this).entries,n=Cy(e),r=[],a=0;a<t.length;a++)t[a].key===n&&r_(r,t[a].value);return r},has:function(e){By(arguments.length,1);for(var t=Fy(this).entries,n=Cy(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){By(arguments.length,1);for(var n,r=Fy(this),a=r.entries,i=!1,s=Cy(e),o=Cy(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?s_(a,d--,1):(i=!0,n.value=o));i||r_(a,{key:s,value:o}),r.updateURL()},sort:function(){var e=Fy(this);Gy(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=Fy(this).entries,r=Dy(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 b_(this,"keys")},values:function(){return new b_(this,"values")},entries:function(){return new b_(this,"entries")}},{enumerable:!0}),wy(w_,Ny,w_.entries,{name:"entries"}),wy(w_,"toString",(function(){return Fy(this).serialize()}),{enumerable:!0}),ky(__,"URLSearchParams"),my({global:!0,forced:!_y},{URLSearchParams:__}),!_y&&Ry($y)){var A_=by(Jy.has),k_=by(Jy.set),E_=function(e){if(Py(e)){var t,n=e.body;if("URLSearchParams"===Oy(n))return t=e.headers?new $y(e.headers):new $y,A_(t,"content-type")||k_(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ly(e,{body:Uy(0,Cy(n)),headers:Uy(0,t)})}return e};if(Ry(Wy)&&my({global:!0,enumerable:!0,noTargetGet:!0,forced:!0},{fetch:function(e){return Wy(e,arguments.length>1?E_(arguments[1]):{})}}),Ry(Ky)){var x_=function(e){return Sy(this,Qy),new Ky(e,arguments.length>1?E_(arguments[1]):{})};Qy.constructor=x_,x_.prototype=Qy,my({global:!0,forced:!0,noTargetGet:!0},{Request:x_})}}var S_={URLSearchParams:__,getState:Fy},R_=Ja.includes,T_=Ch;Li({target:"Array",proto:!0,forced:J((function(){return!Array(1).includes()}))},{includes:function(e){return R_(this,e,arguments.length>1?arguments[1]:void 0)}}),T_("includes");var D_=Li,O_=yv,I_=ie,P_=Yi,C_=wv,L_=re("".indexOf);D_({target:"String",proto:!0,forced:!C_("includes")},{includes:function(e){return!!~L_(P_(I_(this)),P_(O_(e)),arguments.length>1?arguments[1]:void 0)}});var U_=Ad,M_=ht,j_=re,B_=rb,G_=gv,N_=ut,q_=ie,F_=Ef,V_=Rb,H_=Cr,z_=Yi,W_=Rt,K_=Ds,$_=lb,Q_=dh,J_=J,Y_=Ul.UNSUPPORTED_Y,X_=Math.min,Z_=[].push,ew=j_(/./.exec),tw=j_(Z_),nw=j_("".slice);function rw(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 D.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),O.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(I.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?I.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))}}}B_("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=z_(q_(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!G_(e))return M_(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=M_(Q_,l,r))&&!((s=l.lastIndex)>c&&(tw(d,nw(r,c,i.index)),i.length>1&&i.index<r.length&&U_(Z_,d,K_(i,1)),o=i[0].length,c=s,d.length>=a));)l.lastIndex===i.index&&l.lastIndex++;return c===r.length?!o&&ew(l,"")||tw(d,""):tw(d,nw(r,c)),d.length>a?K_(d,0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:M_(t,this,e,n)}:t,[function(t,n){var a=q_(this),i=null==t?void 0:W_(t,e);return i?M_(i,t,a,n):M_(r,z_(a),t,n)},function(e,a){var i=N_(this),s=z_(e),o=n(r,i,s,a,r!==t);if(o.done)return o.value;var d=F_(i,RegExp),u=i.unicode,c=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(Y_?"g":"y"),l=new d(Y_?"^(?:"+i.source+")":i,c),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===s.length)return null===$_(l,s)?[s]:[];for(var f=0,p=0,m=[];p<s.length;){l.lastIndex=Y_?0:p;var g,v=$_(l,Y_?nw(s,p):s);if(null===v||(g=X_(H_(l.lastIndex+(Y_?p:0)),s.length))===f)p=V_(s,p,u);else{if(tw(m,nw(s,f,p)),m.length===h)return m;for(var b=1;b<=v.length-1;b++)if(tw(m,v[b]),m.length===h)return m;p=f=g}}return tw(m,nw(s,f)),m}]}),!!J_((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]})),Y_);var aw="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==aw&&aw,iw="URLSearchParams"in aw,sw="Symbol"in aw&&"iterator"in Symbol,ow="FileReader"in aw&&"Blob"in aw&&function(){try{return new Blob,!0}catch(e){return!1}}(),dw="FormData"in aw,uw="ArrayBuffer"in aw;if(uw)var cw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],lw=ArrayBuffer.isView||function(e){return e&&cw.indexOf(Object.prototype.toString.call(e))>-1};function hw(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 fw(e){return"string"!=typeof e&&(e=String(e)),e}function pw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return sw&&(t[Symbol.iterator]=function(){return t}),t}function mw(e){this.map={},e instanceof mw?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 gw(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function vw(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function bw(e){var t=new FileReader,n=vw(t);return t.readAsArrayBuffer(e),n}function yw(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function _w(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:ow&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:dw&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:iw&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():uw&&ow&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=yw(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):uw&&(ArrayBuffer.prototype.isPrototypeOf(e)||lw(e))?this._bodyArrayBuffer=yw(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):iw&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},ow&&(this.blob=function(){var e=gw(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=gw(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(bw)}),this.text=function(){var e=gw(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=vw(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)},dw&&(this.formData=function(){return this.text().then(kw)}),this.json=function(){return this.text().then(JSON.parse)},this}mw.prototype.append=function(e,t){e=hw(e),t=fw(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},mw.prototype.delete=function(e){delete this.map[hw(e)]},mw.prototype.get=function(e){return e=hw(e),this.has(e)?this.map[e]:null},mw.prototype.has=function(e){return this.map.hasOwnProperty(hw(e))},mw.prototype.set=function(e,t){this.map[hw(e)]=fw(t)},mw.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},mw.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),pw(e)},mw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),pw(e)},mw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),pw(e)},sw&&(mw.prototype[Symbol.iterator]=mw.prototype.entries);var ww=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Aw(e,t){if(!(this instanceof Aw))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 Aw){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new mw(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 mw(t.headers)),this.method=function(e){var t=e.toUpperCase();return ww.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 kw(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 Ew(e,t){if(!(this instanceof Ew))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 mw(t.headers),this.url=t.url||"",this._initBody(e)}Aw.prototype.clone=function(){return new Aw(this,{body:this._bodyInit})},_w.call(Aw.prototype),_w.call(Ew.prototype),Ew.prototype.clone=function(){return new Ew(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new mw(this.headers),url:this.url})},Ew.error=function(){var e=new Ew(null,{status:0,statusText:""});return e.type="error",e};var xw=[301,302,303,307,308];Ew.redirect=function(e,t){if(-1===xw.indexOf(t))throw new RangeError("Invalid status code");return new Ew(null,{status:t,headers:{location:e}})};var Sw,Rw=aw.DOMException;try{new Rw}catch(e){Rw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Rw.prototype=Object.create(Error.prototype),Rw.prototype.constructor=Rw}function Tw(e,t){return new Promise((function(n,r){var a=new Aw(e,t);if(a.signal&&a.signal.aborted)return r(new Rw("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 mw,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 Ew(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 Rw("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&aw.location.href?aw.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&&(ow?i.responseType="blob":uw&&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 mw?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,fw(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)}))}Tw.polyfill=!0,aw.fetch||(aw.fetch=Tw,aw.Headers=mw,aw.Request=Aw,aw.Response=Ew);var Dw=function(e){var t=this;if(!Sw){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:Eb.topDomain,domain:Eb.parentDomain,referrer:Eb.parentURL,depth:a.getIframeDepth(),version:Vi.version,byloader:Eb.isTokenGameURL,isTokenGameURL:Eb.isTokenGameURL,isMasterGameURL:Eb.isMasterGameURL,isExtHostedGameURL:Eb.isExtHostedGameURL,byloaderVersion:Eb.version,tracking:xb.userDeclinedTracking,whitelabel:xb.whitelabelPartner,platform:a.getMobilePlatform()};Sw=new a.MessageRouter(n)}return Sw||{send:function(){k.default(this,t)}.bind(this)}},Ow={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(n).then(function(e){k.default(this,t)}.bind(this)).catch(function(e){k.default(this,t)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var t=this;try{var n="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(n).then(function(e){k.default(this,t)}.bind(this)).catch(function(e){k.default(this,t)}.bind(this))}catch(e){}}};function Iw(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 Pw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Iw(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Iw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cw,Lw,Uw,Mw=new m.EventEmitter,jw=[],Bw=function(e){jw.push(e)},Gw=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(Lw){e.next=6;break}return e.next=3,Fw(Uw);case 3:Lw=e.sent,Mw.emit("game-data-ready",Lw),Nw();case 6:return e.abrupt("return",Lw);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Nw=function(){var e,t;if(null!==(e=Lw)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(qw(),null!==(n=Lw)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=Lw)&&void 0!==i&&i.url)Ow.getGameData(null===(s=Lw)||void 0===s?void 0:s.url);setInterval(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.prev=0,e.next=3,Fw(Uw);case 3:Lw=e.sent,null===(t=Lw)||void 0===t||t.aws_tst,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},qw=function(){var e=window.fetch;window.fetch=A.default(x.default.mark((function t(){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,g,v,b,y,_,w=this,A=arguments;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(d=A.length,u=new Array(d),c=0;c<d;c++)u[c]=A[c];l=u[0],h=u[1],f=null===(n=Lw)||void 0===n||null===(r=n.aws_tst)||void 0===r||null===(a=r.ep)||void 0===a?void 0:a.atm,p=null===(i=Lw)||void 0===i||null===(s=i.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.msgrt,m=function(t,n){var r=this;k.default(this,w);var a=l.replace(t,n);e(a,h).then(function(){k.default(this,r)}.bind(this))}.bind(this);try{f&&l.indexOf("tag.atom")>0&&m("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),p&&l.indexOf("msgrt.gamedistribution.com")>0&&(null===(g=Lw)||void 0===g||g.aws_tst,null===(v=Lw)||void 0===v||null===(b=v.aws_tst)||void 0===b||null===(y=b.ep)||void 0===y||y.msgrt,m("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return t.next=9,e(l,h);case 9:return _=t.sent,t.abrupt("return",_);case 11:case"end":return t.stop()}}),t,this)})))},Fw=function(e){var t=this;Cw.send("gdfw.loading",{message:"loading"}),jw=[],Bw("1"),Bw("2");var n=new rw;Bw("3");var r=n.get("partner.domain.value");Bw("4");var i=function(){return k.default(this,t),{gameId:e.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);Bw("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(Vi.version,"&localTime=").concat((new Date).getHours())}.bind(this);Bw("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 Bw("7"),new Promise(function(e){var n=this;k.default(this,t),Bw("7.1");var r=i();try{Bw("7.2");var o=s();Bw("7.3"),fetch(o).then(function(e){return k.default(this,n),Bw("7.4"),e.json()}.bind(this)).then(function(t){var i=this;if(k.default(this,n),Bw("7.5"),t.success){var s,d,u,c=t.result.game;Bw("7.6");var l={gameId:c.gameMd5,slug:c.slug,pname:c.pname,dname:c.dname,status:c.status,description:c.description,disableAds:c.enableAds,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,aws_tst:c.aws_tst,__t4r:Hi(c.__t4r)||{},block_exts:Hi(c.push_cuda),bloc_gard:Hi(c.bloc_gard),cookie:Hi(c.cookie),gdpr:Hi(c.gdpr),diagnostic:Hi(c.diagnostic),cmp:Hi(c.cmp),gft:Hi(c.gft)||{},sdk:Hi(c.sdk)||{},sdkfw:Hi(c.sdkfw)||{},loader:Hi(c.loader)||{},splash:Hi(c.splash)||{},promo:Hi(c.promo)||{},dAds:Hi(c.dads)||{},pAds:Hi(c.pads)||{},mAds:Hi(c.mads)||{},rAds:Hi(c.rads)||{},lp:Hi(c.lp)||{},extsc:Hi(c.extsc)||{},evnts:Hi(c.evnts)||{},dp:Hi(c.dp)||{},adflw:Hi(c.adflw)||{},afgszf:Hi(c.afgszf)||{},fllc:Hi(c.fllc)||{},lotm:Hi(c.lotm)||{},t4rc:Hi(c.t4rc)||{},midroll_plus:Hi(c.midroll_plus)||{}};Bw("7.7");var h=a.extendDefaults(L.default(r),l);Bw("7.8"),h.afg_disabled=!1===(null===(s=h.sdk)||void 0===s||null===(d=s.afg)||void 0===d?void 0:d.enabled),h.url=o,function(){k.default(this,i),void 0!==$i.afgEnabled&&(h.afg_disabled=!$i.afgEnabled),void 0!==$i.promoEnabled&&(h.promo=h.promo||{},h.promo=Pw(Pw({},h.promo),{},{rainbow:{enabled:$i.promoEnabled}}))}.bind(this),Bw("7.9"),null!==(u=h.pAds)&&void 0!==u&&u.enabled&&(h.preroll=!0),Bw("7.10"),Cw.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=jw[jw.length-1];Cw.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){k.default(this,n);var a=jw[jw.length-1];Cw.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var d=jw[jw.length-1];Cw.send("gdfw.err",{message:"".concat(d,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}.bind(this))},Vw=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,Gw();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)}}(),Hw=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,Gw();case 2:return n=e.sent,e.next=5,Vw();case 5:if(e.t0=e.sent,!e.t0){e.next=8;break}e.t0=!(null==n||null===(t=n.sdkfw)||void 0===t||!t.handshake);case 8:return e.abrupt("return",e.t0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),zw=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,Gw();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)}}(),Ww=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,zw();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)}}(),Kw=!1,$w=!1,Qw=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(!Kw){e.next=4;break}return e.abrupt("return",t($w));case 4:Kw=!0;case 5:return e.next=7,zw();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 $w=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){k.default(this,d),s&&(s=!1,Kw=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){k.default(this,d),s&&i&&window[a]?(s=!1,Kw=!0,$w=!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)}}())},Jw=Li,Yw=Op,Xw=J,Zw=we,eA=ve,tA=Ef,nA=Tg,rA=Ke.exports,aA=Yw&&Yw.prototype;if(Jw({target:"Promise",proto:!0,real:!0,forced:!!Yw&&Xw((function(){aA.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=tA(this,Zw("Promise")),n=eA(e);return this.then(n?function(n){return nA(t,e()).then((function(){return n}))}:e,n?function(n){return nA(t,e()).then((function(){throw n}))}:e)}}),eA(Yw)){var iA=Zw("Promise").prototype.finally;aA.finally!==iA&&rA(aA,"finally",iA,{unsafe:!0})}var sA=ie,oA=Yi,dA=re("".replace),uA="[\t\n\v\f\r \u2028\u2029\ufeff]",cA=RegExp("^"+uA+uA+"*"),lA=RegExp(uA+uA+"*$"),hA=function(e){return function(t){var n=oA(sA(t));return 1&e&&(n=dA(n,cA,"")),2&e&&(n=dA(n,lA,"")),n}},fA={start:hA(1),end:hA(2),trim:hA(3)},pA=Nn.PROPER,mA=J,gA="\t\n\v\f\r \u2028\u2029\ufeff",vA=fA.trim;Li({target:"String",proto:!0,forced:function(e){return mA((function(){return!!gA[e]()||"
"!=="
"[e]()||pA&&gA[e].name!==e}))}("trim")},{trim:function(){return vA(this)}});var bA=ve,yA=Ye,_A=al,wA=Qe.f,AA=$e,kA=N,EA=re,xA=Si,SA=function(e,t,n){var r,a;return _A&&bA(r=t.constructor)&&r!==n&&yA(a=r.prototype)&&a!==n.prototype&&_A(e,a),e},RA=en,TA=qa.f,DA=ft,OA=gv,IA=Yi,PA=Gv,CA=Ul,LA=function(e,t,n){n in e||wA(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},UA=Ke.exports,MA=J,jA=le,BA=Ln.enforce,GA=pf,NA=Bl,qA=ql,FA=He("match"),VA=kA.RegExp,HA=VA.prototype,zA=kA.SyntaxError,WA=EA(HA.exec),KA=EA("".charAt),$A=EA("".replace),QA=EA("".indexOf),JA=EA("".slice),YA=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,XA=/a/g,ZA=/a/g,ek=new VA(XA)!==XA,tk=CA.MISSED_STICKY,nk=CA.UNSUPPORTED_Y,rk=AA&&(!ek||tk||NA||qA||MA((function(){return ZA[FA]=!1,VA(XA)!=XA||VA(ZA)==ZA||"/a/i"!=VA(XA,"i")})));if(xA("RegExp",rk)){for(var ak=function(e,t){var n,r,a,i,s,o,d=DA(HA,this),u=OA(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===ak)return e;if((u||DA(HA,e))&&(e=e.source,c&&(t=PA(h))),e=void 0===e?"":IA(e),t=void 0===t?"":IA(t),h=e,NA&&"dotAll"in XA&&(r=!!t&&QA(t,"s")>-1)&&(t=$A(t,/s/g,"")),n=t,tk&&"sticky"in XA&&(a=!!t&&QA(t,"y")>-1)&&nk&&(t=$A(t,/y/g,"")),qA&&(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=KA(e,r)))t+=KA(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:WA(YA,JA(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||jA(s,c))throw new zA("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=SA(VA(e,t),d?this:HA,ak),(r||a||l.length)&&(o=BA(s),r&&(o.dotAll=!0,o.raw=ak(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=KA(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+KA(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{RA(s,"source",""===h?"(?:)":h)}catch(e){}return s},ik=TA(VA),sk=0;ik.length>sk;)LA(ak,VA,ik[sk++]);HA.constructor=ak,ak.prototype=HA,UA(kA,"RegExp",ak)}GA("RegExp");var ok=Li,dk=fa.find,uk=Ch,ck=!0;"find"in[]&&Array(1).find((function(){ck=!1})),ok({target:"Array",proto:!0,forced:ck},{find:function(e){return dk(this,e,arguments.length>1?arguments[1]:void 0)}}),uk("find");var lk=Li,hk=Rr,fk=Ia,pk=ma,mk=re([].join),gk=hk!=Object,vk=pk("join",",");lk({target:"Array",proto:!0,forced:gk||!vk},{join:function(e){return mk(fk(this),void 0===e?",":e)}});var bk=fa.map;Li({target:"Array",proto:!0,forced:!eu("map")},{map:function(e){return bk(this,e,arguments.length>1?arguments[1]:void 0)}});var yk=$e,_k=re,wk=ht,Ak=J,kk=ji,Ek=si,xk=xa,Sk=de,Rk=Rr,Tk=Object.assign,Dk=Object.defineProperty,Ok=_k([].concat),Ik=!Tk||Ak((function(){if(yk&&1!==Tk({b:1},Tk(Dk({},"a",{enumerable:!0,get:function(){Dk(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!=Tk({},e)[n]||kk(Tk({},t)).join("")!=r}))?function(e,t){for(var n=Sk(e),r=arguments.length,a=1,i=Ek.f,s=xk.f;r>a;)for(var o,d=Rk(arguments[a++]),u=i?Ok(kk(d),i(d)):kk(d),c=u.length,l=0;c>l;)o=u[l++],yk&&!wk(s,d,o)||(n[o]=d[o]);return n}:Tk,Pk=Ik;Li({target:"Object",stat:!0,forced:Object.assign!==Pk},{assign:Pk});var Ck,Lk=re,Uk=/[^\0-\u007E]/,Mk=/[.\u3002\uFF0E\uFF61]/g,jk="Overflow: input needs wider integers to process",Bk=N.RangeError,Gk=Lk(Mk.exec),Nk=Math.floor,qk=String.fromCharCode,Fk=Lk("".charCodeAt),Vk=Lk([].join),Hk=Lk([].push),zk=Lk("".replace),Wk=Lk("".split),Kk=Lk("".toLowerCase),$k=function(e){return e+22+75*(e<26)},Qk=function(e,t,n){var r=0;for(e=n?Nk(e/700):e>>1,e+=Nk(e/t);e>455;)e=Nk(e/35),r+=36;return Nk(r+36*e/(e+38))},Jk=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=Fk(e,n++);if(a>=55296&&a<=56319&&n<r){var i=Fk(e,n++);56320==(64512&i)?Hk(t,((1023&a)<<10)+(1023&i)+65536):(Hk(t,a),n--)}else Hk(t,a)}return t}(e);var n,r,a=e.length,i=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&Hk(t,qk(r));var d=t.length,u=d;for(d&&Hk(t,"-");u<a;){var c=2147483647;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<c&&(c=r);var l=u+1;if(c-i>Nk((2147483647-s)/l))throw Bk(jk);for(s+=(c-i)*l,i=c,n=0;n<e.length;n++){if((r=e[n])<i&&++s>2147483647)throw Bk(jk);if(r==i){for(var h=s,f=36;;){var p=f<=o?1:f>=o+26?26:f-o;if(h<p)break;var m=h-p,g=36-p;Hk(t,qk($k(p+m%g))),h=Nk(m/g),f+=36}Hk(t,qk($k(h))),o=Qk(s,l,u==d),s=0,u++}}s++,i++}return Vk(t,"")},Yk=Li,Xk=$e,Zk=dy,eE=N,tE=wr,nE=re,rE=Xi.f,aE=Ke.exports,iE=vf,sE=le,oE=Ik,dE=oc,uE=Ds,cE=xc.codeAt,lE=function(e){var t,n,r=[],a=Wk(zk(Kk(e),Mk,"."),".");for(t=0;t<a.length;t++)n=a[t],Hk(r,Gk(Uk,n)?"xn--"+Jk(n):n);return Vk(r,".")},hE=Yi,fE=Js,pE=Sf,mE=S_,gE=Ln,vE=gE.set,bE=gE.getterFor("URL"),yE=mE.URLSearchParams,_E=mE.getState,wE=eE.URL,AE=eE.TypeError,kE=eE.parseInt,EE=Math.floor,xE=Math.pow,SE=nE("".charAt),RE=nE(/./.exec),TE=nE([].join),DE=nE(1..toString),OE=nE([].pop),IE=nE([].push),PE=nE("".replace),CE=nE([].shift),LE=nE("".split),UE=nE("".slice),ME=nE("".toLowerCase),jE=nE([].unshift),BE=/[a-z]/i,GE=/[\d+-.a-z]/i,NE=/\d/,qE=/^0x/i,FE=/^[0-7]+$/,VE=/^\d+$/,HE=/^[\da-f]+$/i,zE=/[\0\t\n\r #%/:<>?@[\\\]^|]/,WE=/[\0\t\n\r #/:<>?@[\\\]^|]/,KE=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,$E=/[\t\n\r]/g,QE=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)jE(t,e%256),e=EE(e/256);return TE(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,i=0;i<8;i++)0!==e[i]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=i),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=DE(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},JE={},YE=oE({},JE,{" ":1,'"':1,"<":1,">":1,"`":1}),XE=oE({},YE,{"#":1,"?":1,"{":1,"}":1}),ZE=oE({},XE,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ex=function(e,t){var n=cE(e,0);return n>32&&n<127&&!sE(t,e)?e:encodeURIComponent(e)},tx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},nx=function(e,t){var n;return 2==e.length&&RE(BE,SE(e,0))&&(":"==(n=SE(e,1))||!t&&"|"==n)},rx=function(e){var t;return e.length>1&&nx(UE(e,0,2))&&(2==e.length||"/"===(t=SE(e,2))||"\\"===t||"?"===t||"#"===t)},ax=function(e){return"."===e||"%2e"===ME(e)},ix={},sx={},ox={},dx={},ux={},cx={},lx={},hx={},fx={},px={},mx={},gx={},vx={},bx={},yx={},_x={},wx={},Ax={},kx={},Ex={},xx={},Sx=function(e,t,n){var r,a,i,s=hE(e);if(t){if(a=this.parse(s))throw AE(a);this.searchParams=null}else{if(void 0!==n&&(r=new Sx(n,!0)),a=this.parse(s,null,r))throw AE(a);(i=_E(new yE)).bindURL(this),this.searchParams=i}};Sx.prototype={type:"URL",parse:function(e,t,n){var r,a,i,s,o,d=this,u=t||ix,c=0,l="",h=!1,f=!1,p=!1;for(e=hE(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=PE(e,KE,"")),e=PE(e,$E,""),r=dE(e);c<=r.length;){switch(a=r[c],u){case ix:if(!a||!RE(BE,a)){if(t)return"Invalid scheme";u=ox;continue}l+=ME(a),u=sx;break;case sx:if(a&&(RE(GE,a)||"+"==a||"-"==a||"."==a))l+=ME(a);else{if(":"!=a){if(t)return"Invalid scheme";l="",u=ox,c=0;continue}if(t&&(d.isSpecial()!=sE(tx,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&tx[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?u=bx:d.isSpecial()&&n&&n.scheme==d.scheme?u=dx:d.isSpecial()?u=hx:"/"==r[c+1]?(u=ux,c++):(d.cannotBeABaseURL=!0,IE(d.path,""),u=kx)}break;case ox:if(!n||n.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==a){d.scheme=n.scheme,d.path=uE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,u=xx;break}u="file"==n.scheme?bx:cx;continue;case dx:if("/"!=a||"/"!=r[c+1]){u=cx;continue}u=fx,c++;break;case ux:if("/"==a){u=px;break}u=Ax;continue;case cx:if(d.scheme=n.scheme,a==Ck)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=uE(n.path),d.query=n.query;else if("/"==a||"\\"==a&&d.isSpecial())u=lx;else if("?"==a)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=uE(n.path),d.query="",u=Ex;else{if("#"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=uE(n.path),d.path.length--,u=Ax;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=uE(n.path),d.query=n.query,d.fragment="",u=xx}break;case lx:if(!d.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,u=Ax;continue}u=px}else u=fx;break;case hx:if(u=fx,"/"!=a||"/"!=SE(l,c+1))continue;c++;break;case fx:if("/"!=a&&"\\"!=a){u=px;continue}break;case px:if("@"==a){h&&(l="%40"+l),h=!0,i=dE(l);for(var m=0;m<i.length;m++){var g=i[m];if(":"!=g||p){var v=ex(g,ZE);p?d.password+=v:d.username+=v}else p=!0}l=""}else if(a==Ck||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(h&&""==l)return"Invalid authority";c-=dE(l).length+1,l="",u=mx}else l+=a;break;case mx:case gx:if(t&&"file"==d.scheme){u=_x;continue}if(":"!=a||f){if(a==Ck||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(d.isSpecial()&&""==l)return"Invalid host";if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",u=wx,t)return;continue}"["==a?f=!0:"]"==a&&(f=!1),l+=a}else{if(""==l)return"Invalid host";if(s=d.parseHost(l))return s;if(l="",u=vx,t==gx)return}break;case vx:if(!RE(NE,a)){if(a==Ck||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()||t){if(""!=l){var b=kE(l,10);if(b>65535)return"Invalid port";d.port=d.isSpecial()&&b===tx[d.scheme]?null:b,l=""}if(t)return;u=wx;continue}return"Invalid port"}l+=a;break;case bx:if(d.scheme="file","/"==a||"\\"==a)u=yx;else{if(!n||"file"!=n.scheme){u=Ax;continue}if(a==Ck)d.host=n.host,d.path=uE(n.path),d.query=n.query;else if("?"==a)d.host=n.host,d.path=uE(n.path),d.query="",u=Ex;else{if("#"!=a){rx(TE(uE(r,c),""))||(d.host=n.host,d.path=uE(n.path),d.shortenPath()),u=Ax;continue}d.host=n.host,d.path=uE(n.path),d.query=n.query,d.fragment="",u=xx}}break;case yx:if("/"==a||"\\"==a){u=_x;break}n&&"file"==n.scheme&&!rx(TE(uE(r,c),""))&&(nx(n.path[0],!0)?IE(d.path,n.path[0]):d.host=n.host),u=Ax;continue;case _x:if(a==Ck||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&nx(l))u=Ax;else if(""==l){if(d.host="",t)return;u=wx}else{if(s=d.parseHost(l))return s;if("localhost"==d.host&&(d.host=""),t)return;l="",u=wx}continue}l+=a;break;case wx:if(d.isSpecial()){if(u=Ax,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=Ck&&(u=Ax,"/"!=a))continue}else d.fragment="",u=xx;else d.query="",u=Ex;break;case Ax:if(a==Ck||"/"==a||"\\"==a&&d.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(o=ME(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==a||"\\"==a&&d.isSpecial()||IE(d.path,"")):ax(l)?"/"==a||"\\"==a&&d.isSpecial()||IE(d.path,""):("file"==d.scheme&&!d.path.length&&nx(l)&&(d.host&&(d.host=""),l=SE(l,0)+":"),IE(d.path,l)),l="","file"==d.scheme&&(a==Ck||"?"==a||"#"==a))for(;d.path.length>1&&""===d.path[0];)CE(d.path);"?"==a?(d.query="",u=Ex):"#"==a&&(d.fragment="",u=xx)}else l+=ex(a,XE);break;case kx:"?"==a?(d.query="",u=Ex):"#"==a?(d.fragment="",u=xx):a!=Ck&&(d.path[0]+=ex(a,JE));break;case Ex:t||"#"!=a?a!=Ck&&("'"==a&&d.isSpecial()?d.query+="%27":d.query+="#"==a?"%23":ex(a,JE)):(d.fragment="",u=xx);break;case xx:a!=Ck&&(d.fragment+=ex(a,YE))}c++}},parseHost:function(e){var t,n,r;if("["==SE(e,0)){if("]"!=SE(e,e.length-1))return"Invalid host";if(t=function(e){var t,n,r,a,i,s,o,d=[0,0,0,0,0,0,0,0],u=0,c=null,l=0,h=function(){return SE(e,l)};if(":"==h()){if(":"!=SE(e,1))return;l+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&RE(HE,h());)t=16*t+kE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;l++}if(!RE(NE,h()))return;for(;RE(NE,h());){if(i=kE(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}d[u]=256*d[u]+a,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[u++]=t}else{if(null!==c)return;l++,c=++u}}if(null!==c)for(s=u-c,u=7;0!=u&&s>0;)o=d[u],d[u--]=d[c+s-1],d[c+--s]=o;else if(8!=u)return;return d}(UE(e,1,-1)),!t)return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=lE(e),RE(zE,e))return"Invalid host";if(t=function(e){var t,n,r,a,i,s,o,d=LE(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=d[r]))return e;if(i=10,a.length>1&&"0"==SE(a,0)&&(i=RE(qE,a)?16:8,a=UE(a,8==i?1:2)),""===a)s=0;else{if(!RE(10==i?VE:8==i?FE:HE,a))return e;s=kE(a,i)}IE(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=xE(256,5-t))return null}else if(s>255)return null;for(o=OE(n),r=0;r<n.length;r++)o+=n[r]*xE(256,3-r);return o}(e),null===t)return"Invalid host";this.host=t}else{if(RE(WE,e))return"Invalid host";for(t="",n=dE(e),r=0;r<n.length;r++)t+=ex(n[r],JE);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return sE(tx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&nx(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,a=e.host,i=e.port,s=e.path,o=e.query,d=e.fragment,u=t+":";return null!==a?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=QE(a),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+TE(s,"/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},setHref:function(e){var t=this.parse(e);if(t)throw AE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Rx(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+QE(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(hE(e)+":",ix)},getUsername:function(){return this.username},setUsername:function(e){var t=dE(hE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=ex(t[n],ZE)}},getPassword:function(){return this.password},setPassword:function(e){var t=dE(hE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=ex(t[n],ZE)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?QE(e):QE(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,mx)},getHostname:function(){var e=this.host;return null===e?"":QE(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,gx)},getPort:function(){var e=this.port;return null===e?"":hE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=hE(e))?this.port=null:this.parse(e,vx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+TE(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,wx))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=hE(e))?this.query=null:("?"==SE(e,0)&&(e=UE(e,1)),this.query="",this.parse(e,Ex)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=hE(e))?("#"==SE(e,0)&&(e=UE(e,1)),this.fragment="",this.parse(e,xx)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Rx=function(e){var t=iE(this,Tx),n=pE(arguments.length,1)>1?arguments[1]:void 0,r=vE(t,new Sx(e,!1,n));Xk||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Tx=Rx.prototype,Dx=function(e,t){return{get:function(){return bE(this)[e]()},set:t&&function(e){return bE(this)[t](e)},configurable:!0,enumerable:!0}};if(Xk&&rE(Tx,{href:Dx("serialize","setHref"),origin:Dx("getOrigin"),protocol:Dx("getProtocol","setProtocol"),username:Dx("getUsername","setUsername"),password:Dx("getPassword","setPassword"),host:Dx("getHost","setHost"),hostname:Dx("getHostname","setHostname"),port:Dx("getPort","setPort"),pathname:Dx("getPathname","setPathname"),search:Dx("getSearch","setSearch"),searchParams:Dx("getSearchParams"),hash:Dx("getHash","setHash")}),aE(Tx,"toJSON",(function(){return bE(this).serialize()}),{enumerable:!0}),aE(Tx,"toString",(function(){return bE(this).serialize()}),{enumerable:!0}),wE){var Ox=wE.createObjectURL,Ix=wE.revokeObjectURL;Ox&&aE(Rx,"createObjectURL",tE(Ox,wE)),Ix&&aE(Rx,"revokeObjectURL",tE(Ix,wE))}fE(Rx,"URL"),Yk({global:!0,forced:!Zk,sham:!Xk},{URL:Rx});var Px=function(){function e(t){R.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return S.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 D.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}(),Cx=function(){function e(t,n){R.default(this,e),this.adContainer=t,this.onResume=n}return S.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}(),Lx=function(){function e(t,n){R.default(this,e),this.adContainer=t,this.onResume=n}return S.default(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),Ux=function(){function e(t){R.default(this,e),this.adContainer=t}return S.default(e,[{key:"show",value:function(){this.t4rButton.style.display="block"}},{key:"hide",value:function(){this.t4rButton.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div"),t=document.createElement("p");this.addStyles(),t.innerText="x",e.appendChild(t),e.id="gd__exit__button",e.setAttribute("title","Exit"),e.classList.add("gd__exit__button"),this.t4rButton=e,document.body.appendChild(e)}catch(e){console.log("Exit button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__exit__button__style",e,"\n .gd__exit__button{\n background-color: transparent; \n width: 50px;\n height: 50px;\n position: absolute;\n pointer-events:none; \n z-index: 2000;\n top: 17px;\n right: 17px;\n margin: 0;\n border-radius: 50px;\n border: 1px solid white;\n text-align: center; \n font-size: 16px;\n line-height: normal;\n font-family: 'Arial';\n font-weight: bolder;\n }\n .gd__exit__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),Mx=function(e){if(!e)return!1;var t=jx.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)},jx=Object.prototype.toString;function Bx(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 Gx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bx(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nx(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}var qx,Fx="_cc".concat("13998"),Vx=["https://tags.crwdcntrl.net/c/".concat("13998","/cc.js?ns=").concat(Fx)],Hx=function(){return!!qx&&"function"==typeof qx.bcpf&&"function"==typeof qx.add},zx=function(e,t){try{if(!Hx())return;qx.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},Wx=function(e,t){try{if(!Hx())return;qx.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},Kx=function(e){var t=this;try{zx("act","play"),zx("med","game"),"complete"===document.readyState?qx.bcpf():qx.bcp(),e.tags.forEach(function(e){k.default(this,t),Wx("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),Wx("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},$x=function(){window.addEventListener("load",(function(){Mw.once("game-data-ready",function(){var e=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(e.prev=1,e.t0=null!=Eb&&Eb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,Vw();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(n=t.lotm)&&void 0!==n&&n.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,a.getScript(Vx[0],"LOTCC_".concat("13998"),{alternates:Vx});case 16:"object"===E.default(window[Fx])&&(qx=window[Fx]),Hx()&&Kx(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),e.t1;case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(t){return e.apply(this,arguments)}}())}))},Qx=function(){Wx("genp","ad video"),Wx("act","ad impression")},Jx=function(){Wx("act","ad skipped")},Yx=function(){Wx("act","ad click")},Xx=function(){Wx("act","ad complete")},Zx=new rw,eS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},tS=function(e,t){var n=this,r=function(e,t){var n=Zx.get("partner.url.value"),r=eS[t],a="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(a),description_url:n,tfcd:0,npa:0,sz:"400x300|480x360|480x361|640x360|640x480",gdfp_req:1,output:"vast",unviewed_position_start:1,impl:"s",correlator:"".concat(Date.now())}}(e,t),a=Object.keys(r).map(function(e){return k.default(this,n),"".concat(e,"=").concat(r[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},nS=(new rw).get("partner.domain.value"),rS=["latimes.com"],aS={exist:function(e){var t=this;return"Softgames-Azerion"===e.dname&&rS.some(function(e){return k.default(this,t),e===nS}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return tS(n,e)}}[nS](e)}(e,t)}};function iS(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 sS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iS(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oS=new m.EventEmitter,dS=null,uS=function(){function e(t,n,r){var i=this;if(R.default(this,e),dS)return dS;dS=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,g,b,y,_,w,E,O,I,P,C;return S.default(e,[{key:"start",value:(C=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),Ki("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 C.apply(this,arguments)})},{key:"adSystemInitialize",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: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 P.apply(this,arguments)})},{key:"_getDefaultSpilAdapterConfig",value:function(){return{vast:null,url:"https://pubads.g.doubleclick.net/gampad/ads",query:{correlator:"{{CACHEBUSTER}}",description_url:"{{PAGE_URL}}",env:"vp",gdfp_req:1,impl:"s",iu:"/59392726/gd_instream",npa:0,output:"vast",sz:"640x480|400x300",tfcd:0,unviewed_position_start:1}}}},{key:"_getSpilUrl",value:(I=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,r=t.options,e.prev=1,s=null===(a=this.gameData.adflw)||void 0===a||null===(i=a.adapterConfig)||void 0===i?void 0:i.spil,o=this.nextAdPosition(n),e.next=6,this._create_dp_context(o,r);case 6:return d=e.sent,s?(this.gameData,u=s[o]||s.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),c=100*d.floor_price,d.floor_price,l=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:c}}),h=l.url,f={url:h,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return I.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("spil"!==t.adapter){r.next=8;break}return r.abrupt("return",i(n._getSpilUrl({adType:e,options:t})));case 8:if(void 0!==window.idhb.requestAds){r.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return r.prev=10,u=n.nextAdPosition(e),n._broadcast("AD_REQUEST",{message:u}),c=n.options,"preroll"===u&&v.isPlainObject(c.preroll)?c=c.preroll:"midroll"===u&&v.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===u&&v.isPlainObject(c.rewarded)&&(c=c.rewarded),l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1",r.next=18,window.idhb.isLoaded();case 18:return r.next=20,n._create_dp_context(u,t);case 20:h=r.sent,Wi("gd-adflow, before idhb",u,l),f=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(sS(sS({},f),{},{adaptor_order:t.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.requestAds({slots:T.default({},l,{bidFloor:(null==h?void 0:h.floor_price)||void 0}),callback:function(e,t){var r=this;k.default(this,p),!h||null!=t&&t.bidFloorApplied||fetch(h.skip_url).catch(function(e){k.default(this,r)}.bind(this));var a={src:"hl",tnl_keys:sS(sS({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId}),url:e,dp:h,hl:t};n._extend_hl_url(a),i(a)}.bind(this)}),r.next=32;break;case 29:throw r.prev=29,r.t0=r.catch(10),new Error(r.t0);case 32:case"end":return r.stop()}}),r,this,[[10,29]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===a.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===a.AdType.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===a.AdType.Rewarded?"rewarded":e===a.AdType.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===a.AdType.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===a.AdType.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA['.concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,"]]></VASTAdTagURI> \n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,t){var n=this;return t=t||{},new Promise(function(r){var a=this;if(k.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var i,s,o=null==e||null===(i=e.tnl_keys)||void 0===i?void 0:i.tnl_ad_pos;this.adSuccess=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,t),c=sS(sS({},t),{},{adTag:u,tnl_ad_pos:o});this.adCounter[o]=this.adCounter[o]||0,this.adCounter[o]++;var l=e.dp,h=e.hl;this.current_dp=l,l&&(l.adtag_url=u.url,this._extend_dp_with_adsense(l,h,null==e?void 0:e.tnl_keys));var f=this._isVMAP(o);(function(){k.default(this,a),t.shouldFail&&(l?(l.adtag_url="dp_original_broken",l.fallback_url="dp_fallback_broken"):u.url="original_broken",null==l||l.adtag_url,null==l||l.fallback_url,u.url),f=!1}).bind(this);var p=this._getExternalVast(null===(s=t)||void 0===s?void 0:s.adType);if(p)d.adTagUrl=p;else if(f){var m=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new D.default(e.adtag_url_1,!0);i.query=Gx(Gx({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new D.default(e.adtag_url_2,!0);o.query=Gx(Gx({},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(Nx({id:u++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url,fallback_url:null==n?void 0:n.fallback_url,fallback_imp_url:null==n?void 0:n.fallback_imp_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(Nx({id:u++,adtag_url:d,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url,fallback_url:null==r?void 0:r.fallback_url,fallback_imp_url:null==r?void 0:r.fallback_imp_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:l,adtag:u,position:"preroll"===c.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));d.adsResponse=m}else if(l&&h.bidFloorApplied){var g=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(l);d.adsResponse=g}else if(l&&l.fallback_url){var v=function(e){return'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim()}(l);d.adsResponse=v}else d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(t.autoplayAllowed),d.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(d,c);try{this._broadcast("AD_SDK_REQUEST",{message:c})}catch(e){}r(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=aS.exist(this.gameData)&&aS.get(n,this.gameData)}catch(e){console.log("external-vast err",e)}return t}},{key:"cancel",value:function(e){var t;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var n=(null==e||null===(t=e.message)||void 0===t?void 0:t.indexOf("NO_VAST_URL"))>=0,r="AD_SDK_CANCELED";this._broadcast(r,{name:r,message:"Advertisement has been canceled.",status:"warning",noVast:n,analytics:{category:this.eventCategory,action:r,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(O=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 O.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,i=this;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=sS(sS({},r),{},{adType:n}),"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=29;break}if(n!==a.AdType.Interstitial){e.next=22;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=19;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 19:return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 20:e.next=27;break;case 22:if(n!==a.AdType.Rewarded){e.next=26;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 26:case 39:throw new Error("Unsupported ad type");case 27:e.next=40;break;case 29:if(!["ima","spil"].some(function(e){return k.default(this,i),e===(null==r?void 0:r.adapter)}.bind(this))){e.next=40;break}if(n!==a.AdType.Interstitial){e.next=35;break}return e.abrupt("return",this._startInterstitialAd(r));case 35:if(n!==a.AdType.Rewarded){e.next=39;break}return e.abrupt("return",this._startRewardedAd(r));case 40: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 Cx(this.adContainer,t),this.adResume.add(),this.rewardedLabel=new Lx(this.adContainer,t),this.rewardedLabel.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(y=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=11,n._create_dp_display_context();case 11:n.atom_display=e.sent,n.atom_display,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),JSON.stringify(e,null,2)}.bind(this)}),r(),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(0),console.log("display_test error",e.t0),i(e.t0.message||e.t0);case 24:case"end":return e.stop()}}),e,this,[[0,20]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return y.apply(this,arguments)})},{key:"_startInterstitialAd",value:(b=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(){if(k.default(this,r),$i.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return n=e.sent,e.next=13,this._loadInterstitialAd(sS(sS({},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=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return b.apply(this,arguments)})},{key:"_startPromo",value:(g=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(sS(sS({},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 g.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,sS({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:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,sS({adType:a.AdType.Interstitial},t));case 14:return e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return 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(){if(k.default(this,r),$i.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return n=e.sent,e.next=13,this._loadRewardedAd(sS(sS({},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,sS({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(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var t=this;if(this.activeAdContainer){this.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&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new Ux(this.adContainer),this.t4rButton.add()),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),this.t4rButton&&this.t4rButton.hide()}.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.t4rButton&&this.t4rButton.hide(),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=document.getElementById("game"),p="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:p="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:p="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:c=!0,p="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:p="Fired when the ad is clicked.";var m=e.getAd().getContentType();this._show({mode:"click",contentType:m}),Yx();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),c=this._is_completed(e.getAd()),p="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:this.gameData.fllc.enabled&&(f.style.display="none"),p="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(f.style.display="block"),p="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",c=!0,this._hideAddResume(),this._hideRewardedLabel(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.DURATION_CHANGE:p="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:p="Fired when the ad playhead crosses first quartile.";var g=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:g});break;case google.ima.AdEvent.Type.IMPRESSION:p="Fired when the impression URL has been pinged.",e.getAd();break;case google.ima.AdEvent.Type.INTERACTION:p="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:p="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var v=e.getAd().getContentType();p=v,this._show({mode:"loaded",contentType:v});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(p=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:p="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:h&&this.adResume.show(),p="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:p="Fired when the ad is resumed.",h&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:p="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:c=this._is_completed(e.getAd()),p="Fired when the ad is skipped by the user.",Jx(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:this.adType_===a.AdType.Rewarded&&this.rewardedLabel.show(),this._hideAddResume(),p="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:p="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:c=this._is_completed(e.getAd()),p="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:p="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:p="Fired when the ad volume has been muted."}if(""!==u&&""!==p&&this._broadcast(u,{name:u,message:p,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 b=e.getAd(),y="Rainbow"===(null==b?void 0:b.getAdSystem())&&(null==b?void 0:b.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this)));null==b||b.getAdSystem(),null==b||b.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:y}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var t=this;try{var n,r,a,i,s;if(!((null===(n=this.gameData)||void 0===n||null===(r=n.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(a=this.gameData)||void 0===a||null===(i=a.aws_tst)||void 0===i||null===(s=i.ep)||void 0===s?void 0:s.atm)))return;var o=e.type,d=e.url;if("none"===o||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){k.default(this,t)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,t){var n=this,r={type:"none"};try{var a=this.current_dp,i=a.id,s=a.error_url,o=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!t)return r={type:"imp_err",url:s};var c=e.getWrapperAdIds().some(function(e){return k.default(this,n),e==="".concat(i)}.bind(this)),l=e.getWrapperAdIds().some(function(e){return k.default(this,n),"fallback"===e}.bind(this)),h=e.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this));c&&t?r={type:"normal_imp",url:o}:c&&!t?r={type:"normal_err",url:s}:h&&t?r={type:"promo_imp",url:u}:l&&t&&(r={type:"fallbacj_imp",url:d})}catch(e){}return r}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),a=this._getInnerErrorCode(n);oS.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:"_hideRewardedLabel",value:function(){try{this.adType_===a.AdType.Rewarded&&this.rewardedLabel&&this.rewardedLabel.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(Mx(e.getInnerError)){var t=e.getInnerError();if(t)return Mx(t.getErrorCode)&&Mx(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];v.isPlainObject(i)&&(r.query[a]=M.default.stringify(i))}var s=new D.default(r.url,!0);return j.default(s.query,r.query||{}),sS({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new D.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new D.default(e.url,!0);if(i.query.cust_params){var s=M.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&&v.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&&v.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=L.default(a),v.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=M.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,j.default(i,u),i.cust_params=M.default.stringify(i.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var t,n,r,a=null===(t=this._adrequest_user_context)||void 0===t||null===(n=t.adTag)||void 0===n?void 0:n.bidder;return this.msgrt.send("bidder",{message:a}),this._adrequest_user_context,'bidder:"'.concat(a,'"'),((null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[]).some(function(t){return k.default(this,e),t===a}.bind(this))}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isT4R",value:function(e){var t,n,r;if(this._isExcludedBidderForT4R())return this.msgrt.send("bidder.ex",{message:"true"}),!1;this.msgrt.send("bidder.ex",{message:"false"});var 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),b=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?b>=(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 Px(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();var r=e.p/100;this.msgrt.send("dp.fp",{message:r}),t({params:{fp:r},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){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),d=s?o:void 0;return function(){k.default(this,n),$i.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,promo_imp_blue_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=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 Px(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;n.msgrt.send("dp.fp",{message:t}),a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url: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 D.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=M.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.npa=1,r.query.cust_params=M.default.stringify(a,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_extend_hl_url",value:function(e){e.dp;var t=e.hl;e.src;var n=e.tnl_keys,r=!0!==(null==t?void 0:t.bidFloorApplied)?0:1;0===r&&null!=n&&n.hasOwnProperty("fp")?r=2:1!==r||null!=n&&n.hasOwnProperty("fp")||(r=3),n.bfa=r;try{var a,i=new D.default(e.url,!0);if(null===(a=i.query)||void 0===a||!a.cust_params)return;var s=M.default.parse(i.query.cust_params);s.bfa=r,s.adsense=0,i.query.cust_params=M.default.stringify(s,!1),e.url=i.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(d=A.default(x.default.mark((function e(t){var n,r,i,s,o,d,u,c=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,c),!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"}),"undefined"===window.idhb.options.configUrl&&(window.idhb.options.configUrl=null),window.idhb.que=window.idhb.que||[],(s=new URL(r)).searchParams.append("referer",window.idhb.options.configUrl),r=s.href,e.next=13,a.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,c),window.idhb.requestAds}.bind(this)});case 13:o=a.getQueryString("ch",window.location.href),d=a.getQueryString("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},o&&(u.channel=o),d&&(u.ch_date=d),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;k.default(this,c);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 21: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:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",a=n||!0,i=document.getElementsByClassName("adsbygoogle"),s=0;s<i.length;s++){var o,d=i[s],u=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);u&&"IFRAME"===u.tagName&&u.style.height!==r&&(u.style.height=r,a&&(u.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{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,u,c=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,c),$i.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense rewarded error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),n=!1,r=function(){k.default(this,c),n=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){k.default(this,c),n=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),i=function(){k.default(this,c),n=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),s=function(){k.default(this,c),n=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),o=function(e){k.default(this,c),n=!0,e()}.bind(this),d=function(e){k.default(this,c),n=!0,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=function(e){window.adsbygoogle.push(e)},setTimeout(function(){k.default(this,c),n||(Wi("gd-adflow adsense.reward timeout happened!"),this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"timeout",status:"error",skipForward:!0}),this._send_atom_event("sg.dbg.rw",{breakStatus:"timeout"}))}.bind(this),1e3),u({type:"reward",name:"reward-in-game",beforeAd:r,afterAd:a,adDismissed:i,adViewed:s,beforeReward:o,adBreakDone:d}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return 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),$i.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),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),$i.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error 2",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(){k.default(this,i),this.fixOutOfBounds(),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),$i.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense midroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),n=function(){k.default(this,i),this.fixOutOfBounds(),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){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new rw).get();n=sS(sS({},n),r),n=t?sS(sS({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;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")}t||(t="preroll"),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);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,sS(sS({},t),{},{skipForward:r,adPosition:a}))}}]),e}(),cS=S.default((function e(t){var n=this;R.default(this,e),T.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,lv(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T.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},uv(this.moduleName,this.moduleConfig)})),lS=S.default((function e(t){var n=this;R.default(this,e),T.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,lv(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T.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},uv(this.moduleName,this.moduleConfig)})),hS=function(e,t){console.log(e,t)},fS={},pS={},mS=null;function gS(){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 fS.version=r,fS.frame=e,fS.function=n,fS.version}function vS(e){var t=this;return mS||(mS=new Promise(function(n){function r(t,r){if(hS("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:fS,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}k.default(this,t),gS(),fS.frame?2===fS.version?(hS("TCF v2 CMP found. Fetching the consent."),fS.function?(hS("CMP API is directly accessible, calling it now..."),fS.function("addEventListener",fS.version,r)):(hS("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!==pS[r.callId]&&pS[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=T.default({},d,{command:e,parameter:s,callId:o,version:n});pS[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,fS.version,n)}("addEventListener",fS.frame,r))):n({result:"cmpVersionNotV2",cmp:fS}):n({result:"cmpNotFound"})}.bind(this)),mS)}var bS=new(function(){function e(){R.default(this,e),this.productName="Game Distribution"}var t;return S.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,u;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(i=null==t||null===(r=t.visitor)||void 0===r||null===(a=r.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(i),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=12,fetch(d,{method:"POST"});case 12:e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(u,{method:"POST"});case 22:e.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 yS(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 _S(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 _S(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 _S(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 wS=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=yS(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))},AS=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,wS({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,wS({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,wS({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)}}(),kS=new m.EventEmitter,ES={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},xS=!1;function SS(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(ES).some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=!n.type||!n.type.startsWith("gd-sdk")&&!("parent-data-response"===n.type)||"sg-game-event"===n.type;!function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r;if("midroll"!==(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition))return;var a="CONTENT_RESUME_REQUESTED"===(null===(n=e.event)||void 0===n?void 0:n.name);"CONTENT_PAUSE_REQUESTED"===(null===(r=e.event)||void 0===r?void 0:r.name)&&(xS=!0),a&&xS&&(xS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(n);var s=function(){k.default(this,t);try{var n,r;return null==e||null===(n=e.source)||void 0===n||null===(r=n.location)||void 0===r?void 0:r.href}catch(e){}}.bind(this);if(window.parent&&i){if("https://html5.gamedistribution.com"===r){var o=s();if(!o)return;var d=o&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return k.default(this,t),o.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return k.default(this,t),e===(null==n?void 0:n.type)}.bind(this));if(!d&&!u)return}var c=n.eventName,l=n.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==c&&"levelFinish"!==c||window.mpHelper.sendStat("level",l.level),"levelFinish"===c&&window.mpHelper.sendStat("score",l.score)),window.parent.postMessage(n,"*")}if(a){var h=ES[r][a];h&&kS.emit(h,n)}}}),!1);var RS=_.v4(),TS=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:RS,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){IS(r)},setInterval(function(){k.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",IS(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?SS(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=RS,IS(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},DS=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=OS(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},OS=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}},IS=function(e){try{window.__msgr&&window.__msgr.postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}};function PS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function CS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PS(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function LS(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 US(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 US(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 US(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 MS,jS=function(){function e(t){var n=this;R.default(this,e),T.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._runAutoResume=t._runAutoResume.bind(t),this.send_atom_event=t.send_atom_event.bind(t),this.get_session_id=t.get_session_id.bind(t),this.get_ad_system_init_result=t.get_ad_system_init_result.bind(t)}var t,n;return S.default(e,[{key:"runAdFlow",value:(n=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,b,y,_,w,A,E,S,R,T,D,O,I,P,C,L,U,M,j,B,G=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,G),"adsense"!==e}.bind(this)):o,p=this.get_ad_system_init_result(),m=p.afg,g=p.ima,this.adsBlocked=!m&&!g,this.adsBlocked?(Wi("gd-adflow adsBlocked so changing the flow"),f=[f[0]]):(m||(f=f.filter(function(e){return k.default(this,G),"adsense"!==e}.bind(this))),g||(f=f.filter(function(e){return k.default(this,G),"ima"!==e}.bind(this)))),v=!1,b=!1,y=[],_=0,w=!1,A=LS(f),e.prev=21,A.s();case 23:if((E=A.n()).done){e.next=57;break}return S=E.value,t.params.adapter=S,R=_===f.length-1,c&&R&&"ima"===S&&(t.params.runPromoAsImaFallback=!0),T=R&&"adsense"===S&&c&&l&&h,t.params=CS(CS({},t.params),{},{adapterIndex:_,isLastAdapter:R,shouldFail:!1,extraPromoRunOnFail:T}),function(){k.default(this,G),$i.firstSuccessOrder&&!isNaN($i.firstSuccessOrder)&&(t.params.shouldFail=_<$i.firstSuccessOrder)}.bind(this),Wi("gd-adflow, before adInvoke",_,S,t.params.shouldFail),e.next=34,this.adInvoke(t);case 34:if(D=e.sent,O=D.success,I=D.args,P=D.isSkipped,C=D.noVast,!O){e.next=46;break}return Wi("gd-adflow, adapter-result-success",_,S,I),v=!0,b=!(null==I||!I.isPromoSuccess),e.abrupt("break",57);case 46:if(Wi("gd-adflow, adapter-result-failure",_,S,I.message),_++,y.push(I.message),!P){e.next=51;break}return e.abrupt("break",57);case 51:if(!C){e.next=54;break}return this._runAutoResume(),e.abrupt("break",57);case 54:R&&"adsense"===S&&c&&l&&h&&(w=!0);case 55:e.next=23;break;case 57:e.next=62;break;case 59:e.prev=59,e.t0=e.catch(21),A.e(e.t0);case 62:return e.prev=62,A.f(),e.finish(62);case 65:if(!w){e.next=74;break}return t.params.adapter="promo",e.next=70,this.adInvoke(t);case 70:e.sent.success&&(b=!0);case 74:(function(){var e;k.default(this,G),$i.disableGift&&null!==(e=d.gft)&&void 0!==e&&e.enabled&&(d.gft.enabled=!1)}).bind(this),L=y.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",M="none",v&&b?U="promo_ima":v?(U="index_".concat(_),M=f[_]):b&&(U="promo_adsense"),j=this.get_session_id(),this.adsBlocked&&"-1"===U?(B="rewarded"===s?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[B]=this.blockedAdsMap[B]?this.blockedAdsMap[B]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(B)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:B,sessionId:j,successAdapter:"none",adFlowIndex:U})):(this._msgrt.send("adflow.all.index",{message:"".concat(U)}),this._msgrt.send("adflow.all.success_adapter",{message:"".concat(M)}),this._msgrt.send("adflow.".concat(s,".index"),{message:"".concat(U)}),this._msgrt.send("adflow.".concat(s,".success_adapter"),{message:"".concat(M)}),this.send_atom_event("gd.adflow",{adFlowIndex:U,successAdapter:M,adBlocker:!1,afgBlocked:!m,imaBlocked:!g,adType:s,sessionId:j}));case 84:case"end":return e.stop()}}),e,this,[[21,59,62,65]])}))),function(e){return n.apply(this,arguments)})},{key:"adInvoke",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,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);var t="dismissed"===(null==e?void 0:e.message);r({success:!1,args:e,isSkipped:t,noVast:e.noVast})}.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),Ki("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 t.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var t,n,r,a,i,s,o,d,u=this,c=void function(){if(k.default(this,u),$i.customAdFlow)return JSON.parse($i.customAdFlow)}.bind(this),l=this._gameData.adflw;c&&(l=c);var h=null!==(t=l)&&void 0!==t&&null!==(n=t.adapters)&&void 0!==n&&n.default?null===(r=l)||void 0===r||null===(a=r.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return h=null!==(i=l)&&void 0!==i&&null!==(s=i.adapters)&&void 0!==s&&s[e]?null===(o=l)||void 0===o||null===(d=o.adapters)||void 0===d?void 0:d[e]:h}}]),e}(),BS=new m.EventEmitter,GS=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp","https://html5.gamedistribution.com","http://localhost:3005","https://yjgames.gamedistribution.com","https://portal-staging-sgweb.gamedistribution.com/"];window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=e.source;if(GS.some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system;n.action;var s="aeriaExternalHostsConnector"===i;if("Softgames"===i)MS=a,(window.parent||window).postMessage(n,"*"),BS.emit("aeria-event",n);else if(s){MS&&MS.postMessage(n,"*");var o=window.parent||window;o&&o.postMessage(n,"*")}}}),!1);var NS=function(){function e(){R.default(this,e)}var t;return S.default(e,[{key:"init",value:function(e){var t=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(n){if(k.default(this,t),n){var r=n.adRequestTimer;e.adRequestTimer=r,e.adRequestTimer}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var t=this;window.addEventListener("message",function(n){k.default(this,t);var r=n.data,a=n.origin,i=n.source,s=r.type;if(r.value,"https://html5.gamedistribution.com"===a&&"parent-data-request"===s){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:"parent-data-response",value:o})}}.bind(this))}},{key:"_askForParentFrameData",value:(t=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=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;"https://html5.gamedistribution.com"===r&&"parent-data-response"===i&&(e(s),a=!0)})),setTimeout(function(){k.default(this,r),a||e()}.bind(this),1e3);var i={type:"parent-data-request"};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),qS=new NS;function FS(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 VS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FS(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var HS=_.v4(),zS=null,WS=null,KS=function(){function e(t){var n=this;if(R.default(this,e),zS)return zS;zS=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 rw,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._mplus_count=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,r=this;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()&&(TS(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){k.default(this,r),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),qS.init(this),this._send_gametag_data("sdk_init")}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var t,n,r,i,s,o,d,c,l,h,f,p,m;return S.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:"_send_gametag_data",value:(m=A.default(x.default.mark((function e(t){var n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=a.getMobilePlatform()||"web",this.adInstance._send("tg.created",{gmid:this.options.gameId,dvc:n,qint:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return m.apply(this,arguments)})},{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 rw,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,AS();case 6:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"testConsent",value:function(){try{gS();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,vS({});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;kS.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||(console.log("noMinijuegosSDK",!this._bridge.isCoreSDKMode,!this._bridge.noMinijuegosSDK,document.location.search.indexOf("mp_game_id")>=0),!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker())}},{key:"_initializeSDKWithGameData",value:(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=(null===(r=this._gameData.disableAds)||void 0===r?void 0:r.default)||!1,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:");Wi("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=Vi.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&&"undefined"!==this._topDomain||(this._topDomain=void 0);var n={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(M.default.stringify(n))).catch(function(e){k.default(this,t)}.bind(this)),this.adInstance._send_atom_event("hl.config",n),this._send_gametag_data("sdk_gameplay")}},{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:Vi.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/gamemonkey-web-tracker/5.0.0/script/gamemonkey-sdk.js"];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;k.default(this,e),WS=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&WS.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),bS.track(WS,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=WS)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var t=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadLocus",value:function(){var e=this,t=["https://tag.atom.gamedistribution.com/v1/locus"];console.log("locus loading"),a.getScript(t[0],"locus",{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){}}Xx()}.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"),Qx(),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&bS.track(WS,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,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Vi.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(M.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 uS(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=Vi,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:this._executeMidrollPlus();case 18: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,adPosition:e.adPosition})}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,Gw();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(VS(VS({},this.options),{},{isConsentDomain:n,version:Vi.version}),t,this._parentDomain),e.next=6,zw();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e,t,r=this;if(k.default(this,d),n){var s=new Date;s.setDate(s.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(s.toUTCString(),"; path=/")}if(this._hideCMPButton(),o)window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(e){k.default(this,r),i.hide()}.bind(this));else{var u={position:"preroll"};(function(){k.default(this,r),$i.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),u.adapter="adsense")}).bind(this),this.showAd(a.AdType.Interstitial,u).catch(function(e){k.default(this,r)}.bind(this))}null!==(e=this._gameData)&&void 0!==e&&null!==(t=e.evnts)&&void 0!==t&&t.enabled&&(DS({event:"FirstInteraction",game:this._gameData}),this._send_gametag_data("first_interaction"))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){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(VS(VS({},this.options),{},{isConsentDomain:n,version:Vi.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(VS(VS({},this.options),{},{isConsentDomain:n,version:Vi.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:if(e.prev=0,!r._autoResumeIfAdsAreDisabled(t||"interstitial")){e.next=5;break}return e.abrupt("return",a());case 5:return o={adType:t||"interstitial",params:n,adTimestamp:r.adRequestTimer},e.next=9,r.sdkReady;case 9:return d=e.sent,e.next=12,r.videoAdReady;case 12: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=22;break}return e.abrupt("return",a());case 22:return r.adFlowRunning=!0,u=new jS(r),e.next=26,u.runAdFlow(o);case 26:r.adFlowRunning=!1,a(),r._post_message({topic:"adrequest.instream"}),e.next=36;break;case 31:e.prev=31,e.t0=e.catch(0),r.adFlowRunning=!1,r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 36:case"end":return e.stop()}}),e,null,[[0,31]])})));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:"_autoResumeIfAdsAreDisabled",value:function(e){var t=!1,n=this._gameData.diagnostic.close_ads,r=this._gameData.disableAds[e],a=n||r;return this._gameData.diagnostic,this._gameData.disableAds,a&&(this._runAutoResume(),t=!0),t}},{key:"_runAutoResume",value:function(){var e="CONTENT_PAUSE_REQUESTED",t="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(e,{name:e,message:"Auto pause when ads are disabled"}),this.eventBus.broadcast(t,{name:t,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}},{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){var t=e.gameData,n=e.adRequest;if(t.disableAds[n.adType]||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.disableAds[t]&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(t,"..."));case 10:if(t){e.next=14;break}t=a.AdType.Rewarded,e.next=16;break;case 14:if(t===a.AdType.Interstitial||t===a.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16: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()||(DS({event:"GameStarted",game:this._gameData}),this._send_gametag_data("game_started"))}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(DS({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{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 D.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 D.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new D.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 lS(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 cS(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 D.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(M.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new D.default(e,!0);return n.query=VS(VS({},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)WS.tracking.trackEvent("milestoneAchieved",{pageId:this.options.gameId,pageType:"game",isAuthorized:null===(t=e.data)||void 0===t?void 0:t.isAuthorized,milestoneDescription:null===(n=e.data)||void 0===n?void 0:n.milestoneDescription});else if("game_event"==e.eventName)return this._gameEventPostMessage(e)}catch(e){console.log(e.message)}}},{key:"_gameEventPostMessage",value:function(e){if(void 0!==e.data.level&&this._numberValidator(e.data.level))if(void 0!==e.data.score&&this._numberValidator(e.data.score)){var t={type:e.eventName,data:e.data};window.location!==window.top.location&&window.top.postMessage(t,"*")}else console.log("Level data type should be number!");else console.log("Level data type should be number!")}},{key:"_numberValidator",value:function(e){return"number"==typeof e&&/^\d*$/.test(e)}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,t=this._gameData,n=t.assets.find(function(t){return 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 HS}},{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){}}},{key:"_getGdModeIfExist",value:function(){var e=this,t=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return k.default(this,e),t.get(n)}.bind(this)});return!t.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:t.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,t,n=this;if(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&this.adInstance.adMidrollCount<=0)if(null!==(t=this._gameData.midroll_plus)&&void 0!==t&&t.interval)var r=setInterval(function(){var e,t,i=this;k.default(this,n),this.showAd(a.AdType.Interstitial,{position:"midroll",isGift:!0}).catch(function(e){k.default(this,i)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(t=this._gameData.midroll_plus)||void 0===t?void 0:t.interval)&&clearInterval(r)}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;k.default(this,n),this.showAd(a.AdType.Interstitial,{position:"midroll",isGift:!0}).catch(function(t){k.default(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}]),e}();var $S=new m.EventEmitter,QS=function(e){var t=this;!function(){var e=this,t=["https://tag.atom.gamedistribution.com/v1/locus"];console.log("locus loading"),a.getScript(t[0],"locus",{alternates:t}).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}();var n,r=function(e){var n=this;return k.default(this,t),new Promise(function(t,r){var a=this;k.default(this,n);var i=function(e){k.default(this,a),"SDK_GAME_START"===e.name&&($S.off("sdk-event",i),t())}.bind(this);$S.on("sdk-event",i),m("showAd",{adType:e})}.bind(this))}.bind(this),i=function(){return k.default(this,t),n||(n=new KS(e)),n}.bind(this),s=function(e){return k.default(this,t),r(e)}.bind(this),o=function(e){return k.default(this,t),"gdsdk://preloaded"}.bind(this),d=function(e){return k.default(this,t),i().showDisplayAd(e)}.bind(this),u=function(){return k.default(this,t),m("cancelAd")}.bind(this),c=function(){return k.default(this,t),m("openConsole")}.bind(this),l=function(){return k.default(this,t),m("showBanner")}.bind(this),h=function(){return k.default(this,t),m("session")}.bind(this),f=function(e){return k.default(this,t),m("sendGenericEvent",{options:e})}.bind(this),p=function(){k.default(this,t),console.log("_sendSDKReady")}.bind(this),m=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,"*"),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),g=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&&b(r)}),!1)}.bind(this),v=function(){k.default(this,t),g(),m("init")}.bind(this),b=function(n){k.default(this,t);try{$S.emit("sdk-event",n),e.onEvent&&e.onEvent(n)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:d,cancelAd:u,openConsole:c,getSession:h,onEvent:b,init:v,_sendSDKReady:p,sendGenericEvent:f}},JS=function(e){var t=QS(e);return t.init(),t},YS=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)}},XS=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))},ZS=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,Vw();case 2:return t=e.sent,n=!t,e.next=6,XS(n);case 6:if(r=e.sent,t){e.next=9;break}return e.abrupt("return",!1);case 9:return a=YS(),i=a.isMasterGameURL,s=i(),e.next=13,Hw();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)}}(),eR=$e,tR=re,nR=ji,rR=Ia,aR=tR(xa.f),iR=tR([].push),sR=function(e){return function(t){for(var n,r=rR(t),a=nR(r),i=a.length,s=0,o=[];i>s;)n=a[s++],eR&&!aR(r,n)||iR(o,e?[n,r[n]]:r[n]);return o}},oR={entries:sR(!0),values:sR(!1)}.values;Li({target:"Object",stat:!0},{values:function(e){return oR(e)}});var dR,uR={},cR=function(e){try{if(e.skipForward)return;if(uR.source){var t={type:"gd-sdk-on-event",event:e};uR.source.postMessage(t,uR.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},lR=function(){cR({name:"SDK_READY",status:"success",message:"Everything is ready."}),cR({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),cR({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},hR=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(!uR.source&&"init"===s)return function(e){var t=e.source,n=e.origin;uR={source:t,origin:n}}({source:a,origin:r}),void lR();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&&$i.firstAdapterModeAdsense&&"rewarded"!==o.adType&&(console.log("promo-test, set first adapter to adssense 3"),o.params=o.params?o.params:{},o.params.adapter="adsense")}.bind(this),!(n=d.apply(e,Object.values(o)))||!n.then){t.next=6;break}return t.next=6,n;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))()}}else{var u={type:"gd-sdk",method:s,options:o};window.postMessage(u,location.origin)}}),!1)},fR=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){cR(e),t.apply(this,arguments)}}(e);var t=new KS(e);return hR(t),t},pR=function(e){try{var t=Dw(e);e.gameId||t.send("nogameid",{message:"".concat(Eb.parentURL)})}catch(e){}},mR={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,pR(t),Cw=Dw(Uw=t),e.next=5,ZS();case 5:return n=e.sent,r=n?JS(t):fR(t),Ww(),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",fR(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}()};function gR(){return(gR=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,Qw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,bR(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 vR=!1;function bR(e){var t=this;return new Promise(function(n,r){var a=this;if(k.default(this,t),dR)return n(dR);if(vR)var i=setInterval(function(){k.default(this,a),dR&&(vR=!1,clearInterval(i),n(dR))}.bind(this),100);else vR=!0,mR.create(e).then(function(e){k.default(this,a),dR=e,e._sendSDKReady(),vR=!1,n(dR)}.bind(this))}.bind(this))}$x();var yR,_R=(bR(yR=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 gR.apply(this,arguments)}(yR,e)}});function wR(){var e=this;this.AdType=a.AdType,this.preloadAd=function(e){var t=this;return _R.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",_R.invoke(function(e){var i=this;if(k.default(this,r),t===a.AdType.Display)return e.showDisplayAd(n);var s={};return function(){k.default(this,i),$i.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),s.adapter="adsense")}.bind(this),e.showAd(t,s)}.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 _R.invoke(function(t){return k.default(this,e),t.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return _R.invoke(function(t){return k.default(this,e),t.openConsole()}.bind(this))},this.getSession=function(){var e=this;return _R.invoke(function(t){return k.default(this,e),t.session()}.bind(this))},this.sendEvent=function(e){var t=this;return _R.invoke(function(n){return k.default(this,t),n.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){k.default(this,e),hv.showLeaderboard()}.bind(this),addScore:function(t){k.default(this,e),hv.addScore(t)}.bind(this)}}wR.prototype=new function(){this.showBanner=function(){var e=this;return _R.invoke(function(t){return k.default(this,e),t.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new wR,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"),l=require("validator"),c=require("is-valid-domain"),h=require("get-value"),f=require("set-value"),p=require("lodash.clonedeep"),m=require("events"),g=require("can-autoplay"),v=require("is-plain-object"),y=require("querystringify"),b=require("lodash.merge"),_=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),S=w(i),R=w(s),T=w(o),D=w(d),I=w(l),O=w(c),P=w(h),C=w(f),L=w(p),U=w(g),M=w(y),j=w(b),B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},q=function(e){return e&&e.Math==Math&&e},G=q("object"==typeof globalThis&&globalThis)||q("object"==typeof window&&window)||q("object"==typeof self&&self)||q("object"==typeof B&&B)||Function("return this")(),N={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},F=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},V=F,W=function(e,t,n){if(V(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}},z=function(e){try{return!!e()}catch(e){return!0}},K={}.toString,H=function(e){return K.call(e).slice(8,-1)},$=H,Q="".split,J=z((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==$(e)?Q.call(e,""):Object(e)}:Object,Y=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},X=Y,Z=function(e){return Object(X(e))},ee=Math.ceil,te=Math.floor,ne=function(e){return isNaN(e=+e)?0:(e>0?te:ee)(e)},re=ne,ae=Math.min,ie=function(e){return e>0?ae(re(e),9007199254740991):0},se=function(e){return"object"==typeof e?null!==e:"function"==typeof e},oe=H,de=Array.isArray||function(e){return"Array"==oe(e)},ue={exports:{}},le=!z((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),ce={},he=se,fe=G.document,pe=he(fe)&&he(fe.createElement),me=function(e){return pe?fe.createElement(e):{}},ge=me,ve=!le&&!z((function(){return 7!=Object.defineProperty(ge("div"),"a",{get:function(){return 7}}).a})),ye=se,be=function(e){if(!ye(e))throw TypeError(String(e)+" is not an object");return e},_e=se,we=function(e,t){if(!_e(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!_e(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!_e(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!_e(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Ae=le,ke=ve,Ee=be,xe=we,Se=Object.defineProperty;ce.f=Ae?Se:function(e,t,n){if(Ee(e),t=xe(t,!0),Ee(n),ke)try{return Se(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Re=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Te=ce,De=Re,Ie=le?function(e,t,n){return Te.f(e,t,De(1,n))}:function(e,t,n){return e[t]=n,e},Oe=G,Pe=Ie,Ce=function(e,t){try{Pe(Oe,e,t)}catch(n){Oe[e]=t}return t},Le=Ce,Ue=G["__core-js_shared__"]||Le("__core-js_shared__",{}),Me=Ue;(ue.exports=function(e,t){return Me[e]||(Me[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});var je={}.hasOwnProperty,Be=function(e,t){return je.call(e,t)},qe=0,Ge=Math.random(),Ne=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++qe+Ge).toString(36)},Fe=z,Ve=!!Object.getOwnPropertySymbols&&!Fe((function(){return!String(Symbol())})),We=Ve&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ze=G,Ke=ue.exports,He=Be,$e=Ne,Qe=Ve,Je=We,Ye=Ke("wks"),Xe=ze.Symbol,Ze=Je?Xe:Xe&&Xe.withoutSetter||$e,et=function(e){return He(Ye,e)||(Qe&&He(Xe,e)?Ye[e]=Xe[e]:Ye[e]=Ze("Symbol."+e)),Ye[e]},tt=se,nt=de,rt=et("species"),at=function(e,t){var n;return nt(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!nt(n.prototype)?tt(n)&&null===(n=n[rt])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},it=W,st=J,ot=Z,dt=ie,ut=at,lt=[].push,ct=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=5==e||i;return function(o,d,u,l){for(var c,h,f=ot(o),p=st(f),m=it(d,u,3),g=dt(p.length),v=0,y=l||ut,b=t?y(o,g):n?y(o,0):void 0;g>v;v++)if((s||v in p)&&(h=m(c=p[v],v,f),e))if(t)b[v]=h;else if(h)switch(e){case 3:return!0;case 5:return c;case 6:return v;case 2:lt.call(b,c)}else if(a)return!1;return i?-1:r||a?a:b}},ht={forEach:ct(0),map:ct(1),filter:ct(2),some:ct(3),every:ct(4),find:ct(5),findIndex:ct(6)},ft=z,pt=function(e,t){var n=[][e];return!!n&&ft((function(){n.call(null,t||function(){throw 1},1)}))},mt=le,gt=z,vt=Be,yt=Object.defineProperty,bt={},_t=function(e){throw e},wt=function(e,t){if(vt(bt,e))return bt[e];t||(t={});var n=[][e],r=!!vt(t,"ACCESSORS")&&t.ACCESSORS,a=vt(t,0)?t[0]:_t,i=vt(t,1)?t[1]:void 0;return bt[e]=!!n&&!gt((function(){if(r&&!mt)return!0;var e={length:-1};r?yt(e,1,{enumerable:!0,get:_t}):e[1]=1,n.call(e,a,i)}))},At=ht.forEach,kt=wt,Et=pt("forEach"),xt=kt("forEach"),St=G,Rt=N,Tt=Et&&xt?[].forEach:function(e){return At(this,e,arguments.length>1?arguments[1]:void 0)},Dt=Ie;for(var It in Rt){var Ot=St[It],Pt=Ot&&Ot.prototype;if(Pt&&Pt.forEach!==Tt)try{Dt(Pt,"forEach",Tt)}catch(e){Pt.forEach=Tt}}var Ct={},Lt={},Ut={}.propertyIsEnumerable,Mt=Object.getOwnPropertyDescriptor,jt=Mt&&!Ut.call({1:2},1);Lt.f=jt?function(e){var t=Mt(this,e);return!!t&&t.enumerable}:Ut;var Bt=J,qt=Y,Gt=function(e){return Bt(qt(e))},Nt=le,Ft=Lt,Vt=Re,Wt=Gt,zt=we,Kt=Be,Ht=ve,$t=Object.getOwnPropertyDescriptor;Ct.f=Nt?$t:function(e,t){if(e=Wt(e),t=zt(t,!0),Ht)try{return $t(e,t)}catch(e){}if(Kt(e,t))return Vt(!Ft.f.call(e,t),e[t])};var Qt={exports:{}},Jt=Ue,Yt=Function.toString;"function"!=typeof Jt.inspectSource&&(Jt.inspectSource=function(e){return Yt.call(e)});var Xt,Zt,en,tn=Jt.inspectSource,nn=tn,rn=G.WeakMap,an="function"==typeof rn&&/native code/.test(nn(rn)),sn=ue.exports,on=Ne,dn=sn("keys"),un=function(e){return dn[e]||(dn[e]=on(e))},ln={},cn=an,hn=se,fn=Ie,pn=Be,mn=un,gn=ln,vn=G.WeakMap;if(cn){var yn=new vn,bn=yn.get,_n=yn.has,wn=yn.set;Xt=function(e,t){return wn.call(yn,e,t),t},Zt=function(e){return bn.call(yn,e)||{}},en=function(e){return _n.call(yn,e)}}else{var An=mn("state");gn[An]=!0,Xt=function(e,t){return fn(e,An,t),t},Zt=function(e){return pn(e,An)?e[An]:{}},en=function(e){return pn(e,An)}}var kn={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(!hn(t)||(n=Zt(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},En=G,xn=Ie,Sn=Be,Rn=Ce,Tn=tn,Dn=kn.get,In=kn.enforce,On=String(String).split("String");(Qt.exports=function(e,t,n,r){var a=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||Sn(n,"name")||xn(n,"name",t),In(n).source=On.join("string"==typeof t?t:"")),e!==En?(a?!s&&e[t]&&(i=!0):delete e[t],i?e[t]=n:xn(e,t,n)):i?e[t]=n:Rn(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Dn(this).source||Tn(this)}));var Pn=G,Cn=Pn,Ln=G,Un=function(e){return"function"==typeof e?e:void 0},Mn=function(e,t){return arguments.length<2?Un(Cn[e])||Un(Ln[e]):Cn[e]&&Cn[e][t]||Ln[e]&&Ln[e][t]},jn={},Bn=ne,qn=Math.max,Gn=Math.min,Nn=function(e,t){var n=Bn(e);return n<0?qn(n+t,0):Gn(n,t)},Fn=Gt,Vn=ie,Wn=Nn,zn=function(e){return function(t,n,r){var a,i=Fn(t),s=Vn(i.length),o=Wn(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}},Kn={includes:zn(!0),indexOf:zn(!1)},Hn=Be,$n=Gt,Qn=Kn.indexOf,Jn=ln,Yn=function(e,t){var n,r=$n(e),a=0,i=[];for(n in r)!Hn(Jn,n)&&Hn(r,n)&&i.push(n);for(;t.length>a;)Hn(r,n=t[a++])&&(~Qn(i,n)||i.push(n));return i},Xn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Zn=Yn,er=Xn.concat("length","prototype");jn.f=Object.getOwnPropertyNames||function(e){return Zn(e,er)};var tr={};tr.f=Object.getOwnPropertySymbols;var nr=jn,rr=tr,ar=be,ir=Mn("Reflect","ownKeys")||function(e){var t=nr.f(ar(e)),n=rr.f;return n?t.concat(n(e)):t},sr=Be,or=ir,dr=Ct,ur=ce,lr=function(e,t){for(var n=or(t),r=ur.f,a=dr.f,i=0;i<n.length;i++){var s=n[i];sr(e,s)||r(e,s,a(t,s))}},cr=z,hr=/#|\.prototype\./,fr=function(e,t){var n=mr[pr(e)];return n==vr||n!=gr&&("function"==typeof t?cr(t):!!t)},pr=fr.normalize=function(e){return String(e).replace(hr,".").toLowerCase()},mr=fr.data={},gr=fr.NATIVE="N",vr=fr.POLYFILL="P",yr=fr,br=G,_r=Ct.f,wr=Ie,Ar=Qt.exports,kr=Ce,Er=lr,xr=yr,Sr=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?br:u?br[o]||kr(o,{}):(br[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=_r(n,r))&&s.value:n[r],!xr(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Er(i,a)}(e.sham||a&&a.sham)&&wr(i,"sham",!0),Ar(n,r,i,e)}},Rr=Yn,Tr=Xn,Dr=Object.keys||function(e){return Rr(e,Tr)},Ir=Z,Or=Dr;Sr({target:"Object",stat:!0,forced:z((function(){Or(1)}))},{keys:function(e){return Or(Ir(e))}});var Pr=Array.isArray,Cr=Object.prototype.toString,Lr=Pr||function(e){return!!e&&"[object Array]"==Cr.call(e)},Ur={name:"@bygd/gd-sdk-pes",version:"1.30.4",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"}},Mr=function(e){var t=jr("object"===E.default(e)?e:a.parseJSON(e));return t&&t.version?Ur.version>=t.version?t:void 0:t},jr=function(e){var t=this;if(!Lr(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}},Br=function(){var e;(e=console).log.apply(e,arguments)},qr=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 Gr,Nr={},Fr=ce,Vr=be,Wr=Dr,zr=le?Object.defineProperties:function(e,t){Vr(e);for(var n,r=Wr(t),a=r.length,i=0;a>i;)Fr.f(e,n=r[i++],t[n]);return e},Kr=Mn("document","documentElement"),Hr=be,$r=zr,Qr=Xn,Jr=ln,Yr=Kr,Xr=me,Zr=un("IE_PROTO"),ea=function(){},ta=function(e){return"<script>"+e+"<\/script>"},na=function(){try{Gr=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;na=Gr?function(e){e.write(ta("")),e.close();var t=e.parentWindow.Object;return e=null,t}(Gr):((t=Xr("iframe")).style.display="none",Yr.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ta("document.F=Object")),e.close(),e.F);for(var n=Qr.length;n--;)delete na.prototype[Qr[n]];return na()};Jr[Zr]=!0;var ra=Object.create||function(e,t){var n;return null!==e?(ea.prototype=Hr(e),n=new ea,ea.prototype=null,n[Zr]=e):n=na(),void 0===t?n:$r(n,t)},aa={},ia=Gt,sa=jn.f,oa={}.toString,da="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];aa.f=function(e){return da&&"[object Window]"==oa.call(e)?function(e){try{return sa(e)}catch(e){return da.slice()}}(e):sa(ia(e))};var ua={},la=et;ua.f=la;var ca=Pn,ha=Be,fa=ua,pa=ce.f,ma=function(e){var t=ca.Symbol||(ca.Symbol={});ha(t,e)||pa(t,e,{value:fa.f(e)})},ga=ce.f,va=Be,ya=et("toStringTag"),ba=function(e,t,n){e&&!va(e=n?e:e.prototype,ya)&&ga(e,ya,{configurable:!0,value:t})},_a=Sr,wa=G,Aa=Mn,ka=le,Ea=Ve,xa=We,Sa=z,Ra=Be,Ta=de,Da=se,Ia=be,Oa=Z,Pa=Gt,Ca=we,La=Re,Ua=ra,Ma=Dr,ja=jn,Ba=aa,qa=tr,Ga=Ct,Na=ce,Fa=Lt,Va=Ie,Wa=Qt.exports,za=ue.exports,Ka=ln,Ha=Ne,$a=et,Qa=ua,Ja=ma,Ya=ba,Xa=kn,Za=ht.forEach,ei=un("hidden"),ti=$a("toPrimitive"),ni=Xa.set,ri=Xa.getterFor("Symbol"),ai=Object.prototype,ii=wa.Symbol,si=Aa("JSON","stringify"),oi=Ga.f,di=Na.f,ui=Ba.f,li=Fa.f,ci=za("symbols"),hi=za("op-symbols"),fi=za("string-to-symbol-registry"),pi=za("symbol-to-string-registry"),mi=za("wks"),gi=wa.QObject,vi=!gi||!gi.prototype||!gi.prototype.findChild,yi=ka&&Sa((function(){return 7!=Ua(di({},"a",{get:function(){return di(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=oi(ai,t);r&&delete ai[t],di(e,t,n),r&&e!==ai&&di(ai,t,r)}:di,bi=function(e,t){var n=ci[e]=Ua(ii.prototype);return ni(n,{type:"Symbol",tag:e,description:t}),ka||(n.description=t),n},_i=xa?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof ii},wi=function(e,t,n){e===ai&&wi(hi,t,n),Ia(e);var r=Ca(t,!0);return Ia(n),Ra(ci,r)?(n.enumerable?(Ra(e,ei)&&e[ei][r]&&(e[ei][r]=!1),n=Ua(n,{enumerable:La(0,!1)})):(Ra(e,ei)||di(e,ei,La(1,{})),e[ei][r]=!0),yi(e,r,n)):di(e,r,n)},Ai=function(e,t){Ia(e);var n=Pa(t),r=Ma(n).concat(Si(n));return Za(r,(function(t){ka&&!ki.call(n,t)||wi(e,t,n[t])})),e},ki=function(e){var t=Ca(e,!0),n=li.call(this,t);return!(this===ai&&Ra(ci,t)&&!Ra(hi,t))&&(!(n||!Ra(this,t)||!Ra(ci,t)||Ra(this,ei)&&this[ei][t])||n)},Ei=function(e,t){var n=Pa(e),r=Ca(t,!0);if(n!==ai||!Ra(ci,r)||Ra(hi,r)){var a=oi(n,r);return!a||!Ra(ci,r)||Ra(n,ei)&&n[ei][r]||(a.enumerable=!0),a}},xi=function(e){var t=ui(Pa(e)),n=[];return Za(t,(function(e){Ra(ci,e)||Ra(Ka,e)||n.push(e)})),n},Si=function(e){var t=e===ai,n=ui(t?hi:Pa(e)),r=[];return Za(n,(function(e){!Ra(ci,e)||t&&!Ra(ai,e)||r.push(ci[e])})),r};(Ea||(Wa((ii=function(){if(this instanceof ii)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=Ha(e),n=function(e){this===ai&&n.call(hi,e),Ra(this,ei)&&Ra(this[ei],t)&&(this[ei][t]=!1),yi(this,t,La(1,e))};return ka&&vi&&yi(ai,t,{configurable:!0,set:n}),bi(t,e)}).prototype,"toString",(function(){return ri(this).tag})),Wa(ii,"withoutSetter",(function(e){return bi(Ha(e),e)})),Fa.f=ki,Na.f=wi,Ga.f=Ei,ja.f=Ba.f=xi,qa.f=Si,Qa.f=function(e){return bi($a(e),e)},ka&&(di(ii.prototype,"description",{configurable:!0,get:function(){return ri(this).description}}),Wa(ai,"propertyIsEnumerable",ki,{unsafe:!0}))),_a({global:!0,wrap:!0,forced:!Ea,sham:!Ea},{Symbol:ii}),Za(Ma(mi),(function(e){Ja(e)})),_a({target:"Symbol",stat:!0,forced:!Ea},{for:function(e){var t=String(e);if(Ra(fi,t))return fi[t];var n=ii(t);return fi[t]=n,pi[n]=t,n},keyFor:function(e){if(!_i(e))throw TypeError(e+" is not a symbol");if(Ra(pi,e))return pi[e]},useSetter:function(){vi=!0},useSimple:function(){vi=!1}}),_a({target:"Object",stat:!0,forced:!Ea,sham:!ka},{create:function(e,t){return void 0===t?Ua(e):Ai(Ua(e),t)},defineProperty:wi,defineProperties:Ai,getOwnPropertyDescriptor:Ei}),_a({target:"Object",stat:!0,forced:!Ea},{getOwnPropertyNames:xi,getOwnPropertySymbols:Si}),_a({target:"Object",stat:!0,forced:Sa((function(){qa.f(1)}))},{getOwnPropertySymbols:function(e){return qa.f(Oa(e))}}),si)&&_a({target:"JSON",stat:!0,forced:!Ea||Sa((function(){var e=ii();return"[null]"!=si([e])||"{}"!=si({a:e})||"{}"!=si(Object(e))}))},{stringify:function(e,t,n){for(var r,a=[e],i=1;arguments.length>i;)a.push(arguments[i++]);if(r=t,(Da(t)||void 0!==e)&&!_i(e))return Ta(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!_i(t))return t}),a[1]=t,si.apply(null,a)}});ii.prototype[ti]||Va(ii.prototype,ti,ii.prototype.valueOf),Ya(ii,"Symbol"),Ka[ei]=!0;var Ri,Ti,Di=Mn("navigator","userAgent")||"",Ii=Di,Oi=G.process,Pi=Oi&&Oi.versions,Ci=Pi&&Pi.v8;Ci?Ti=(Ri=Ci.split("."))[0]+Ri[1]:Ii&&(!(Ri=Ii.match(/Edge\/(\d+)/))||Ri[1]>=74)&&(Ri=Ii.match(/Chrome\/(\d+)/))&&(Ti=Ri[1]);var Li=Ti&&+Ti,Ui=z,Mi=Li,ji=et("species"),Bi=function(e){return Mi>=51||!Ui((function(){var t=[];return(t.constructor={})[ji]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},qi=Sr,Gi=ht.filter,Ni=wt,Fi=Bi("filter"),Vi=Ni("filter");qi({target:"Array",proto:!0,forced:!Fi||!Vi},{filter:function(e){return Gi(this,e,arguments.length>1?arguments[1]:void 0)}});var Wi=Sr,zi=z,Ki=Gt,Hi=Ct.f,$i=le,Qi=zi((function(){Hi(1)}));Wi({target:"Object",stat:!0,forced:!$i||Qi,sham:!$i},{getOwnPropertyDescriptor:function(e,t){return Hi(Ki(e),t)}});var Ji=we,Yi=ce,Xi=Re,Zi=function(e,t,n){var r=Ji(t);r in e?Yi.f(e,r,Xi(0,n)):e[r]=n},es=ir,ts=Gt,ns=Ct,rs=Zi;Sr({target:"Object",stat:!0,sham:!le},{getOwnPropertyDescriptors:function(e){for(var t,n,r=ts(e),a=ns.f,i=es(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&rs(s,t,n);return s}});var as=Sr,is=se,ss=de,os=Nn,ds=ie,us=Gt,ls=Zi,cs=et,hs=wt,fs=Bi("slice"),ps=hs("slice",{ACCESSORS:!0,0:0,1:2}),ms=cs("species"),gs=[].slice,vs=Math.max;as({target:"Array",proto:!0,forced:!fs||!ps},{slice:function(e,t){var n,r,a,i=us(this),s=ds(i.length),o=os(e,s),d=os(void 0===t?s:t,s);if(ss(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!ss(n.prototype)?is(n)&&null===(n=n[ms])&&(n=void 0):n=void 0,n===Array||void 0===n))return gs.call(i,o,d);for(r=new(void 0===n?Array:n)(vs(d-o,0)),a=0;o<d;o++,a++)o in i&&ls(r,a,i[o]);return r.length=a,r}});var ys=be,bs=function(e,t,n,r){try{return r?t(ys(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&ys(a.call(e)),t}},_s={},ws=_s,As=et("iterator"),ks=Array.prototype,Es=function(e){return void 0!==e&&(ws.Array===e||ks[As]===e)},xs={};xs[et("toStringTag")]="z";var Ss="[object z]"===String(xs),Rs=Ss,Ts=H,Ds=et("toStringTag"),Is="Arguments"==Ts(function(){return arguments}()),Os=Rs?Ts: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=Object(e),Ds))?n:Is?Ts(t):"Object"==(r=Ts(t))&&"function"==typeof t.callee?"Arguments":r},Ps=Os,Cs=_s,Ls=et("iterator"),Us=function(e){if(null!=e)return e[Ls]||e["@@iterator"]||Cs[Ps(e)]},Ms=W,js=Z,Bs=bs,Gs=Es,Ns=ie,Fs=Zi,Vs=Us,Ws=function(e){var t,n,r,a,i,s,o=js(e),d="function"==typeof this?this:Array,u=arguments.length,l=u>1?arguments[1]:void 0,c=void 0!==l,h=Vs(o),f=0;if(c&&(l=Ms(l,u>2?arguments[2]:void 0,2)),null==h||d==Array&&Gs(h))for(n=new d(t=Ns(o.length));t>f;f++)s=c?l(o[f],f):o[f],Fs(n,f,s);else for(i=(a=h.call(o)).next,n=new d;!(r=i.call(a)).done;f++)s=c?Bs(a,l,[r.value,f],!0):r.value,Fs(n,f,s);return n.length=f,n},zs=et("iterator"),Ks=!1;try{var Hs=0,$s={next:function(){return{done:!!Hs++}},return:function(){Ks=!0}};$s[zs]=function(){return this},Array.from($s,(function(){throw 2}))}catch(e){}var Qs=function(e,t){if(!t&&!Ks)return!1;var n=!1;try{var r={};r[zs]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Js=Ws;Sr({target:"Array",stat:!0,forced:!Qs((function(e){Array.from(e)}))},{from:Js});var Ys,Xs,Zs,eo=ne,to=Y,no=function(e){return function(t,n){var r,a,i=String(to(t)),s=eo(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=i.charCodeAt(s))<55296||r>56319||s+1===o||(a=i.charCodeAt(s+1))<56320||a>57343?e?i.charAt(s):r:e?i.slice(s,s+2):a-56320+(r-55296<<10)+65536}},ro={codeAt:no(!1),charAt:no(!0)},ao=!z((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),io=Be,so=Z,oo=ao,uo=un("IE_PROTO"),lo=Object.prototype,co=oo?Object.getPrototypeOf:function(e){return e=so(e),io(e,uo)?e[uo]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?lo:null},ho=co,fo=Ie,po=Be,mo=et("iterator"),go=!1;[].keys&&("next"in(Zs=[].keys())?(Xs=ho(ho(Zs)))!==Object.prototype&&(Ys=Xs):go=!0),null==Ys&&(Ys={}),po(Ys,mo)||fo(Ys,mo,(function(){return this}));var vo={IteratorPrototype:Ys,BUGGY_SAFARI_ITERATORS:go},yo=vo.IteratorPrototype,bo=ra,_o=Re,wo=ba,Ao=_s,ko=function(){return this},Eo=function(e,t,n){var r=t+" Iterator";return e.prototype=bo(yo,{next:_o(1,n)}),wo(e,r,!1),Ao[r]=ko,e},xo=se,So=be,Ro=function(e){if(!xo(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},To=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return So(n),Ro(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),Do=Sr,Io=Eo,Oo=co,Po=To,Co=ba,Lo=Ie,Uo=Qt.exports,Mo=_s,jo=vo.IteratorPrototype,Bo=vo.BUGGY_SAFARI_ITERATORS,qo=et("iterator"),Go=function(){return this},No=function(e,t,n,r,a,i,s){Io(n,t,r);var o,d,u,l=function(e){if(e===a&&m)return m;if(!Bo&&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)}},c=t+" Iterator",h=!1,f=e.prototype,p=f[qo]||f["@@iterator"]||a&&f[a],m=!Bo&&p||l(a),g="Array"==t&&f.entries||p;if(g&&(o=Oo(g.call(new e)),jo!==Object.prototype&&o.next&&(Oo(o)!==jo&&(Po?Po(o,jo):"function"!=typeof o[qo]&&Lo(o,qo,Go)),Co(o,c,!0))),"values"==a&&p&&"values"!==p.name&&(h=!0,m=function(){return p.call(this)}),f[qo]!==m&&Lo(f,qo,m),Mo[t]=m,a)if(d={values:l("values"),keys:i?m:l("keys"),entries:l("entries")},s)for(u in d)(Bo||h||!(u in f))&&Uo(f,u,d[u]);else Do({target:t,proto:!0,forced:Bo||h},d);return d},Fo=ro.charAt,Vo=kn,Wo=No,zo=Vo.set,Ko=Vo.getterFor("String Iterator");Wo(String,"String",(function(e){zo(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=Ko(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Fo(n,r),t.index+=e.length,{value:e,done:!1})}));var Ho=Sr,$o=le,Qo=G,Jo=Be,Yo=se,Xo=ce.f,Zo=lr,ed=Qo.Symbol;if($o&&"function"==typeof ed&&(!("description"in ed.prototype)||void 0!==ed().description)){var td={},nd=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof nd?new ed(e):void 0===e?ed():ed(e);return""===e&&(td[t]=!0),t};Zo(nd,ed);var rd=nd.prototype=ed.prototype;rd.constructor=nd;var ad=rd.toString,id="Symbol(test)"==String(ed("test")),sd=/^Symbol\((.*)\)[^)]+$/;Xo(rd,"description",{configurable:!0,get:function(){var e=Yo(this)?this.valueOf():this,t=ad.call(e);if(Jo(td,e))return"";var n=id?t.slice(7,-1):t.replace(sd,"$1");return""===n?void 0:n}}),Ho({global:!0,forced:!0},{Symbol:nd})}ma("iterator");var od=ra,dd=ce,ud=et("unscopables"),ld=Array.prototype;null==ld[ud]&&dd.f(ld,ud,{configurable:!0,value:od(null)});var cd=function(e){ld[ud][e]=!0},hd=Gt,fd=cd,pd=_s,md=kn,gd=No,vd=md.set,yd=md.getterFor("Array Iterator"),bd=gd(Array,"Array",(function(e,t){vd(this,{type:"Array Iterator",target:hd(e),index:0,kind:t})}),(function(){var e=yd(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");pd.Arguments=pd.Array,fd("keys"),fd("values"),fd("entries");var _d=G,wd=N,Ad=bd,kd=Ie,Ed=et,xd=Ed("iterator"),Sd=Ed("toStringTag"),Rd=Ad.values;for(var Td in wd){var Dd=_d[Td],Id=Dd&&Dd.prototype;if(Id){if(Id[xd]!==Rd)try{kd(Id,xd,Rd)}catch(e){Id[xd]=Rd}if(Id[Sd]||kd(Id,Sd,Td),wd[Td])for(var Od in Ad)if(Id[Od]!==Ad[Od])try{kd(Id,Od,Ad[Od])}catch(e){Id[Od]=Ad[Od]}}}var Pd=Os,Cd=Ss?{}.toString:function(){return"[object "+Pd(this)+"]"},Ld=Ss,Ud=Qt.exports,Md=Cd;Ld||Ud(Object.prototype,"toString",Md,{unsafe:!0});var jd=G.Promise,Bd=Qt.exports,qd=function(e,t,n){for(var r in t)Bd(e,r,t[r],n);return e},Gd=Mn,Nd=ce,Fd=le,Vd=et("species"),Wd=function(e){var t=Gd(e),n=Nd.f;Fd&&t&&!t[Vd]&&n(t,Vd,{configurable:!0,get:function(){return this}})},zd=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},Kd={exports:{}},Hd=be,$d=Es,Qd=ie,Jd=W,Yd=Us,Xd=bs,Zd=function(e,t){this.stopped=e,this.result=t};(Kd.exports=function(e,t,n,r,a){var i,s,o,d,u,l,c,h=Jd(t,n,r?2:1);if(a)i=e;else{if("function"!=typeof(s=Yd(e)))throw TypeError("Target is not iterable");if($d(s)){for(o=0,d=Qd(e.length);d>o;o++)if((u=r?h(Hd(c=e[o])[0],c[1]):h(e[o]))&&u instanceof Zd)return u;return new Zd(!1)}i=s.call(e)}for(l=i.next;!(c=l.call(i)).done;)if("object"==typeof(u=Xd(i,h,c.value,r))&&u&&u instanceof Zd)return u;return new Zd(!1)}).stop=function(e){return new Zd(!0,e)};var eu,tu,nu,ru=be,au=F,iu=et("species"),su=function(e,t){var n,r=ru(e).constructor;return void 0===r||null==(n=ru(r)[iu])?t:au(n)},ou=/(iphone|ipod|ipad).*applewebkit/i.test(Di),du=G,uu=z,lu=H,cu=W,hu=Kr,fu=me,pu=ou,mu=du.location,gu=du.setImmediate,vu=du.clearImmediate,yu=du.process,bu=du.MessageChannel,_u=du.Dispatch,wu=0,Au={},ku=function(e){if(Au.hasOwnProperty(e)){var t=Au[e];delete Au[e],t()}},Eu=function(e){return function(){ku(e)}},xu=function(e){ku(e.data)},Su=function(e){du.postMessage(e+"",mu.protocol+"//"+mu.host)};gu&&vu||(gu=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return Au[++wu]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},eu(wu),wu},vu=function(e){delete Au[e]},"process"==lu(yu)?eu=function(e){yu.nextTick(Eu(e))}:_u&&_u.now?eu=function(e){_u.now(Eu(e))}:bu&&!pu?(nu=(tu=new bu).port2,tu.port1.onmessage=xu,eu=cu(nu.postMessage,nu,1)):!du.addEventListener||"function"!=typeof postMessage||du.importScripts||uu(Su)||"file:"===mu.protocol?eu="onreadystatechange"in fu("script")?function(e){hu.appendChild(fu("script")).onreadystatechange=function(){hu.removeChild(this),ku(e)}}:function(e){setTimeout(Eu(e),0)}:(eu=Su,du.addEventListener("message",xu,!1)));var Ru,Tu,Du,Iu,Ou,Pu,Cu,Lu,Uu={set:gu,clear:vu},Mu=G,ju=Ct.f,Bu=H,qu=Uu.set,Gu=ou,Nu=Mu.MutationObserver||Mu.WebKitMutationObserver,Fu=Mu.process,Vu=Mu.Promise,Wu="process"==Bu(Fu),zu=ju(Mu,"queueMicrotask"),Ku=zu&&zu.value;Ku||(Ru=function(){var e,t;for(Wu&&(e=Fu.domain)&&e.exit();Tu;){t=Tu.fn,Tu=Tu.next;try{t()}catch(e){throw Tu?Iu():Du=void 0,e}}Du=void 0,e&&e.enter()},Wu?Iu=function(){Fu.nextTick(Ru)}:Nu&&!Gu?(Ou=!0,Pu=document.createTextNode(""),new Nu(Ru).observe(Pu,{characterData:!0}),Iu=function(){Pu.data=Ou=!Ou}):Vu&&Vu.resolve?(Cu=Vu.resolve(void 0),Lu=Cu.then,Iu=function(){Lu.call(Cu,Ru)}):Iu=function(){qu.call(Mu,Ru)});var Hu=Ku||function(e){var t={fn:e,next:void 0};Du&&(Du.next=t),Tu||(Tu=t,Iu()),Du=t},$u={},Qu=F,Ju=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=Qu(t),this.reject=Qu(n)};$u.f=function(e){return new Ju(e)};var Yu,Xu,Zu,el,tl=be,nl=se,rl=$u,al=function(e,t){if(tl(e),nl(t)&&t.constructor===e)return t;var n=rl.f(e);return(0,n.resolve)(t),n.promise},il=G,sl=Sr,ol=G,dl=Mn,ul=jd,ll=Qt.exports,cl=qd,hl=ba,fl=Wd,pl=se,ml=F,gl=zd,vl=H,yl=tn,bl=Kd.exports,_l=Qs,wl=su,Al=Uu.set,kl=Hu,El=al,xl=function(e,t){var n=il.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))},Sl=$u,Rl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Tl=kn,Dl=yr,Il=Li,Ol=et("species"),Pl="Promise",Cl=Tl.get,Ll=Tl.set,Ul=Tl.getterFor(Pl),Ml=ul,jl=ol.TypeError,Bl=ol.document,ql=ol.process,Gl=dl("fetch"),Nl=Sl.f,Fl=Nl,Vl="process"==vl(ql),Wl=!!(Bl&&Bl.createEvent&&ol.dispatchEvent),zl=Dl(Pl,(function(){if(!(yl(Ml)!==String(Ml))){if(66===Il)return!0;if(!Vl&&"function"!=typeof PromiseRejectionEvent)return!0}if(Il>=51&&/native code/.test(Ml))return!1;var e=Ml.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[Ol]=t,!(e.then((function(){}))instanceof t)})),Kl=zl||!_l((function(e){Ml.all(e).catch((function(){}))})),Hl=function(e){var t;return!(!pl(e)||"function"!=typeof(t=e.then))&&t},$l=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;kl((function(){for(var a=t.value,i=1==t.state,s=0;r.length>s;){var o,d,u,l=r[s++],c=i?l.ok:l.fail,h=l.resolve,f=l.reject,p=l.domain;try{c?(i||(2===t.rejection&&Xl(e,t),t.rejection=1),!0===c?o=a:(p&&p.enter(),o=c(a),p&&(p.exit(),u=!0)),o===l.promise?f(jl("Promise-chain cycle")):(d=Hl(o))?d.call(o,h,f):h(o)):f(a)}catch(e){p&&!u&&p.exit(),f(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Jl(e,t)}))}},Ql=function(e,t,n){var r,a;Wl?((r=Bl.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),ol.dispatchEvent(r)):r={promise:t,reason:n},(a=ol["on"+e])?a(r):"unhandledrejection"===e&&xl("Unhandled promise rejection",n)},Jl=function(e,t){Al.call(ol,(function(){var n,r=t.value;if(Yl(t)&&(n=Rl((function(){Vl?ql.emit("unhandledRejection",r,e):Ql("unhandledrejection",e,r)})),t.rejection=Vl||Yl(t)?2:1,n.error))throw n.value}))},Yl=function(e){return 1!==e.rejection&&!e.parent},Xl=function(e,t){Al.call(ol,(function(){Vl?ql.emit("rejectionHandled",e):Ql("rejectionhandled",e,t.value)}))},Zl=function(e,t,n,r){return function(a){e(t,n,a,r)}},ec=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,$l(e,t,!0))},tc=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw jl("Promise can't be resolved itself");var a=Hl(n);a?kl((function(){var r={done:!1};try{a.call(n,Zl(tc,e,r,t),Zl(ec,e,r,t))}catch(n){ec(e,r,n,t)}})):(t.value=n,t.state=1,$l(e,t,!1))}catch(n){ec(e,{done:!1},n,t)}}};zl&&(Ml=function(e){gl(this,Ml,Pl),ml(e),Yu.call(this);var t=Cl(this);try{e(Zl(tc,this,t),Zl(ec,this,t))}catch(e){ec(this,t,e)}},(Yu=function(e){Ll(this,{type:Pl,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=cl(Ml.prototype,{then:function(e,t){var n=Ul(this),r=Nl(wl(this,Ml));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=Vl?ql.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&$l(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Xu=function(){var e=new Yu,t=Cl(e);this.promise=e,this.resolve=Zl(tc,e,t),this.reject=Zl(ec,e,t)},Sl.f=Nl=function(e){return e===Ml||e===Zu?new Xu(e):Fl(e)},"function"==typeof ul&&(el=ul.prototype.then,ll(ul.prototype,"then",(function(e,t){var n=this;return new Ml((function(e,t){el.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof Gl&&sl({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return El(Ml,Gl.apply(ol,arguments))}}))),sl({global:!0,wrap:!0,forced:zl},{Promise:Ml}),hl(Ml,Pl,!1),fl(Pl),Zu=dl(Pl),sl({target:Pl,stat:!0,forced:zl},{reject:function(e){var t=Nl(this);return t.reject.call(void 0,e),t.promise}}),sl({target:Pl,stat:!0,forced:zl},{resolve:function(e){return El(this,e)}}),sl({target:Pl,stat:!0,forced:Kl},{all:function(e){var t=this,n=Nl(t),r=n.resolve,a=n.reject,i=Rl((function(){var n=ml(t.resolve),i=[],s=0,o=1;bl(e,(function(e){var d=s++,u=!1;i.push(void 0),o++,n.call(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=Nl(t),r=n.reject,a=Rl((function(){var a=ml(t.resolve);bl(e,(function(e){a.call(t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var nc=Sr,rc=z,ac=de,ic=se,sc=Z,oc=ie,dc=Zi,uc=at,lc=Bi,cc=Li,hc=et("isConcatSpreadable"),fc=cc>=51||!rc((function(){var e=[];return e[hc]=!1,e.concat()[0]!==e})),pc=lc("concat"),mc=function(e){if(!ic(e))return!1;var t=e[hc];return void 0!==t?!!t:ac(e)};nc({target:"Array",proto:!0,forced:!fc||!pc},{concat:function(e){var t,n,r,a,i,s=sc(this),o=uc(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(mc(i=-1===t?s:arguments[t])){if(d+(a=oc(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<a;n++,d++)n in i&&dc(o,d,i[n])}else{if(d>=9007199254740991)throw TypeError("Maximum allowed index exceeded");dc(o,d++,i)}return o.length=d,o}});var gc=le,vc=ce.f,yc=Function.prototype,bc=yc.toString,_c=/^\s*function ([^ (]*)/;function wc(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 Ac(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 Ac(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 Ac(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 kc(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 Ec(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kc(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}gc&&!("name"in yc)&&vc(yc,"name",{configurable:!0,get:function(){try{return bc.call(this).match(_c)[1]}catch(e){return""}}});var xc,Sc={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"}},Rc={},Tc=function(e,t){Rc[e]=Ec(Ec({},t),{},{isLoading:!1})},Dc=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))},Ic=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=Rc[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=wc(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=Sc[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Dc({id:s,src:Sc[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,Dc({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)}}(),Oc=new function e(){var t=this;S.default(this,e),R.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,Ic("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),R.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)}}()),R.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"]},Tc(this.moduleName,this.moduleConfig)},Pc=se,Cc=H,Lc=et("match"),Uc=function(e){var t;return Pc(e)&&(void 0!==(t=e[Lc])?!!t:"RegExp"==Cc(e))},Mc=Uc,jc=function(e){if(Mc(e))throw TypeError("The method doesn't accept regular expressions");return e},Bc=et("match"),qc=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Bc]=!1,"/./"[e](t)}catch(e){}}return!1},Gc=Sr,Nc=Ct.f,Fc=ie,Vc=jc,Wc=Y,zc=qc,Kc="".startsWith,Hc=Math.min,$c=zc("startsWith");Gc({target:"String",proto:!0,forced:!!($c||(xc=Nc(String.prototype,"startsWith"),!xc||xc.writable))&&!$c},{startsWith:function(e){var t=String(Wc(this));Vc(e);var n=Fc(Hc(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return Kc?Kc.call(t,r,n):t.slice(n,n+r.length)===r}});var Qc=be,Jc=function(){var e=Qc(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},Yc=Qt.exports,Xc=be,Zc=z,eh=Jc,th=RegExp.prototype,nh=th.toString,rh=Zc((function(){return"/a/b"!=nh.call({source:"a",flags:"b"})})),ah="toString"!=nh.name;(rh||ah)&&Yc(RegExp.prototype,"toString",(function(){var e=Xc(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in th)?eh.call(e):n)}),{unsafe:!0});var ih={},sh=z;function oh(e,t){return RegExp(e,t)}ih.UNSUPPORTED_Y=sh((function(){var e=oh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ih.BROKEN_CARET=sh((function(){var e=oh("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var dh=Jc,uh=ih,lh=RegExp.prototype.exec,ch=String.prototype.replace,hh=lh,fh=function(){var e=/a/,t=/b*/g;return lh.call(e,"a"),lh.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),ph=uh.UNSUPPORTED_Y||uh.BROKEN_CARET,mh=void 0!==/()??/.exec("")[1];(fh||mh||ph)&&(hh=function(e){var t,n,r,a,i=this,s=ph&&i.sticky,o=dh.call(i),d=i.source,u=0,l=e;return s&&(-1===(o=o.replace("y","")).indexOf("g")&&(o+="g"),l=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(d="(?: "+d+")",l=" "+l,u++),n=new RegExp("^(?:"+d+")",o)),mh&&(n=new RegExp("^"+d+"$(?!\\s)",o)),fh&&(t=i.lastIndex),r=lh.call(s?n:i,l),s?r?(r.input=r.input.slice(u),r[0]=r[0].slice(u),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:fh&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),mh&&r&&r.length>1&&ch.call(r[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)})),r});var gh=hh;Sr({target:"RegExp",proto:!0,forced:/./.exec!==gh},{exec:gh});var vh=Qt.exports,yh=z,bh=et,_h=gh,wh=Ie,Ah=bh("species"),kh=!yh((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Eh="$0"==="a".replace(/./,"$0"),xh=bh("replace"),Sh=!!/./[xh]&&""===/./[xh]("a","$0"),Rh=!yh((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]})),Th=function(e,t,n,r){var a=bh(e),i=!yh((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!yh((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ah]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||"replace"===e&&(!kh||!Eh||Sh)||"split"===e&&!Rh){var o=/./[a],d=n(a,""[e],(function(e,t,n,r,a){return t.exec===_h?i&&!a?{done:!0,value:o.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Eh,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Sh}),u=d[0],l=d[1];vh(String.prototype,e,u),vh(RegExp.prototype,a,2==t?function(e,t){return l.call(e,this,t)}:function(e){return l.call(e,this)})}r&&wh(RegExp.prototype[a],"sham",!0)},Dh=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Ih=H,Oh=gh,Ph=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Ih(e))throw TypeError("RegExp#exec called on incompatible receiver");return Oh.call(e,t)},Ch=be,Lh=Y,Uh=Dh,Mh=Ph;function jh(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 Bh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jh(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Th("search",1,(function(e,t,n){return[function(t){var n=Lh(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=Ch(e),i=String(this),s=a.lastIndex;Uh(s,0)||(a.lastIndex=0);var o=Mh(a,i);return Uh(a.lastIndex,s)||(a.lastIndex=s),null===o?-1:o.index}]}));var qh,Gh,Nh=function(){function e(){S.default(this,e)}return T.default(e,[{key:"getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",p);var m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:l,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:c,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 D.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 D.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new D.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 D.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 D.default(e,!0);return n.query=Bh(Bh({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),Fh=function(){try{return(new Nh).getBridgeContext()}catch(e){return{}}}(),Vh={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(qh=!1,(Gh=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===Gh.xanthophyll&&(qh=!0),qh)},Wh=ro.charAt,zh=function(e,t,n){return t+(n?Wh(e,t).length:1)},Kh=Th,Hh=be,$h=Z,Qh=ie,Jh=ne,Yh=Y,Xh=zh,Zh=Ph,ef=Math.max,tf=Math.min,nf=Math.floor,rf=/\$([$&'`]|\d\d?|<[^>]*>)/g,af=/\$([$&'`]|\d\d?)/g;Kh("replace",2,(function(e,t,n,r){var a=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,s=a?"$":"$0";return[function(n,r){var a=Yh(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,a,r):t.call(String(a),n,r)},function(e,r){if(!a&&i||"string"==typeof r&&-1===r.indexOf(s)){var d=n(t,e,this,r);if(d.done)return d.value}var u=Hh(e),l=String(this),c="function"==typeof r;c||(r=String(r));var h=u.global;if(h){var f=u.unicode;u.lastIndex=0}for(var p=[];;){var m=Zh(u,l);if(null===m)break;if(p.push(m),!h)break;""===String(m[0])&&(u.lastIndex=Xh(l,Qh(u.lastIndex),f))}for(var g,v="",y=0,b=0;b<p.length;b++){m=p[b];for(var _=String(m[0]),w=ef(tf(Jh(m.index),l.length),0),A=[],k=1;k<m.length;k++)A.push(void 0===(g=m[k])?g:String(g));var E=m.groups;if(c){var x=[_].concat(A,w,l);void 0!==E&&x.push(E);var S=String(r.apply(void 0,x))}else S=o(_,l,w,A,E,r);w>=y&&(v+=l.slice(y,w)+S,y=w+_.length)}return v+l.slice(y)}];function o(e,n,r,a,i,s){var o=r+e.length,d=a.length,u=af;return void 0!==i&&(i=$h(i),u=rf),t.call(s,u,(function(t,s){var u;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(o);case"<":u=i[s.slice(1,-1)];break;default:var l=+s;if(0===l)return t;if(l>d){var c=nf(l/10);return 0===c?t:c<=d?void 0===a[c-1]?s.charAt(1):a[c-1]+s.charAt(1):t}u=a[l-1]}return void 0===u?"":u}))}}));var sf=z,of=et("iterator"),df=!sf((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[of]||"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})),uf=le,lf=z,cf=Dr,hf=tr,ff=Lt,pf=Z,mf=J,gf=Object.assign,vf=Object.defineProperty,yf=!gf||lf((function(){if(uf&&1!==gf({b:1},gf(vf({},"a",{enumerable:!0,get:function(){vf(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!=gf({},e)[n]||cf(gf({},t)).join("")!=r}))?function(e,t){for(var n=pf(e),r=arguments.length,a=1,i=hf.f,s=ff.f;r>a;)for(var o,d=mf(arguments[a++]),u=i?cf(d).concat(i(d)):cf(d),l=u.length,c=0;l>c;)o=u[c++],uf&&!s.call(d,o)||(n[o]=d[o]);return n}:gf,bf=/[^\0-\u007E]/,_f=/[.\u3002\uFF0E\uFF61]/g,wf="Overflow: input needs wider integers to process",Af=Math.floor,kf=String.fromCharCode,Ef=function(e){return e+22+75*(e<26)},xf=function(e,t,n){var r=0;for(e=n?Af(e/700):e>>1,e+=Af(e/t);e>455;r+=36)e=Af(e/35);return Af(r+36*e/(e+38))},Sf=function(e){var t,n,r=[],a=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&a)<<10)+(1023&i)+65536):(t.push(a),n--)}else t.push(a)}return t}(e)).length,i=128,s=0,o=72;for(t=0;t<e.length;t++)(n=e[t])<128&&r.push(kf(n));var d=r.length,u=d;for(d&&r.push("-");u<a;){var l=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=i&&n<l&&(l=n);var c=u+1;if(l-i>Af((2147483647-s)/c))throw RangeError(wf);for(s+=(l-i)*c,i=l,t=0;t<e.length;t++){if((n=e[t])<i&&++s>2147483647)throw RangeError(wf);if(n==i){for(var h=s,f=36;;f+=36){var p=f<=o?1:f>=o+26?26:f-o;if(h<p)break;var m=h-p,g=36-p;r.push(kf(Ef(p+m%g))),h=Af(m/g)}r.push(kf(Ef(h))),o=xf(s,c,u==d),s=0,++u}}++s,++i}return r.join("")},Rf=be,Tf=Us,Df=Sr,If=Mn,Of=df,Pf=Qt.exports,Cf=qd,Lf=ba,Uf=Eo,Mf=kn,jf=zd,Bf=Be,qf=W,Gf=Os,Nf=be,Ff=se,Vf=ra,Wf=Re,zf=function(e){var t=Tf(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return Rf(t.call(e))},Kf=Us,Hf=et,$f=If("fetch"),Qf=If("Headers"),Jf=Hf("iterator"),Yf=Mf.set,Xf=Mf.getterFor("URLSearchParams"),Zf=Mf.getterFor("URLSearchParamsIterator"),ep=/\+/g,tp=Array(4),np=function(e){return tp[e-1]||(tp[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},rp=function(e){try{return decodeURIComponent(e)}catch(t){return e}},ap=function(e){var t=e.replace(ep," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(np(n--),rp);return t}},ip=/[!'()~]|%20/g,sp={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},op=function(e){return sp[e]},dp=function(e){return encodeURIComponent(e).replace(ip,op)},up=function(e,t){if(t)for(var n,r,a=t.split("&"),i=0;i<a.length;)(n=a[i++]).length&&(r=n.split("="),e.push({key:ap(r.shift()),value:ap(r.join("="))}))},lp=function(e){this.entries.length=0,up(this.entries,e)},cp=function(e,t){if(e<t)throw TypeError("Not enough arguments")},hp=Uf((function(e,t){Yf(this,{type:"URLSearchParamsIterator",iterator:zf(Xf(e).entries),kind:t})}),"Iterator",(function(){var e=Zf(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})),fp=function(){jf(this,fp,"URLSearchParams");var e,t,n,r,a,i,s,o,d,u=arguments.length>0?arguments[0]:void 0,l=this,c=[];if(Yf(l,{type:"URLSearchParams",entries:c,updateURL:function(){},updateSearchParams:lp}),void 0!==u)if(Ff(u))if("function"==typeof(e=Kf(u)))for(n=(t=e.call(u)).next;!(r=n.call(t)).done;){if((s=(i=(a=zf(Nf(r.value))).next).call(a)).done||(o=i.call(a)).done||!i.call(a).done)throw TypeError("Expected sequence with length 2");c.push({key:s.value+"",value:o.value+""})}else for(d in u)Bf(u,d)&&c.push({key:d,value:u[d]+""});else up(c,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},pp=fp.prototype;Cf(pp,{append:function(e,t){cp(arguments.length,2);var n=Xf(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){cp(arguments.length,1);for(var t=Xf(this),n=t.entries,r=e+"",a=0;a<n.length;)n[a].key===r?n.splice(a,1):a++;t.updateURL()},get:function(e){cp(arguments.length,1);for(var t=Xf(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){cp(arguments.length,1);for(var t=Xf(this).entries,n=e+"",r=[],a=0;a<t.length;a++)t[a].key===n&&r.push(t[a].value);return r},has:function(e){cp(arguments.length,1);for(var t=Xf(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){cp(arguments.length,1);for(var n,r=Xf(this),a=r.entries,i=!1,s=e+"",o=t+"",d=0;d<a.length;d++)(n=a[d]).key===s&&(i?a.splice(d--,1):(i=!0,n.value=o));i||a.push({key:s,value:o}),r.updateURL()},sort:function(){var e,t,n,r=Xf(this),a=r.entries,i=a.slice();for(a.length=0,n=0;n<i.length;n++){for(e=i[n],t=0;t<n;t++)if(a[t].key>e.key){a.splice(t,0,e);break}t===n&&a.push(e)}r.updateURL()},forEach:function(e){for(var t,n=Xf(this).entries,r=qf(e,arguments.length>1?arguments[1]:void 0,3),a=0;a<n.length;)r((t=n[a++]).value,t.key,this)},keys:function(){return new hp(this,"keys")},values:function(){return new hp(this,"values")},entries:function(){return new hp(this,"entries")}},{enumerable:!0}),Pf(pp,Jf,pp.entries),Pf(pp,"toString",(function(){for(var e,t=Xf(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(dp(e.key)+"="+dp(e.value));return n.join("&")}),{enumerable:!0}),Lf(fp,"URLSearchParams"),Df({global:!0,forced:!Of},{URLSearchParams:fp}),Of||"function"!=typeof $f||"function"!=typeof Qf||Df({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,a=[e];return arguments.length>1&&(Ff(t=arguments[1])&&(n=t.body,"URLSearchParams"===Gf(n)&&((r=t.headers?new Qf(t.headers):new Qf).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=Vf(t,{body:Wf(0,String(n)),headers:Wf(0,r)}))),a.push(t)),$f.apply(this,a)}});var mp,gp={URLSearchParams:fp,getState:Xf},vp=Sr,yp=le,bp=df,_p=G,wp=zr,Ap=Qt.exports,kp=zd,Ep=Be,xp=yf,Sp=Ws,Rp=ro.codeAt,Tp=function(e){var t,n,r=[],a=e.toLowerCase().replace(_f,".").split(".");for(t=0;t<a.length;t++)n=a[t],r.push(bf.test(n)?"xn--"+Sf(n):n);return r.join(".")},Dp=ba,Ip=gp,Op=kn,Pp=_p.URL,Cp=Ip.URLSearchParams,Lp=Ip.getState,Up=Op.set,Mp=Op.getterFor("URL"),jp=Math.floor,Bp=Math.pow,qp=/[A-Za-z]/,Gp=/[\d+-.A-Za-z]/,Np=/\d/,Fp=/^(0x|0X)/,Vp=/^[0-7]+$/,Wp=/^\d+$/,zp=/^[\dA-Fa-f]+$/,Kp=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,Hp=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,$p=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,Qp=/[\u0009\u000A\u000D]/g,Jp=function(e,t){var n,r,a;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=Xp(t.slice(1,-1))))return"Invalid host";e.host=n}else if(sm(e)){if(t=Tp(t),Kp.test(t))return"Invalid host";if(null===(n=Yp(t)))return"Invalid host";e.host=n}else{if(Hp.test(t))return"Invalid host";for(n="",r=Sp(t),a=0;a<r.length;a++)n+=am(r[a],em);e.host=n}},Yp=function(e){var t,n,r,a,i,s,o,d=e.split(".");if(d.length&&""==d[d.length-1]&&d.pop(),(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=d[r]))return e;if(i=10,a.length>1&&"0"==a.charAt(0)&&(i=Fp.test(a)?16:8,a=a.slice(8==i?1:2)),""===a)s=0;else{if(!(10==i?Wp:8==i?Vp:zp).test(a))return e;s=parseInt(a,i)}n.push(s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=Bp(256,5-t))return null}else if(s>255)return null;for(o=n.pop(),r=0;r<n.length;r++)o+=n[r]*Bp(256,3-r);return o},Xp=function(e){var t,n,r,a,i,s,o,d=[0,0,0,0,0,0,0,0],u=0,l=null,c=0,h=function(){return e.charAt(c)};if(":"==h()){if(":"!=e.charAt(1))return;c+=2,l=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&zp.test(h());)t=16*t+parseInt(h(),16),c++,n++;if("."==h()){if(0==n)return;if(c-=n,u>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;c++}if(!Np.test(h()))return;for(;Np.test(h());){if(i=parseInt(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;c++}d[u]=256*d[u]+a,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(c++,!h())return}else if(h())return;d[u++]=t}else{if(null!==l)return;c++,l=++u}}if(null!==l)for(s=u-l,u=7;0!=u&&s>0;)o=d[u],d[u--]=d[l+s-1],d[l+--s]=o;else if(8!=u)return;return d},Zp=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=jp(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,i=0;i<8;i++)0!==e[i]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=i),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},em={},tm=xp({},em,{" ":1,'"':1,"<":1,">":1,"`":1}),nm=xp({},tm,{"#":1,"?":1,"{":1,"}":1}),rm=xp({},nm,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),am=function(e,t){var n=Rp(e,0);return n>32&&n<127&&!Ep(t,e)?e:encodeURIComponent(e)},im={ftp:21,file:null,http:80,https:443,ws:80,wss:443},sm=function(e){return Ep(im,e.scheme)},om=function(e){return""!=e.username||""!=e.password},dm=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},um=function(e,t){var n;return 2==e.length&&qp.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},lm=function(e){var t;return e.length>1&&um(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},cm=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&um(t[0],!0)||t.pop()},hm=function(e){return"."===e||"%2e"===e.toLowerCase()},fm={},pm={},mm={},gm={},vm={},ym={},bm={},_m={},wm={},Am={},km={},Em={},xm={},Sm={},Rm={},Tm={},Dm={},Im={},Om={},Pm={},Cm={},Lm=function(e,t,n,r){var a,i,s,o,d,u=n||fm,l=0,c="",h=!1,f=!1,p=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace($p,"")),t=t.replace(Qp,""),a=Sp(t);l<=a.length;){switch(i=a[l],u){case fm:if(!i||!qp.test(i)){if(n)return"Invalid scheme";u=mm;continue}c+=i.toLowerCase(),u=pm;break;case pm:if(i&&(Gp.test(i)||"+"==i||"-"==i||"."==i))c+=i.toLowerCase();else{if(":"!=i){if(n)return"Invalid scheme";c="",u=mm,l=0;continue}if(n&&(sm(e)!=Ep(im,c)||"file"==c&&(om(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=c,n)return void(sm(e)&&im[e.scheme]==e.port&&(e.port=null));c="","file"==e.scheme?u=Sm:sm(e)&&r&&r.scheme==e.scheme?u=gm:sm(e)?u=_m:"/"==a[l+1]?(u=vm,l++):(e.cannotBeABaseURL=!0,e.path.push(""),u=Om)}break;case mm:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){e.scheme=r.scheme,e.path=r.path.slice(),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,u=Cm;break}u="file"==r.scheme?Sm:ym;continue;case gm:if("/"!=i||"/"!=a[l+1]){u=ym;continue}u=wm,l++;break;case vm:if("/"==i){u=Am;break}u=Im;continue;case ym:if(e.scheme=r.scheme,i==mp)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query;else if("/"==i||"\\"==i&&sm(e))u=bm;else if("?"==i)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query="",u=Pm;else{if("#"!=i){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.path.pop(),u=Im;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query,e.fragment="",u=Cm}break;case bm:if(!sm(e)||"/"!=i&&"\\"!=i){if("/"!=i){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,u=Im;continue}u=Am}else u=wm;break;case _m:if(u=wm,"/"!=i||"/"!=c.charAt(l+1))continue;l++;break;case wm:if("/"!=i&&"\\"!=i){u=Am;continue}break;case Am:if("@"==i){h&&(c="%40"+c),h=!0,s=Sp(c);for(var m=0;m<s.length;m++){var g=s[m];if(":"!=g||p){var v=am(g,rm);p?e.password+=v:e.username+=v}else p=!0}c=""}else if(i==mp||"/"==i||"?"==i||"#"==i||"\\"==i&&sm(e)){if(h&&""==c)return"Invalid authority";l-=Sp(c).length+1,c="",u=km}else c+=i;break;case km:case Em:if(n&&"file"==e.scheme){u=Tm;continue}if(":"!=i||f){if(i==mp||"/"==i||"?"==i||"#"==i||"\\"==i&&sm(e)){if(sm(e)&&""==c)return"Invalid host";if(n&&""==c&&(om(e)||null!==e.port))return;if(o=Jp(e,c))return o;if(c="",u=Dm,n)return;continue}"["==i?f=!0:"]"==i&&(f=!1),c+=i}else{if(""==c)return"Invalid host";if(o=Jp(e,c))return o;if(c="",u=xm,n==Em)return}break;case xm:if(!Np.test(i)){if(i==mp||"/"==i||"?"==i||"#"==i||"\\"==i&&sm(e)||n){if(""!=c){var y=parseInt(c,10);if(y>65535)return"Invalid port";e.port=sm(e)&&y===im[e.scheme]?null:y,c=""}if(n)return;u=Dm;continue}return"Invalid port"}c+=i;break;case Sm:if(e.scheme="file","/"==i||"\\"==i)u=Rm;else{if(!r||"file"!=r.scheme){u=Im;continue}if(i==mp)e.host=r.host,e.path=r.path.slice(),e.query=r.query;else if("?"==i)e.host=r.host,e.path=r.path.slice(),e.query="",u=Pm;else{if("#"!=i){lm(a.slice(l).join(""))||(e.host=r.host,e.path=r.path.slice(),cm(e)),u=Im;continue}e.host=r.host,e.path=r.path.slice(),e.query=r.query,e.fragment="",u=Cm}}break;case Rm:if("/"==i||"\\"==i){u=Tm;break}r&&"file"==r.scheme&&!lm(a.slice(l).join(""))&&(um(r.path[0],!0)?e.path.push(r.path[0]):e.host=r.host),u=Im;continue;case Tm:if(i==mp||"/"==i||"\\"==i||"?"==i||"#"==i){if(!n&&um(c))u=Im;else if(""==c){if(e.host="",n)return;u=Dm}else{if(o=Jp(e,c))return o;if("localhost"==e.host&&(e.host=""),n)return;c="",u=Dm}continue}c+=i;break;case Dm:if(sm(e)){if(u=Im,"/"!=i&&"\\"!=i)continue}else if(n||"?"!=i)if(n||"#"!=i){if(i!=mp&&(u=Im,"/"!=i))continue}else e.fragment="",u=Cm;else e.query="",u=Pm;break;case Im:if(i==mp||"/"==i||"\\"==i&&sm(e)||!n&&("?"==i||"#"==i)){if(".."===(d=(d=c).toLowerCase())||"%2e."===d||".%2e"===d||"%2e%2e"===d?(cm(e),"/"==i||"\\"==i&&sm(e)||e.path.push("")):hm(c)?"/"==i||"\\"==i&&sm(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&um(c)&&(e.host&&(e.host=""),c=c.charAt(0)+":"),e.path.push(c)),c="","file"==e.scheme&&(i==mp||"?"==i||"#"==i))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==i?(e.query="",u=Pm):"#"==i&&(e.fragment="",u=Cm)}else c+=am(i,nm);break;case Om:"?"==i?(e.query="",u=Pm):"#"==i?(e.fragment="",u=Cm):i!=mp&&(e.path[0]+=am(i,em));break;case Pm:n||"#"!=i?i!=mp&&("'"==i&&sm(e)?e.query+="%27":e.query+="#"==i?"%23":am(i,em)):(e.fragment="",u=Cm);break;case Cm:i!=mp&&(e.fragment+=am(i,tm))}l++}},Um=function(e){var t,n,r=kp(this,Um,"URL"),a=arguments.length>1?arguments[1]:void 0,i=String(e),s=Up(r,{type:"URL"});if(void 0!==a)if(a instanceof Um)t=Mp(a);else if(n=Lm(t={},String(a)))throw TypeError(n);if(n=Lm(s,i,null,t))throw TypeError(n);var o=s.searchParams=new Cp,d=Lp(o);d.updateSearchParams(s.query),d.updateURL=function(){s.query=String(o)||null},yp||(r.href=jm.call(r),r.origin=Bm.call(r),r.protocol=qm.call(r),r.username=Gm.call(r),r.password=Nm.call(r),r.host=Fm.call(r),r.hostname=Vm.call(r),r.port=Wm.call(r),r.pathname=zm.call(r),r.search=Km.call(r),r.searchParams=Hm.call(r),r.hash=$m.call(r))},Mm=Um.prototype,jm=function(){var e=Mp(this),t=e.scheme,n=e.username,r=e.password,a=e.host,i=e.port,s=e.path,o=e.query,d=e.fragment,u=t+":";return null!==a?(u+="//",om(e)&&(u+=n+(r?":"+r:"")+"@"),u+=Zp(a),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},Bm=function(){var e=Mp(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&sm(e)?t+"://"+Zp(e.host)+(null!==n?":"+n:""):"null"},qm=function(){return Mp(this).scheme+":"},Gm=function(){return Mp(this).username},Nm=function(){return Mp(this).password},Fm=function(){var e=Mp(this),t=e.host,n=e.port;return null===t?"":null===n?Zp(t):Zp(t)+":"+n},Vm=function(){var e=Mp(this).host;return null===e?"":Zp(e)},Wm=function(){var e=Mp(this).port;return null===e?"":String(e)},zm=function(){var e=Mp(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Km=function(){var e=Mp(this).query;return e?"?"+e:""},Hm=function(){return Mp(this).searchParams},$m=function(){var e=Mp(this).fragment;return e?"#"+e:""},Qm=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(yp&&wp(Mm,{href:Qm(jm,(function(e){var t=Mp(this),n=String(e),r=Lm(t,n);if(r)throw TypeError(r);Lp(t.searchParams).updateSearchParams(t.query)})),origin:Qm(Bm),protocol:Qm(qm,(function(e){var t=Mp(this);Lm(t,String(e)+":",fm)})),username:Qm(Gm,(function(e){var t=Mp(this),n=Sp(String(e));if(!dm(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=am(n[r],rm)}})),password:Qm(Nm,(function(e){var t=Mp(this),n=Sp(String(e));if(!dm(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=am(n[r],rm)}})),host:Qm(Fm,(function(e){var t=Mp(this);t.cannotBeABaseURL||Lm(t,String(e),km)})),hostname:Qm(Vm,(function(e){var t=Mp(this);t.cannotBeABaseURL||Lm(t,String(e),Em)})),port:Qm(Wm,(function(e){var t=Mp(this);dm(t)||(""==(e=String(e))?t.port=null:Lm(t,e,xm))})),pathname:Qm(zm,(function(e){var t=Mp(this);t.cannotBeABaseURL||(t.path=[],Lm(t,e+"",Dm))})),search:Qm(Km,(function(e){var t=Mp(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",Lm(t,e,Pm)),Lp(t.searchParams).updateSearchParams(t.query)})),searchParams:Qm(Hm),hash:Qm($m,(function(e){var t=Mp(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",Lm(t,e,Cm)):t.fragment=null}))}),Ap(Mm,"toJSON",(function(){return jm.call(this)}),{enumerable:!0}),Ap(Mm,"toString",(function(){return jm.call(this)}),{enumerable:!0}),Pp){var Jm=Pp.createObjectURL,Ym=Pp.revokeObjectURL;Jm&&Ap(Um,"createObjectURL",(function(e){return Jm.apply(Pp,arguments)})),Ym&&Ap(Um,"revokeObjectURL",(function(e){return Ym.apply(Pp,arguments)}))}Dp(Um,"URL"),vp({global:!0,forced:!bp,sham:!yp},{URL:Um});var Xm=Kn.includes,Zm=cd;Sr({target:"Array",proto:!0,forced:!wt("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return Xm(this,e,arguments.length>1?arguments[1]:void 0)}}),Zm("includes");var eg=jc,tg=Y;Sr({target:"String",proto:!0,forced:!qc("includes")},{includes:function(e){return!!~String(tg(this)).indexOf(eg(e),arguments.length>1?arguments[1]:void 0)}});var ng=Th,rg=Uc,ag=be,ig=Y,sg=su,og=zh,dg=ie,ug=Ph,lg=gh,cg=z,hg=[].push,fg=Math.min,pg=!cg((function(){return!RegExp(4294967295,"y")}));function mg(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 D.default(e,t)}catch(e){console.log(e)}}function l(){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=l();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=l(),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))}}}ng("split",2,(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=String(ig(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!rg(e))return t.call(r,e,a);for(var i,s,o,d=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,c=new RegExp(e.source,u+"g");(i=lg.call(c,r))&&!((s=c.lastIndex)>l&&(d.push(r.slice(l,i.index)),i.length>1&&i.index<r.length&&hg.apply(d,i.slice(1)),o=i[0].length,l=s,d.length>=a));)c.lastIndex===i.index&&c.lastIndex++;return l===r.length?!o&&c.test("")||d.push(""):d.push(r.slice(l)),d.length>a?d.slice(0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var a=ig(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,a,n):r.call(String(a),t,n)},function(e,a){var i=n(r,e,this,a,r!==t);if(i.done)return i.value;var s=ag(e),o=String(this),d=sg(s,RegExp),u=s.unicode,l=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(pg?"y":"g"),c=new d(pg?s:"^(?:"+s.source+")",l),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===o.length)return null===ug(c,o)?[o]:[];for(var f=0,p=0,m=[];p<o.length;){c.lastIndex=pg?p:0;var g,v=ug(c,pg?o:o.slice(p));if(null===v||(g=fg(dg(c.lastIndex+(pg?0:p)),o.length))===f)p=og(o,p,u);else{if(m.push(o.slice(f,p)),m.length===h)return m;for(var y=1;y<=v.length-1;y++)if(m.push(v[y]),m.length===h)return m;p=f=g}}return m.push(o.slice(f)),m}]}),!pg);var gg="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==gg&&gg,vg="URLSearchParams"in gg,yg="Symbol"in gg&&"iterator"in Symbol,bg="FileReader"in gg&&"Blob"in gg&&function(){try{return new Blob,!0}catch(e){return!1}}(),_g="FormData"in gg,wg="ArrayBuffer"in gg;if(wg)var Ag=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],kg=ArrayBuffer.isView||function(e){return e&&Ag.indexOf(Object.prototype.toString.call(e))>-1};function Eg(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function xg(e){return"string"!=typeof e&&(e=String(e)),e}function Sg(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return yg&&(t[Symbol.iterator]=function(){return t}),t}function Rg(e){this.map={},e instanceof Rg?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 Tg(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Dg(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Ig(e){var t=new FileReader,n=Dg(t);return t.readAsArrayBuffer(e),n}function Og(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Pg(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:bg&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:_g&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:vg&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():wg&&bg&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Og(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):wg&&(ArrayBuffer.prototype.isPrototypeOf(e)||kg(e))?this._bodyArrayBuffer=Og(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):vg&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},bg&&(this.blob=function(){var e=Tg(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=Tg(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(Ig)}),this.text=function(){var e=Tg(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Dg(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)},_g&&(this.formData=function(){return this.text().then(Ug)}),this.json=function(){return this.text().then(JSON.parse)},this}Rg.prototype.append=function(e,t){e=Eg(e),t=xg(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Rg.prototype.delete=function(e){delete this.map[Eg(e)]},Rg.prototype.get=function(e){return e=Eg(e),this.has(e)?this.map[e]:null},Rg.prototype.has=function(e){return this.map.hasOwnProperty(Eg(e))},Rg.prototype.set=function(e,t){this.map[Eg(e)]=xg(t)},Rg.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Rg.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Sg(e)},Rg.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Sg(e)},Rg.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Sg(e)},yg&&(Rg.prototype[Symbol.iterator]=Rg.prototype.entries);var Cg=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Lg(e,t){if(!(this instanceof Lg))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,a=(t=t||{}).body;if(e instanceof Lg){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Rg(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=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 Rg(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Cg.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Ug(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 Mg(e,t){if(!(this instanceof Mg))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="statusText"in t?t.statusText:"",this.headers=new Rg(t.headers),this.url=t.url||"",this._initBody(e)}Lg.prototype.clone=function(){return new Lg(this,{body:this._bodyInit})},Pg.call(Lg.prototype),Pg.call(Mg.prototype),Mg.prototype.clone=function(){return new Mg(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Rg(this.headers),url:this.url})},Mg.error=function(){var e=new Mg(null,{status:0,statusText:""});return e.type="error",e};var jg=[301,302,303,307,308];Mg.redirect=function(e,t){if(-1===jg.indexOf(t))throw new RangeError("Invalid status code");return new Mg(null,{status:t,headers:{location:e}})};var Bg,qg=gg.DOMException;try{new qg}catch(e){(qg=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),qg.prototype.constructor=qg}function Gg(e,t){return new Promise((function(n,r){var a=new Lg(e,t);if(a.signal&&a.signal.aborted)return r(new qg("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 Rg,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).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 Mg(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 qg("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&gg.location.href?gg.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&&(bg?i.responseType="blob":wg&&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 Rg?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,xg(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)}))}Gg.polyfill=!0,gg.fetch||(gg.fetch=Gg,gg.Headers=Rg,gg.Request=Lg,gg.Response=Mg);var Ng=function(e){var t=this;if(!Bg){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:Fh.topDomain,domain:Fh.parentDomain,referrer:Fh.parentURL,depth:a.getIframeDepth(),version:Ur.version,byloader:Fh.isTokenGameURL,isTokenGameURL:Fh.isTokenGameURL,isMasterGameURL:Fh.isMasterGameURL,isExtHostedGameURL:Fh.isExtHostedGameURL,byloaderVersion:Fh.version,tracking:Vh.userDeclinedTracking,whitelabel:Vh.whitelabelPartner,platform:a.getMobilePlatform()};Bg=new a.MessageRouter(n)}return Bg||{send:function(){k.default(this,t)}.bind(this)}},Fg={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(n).then(function(e){k.default(this,t)}.bind(this)).catch(function(e){k.default(this,t)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var t=this;try{var n="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(n).then(function(e){k.default(this,t)}.bind(this)).catch(function(e){k.default(this,t)}.bind(this))}catch(e){}}};var Vg,Wg,zg,Kg=new m.EventEmitter,Hg=[],$g=function(e){Hg.push(e)},Qg=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(Wg){e.next=6;break}return e.next=3,Xg(zg);case 3:Wg=e.sent,Kg.emit("game-data-ready",Wg),Jg();case 6:return e.abrupt("return",Wg);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Jg=function(){var e,t;if(null!==(e=Wg)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(Yg(),null!==(n=Wg)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=Wg)&&void 0!==i&&i.url)Fg.getGameData(null===(s=Wg)||void 0===s?void 0:s.url);setInterval(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.prev=0,e.next=3,Xg(zg);case 3:Wg=e.sent,null===(t=Wg)||void 0===t||t.aws_tst,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},Yg=function(){var e=window.fetch;window.fetch=A.default(x.default.mark((function t(){var n,r,a,i,s,o,d,u,l,c,h,f,p,m,g,v,y,b,_,w=this,A=arguments;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(d=A.length,u=new Array(d),l=0;l<d;l++)u[l]=A[l];c=u[0],h=u[1],f=null===(n=Wg)||void 0===n||null===(r=n.aws_tst)||void 0===r||null===(a=r.ep)||void 0===a?void 0:a.atm,p=null===(i=Wg)||void 0===i||null===(s=i.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.msgrt,m=function(t,n){var r=this;k.default(this,w);var a=c.replace(t,n);e(a,h).then(function(){k.default(this,r)}.bind(this))}.bind(this);try{f&&c.indexOf("tag.atom")>0&&m("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),p&&c.indexOf("msgrt.gamedistribution.com")>0&&(null===(g=Wg)||void 0===g||g.aws_tst,null===(v=Wg)||void 0===v||null===(y=v.aws_tst)||void 0===y||null===(b=y.ep)||void 0===b||b.msgrt,m("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return t.next=9,e(c,h);case 9:return _=t.sent,t.abrupt("return",_);case 11:case"end":return t.stop()}}),t,this)})))},Xg=function(e){var t=this;Vg.send("gdfw.loading",{message:"loading"}),Hg=[],$g("1"),$g("2");var n=new mg;$g("3");var r=n.get("partner.domain.value");$g("4");var i=function(){return k.default(this,t),{gameId:e.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);$g("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(Ur.version,"&localTime=").concat((new Date).getHours())}.bind(this);$g("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 $g("7"),new Promise(function(e){var n=this;k.default(this,t),$g("7.1");var r=i();try{$g("7.2");var o=s();$g("7.3"),fetch(o).then(function(e){return k.default(this,n),$g("7.4"),e.json()}.bind(this)).then(function(t){var i=this;if(k.default(this,n),$g("7.5"),t.success){var s,d,u,l=t.result.game;$g("7.6");var c={gameId:l.gameMd5,slug:l.slug,pname:l.pname,dname:l.dname,status:l.status,description:l.description,disableAds:l.enableAds,preroll:l.preRoll,midroll:6e4*l.timeAds,rewardedAds:l.rewardedAds,title:l.title,publishedAt:l.publishedAt,tags:l.tags,category:l.category,assets:l.assets,disp_2nd_prer:l.disp_2nd_prer,ctry_vst:l.ctry_vst,ctry:l.ctry,crtv:l.crtv,dmain:l.dmain,aws_tst:l.aws_tst,__t4r:Mr(l.__t4r)||{},block_exts:Mr(l.push_cuda),bloc_gard:Mr(l.bloc_gard),cookie:Mr(l.cookie),gdpr:Mr(l.gdpr),diagnostic:Mr(l.diagnostic),cmp:Mr(l.cmp),gft:Mr(l.gft)||{},sdk:Mr(l.sdk)||{},sdkfw:Mr(l.sdkfw)||{},loader:Mr(l.loader)||{},splash:Mr(l.splash)||{},promo:Mr(l.promo)||{},dAds:Mr(l.dads)||{},pAds:Mr(l.pads)||{},mAds:Mr(l.mads)||{},rAds:Mr(l.rads)||{},lp:Mr(l.lp)||{},extsc:Mr(l.extsc)||{},evnts:Mr(l.evnts)||{},dp:Mr(l.dp)||{},adflw:Mr(l.adflw)||{},afgszf:Mr(l.afgszf)||{},fllc:Mr(l.fllc)||{},lotm:Mr(l.lotm)||{},t4rc:Mr(l.t4rc)||{},midroll_plus:Mr(l.midroll_plus)||{}};$g("7.7");var h=a.extendDefaults(L.default(r),c);$g("7.8"),h.afg_disabled=!1===(null===(s=h.sdk)||void 0===s||null===(d=s.afg)||void 0===d?void 0:d.enabled),h.url=o,function(){k.default(this,i)}.bind(this),$g("7.9"),null!==(u=h.pAds)&&void 0!==u&&u.enabled&&(h.preroll=!0),$g("7.10"),Vg.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=Hg[Hg.length-1];Vg.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){k.default(this,n);var a=Hg[Hg.length-1];Vg.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var d=Hg[Hg.length-1];Vg.send("gdfw.err",{message:"".concat(d,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}.bind(this))},Zg=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,Qg();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)}}(),ev=function(){var e=A.default(x.default.mark((function e(){var t,n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qg();case 2:return n=e.sent,r=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),tv=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,Qg();case 2:return n=e.sent,e.next=5,Zg();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)}}(),nv=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,Qg();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)}}(),rv=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,nv();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)}}(),av=!1,iv=!1,sv=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(!av){e.next=4;break}return e.abrupt("return",t(iv));case 4:av=!0;case 5:return e.next=7,nv();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 iv=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){k.default(this,d),s&&(s=!1,av=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){k.default(this,d),s&&i&&window[a]?(s=!1,av=!0,iv=!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)}}())},ov=Sr,dv=jd,uv=z,lv=Mn,cv=su,hv=al,fv=Qt.exports;ov({target:"Promise",proto:!0,real:!0,forced:!!dv&&uv((function(){dv.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=cv(this,lv("Promise")),n="function"==typeof e;return this.then(n?function(n){return hv(t,e()).then((function(){return n}))}:e,n?function(n){return hv(t,e()).then((function(){throw n}))}:e)}}),"function"!=typeof dv||dv.prototype.finally||fv(dv.prototype,"finally",lv("Promise").prototype.finally);var pv=Y,mv="[\t\n\v\f\r \u2028\u2029\ufeff]",gv=RegExp("^"+mv+mv+"*"),vv=RegExp(mv+mv+"*$"),yv=function(e){return function(t){var n=String(pv(t));return 1&e&&(n=n.replace(gv,"")),2&e&&(n=n.replace(vv,"")),n}},bv={start:yv(1),end:yv(2),trim:yv(3)},_v=z,wv="\t\n\v\f\r \u2028\u2029\ufeff",Av=bv.trim;Sr({target:"String",proto:!0,forced:function(e){return _v((function(){return!!wv[e]()||"
"!="
"[e]()||wv[e].name!==e}))}("trim")},{trim:function(){return Av(this)}});var kv=se,Ev=To,xv=le,Sv=G,Rv=yr,Tv=function(e,t,n){var r,a;return Ev&&"function"==typeof(r=t.constructor)&&r!==n&&kv(a=r.prototype)&&a!==n.prototype&&Ev(e,a),e},Dv=ce.f,Iv=jn.f,Ov=Uc,Pv=Jc,Cv=ih,Lv=Qt.exports,Uv=z,Mv=kn.set,jv=Wd,Bv=et("match"),qv=Sv.RegExp,Gv=qv.prototype,Nv=/a/g,Fv=/a/g,Vv=new qv(Nv)!==Nv,Wv=Cv.UNSUPPORTED_Y;if(xv&&Rv("RegExp",!Vv||Wv||Uv((function(){return Fv[Bv]=!1,qv(Nv)!=Nv||qv(Fv)==Fv||"/a/i"!=qv(Nv,"i")})))){for(var zv=function(e,t){var n,r=this instanceof zv,a=Ov(e),i=void 0===t;if(!r&&a&&e.constructor===zv&&i)return e;Vv?a&&!i&&(e=e.source):e instanceof zv&&(i&&(t=Pv.call(e)),e=e.source),Wv&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=Tv(Vv?new qv(e,t):qv(e,t),r?this:Gv,zv);return Wv&&n&&Mv(s,{sticky:n}),s},Kv=function(e){e in zv||Dv(zv,e,{configurable:!0,get:function(){return qv[e]},set:function(t){qv[e]=t}})},Hv=Iv(qv),$v=0;Hv.length>$v;)Kv(Hv[$v++]);Gv.constructor=zv,zv.prototype=Gv,Lv(Sv,"RegExp",zv)}jv("RegExp");var Qv=Sr,Jv=ht.find,Yv=cd,Xv=!0,Zv=wt("find");"find"in[]&&Array(1).find((function(){Xv=!1})),Qv({target:"Array",proto:!0,forced:Xv||!Zv},{find:function(e){return Jv(this,e,arguments.length>1?arguments[1]:void 0)}}),Yv("find");var ey=Sr,ty=Gt,ny=[].join,ry=J!=Object,ay=pt("join",",");ey({target:"Array",proto:!0,forced:ry||!ay},{join:function(e){return ny.call(ty(this),void 0===e?",":e)}});var iy=Sr,sy=ht.map,oy=wt,dy=Bi("map"),uy=oy("map");iy({target:"Array",proto:!0,forced:!dy||!uy},{map:function(e){return sy(this,e,arguments.length>1?arguments[1]:void 0)}});var ly=yf;Sr({target:"Object",stat:!0,forced:Object.assign!==ly},{assign:ly});var cy=function(){function e(t){S.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return T.default(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new D.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}(),hy=function(){function e(t,n){S.default(this,e),this.adContainer=t,this.onResume=n}return T.default(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){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}(),fy=function(){function e(t,n){S.default(this,e),this.adContainer=t,this.onResume=n}return T.default(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),py=function(){function e(t){S.default(this,e),this.adContainer=t}return T.default(e,[{key:"show",value:function(){this.t4rButton.style.display="block"}},{key:"hide",value:function(){this.t4rButton.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div"),t=document.createElement("p");this.addStyles(),t.innerText="x",e.appendChild(t),e.id="gd__exit__button",e.setAttribute("title","Exit"),e.classList.add("gd__exit__button"),this.t4rButton=e,document.body.appendChild(e)}catch(e){console.log("Exit button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__exit__button__style",e,"\n .gd__exit__button{\n background-color: transparent; \n width: 50px;\n height: 50px;\n position: absolute;\n pointer-events:none; \n z-index: 2000;\n top: 17px;\n right: 17px;\n margin: 0;\n border-radius: 50px;\n border: 1px solid white;\n text-align: center; \n font-size: 16px;\n line-height: normal;\n font-family: 'Arial';\n font-weight: bolder;\n }\n .gd__exit__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),my=function(e){if(!e)return!1;var t=gy.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)},gy=Object.prototype.toString;function vy(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 yy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vy(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function by(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}var _y,wy="_cc".concat("13998"),Ay=["https://tags.crwdcntrl.net/c/".concat("13998","/cc.js?ns=").concat(wy)],ky=function(){return!!_y&&"function"==typeof _y.bcpf&&"function"==typeof _y.add},Ey=function(e,t){try{if(!ky())return;_y.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},xy=function(e,t){try{if(!ky())return;_y.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},Sy=function(e){var t=this;try{Ey("act","play"),Ey("med","game"),"complete"===document.readyState?_y.bcpf():_y.bcp(),e.tags.forEach(function(e){k.default(this,t),xy("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),xy("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},Ry=function(){window.addEventListener("load",(function(){Kg.once("game-data-ready",function(){var e=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(e.prev=1,e.t0=null!=Fh&&Fh.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,Zg();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(n=t.lotm)&&void 0!==n&&n.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,a.getScript(Ay[0],"LOTCC_".concat("13998"),{alternates:Ay});case 16:"object"===E.default(window[wy])&&(_y=window[wy]),ky()&&Sy(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),e.t1;case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(t){return e.apply(this,arguments)}}())}))},Ty=function(){xy("genp","ad video"),xy("act","ad impression")},Dy=function(){xy("act","ad skipped")},Iy=function(){xy("act","ad click")},Oy=function(){xy("act","ad complete")},Py=new mg,Cy={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},Ly=function(e,t){var n=this,r=function(e,t){var n=Py.get("partner.url.value"),r=Cy[t],a="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(a),description_url:n,tfcd:0,npa:0,sz:"400x300|480x360|480x361|640x360|640x480",gdfp_req:1,output:"vast",unviewed_position_start:1,impl:"s",correlator:"".concat(Date.now())}}(e,t),a=Object.keys(r).map(function(e){return k.default(this,n),"".concat(e,"=").concat(r[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},Uy=(new mg).get("partner.domain.value"),My=["latimes.com"],jy={exist:function(e){var t=this;return"Softgames-Azerion"===e.dname&&My.some(function(e){return k.default(this,t),e===Uy}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return Ly(n,e)}}[Uy](e)}(e,t)}};function By(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 qy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?By(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):By(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gy=new m.EventEmitter,Ny=null,Fy=function(){function e(t,n,r){var i=this;if(S.default(this,e),Ny)return Ny;Ny=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,l,c,h,f,p,m,g,y,b,_,w,E,I,O,P,C;return T.default(e,[{key:"start",value:(C=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),qr("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 C.apply(this,arguments)})},{key:"adSystemInitialize",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: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 P.apply(this,arguments)})},{key:"_getDefaultSpilAdapterConfig",value:function(){return{vast:null,url:"https://pubads.g.doubleclick.net/gampad/ads",query:{correlator:"{{CACHEBUSTER}}",description_url:"{{PAGE_URL}}",env:"vp",gdfp_req:1,impl:"s",iu:"/59392726/gd_instream",npa:0,output:"vast",sz:"640x480|400x300",tfcd:0,unviewed_position_start:1}}}},{key:"_getSpilUrl",value:(O=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u,l,c,h,f;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,r=t.options,e.prev=1,s=null===(a=this.gameData.adflw)||void 0===a||null===(i=a.adapterConfig)||void 0===i?void 0:i.spil,o=this.nextAdPosition(n),e.next=6,this._create_dp_context(o,r);case 6:return d=e.sent,s?(this.gameData,u=s[o]||s.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),l=100*d.floor_price,d.floor_price,c=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:l}}),h=c.url,f={url:h,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return 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,l,c,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("spil"!==t.adapter){r.next=8;break}return r.abrupt("return",i(n._getSpilUrl({adType:e,options:t})));case 8:if(void 0!==window.idhb.requestAds){r.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return r.prev=10,u=n.nextAdPosition(e),n._broadcast("AD_REQUEST",{message:u}),l=n.options,"preroll"===u&&v.isPlainObject(l.preroll)?l=l.preroll:"midroll"===u&&v.isPlainObject(l.midroll)?l=l.midroll:"rewarded"===u&&v.isPlainObject(l.rewarded)&&(l=l.rewarded),c="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1",r.next=18,window.idhb.isLoaded();case 18:return r.next=20,n._create_dp_context(u,t);case 20:h=r.sent,Br("gd-adflow, before idhb",u,c),f=window.idhb.getAdserverTargetingForAdSlot(c),window.idhb.setAdserverTargeting(qy(qy({},f),{},{adaptor_order:t.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(c),window.idhb.requestAds({slots:R.default({},c,{bidFloor:(null==h?void 0:h.floor_price)||void 0}),callback:function(e,t){var r=this;k.default(this,p),!h||null!=t&&t.bidFloorApplied||fetch(h.skip_url).catch(function(e){k.default(this,r)}.bind(this));var a={src:"hl",tnl_keys:qy(qy({},window.idhb.getAdserverTargetingForAdSlot(c)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId}),url:e,dp:h,hl:t};n._extend_hl_url(a),i(a)}.bind(this)}),r.next=32;break;case 29:throw r.prev=29,r.t0=r.catch(10),new Error(r.t0);case 32:case"end":return r.stop()}}),r,this,[[10,29]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===a.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===a.AdType.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===a.AdType.Rewarded?"rewarded":e===a.AdType.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===a.AdType.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===a.AdType.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA['.concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,"]]></VASTAdTagURI> \n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,t){var n=this;return t=t||{},new Promise(function(r){var a=this;if(k.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var i,s,o=null==e||null===(i=e.tnl_keys)||void 0===i?void 0:i.tnl_ad_pos;this.adSuccess=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,t),l=qy(qy({},t),{},{adTag:u,tnl_ad_pos:o});this.adCounter[o]=this.adCounter[o]||0,this.adCounter[o]++;var c=e.dp,h=e.hl;this.current_dp=c,c&&(c.adtag_url=u.url,this._extend_dp_with_adsense(c,h,null==e?void 0:e.tnl_keys));var f=this._isVMAP(o);(function(){k.default(this,a),t.shouldFail&&(c?(c.adtag_url="dp_original_broken",c.fallback_url="dp_fallback_broken"):u.url="original_broken",null==c||c.adtag_url,null==c||c.fallback_url,u.url),f=!1}).bind(this);var p=this._getExternalVast(null===(s=t)||void 0===s?void 0:s.adType);if(p)d.adTagUrl=p;else if(f){var m=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new D.default(e.adtag_url_1,!0);i.query=yy(yy({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new D.default(e.adtag_url_2,!0);o.query=yy(yy({},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(by({id:u++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url,fallback_url:null==n?void 0:n.fallback_url,fallback_imp_url:null==n?void 0:n.fallback_imp_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(by({id:u++,adtag_url:d,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url,fallback_url:null==r?void 0:r.fallback_url,fallback_imp_url:null==r?void 0:r.fallback_imp_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:u,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));d.adsResponse=m}else if(c&&h.bidFloorApplied){var g=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(c);d.adsResponse=g}else if(c&&c.fallback_url){var v=function(e){return'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim()}(c);d.adsResponse=v}else d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(t.autoplayAllowed),d.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(d,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}r(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=jy.exist(this.gameData)&&jy.get(n,this.gameData)}catch(e){console.log("external-vast err",e)}return t}},{key:"cancel",value:function(e){var t;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var n=(null==e||null===(t=e.message)||void 0===t?void 0:t.indexOf("NO_VAST_URL"))>=0,r="AD_SDK_CANCELED";this._broadcast(r,{name:r,message:"Advertisement has been canceled.",status:"warning",noVast:n,analytics:{category:this.eventCategory,action:r,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,i=this;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=qy(qy({},r),{},{adType:n}),"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=29;break}if(n!==a.AdType.Interstitial){e.next=22;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=19;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 19:return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 20:e.next=27;break;case 22:if(n!==a.AdType.Rewarded){e.next=26;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 26:throw new Error("Unsupported ad type");case 27:e.next=40;break;case 29:if(!["ima","spil"].some(function(e){return k.default(this,i),e===(null==r?void 0:r.adapter)}.bind(this))){e.next=40;break}if(n!==a.AdType.Interstitial){e.next=35;break}return e.abrupt("return",this._startInterstitialAd(r));case 35:if(n!==a.AdType.Rewarded){e.next=39;break}return e.abrupt("return",this._startRewardedAd(r));case 39:throw new Error("Unsupported ad type");case 40: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 hy(this.adContainer,t),this.adResume.add(),this.rewardedLabel=new fy(this.adContainer,t),this.rewardedLabel.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,l,c,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)||(l="\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")||((c=document.createElement("style")).type="text/css",c.id="gd__banner__style",c.styleSheet?c.styleSheet.cssText=l:c.appendChild(document.createTextNode(l)),d.appendChild(c)),(h=document.createElement("div")).id=u,h.classList.add("gd__banner"),d.appendChild(h)),e.next=11,n._create_dp_display_context();case 11:n.atom_display=e.sent,n.atom_display,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),JSON.stringify(e,null,2)}.bind(this)}),r(),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(0),console.log("display_test error",e.t0),i(e.t0.message||e.t0);case 24:case"end":return e.stop()}}),e,this,[[0,20]])})));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(qy(qy({},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=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return y.apply(this,arguments)})},{key:"_startPromo",value:(g=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(qy(qy({},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 g.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,qy({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:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,qy({adType:a.AdType.Interstitial},t));case 14:return e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return 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(qy(qy({},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,qy({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:(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.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 c.apply(this,arguments)})},{key:"_preloadRewardedAd",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.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 l.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var t=this;if(this.activeAdContainer){this.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&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new py(this.adContainer),this.t4rButton.add()),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),this.t4rButton&&this.t4rButton.hide()}.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.t4rButton&&this.t4rButton.hide(),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),l=!1,c=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",h=!c.startsWith("image")&&!c.startsWith("text");this._sendIMAEventsToHB(e);var f=document.getElementById("game"),p="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:p="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:p="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:l=!0,p="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:p="Fired when the ad is clicked.";var m=e.getAd().getContentType();this._show({mode:"click",contentType:m}),Iy();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),l=this._is_completed(e.getAd()),p="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:this.gameData.fllc.enabled&&(f.style.display="none"),p="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(f.style.display="block"),p="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",l=!0,this._hideAddResume(),this._hideRewardedLabel(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.DURATION_CHANGE:p="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:p="Fired when the ad playhead crosses first quartile.";var g=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:g});break;case google.ima.AdEvent.Type.IMPRESSION:p="Fired when the impression URL has been pinged.",e.getAd();break;case google.ima.AdEvent.Type.INTERACTION:p="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:p="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var v=e.getAd().getContentType();p=v,this._show({mode:"loaded",contentType:v});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(p=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:p="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:h&&this.adResume.show(),p="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:p="Fired when the ad is resumed.",h&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:p="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:l=this._is_completed(e.getAd()),p="Fired when the ad is skipped by the user.",Dy(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:this.adType_===a.AdType.Rewarded&&this.rewardedLabel.show(),this._hideAddResume(),p="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:p="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:l=this._is_completed(e.getAd()),p="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:p="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:p="Fired when the ad volume has been muted."}if(""!==u&&""!==p&&this._broadcast(u,{name:u,message:p,status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(i," d").concat(s," m").concat(o," y").concat(d)}}),l&&!this.adSuccess){this.adSuccess=!0;var y=e.getAd(),b="Rainbow"===(null==y?void 0:y.getAdSystem())&&(null==y?void 0:y.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this)));null==y||y.getAdSystem(),null==y||y.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:b}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var t=this;try{var n,r,a,i,s;if(!((null===(n=this.gameData)||void 0===n||null===(r=n.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(a=this.gameData)||void 0===a||null===(i=a.aws_tst)||void 0===i||null===(s=i.ep)||void 0===s?void 0:s.atm)))return;var o=e.type,d=e.url;if("none"===o||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){k.default(this,t)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,t){var n=this,r={type:"none"};try{var a=this.current_dp,i=a.id,s=a.error_url,o=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!t)return r={type:"imp_err",url:s};var l=e.getWrapperAdIds().some(function(e){return k.default(this,n),e==="".concat(i)}.bind(this)),c=e.getWrapperAdIds().some(function(e){return k.default(this,n),"fallback"===e}.bind(this)),h=e.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this));l&&t?r={type:"normal_imp",url:o}:l&&!t?r={type:"normal_err",url:s}:h&&t?r={type:"promo_imp",url:u}:c&&t&&(r={type:"fallbacj_imp",url:d})}catch(e){}return r}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),a=this._getInnerErrorCode(n);Gy.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:"_hideRewardedLabel",value:function(){try{this.adType_===a.AdType.Rewarded&&this.rewardedLabel&&this.rewardedLabel.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(my(e.getInnerError)){var t=e.getInnerError();if(t)return my(t.getErrorCode)&&my(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];v.isPlainObject(i)&&(r.query[a]=M.default.stringify(i))}var s=new D.default(r.url,!0);return j.default(s.query,r.query||{}),qy({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new D.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new D.default(e.url,!0);if(i.query.cust_params){var s=M.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&&v.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&&v.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=L.default(a),v.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=M.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,j.default(i,u),i.cust_params=M.default.stringify(i.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var t,n,r,a=null===(t=this._adrequest_user_context)||void 0===t||null===(n=t.adTag)||void 0===n?void 0:n.bidder;return this.msgrt.send("bidder",{message:a}),this._adrequest_user_context,'bidder:"'.concat(a,'"'),((null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[]).some(function(t){return k.default(this,e),t===a}.bind(this))}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isT4R",value:function(e){var t,n,r;if(!this.gameData.publishedAt)return!1;var a=new Date(this.gameData.publishedAt);if(((new Date).getTime()-a.getTime())/864e5<=10)return!1;if(this._isExcludedBidderForT4R())return this.msgrt.send("bidder.ex",{message:"true"}),!1;this.msgrt.send("bidder.ex",{message:"false"});var i,s=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[s]>=(null===(n=e.t4r[s])||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 s&&(null===(i=e.t4r[s])||void 0===i?void 0:i.enabled);if(null!=e&&e.contentType.startsWith("video/")){var o,d=(null===(o=e.t4r[s])||void 0===o?void 0:o.viper)||0;if(d>0){var u,l=Math.random()<d;return s&&l&&(null===(u=e.t4r[s])||void 0===u?void 0:u.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,l,c,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===(l=u.vmap)||void 0===l?void 0:l.enabled))||"rewarded"===e&&(!0===(null===(c=this.gameData)||void 0===c||null===(h=c.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 cy(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();var r=e.p/100;this.msgrt.send("dp.fp",{message:r}),t({params:{fp:r},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){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),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,l,c,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 cy(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(u.Base64.encode(JSON.stringify(s))),null==t||t.adapterIndex,null==t||t.isLastAdapter,l=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,c=(null==l?void 0:l.enabled)&&(null==t?void 0:t.isLastAdapter)&&"rewarded"===e,null==l||l.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;n.msgrt.send("dp.fp",{message:t}),a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(d):void 0,promo_imp_blue_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:c?"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 D.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=M.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.npa=1,r.query.cust_params=M.default.stringify(a,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_extend_hl_url",value:function(e){e.dp;var t=e.hl;e.src;var n=e.tnl_keys,r=!0!==(null==t?void 0:t.bidFloorApplied)?0:1;0===r&&null!=n&&n.hasOwnProperty("fp")?r=2:1!==r||null!=n&&n.hasOwnProperty("fp")||(r=3),n.bfa=r;try{var a,i=new D.default(e.url,!0);if(null===(a=i.query)||void 0===a||!a.cust_params)return;var s=M.default.parse(i.query.cust_params);s.bfa=r,s.adsense=0,i.query.cust_params=M.default.stringify(s,!1),e.url=i.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(d=A.default(x.default.mark((function e(t){var n,r,i,s,o,d,u,l=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,l),!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"}),"undefined"===window.idhb.options.configUrl&&(window.idhb.options.configUrl=null),window.idhb.que=window.idhb.que||[],(s=new URL(r)).searchParams.append("referer",window.idhb.options.configUrl),r=s.href,e.next=13,a.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,l),window.idhb.requestAds}.bind(this)});case 13:o=a.getQueryString("ch",window.location.href),d=a.getQueryString("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},o&&(u.channel=o),d&&(u.ch_date=d),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;k.default(this,l);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 21: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:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",a=n||!0,i=document.getElementsByClassName("adsbygoogle"),s=0;s<i.length;s++){var o,d=i[s],u=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);u&&"IFRAME"===u.tagName&&u.style.height!==r&&(u.style.height=r,a&&(u.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{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,u,l=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,l),t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense rewarded error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),n=!1,r=function(){k.default(this,l),n=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){k.default(this,l),n=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),i=function(){k.default(this,l),n=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),s=function(){k.default(this,l),n=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),o=function(e){k.default(this,l),n=!0,e()}.bind(this),d=function(e){k.default(this,l),n=!0,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=function(e){window.adsbygoogle.push(e)},setTimeout(function(){k.default(this,l),n||(Br("gd-adflow adsense.reward timeout happened!"),this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"timeout",status:"error",skipForward:!0}),this._send_atom_event("sg.dbg.rw",{breakStatus:"timeout"}))}.bind(this),1e3),u({type:"reward",name:"reward-in-game",beforeAd:r,afterAd:a,adDismissed:i,adViewed:s,beforeReward:o,adBreakDone:d}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return 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.fixOutOfBounds(),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.fixOutOfBounds(),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){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new mg).get();n=qy(qy({},n),r),n=t?qy(qy({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;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")}t||(t="preroll"),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);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,qy(qy({},t),{},{skipForward:r,adPosition:a}))}}]),e}(),Vy=function e(t){var n=this;S.default(this,e),R.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,Ic(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),R.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},Tc(this.moduleName,this.moduleConfig)},Wy=function e(t){var n=this;S.default(this,e),R.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,Ic(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),R.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},Tc(this.moduleName,this.moduleConfig)},zy=function(e,t){console.log(e,t)},Ky={},Hy={},$y=null;function Qy(){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 Ky.version=r,Ky.frame=e,Ky.function=n,Ky.version}function Jy(e){var t=this;return $y||($y=new Promise(function(n){function r(t,r){if(zy("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:Ky,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}k.default(this,t),Qy(),Ky.frame?2===Ky.version?(zy("TCF v2 CMP found. Fetching the consent."),Ky.function?(zy("CMP API is directly accessible, calling it now..."),Ky.function("addEventListener",Ky.version,r)):(zy("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!==Hy[r.callId]&&Hy[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=R.default({},d,{command:e,parameter:s,callId:o,version:n});Hy[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,Ky.version,n)}("addEventListener",Ky.frame,r))):n({result:"cmpVersionNotV2",cmp:Ky}):n({result:"cmpNotFound"})}.bind(this)))}var Yy=new(function(){function e(){S.default(this,e),this.productName="Game Distribution"}var t;return T.default(e,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(t=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,d,u;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(i=null==t||null===(r=t.visitor)||void 0===r||null===(a=r.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(i),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=12,fetch(d,{method:"POST"});case 12:e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(u,{method:"POST"});case 22:e.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 Xy(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 Zy(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 Zy(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 Zy(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 eb=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,l=Xy(r);try{for(l.s();!(u=l.n()).done;){var c=u.value,h=c.key,f=c.value;d.setAttribute(h,f)}}catch(e){l.e(e)}finally{l.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))},tb=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,eb({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,eb({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,eb({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)}}(),nb=new m.EventEmitter,rb={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},ab=!1;function ib(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(rb).some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=!n.type||!n.type.startsWith("gd-sdk")&&!("parent-data-response"===n.type)||"sg-game-event"===n.type;!function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r;if("midroll"!==(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition))return;var a="CONTENT_RESUME_REQUESTED"===(null===(n=e.event)||void 0===n?void 0:n.name);"CONTENT_PAUSE_REQUESTED"===(null===(r=e.event)||void 0===r?void 0:r.name)&&(ab=!0),a&&ab&&(ab=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(n);var s=function(){k.default(this,t);try{var n,r;return null==e||null===(n=e.source)||void 0===n||null===(r=n.location)||void 0===r?void 0:r.href}catch(e){}}.bind(this);if(window.parent&&i){if("https://html5.gamedistribution.com"===r){var o=s();if(!o)return;var d=o&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return k.default(this,t),o.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return k.default(this,t),e===(null==n?void 0:n.type)}.bind(this));if(!d&&!u)return}var l=n.eventName,c=n.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==l&&"levelFinish"!==l||window.mpHelper.sendStat("level",c.level),"levelFinish"===l&&window.mpHelper.sendStat("score",c.score)),window.parent.postMessage(n,"*")}if(a){var h=rb[r][a];h&&nb.emit(h,n)}}}),!1);var sb=_.v4(),ob=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:sb,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){lb(r)},setInterval(function(){k.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",lb(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?ib(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ib(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=sb,lb(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},db=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=ub(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},ub=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}},lb=function(e){try{window.__msgr&&window.__msgr.postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}};function cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cb(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fb(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 pb(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 pb(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 pb(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 mb,gb=function(){function e(t){var n=this;S.default(this,e),R.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._runAutoResume=t._runAutoResume.bind(t),this.send_atom_event=t.send_atom_event.bind(t),this.get_session_id=t.get_session_id.bind(t),this.get_ad_system_init_result=t.get_ad_system_init_result.bind(t)}var t,n;return T.default(e,[{key:"runAdFlow",value:(n=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u,l,c,h,f,p,m,g,v,y,b,_,w,A,E,S,R,T,D,I,O,P,C,L,U,M,j,B,q=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,l=null===(n=d.promo)||void 0===n||null===(r=n.rainbow)||void 0===r?void 0:r.enabled,c=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,q),"adsense"!==e}.bind(this)):o,p=this.get_ad_system_init_result(),m=p.afg,g=p.ima,this.adsBlocked=!m&&!g,this.adsBlocked?(Br("gd-adflow adsBlocked so changing the flow"),f=[f[0]]):(m||(f=f.filter(function(e){return k.default(this,q),"adsense"!==e}.bind(this))),g||(f=f.filter(function(e){return k.default(this,q),"ima"!==e}.bind(this)))),v=!1,y=!1,b=[],_=0,w=!1,A=fb(f),e.prev=21,A.s();case 23:if((E=A.n()).done){e.next=57;break}return S=E.value,t.params.adapter=S,R=_===f.length-1,l&&R&&"ima"===S&&(t.params.runPromoAsImaFallback=!0),T=R&&"adsense"===S&&l&&c&&h,t.params=hb(hb({},t.params),{},{adapterIndex:_,isLastAdapter:R,shouldFail:!1,extraPromoRunOnFail:T}),function(){k.default(this,q)}.bind(this),Br("gd-adflow, before adInvoke",_,S,t.params.shouldFail),e.next=34,this.adInvoke(t);case 34:if(D=e.sent,I=D.success,O=D.args,P=D.isSkipped,C=D.noVast,!I){e.next=46;break}return Br("gd-adflow, adapter-result-success",_,S,O),v=!0,y=!(null==O||!O.isPromoSuccess),e.abrupt("break",57);case 46:if(Br("gd-adflow, adapter-result-failure",_,S,O.message),_++,b.push(O.message),!P){e.next=51;break}return e.abrupt("break",57);case 51:if(!C){e.next=54;break}return this._runAutoResume(),e.abrupt("break",57);case 54:R&&"adsense"===S&&l&&c&&h&&(w=!0);case 55:e.next=23;break;case 57:e.next=62;break;case 59:e.prev=59,e.t0=e.catch(21),A.e(e.t0);case 62:return e.prev=62,A.f(),e.finish(62);case 65:if(!w){e.next=74;break}return t.params.adapter="promo",e.next=70,this.adInvoke(t);case 70:e.sent.success&&(y=!0);case 74:(function(){k.default(this,q)}).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",M="none",v&&y?U="promo_ima":v?(U="index_".concat(_),M=f[_]):y&&(U="promo_adsense"),j=this.get_session_id(),this.adsBlocked&&"-1"===U?(B="rewarded"===s?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[B]=this.blockedAdsMap[B]?this.blockedAdsMap[B]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(B)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:B,sessionId:j,successAdapter:"none",adFlowIndex:U})):(this._msgrt.send("adflow.all.index",{message:"".concat(U)}),this._msgrt.send("adflow.all.success_adapter",{message:"".concat(M)}),this._msgrt.send("adflow.".concat(s,".index"),{message:"".concat(U)}),this._msgrt.send("adflow.".concat(s,".success_adapter"),{message:"".concat(M)}),this.send_atom_event("gd.adflow",{adFlowIndex:U,successAdapter:M,adBlocker:!1,afgBlocked:!m,imaBlocked:!g,adType:s,sessionId:j}));case 84:case"end":return e.stop()}}),e,this,[[21,59,62,65]])}))),function(e){return n.apply(this,arguments)})},{key:"adInvoke",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,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);var t="dismissed"===(null==e?void 0:e.message);r({success:!1,args:e,isSkipped:t,noVast:e.noVast})}.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),qr("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 t.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var t,n,r,a,i,s,o,d,u=this,l=void function(){k.default(this,u)}.bind(this),c=this._gameData.adflw;l&&(c=l);var h=null!==(t=c)&&void 0!==t&&null!==(n=t.adapters)&&void 0!==n&&n.default?null===(r=c)||void 0===r||null===(a=r.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return h=null!==(i=c)&&void 0!==i&&null!==(s=i.adapters)&&void 0!==s&&s[e]?null===(o=c)||void 0===o||null===(d=o.adapters)||void 0===d?void 0:d[e]:h}}]),e}(),vb=new m.EventEmitter,yb=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp","https://html5.gamedistribution.com","http://localhost:3005","https://yjgames.gamedistribution.com","https://portal-staging-sgweb.gamedistribution.com/"];window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=e.source;if(yb.some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system;n.action;var s="aeriaExternalHostsConnector"===i;if("Softgames"===i)mb=a,(window.parent||window).postMessage(n,"*"),vb.emit("aeria-event",n);else if(s){mb&&mb.postMessage(n,"*");var o=window.parent||window;o&&o.postMessage(n,"*")}}}),!1);var bb=new(function(){function e(){S.default(this,e)}var t;return T.default(e,[{key:"init",value:function(e){var t=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(n){if(k.default(this,t),n){var r=n.adRequestTimer;e.adRequestTimer=r,e.adRequestTimer}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var t=this;window.addEventListener("message",function(n){k.default(this,t);var r=n.data,a=n.origin,i=n.source,s=r.type;if(r.value,"https://html5.gamedistribution.com"===a&&"parent-data-request"===s){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:"parent-data-response",value:o})}}.bind(this))}},{key:"_askForParentFrameData",value:(t=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=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;"https://html5.gamedistribution.com"===r&&"parent-data-response"===i&&(e(s),a=!0)})),setTimeout(function(){k.default(this,r),a||e()}.bind(this),1e3);var i={type:"parent-data-request"};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}());function _b(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 wb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_b(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ab=_.v4(),kb=null,Eb=null,xb=function(){function e(t){var n=this;if(S.default(this,e),kb)return kb;kb=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 mg,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._mplus_count=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,r=this;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()&&(ob(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){k.default(this,r),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),bb.init(this),this._send_gametag_data("sdk_init")}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var t,n,r,i,s,o,d,l,c,h,f,p,m;return T.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:"_send_gametag_data",value:(m=A.default(x.default.mark((function e(t){var n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=a.getMobilePlatform()||"web",this.adInstance._send("tg.created",{gmid:this.options.gameId,dvc:n,qint:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return m.apply(this,arguments)})},{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 mg,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,tb();case 6:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"testConsent",value:function(){try{Qy();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,Jy({});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;nb.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||(console.log("noMinijuegosSDK",!this._bridge.isCoreSDKMode,!this._bridge.noMinijuegosSDK,document.location.search.indexOf("mp_game_id")>=0),!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker())}},{key:"_initializeSDKWithGameData",value:(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=(null===(r=this._gameData.disableAds)||void 0===r?void 0:r.default)||!1,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:");Br("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=Ur.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&&"undefined"!==this._topDomain||(this._topDomain=void 0);var n={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(M.default.stringify(n))).catch(function(e){k.default(this,t)}.bind(this)),this.adInstance._send_atom_event("hl.config",n),this._send_gametag_data("sdk_gameplay")}},{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:Ur.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/gamemonkey-web-tracker/5.0.0/script/gamemonkey-sdk.js"];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;k.default(this,e),Eb=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&Eb.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),Yy.track(Eb,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=Eb)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var t=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadLocus",value:function(){var e=A.default(x.default.mark((function e(){var t,n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ev();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:t=["https://tag.atom.gamedistribution.com/v1/locus"],console.log("locus loading"),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){k.default(this,n),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{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){}}Oy()}.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"),Ty(),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&Yy.track(Eb,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,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Ur.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(M.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:(c=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 Fy(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=Ur,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:this._executeMidrollPlus();case 18:case"end":return e.stop()}}),e,this)}))),function(){return c.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,adPosition:e.adPosition})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",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:return e.next=2,Qg();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 l.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(wb(wb({},this.options),{},{isConsentDomain:n,version:Ur.version}),t,this._parentDomain),e.next=6,nv();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e,t,r=this;if(k.default(this,d),n){var s=new Date;s.setDate(s.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(s.toUTCString(),"; path=/")}this._hideCMPButton(),o?window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(e){k.default(this,r),i.hide()}.bind(this)):(function(){k.default(this,r)}.bind(this),this.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(e){k.default(this,r)}.bind(this))),null!==(e=this._gameData)&&void 0!==e&&null!==(t=e.evnts)&&void 0!==t&&t.enabled&&(db({event:"FirstInteraction",game:this._gameData}),this._send_gametag_data("first_interaction"))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){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(wb(wb({},this.options),{},{isConsentDomain:n,version:Ur.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(wb(wb({},this.options),{},{isConsentDomain:n,version:Ur.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:if(e.prev=0,!r._autoResumeIfAdsAreDisabled(t||"interstitial")){e.next=5;break}return e.abrupt("return",a());case 5:return o={adType:t||"interstitial",params:n,adTimestamp:r.adRequestTimer},e.next=9,r.sdkReady;case 9:return d=e.sent,e.next=12,r.videoAdReady;case 12: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=22;break}return e.abrupt("return",a());case 22:return r.adFlowRunning=!0,u=new gb(r),e.next=26,u.runAdFlow(o);case 26:r.adFlowRunning=!1,a(),r._post_message({topic:"adrequest.instream"}),e.next=36;break;case 31:e.prev=31,e.t0=e.catch(0),r.adFlowRunning=!1,r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 36:case"end":return e.stop()}}),e,null,[[0,31]])})));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:"_autoResumeIfAdsAreDisabled",value:function(e){var t=!1,n=this._gameData.diagnostic.close_ads,r=this._gameData.disableAds[e],a=n||r;return this._gameData.diagnostic,this._gameData.disableAds,a&&(this._runAutoResume(),t=!0),t}},{key:"_runAutoResume",value:function(){var e="CONTENT_PAUSE_REQUESTED",t="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(e,{name:e,message:"Auto pause when ads are disabled"}),this.eventBus.broadcast(t,{name:t,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}},{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){var t=e.gameData,n=e.adRequest;if(t.disableAds[n.adType]||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,l=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||(l=6e4*(null===(s=d.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):l=d.midroll;if(u.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<l)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.disableAds[t]&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(t,"..."));case 10:if(t){e.next=14;break}t=a.AdType.Rewarded,e.next=16;break;case 14:if(t===a.AdType.Interstitial||t===a.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16: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()||(db({event:"GameStarted",game:this._gameData}),this._send_gametag_data("game_started"))}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(db({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{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,l=(e||n)&&r.loaderEnabled,c=(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:l,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:c,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 D.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 D.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new D.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 Wy(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 Vy(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 D.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(M.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new D.default(e,!0);return n.query=wb(wb({},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)Eb.tracking.trackEvent("milestoneAchieved",{pageId:this.options.gameId,pageType:"game",isAuthorized:null===(t=e.data)||void 0===t?void 0:t.isAuthorized,milestoneDescription:null===(n=e.data)||void 0===n?void 0:n.milestoneDescription});else if("game_event"==e.eventName)return this._gameEventPostMessage(e)}catch(e){console.log(e.message)}}},{key:"_gameEventPostMessage",value:function(e){if(void 0!==e.data.level&&this._numberValidator(e.data.level))if(void 0!==e.data.score&&this._numberValidator(e.data.score)){var t={type:e.eventName,data:e.data};window.location!==window.top.location&&window.top.postMessage(t,"*")}else console.log("Level data type should be number!");else console.log("Level data type should be number!")}},{key:"_numberValidator",value:function(e){return"number"==typeof e&&/^\d*$/.test(e)}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,t=this._gameData,n=t.assets.find(function(t){return 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 Ab}},{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){}}},{key:"_getGdModeIfExist",value:function(){var e=this,t=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return k.default(this,e),t.get(n)}.bind(this)});return!t.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:t.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,t,n=this;if(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&this.adInstance.adMidrollCount<=0)if(null!==(t=this._gameData.midroll_plus)&&void 0!==t&&t.interval)var r=setInterval(function(){var e,t,i=this;k.default(this,n),this.showAd(a.AdType.Interstitial,{position:"midroll",isGift:!0}).catch(function(e){k.default(this,i)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(t=this._gameData.midroll_plus)||void 0===t?void 0:t.interval)&&clearInterval(r)}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;k.default(this,n),this.showAd(a.AdType.Interstitial,{position:"midroll",isGift:!0}).catch(function(t){k.default(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}]),e}();function Sb(){return(Sb=A.default(x.default.mark((function e(){var t,n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ev();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:t=["https://tag.atom.gamedistribution.com/v1/locus"],console.log("locus loading"),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){k.default(this,n),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var Rb=new m.EventEmitter,Tb=function(e){var t=this;!function(){Sb.apply(this,arguments)}();var n,r=function(e){var n=this;return k.default(this,t),new Promise(function(t,r){var a=this;k.default(this,n);var i=function(e){k.default(this,a),"SDK_GAME_START"===e.name&&(Rb.off("sdk-event",i),t())}.bind(this);Rb.on("sdk-event",i),p("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return k.default(this,t),n||(n=new xb(e)),n}.bind(this),i=function(e){return k.default(this,t),r(e)}.bind(this),s=function(e){return k.default(this,t),"gdsdk://preloaded"}.bind(this),o=function(e){return k.default(this,t),a().showDisplayAd(e)}.bind(this),d=function(){return k.default(this,t),p("cancelAd")}.bind(this),u=function(){return k.default(this,t),p("openConsole")}.bind(this),l=function(){return k.default(this,t),p("showBanner")}.bind(this),c=function(){return k.default(this,t),p("session")}.bind(this),h=function(e){return k.default(this,t),p("sendGenericEvent",{options:e})}.bind(this),f=function(){k.default(this,t),console.log("_sendSDKReady")}.bind(this),p=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,"*"),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),m=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&&v(r)}),!1)}.bind(this),g=function(){k.default(this,t),m(),p("init")}.bind(this),v=function(n){k.default(this,t);try{Rb.emit("sdk-event",n),e.onEvent&&e.onEvent(n)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:i,preloadAd:s,showDisplayAd:o,cancelAd:d,openConsole:u,getSession:c,onEvent:v,init:g,_sendSDKReady:f,sendGenericEvent:h}},Db=function(e){var t=Tb(e);return t.init(),t},Ib=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)}},Ob=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))},Pb=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,Zg();case 2:return t=e.sent,n=!t,e.next=6,Ob(n);case 6:if(r=e.sent,t){e.next=9;break}return e.abrupt("return",!1);case 9:return a=Ib(),i=a.isMasterGameURL,s=i(),e.next=13,tv();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)}}(),Cb=le,Lb=Dr,Ub=Gt,Mb=Lt.f,jb=function(e){return function(t){for(var n,r=Ub(t),a=Lb(r),i=a.length,s=0,o=[];i>s;)n=a[s++],Cb&&!Mb.call(r,n)||o.push(e?[n,r[n]]:r[n]);return o}},Bb={entries:jb(!0),values:jb(!1)}.values;Sr({target:"Object",stat:!0},{values:function(e){return Bb(e)}});var qb,Gb={},Nb=function(e){try{if(e.skipForward)return;if(Gb.source){var t={type:"gd-sdk-on-event",event:e};Gb.source.postMessage(t,Gb.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},Fb=function(){Nb({name:"SDK_READY",status:"success",message:"Everything is ready."}),Nb({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),Nb({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},Vb=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(!Gb.source&&"init"===s)return function(e){var t=e.source,n=e.origin;Gb={source:t,origin:n}}({source:a,origin:r}),void Fb();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&&Nr.firstAdapterModeAdsense&&"rewarded"!==o.adType&&(console.log("promo-test, set first adapter to adssense 3"),o.params=o.params?o.params:{},o.params.adapter="adsense")}.bind(this),!(n=d.apply(e,Object.values(o)))||!n.then){t.next=6;break}return t.next=6,n;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))()}}else{var u={type:"gd-sdk",method:s,options:o};window.postMessage(u,location.origin)}}),!1)},Wb=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){Nb(e),t.apply(this,arguments)}}(e);var t=new xb(e);return Vb(t),t},zb=function(e){try{var t=Ng(e);e.gameId||t.send("nogameid",{message:"".concat(Fh.parentURL)})}catch(e){}},Kb={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,zb(t),Vg=Ng(zg=t),e.next=5,Pb();case 5:return n=e.sent,r=n?Db(t):Wb(t),rv(),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",Wb(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}()};function Hb(){return(Hb=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,sv();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,Qb(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 $b=!1;function Qb(e){var t=this;return new Promise(function(n,r){var a=this;if(k.default(this,t),qb)return n(qb);if($b)var i=setInterval(function(){k.default(this,a),qb&&($b=!1,clearInterval(i),n(qb))}.bind(this),100);else $b=!0,Kb.create(e).then(function(e){k.default(this,a),qb=e,e._sendSDKReady(),$b=!1,n(qb)}.bind(this))}.bind(this))}Ry();var Jb,Yb=(Qb(Jb=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 Hb.apply(this,arguments)}(Jb,e)}});function Xb(){var e=this;this.AdType=a.AdType,this.preloadAd=function(e){var t=this;return Yb.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",Yb.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 Yb.invoke(function(t){return k.default(this,e),t.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return Yb.invoke(function(t){return k.default(this,e),t.openConsole()}.bind(this))},this.getSession=function(){var e=this;return Yb.invoke(function(t){return k.default(this,e),t.session()}.bind(this))},this.sendEvent=function(e){var t=this;return Yb.invoke(function(n){return k.default(this,t),n.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){k.default(this,e),Oc.showLeaderboard()}.bind(this),addScore:function(t){k.default(this,e),Oc.addScore(t)}.bind(this)}}Xb.prototype=new function(){this.showBanner=function(){var e=this;return Yb.invoke(function(t){return k.default(this,e),t.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new Xb,window.gdApi=window.gdsdk;
|