@bygd/gd-sdk-pes 1.35.13 → 1.35.14
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),D=w(s),T=w(o),R=w(d),O=w(c),P=w(l),I=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="__core-js_shared__",K=N[W]||z(W,{}),$=K;(q.exports=function(e,t){return $[e]||($[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Q,J,Y=function(e){try{return!!e()}catch(e){return!0}},X=!Y((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Z=X,ee=Function.prototype,te=ee.call,ne=Z&&ee.bind.bind(te,te),re=Z?ne:function(e){return function(){return te.apply(e,arguments)}},ae=function(e){return null==e},ie=ae,se=TypeError,oe=function(e){if(ie(e))throw se("Can't call method on "+e);return e},de=oe,ue=Object,ce=function(e){return ue(de(e))},le=ce,he=re({}.hasOwnProperty),fe=Object.hasOwn||function(e,t){return he(le(e),t)},pe=re,me=0,ge=Math.random(),ve=pe(1..toString),be=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ve(++me+ge,36)},ye="undefined"!=typeof navigator&&String(navigator.userAgent)||"",_e=N,we=ye,Ae=_e.process,ke=_e.Deno,Ee=Ae&&Ae.versions||ke&&ke.version,xe=Ee&&Ee.v8;xe&&(J=(Q=xe.split("."))[0]>0&&Q[0]<4?1:+(Q[0]+Q[1])),!J&&we&&(!(Q=we.match(/Edge\/(\d+)/))||Q[1]>=74)&&(Q=we.match(/Chrome\/(\d+)/))&&(J=+Q[1]);var Se=J,De=Se,Te=Y,Re=!!Object.getOwnPropertySymbols&&!Te((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&De&&De<41})),Oe=Re&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Pe=N,Ie=q.exports,Ce=fe,Le=be,Ue=Re,Me=Oe,je=Pe.Symbol,Be=Ie("wks"),Ge=Me?je.for||je:je&&je.withoutSetter||Le,Ne=function(e){return Ce(Be,e)||(Be[e]=Ue&&Ce(je,e)?je[e]:Ge("Symbol."+e)),Be[e]},qe={};qe[Ne("toStringTag")]="z";var Fe="[object z]"===String(qe),Ve="object"==typeof document&&document.all,He={all:Ve,IS_HTMLDDA:void 0===Ve&&void 0!==Ve},ze=He.all,We=He.IS_HTMLDDA?function(e){return"function"==typeof e||e===ze}:function(e){return"function"==typeof e},Ke={},$e=!Y((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Qe=We,Je=He.all,Ye=He.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Qe(e)||e===Je}:function(e){return"object"==typeof e?null!==e:Qe(e)},Xe=Ye,Ze=N.document,et=Xe(Ze)&&Xe(Ze.createElement),tt=function(e){return et?Ze.createElement(e):{}},nt=tt,rt=!$e&&!Y((function(){return 7!=Object.defineProperty(nt("div"),"a",{get:function(){return 7}}).a})),at=$e&&Y((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),it=Ye,st=String,ot=TypeError,dt=function(e){if(it(e))return e;throw ot(st(e)+" is not an object")},ut=X,ct=Function.prototype.call,lt=ut?ct.bind(ct):function(){return ct.apply(ct,arguments)},ht=N,ft=We,pt=function(e,t){return arguments.length<2?(n=ht[e],ft(n)?n:void 0):ht[e]&&ht[e][t];var n},mt=re({}.isPrototypeOf),gt=pt,vt=We,bt=mt,yt=Object,_t=Oe?function(e){return"symbol"==typeof e}:function(e){var t=gt("Symbol");return vt(t)&&bt(t.prototype,yt(e))},wt=String,At=function(e){try{return wt(e)}catch(e){return"Object"}},kt=We,Et=At,xt=TypeError,St=function(e){if(kt(e))return e;throw xt(Et(e)+" is not a function")},Dt=St,Tt=ae,Rt=function(e,t){var n=e[t];return Tt(n)?void 0:Dt(n)},Ot=lt,Pt=We,It=Ye,Ct=TypeError,Lt=lt,Ut=Ye,Mt=_t,jt=Rt,Bt=function(e,t){var n,r;if("string"===t&&Pt(n=e.toString)&&!It(r=Ot(n,e)))return r;if(Pt(n=e.valueOf)&&!It(r=Ot(n,e)))return r;if("string"!==t&&Pt(n=e.toString)&&!It(r=Ot(n,e)))return r;throw Ct("Can't convert object to primitive value")},Gt=TypeError,Nt=Ne("toPrimitive"),qt=function(e,t){if(!Ut(e)||Mt(e))return e;var n,r=jt(e,Nt);if(r){if(void 0===t&&(t="default"),n=Lt(r,e,t),!Ut(n)||Mt(n))return n;throw Gt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Bt(e,t)},Ft=_t,Vt=function(e){var t=qt(e,"string");return Ft(t)?t:t+""},Ht=$e,zt=rt,Wt=at,Kt=dt,$t=Vt,Qt=TypeError,Jt=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Xt="enumerable",Zt="configurable",en="writable";Ke.f=Ht?Wt?function(e,t,n){if(Kt(e),t=$t(t),Kt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&en in n&&!n[en]){var r=Yt(e,t);r&&r[en]&&(e[t]=n.value,n={configurable:Zt in n?n[Zt]:r[Zt],enumerable:Xt in n?n[Xt]:r[Xt],writable:!1})}return Jt(e,t,n)}:Jt:function(e,t,n){if(Kt(e),t=$t(t),Kt(n),zt)try{return Jt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Qt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var tn={exports:{}},nn=$e,rn=fe,an=Function.prototype,sn=nn&&Object.getOwnPropertyDescriptor,on=rn(an,"name"),dn={EXISTS:on,PROPER:on&&"something"===function(){}.name,CONFIGURABLE:on&&(!nn||nn&&sn(an,"name").configurable)},un=We,cn=K,ln=re(Function.toString);un(cn.inspectSource)||(cn.inspectSource=function(e){return ln(e)});var hn,fn,pn,mn=cn.inspectSource,gn=We,vn=N.WeakMap,bn=gn(vn)&&/native code/.test(String(vn)),yn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_n=Ke,wn=yn,An=$e?function(e,t,n){return _n.f(e,t,wn(1,n))}:function(e,t,n){return e[t]=n,e},kn=q.exports,En=be,xn=kn("keys"),Sn=function(e){return xn[e]||(xn[e]=En(e))},Dn={},Tn=bn,Rn=N,On=Ye,Pn=An,In=fe,Cn=K,Ln=Sn,Un=Dn,Mn="Object already initialized",jn=Rn.TypeError,Bn=Rn.WeakMap;if(Tn||Cn.state){var Gn=Cn.state||(Cn.state=new Bn);Gn.get=Gn.get,Gn.has=Gn.has,Gn.set=Gn.set,hn=function(e,t){if(Gn.has(e))throw jn(Mn);return t.facade=e,Gn.set(e,t),t},fn=function(e){return Gn.get(e)||{}},pn=function(e){return Gn.has(e)}}else{var Nn=Ln("state");Un[Nn]=!0,hn=function(e,t){if(In(e,Nn))throw jn(Mn);return t.facade=e,Pn(e,Nn,t),t},fn=function(e){return In(e,Nn)?e[Nn]:{}},pn=function(e){return In(e,Nn)}}var qn={set:hn,get:fn,has:pn,enforce:function(e){return pn(e)?fn(e):hn(e,{})},getterFor:function(e){return function(t){var n;if(!On(t)||(n=fn(t)).type!==e)throw jn("Incompatible receiver, "+e+" required");return n}}},Fn=re,Vn=Y,Hn=We,zn=fe,Wn=$e,Kn=dn.CONFIGURABLE,$n=mn,Qn=qn.enforce,Jn=qn.get,Yn=String,Xn=Object.defineProperty,Zn=Fn("".slice),er=Fn("".replace),tr=Fn([].join),nr=Wn&&!Vn((function(){return 8!==Xn((function(){}),"length",{value:8}).length})),rr=String(String).split("String"),ar=tn.exports=function(e,t,n){"Symbol("===Zn(Yn(t),0,7)&&(t="["+er(Yn(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!zn(e,"name")||Kn&&e.name!==t)&&(Wn?Xn(e,"name",{value:t,configurable:!0}):e.name=t),nr&&n&&zn(n,"arity")&&e.length!==n.arity&&Xn(e,"length",{value:n.arity});try{n&&zn(n,"constructor")&&n.constructor?Wn&&Xn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Qn(e);return zn(r,"source")||(r.source=tr(rr,"string"==typeof t?t:"")),e};Function.prototype.toString=ar((function(){return Hn(this)&&Jn(this).source||$n(this)}),"toString");var ir=We,sr=Ke,or=tn.exports,dr=H,ur=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;if(ir(n)&&or(n,i,r),r.global)a?e[t]=n:dr(t,n);else{try{r.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=n:sr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},cr=re,lr=cr({}.toString),hr=cr("".slice),fr=function(e){return hr(lr(e),8,-1)},pr=Fe,mr=We,gr=fr,vr=Ne("toStringTag"),br=Object,yr="Arguments"==gr(function(){return arguments}()),_r=pr?gr: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=br(e),vr))?n:yr?gr(t):"Object"==(r=gr(t))&&mr(t.callee)?"Arguments":r},wr=_r,Ar=Fe?{}.toString:function(){return"[object "+wr(this)+"]"};Fe||ur(Object.prototype,"toString",Ar,{unsafe:!0});var kr={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},Er=tt("span").classList,xr=Er&&Er.constructor&&Er.constructor.prototype,Sr=xr===Object.prototype?void 0:xr,Dr=fr,Tr=re,Rr=function(e){if("Function"===Dr(e))return Tr(e)},Or=St,Pr=X,Ir=Rr(Rr.bind),Cr=function(e,t){return Or(e),void 0===t?e:Pr?Ir(e,t):function(){return e.apply(t,arguments)}},Lr=Y,Ur=fr,Mr=Object,jr=re("".split),Br=Lr((function(){return!Mr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Ur(e)?jr(e,""):Mr(e)}:Mr,Gr=Math.ceil,Nr=Math.floor,qr=Math.trunc||function(e){var t=+e;return(t>0?Nr:Gr)(t)},Fr=function(e){var t=+e;return t!=t||0===t?0:qr(t)},Vr=Fr,Hr=Math.min,zr=function(e){return e>0?Hr(Vr(e),9007199254740991):0},Wr=zr,Kr=function(e){return Wr(e.length)},$r=fr,Qr=Array.isArray||function(e){return"Array"==$r(e)},Jr=re,Yr=Y,Xr=We,Zr=_r,ea=mn,ta=function(){},na=[],ra=pt("Reflect","construct"),aa=/^\s*(?:class|function)\b/,ia=Jr(aa.exec),sa=!aa.exec(ta),oa=function(e){if(!Xr(e))return!1;try{return ra(ta,na,e),!0}catch(e){return!1}},da=function(e){if(!Xr(e))return!1;switch(Zr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return sa||!!ia(aa,ea(e))}catch(e){return!0}};da.sham=!0;var ua=!ra||Yr((function(){var e;return oa(oa.call)||!oa(Object)||!oa((function(){e=!0}))||e}))?da:oa,ca=Qr,la=ua,ha=Ye,fa=Ne("species"),pa=Array,ma=function(e){var t;return ca(e)&&(t=e.constructor,(la(t)&&(t===pa||ca(t.prototype))||ha(t)&&null===(t=t[fa]))&&(t=void 0)),void 0===t?pa:t},ga=function(e,t){return new(ma(e))(0===t?0:t)},va=Cr,ba=Br,ya=ce,_a=Kr,wa=ga,Aa=re([].push),ka=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=ya(d),m=ba(p),g=va(u,c),v=_a(m),b=0,y=l||wa,_=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:Aa(_,h)}else switch(e){case 4:return!1;case 7:Aa(_,h)}return i?-1:r||a?a:_}},Ea={forEach:ka(0),map:ka(1),filter:ka(2),some:ka(3),every:ka(4),find:ka(5),findIndex:ka(6),filterReject:ka(7)},xa=Y,Sa=function(e,t){var n=[][e];return!!n&&xa((function(){n.call(null,t||function(){return 1},1)}))},Da=Ea.forEach,Ta=N,Ra=kr,Oa=Sr,Pa=Sa("forEach")?[].forEach:function(e){return Da(this,e,arguments.length>1?arguments[1]:void 0)},Ia=An,Ca=function(e){if(e&&e.forEach!==Pa)try{Ia(e,"forEach",Pa)}catch(t){e.forEach=Pa}};for(var La in Ra)Ra[La]&&Ca(Ta[La]&&Ta[La].prototype);Ca(Oa);var Ua={},Ma={},ja={}.propertyIsEnumerable,Ba=Object.getOwnPropertyDescriptor,Ga=Ba&&!ja.call({1:2},1);Ma.f=Ga?function(e){var t=Ba(this,e);return!!t&&t.enumerable}:ja;var Na=Br,qa=oe,Fa=function(e){return Na(qa(e))},Va=$e,Ha=lt,za=Ma,Wa=yn,Ka=Fa,$a=Vt,Qa=fe,Ja=rt,Ya=Object.getOwnPropertyDescriptor;Ua.f=Va?Ya:function(e,t){if(e=Ka(e),t=$a(t),Ja)try{return Ya(e,t)}catch(e){}if(Qa(e,t))return Wa(!Ha(za.f,e,t),e[t])};var Xa={},Za=Fr,ei=Math.max,ti=Math.min,ni=function(e,t){var n=Za(e);return n<0?ei(n+t,0):ti(n,t)},ri=Fa,ai=ni,ii=Kr,si=function(e){return function(t,n,r){var a,i=ri(t),s=ii(i),o=ai(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}},oi={includes:si(!0),indexOf:si(!1)},di=fe,ui=Fa,ci=oi.indexOf,li=Dn,hi=re([].push),fi=function(e,t){var n,r=ui(e),a=0,i=[];for(n in r)!di(li,n)&&di(r,n)&&hi(i,n);for(;t.length>a;)di(r,n=t[a++])&&(~ci(i,n)||hi(i,n));return i},pi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mi=fi,gi=pi.concat("length","prototype");Xa.f=Object.getOwnPropertyNames||function(e){return mi(e,gi)};var vi={};vi.f=Object.getOwnPropertySymbols;var bi=pt,yi=Xa,_i=vi,wi=dt,Ai=re([].concat),ki=bi("Reflect","ownKeys")||function(e){var t=yi.f(wi(e)),n=_i.f;return n?Ai(t,n(e)):t},Ei=fe,xi=ki,Si=Ua,Di=Ke,Ti=function(e,t,n){for(var r=xi(t),a=Di.f,i=Si.f,s=0;s<r.length;s++){var o=r[s];Ei(e,o)||n&&Ei(n,o)||a(e,o,i(t,o))}},Ri=Y,Oi=We,Pi=/#|\.prototype\./,Ii=function(e,t){var n=Li[Ci(e)];return n==Mi||n!=Ui&&(Oi(t)?Ri(t):!!t)},Ci=Ii.normalize=function(e){return String(e).replace(Pi,".").toLowerCase()},Li=Ii.data={},Ui=Ii.NATIVE="N",Mi=Ii.POLYFILL="P",ji=Ii,Bi=N,Gi=Ua.f,Ni=An,qi=ur,Fi=H,Vi=Ti,Hi=ji,zi=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?Bi:u?Bi[o]||Fi(o,{}):(Bi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(s=Gi(n,r))&&s.value:n[r],!Hi(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Vi(i,a)}(e.sham||a&&a.sham)&&Ni(i,"sham",!0),qi(n,r,i,e)}},Wi=fi,Ki=pi,$i=Object.keys||function(e){return Wi(e,Ki)},Qi=ce,Ji=$i;zi({target:"Object",stat:!0,forced:Y((function(){Ji(1)}))},{keys:function(e){return Ji(Qi(e))}});var Yi=Array.isArray,Xi=Object.prototype.toString,Zi=Yi||function(e){return!!e&&"[object Array]"==Xi.call(e)},es={name:"@bygd/gd-sdk-pes",version:"1.35.13",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"}},ts=function(e){var t=ns("object"===E.default(e)?e:a.parseJSON(e));return t&&t.version?es.version>=t.version?t:void 0:t},ns=function(e){var t=this;if(!Zi(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}},rs=function(){var e;(e=console).log.apply(e,arguments)},as=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 is={},ss=_r,os=String,ds=function(e){if("Symbol"===ss(e))throw TypeError("Cannot convert a Symbol value to a string");return os(e)},us={},cs=$e,ls=at,hs=Ke,fs=dt,ps=Fa,ms=$i;us.f=cs&&!ls?Object.defineProperties:function(e,t){fs(e);for(var n,r=ps(t),a=ms(t),i=a.length,s=0;i>s;)hs.f(e,n=a[s++],r[n]);return e};var gs,vs=pt("document","documentElement"),bs=dt,ys=us,_s=pi,ws=Dn,As=vs,ks=tt,Es="prototype",xs="script",Ss=Sn("IE_PROTO"),Ds=function(){},Ts=function(e){return"<"+xs+">"+e+"</"+xs+">"},Rs=function(e){e.write(Ts("")),e.close();var t=e.parentWindow.Object;return e=null,t},Os=function(){try{gs=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Os="undefined"!=typeof document?document.domain&&gs?Rs(gs):(t=ks("iframe"),n="java"+xs+":",t.style.display="none",As.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ts("document.F=Object")),e.close(),e.F):Rs(gs);for(var r=_s.length;r--;)delete Os[Es][_s[r]];return Os()};ws[Ss]=!0;var Ps=Object.create||function(e,t){var n;return null!==e?(Ds[Es]=bs(e),n=new Ds,Ds[Es]=null,n[Ss]=e):n=Os(),void 0===t?n:ys.f(n,t)},Is={},Cs=Vt,Ls=Ke,Us=yn,Ms=function(e,t,n){var r=Cs(t);r in e?Ls.f(e,r,Us(0,n)):e[r]=n},js=ni,Bs=Kr,Gs=Ms,Ns=Array,Fs=Math.max,Vs=function(e,t,n){for(var r=Bs(e),a=js(t,r),i=js(void 0===n?r:n,r),s=Ns(Fs(i-a,0)),o=0;a<i;a++,o++)Gs(s,o,e[a]);return s.length=o,s},Hs=fr,zs=Fa,Ws=Xa.f,Ks=Vs,$s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Is.f=function(e){return $s&&"Window"==Hs(e)?function(e){try{return Ws(e)}catch(e){return Ks($s)}}(e):Ws(zs(e))};var Qs=tn.exports,Js=Ke,Ys=function(e,t,n){return n.get&&Qs(n.get,t,{getter:!0}),n.set&&Qs(n.set,t,{setter:!0}),Js.f(e,t,n)},Xs={},Zs=Ne;Xs.f=Zs;var eo=N,to=fe,no=Xs,ro=Ke.f,ao=function(e){var t=eo.Symbol||(eo.Symbol={});to(t,e)||ro(t,e,{value:no.f(e)})},io=lt,so=pt,oo=Ne,uo=ur,co=Ke.f,lo=fe,ho=Ne("toStringTag"),fo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!lo(e,ho)&&co(e,ho,{configurable:!0,value:t})},po=zi,mo=N,go=lt,vo=re,bo=$e,yo=Re,_o=Y,wo=fe,Ao=mt,ko=dt,Eo=Fa,xo=Vt,So=ds,Do=yn,To=Ps,Ro=$i,Oo=Xa,Po=Is,Io=vi,Co=Ua,Lo=Ke,Uo=us,Mo=Ma,jo=ur,Bo=Ys,Go=q.exports,No=Dn,qo=be,Fo=Ne,Vo=Xs,Ho=ao,zo=function(){var e=so("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=oo("toPrimitive");t&&!t[r]&&uo(t,r,(function(e){return io(n,this)}),{arity:1})},Wo=fo,Ko=qn,$o=Ea.forEach,Qo=Sn("hidden"),Jo="Symbol",Yo="prototype",Xo=Ko.set,Zo=Ko.getterFor(Jo),ed=Object[Yo],td=mo.Symbol,nd=td&&td[Yo],rd=mo.TypeError,ad=mo.QObject,id=Co.f,sd=Lo.f,od=Po.f,dd=Mo.f,ud=vo([].push),cd=Go("symbols"),ld=Go("op-symbols"),hd=Go("wks"),fd=!ad||!ad[Yo]||!ad[Yo].findChild,pd=bo&&_o((function(){return 7!=To(sd({},"a",{get:function(){return sd(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=id(ed,t);r&&delete ed[t],sd(e,t,n),r&&e!==ed&&sd(ed,t,r)}:sd,md=function(e,t){var n=cd[e]=To(nd);return Xo(n,{type:Jo,tag:e,description:t}),bo||(n.description=t),n},gd=function(e,t,n){e===ed&&gd(ld,t,n),ko(e);var r=xo(t);return ko(n),wo(cd,r)?(n.enumerable?(wo(e,Qo)&&e[Qo][r]&&(e[Qo][r]=!1),n=To(n,{enumerable:Do(0,!1)})):(wo(e,Qo)||sd(e,Qo,Do(1,{})),e[Qo][r]=!0),pd(e,r,n)):sd(e,r,n)},vd=function(e,t){ko(e);var n=Eo(t),r=Ro(n).concat(wd(n));return $o(r,(function(t){bo&&!go(bd,n,t)||gd(e,t,n[t])})),e},bd=function(e){var t=xo(e),n=go(dd,this,t);return!(this===ed&&wo(cd,t)&&!wo(ld,t))&&(!(n||!wo(this,t)||!wo(cd,t)||wo(this,Qo)&&this[Qo][t])||n)},yd=function(e,t){var n=Eo(e),r=xo(t);if(n!==ed||!wo(cd,r)||wo(ld,r)){var a=id(n,r);return!a||!wo(cd,r)||wo(n,Qo)&&n[Qo][r]||(a.enumerable=!0),a}},_d=function(e){var t=od(Eo(e)),n=[];return $o(t,(function(e){wo(cd,e)||wo(No,e)||ud(n,e)})),n},wd=function(e){var t=e===ed,n=od(t?ld:Eo(e)),r=[];return $o(n,(function(e){!wo(cd,e)||t&&!wo(ed,e)||ud(r,cd[e])})),r};yo||(jo(nd=(td=function(){if(Ao(nd,this))throw rd("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?So(arguments[0]):void 0,t=qo(e),n=function(e){this===ed&&go(n,ld,e),wo(this,Qo)&&wo(this[Qo],t)&&(this[Qo][t]=!1),pd(this,t,Do(1,e))};return bo&&fd&&pd(ed,t,{configurable:!0,set:n}),md(t,e)})[Yo],"toString",(function(){return Zo(this).tag})),jo(td,"withoutSetter",(function(e){return md(qo(e),e)})),Mo.f=bd,Lo.f=gd,Uo.f=vd,Co.f=yd,Oo.f=Po.f=_d,Io.f=wd,Vo.f=function(e){return md(Fo(e),e)},bo&&(Bo(nd,"description",{configurable:!0,get:function(){return Zo(this).description}}),jo(ed,"propertyIsEnumerable",bd,{unsafe:!0}))),po({global:!0,constructor:!0,wrap:!0,forced:!yo,sham:!yo},{Symbol:td}),$o(Ro(hd),(function(e){Ho(e)})),po({target:Jo,stat:!0,forced:!yo},{useSetter:function(){fd=!0},useSimple:function(){fd=!1}}),po({target:"Object",stat:!0,forced:!yo,sham:!bo},{create:function(e,t){return void 0===t?To(e):vd(To(e),t)},defineProperty:gd,defineProperties:vd,getOwnPropertyDescriptor:yd}),po({target:"Object",stat:!0,forced:!yo},{getOwnPropertyNames:_d}),zo(),Wo(td,Jo),No[Qo]=!0;var Ad=Re&&!!Symbol.for&&!!Symbol.keyFor,kd=zi,Ed=pt,xd=fe,Sd=ds,Dd=q.exports,Td=Ad,Rd=Dd("string-to-symbol-registry"),Od=Dd("symbol-to-string-registry");kd({target:"Symbol",stat:!0,forced:!Td},{for:function(e){var t=Sd(e);if(xd(Rd,t))return Rd[t];var n=Ed("Symbol")(t);return Rd[t]=n,Od[n]=t,n}});var Pd=zi,Id=fe,Cd=_t,Ld=At,Ud=Ad,Md=(0,q.exports)("symbol-to-string-registry");Pd({target:"Symbol",stat:!0,forced:!Ud},{keyFor:function(e){if(!Cd(e))throw TypeError(Ld(e)+" is not a symbol");if(Id(Md,e))return Md[e]}});var jd=X,Bd=Function.prototype,Gd=Bd.apply,Nd=Bd.call,qd="object"==typeof Reflect&&Reflect.apply||(jd?Nd.bind(Gd):function(){return Nd.apply(Gd,arguments)}),Fd=re([].slice),Vd=Qr,Hd=We,zd=fr,Wd=ds,Kd=re([].push),$d=zi,Qd=pt,Jd=qd,Yd=lt,Xd=re,Zd=Y,eu=We,tu=_t,nu=Fd,ru=function(e){if(Hd(e))return e;if(Vd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var a=e[r];"string"==typeof a?Kd(n,a):"number"!=typeof a&&"Number"!=zd(a)&&"String"!=zd(a)||Kd(n,Wd(a))}var i=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Vd(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}},au=Re,iu=String,su=Qd("JSON","stringify"),ou=Xd(/./.exec),du=Xd("".charAt),uu=Xd("".charCodeAt),cu=Xd("".replace),lu=Xd(1..toString),hu=/[\uD800-\uDFFF]/g,fu=/^[\uD800-\uDBFF]$/,pu=/^[\uDC00-\uDFFF]$/,mu=!au||Zd((function(){var e=Qd("Symbol")();return"[null]"!=su([e])||"{}"!=su({a:e})||"{}"!=su(Object(e))})),gu=Zd((function(){return'"\\udf06\\ud834"'!==su("\udf06\ud834")||'"\\udead"'!==su("\udead")})),vu=function(e,t){var n=nu(arguments),r=ru(t);if(eu(r)||void 0!==e&&!tu(e))return n[1]=function(e,t){if(eu(r)&&(t=Yd(r,this,iu(e),t)),!tu(t))return t},Jd(su,null,n)},bu=function(e,t,n){var r=du(n,t-1),a=du(n,t+1);return ou(fu,e)&&!ou(pu,a)||ou(pu,e)&&!ou(fu,r)?"\\u"+lu(uu(e,0),16):e};su&&$d({target:"JSON",stat:!0,arity:3,forced:mu||gu},{stringify:function(e,t,n){var r=nu(arguments),a=Jd(mu?vu:su,null,r);return gu&&"string"==typeof a?cu(a,hu,bu):a}});var yu=vi,_u=ce;zi({target:"Object",stat:!0,forced:!Re||Y((function(){yu.f(1)}))},{getOwnPropertySymbols:function(e){var t=yu.f;return t?t(_u(e)):[]}});var wu=Y,Au=Se,ku=Ne("species"),Eu=function(e){return Au>=51||!wu((function(){var t=[];return(t.constructor={})[ku]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},xu=Ea.filter;zi({target:"Array",proto:!0,forced:!Eu("filter")},{filter:function(e){return xu(this,e,arguments.length>1?arguments[1]:void 0)}});var Su=zi,Du=Y,Tu=Fa,Ru=Ua.f,Ou=$e;Su({target:"Object",stat:!0,forced:!Ou||Du((function(){Ru(1)})),sham:!Ou},{getOwnPropertyDescriptor:function(e,t){return Ru(Tu(e),t)}});var Pu=ki,Iu=Fa,Cu=Ua,Lu=Ms;zi({target:"Object",stat:!0,sham:!$e},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Iu(e),a=Cu.f,i=Pu(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&Lu(s,t,n);return s}});var Uu=zi,Mu=Qr,ju=ua,Bu=Ye,Gu=ni,Nu=Kr,qu=Fa,Fu=Ms,Vu=Ne,Hu=Fd,zu=Eu("slice"),Wu=Vu("species"),Ku=Array,$u=Math.max;Uu({target:"Array",proto:!0,forced:!zu},{slice:function(e,t){var n,r,a,i=qu(this),s=Nu(i),o=Gu(e,s),d=Gu(void 0===t?s:t,s);if(Mu(i)&&(n=i.constructor,(ju(n)&&(n===Ku||Mu(n.prototype))||Bu(n)&&null===(n=n[Wu]))&&(n=void 0),n===Ku||void 0===n))return Hu(i,o,d);for(r=new(void 0===n?Ku:n)($u(d-o,0)),a=0;o<d;o++,a++)o in i&&Fu(r,a,i[o]);return r.length=a,r}});var Qu=lt,Ju=dt,Yu=Rt,Xu=function(e,t,n){var r,a;Ju(e);try{if(!(r=Yu(e,"return"))){if("throw"===t)throw n;return n}r=Qu(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Ju(r),n},Zu=dt,ec=Xu,tc={},nc=tc,rc=Ne("iterator"),ac=Array.prototype,ic=function(e){return void 0!==e&&(nc.Array===e||ac[rc]===e)},sc=_r,oc=Rt,dc=ae,uc=tc,cc=Ne("iterator"),lc=function(e){if(!dc(e))return oc(e,cc)||oc(e,"@@iterator")||uc[sc(e)]},hc=lt,fc=St,pc=dt,mc=At,gc=lc,vc=TypeError,bc=function(e,t){var n=arguments.length<2?gc(e):t;if(fc(n))return pc(hc(n,e));throw vc(mc(e)+" is not iterable")},yc=Cr,_c=lt,wc=ce,Ac=function(e,t,n,r){try{return r?t(Zu(n)[0],n[1]):t(n)}catch(t){ec(e,"throw",t)}},kc=ic,Ec=ua,xc=Kr,Sc=Ms,Dc=bc,Tc=lc,Rc=Array,Oc=function(e){var t=wc(e),n=Ec(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=yc(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=Tc(t),f=0;if(!h||this===Rc&&kc(h))for(s=xc(t),o=n?new this(s):Rc(s);s>f;f++)l=i?a(t[f],f):t[f],Sc(o,f,l);else for(c=(u=Dc(t,h)).next,o=n?new this:[];!(d=_c(c,u)).done;f++)l=i?Ac(u,a,[d.value,f],!0):d.value,Sc(o,f,l);return o.length=f,o},Pc=Ne("iterator"),Ic=!1;try{var Cc=0,Lc={next:function(){return{done:!!Cc++}},return:function(){Ic=!0}};Lc[Pc]=function(){return this},Array.from(Lc,(function(){throw 2}))}catch(e){}var Uc=function(e,t){if(!t&&!Ic)return!1;var n=!1;try{var r={};r[Pc]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Mc=Oc;zi({target:"Array",stat:!0,forced:!Uc((function(e){Array.from(e)}))},{from:Mc});var jc,Bc,Gc,Nc=re,qc=Fr,Fc=ds,Vc=oe,Hc=Nc("".charAt),zc=Nc("".charCodeAt),Wc=Nc("".slice),Kc=function(e){return function(t,n){var r,a,i=Fc(Vc(t)),s=qc(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=zc(i,s))<55296||r>56319||s+1===o||(a=zc(i,s+1))<56320||a>57343?e?Hc(i,s):r:e?Wc(i,s,s+2):a-56320+(r-55296<<10)+65536}},$c={codeAt:Kc(!1),charAt:Kc(!0)},Qc=!Y((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Jc=fe,Yc=We,Xc=ce,Zc=Qc,el=Sn("IE_PROTO"),tl=Object,nl=tl.prototype,rl=Zc?tl.getPrototypeOf:function(e){var t=Xc(e);if(Jc(t,el))return t[el];var n=t.constructor;return Yc(n)&&t instanceof n?n.prototype:t instanceof tl?nl:null},al=Y,il=We,sl=Ye,ol=rl,dl=ur,ul=Ne("iterator"),cl=!1;[].keys&&("next"in(Gc=[].keys())?(Bc=ol(ol(Gc)))!==Object.prototype&&(jc=Bc):cl=!0);var ll=!sl(jc)||al((function(){var e={};return jc[ul].call(e)!==e}));ll&&(jc={}),il(jc[ul])||dl(jc,ul,(function(){return this}));var hl={IteratorPrototype:jc,BUGGY_SAFARI_ITERATORS:cl},fl=hl.IteratorPrototype,pl=Ps,ml=yn,gl=fo,vl=tc,bl=function(){return this},yl=function(e,t,n,r){var a=t+" Iterator";return e.prototype=pl(fl,{next:ml(+!r,n)}),gl(e,a,!1),vl[a]=bl,e},_l=re,wl=St,Al=We,kl=String,El=TypeError,xl=function(e,t,n){try{return _l(wl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Sl=dt,Dl=function(e){if("object"==typeof e||Al(e))return e;throw El("Can't set "+kl(e)+" as a prototype")},Tl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=xl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Sl(n),Dl(r),t?e(n,r):n.__proto__=r,n}}():void 0),Rl=zi,Ol=lt,Pl=We,Il=yl,Cl=rl,Ll=Tl,Ul=fo,Ml=An,jl=ur,Bl=tc,Gl=dn.PROPER,Nl=dn.CONFIGURABLE,ql=hl.IteratorPrototype,Fl=hl.BUGGY_SAFARI_ITERATORS,Vl=Ne("iterator"),Hl="keys",zl="values",Wl="entries",Kl=function(){return this},$l=function(e,t,n,r,a,i,s){Il(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!Fl&&e in f)return f[e];switch(e){case Hl:case zl:case Wl:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Vl]||f["@@iterator"]||a&&f[a],m=!Fl&&p||c(a),g="Array"==t&&f.entries||p;if(g&&(o=Cl(g.call(new e)))!==Object.prototype&&o.next&&(Cl(o)!==ql&&(Ll?Ll(o,ql):Pl(o[Vl])||jl(o,Vl,Kl)),Ul(o,l,!0)),Gl&&a==zl&&p&&p.name!==zl&&(Nl?Ml(f,"name",zl):(h=!0,m=function(){return Ol(p,this)})),a)if(d={values:c(zl),keys:i?m:c(Hl),entries:c(Wl)},s)for(u in d)(Fl||h||!(u in f))&&jl(f,u,d[u]);else Rl({target:t,proto:!0,forced:Fl||h},d);return f[Vl]!==m&&jl(f,Vl,m,{name:a}),Bl[t]=m,d},Ql=function(e,t){return{value:e,done:t}},Jl=$c.charAt,Yl=ds,Xl=qn,Zl=$l,eh=Ql,th="String Iterator",nh=Xl.set,rh=Xl.getterFor(th);Zl(String,"String",(function(e){nh(this,{type:th,string:Yl(e),index:0})}),(function(){var e,t=rh(this),n=t.string,r=t.index;return r>=n.length?eh(void 0,!0):(e=Jl(n,r),t.index+=e.length,eh(e,!1))}));var ah=dt,ih=function(){var e=ah(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},sh=Y,oh=N.RegExp,dh=sh((function(){var e=oh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),uh=dh||sh((function(){return!oh("a","y").sticky})),ch={BROKEN_CARET:dh||sh((function(){var e=oh("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:uh,UNSUPPORTED_Y:dh},lh=Y,hh=N.RegExp,fh=lh((function(){var e=hh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ph=Y,mh=N.RegExp,gh=ph((function(){var e=mh("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),vh=lt,bh=re,yh=ds,_h=ih,wh=ch,Ah=q.exports,kh=Ps,Eh=qn.get,xh=fh,Sh=gh,Dh=Ah("native-string-replace",String.prototype.replace),Th=RegExp.prototype.exec,Rh=Th,Oh=bh("".charAt),Ph=bh("".indexOf),Ih=bh("".replace),Ch=bh("".slice),Lh=function(){var e=/a/,t=/b*/g;return vh(Th,e,"a"),vh(Th,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Uh=wh.BROKEN_CARET,Mh=void 0!==/()??/.exec("")[1];(Lh||Mh||Uh||xh||Sh)&&(Rh=function(e){var t,n,r,a,i,s,o,d=this,u=Eh(d),c=yh(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=vh(Rh,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=Uh&&d.sticky,p=vh(_h,d),m=d.source,g=0,v=c;if(f&&(p=Ih(p,"y",""),-1===Ph(p,"g")&&(p+="g"),v=Ch(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==Oh(c,d.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",p)),Mh&&(n=new RegExp("^"+m+"$(?!\\s)",p)),Lh&&(r=d.lastIndex),a=vh(Th,f?n:d,v),f?a?(a.input=Ch(a.input,g),a[0]=Ch(a[0],g),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:Lh&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),Mh&&a&&a.length>1&&vh(Dh,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=kh(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var jh=Rh;zi({target:"RegExp",proto:!0,forced:/./.exec!==jh},{exec:jh});var Bh=zi,Gh=$e,Nh=re,qh=fe,Fh=We,Vh=mt,Hh=ds,zh=Ys,Wh=Ti,Kh=N.Symbol,$h=Kh&&Kh.prototype;if(Gh&&Fh(Kh)&&(!("description"in $h)||void 0!==Kh().description)){var Qh={},Jh=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Hh(arguments[0]),t=Vh($h,this)?new Kh(e):void 0===e?Kh():Kh(e);return""===e&&(Qh[t]=!0),t};Wh(Jh,Kh),Jh.prototype=$h,$h.constructor=Jh;var Yh="Symbol(test)"==String(Kh("test")),Xh=Nh($h.valueOf),Zh=Nh($h.toString),ef=/^Symbol\((.*)\)[^)]+$/,tf=Nh("".replace),nf=Nh("".slice);zh($h,"description",{configurable:!0,get:function(){var e=Xh(this);if(qh(Qh,e))return"";var t=Zh(e),n=Yh?nf(t,7,-1):tf(t,ef,"$1");return""===n?void 0:n}}),Bh({global:!0,constructor:!0,forced:!0},{Symbol:Jh})}ao("iterator");var rf=Ne,af=Ps,sf=Ke.f,of=rf("unscopables"),df=Array.prototype;null==df[of]&&sf(df,of,{configurable:!0,value:af(null)});var uf=function(e){df[of][e]=!0},cf=Fa,lf=uf,hf=tc,ff=qn,pf=Ke.f,mf=$l,gf=Ql,vf=$e,bf="Array Iterator",yf=ff.set,_f=ff.getterFor(bf),wf=mf(Array,"Array",(function(e,t){yf(this,{type:bf,target:cf(e),index:0,kind:t})}),(function(){var e=_f(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,gf(void 0,!0)):gf("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Af=hf.Arguments=hf.Array;if(lf("keys"),lf("values"),lf("entries"),vf&&"values"!==Af.name)try{pf(Af,"name",{value:"values"})}catch(e){}var kf=N,Ef=kr,xf=Sr,Sf=wf,Df=An,Tf=Ne,Rf=Tf("iterator"),Of=Tf("toStringTag"),Pf=Sf.values,If=function(e,t){if(e){if(e[Rf]!==Pf)try{Df(e,Rf,Pf)}catch(t){e[Rf]=Pf}if(e[Of]||Df(e,Of,t),Ef[t])for(var n in Sf)if(e[n]!==Sf[n])try{Df(e,n,Sf[n])}catch(t){e[n]=Sf[n]}}};for(var Cf in Ef)If(kf[Cf]&&kf[Cf].prototype,Cf);If(xf,"DOMTokenList");var Lf,Uf,Mf,jf,Bf="undefined"!=typeof process&&"process"==fr(process),Gf=pt,Nf=Ys,qf=$e,Ff=Ne("species"),Vf=function(e){var t=Gf(e);qf&&t&&!t[Ff]&&Nf(t,Ff,{configurable:!0,get:function(){return this}})},Hf=mt,zf=TypeError,Wf=function(e,t){if(Hf(t,e))return e;throw zf("Incorrect invocation")},Kf=ua,$f=At,Qf=TypeError,Jf=dt,Yf=function(e){if(Kf(e))return e;throw Qf($f(e)+" is not a constructor")},Xf=ae,Zf=Ne("species"),ep=function(e,t){var n,r=Jf(e).constructor;return void 0===r||Xf(n=Jf(r)[Zf])?t:Yf(n)},tp=TypeError,np=function(e,t){if(e<t)throw tp("Not enough arguments");return e},rp=/(?:ipad|iphone|ipod).*applewebkit/i.test(ye),ap=N,ip=qd,sp=Cr,op=We,dp=fe,up=Y,cp=vs,lp=Fd,hp=tt,fp=np,pp=rp,mp=Bf,gp=ap.setImmediate,vp=ap.clearImmediate,bp=ap.process,yp=ap.Dispatch,_p=ap.Function,wp=ap.MessageChannel,Ap=ap.String,kp=0,Ep={},xp="onreadystatechange";up((function(){Lf=ap.location}));var Sp=function(e){if(dp(Ep,e)){var t=Ep[e];delete Ep[e],t()}},Dp=function(e){return function(){Sp(e)}},Tp=function(e){Sp(e.data)},Rp=function(e){ap.postMessage(Ap(e),Lf.protocol+"//"+Lf.host)};gp&&vp||(gp=function(e){fp(arguments.length,1);var t=op(e)?e:_p(e),n=lp(arguments,1);return Ep[++kp]=function(){ip(t,void 0,n)},Uf(kp),kp},vp=function(e){delete Ep[e]},mp?Uf=function(e){bp.nextTick(Dp(e))}:yp&&yp.now?Uf=function(e){yp.now(Dp(e))}:wp&&!pp?(jf=(Mf=new wp).port2,Mf.port1.onmessage=Tp,Uf=sp(jf.postMessage,jf)):ap.addEventListener&&op(ap.postMessage)&&!ap.importScripts&&Lf&&"file:"!==Lf.protocol&&!up(Rp)?(Uf=Rp,ap.addEventListener("message",Tp,!1)):Uf=xp in hp("script")?function(e){cp.appendChild(hp("script"))[xp]=function(){cp.removeChild(this),Sp(e)}}:function(e){setTimeout(Dp(e),0)});var Op={set:gp,clear:vp},Pp=function(){this.head=null,this.tail=null};Pp.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Ip,Cp,Lp,Up,Mp,jp=Pp,Bp=/ipad|iphone|ipod/i.test(ye)&&"undefined"!=typeof Pebble,Gp=/web0s(?!.*chrome)/i.test(ye),Np=N,qp=Cr,Fp=Ua.f,Vp=Op.set,Hp=jp,zp=rp,Wp=Bp,Kp=Gp,$p=Bf,Qp=Np.MutationObserver||Np.WebKitMutationObserver,Jp=Np.document,Yp=Np.process,Xp=Np.Promise,Zp=Fp(Np,"queueMicrotask"),em=Zp&&Zp.value;if(!em){var tm=new Hp,nm=function(){var e,t;for($p&&(e=Yp.domain)&&e.exit();t=tm.get();)try{t()}catch(e){throw tm.head&&Ip(),e}e&&e.enter()};zp||$p||Kp||!Qp||!Jp?!Wp&&Xp&&Xp.resolve?((Up=Xp.resolve(void 0)).constructor=Xp,Mp=qp(Up.then,Up),Ip=function(){Mp(nm)}):$p?Ip=function(){Yp.nextTick(nm)}:(Vp=qp(Vp,Np),Ip=function(){Vp(nm)}):(Cp=!0,Lp=Jp.createTextNode(""),new Qp(nm).observe(Lp,{characterData:!0}),Ip=function(){Lp.data=Cp=!Cp}),em=function(e){tm.head||Ip(),tm.add(e)}}var rm=em,am=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},im=N.Promise,sm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,om=!sm&&!Bf&&"object"==typeof window&&"object"==typeof document,dm=N,um=im,cm=We,lm=ji,hm=mn,fm=Ne,pm=om,mm=sm,gm=Se;um&&um.prototype;var vm=fm("species"),bm=!1,ym=cm(dm.PromiseRejectionEvent),_m=lm("Promise",(function(){var e=hm(um),t=e!==String(um);if(!t&&66===gm)return!0;if(!gm||gm<51||!/native code/.test(e)){var n=new um((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[vm]=r,!(bm=n.then((function(){}))instanceof r))return!0}return!t&&(pm||mm)&&!ym})),wm={CONSTRUCTOR:_m,REJECTION_EVENT:ym,SUBCLASSING:bm},Am={},km=St,Em=TypeError,xm=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Em("Bad Promise constructor");t=e,n=r})),this.resolve=km(t),this.reject=km(n)};Am.f=function(e){return new xm(e)};var Sm,Dm,Tm,Rm=zi,Om=Bf,Pm=N,Im=lt,Cm=ur,Lm=Tl,Um=fo,Mm=Vf,jm=St,Bm=We,Gm=Ye,Nm=Wf,qm=ep,Fm=Op.set,Vm=rm,Hm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},zm=am,Wm=jp,Km=qn,$m=im,Qm=Am,Jm="Promise",Ym=wm.CONSTRUCTOR,Xm=wm.REJECTION_EVENT,Zm=wm.SUBCLASSING,eg=Km.getterFor(Jm),tg=Km.set,ng=$m&&$m.prototype,rg=$m,ag=ng,ig=Pm.TypeError,sg=Pm.document,og=Pm.process,dg=Qm.f,ug=dg,cg=!!(sg&&sg.createEvent&&Pm.dispatchEvent),lg="unhandledrejection",hg=function(e){var t;return!(!Gm(e)||!Bm(t=e.then))&&t},fg=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&&bg(t),t.rejection=1),!0===o?n=i:(c&&c.enter(),n=o(i),c&&(c.exit(),a=!0)),n===e.promise?u(ig("Promise-chain cycle")):(r=hg(n))?Im(r,n,d,u):d(n)):u(i)}catch(e){c&&!a&&c.exit(),u(e)}},pg=function(e,t){e.notified||(e.notified=!0,Vm((function(){for(var n,r=e.reactions;n=r.get();)fg(n,e);e.notified=!1,t&&!e.rejection&&gg(e)})))},mg=function(e,t,n){var r,a;cg?((r=sg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Pm.dispatchEvent(r)):r={promise:t,reason:n},!Xm&&(a=Pm["on"+e])?a(r):e===lg&&Hm("Unhandled promise rejection",n)},gg=function(e){Im(Fm,Pm,(function(){var t,n=e.facade,r=e.value;if(vg(e)&&(t=zm((function(){Om?og.emit("unhandledRejection",r,n):mg(lg,n,r)})),e.rejection=Om||vg(e)?2:1,t.error))throw t.value}))},vg=function(e){return 1!==e.rejection&&!e.parent},bg=function(e){Im(Fm,Pm,(function(){var t=e.facade;Om?og.emit("rejectionHandled",t):mg("rejectionhandled",t,e.value)}))},yg=function(e,t,n){return function(r){e(t,r,n)}},_g=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,pg(e,!0))},wg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw ig("Promise can't be resolved itself");var r=hg(t);r?Vm((function(){var n={done:!1};try{Im(r,t,yg(wg,n,e),yg(_g,n,e))}catch(t){_g(n,t,e)}})):(e.value=t,e.state=1,pg(e,!1))}catch(t){_g({done:!1},t,e)}}};if(Ym&&(ag=(rg=function(e){Nm(this,ag),jm(e),Im(Sm,this);var t=eg(this);try{e(yg(wg,t),yg(_g,t))}catch(e){_g(t,e)}}).prototype,(Sm=function(e){tg(this,{type:Jm,done:!1,notified:!1,parent:!1,reactions:new Wm,rejection:!1,state:0,value:void 0})}).prototype=Cm(ag,"then",(function(e,t){var n=eg(this),r=dg(qm(this,rg));return n.parent=!0,r.ok=!Bm(e)||e,r.fail=Bm(t)&&t,r.domain=Om?og.domain:void 0,0==n.state?n.reactions.add(r):Vm((function(){fg(r,n)})),r.promise})),Dm=function(){var e=new Sm,t=eg(e);this.promise=e,this.resolve=yg(wg,t),this.reject=yg(_g,t)},Qm.f=dg=function(e){return e===rg||undefined===e?new Dm(e):ug(e)},Bm($m)&&ng!==Object.prototype)){Tm=ng.then,Zm||Cm(ng,"then",(function(e,t){var n=this;return new rg((function(e,t){Im(Tm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete ng.constructor}catch(e){}Lm&&Lm(ng,ag)}Rm({global:!0,constructor:!0,wrap:!0,forced:Ym},{Promise:rg}),Um(rg,Jm,!1),Mm(Jm);var Ag=Cr,kg=lt,Eg=dt,xg=At,Sg=ic,Dg=Kr,Tg=mt,Rg=bc,Og=lc,Pg=Xu,Ig=TypeError,Cg=function(e,t){this.stopped=e,this.result=t},Lg=Cg.prototype,Ug=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=Ag(t,c),g=function(e){return r&&Pg(r,"normal",e),new Cg(!0,e)},v=function(e){return l?(Eg(e),p?m(e[0],e[1],g):m(e[0],e[1])):p?m(e,g):m(e)};if(h)r=e.iterator;else if(f)r=e;else{if(!(a=Og(e)))throw Ig(xg(e)+" is not iterable");if(Sg(a)){for(i=0,s=Dg(e);s>i;i++)if((o=v(e[i]))&&Tg(Lg,o))return o;return new Cg(!1)}r=Rg(e,a)}for(d=h?e.next:r.next;!(u=kg(d,r)).done;){try{o=v(u.value)}catch(e){Pg(r,"throw",e)}if("object"==typeof o&&o&&Tg(Lg,o))return o}return new Cg(!1)},Mg=im,jg=wm.CONSTRUCTOR||!Uc((function(e){Mg.all(e).then(void 0,(function(){}))})),Bg=lt,Gg=St,Ng=Am,qg=am,Fg=Ug;zi({target:"Promise",stat:!0,forced:jg},{all:function(e){var t=this,n=Ng.f(t),r=n.resolve,a=n.reject,i=qg((function(){var n=Gg(t.resolve),i=[],s=0,o=1;Fg(e,(function(e){var d=s++,u=!1;o++,Bg(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 Vg=zi,Hg=wm.CONSTRUCTOR,zg=im,Wg=pt,Kg=We,$g=ur,Qg=zg&&zg.prototype;if(Vg({target:"Promise",proto:!0,forced:Hg,real:!0},{catch:function(e){return this.then(void 0,e)}}),Kg(zg)){var Jg=Wg("Promise").prototype.catch;Qg.catch!==Jg&&$g(Qg,"catch",Jg,{unsafe:!0})}var Yg=lt,Xg=St,Zg=Am,ev=am,tv=Ug;zi({target:"Promise",stat:!0,forced:jg},{race:function(e){var t=this,n=Zg.f(t),r=n.reject,a=ev((function(){var a=Xg(t.resolve);tv(e,(function(e){Yg(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var nv=lt,rv=Am;zi({target:"Promise",stat:!0,forced:wm.CONSTRUCTOR},{reject:function(e){var t=rv.f(this);return nv(t.reject,void 0,e),t.promise}});var av=dt,iv=Ye,sv=Am,ov=function(e,t){if(av(e),iv(t)&&t.constructor===e)return t;var n=sv.f(e);return(0,n.resolve)(t),n.promise},dv=zi,uv=wm.CONSTRUCTOR,cv=ov;pt("Promise"),dv({target:"Promise",stat:!0,forced:uv},{resolve:function(e){return cv(this,e)}});var lv=TypeError,hv=zi,fv=Y,pv=Qr,mv=Ye,gv=ce,vv=Kr,bv=function(e){if(e>9007199254740991)throw lv("Maximum allowed index exceeded");return e},yv=Ms,_v=ga,wv=Eu,Av=Se,kv=Ne("isConcatSpreadable"),Ev=Av>=51||!fv((function(){var e=[];return e[kv]=!1,e.concat()[0]!==e})),xv=function(e){if(!mv(e))return!1;var t=e[kv];return void 0!==t?!!t:pv(e)};hv({target:"Array",proto:!0,arity:1,forced:!Ev||!wv("concat")},{concat:function(e){var t,n,r,a,i,s=gv(this),o=_v(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(xv(i=-1===t?s:arguments[t]))for(a=vv(i),bv(d+a),n=0;n<a;n++,d++)n in i&&yv(o,d,i[n]);else bv(d+1),yv(o,d++,i);return o.length=d,o}});var Sv=$e,Dv=dn.EXISTS,Tv=re,Rv=Ys,Ov=Function.prototype,Pv=Tv(Ov.toString),Iv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Cv=Tv(Iv.exec);function Lv(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 Uv(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 Uv(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 Uv(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 Mv(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 jv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mv(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Sv&&!Dv&&Rv(Ov,"name",{configurable:!0,get:function(){try{return Cv(Iv,Pv(this))[1]}catch(e){return""}}});var Bv,Gv={react:{src:"https://pm.azerioncircle.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.azerioncircle.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.azerioncircle.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.azerioncircle.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.azerioncircle.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Nv={},qv=function(e,t){Nv[e]=jv(jv({},t),{},{isLoading:!1})},Fv=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))},Vv=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=Nv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=Lv(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=Gv[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Fv({id:s,src:Gv[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,Fv({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=S.default((function e(){var t=this;D.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,Vv("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.azerioncircle.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},qv(this.moduleName,this.moduleConfig)})),zv=new Hv,Wv=Ye,Kv=fr,$v=Ne("match"),Qv=function(e){var t;return Wv(e)&&(void 0!==(t=e[$v])?!!t:"RegExp"==Kv(e))},Jv=Qv,Yv=TypeError,Xv=function(e){if(Jv(e))throw Yv("The method doesn't accept regular expressions");return e},Zv=Ne("match"),eb=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Zv]=!1,"/./"[e](t)}catch(e){}}return!1},tb=zi,nb=Rr,rb=Ua.f,ab=zr,ib=ds,sb=Xv,ob=oe,db=eb,ub=nb("".startsWith),cb=nb("".slice),lb=Math.min,hb=db("startsWith");tb({target:"String",proto:!0,forced:!!(hb||(Bv=rb(String.prototype,"startsWith"),!Bv||Bv.writable))&&!hb},{startsWith:function(e){var t=ib(ob(this));sb(e);var n=ab(lb(arguments.length>1?arguments[1]:void 0,t.length)),r=ib(e);return ub?ub(t,r,n):cb(t,n,n+r.length)===r}});var fb=lt,pb=fe,mb=mt,gb=ih,vb=RegExp.prototype,bb=function(e){var t=e.flags;return void 0!==t||"flags"in vb||pb(e,"flags")||!mb(vb,e)?t:fb(gb,e)},yb=dn.PROPER,_b=ur,wb=dt,Ab=ds,kb=Y,Eb=bb,xb="toString",Sb=RegExp.prototype[xb],Db=kb((function(){return"/a/b"!=Sb.call({source:"a",flags:"b"})})),Tb=yb&&Sb.name!=xb;(Db||Tb)&&_b(RegExp.prototype,xb,(function(){var e=wb(this);return"/"+Ab(e.source)+"/"+Ab(Eb(e))}),{unsafe:!0});var Rb=Rr,Ob=ur,Pb=jh,Ib=Y,Cb=Ne,Lb=An,Ub=Cb("species"),Mb=RegExp.prototype,jb=function(e,t,n,r){var a=Cb(e),i=!Ib((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!Ib((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ub]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=Rb(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=Rb(e),d=t.exec;return d===Pb||d===Mb.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Ob(String.prototype,e,d[0]),Ob(Mb,a,d[1])}r&&Lb(Mb[a],"sham",!0)},Bb=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Gb=lt,Nb=dt,qb=We,Fb=fr,Vb=jh,Hb=TypeError,zb=function(e,t){var n=e.exec;if(qb(n)){var r=Gb(n,e,t);return null!==r&&Nb(r),r}if("RegExp"===Fb(e))return Gb(Vb,e,t);throw Hb("RegExp#exec called on incompatible receiver")},Wb=lt,Kb=dt,$b=ae,Qb=oe,Jb=Bb,Yb=ds,Xb=Rt,Zb=zb;function ey(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 ty(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ey(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ey(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}jb("search",(function(e,t,n){return[function(t){var n=Qb(this),r=$b(t)?void 0:Xb(t,e);return r?Wb(r,t,n):new RegExp(t)[e](Yb(n))},function(e){var r=Kb(this),a=Yb(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;Jb(s,0)||(r.lastIndex=0);var o=Zb(r,a);return Jb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var ny,ry,ay=function(){function e(){D.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 R.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 R.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new R.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 R.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 R.default(e,!0);return n.query=ty(ty({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),iy=function(){try{return(new ay).getBridgeContext()}catch(e){return{}}}(),sy={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(ny=!1,(ry=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===ry.xanthophyll&&(ny=!0),ny)},oy=$c.charAt,dy=re,uy=ce,cy=Math.floor,ly=dy("".charAt),hy=dy("".replace),fy=dy("".slice),py=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,my=/\$([$&'`]|\d{1,2})/g,gy=qd,vy=lt,by=re,yy=jb,_y=Y,wy=dt,Ay=We,ky=ae,Ey=Fr,xy=zr,Sy=ds,Dy=oe,Ty=function(e,t,n){return t+(n?oy(e,t).length:1)},Ry=Rt,Oy=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=my;return void 0!==a&&(a=uy(a),d=py),hy(i,d,(function(i,d){var u;switch(ly(d,0)){case"$":return"$";case"&":return e;case"`":return fy(t,0,n);case"'":return fy(t,s);case"<":u=a[fy(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=cy(c/10);return 0===l?i:l<=o?void 0===r[l-1]?ly(d,1):r[l-1]+ly(d,1):i}u=r[c-1]}return void 0===u?"":u}))},Py=zb,Iy=Ne("replace"),Cy=Math.max,Ly=Math.min,Uy=by([].concat),My=by([].push),jy=by("".indexOf),By=by("".slice),Gy="$0"==="a".replace(/./,"$0"),Ny=!!/./[Iy]&&""===/./[Iy]("a","$0");yy("replace",(function(e,t,n){var r=Ny?"$":"$0";return[function(e,n){var r=Dy(this),a=ky(e)?void 0:Ry(e,Iy);return a?vy(a,e,r,n):vy(t,Sy(r),e,n)},function(e,a){var i=wy(this),s=Sy(e);if("string"==typeof a&&-1===jy(a,r)&&-1===jy(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=Ay(a);d||(a=Sy(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=Py(i,s);if(null===h)break;if(My(l,h),!u)break;""===Sy(h[0])&&(i.lastIndex=Ty(s,xy(i.lastIndex),c))}for(var f,p="",m=0,g=0;g<l.length;g++){for(var v=Sy((h=l[g])[0]),b=Cy(Ly(Ey(h.index),s.length),0),y=[],_=1;_<h.length;_++)My(y,void 0===(f=h[_])?f:String(f));var w=h.groups;if(d){var A=Uy([v],y,b,s);void 0!==w&&My(A,w);var k=Sy(gy(a,void 0,A))}else k=Oy(v,s,b,y,w,a);b>=m&&(p+=By(s,m,b)+k,m=b+v.length)}return p+By(s,m)}]}),!!_y((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Gy||Ny);var qy=Y,Fy=$e,Vy=Ne("iterator"),Hy=!qy((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Fy||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Vy]||"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})),zy=ur,Wy=Vs,Ky=Math.floor,$y=function(e,t){var n=e.length,r=Ky(n/2);return n<8?Qy(e,t):Jy(e,$y(Wy(e,0,r),t),$y(Wy(e,r),t),t)},Qy=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},Jy=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},Yy=zi,Xy=N,Zy=lt,e_=re,t_=$e,n_=Hy,r_=ur,a_=Ys,i_=function(e,t,n){for(var r in t)zy(e,r,t[r],n);return e},s_=fo,o_=yl,d_=qn,u_=Wf,c_=We,l_=fe,h_=Cr,f_=_r,p_=dt,m_=Ye,g_=ds,v_=Ps,b_=yn,y_=bc,__=lc,w_=np,A_=$y,k_=Ne("iterator"),E_="URLSearchParams",x_=E_+"Iterator",S_=d_.set,D_=d_.getterFor(E_),T_=d_.getterFor(x_),R_=Object.getOwnPropertyDescriptor,O_=function(e){if(!t_)return Xy[e];var t=R_(Xy,e);return t&&t.value},P_=O_("fetch"),I_=O_("Request"),C_=O_("Headers"),L_=I_&&I_.prototype,U_=C_&&C_.prototype,M_=Xy.RegExp,j_=Xy.TypeError,B_=Xy.decodeURIComponent,G_=Xy.encodeURIComponent,N_=e_("".charAt),q_=e_([].join),F_=e_([].push),V_=e_("".replace),H_=e_([].shift),z_=e_([].splice),W_=e_("".split),K_=e_("".slice),$_=/\+/g,Q_=Array(4),J_=function(e){return Q_[e-1]||(Q_[e-1]=M_("((?:%[\\da-f]{2}){"+e+"})","gi"))},Y_=function(e){try{return B_(e)}catch(t){return e}},X_=function(e){var t=V_(e,$_," "),n=4;try{return B_(t)}catch(e){for(;n;)t=V_(t,J_(n--),Y_);return t}},Z_=/[!'()~]|%20/g,ew={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},tw=function(e){return ew[e]},nw=function(e){return V_(G_(e),Z_,tw)},rw=o_((function(e,t){S_(this,{type:x_,iterator:y_(D_(e).entries),kind:t})}),"Iterator",(function(){var e=T_(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),aw=function(e){this.entries=[],this.url=null,void 0!==e&&(m_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===N_(e,0)?K_(e,1):e:g_(e)))};aw.prototype={type:E_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,s,o,d=__(e);if(d)for(n=(t=y_(e,d)).next;!(r=Zy(n,t)).done;){if(i=(a=y_(p_(r.value))).next,(s=Zy(i,a)).done||(o=Zy(i,a)).done||!Zy(i,a).done)throw j_("Expected sequence with length 2");F_(this.entries,{key:g_(s.value),value:g_(o.value)})}else for(var u in e)l_(e,u)&&F_(this.entries,{key:u,value:g_(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=W_(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=W_(t,"="),F_(this.entries,{key:X_(H_(n)),value:X_(q_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],F_(n,nw(e.key)+"="+nw(e.value));return q_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var iw=function(){u_(this,sw);var e=S_(this,new aw(arguments.length>0?arguments[0]:void 0));t_||(this.length=e.entries.length)},sw=iw.prototype;if(i_(sw,{append:function(e,t){w_(arguments.length,2);var n=D_(this);F_(n.entries,{key:g_(e),value:g_(t)}),t_||this.length++,n.updateURL()},delete:function(e){w_(arguments.length,1);for(var t=D_(this),n=t.entries,r=g_(e),a=0;a<n.length;)n[a].key===r?z_(n,a,1):a++;t_||(this.length=n.length),t.updateURL()},get:function(e){w_(arguments.length,1);for(var t=D_(this).entries,n=g_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){w_(arguments.length,1);for(var t=D_(this).entries,n=g_(e),r=[],a=0;a<t.length;a++)t[a].key===n&&F_(r,t[a].value);return r},has:function(e){w_(arguments.length,1);for(var t=D_(this).entries,n=g_(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){w_(arguments.length,1);for(var n,r=D_(this),a=r.entries,i=!1,s=g_(e),o=g_(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?z_(a,d--,1):(i=!0,n.value=o));i||F_(a,{key:s,value:o}),t_||(this.length=a.length),r.updateURL()},sort:function(){var e=D_(this);A_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=D_(this).entries,r=h_(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 rw(this,"keys")},values:function(){return new rw(this,"values")},entries:function(){return new rw(this,"entries")}},{enumerable:!0}),r_(sw,k_,sw.entries,{name:"entries"}),r_(sw,"toString",(function(){return D_(this).serialize()}),{enumerable:!0}),t_&&a_(sw,"size",{get:function(){return D_(this).entries.length},configurable:!0,enumerable:!0}),s_(iw,E_),Yy({global:!0,constructor:!0,forced:!n_},{URLSearchParams:iw}),!n_&&c_(C_)){var ow=e_(U_.has),dw=e_(U_.set),uw=function(e){if(m_(e)){var t,n=e.body;if(f_(n)===E_)return t=e.headers?new C_(e.headers):new C_,ow(t,"content-type")||dw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),v_(e,{body:b_(0,g_(n)),headers:b_(0,t)})}return e};if(c_(P_)&&Yy({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return P_(e,arguments.length>1?uw(arguments[1]):{})}}),c_(I_)){var cw=function(e){return u_(this,L_),new I_(e,arguments.length>1?uw(arguments[1]):{})};L_.constructor=cw,cw.prototype=L_,Yy({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:cw})}}var lw={URLSearchParams:iw,getState:D_},hw=oi.includes,fw=uf;zi({target:"Array",proto:!0,forced:Y((function(){return!Array(1).includes()}))},{includes:function(e){return hw(this,e,arguments.length>1?arguments[1]:void 0)}}),fw("includes");var pw=zi,mw=Xv,gw=oe,vw=ds,bw=eb,yw=re("".indexOf);function _w(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 I.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 R.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(P.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?P.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))}}}pw({target:"String",proto:!0,forced:!bw("includes")},{includes:function(e){return!!~yw(vw(gw(this)),vw(mw(e)),arguments.length>1?arguments[1]:void 0)}});var ww="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==ww&&ww,Aw={searchParams:"URLSearchParams"in ww,iterable:"Symbol"in ww&&"iterator"in Symbol,blob:"FileReader"in ww&&"Blob"in ww&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in ww,arrayBuffer:"ArrayBuffer"in ww};if(Aw.arrayBuffer)var kw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Ew=ArrayBuffer.isView||function(e){return e&&kw.indexOf(Object.prototype.toString.call(e))>-1};function xw(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 Sw(e){return"string"!=typeof e&&(e=String(e)),e}function Dw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Aw.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Tw(e){this.map={},e instanceof Tw?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 Rw(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Ow(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Pw(e){var t=new FileReader,n=Ow(t);return t.readAsArrayBuffer(e),n}function Iw(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Cw(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Aw.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Aw.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Aw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Aw.arrayBuffer&&Aw.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Iw(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Aw.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Ew(e))?this._bodyArrayBuffer=Iw(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):Aw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Aw.blob&&(this.blob=function(){var e=Rw(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=Rw(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(Pw)}),this.text=function(){var e=Rw(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Ow(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)},Aw.formData&&(this.formData=function(){return this.text().then(Mw)}),this.json=function(){return this.text().then(JSON.parse)},this}Tw.prototype.append=function(e,t){e=xw(e),t=Sw(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Tw.prototype.delete=function(e){delete this.map[xw(e)]},Tw.prototype.get=function(e){return e=xw(e),this.has(e)?this.map[e]:null},Tw.prototype.has=function(e){return this.map.hasOwnProperty(xw(e))},Tw.prototype.set=function(e,t){this.map[xw(e)]=Sw(t)},Tw.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Tw.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Dw(e)},Tw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Dw(e)},Tw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Dw(e)},Aw.iterable&&(Tw.prototype[Symbol.iterator]=Tw.prototype.entries);var Lw=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Uw(e,t){if(!(this instanceof Uw))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 Uw){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Tw(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 Tw(t.headers)),this.method=function(e){var t=e.toUpperCase();return Lw.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 Mw(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 jw(e,t){if(!(this instanceof jw))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 Tw(t.headers),this.url=t.url||"",this._initBody(e)}Uw.prototype.clone=function(){return new Uw(this,{body:this._bodyInit})},Cw.call(Uw.prototype),Cw.call(jw.prototype),jw.prototype.clone=function(){return new jw(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Tw(this.headers),url:this.url})},jw.error=function(){var e=new jw(null,{status:0,statusText:""});return e.type="error",e};var Bw=[301,302,303,307,308];jw.redirect=function(e,t){if(-1===Bw.indexOf(t))throw new RangeError("Invalid status code");return new jw(null,{status:t,headers:{location:e}})};var Gw,Nw=ww.DOMException;try{new Nw}catch(e){Nw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Nw.prototype=Object.create(Error.prototype),Nw.prototype.constructor=Nw}function qw(e,t){return new Promise((function(n,r){var a=new Uw(e,t);if(a.signal&&a.signal.aborted)return r(new Nw("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 Tw,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 jw(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 Nw("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&ww.location.href?ww.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&&(Aw.blob?i.responseType="blob":Aw.arrayBuffer&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Tw?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,Sw(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)}))}qw.polyfill=!0,ww.fetch||(ww.fetch=qw,ww.Headers=Tw,ww.Request=Uw,ww.Response=jw);var Fw=function(e){var t=this;if(!Gw){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:iy.topDomain,domain:iy.parentDomain,referrer:iy.parentURL,depth:a.getIframeDepth(),version:es.version,byloader:iy.isTokenGameURL,isTokenGameURL:iy.isTokenGameURL,isMasterGameURL:iy.isMasterGameURL,isExtHostedGameURL:iy.isExtHostedGameURL,byloaderVersion:iy.version,tracking:sy.userDeclinedTracking,whitelabel:sy.whitelabelPartner,platform:a.getMobilePlatform()};Gw=new a.MessageRouter(n)}return Gw||{send:function(){k.default(this,t)}.bind(this)}},Vw={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){}}},Hw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},zw={gameAPI:"game.api.gamedistribution.com"},Ww={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},Kw=function(){var e=this,t=Hw.acc.some(function(t){var n;return k.default(this,e),t===(null===(n=window.location.host)||void 0===n?void 0:n.toLowerCase())}.bind(this));return{env:t?"acc":"prod",config:t?Ww:zw}},$w=function(e){var t=this,n=e.url;return new Promise(function(e,r){k.default(this,t);var a=new XMLHttpRequest;a.open("GET",n,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else r(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){r(e)},a.send()}.bind(this))};function Qw(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 Jw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qw(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yw,Xw,Zw,eA=new m.EventEmitter,tA=[],nA=function(e){tA.push(e)},rA=function(e){Yw=Fw(Zw=e)},aA=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(Xw){e.next=6;break}return e.next=3,oA(Zw);case 3:Xw=e.sent,eA.emit("game-data-ready",Xw),iA();case 6:return e.abrupt("return",Xw);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),iA=function(){var e,t;if(null!==(e=Xw)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(sA(),null!==(n=Xw)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=Xw)&&void 0!==i&&i.url)Vw.getGameData(null===(s=Xw)||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,oA(Zw);case 3:Xw=e.sent,null===(t=Xw)||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)}},sA=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=Xw)||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=Xw)||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=Xw)||void 0===g||g.aws_tst,null===(v=Xw)||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)})))},oA=function(e){var t=this;Yw.send("gdfw.loading",{message:"loading"}),tA=[],nA("1"),nA("2");var n=new _w;nA("3");var r=n.get("partner.domain.value");nA("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);nA("5");var s=function(){k.default(this,t);var n=o(),a=n?"&mode=".concat(n):"",i=Kw().config;return"https://".concat(i.gameAPI,"/game/v4/get/").concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(es.version,"&localTime=").concat((new Date).getHours())}.bind(this);nA("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 nA("7"),new Promise(function(e){var n=this;k.default(this,t),nA("7.1");var r=i();try{nA("7.2");var o=s();nA("7.3"),fetch(o).then(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:return nA("7.4"),e.prev=1,e.next=4,t.json();case 4:n=e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(1),e.t0,e.next=12,$w({url:o});case 12:n=e.sent;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(t){return e.apply(this,arguments)}}()).then(function(t){var i=this;if(k.default(this,n),nA("7.5"),t.success){var s,d,u,c=t.result.game;nA("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,publishedAt:c.publishedAt,tags:c.tags,category:c.category,assets:c.assets,disp_2nd_prer:c.disp_2nd_prer,ctry_vst:c.ctry_vst,ctry:c.ctry,crtv:c.crtv,dmain:c.dmain,aws_tst:c.aws_tst,meta:c.meta,__t4r:ts(c.__t4r)||{},block_exts:ts(c.push_cuda),bloc_gard:ts(c.bloc_gard),cookie:ts(c.cookie),gdpr:ts(c.gdpr),diagnostic:ts(c.diagnostic),cmp:ts(c.cmp),gft:ts(c.gft)||{},sdk:ts(c.sdk)||{},sdkfw:ts(c.sdkfw)||{},loader:ts(c.loader)||{},splash:ts(c.splash)||{},promo:ts(c.promo)||{},dAds:ts(c.dads)||{},pAds:ts(c.pads)||{},mAds:ts(c.mads)||{},rAds:ts(c.rads)||{},lp:ts(c.lp)||{},extsc:ts(c.extsc)||{},evnts:ts(c.evnts)||{},dp:ts(c.dp)||{},adflw:ts(c.adflw)||{},afgszf:ts(c.afgszf)||{},fllc:ts(c.fllc)||{},lotm:ts(c.lotm)||{},t4rc:ts(c.t4rc)||{},midroll_plus:ts(c.midroll_plus)||{},gmky:ts(c.gmky)||{},urlBlockExc:ts(c.url_blck_exc)||{},sdk_wrp:ts(c.sdk_wrp)||{},dbglg:ts(c.dbglg)||{},extHosting:ts(c.ext_hosting)||{},directTokenUse:ts(c.dtu)||{}};nA("7.7");var h=a.extendDefaults(L.default(r),l);nA("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!==is.afgEnabled&&(h.afg_disabled=!is.afgEnabled),void 0!==is.promoEnabled&&(h.promo=h.promo||{},h.promo=Jw(Jw({},h.promo),{},{rainbow:{enabled:is.promoEnabled}}))}.bind(this),nA("7.9"),null!==(u=h.pAds)&&void 0!==u&&u.enabled&&(h.preroll=!0),nA("7.10"),Yw.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=tA[tA.length-1];Yw.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){k.default(this,n);var a=tA[tA.length-1];Yw.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var d=tA[tA.length-1];Yw.send("gdfw.err",{message:"".concat(d,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}.bind(this))},dA=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,aA();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)}}(),uA=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,aA();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)}}(),cA=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,aA();case 2:return n=e.sent,e.next=5,dA();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)}}(),lA=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,aA();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)}}(),hA=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,lA();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)}}(),fA=!1,pA=!1,mA=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(!fA){e.next=4;break}return e.abrupt("return",t(pA));case 4:fA=!0;case 5:return e.next=7,lA();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 pA=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){k.default(this,d),s&&(s=!1,fA=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){k.default(this,d),s&&i&&window[a]?(s=!1,fA=!0,pA=!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)}}())},gA=zi,vA=im,bA=Y,yA=pt,_A=We,wA=ep,AA=ov,kA=ur,EA=vA&&vA.prototype;if(gA({target:"Promise",proto:!0,real:!0,forced:!!vA&&bA((function(){EA.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=wA(this,yA("Promise")),n=_A(e);return this.then(n?function(n){return AA(t,e()).then((function(){return n}))}:e,n?function(n){return AA(t,e()).then((function(){throw n}))}:e)}}),_A(vA)){var xA=yA("Promise").prototype.finally;EA.finally!==xA&&kA(EA,"finally",xA,{unsafe:!0})}var SA="\t\n\v\f\r \u2028\u2029\ufeff",DA=oe,TA=ds,RA=SA,OA=re("".replace),PA=RegExp("^["+RA+"]+"),IA=RegExp("(^|[^"+RA+"])["+RA+"]+$"),CA=function(e){return function(t){var n=TA(DA(t));return 1&e&&(n=OA(n,PA,"")),2&e&&(n=OA(n,IA,"$1")),n}},LA={start:CA(1),end:CA(2),trim:CA(3)},UA=dn.PROPER,MA=Y,jA=SA,BA=LA.trim;zi({target:"String",proto:!0,forced:function(e){return MA((function(){return!!jA[e]()||"
"!=="
"[e]()||UA&&jA[e].name!==e}))}("trim")},{trim:function(){return BA(this)}});var GA=zi,NA=Ea.find,qA=uf,FA="find",VA=!0;FA in[]&&Array(1)[FA]((function(){VA=!1})),GA({target:"Array",proto:!0,forced:VA},{find:function(e){return NA(this,e,arguments.length>1?arguments[1]:void 0)}}),qA(FA);var HA=We,zA=Ye,WA=Tl,KA=Ke.f,$A=$e,QA=N,JA=re,YA=ji,XA=function(e,t,n){var r,a;return WA&&HA(r=t.constructor)&&r!==n&&zA(a=r.prototype)&&a!==n.prototype&&WA(e,a),e},ZA=An,ek=Xa.f,tk=mt,nk=Qv,rk=ds,ak=bb,ik=ch,sk=function(e,t,n){n in e||KA(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},ok=ur,dk=Y,uk=fe,ck=qn.enforce,lk=Vf,hk=fh,fk=gh,pk=Ne("match"),mk=QA.RegExp,gk=mk.prototype,vk=QA.SyntaxError,bk=JA(gk.exec),yk=JA("".charAt),_k=JA("".replace),wk=JA("".indexOf),Ak=JA("".slice),kk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Ek=/a/g,xk=/a/g,Sk=new mk(Ek)!==Ek,Dk=ik.MISSED_STICKY,Tk=ik.UNSUPPORTED_Y,Rk=$A&&(!Sk||Dk||hk||fk||dk((function(){return xk[pk]=!1,mk(Ek)!=Ek||mk(xk)==xk||"/a/i"!=mk(Ek,"i")})));if(YA("RegExp",Rk)){for(var Ok=function(e,t){var n,r,a,i,s,o,d=tk(gk,this),u=nk(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===Ok)return e;if((u||tk(gk,e))&&(e=e.source,c&&(t=ak(h))),e=void 0===e?"":rk(e),t=void 0===t?"":rk(t),h=e,hk&&"dotAll"in Ek&&(r=!!t&&wk(t,"s")>-1)&&(t=_k(t,/s/g,"")),n=t,Dk&&"sticky"in Ek&&(a=!!t&&wk(t,"y")>-1)&&Tk&&(t=_k(t,/y/g,"")),fk&&(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=yk(e,r)))t+=yk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:bk(kk,Ak(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||uk(s,c))throw new vk("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=XA(mk(e,t),d?this:gk,Ok),(r||a||l.length)&&(o=ck(s),r&&(o.dotAll=!0,o.raw=Ok(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=yk(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+yk(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{ZA(s,"source",""===h?"(?:)":h)}catch(e){}return s},Pk=ek(mk),Ik=0;Pk.length>Ik;)sk(Ok,mk,Pk[Ik++]);gk.constructor=Ok,Ok.prototype=gk,ok(QA,"RegExp",Ok,{constructor:!0})}lk("RegExp");var Ck=zi,Lk=Br,Uk=Fa,Mk=Sa,jk=re([].join);Ck({target:"Array",proto:!0,forced:Lk!=Object||!Mk("join",",")},{join:function(e){return jk(Uk(this),void 0===e?",":e)}});var Bk=Ea.map;zi({target:"Array",proto:!0,forced:!Eu("map")},{map:function(e){return Bk(this,e,arguments.length>1?arguments[1]:void 0)}});var Gk=$e,Nk=re,qk=lt,Fk=Y,Vk=$i,Hk=vi,zk=Ma,Wk=ce,Kk=Br,$k=Object.assign,Qk=Object.defineProperty,Jk=Nk([].concat),Yk=!$k||Fk((function(){if(Gk&&1!==$k({b:1},$k(Qk({},"a",{enumerable:!0,get:function(){Qk(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!=$k({},e)[n]||Vk($k({},t)).join("")!=r}))?function(e,t){for(var n=Wk(e),r=arguments.length,a=1,i=Hk.f,s=zk.f;r>a;)for(var o,d=Kk(arguments[a++]),u=i?Jk(Vk(d),i(d)):Vk(d),c=u.length,l=0;c>l;)o=u[l++],Gk&&!qk(s,d,o)||(n[o]=d[o]);return n}:$k,Xk=Yk;zi({target:"Object",stat:!0,arity:2,forced:Object.assign!==Xk},{assign:Xk});var Zk,eE=re,tE=2147483647,nE=/[^\0-\u007E]/,rE=/[.\u3002\uFF0E\uFF61]/g,aE="Overflow: input needs wider integers to process",iE=RangeError,sE=eE(rE.exec),oE=Math.floor,dE=String.fromCharCode,uE=eE("".charCodeAt),cE=eE([].join),lE=eE([].push),hE=eE("".replace),fE=eE("".split),pE=eE("".toLowerCase),mE=function(e){return e+22+75*(e<26)},gE=function(e,t,n){var r=0;for(e=n?oE(e/700):e>>1,e+=oE(e/t);e>455;)e=oE(e/35),r+=36;return oE(r+36*e/(e+38))},vE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=uE(e,n++);if(a>=55296&&a<=56319&&n<r){var i=uE(e,n++);56320==(64512&i)?lE(t,((1023&a)<<10)+(1023&i)+65536):(lE(t,a),n--)}else lE(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&&lE(t,dE(r));var d=t.length,u=d;for(d&&lE(t,"-");u<a;){var c=tE;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<c&&(c=r);var l=u+1;if(c-i>oE((tE-s)/l))throw iE(aE);for(s+=(c-i)*l,i=c,n=0;n<e.length;n++){if((r=e[n])<i&&++s>tE)throw iE(aE);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;lE(t,dE(mE(p+m%g))),h=oE(m/g),f+=36}lE(t,dE(mE(h))),o=gE(s,l,u==d),s=0,u++}}s++,i++}return cE(t,"")},bE=zi,yE=$e,_E=Hy,wE=N,AE=Cr,kE=re,EE=ur,xE=Ys,SE=Wf,DE=fe,TE=Yk,RE=Oc,OE=Vs,PE=$c.codeAt,IE=function(e){var t,n,r=[],a=fE(hE(pE(e),rE,"."),".");for(t=0;t<a.length;t++)n=a[t],lE(r,sE(nE,n)?"xn--"+vE(n):n);return cE(r,".")},CE=ds,LE=fo,UE=np,ME=lw,jE=qn,BE=jE.set,GE=jE.getterFor("URL"),NE=ME.URLSearchParams,qE=ME.getState,FE=wE.URL,VE=wE.TypeError,HE=wE.parseInt,zE=Math.floor,WE=Math.pow,KE=kE("".charAt),$E=kE(/./.exec),QE=kE([].join),JE=kE(1..toString),YE=kE([].pop),XE=kE([].push),ZE=kE("".replace),ex=kE([].shift),tx=kE("".split),nx=kE("".slice),rx=kE("".toLowerCase),ax=kE([].unshift),ix="Invalid scheme",sx="Invalid host",ox="Invalid port",dx=/[a-z]/i,ux=/[\d+-.a-z]/i,cx=/\d/,lx=/^0x/i,hx=/^[0-7]+$/,fx=/^\d+$/,px=/^[\da-f]+$/i,mx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,gx=/[\0\t\n\r #/:<>?@[\\\]^|]/,vx=/^[\u0000-\u0020]+/,bx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,yx=/[\t\n\r]/g,_x=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)ax(t,e%256),e=zE(e/256);return QE(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+=JE(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},wx={},Ax=TE({},wx,{" ":1,'"':1,"<":1,">":1,"`":1}),kx=TE({},Ax,{"#":1,"?":1,"{":1,"}":1}),Ex=TE({},kx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),xx=function(e,t){var n=PE(e,0);return n>32&&n<127&&!DE(t,e)?e:encodeURIComponent(e)},Sx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Dx=function(e,t){var n;return 2==e.length&&$E(dx,KE(e,0))&&(":"==(n=KE(e,1))||!t&&"|"==n)},Tx=function(e){var t;return e.length>1&&Dx(nx(e,0,2))&&(2==e.length||"/"===(t=KE(e,2))||"\\"===t||"?"===t||"#"===t)},Rx=function(e){return"."===e||"%2e"===rx(e)},Ox={},Px={},Ix={},Cx={},Lx={},Ux={},Mx={},jx={},Bx={},Gx={},Nx={},qx={},Fx={},Vx={},Hx={},zx={},Wx={},Kx={},$x={},Qx={},Jx={},Yx=function(e,t,n){var r,a,i,s=CE(e);if(t){if(a=this.parse(s))throw VE(a);this.searchParams=null}else{if(void 0!==n&&(r=new Yx(n,!0)),a=this.parse(s,null,r))throw VE(a);(i=qE(new NE)).bindURL(this),this.searchParams=i}};Yx.prototype={type:"URL",parse:function(e,t,n){var r,a,i,s,o,d=this,u=t||Ox,c=0,l="",h=!1,f=!1,p=!1;for(e=CE(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=ZE(e,vx,""),e=ZE(e,bx,"$1")),e=ZE(e,yx,""),r=RE(e);c<=r.length;){switch(a=r[c],u){case Ox:if(!a||!$E(dx,a)){if(t)return ix;u=Ix;continue}l+=rx(a),u=Px;break;case Px:if(a&&($E(ux,a)||"+"==a||"-"==a||"."==a))l+=rx(a);else{if(":"!=a){if(t)return ix;l="",u=Ix,c=0;continue}if(t&&(d.isSpecial()!=DE(Sx,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&Sx[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?u=Vx:d.isSpecial()&&n&&n.scheme==d.scheme?u=Cx:d.isSpecial()?u=jx:"/"==r[c+1]?(u=Lx,c++):(d.cannotBeABaseURL=!0,XE(d.path,""),u=$x)}break;case Ix:if(!n||n.cannotBeABaseURL&&"#"!=a)return ix;if(n.cannotBeABaseURL&&"#"==a){d.scheme=n.scheme,d.path=OE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,u=Jx;break}u="file"==n.scheme?Vx:Ux;continue;case Cx:if("/"!=a||"/"!=r[c+1]){u=Ux;continue}u=Bx,c++;break;case Lx:if("/"==a){u=Gx;break}u=Kx;continue;case Ux:if(d.scheme=n.scheme,a==Zk)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=OE(n.path),d.query=n.query;else if("/"==a||"\\"==a&&d.isSpecial())u=Mx;else if("?"==a)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=OE(n.path),d.query="",u=Qx;else{if("#"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=OE(n.path),d.path.length--,u=Kx;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=OE(n.path),d.query=n.query,d.fragment="",u=Jx}break;case Mx:if(!d.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,u=Kx;continue}u=Gx}else u=Bx;break;case jx:if(u=Bx,"/"!=a||"/"!=KE(l,c+1))continue;c++;break;case Bx:if("/"!=a&&"\\"!=a){u=Gx;continue}break;case Gx:if("@"==a){h&&(l="%40"+l),h=!0,i=RE(l);for(var m=0;m<i.length;m++){var g=i[m];if(":"!=g||p){var v=xx(g,Ex);p?d.password+=v:d.username+=v}else p=!0}l=""}else if(a==Zk||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(h&&""==l)return"Invalid authority";c-=RE(l).length+1,l="",u=Nx}else l+=a;break;case Nx:case qx:if(t&&"file"==d.scheme){u=zx;continue}if(":"!=a||f){if(a==Zk||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(d.isSpecial()&&""==l)return sx;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 sx;if(s=d.parseHost(l))return s;if(l="",u=Fx,t==qx)return}break;case Fx:if(!$E(cx,a)){if(a==Zk||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()||t){if(""!=l){var b=HE(l,10);if(b>65535)return ox;d.port=d.isSpecial()&&b===Sx[d.scheme]?null:b,l=""}if(t)return;u=Wx;continue}return ox}l+=a;break;case Vx:if(d.scheme="file","/"==a||"\\"==a)u=Hx;else{if(!n||"file"!=n.scheme){u=Kx;continue}if(a==Zk)d.host=n.host,d.path=OE(n.path),d.query=n.query;else if("?"==a)d.host=n.host,d.path=OE(n.path),d.query="",u=Qx;else{if("#"!=a){Tx(QE(OE(r,c),""))||(d.host=n.host,d.path=OE(n.path),d.shortenPath()),u=Kx;continue}d.host=n.host,d.path=OE(n.path),d.query=n.query,d.fragment="",u=Jx}}break;case Hx:if("/"==a||"\\"==a){u=zx;break}n&&"file"==n.scheme&&!Tx(QE(OE(r,c),""))&&(Dx(n.path[0],!0)?XE(d.path,n.path[0]):d.host=n.host),u=Kx;continue;case zx:if(a==Zk||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&Dx(l))u=Kx;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=Kx,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=Zk&&(u=Kx,"/"!=a))continue}else d.fragment="",u=Jx;else d.query="",u=Qx;break;case Kx:if(a==Zk||"/"==a||"\\"==a&&d.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(o=rx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==a||"\\"==a&&d.isSpecial()||XE(d.path,"")):Rx(l)?"/"==a||"\\"==a&&d.isSpecial()||XE(d.path,""):("file"==d.scheme&&!d.path.length&&Dx(l)&&(d.host&&(d.host=""),l=KE(l,0)+":"),XE(d.path,l)),l="","file"==d.scheme&&(a==Zk||"?"==a||"#"==a))for(;d.path.length>1&&""===d.path[0];)ex(d.path);"?"==a?(d.query="",u=Qx):"#"==a&&(d.fragment="",u=Jx)}else l+=xx(a,kx);break;case $x:"?"==a?(d.query="",u=Qx):"#"==a?(d.fragment="",u=Jx):a!=Zk&&(d.path[0]+=xx(a,wx));break;case Qx:t||"#"!=a?a!=Zk&&("'"==a&&d.isSpecial()?d.query+="%27":d.query+="#"==a?"%23":xx(a,wx)):(d.fragment="",u=Jx);break;case Jx:a!=Zk&&(d.fragment+=xx(a,Ax))}c++}},parseHost:function(e){var t,n,r;if("["==KE(e,0)){if("]"!=KE(e,e.length-1))return sx;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 KE(e,l)};if(":"==h()){if(":"!=KE(e,1))return;l+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&$E(px,h());)t=16*t+HE(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(!$E(cx,h()))return;for(;$E(cx,h());){if(i=HE(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}(nx(e,1,-1)),!t)return sx;this.host=t}else if(this.isSpecial()){if(e=IE(e),$E(mx,e))return sx;if(t=function(e){var t,n,r,a,i,s,o,d=tx(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"==KE(a,0)&&(i=$E(lx,a)?16:8,a=nx(a,8==i?1:2)),""===a)s=0;else{if(!$E(10==i?fx:8==i?hx:px,a))return e;s=HE(a,i)}XE(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=WE(256,5-t))return null}else if(s>255)return null;for(o=YE(n),r=0;r<n.length;r++)o+=n[r]*WE(256,3-r);return o}(e),null===t)return sx;this.host=t}else{if($E(gx,e))return sx;for(t="",n=RE(e),r=0;r<n.length;r++)t+=xx(n[r],wx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return DE(Sx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Dx(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+=_x(a),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+QE(s,"/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},setHref:function(e){var t=this.parse(e);if(t)throw VE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Xx(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+_x(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(CE(e)+":",Ox)},getUsername:function(){return this.username},setUsername:function(e){var t=RE(CE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=xx(t[n],Ex)}},getPassword:function(){return this.password},setPassword:function(e){var t=RE(CE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=xx(t[n],Ex)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?_x(e):_x(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Nx)},getHostname:function(){var e=this.host;return null===e?"":_x(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,qx)},getPort:function(){var e=this.port;return null===e?"":CE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=CE(e))?this.port=null:this.parse(e,Fx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+QE(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=CE(e))?this.query=null:("?"==KE(e,0)&&(e=nx(e,1)),this.query="",this.parse(e,Qx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=CE(e))?("#"==KE(e,0)&&(e=nx(e,1)),this.fragment="",this.parse(e,Jx)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Xx=function(e){var t=SE(this,Zx),n=UE(arguments.length,1)>1?arguments[1]:void 0,r=BE(t,new Yx(e,!1,n));yE||(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())},Zx=Xx.prototype,eS=function(e,t){return{get:function(){return GE(this)[e]()},set:t&&function(e){return GE(this)[t](e)},configurable:!0,enumerable:!0}};if(yE&&(xE(Zx,"href",eS("serialize","setHref")),xE(Zx,"origin",eS("getOrigin")),xE(Zx,"protocol",eS("getProtocol","setProtocol")),xE(Zx,"username",eS("getUsername","setUsername")),xE(Zx,"password",eS("getPassword","setPassword")),xE(Zx,"host",eS("getHost","setHost")),xE(Zx,"hostname",eS("getHostname","setHostname")),xE(Zx,"port",eS("getPort","setPort")),xE(Zx,"pathname",eS("getPathname","setPathname")),xE(Zx,"search",eS("getSearch","setSearch")),xE(Zx,"searchParams",eS("getSearchParams")),xE(Zx,"hash",eS("getHash","setHash"))),EE(Zx,"toJSON",(function(){return GE(this).serialize()}),{enumerable:!0}),EE(Zx,"toString",(function(){return GE(this).serialize()}),{enumerable:!0}),FE){var tS=FE.createObjectURL,nS=FE.revokeObjectURL;tS&&EE(Xx,"createObjectURL",AE(tS,FE)),nS&&EE(Xx,"revokeObjectURL",AE(nS,FE))}LE(Xx,"URL"),bE({global:!0,constructor:!0,forced:!_E,sham:!yE},{URL:Xx});var rS=function(){function e(t){D.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 R.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}(),aS=function(){function e(t,n){D.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}(),iS=function(){function e(t,n){D.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}(),sS=function(){function e(t){D.default(this,e),this.adContainer=t}return S.default(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{key:"mute",value:function(){document.getElementById("game").contentWindow.postMessage("mute","*")}},{key:"unmute",value:function(){document.getElementById("game").contentWindow.postMessage("unmute","*")}},{key:"add",value:function(){try{var e=document.createElement("div");this.audioLabel=e;var t=document.createElement("span");t.innerText="Audio Ad is Playing";var n=document.createElement("span");n.innerHTML="ⓘ",this.addStyles(),e.classList.add("gd__audio__label"),t.classList.add("gd__audio__span"),n.classList.add("gd__audio__span"),this.audioLabel.appendChild(n),this.audioLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__audio__label__style",e,"\n .gd__audio__label{\n background-color: #ffca00; \n width: 200px;\n position: relative;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n border-radius: 0px;\n border: 0px;\n text-align: center;\n height: 30px;\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px;\n }\n .gd__audio__span{\n color: black;\n font-size: 14px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),oS=function(){function e(t){D.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}(),dS=function(e){if(!e)return!1;var t=uS.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)},uS=Object.prototype.toString;function cS(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 lS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cS(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hS(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>"):'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>")}var fS,pS="13998",mS="_cc".concat(pS),gS=["https://tags.crwdcntrl.net/c/".concat(pS,"/cc.js?ns=").concat(mS)],vS=function(){return!!fS&&"function"==typeof fS.bcpf&&"function"==typeof fS.add},bS=function(e,t){try{if(!vS())return;fS.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},yS=function(e,t){try{if(!vS())return;fS.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},_S=function(e){var t=this;try{bS("act","play"),bS("med","game"),"complete"===document.readyState?fS.bcpf():fS.bcp(),e.tags.forEach(function(e){k.default(this,t),yS("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),yS("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},wS=function(){window.addEventListener("load",(function(){eA.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!=iy&&iy.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,dA();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(gS[0],"LOTCC_".concat(pS),{alternates:gS});case 16:"object"===E.default(window[mS])&&(fS=window[mS]),vS()&&_S(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)}}())}))},AS=function(){yS("genp","ad video"),yS("act","ad impression")},kS=function(){yS("act","ad skipped")},ES=function(){yS("act","ad click")},xS=function(){yS("act","ad complete")},SS=new _w,DS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},TS=function(e,t){var n=this,r=function(e,t){var n=SS.get("partner.url.value"),r=DS[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)},RS=(new _w).get("partner.domain.value"),OS=["latimes.com"],PS={exist:function(e){var t=this;return"Softgames-Azerion"===e.dname&&OS.some(function(e){return k.default(this,t),e===RS}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return TS(n,e)}}[RS](e)}(e,t)}},IS=function(){var e=(new _w).get("partner.url.value"),t=new R.default(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,a="1"===r||"2"===r,i="1"===r;n={useTestAds:a,disableMidrolltimer:i,isRevisionTest:i||a}}return n};function CS(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 LS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CS(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var US=new m.EventEmitter,MS=null,jS=function(){function e(t,n,r){var i=this;if(D.default(this,e),MS)return MS;MS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=n?a.extendDefaults(s,n):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new a.EventBus,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=a.getIMASampleTags(),this.atom_display,this.adType_="",this.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,P,I,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),as("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:(I=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 I.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:(P=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 P.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")||IS().useTestAds)){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="","audio"===t.adapter||"audio"===t.giftType?(n.isAudioAd=!0,l="midrollaudio"):(n.isAudioAd=!1,l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),r.next=19,window.idhb.isLoaded();case 19:return r.next=21,n._create_dp_context(u,t);case 21:h=r.sent,rs("gd-adflow, before idhb",u,l),f=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(LS(LS({},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:LS(LS({},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=33;break;case 30:throw r.prev=30,r.t0=r.catch(10),new Error(r.t0);case 33:case"end":return r.stop()}}),r,this,[[10,30]])})));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,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,t),c=LS(LS({},t),{},{adTag:u,tnl_ad_pos:o});this.adCounter[o]=this.adCounter[o]||0,this.adCounter[o]++;var l=e.dp,h=e.hl;this.current_dp=l,l&&!u.bidder&&(l.adtag_url=u.url,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)}).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){for(var t=[],n="",r=Date.now(),a={ppos:1,lip:!0,vad_type:"linear"},i=0;i<e.length;i++){var s=new R.default(e[i].adtag.url,!0);s.query=lS(lS({},s.query),{},{ad_rule:0,vpos:e[i].positon,pod:1,correlator:0===i?r:++r,output:"xml_vast3"}),0===i&&(s.query=lS(lS({},s.query),a)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var u,c,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(d,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(hS({id:o++,adtag_url:t[d-1],error_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.error_url,impression_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.impression_url,fallback_url:null===(l=e[d-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[d-1].dp)||void 0===h?void 0:h.fallback_imp_url}),"</vmap:AdSource>\n </vmap:AdBreak>")}return'<?xml version="1.0" encoding="UTF-8"?>\n <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n '.concat(n,"\n </vmap:VMAP>").trim()}(this._get_vmap_context({dp:l,adtag:u,position:"preroll"===c.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));d.adsResponse=m}else if(l&&h.bidFloorApplied){l.adtag_url||(l.adtag_url=u.url);var g=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(l);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=PS.exist(this.gameData)&&PS.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.isAudioAd=!1,this.adContext=LS(LS({},r),{},{adType:n}),"promo"!==(null==r?void 0:r.adapter)){e.next=6;break}return e.abrupt("return",this._startPromo(r,n));case 6:if("adsense"!==(null==r?void 0:r.adapter)){e.next=30;break}if(n!==a.AdType.Interstitial){e.next=23;break}if("preroll"!==(null==r?void 0:r.position)){e.next=12;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 12:if("start"!==(null==r?void 0:r.position)){e.next=16;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 16:if("next"!==(null==r?void 0:r.position)){e.next=20;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 20:return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 21:e.next=28;break;case 23:if(n!==a.AdType.Rewarded){e.next=27;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 27:case 40:throw new Error("Unsupported ad type");case 28:e.next=41;break;case 30:if(!["ima","spil","audio"].some(function(e){return k.default(this,i),e===(null==r?void 0:r.adapter)}.bind(this))){e.next=41;break}if(n!==a.AdType.Interstitial){e.next=36;break}return e.abrupt("return",this._startInterstitialAd(r));case 36:if(n!==a.AdType.Rewarded){e.next=40;break}return e.abrupt("return",this._startRewardedAd(r));case 41: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:"addAdComponents",value:function(){var e=this,t=function(){k.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new aS(this.adContainer,t),this.adResume.add(),this.rewardedLabel=new iS(this.adContainer,t),this.rewardedLabel.add(),this.audioAdLabel=new sS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}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,a,i=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,i),is.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(LS(LS({},n),t));case 13:if(r=e.sent,a=r.success,r.args,a){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,a,i;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(LS(LS({},r),t),n);case 11:if(a=e.sent,i=a.success,a.args,i){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,LS({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,LS({adType:a.AdType.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return 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,a,i=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,i),is.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(LS(LS({},n),t));case 13:if(r=e.sent,a=r.success,r.args,a){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,LS({adType:a.AdType.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return 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.isAudioAd||(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 oS(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.addAdComponents(),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:this.contentPaused&&(c=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),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}),ES();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"),this.contentPaused=!0,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.",this.contentPaused?c=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this.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(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this.isAudioAd&&this.audioAdLabel.show();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.",kS(),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){var b=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,y=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;b||y||this.isAudioAd||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)}})}if(c&&!this.adSuccess){this.adSuccess=!0;var _=e.getAd(),w="Rainbow"===(null==_?void 0:_.getAdSystem())&&(null==_?void 0:_.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this)));null==_||_.getAdSystem(),null==_||_.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:w}),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);US.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(dS(e.getInnerError)){var t=e.getInnerError();if(t)return dS(t.getErrorCode)&&dS(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 R.default(r.url,!0);return j.default(s.query,r.query||{}),LS({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new R.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new R.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,i=(null===(t=this._adrequest_user_context)||void 0===t||null===(n=t.adTag)||void 0===n?void 0:n.bidder)||"adx";this.msgrt.send("bidder",{message:i}),this._adrequest_user_context,'bidder:"'.concat(i,'"');var s=(null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[],o=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return o.length>0?d=!o.some(function(t){return k.default(this,e),t===i}.bind(this)):s.length>0&&(d=s.some(function(t){return k.default(this,e),t===i}.bind(this))),d}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;var i=this.gameData.meta,s=e.t4r.meta;if((null==i?void 0:i.ast.c)>=(null==s?void 0:s.ast.c)&&(null==i?void 0:i.sit.c)>=(null==s?void 0:s.sit.c))return!1;if(this._isExcludedBidderForT4R())return this.msgrt.send("bidder.ex",{message:"true"}),!1;this.msgrt.send("bidder.ex",{message:"false"});var o,d=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[d]>=(null===(n=e.t4r[d])||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 d&&(null===(o=e.t4r[d])||void 0===o?void 0:o.enabled);if(null!=e&&e.contentType.startsWith("video/")){var u,c=(null===(u=e.t4r[d])||void 0===u?void 0:u.viper)||0;if(c>0){var l,h=Math.random()<c;return d&&h&&(null===(l=e.t4r[d])||void 0===l?void 0:l.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){for(var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=r.count||2,s=[],o=1;o<=i;o++){var d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:a,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(t){var n=this;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 rS(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),is.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=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 rS(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,!1,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,l),e.json()}.bind(this)).then(function(e){if(k.default(this,l),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;n.msgrt.send("dp.fp",{message:t}),a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){k.default(this,l),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=20;break;case 16:r.prev=16,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 20:case"end":return r.stop()}}),r,this,[[0,16]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new R.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.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 R.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(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(k.default(this,c),is.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();var t="rewarded";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),u=function(e){window.adsbygoogle.push(e)},setTimeout(function(){k.default(this,c),n||(rs("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(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(k.default(this,r),is.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();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),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(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(k.default(this,i),is.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();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),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(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(k.default(this,i),is.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();var t="midroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),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}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new _w).get();return n=LS(LS({},n),r),n=t?LS(LS({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===a.AdType.Rewarded)t="reward";else if(n===a.AdType.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,t){var n=this,r=!1;["AD_ERROR"].some(function(t){return 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,LS(LS({},t),{},{skipForward:r,adPosition:a}))}}]),e}(),BS=S.default((function e(t){var n=this;D.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,Vv(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.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},qv(this.moduleName,this.moduleConfig)})),GS=S.default((function e(t){var n=this;D.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,Vv(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.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},qv(this.moduleName,this.moduleConfig)})),NS=function(e,t){console.log(e,t)},qS={},FS={},VS=null;function HS(){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 qS.version=r,qS.frame=e,qS.function=n,qS.version}function zS(e){var t=this;return VS||(VS=new Promise(function(n){function r(t,r){if(NS("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:qS,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}k.default(this,t),HS(),qS.frame?2===qS.version?(NS("TCF v2 CMP found. Fetching the consent."),qS.function?(NS("CMP API is directly accessible, calling it now..."),qS.function("addEventListener",qS.version,r)):(NS("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!==FS[r.callId]&&FS[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});FS[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,qS.version,n)}("addEventListener",qS.frame,r))):n({result:"cmpVersionNotV2",cmp:qS}):n({result:"cmpNotFound"})}.bind(this)),VS)}var WS=new(function(){function e(){D.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.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(u,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,n){return t.apply(this,arguments)})}]),e}());function KS(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 QS=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=KS(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))},JS="ffd4774b-99ae-4464-8f40-3afa12b4692e",YS=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,QS({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,QS({src:"https://cdn.cookielaw.org/consent/".concat(JS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,QS({src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:JS}],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)}}(),XS=new m.EventEmitter,ZS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},eD=!1;function tD(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(ZS).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)&&(eD=!0),a&&eD&&(eD=!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=ZS[r][a];h&&XS.emit(h,n)}}}),!1);var nD="__msgr",rD=_.v4(),aD=function(e){var t=this;if(!window[nD]){var n=document.createElement("iframe");if(n.src="https://static.gamedistribution.com/message/index.html",n.style.display="none",n.name=nD,document.body.appendChild(n),window!==window.top){var r={gameId:e.gameId,target:e.evnts.domain,token:rD,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){oD(r)},setInterval(function(){k.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",oD(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?tD(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=rD,oD(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},iD=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=sD(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},sD=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}},oD=function(e){try{window[nD]&&window[nD].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},dD=function(){function e(t){D.default(this,e),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=t.adRequest,this._gameData=t._gameData,this._msgrt=t._msgrt,this._adInstance=t._adInstance,this._eventBus=t._eventBus,this.blockedAdsMap=t._blockedAdsMap,this._parentURL=t._parentURL,this._parentDomain=t._parentDomain,this._onResumeGame=t._onResumeGame.bind(t),this._onPauseGame=t._onPauseGame.bind(t),this._onRewardedWatchComplete=t._onRewardedWatchComplete.bind(t),this._onAdError=t._onAdError.bind(t),this._promoShowSuccess=!1}var t,n,r;return S.default(e,[{key:"run",value:function(e){var t=e.duration,n=this;return new Promise(function(){var e=A.default(x.default.mark((function e(r,a){var i,s=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.add();case 3:i=n.show(),setTimeout(function(){k.default(this,s);try{n.hide(),r({success:i})}catch(e){a(e)}}.bind(this),1e3*t),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}())}},{key:"show",value:function(){return this.promo_data.game?(this.adContainer.style.visibility="visible",this.promo.style.display="block",this._onPauseGame("Pause the game for the promo","success"),this._promoShowSuccess=!0):this._onAdError("Promo not found"),this._promoShowSuccess}},{key:"hide",value:function(){var e;(this.promo.remove(),this.adContainer.style.visibility="hidden",this._promoShowSuccess)&&("reward"===(null===(e=this._adRequest.params)||void 0===e?void 0:e.position)&&this._onRewardedWatchComplete());this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success")}},{key:"add",value:(r=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.fetch_promo();case 3:this.promo_data=e.sent,t=document.createElement("div"),this.promo=t,n=this.promo_data,this.promo.addEventListener("click",function(){var e=A.default(x.default.mark((function e(t){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(n),a.track_click(n.click_tracking),window.open(n.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(r=document.createElement("iframe")).src=this.promo_data.renderer_url,r.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),r.classList.add("gd__promo__iframe"),this.promo.appendChild(r),this.adContainer.appendChild(this.promo),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.log(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return r.apply(this,arguments)})},{key:"addStyles",value:function(){var e="\n .gd__promo{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: transparent;\n z-index: 1;\n cursor: pointer;\n }\n .gd__promo__iframe{\n position: relative;\n z-index: -1;\n width:".concat(this.adContainerInner.style.width,";\n height:").concat(this.adContainerInner.style.height,";\n }\n "),t=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__promo__style",t,e)}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}},{key:"fetch_promo",value:(n=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,fetch("https://tag.atom.gamedistribution.com/v1/rainbow/pick?id=".concat(this._parentDomain,"&aid=").concat(this._gameData.gameId)).then(function(e){return k.default(this,n),e.json()}.bind(this));case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"track_click",value:(t=A.default(x.default.mark((function e(t){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}();function uD(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 cD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uD(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lD(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 hD(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 hD(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 hD(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 fD,pD,mD=function(){function e(t){var n=this;D.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._parentDomain=t._parentDomain,this._onResumeGame=t.onResumeGame.bind(t),this._onPauseGame=t.onPauseGame.bind(t),this._onRewardedWatchComplete=t.onRewardedWatchComplete.bind(t),this._onAdError=t.onAdError.bind(t),this._setAdRequestTimer=t._setAdRequestTimer.bind(t),this._giveGift=t._giveGift.bind(t),this._runAutoResume=t._runAutoResume.bind(t),this.send_atom_event=t.send_atom_event.bind(t),this.get_session_id=t.get_session_id.bind(t),this.get_ad_system_init_result=t.get_ad_system_init_result.bind(t),this.eventBus=new a.EventBus}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,D,R,O,P,I,C,L,U,M,j,B,G,N,q,F,V,H,z,W=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=t,s=this._getAdTypeByAfgPosition(t),t.params.position,o=this._getAdFlow(s),d=this._gameData,u=d.afg_disabled,c=null===(n=t.params)||void 0===n?void 0:n.isGift,null===(r=t.params)||void 0===r||r.position,l=null===(a=d.promo)||void 0===a?void 0:a.rainbow,h=(null==l?void 0:l.enabled)&&(null===(i=l.position)||void 0===i?void 0:i[s]),f=null==l?void 0:l.gift,p=h&&null!=l&&l.duration?null==l?void 0:l.duration:5,m=u?o.filter(function(e){return k.default(this,W),"adsense"!==e}.bind(this)):o,g=this.get_ad_system_init_result(),v=g.afg,b=g.ima,this.adsBlocked=!v||!b,this.adsBlocked?(rs("gd-adflow adsBlocked so changing the flow"),m=[]):(v||(m=m.filter(function(e){return k.default(this,W),"adsense"!==e}.bind(this))),b||(m=m.filter(function(e){return k.default(this,W),"ima"!==e}.bind(this)))),y=!1,_=!1,w=[],A=0,E=!1,S=lD(m),e.prev=26,S.s();case 28:if((D=S.n()).done){e.next=62;break}return R=D.value,t.params.adapter=R,O=A===m.length-1,P=c&&f||!c,I=O&&h&&P,t.params=cD(cD({},t.params),{},{adapterIndex:A,isLastAdapter:O,shouldFail:!1,extraPromoRunOnFail:I}),function(){k.default(this,W),is.firstSuccessOrder&&!isNaN(is.firstSuccessOrder)&&(t.params.shouldFail=A<is.firstSuccessOrder)}.bind(this),rs("gd-adflow, before adInvoke",A,R,t.params.shouldFail),e.next=39,this.adInvoke(t);case 39:if(C=e.sent,L=C.success,U=C.args,M=C.isSkipped,j=C.noVast,!L){e.next=51;break}return rs("gd-adflow, adapter-result-success",A,R,U),y=!0,_=!(null==U||!U.isPromoSuccess),e.abrupt("break",62);case 51:if(rs("gd-adflow, adapter-result-failure",A,R,U.message),A++,w.push(U.message),!M){e.next=56;break}return e.abrupt("break",62);case 56:if(!j){e.next=59;break}return this._runAutoResume(),e.abrupt("break",62);case 59:E=I;case 60:e.next=28;break;case 62:e.next=67;break;case 64:e.prev=64,e.t0=e.catch(26),S.e(e.t0);case 67:return e.prev=67,S.f(),e.finish(67);case 70:if(!E){e.next=76;break}return e.next=73,new dD(this).run({duration:p});case 73:e.sent.success&&(_=!0);case 76:return function(){var e;k.default(this,W),is.disableGift&&null!==(e=d.gft)&&void 0!==e&&e[s].enabled&&(d.gft[s].enabled=!1)}.bind(this),B=w.join(" /n"),y?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(s)):(this._onResumeGame(B,"warning"),this._giveGift(s)),G="-1",N="none",y?(G="index_".concat(A),N=m[A]):_&&(G="promo",N="promo"),q=this.get_session_id(),this.adsBlocked&&"-1"===G?(F="rewarded"===s?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[F]=this.blockedAdsMap[F]?this.blockedAdsMap[F]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(F)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:F,sessionId:q,successAdapter:"none",adFlowIndex:G})):(V={},T.default(V,"adflow.all.index",{message:"".concat(G)}),T.default(V,"adflow.all.success_adapter",{message:"".concat(N)}),T.default(V,"adflow.".concat(s,".index"),{message:"".concat(G)}),T.default(V,"adflow.".concat(s,".success_adapter"),{message:"".concat(N)}),H=V,Object.keys(H).forEach(function(e){k.default(this,W);var t=H[e];this._msgrt.send(e,t)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:G,successAdapter:N,adBlocker:!1,afgBlocked:!v,imaBlocked:!b,adType:s,sessionId:q})),z={adType:s},this.eventBus.broadcast("AD_FLOW_COMPLETE",z),e.abrupt("return",z);case 89:case"end":return e.stop()}}),e,this,[[26,64,67,70]])}))),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),as("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),is.customAdFlow)return JSON.parse(is.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}(),gD=function(){function e(){D.default(this,e),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},qv(this.moduleName,this.moduleConfig)}var t,n;return S.default(e,[{key:"load",value:(n=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,Vv(this.moduleName);case 3:this.module=e.sent,this.module,e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("aeria module load error",e.t0),this.module=null;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return n.apply(this,arguments)})},{key:"runYMenu",value:(t=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(n=t.gameId,this.module){e.next=4;break}return e.next=4,this.load();case 4:(new this.module.Aeria).renderYMenu({gameId:n});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),vD=function(){var e=this,t=function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),n=function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),r=function(){k.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){k.default(this,e);var r="html5.gamedistribution.com"!==R.default(window.location.href).host;return t()&&!(n()||r)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:t,isTokenGameURL:n,isExtHostedGameURL:r,whichFrame:a}},bD={isAeriaDomain:"minigame.aeriagames.jp"===(pD=(fD=new _w).get("partner.domain.value")||fD.get("top.domain.value"))||"minigame-stg.aeriagames.jp"===pD,isAeriaStagingDomain:"minigame-stg.aeriagames.jp"===pD},yD=bD.isAeriaStagingDomain;if(bD.isAeriaDomain){var _D=function(){var e,t="ae-soft-323";try{var n=(e=(new _w).get("partner.url.value"),new R.default(e,!0)),r=n.pathname,a=r.split("/"),i=a[a.length-1];rs("aeria-ylogin:loc",n,r,i),t=i}catch(e){as("Error on getting aeria game id",e)}return t}(),wD={action:"score",data:{gameId:_D,score:100},env:yD?"staging":"production",system:"Softgames"};(new a.EventBus).subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&function(){var e=window.parent||window,t=wD;e.postMessage(t,"*")}()}));var AD=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.next=2,(new gD).runYMenu({gameId:_D});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();"game-frame"===(0,vD().whichFrame)()&&AD()}var kD,ED=new m.EventEmitter,xD=["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(xD.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)kD=a,(window.parent||window).postMessage(n,"*"),ED.emit("aeria-event",n);else if(s){kD&&kD.postMessage(n,"*");var o=window.parent||window;o&&o.postMessage(n,"*")}}}),!1);var SD="https://html5.gamedistribution.com",DD="parent-data-request",TD="parent-data-response",RD=function(){function e(){D.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,a===SD&&s===DD){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:TD,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;r===SD&&i===TD&&(e(s),a=!0)})),setTimeout(function(){k.default(this,r),a||e()}.bind(this),1e3);var i={type:DD};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),OD=new RD,PD={SDKExistsOnUpperFrame:!1};function ID(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 CD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ID(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ID(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var LD=_.v4(),UD=null,MD=null,jD=function(){function e(t){var n=this;if(D.default(this,e),UD)return UD;UD=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 _w,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={preroll:0,midroll:0,rewarded: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,a,i=this;if((k.default(this,n),null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this._sendLoadedEvent(2),!0===(null===(r=this._gameData.lp)||void 0===r?void 0:r.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(a=this._gameData.evnts)&&void 0!==a&&a.enabled&&this._isLoaderGameURL()&&(aD(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){k.default(this,i),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),OD.init(this),this._send_gametag_data("sdk_init"),this._executeMidrollPlus()}.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 _w,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,YS();case 6:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"testConsent",value:function(){try{HS();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,zS({});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;XS.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(e){if((this._isLoaded||(this._isLoaded={}),!this._isLoaded[e])&&(this._isLoaded[e]=!0,"loader-frame"===this._whichFrame()&&(this._isHostHTML5Domain()||this._isExternalHoster())))try{this._whichFrame(),this._sendTunnlEvent(e),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"})}catch(e){}}},{key:"_sendGamedockGamePlay",value:function(){var e=this._isTokenGameURL();if(!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||!this._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:");rs("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=es.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._sendHLAnalyicsLog({query:n,eventType:e}),this.adInstance._send_atom_event("hl.config",n),this._send_gametag_data("sdk_gameplay")}},{key:"_sendHLAnalyicsLog",value:function(e){var t,n=this,r=e.query,a=e.eventType,i=this._gameData.dbglg;if(i&&i.enabled&&i.topics&&(1===a?t="hl.gameplay":2===a&&(t="hl.gameload"),t)){if(!i.topics.some(function(e){return k.default(this,n),e===t}.bind(this)))return;this.adInstance._send_atom_event(t,r)}}},{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:es.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:a.getMobilePlatform(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var t=[this._gameData.gmky.url];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;k.default(this,e),MD=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&MD.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),WS.track(MD,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=MD)||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,uA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus"],a.getScript(t[0],"locus",{alternates:t}).catch(function(e){k.default(this,n),this._sendSDKError(e)}.bind(this));case 8: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(){k.default(this,e);var t=this._getDeveloperDomains(),n=t.developerDomain,r=t.gameApiDomain;if(n){fetch("https://".concat(r,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}xS()}.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"),AS(),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&WS.track(MD,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,t=Kw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(es.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(h=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:t=!0,n=this._gameData,r=this._parentDomain.indexOf("gamedistribution.com")>=0,t=void 0===this._gameData.dmain||this._gameData.dmain,console.log("zxcv exclude, isAllowedDomain",r,t),t=t||r,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking();case 8:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new _w,a="html5.gamedistribution.com"!==R.default(document.referrer).host,i=n&&!PD.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&a;if(i&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,d=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===d?this._redirectToLoaderFrame():"to-blocked-page"===d&&this._redirectToBlocking(!0)}return{blocked:i}}},{key:"_redirectToBlocking",value:function(e){var t=this;this.msgrt.send("blocked");var n=this._gameData;setTimeout(A.default(x.default.mark((function r(){return x.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e){r.next=9;break}return r.prev=1,r.next=4,t.adInstance._send_atom_event("token-blocked");case 4:r.next=9;break;case 6:r.prev=6,r.t0=r.catch(1),console.log("Could not send dump.token-blocked",r.t0);case 9:window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(M.default.stringify({domain:t._parentDomain,id:n.gameId,img:t._get_game_thumbnail_url(),title:n.title}));case 10:case"end":return r.stop()}}),r,null,[[1,6]])}))),100)}},{key:"_redirectToLoaderFrame",value:function(){var e=this,t=this._gameData;setTimeout(A.default(x.default.mark((function n(){var r,a,i;return x.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.adInstance._send_atom_event("loader-redirect");case 3:n.next=8;break;case 5:n.prev=5,n.t0=n.catch(0),console.log("Could not send dump.loader-redirect",n.t0);case 8:r=R.default(location.href),a=r.query||"",i="https://html5.gamedistribution.com/".concat(t.gameId,"/").concat(a),window.location.href=i;case 12:case"end":return n.stop()}}),n,null,[[0,5]])}))),100)}},{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;IS().disableMidrolltimer?e.midroll=0:a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&(a.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;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 jS(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=es,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){a.dankLog(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward,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,aA();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(CD(CD({},this.options),{},{isConsentDomain:n,version:es.version}),t,this._parentDomain),e.next=6,lA();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),is.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&&(iD({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(CD(CD({},this.options),{},{isConsentDomain:n,version:es.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(CD(CD({},this.options),{},{isConsentDomain:n,version:es.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(1),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 mD(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(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(a=r.gft)||void 0===a||null===(i=a[e].durations[this._giftCount[e]])||void 0===i?void 0:i.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(d=this._gameData)||void 0===d||null===(u=d.gft)||void 0===u||null===(c=u[e].durations[this._giftCount[e]])||void 0===c?void 0:c.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(f=this._gameData)||void 0===f||null===(p=f.gft)||void 0===p||null===(m=p[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=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()||(iD({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()||(iD({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"onRewardedWatchComplete",value:function(){this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"})}},{key:"onAdError",value:function(e){this.eventBus.broadcast("AD_ERROR",{message:e,status:"error"})}},{key:"openConsole",value:function(){try{new a.ImplementationTest(this).start(),a.Ls.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(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:"_shouldAllowExternalUrl",value:function(e){var t,n=this,r=new R.default(e),a=r.host;return r.href,((null===(t=this._gameData.urlBlockExc)||void 0===t?void 0:t.hosts)||[]).some(function(e){return k.default(this,n),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;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");if(!this._shouldAllowExternalUrl(a)){var i=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(i)}),!1}.bind(this))}}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,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:"_isHostHTML5Domain",value:function(){var e=new R.default(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_checkTokenGameUrl",value:function(){var e=R.default(location.href),t=e.origin,n=e.pathname,r="".concat(t).concat(n);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(r)}},{key:"_isTokenGameURL",value:function(){var e=/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 R.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 R.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new R.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 GS(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 BS(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 R.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 R.default(e,!0);return n.query=CD(CD({},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)MD.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(e){var t=this;try{var n,r=null===(n=this._gameData)||void 0===n?void 0:n.gft[e],i=setInterval(A.default(x.default.mark((function n(){var r=this;return x.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t.adInstance.requestRunning||t.adFlowRunning?console.log("Advertisement already running..."):(t.showAd(a.AdType.Interstitial,{position:e,isGift:!0}).catch(function(e){k.default(this,r)}.bind(this)),clearInterval(i),t._giftCount[e]++);case 1:case"end":return n.stop()}}),n,this)}))),1e3*r.durations[this._giftCount[e]].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return LD}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_getDeveloperDomains",value:function(){var e,t;return"developer.gamedistribution.com"===this._parentDomain||"developer-acc.gamedistribution.com"===this._parentDomain?e=this._parentDomain:!0===new RegExp("^localhost").test(this._parentDomain)&&(e="localhost"),e&&(t={"developer-acc.gamedistribution.com":"game-api-acc-real-aws.gamedistribution.com","developer.gamedistribution.com":"game.api.gamedistribution.com",localhost:"game-api-acc-real-aws.gamedistribution.com"}[e]),{developerDomain:e,gameApiDomain:t}}},{key:"_setGameRewardedFlag",value:function(){try{var e=this._getDeveloperDomains(),t=e.developerDomain,n=e.gameApiDomain;if(t){fetch("https://".concat(n,"/game/v2/hasrewarded/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var r=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(r,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(r,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,t=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return 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=this;if(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&this.adInstance.adMidrollCount<=0){var n,r=this._gameData.midroll_plus.type||"midroll";if(null!==(n=this._gameData.midroll_plus)&&void 0!==n&&n.interval)var i=setInterval(function(){var e,n,s=this;(k.default(this,t),this.adFlowRunning)||(this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r}).catch(function(e){k.default(this,s)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(n=this._gameData.midroll_plus)||void 0===n?void 0:n.interval)&&clearInterval(i))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;k.default(this,t),this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r}).catch(function(t){k.default(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),e}();function BD(){return(BD=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,uA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus"],console.log("locus loading"),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){k.default(this,n),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var GD=new m.EventEmitter,ND=function(e){var t=this;!function(){BD.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&&(GD.off("sdk-event",i),t())}.bind(this);GD.on("sdk-event",i),p("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return k.default(this,t),n||(n=new jD(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),c=function(){return k.default(this,t),p("showBanner")}.bind(this),l=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{GD.emit("sdk-event",n),e.onEvent&&e.onEvent(n)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:c,showAd:i,preloadAd:s,showDisplayAd:o,cancelAd:d,openConsole:u,getSession:l,onEvent:v,init:g,_sendSDKReady:f,sendGenericEvent:h}},qD=function(e){var t=ND(e);return t.init(),t},FD="gd-sdk-frame-handshake-request",VD="gd-sdk-frame-handshake-response",HD=function(e){var t=this;return new Promise(function(e,n){var r=this;k.default(this,t);var a={type:FD},i=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,s=n.type;if(s===FD){var o={type:VD};a.postMessage(o,r)}else s===VD&&(i=!0,e({origin:r,source:a}))})),setTimeout(function(){k.default(this,r),i||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},zD=function(){var e=A.default(x.default.mark((function e(){var t,n,r,a,i,s,o;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dA();case 2:return t=e.sent,e.next=6,HD();case 6:if(n=e.sent,PD.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return r=vD(),a=r.isMasterGameURL,r.isTokenGameURL,i=a(),e.next=14,cA();case 14:return s=e.sent,o=!1,o=s?!i&&!!n:!i,e.abrupt("return",o);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),WD=$e,KD=re,$D=$i,QD=Fa,JD=KD(Ma.f),YD=KD([].push),XD=function(e){return function(t){for(var n,r=QD(t),a=$D(r),i=a.length,s=0,o=[];i>s;)n=a[s++],WD&&!JD(r,n)||YD(o,e?[n,r[n]]:r[n]);return o}},ZD={entries:XD(!0),values:XD(!1)}.values;zi({target:"Object",stat:!0},{values:function(e){return ZD(e)}});var eT,tT={},nT=function(e){try{if(e.skipForward)return;if(tT.source){var t={type:"gd-sdk-on-event",event:e};tT.source.postMessage(t,tT.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},rT=function(){nT({name:"SDK_READY",status:"success",message:"Everything is ready."}),nT({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),nT({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},aT=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(!tT.source&&"init"===s)return function(e){var t=e.source,n=e.origin;tT={source:t,origin:n}}({source:a,origin:r}),void rT();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&&is.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)},iT=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){nT(e),t.apply(this,arguments)}}(e);var t=new jD(e);return aT(t),t},sT=function(e){try{var t=Fw(e);e.gameId||t.send("nogameid",{message:"".concat(iy.parentURL)})}catch(e){}},oT={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,sT(t),rA(t),e.next=5,zD();case 5:return n=e.sent,r=n?qD(t):iT(t),hA(),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",iT(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}()};function dT(){return(dT=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,mA();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,lT(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 uT,cT=!1;function lT(e){var t=this;return new Promise(function(n,r){var a=this;if(k.default(this,t),eT)return n(eT);if(cT)var i=setInterval(function(){k.default(this,a),eT&&(cT=!1,clearInterval(i),n(eT))}.bind(this),100);else cT=!0,oT.create(e).then(function(e){k.default(this,a),eT=e,e._sendSDKReady(),cT=!1,n(eT)}.bind(this))}.bind(this))}function hT(e){return lT(e),{invoke:function(t){return function(e,t){return dT.apply(this,arguments)}(e,t)}}}function fT(e){var t=this;return new Promise(function(n,r){var i=this;k.default(this,t);var s=["https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js"];a.getScript(s[0],"gd-sdk-wrp",{alternates:s}).catch(function(e){k.default(this,i),this._sendSDKError(e),r(e)}.bind(this)).then(A.default(x.default.mark((function t(){var r,a;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=window.GDSDKWRP.GDSDKWRP,a=new r,t.next=4,a.init(e);case 4:uT=t.sent,n(uT);case 6:case"end":return t.stop()}}),t)}))))}.bind(this))}function pT(e){return mT.apply(this,arguments)}function mT(){return(mT=A.default(x.default.mark((function e(t){var n,r,a,i;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return rA(t),e.next=3,aA();case 3:if(a=e.sent,!uT){e.next=6;break}return e.abrupt("return",uT);case 6:if(null==a||null===(n=a.sdk_wrp)||void 0===n?void 0:n.enabled){e.next=9;break}return e.abrupt("return");case 9:return i=null==a||null===(r=a.sdk_wrp)||void 0===r?void 0:r.wrapper,e.next=12,fT(i);case 12:return uT=e.sent,e.abrupt("return",uT);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gT(){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}"img.samsunapps.com"===R.default(window.location.href).host||function(){wS();var e=hT(gT());function t(){var t=this;this.AdType=a.AdType,this.preloadAd=function(t){var n=this;return e.invoke(function(e){return k.default(this,n),e.preloadAd(t)}.bind(this))},this.showAd=function(){var t=A.default(x.default.mark((function t(n,r){var i=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.invoke(function(e){var t=this;if(k.default(this,i),n===a.AdType.Display)return e.showDisplayAd(r);var s={};return function(){k.default(this,t),is.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),s.adapter="adsense")}.bind(this),e.showAd(n,s)}.bind(this)));case 1:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),this.cancelAd=function(){var t=this;return e.invoke(function(e){return k.default(this,t),e.cancelAd()}.bind(this))},this.openConsole=function(){var t=this;return e.invoke(function(e){return k.default(this,t),e.openConsole()}.bind(this))},this.getSession=function(){var t=this;return e.invoke(function(e){return k.default(this,t),e.session()}.bind(this))},this.sendEvent=function(t){var n=this;return e.invoke(function(e){return k.default(this,n),e.sendGenericEvent(t)}.bind(this))},this.leaderboard={show:function(){k.default(this,t),zv.showLeaderboard()}.bind(this),addScore:function(e){k.default(this,t),zv.addScore(e)}.bind(this)}}t.prototype=new function(){this.showBanner=function(){var t=this;return e.invoke(function(e){return k.default(this,t),e.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new t,window.gdApi=window.gdsdk}(),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 t=gT(),e.next=3,pT(t);case 3:(n=e.sent)&&(console.log("sdk-init: proceeding with gd-sdk wrapper initialize!..."),window.gdsdk=n,window.gdApi=window.gdsdk);case 5:case"end":return e.stop()}}),e)})))();
|
|
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),D=w(s),T=w(o),R=w(d),O=w(c),P=w(l),I=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="__core-js_shared__",K=N[W]||z(W,{}),$=K;(q.exports=function(e,t){return $[e]||($[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Q,J,Y=function(e){try{return!!e()}catch(e){return!0}},X=!Y((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Z=X,ee=Function.prototype,te=ee.call,ne=Z&&ee.bind.bind(te,te),re=Z?ne:function(e){return function(){return te.apply(e,arguments)}},ae=function(e){return null==e},ie=ae,se=TypeError,oe=function(e){if(ie(e))throw se("Can't call method on "+e);return e},de=oe,ue=Object,ce=function(e){return ue(de(e))},le=ce,he=re({}.hasOwnProperty),fe=Object.hasOwn||function(e,t){return he(le(e),t)},pe=re,me=0,ge=Math.random(),ve=pe(1..toString),be=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ve(++me+ge,36)},ye="undefined"!=typeof navigator&&String(navigator.userAgent)||"",_e=N,we=ye,Ae=_e.process,ke=_e.Deno,Ee=Ae&&Ae.versions||ke&&ke.version,xe=Ee&&Ee.v8;xe&&(J=(Q=xe.split("."))[0]>0&&Q[0]<4?1:+(Q[0]+Q[1])),!J&&we&&(!(Q=we.match(/Edge\/(\d+)/))||Q[1]>=74)&&(Q=we.match(/Chrome\/(\d+)/))&&(J=+Q[1]);var Se=J,De=Se,Te=Y,Re=!!Object.getOwnPropertySymbols&&!Te((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&De&&De<41})),Oe=Re&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Pe=N,Ie=q.exports,Ce=fe,Le=be,Ue=Re,Me=Oe,je=Pe.Symbol,Be=Ie("wks"),Ge=Me?je.for||je:je&&je.withoutSetter||Le,Ne=function(e){return Ce(Be,e)||(Be[e]=Ue&&Ce(je,e)?je[e]:Ge("Symbol."+e)),Be[e]},qe={};qe[Ne("toStringTag")]="z";var Fe="[object z]"===String(qe),Ve="object"==typeof document&&document.all,He={all:Ve,IS_HTMLDDA:void 0===Ve&&void 0!==Ve},ze=He.all,We=He.IS_HTMLDDA?function(e){return"function"==typeof e||e===ze}:function(e){return"function"==typeof e},Ke={},$e=!Y((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Qe=We,Je=He.all,Ye=He.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Qe(e)||e===Je}:function(e){return"object"==typeof e?null!==e:Qe(e)},Xe=Ye,Ze=N.document,et=Xe(Ze)&&Xe(Ze.createElement),tt=function(e){return et?Ze.createElement(e):{}},nt=tt,rt=!$e&&!Y((function(){return 7!=Object.defineProperty(nt("div"),"a",{get:function(){return 7}}).a})),at=$e&&Y((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),it=Ye,st=String,ot=TypeError,dt=function(e){if(it(e))return e;throw ot(st(e)+" is not an object")},ut=X,ct=Function.prototype.call,lt=ut?ct.bind(ct):function(){return ct.apply(ct,arguments)},ht=N,ft=We,pt=function(e,t){return arguments.length<2?(n=ht[e],ft(n)?n:void 0):ht[e]&&ht[e][t];var n},mt=re({}.isPrototypeOf),gt=pt,vt=We,bt=mt,yt=Object,_t=Oe?function(e){return"symbol"==typeof e}:function(e){var t=gt("Symbol");return vt(t)&&bt(t.prototype,yt(e))},wt=String,At=function(e){try{return wt(e)}catch(e){return"Object"}},kt=We,Et=At,xt=TypeError,St=function(e){if(kt(e))return e;throw xt(Et(e)+" is not a function")},Dt=St,Tt=ae,Rt=function(e,t){var n=e[t];return Tt(n)?void 0:Dt(n)},Ot=lt,Pt=We,It=Ye,Ct=TypeError,Lt=lt,Ut=Ye,Mt=_t,jt=Rt,Bt=function(e,t){var n,r;if("string"===t&&Pt(n=e.toString)&&!It(r=Ot(n,e)))return r;if(Pt(n=e.valueOf)&&!It(r=Ot(n,e)))return r;if("string"!==t&&Pt(n=e.toString)&&!It(r=Ot(n,e)))return r;throw Ct("Can't convert object to primitive value")},Gt=TypeError,Nt=Ne("toPrimitive"),qt=function(e,t){if(!Ut(e)||Mt(e))return e;var n,r=jt(e,Nt);if(r){if(void 0===t&&(t="default"),n=Lt(r,e,t),!Ut(n)||Mt(n))return n;throw Gt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Bt(e,t)},Ft=_t,Vt=function(e){var t=qt(e,"string");return Ft(t)?t:t+""},Ht=$e,zt=rt,Wt=at,Kt=dt,$t=Vt,Qt=TypeError,Jt=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Xt="enumerable",Zt="configurable",en="writable";Ke.f=Ht?Wt?function(e,t,n){if(Kt(e),t=$t(t),Kt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&en in n&&!n[en]){var r=Yt(e,t);r&&r[en]&&(e[t]=n.value,n={configurable:Zt in n?n[Zt]:r[Zt],enumerable:Xt in n?n[Xt]:r[Xt],writable:!1})}return Jt(e,t,n)}:Jt:function(e,t,n){if(Kt(e),t=$t(t),Kt(n),zt)try{return Jt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Qt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var tn={exports:{}},nn=$e,rn=fe,an=Function.prototype,sn=nn&&Object.getOwnPropertyDescriptor,on=rn(an,"name"),dn={EXISTS:on,PROPER:on&&"something"===function(){}.name,CONFIGURABLE:on&&(!nn||nn&&sn(an,"name").configurable)},un=We,cn=K,ln=re(Function.toString);un(cn.inspectSource)||(cn.inspectSource=function(e){return ln(e)});var hn,fn,pn,mn=cn.inspectSource,gn=We,vn=N.WeakMap,bn=gn(vn)&&/native code/.test(String(vn)),yn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_n=Ke,wn=yn,An=$e?function(e,t,n){return _n.f(e,t,wn(1,n))}:function(e,t,n){return e[t]=n,e},kn=q.exports,En=be,xn=kn("keys"),Sn=function(e){return xn[e]||(xn[e]=En(e))},Dn={},Tn=bn,Rn=N,On=Ye,Pn=An,In=fe,Cn=K,Ln=Sn,Un=Dn,Mn="Object already initialized",jn=Rn.TypeError,Bn=Rn.WeakMap;if(Tn||Cn.state){var Gn=Cn.state||(Cn.state=new Bn);Gn.get=Gn.get,Gn.has=Gn.has,Gn.set=Gn.set,hn=function(e,t){if(Gn.has(e))throw jn(Mn);return t.facade=e,Gn.set(e,t),t},fn=function(e){return Gn.get(e)||{}},pn=function(e){return Gn.has(e)}}else{var Nn=Ln("state");Un[Nn]=!0,hn=function(e,t){if(In(e,Nn))throw jn(Mn);return t.facade=e,Pn(e,Nn,t),t},fn=function(e){return In(e,Nn)?e[Nn]:{}},pn=function(e){return In(e,Nn)}}var qn={set:hn,get:fn,has:pn,enforce:function(e){return pn(e)?fn(e):hn(e,{})},getterFor:function(e){return function(t){var n;if(!On(t)||(n=fn(t)).type!==e)throw jn("Incompatible receiver, "+e+" required");return n}}},Fn=re,Vn=Y,Hn=We,zn=fe,Wn=$e,Kn=dn.CONFIGURABLE,$n=mn,Qn=qn.enforce,Jn=qn.get,Yn=String,Xn=Object.defineProperty,Zn=Fn("".slice),er=Fn("".replace),tr=Fn([].join),nr=Wn&&!Vn((function(){return 8!==Xn((function(){}),"length",{value:8}).length})),rr=String(String).split("String"),ar=tn.exports=function(e,t,n){"Symbol("===Zn(Yn(t),0,7)&&(t="["+er(Yn(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!zn(e,"name")||Kn&&e.name!==t)&&(Wn?Xn(e,"name",{value:t,configurable:!0}):e.name=t),nr&&n&&zn(n,"arity")&&e.length!==n.arity&&Xn(e,"length",{value:n.arity});try{n&&zn(n,"constructor")&&n.constructor?Wn&&Xn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Qn(e);return zn(r,"source")||(r.source=tr(rr,"string"==typeof t?t:"")),e};Function.prototype.toString=ar((function(){return Hn(this)&&Jn(this).source||$n(this)}),"toString");var ir=We,sr=Ke,or=tn.exports,dr=H,ur=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;if(ir(n)&&or(n,i,r),r.global)a?e[t]=n:dr(t,n);else{try{r.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=n:sr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},cr=re,lr=cr({}.toString),hr=cr("".slice),fr=function(e){return hr(lr(e),8,-1)},pr=Fe,mr=We,gr=fr,vr=Ne("toStringTag"),br=Object,yr="Arguments"==gr(function(){return arguments}()),_r=pr?gr: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=br(e),vr))?n:yr?gr(t):"Object"==(r=gr(t))&&mr(t.callee)?"Arguments":r},wr=_r,Ar=Fe?{}.toString:function(){return"[object "+wr(this)+"]"};Fe||ur(Object.prototype,"toString",Ar,{unsafe:!0});var kr={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},Er=tt("span").classList,xr=Er&&Er.constructor&&Er.constructor.prototype,Sr=xr===Object.prototype?void 0:xr,Dr=fr,Tr=re,Rr=function(e){if("Function"===Dr(e))return Tr(e)},Or=St,Pr=X,Ir=Rr(Rr.bind),Cr=function(e,t){return Or(e),void 0===t?e:Pr?Ir(e,t):function(){return e.apply(t,arguments)}},Lr=Y,Ur=fr,Mr=Object,jr=re("".split),Br=Lr((function(){return!Mr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Ur(e)?jr(e,""):Mr(e)}:Mr,Gr=Math.ceil,Nr=Math.floor,qr=Math.trunc||function(e){var t=+e;return(t>0?Nr:Gr)(t)},Fr=function(e){var t=+e;return t!=t||0===t?0:qr(t)},Vr=Fr,Hr=Math.min,zr=function(e){return e>0?Hr(Vr(e),9007199254740991):0},Wr=zr,Kr=function(e){return Wr(e.length)},$r=fr,Qr=Array.isArray||function(e){return"Array"==$r(e)},Jr=re,Yr=Y,Xr=We,Zr=_r,ea=mn,ta=function(){},na=[],ra=pt("Reflect","construct"),aa=/^\s*(?:class|function)\b/,ia=Jr(aa.exec),sa=!aa.exec(ta),oa=function(e){if(!Xr(e))return!1;try{return ra(ta,na,e),!0}catch(e){return!1}},da=function(e){if(!Xr(e))return!1;switch(Zr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return sa||!!ia(aa,ea(e))}catch(e){return!0}};da.sham=!0;var ua=!ra||Yr((function(){var e;return oa(oa.call)||!oa(Object)||!oa((function(){e=!0}))||e}))?da:oa,ca=Qr,la=ua,ha=Ye,fa=Ne("species"),pa=Array,ma=function(e){var t;return ca(e)&&(t=e.constructor,(la(t)&&(t===pa||ca(t.prototype))||ha(t)&&null===(t=t[fa]))&&(t=void 0)),void 0===t?pa:t},ga=function(e,t){return new(ma(e))(0===t?0:t)},va=Cr,ba=Br,ya=ce,_a=Kr,wa=ga,Aa=re([].push),ka=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=ya(d),m=ba(p),g=va(u,c),v=_a(m),b=0,y=l||wa,_=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:Aa(_,h)}else switch(e){case 4:return!1;case 7:Aa(_,h)}return i?-1:r||a?a:_}},Ea={forEach:ka(0),map:ka(1),filter:ka(2),some:ka(3),every:ka(4),find:ka(5),findIndex:ka(6),filterReject:ka(7)},xa=Y,Sa=function(e,t){var n=[][e];return!!n&&xa((function(){n.call(null,t||function(){return 1},1)}))},Da=Ea.forEach,Ta=N,Ra=kr,Oa=Sr,Pa=Sa("forEach")?[].forEach:function(e){return Da(this,e,arguments.length>1?arguments[1]:void 0)},Ia=An,Ca=function(e){if(e&&e.forEach!==Pa)try{Ia(e,"forEach",Pa)}catch(t){e.forEach=Pa}};for(var La in Ra)Ra[La]&&Ca(Ta[La]&&Ta[La].prototype);Ca(Oa);var Ua={},Ma={},ja={}.propertyIsEnumerable,Ba=Object.getOwnPropertyDescriptor,Ga=Ba&&!ja.call({1:2},1);Ma.f=Ga?function(e){var t=Ba(this,e);return!!t&&t.enumerable}:ja;var Na=Br,qa=oe,Fa=function(e){return Na(qa(e))},Va=$e,Ha=lt,za=Ma,Wa=yn,Ka=Fa,$a=Vt,Qa=fe,Ja=rt,Ya=Object.getOwnPropertyDescriptor;Ua.f=Va?Ya:function(e,t){if(e=Ka(e),t=$a(t),Ja)try{return Ya(e,t)}catch(e){}if(Qa(e,t))return Wa(!Ha(za.f,e,t),e[t])};var Xa={},Za=Fr,ei=Math.max,ti=Math.min,ni=function(e,t){var n=Za(e);return n<0?ei(n+t,0):ti(n,t)},ri=Fa,ai=ni,ii=Kr,si=function(e){return function(t,n,r){var a,i=ri(t),s=ii(i),o=ai(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}},oi={includes:si(!0),indexOf:si(!1)},di=fe,ui=Fa,ci=oi.indexOf,li=Dn,hi=re([].push),fi=function(e,t){var n,r=ui(e),a=0,i=[];for(n in r)!di(li,n)&&di(r,n)&&hi(i,n);for(;t.length>a;)di(r,n=t[a++])&&(~ci(i,n)||hi(i,n));return i},pi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mi=fi,gi=pi.concat("length","prototype");Xa.f=Object.getOwnPropertyNames||function(e){return mi(e,gi)};var vi={};vi.f=Object.getOwnPropertySymbols;var bi=pt,yi=Xa,_i=vi,wi=dt,Ai=re([].concat),ki=bi("Reflect","ownKeys")||function(e){var t=yi.f(wi(e)),n=_i.f;return n?Ai(t,n(e)):t},Ei=fe,xi=ki,Si=Ua,Di=Ke,Ti=function(e,t,n){for(var r=xi(t),a=Di.f,i=Si.f,s=0;s<r.length;s++){var o=r[s];Ei(e,o)||n&&Ei(n,o)||a(e,o,i(t,o))}},Ri=Y,Oi=We,Pi=/#|\.prototype\./,Ii=function(e,t){var n=Li[Ci(e)];return n==Mi||n!=Ui&&(Oi(t)?Ri(t):!!t)},Ci=Ii.normalize=function(e){return String(e).replace(Pi,".").toLowerCase()},Li=Ii.data={},Ui=Ii.NATIVE="N",Mi=Ii.POLYFILL="P",ji=Ii,Bi=N,Gi=Ua.f,Ni=An,qi=ur,Fi=H,Vi=Ti,Hi=ji,zi=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?Bi:u?Bi[o]||Fi(o,{}):(Bi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(s=Gi(n,r))&&s.value:n[r],!Hi(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Vi(i,a)}(e.sham||a&&a.sham)&&Ni(i,"sham",!0),qi(n,r,i,e)}},Wi=fi,Ki=pi,$i=Object.keys||function(e){return Wi(e,Ki)},Qi=ce,Ji=$i;zi({target:"Object",stat:!0,forced:Y((function(){Ji(1)}))},{keys:function(e){return Ji(Qi(e))}});var Yi=Array.isArray,Xi=Object.prototype.toString,Zi=Yi||function(e){return!!e&&"[object Array]"==Xi.call(e)},es={name:"@bygd/gd-sdk-pes",version:"1.35.14",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"}},ts=function(e){var t=ns("object"===E.default(e)?e:a.parseJSON(e));return t&&t.version?es.version>=t.version?t:void 0:t},ns=function(e){var t=this;if(!Zi(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}},rs=function(){var e;(e=console).log.apply(e,arguments)},as=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 is={},ss=_r,os=String,ds=function(e){if("Symbol"===ss(e))throw TypeError("Cannot convert a Symbol value to a string");return os(e)},us={},cs=$e,ls=at,hs=Ke,fs=dt,ps=Fa,ms=$i;us.f=cs&&!ls?Object.defineProperties:function(e,t){fs(e);for(var n,r=ps(t),a=ms(t),i=a.length,s=0;i>s;)hs.f(e,n=a[s++],r[n]);return e};var gs,vs=pt("document","documentElement"),bs=dt,ys=us,_s=pi,ws=Dn,As=vs,ks=tt,Es="prototype",xs="script",Ss=Sn("IE_PROTO"),Ds=function(){},Ts=function(e){return"<"+xs+">"+e+"</"+xs+">"},Rs=function(e){e.write(Ts("")),e.close();var t=e.parentWindow.Object;return e=null,t},Os=function(){try{gs=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Os="undefined"!=typeof document?document.domain&&gs?Rs(gs):(t=ks("iframe"),n="java"+xs+":",t.style.display="none",As.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ts("document.F=Object")),e.close(),e.F):Rs(gs);for(var r=_s.length;r--;)delete Os[Es][_s[r]];return Os()};ws[Ss]=!0;var Ps=Object.create||function(e,t){var n;return null!==e?(Ds[Es]=bs(e),n=new Ds,Ds[Es]=null,n[Ss]=e):n=Os(),void 0===t?n:ys.f(n,t)},Is={},Cs=Vt,Ls=Ke,Us=yn,Ms=function(e,t,n){var r=Cs(t);r in e?Ls.f(e,r,Us(0,n)):e[r]=n},js=ni,Bs=Kr,Gs=Ms,Ns=Array,Fs=Math.max,Vs=function(e,t,n){for(var r=Bs(e),a=js(t,r),i=js(void 0===n?r:n,r),s=Ns(Fs(i-a,0)),o=0;a<i;a++,o++)Gs(s,o,e[a]);return s.length=o,s},Hs=fr,zs=Fa,Ws=Xa.f,Ks=Vs,$s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Is.f=function(e){return $s&&"Window"==Hs(e)?function(e){try{return Ws(e)}catch(e){return Ks($s)}}(e):Ws(zs(e))};var Qs=tn.exports,Js=Ke,Ys=function(e,t,n){return n.get&&Qs(n.get,t,{getter:!0}),n.set&&Qs(n.set,t,{setter:!0}),Js.f(e,t,n)},Xs={},Zs=Ne;Xs.f=Zs;var eo=N,to=fe,no=Xs,ro=Ke.f,ao=function(e){var t=eo.Symbol||(eo.Symbol={});to(t,e)||ro(t,e,{value:no.f(e)})},io=lt,so=pt,oo=Ne,uo=ur,co=Ke.f,lo=fe,ho=Ne("toStringTag"),fo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!lo(e,ho)&&co(e,ho,{configurable:!0,value:t})},po=zi,mo=N,go=lt,vo=re,bo=$e,yo=Re,_o=Y,wo=fe,Ao=mt,ko=dt,Eo=Fa,xo=Vt,So=ds,Do=yn,To=Ps,Ro=$i,Oo=Xa,Po=Is,Io=vi,Co=Ua,Lo=Ke,Uo=us,Mo=Ma,jo=ur,Bo=Ys,Go=q.exports,No=Dn,qo=be,Fo=Ne,Vo=Xs,Ho=ao,zo=function(){var e=so("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=oo("toPrimitive");t&&!t[r]&&uo(t,r,(function(e){return io(n,this)}),{arity:1})},Wo=fo,Ko=qn,$o=Ea.forEach,Qo=Sn("hidden"),Jo="Symbol",Yo="prototype",Xo=Ko.set,Zo=Ko.getterFor(Jo),ed=Object[Yo],td=mo.Symbol,nd=td&&td[Yo],rd=mo.TypeError,ad=mo.QObject,id=Co.f,sd=Lo.f,od=Po.f,dd=Mo.f,ud=vo([].push),cd=Go("symbols"),ld=Go("op-symbols"),hd=Go("wks"),fd=!ad||!ad[Yo]||!ad[Yo].findChild,pd=bo&&_o((function(){return 7!=To(sd({},"a",{get:function(){return sd(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=id(ed,t);r&&delete ed[t],sd(e,t,n),r&&e!==ed&&sd(ed,t,r)}:sd,md=function(e,t){var n=cd[e]=To(nd);return Xo(n,{type:Jo,tag:e,description:t}),bo||(n.description=t),n},gd=function(e,t,n){e===ed&&gd(ld,t,n),ko(e);var r=xo(t);return ko(n),wo(cd,r)?(n.enumerable?(wo(e,Qo)&&e[Qo][r]&&(e[Qo][r]=!1),n=To(n,{enumerable:Do(0,!1)})):(wo(e,Qo)||sd(e,Qo,Do(1,{})),e[Qo][r]=!0),pd(e,r,n)):sd(e,r,n)},vd=function(e,t){ko(e);var n=Eo(t),r=Ro(n).concat(wd(n));return $o(r,(function(t){bo&&!go(bd,n,t)||gd(e,t,n[t])})),e},bd=function(e){var t=xo(e),n=go(dd,this,t);return!(this===ed&&wo(cd,t)&&!wo(ld,t))&&(!(n||!wo(this,t)||!wo(cd,t)||wo(this,Qo)&&this[Qo][t])||n)},yd=function(e,t){var n=Eo(e),r=xo(t);if(n!==ed||!wo(cd,r)||wo(ld,r)){var a=id(n,r);return!a||!wo(cd,r)||wo(n,Qo)&&n[Qo][r]||(a.enumerable=!0),a}},_d=function(e){var t=od(Eo(e)),n=[];return $o(t,(function(e){wo(cd,e)||wo(No,e)||ud(n,e)})),n},wd=function(e){var t=e===ed,n=od(t?ld:Eo(e)),r=[];return $o(n,(function(e){!wo(cd,e)||t&&!wo(ed,e)||ud(r,cd[e])})),r};yo||(jo(nd=(td=function(){if(Ao(nd,this))throw rd("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?So(arguments[0]):void 0,t=qo(e),n=function(e){this===ed&&go(n,ld,e),wo(this,Qo)&&wo(this[Qo],t)&&(this[Qo][t]=!1),pd(this,t,Do(1,e))};return bo&&fd&&pd(ed,t,{configurable:!0,set:n}),md(t,e)})[Yo],"toString",(function(){return Zo(this).tag})),jo(td,"withoutSetter",(function(e){return md(qo(e),e)})),Mo.f=bd,Lo.f=gd,Uo.f=vd,Co.f=yd,Oo.f=Po.f=_d,Io.f=wd,Vo.f=function(e){return md(Fo(e),e)},bo&&(Bo(nd,"description",{configurable:!0,get:function(){return Zo(this).description}}),jo(ed,"propertyIsEnumerable",bd,{unsafe:!0}))),po({global:!0,constructor:!0,wrap:!0,forced:!yo,sham:!yo},{Symbol:td}),$o(Ro(hd),(function(e){Ho(e)})),po({target:Jo,stat:!0,forced:!yo},{useSetter:function(){fd=!0},useSimple:function(){fd=!1}}),po({target:"Object",stat:!0,forced:!yo,sham:!bo},{create:function(e,t){return void 0===t?To(e):vd(To(e),t)},defineProperty:gd,defineProperties:vd,getOwnPropertyDescriptor:yd}),po({target:"Object",stat:!0,forced:!yo},{getOwnPropertyNames:_d}),zo(),Wo(td,Jo),No[Qo]=!0;var Ad=Re&&!!Symbol.for&&!!Symbol.keyFor,kd=zi,Ed=pt,xd=fe,Sd=ds,Dd=q.exports,Td=Ad,Rd=Dd("string-to-symbol-registry"),Od=Dd("symbol-to-string-registry");kd({target:"Symbol",stat:!0,forced:!Td},{for:function(e){var t=Sd(e);if(xd(Rd,t))return Rd[t];var n=Ed("Symbol")(t);return Rd[t]=n,Od[n]=t,n}});var Pd=zi,Id=fe,Cd=_t,Ld=At,Ud=Ad,Md=(0,q.exports)("symbol-to-string-registry");Pd({target:"Symbol",stat:!0,forced:!Ud},{keyFor:function(e){if(!Cd(e))throw TypeError(Ld(e)+" is not a symbol");if(Id(Md,e))return Md[e]}});var jd=X,Bd=Function.prototype,Gd=Bd.apply,Nd=Bd.call,qd="object"==typeof Reflect&&Reflect.apply||(jd?Nd.bind(Gd):function(){return Nd.apply(Gd,arguments)}),Fd=re([].slice),Vd=Qr,Hd=We,zd=fr,Wd=ds,Kd=re([].push),$d=zi,Qd=pt,Jd=qd,Yd=lt,Xd=re,Zd=Y,eu=We,tu=_t,nu=Fd,ru=function(e){if(Hd(e))return e;if(Vd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var a=e[r];"string"==typeof a?Kd(n,a):"number"!=typeof a&&"Number"!=zd(a)&&"String"!=zd(a)||Kd(n,Wd(a))}var i=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Vd(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}},au=Re,iu=String,su=Qd("JSON","stringify"),ou=Xd(/./.exec),du=Xd("".charAt),uu=Xd("".charCodeAt),cu=Xd("".replace),lu=Xd(1..toString),hu=/[\uD800-\uDFFF]/g,fu=/^[\uD800-\uDBFF]$/,pu=/^[\uDC00-\uDFFF]$/,mu=!au||Zd((function(){var e=Qd("Symbol")();return"[null]"!=su([e])||"{}"!=su({a:e})||"{}"!=su(Object(e))})),gu=Zd((function(){return'"\\udf06\\ud834"'!==su("\udf06\ud834")||'"\\udead"'!==su("\udead")})),vu=function(e,t){var n=nu(arguments),r=ru(t);if(eu(r)||void 0!==e&&!tu(e))return n[1]=function(e,t){if(eu(r)&&(t=Yd(r,this,iu(e),t)),!tu(t))return t},Jd(su,null,n)},bu=function(e,t,n){var r=du(n,t-1),a=du(n,t+1);return ou(fu,e)&&!ou(pu,a)||ou(pu,e)&&!ou(fu,r)?"\\u"+lu(uu(e,0),16):e};su&&$d({target:"JSON",stat:!0,arity:3,forced:mu||gu},{stringify:function(e,t,n){var r=nu(arguments),a=Jd(mu?vu:su,null,r);return gu&&"string"==typeof a?cu(a,hu,bu):a}});var yu=vi,_u=ce;zi({target:"Object",stat:!0,forced:!Re||Y((function(){yu.f(1)}))},{getOwnPropertySymbols:function(e){var t=yu.f;return t?t(_u(e)):[]}});var wu=Y,Au=Se,ku=Ne("species"),Eu=function(e){return Au>=51||!wu((function(){var t=[];return(t.constructor={})[ku]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},xu=Ea.filter;zi({target:"Array",proto:!0,forced:!Eu("filter")},{filter:function(e){return xu(this,e,arguments.length>1?arguments[1]:void 0)}});var Su=zi,Du=Y,Tu=Fa,Ru=Ua.f,Ou=$e;Su({target:"Object",stat:!0,forced:!Ou||Du((function(){Ru(1)})),sham:!Ou},{getOwnPropertyDescriptor:function(e,t){return Ru(Tu(e),t)}});var Pu=ki,Iu=Fa,Cu=Ua,Lu=Ms;zi({target:"Object",stat:!0,sham:!$e},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Iu(e),a=Cu.f,i=Pu(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&Lu(s,t,n);return s}});var Uu=zi,Mu=Qr,ju=ua,Bu=Ye,Gu=ni,Nu=Kr,qu=Fa,Fu=Ms,Vu=Ne,Hu=Fd,zu=Eu("slice"),Wu=Vu("species"),Ku=Array,$u=Math.max;Uu({target:"Array",proto:!0,forced:!zu},{slice:function(e,t){var n,r,a,i=qu(this),s=Nu(i),o=Gu(e,s),d=Gu(void 0===t?s:t,s);if(Mu(i)&&(n=i.constructor,(ju(n)&&(n===Ku||Mu(n.prototype))||Bu(n)&&null===(n=n[Wu]))&&(n=void 0),n===Ku||void 0===n))return Hu(i,o,d);for(r=new(void 0===n?Ku:n)($u(d-o,0)),a=0;o<d;o++,a++)o in i&&Fu(r,a,i[o]);return r.length=a,r}});var Qu=lt,Ju=dt,Yu=Rt,Xu=function(e,t,n){var r,a;Ju(e);try{if(!(r=Yu(e,"return"))){if("throw"===t)throw n;return n}r=Qu(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Ju(r),n},Zu=dt,ec=Xu,tc={},nc=tc,rc=Ne("iterator"),ac=Array.prototype,ic=function(e){return void 0!==e&&(nc.Array===e||ac[rc]===e)},sc=_r,oc=Rt,dc=ae,uc=tc,cc=Ne("iterator"),lc=function(e){if(!dc(e))return oc(e,cc)||oc(e,"@@iterator")||uc[sc(e)]},hc=lt,fc=St,pc=dt,mc=At,gc=lc,vc=TypeError,bc=function(e,t){var n=arguments.length<2?gc(e):t;if(fc(n))return pc(hc(n,e));throw vc(mc(e)+" is not iterable")},yc=Cr,_c=lt,wc=ce,Ac=function(e,t,n,r){try{return r?t(Zu(n)[0],n[1]):t(n)}catch(t){ec(e,"throw",t)}},kc=ic,Ec=ua,xc=Kr,Sc=Ms,Dc=bc,Tc=lc,Rc=Array,Oc=function(e){var t=wc(e),n=Ec(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=yc(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=Tc(t),f=0;if(!h||this===Rc&&kc(h))for(s=xc(t),o=n?new this(s):Rc(s);s>f;f++)l=i?a(t[f],f):t[f],Sc(o,f,l);else for(c=(u=Dc(t,h)).next,o=n?new this:[];!(d=_c(c,u)).done;f++)l=i?Ac(u,a,[d.value,f],!0):d.value,Sc(o,f,l);return o.length=f,o},Pc=Ne("iterator"),Ic=!1;try{var Cc=0,Lc={next:function(){return{done:!!Cc++}},return:function(){Ic=!0}};Lc[Pc]=function(){return this},Array.from(Lc,(function(){throw 2}))}catch(e){}var Uc=function(e,t){if(!t&&!Ic)return!1;var n=!1;try{var r={};r[Pc]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Mc=Oc;zi({target:"Array",stat:!0,forced:!Uc((function(e){Array.from(e)}))},{from:Mc});var jc,Bc,Gc,Nc=re,qc=Fr,Fc=ds,Vc=oe,Hc=Nc("".charAt),zc=Nc("".charCodeAt),Wc=Nc("".slice),Kc=function(e){return function(t,n){var r,a,i=Fc(Vc(t)),s=qc(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=zc(i,s))<55296||r>56319||s+1===o||(a=zc(i,s+1))<56320||a>57343?e?Hc(i,s):r:e?Wc(i,s,s+2):a-56320+(r-55296<<10)+65536}},$c={codeAt:Kc(!1),charAt:Kc(!0)},Qc=!Y((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Jc=fe,Yc=We,Xc=ce,Zc=Qc,el=Sn("IE_PROTO"),tl=Object,nl=tl.prototype,rl=Zc?tl.getPrototypeOf:function(e){var t=Xc(e);if(Jc(t,el))return t[el];var n=t.constructor;return Yc(n)&&t instanceof n?n.prototype:t instanceof tl?nl:null},al=Y,il=We,sl=Ye,ol=rl,dl=ur,ul=Ne("iterator"),cl=!1;[].keys&&("next"in(Gc=[].keys())?(Bc=ol(ol(Gc)))!==Object.prototype&&(jc=Bc):cl=!0);var ll=!sl(jc)||al((function(){var e={};return jc[ul].call(e)!==e}));ll&&(jc={}),il(jc[ul])||dl(jc,ul,(function(){return this}));var hl={IteratorPrototype:jc,BUGGY_SAFARI_ITERATORS:cl},fl=hl.IteratorPrototype,pl=Ps,ml=yn,gl=fo,vl=tc,bl=function(){return this},yl=function(e,t,n,r){var a=t+" Iterator";return e.prototype=pl(fl,{next:ml(+!r,n)}),gl(e,a,!1),vl[a]=bl,e},_l=re,wl=St,Al=We,kl=String,El=TypeError,xl=function(e,t,n){try{return _l(wl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Sl=dt,Dl=function(e){if("object"==typeof e||Al(e))return e;throw El("Can't set "+kl(e)+" as a prototype")},Tl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=xl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Sl(n),Dl(r),t?e(n,r):n.__proto__=r,n}}():void 0),Rl=zi,Ol=lt,Pl=We,Il=yl,Cl=rl,Ll=Tl,Ul=fo,Ml=An,jl=ur,Bl=tc,Gl=dn.PROPER,Nl=dn.CONFIGURABLE,ql=hl.IteratorPrototype,Fl=hl.BUGGY_SAFARI_ITERATORS,Vl=Ne("iterator"),Hl="keys",zl="values",Wl="entries",Kl=function(){return this},$l=function(e,t,n,r,a,i,s){Il(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!Fl&&e in f)return f[e];switch(e){case Hl:case zl:case Wl:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Vl]||f["@@iterator"]||a&&f[a],m=!Fl&&p||c(a),g="Array"==t&&f.entries||p;if(g&&(o=Cl(g.call(new e)))!==Object.prototype&&o.next&&(Cl(o)!==ql&&(Ll?Ll(o,ql):Pl(o[Vl])||jl(o,Vl,Kl)),Ul(o,l,!0)),Gl&&a==zl&&p&&p.name!==zl&&(Nl?Ml(f,"name",zl):(h=!0,m=function(){return Ol(p,this)})),a)if(d={values:c(zl),keys:i?m:c(Hl),entries:c(Wl)},s)for(u in d)(Fl||h||!(u in f))&&jl(f,u,d[u]);else Rl({target:t,proto:!0,forced:Fl||h},d);return f[Vl]!==m&&jl(f,Vl,m,{name:a}),Bl[t]=m,d},Ql=function(e,t){return{value:e,done:t}},Jl=$c.charAt,Yl=ds,Xl=qn,Zl=$l,eh=Ql,th="String Iterator",nh=Xl.set,rh=Xl.getterFor(th);Zl(String,"String",(function(e){nh(this,{type:th,string:Yl(e),index:0})}),(function(){var e,t=rh(this),n=t.string,r=t.index;return r>=n.length?eh(void 0,!0):(e=Jl(n,r),t.index+=e.length,eh(e,!1))}));var ah=dt,ih=function(){var e=ah(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},sh=Y,oh=N.RegExp,dh=sh((function(){var e=oh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),uh=dh||sh((function(){return!oh("a","y").sticky})),ch={BROKEN_CARET:dh||sh((function(){var e=oh("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:uh,UNSUPPORTED_Y:dh},lh=Y,hh=N.RegExp,fh=lh((function(){var e=hh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ph=Y,mh=N.RegExp,gh=ph((function(){var e=mh("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),vh=lt,bh=re,yh=ds,_h=ih,wh=ch,Ah=q.exports,kh=Ps,Eh=qn.get,xh=fh,Sh=gh,Dh=Ah("native-string-replace",String.prototype.replace),Th=RegExp.prototype.exec,Rh=Th,Oh=bh("".charAt),Ph=bh("".indexOf),Ih=bh("".replace),Ch=bh("".slice),Lh=function(){var e=/a/,t=/b*/g;return vh(Th,e,"a"),vh(Th,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Uh=wh.BROKEN_CARET,Mh=void 0!==/()??/.exec("")[1];(Lh||Mh||Uh||xh||Sh)&&(Rh=function(e){var t,n,r,a,i,s,o,d=this,u=Eh(d),c=yh(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=vh(Rh,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=Uh&&d.sticky,p=vh(_h,d),m=d.source,g=0,v=c;if(f&&(p=Ih(p,"y",""),-1===Ph(p,"g")&&(p+="g"),v=Ch(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==Oh(c,d.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",p)),Mh&&(n=new RegExp("^"+m+"$(?!\\s)",p)),Lh&&(r=d.lastIndex),a=vh(Th,f?n:d,v),f?a?(a.input=Ch(a.input,g),a[0]=Ch(a[0],g),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:Lh&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),Mh&&a&&a.length>1&&vh(Dh,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=kh(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var jh=Rh;zi({target:"RegExp",proto:!0,forced:/./.exec!==jh},{exec:jh});var Bh=zi,Gh=$e,Nh=re,qh=fe,Fh=We,Vh=mt,Hh=ds,zh=Ys,Wh=Ti,Kh=N.Symbol,$h=Kh&&Kh.prototype;if(Gh&&Fh(Kh)&&(!("description"in $h)||void 0!==Kh().description)){var Qh={},Jh=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Hh(arguments[0]),t=Vh($h,this)?new Kh(e):void 0===e?Kh():Kh(e);return""===e&&(Qh[t]=!0),t};Wh(Jh,Kh),Jh.prototype=$h,$h.constructor=Jh;var Yh="Symbol(test)"==String(Kh("test")),Xh=Nh($h.valueOf),Zh=Nh($h.toString),ef=/^Symbol\((.*)\)[^)]+$/,tf=Nh("".replace),nf=Nh("".slice);zh($h,"description",{configurable:!0,get:function(){var e=Xh(this);if(qh(Qh,e))return"";var t=Zh(e),n=Yh?nf(t,7,-1):tf(t,ef,"$1");return""===n?void 0:n}}),Bh({global:!0,constructor:!0,forced:!0},{Symbol:Jh})}ao("iterator");var rf=Ne,af=Ps,sf=Ke.f,of=rf("unscopables"),df=Array.prototype;null==df[of]&&sf(df,of,{configurable:!0,value:af(null)});var uf=function(e){df[of][e]=!0},cf=Fa,lf=uf,hf=tc,ff=qn,pf=Ke.f,mf=$l,gf=Ql,vf=$e,bf="Array Iterator",yf=ff.set,_f=ff.getterFor(bf),wf=mf(Array,"Array",(function(e,t){yf(this,{type:bf,target:cf(e),index:0,kind:t})}),(function(){var e=_f(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,gf(void 0,!0)):gf("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Af=hf.Arguments=hf.Array;if(lf("keys"),lf("values"),lf("entries"),vf&&"values"!==Af.name)try{pf(Af,"name",{value:"values"})}catch(e){}var kf=N,Ef=kr,xf=Sr,Sf=wf,Df=An,Tf=Ne,Rf=Tf("iterator"),Of=Tf("toStringTag"),Pf=Sf.values,If=function(e,t){if(e){if(e[Rf]!==Pf)try{Df(e,Rf,Pf)}catch(t){e[Rf]=Pf}if(e[Of]||Df(e,Of,t),Ef[t])for(var n in Sf)if(e[n]!==Sf[n])try{Df(e,n,Sf[n])}catch(t){e[n]=Sf[n]}}};for(var Cf in Ef)If(kf[Cf]&&kf[Cf].prototype,Cf);If(xf,"DOMTokenList");var Lf,Uf,Mf,jf,Bf="undefined"!=typeof process&&"process"==fr(process),Gf=pt,Nf=Ys,qf=$e,Ff=Ne("species"),Vf=function(e){var t=Gf(e);qf&&t&&!t[Ff]&&Nf(t,Ff,{configurable:!0,get:function(){return this}})},Hf=mt,zf=TypeError,Wf=function(e,t){if(Hf(t,e))return e;throw zf("Incorrect invocation")},Kf=ua,$f=At,Qf=TypeError,Jf=dt,Yf=function(e){if(Kf(e))return e;throw Qf($f(e)+" is not a constructor")},Xf=ae,Zf=Ne("species"),ep=function(e,t){var n,r=Jf(e).constructor;return void 0===r||Xf(n=Jf(r)[Zf])?t:Yf(n)},tp=TypeError,np=function(e,t){if(e<t)throw tp("Not enough arguments");return e},rp=/(?:ipad|iphone|ipod).*applewebkit/i.test(ye),ap=N,ip=qd,sp=Cr,op=We,dp=fe,up=Y,cp=vs,lp=Fd,hp=tt,fp=np,pp=rp,mp=Bf,gp=ap.setImmediate,vp=ap.clearImmediate,bp=ap.process,yp=ap.Dispatch,_p=ap.Function,wp=ap.MessageChannel,Ap=ap.String,kp=0,Ep={},xp="onreadystatechange";up((function(){Lf=ap.location}));var Sp=function(e){if(dp(Ep,e)){var t=Ep[e];delete Ep[e],t()}},Dp=function(e){return function(){Sp(e)}},Tp=function(e){Sp(e.data)},Rp=function(e){ap.postMessage(Ap(e),Lf.protocol+"//"+Lf.host)};gp&&vp||(gp=function(e){fp(arguments.length,1);var t=op(e)?e:_p(e),n=lp(arguments,1);return Ep[++kp]=function(){ip(t,void 0,n)},Uf(kp),kp},vp=function(e){delete Ep[e]},mp?Uf=function(e){bp.nextTick(Dp(e))}:yp&&yp.now?Uf=function(e){yp.now(Dp(e))}:wp&&!pp?(jf=(Mf=new wp).port2,Mf.port1.onmessage=Tp,Uf=sp(jf.postMessage,jf)):ap.addEventListener&&op(ap.postMessage)&&!ap.importScripts&&Lf&&"file:"!==Lf.protocol&&!up(Rp)?(Uf=Rp,ap.addEventListener("message",Tp,!1)):Uf=xp in hp("script")?function(e){cp.appendChild(hp("script"))[xp]=function(){cp.removeChild(this),Sp(e)}}:function(e){setTimeout(Dp(e),0)});var Op={set:gp,clear:vp},Pp=function(){this.head=null,this.tail=null};Pp.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Ip,Cp,Lp,Up,Mp,jp=Pp,Bp=/ipad|iphone|ipod/i.test(ye)&&"undefined"!=typeof Pebble,Gp=/web0s(?!.*chrome)/i.test(ye),Np=N,qp=Cr,Fp=Ua.f,Vp=Op.set,Hp=jp,zp=rp,Wp=Bp,Kp=Gp,$p=Bf,Qp=Np.MutationObserver||Np.WebKitMutationObserver,Jp=Np.document,Yp=Np.process,Xp=Np.Promise,Zp=Fp(Np,"queueMicrotask"),em=Zp&&Zp.value;if(!em){var tm=new Hp,nm=function(){var e,t;for($p&&(e=Yp.domain)&&e.exit();t=tm.get();)try{t()}catch(e){throw tm.head&&Ip(),e}e&&e.enter()};zp||$p||Kp||!Qp||!Jp?!Wp&&Xp&&Xp.resolve?((Up=Xp.resolve(void 0)).constructor=Xp,Mp=qp(Up.then,Up),Ip=function(){Mp(nm)}):$p?Ip=function(){Yp.nextTick(nm)}:(Vp=qp(Vp,Np),Ip=function(){Vp(nm)}):(Cp=!0,Lp=Jp.createTextNode(""),new Qp(nm).observe(Lp,{characterData:!0}),Ip=function(){Lp.data=Cp=!Cp}),em=function(e){tm.head||Ip(),tm.add(e)}}var rm=em,am=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},im=N.Promise,sm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,om=!sm&&!Bf&&"object"==typeof window&&"object"==typeof document,dm=N,um=im,cm=We,lm=ji,hm=mn,fm=Ne,pm=om,mm=sm,gm=Se;um&&um.prototype;var vm=fm("species"),bm=!1,ym=cm(dm.PromiseRejectionEvent),_m=lm("Promise",(function(){var e=hm(um),t=e!==String(um);if(!t&&66===gm)return!0;if(!gm||gm<51||!/native code/.test(e)){var n=new um((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[vm]=r,!(bm=n.then((function(){}))instanceof r))return!0}return!t&&(pm||mm)&&!ym})),wm={CONSTRUCTOR:_m,REJECTION_EVENT:ym,SUBCLASSING:bm},Am={},km=St,Em=TypeError,xm=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Em("Bad Promise constructor");t=e,n=r})),this.resolve=km(t),this.reject=km(n)};Am.f=function(e){return new xm(e)};var Sm,Dm,Tm,Rm=zi,Om=Bf,Pm=N,Im=lt,Cm=ur,Lm=Tl,Um=fo,Mm=Vf,jm=St,Bm=We,Gm=Ye,Nm=Wf,qm=ep,Fm=Op.set,Vm=rm,Hm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},zm=am,Wm=jp,Km=qn,$m=im,Qm=Am,Jm="Promise",Ym=wm.CONSTRUCTOR,Xm=wm.REJECTION_EVENT,Zm=wm.SUBCLASSING,eg=Km.getterFor(Jm),tg=Km.set,ng=$m&&$m.prototype,rg=$m,ag=ng,ig=Pm.TypeError,sg=Pm.document,og=Pm.process,dg=Qm.f,ug=dg,cg=!!(sg&&sg.createEvent&&Pm.dispatchEvent),lg="unhandledrejection",hg=function(e){var t;return!(!Gm(e)||!Bm(t=e.then))&&t},fg=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&&bg(t),t.rejection=1),!0===o?n=i:(c&&c.enter(),n=o(i),c&&(c.exit(),a=!0)),n===e.promise?u(ig("Promise-chain cycle")):(r=hg(n))?Im(r,n,d,u):d(n)):u(i)}catch(e){c&&!a&&c.exit(),u(e)}},pg=function(e,t){e.notified||(e.notified=!0,Vm((function(){for(var n,r=e.reactions;n=r.get();)fg(n,e);e.notified=!1,t&&!e.rejection&&gg(e)})))},mg=function(e,t,n){var r,a;cg?((r=sg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Pm.dispatchEvent(r)):r={promise:t,reason:n},!Xm&&(a=Pm["on"+e])?a(r):e===lg&&Hm("Unhandled promise rejection",n)},gg=function(e){Im(Fm,Pm,(function(){var t,n=e.facade,r=e.value;if(vg(e)&&(t=zm((function(){Om?og.emit("unhandledRejection",r,n):mg(lg,n,r)})),e.rejection=Om||vg(e)?2:1,t.error))throw t.value}))},vg=function(e){return 1!==e.rejection&&!e.parent},bg=function(e){Im(Fm,Pm,(function(){var t=e.facade;Om?og.emit("rejectionHandled",t):mg("rejectionhandled",t,e.value)}))},yg=function(e,t,n){return function(r){e(t,r,n)}},_g=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,pg(e,!0))},wg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw ig("Promise can't be resolved itself");var r=hg(t);r?Vm((function(){var n={done:!1};try{Im(r,t,yg(wg,n,e),yg(_g,n,e))}catch(t){_g(n,t,e)}})):(e.value=t,e.state=1,pg(e,!1))}catch(t){_g({done:!1},t,e)}}};if(Ym&&(ag=(rg=function(e){Nm(this,ag),jm(e),Im(Sm,this);var t=eg(this);try{e(yg(wg,t),yg(_g,t))}catch(e){_g(t,e)}}).prototype,(Sm=function(e){tg(this,{type:Jm,done:!1,notified:!1,parent:!1,reactions:new Wm,rejection:!1,state:0,value:void 0})}).prototype=Cm(ag,"then",(function(e,t){var n=eg(this),r=dg(qm(this,rg));return n.parent=!0,r.ok=!Bm(e)||e,r.fail=Bm(t)&&t,r.domain=Om?og.domain:void 0,0==n.state?n.reactions.add(r):Vm((function(){fg(r,n)})),r.promise})),Dm=function(){var e=new Sm,t=eg(e);this.promise=e,this.resolve=yg(wg,t),this.reject=yg(_g,t)},Qm.f=dg=function(e){return e===rg||undefined===e?new Dm(e):ug(e)},Bm($m)&&ng!==Object.prototype)){Tm=ng.then,Zm||Cm(ng,"then",(function(e,t){var n=this;return new rg((function(e,t){Im(Tm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete ng.constructor}catch(e){}Lm&&Lm(ng,ag)}Rm({global:!0,constructor:!0,wrap:!0,forced:Ym},{Promise:rg}),Um(rg,Jm,!1),Mm(Jm);var Ag=Cr,kg=lt,Eg=dt,xg=At,Sg=ic,Dg=Kr,Tg=mt,Rg=bc,Og=lc,Pg=Xu,Ig=TypeError,Cg=function(e,t){this.stopped=e,this.result=t},Lg=Cg.prototype,Ug=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=Ag(t,c),g=function(e){return r&&Pg(r,"normal",e),new Cg(!0,e)},v=function(e){return l?(Eg(e),p?m(e[0],e[1],g):m(e[0],e[1])):p?m(e,g):m(e)};if(h)r=e.iterator;else if(f)r=e;else{if(!(a=Og(e)))throw Ig(xg(e)+" is not iterable");if(Sg(a)){for(i=0,s=Dg(e);s>i;i++)if((o=v(e[i]))&&Tg(Lg,o))return o;return new Cg(!1)}r=Rg(e,a)}for(d=h?e.next:r.next;!(u=kg(d,r)).done;){try{o=v(u.value)}catch(e){Pg(r,"throw",e)}if("object"==typeof o&&o&&Tg(Lg,o))return o}return new Cg(!1)},Mg=im,jg=wm.CONSTRUCTOR||!Uc((function(e){Mg.all(e).then(void 0,(function(){}))})),Bg=lt,Gg=St,Ng=Am,qg=am,Fg=Ug;zi({target:"Promise",stat:!0,forced:jg},{all:function(e){var t=this,n=Ng.f(t),r=n.resolve,a=n.reject,i=qg((function(){var n=Gg(t.resolve),i=[],s=0,o=1;Fg(e,(function(e){var d=s++,u=!1;o++,Bg(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 Vg=zi,Hg=wm.CONSTRUCTOR,zg=im,Wg=pt,Kg=We,$g=ur,Qg=zg&&zg.prototype;if(Vg({target:"Promise",proto:!0,forced:Hg,real:!0},{catch:function(e){return this.then(void 0,e)}}),Kg(zg)){var Jg=Wg("Promise").prototype.catch;Qg.catch!==Jg&&$g(Qg,"catch",Jg,{unsafe:!0})}var Yg=lt,Xg=St,Zg=Am,ev=am,tv=Ug;zi({target:"Promise",stat:!0,forced:jg},{race:function(e){var t=this,n=Zg.f(t),r=n.reject,a=ev((function(){var a=Xg(t.resolve);tv(e,(function(e){Yg(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var nv=lt,rv=Am;zi({target:"Promise",stat:!0,forced:wm.CONSTRUCTOR},{reject:function(e){var t=rv.f(this);return nv(t.reject,void 0,e),t.promise}});var av=dt,iv=Ye,sv=Am,ov=function(e,t){if(av(e),iv(t)&&t.constructor===e)return t;var n=sv.f(e);return(0,n.resolve)(t),n.promise},dv=zi,uv=wm.CONSTRUCTOR,cv=ov;pt("Promise"),dv({target:"Promise",stat:!0,forced:uv},{resolve:function(e){return cv(this,e)}});var lv=TypeError,hv=zi,fv=Y,pv=Qr,mv=Ye,gv=ce,vv=Kr,bv=function(e){if(e>9007199254740991)throw lv("Maximum allowed index exceeded");return e},yv=Ms,_v=ga,wv=Eu,Av=Se,kv=Ne("isConcatSpreadable"),Ev=Av>=51||!fv((function(){var e=[];return e[kv]=!1,e.concat()[0]!==e})),xv=function(e){if(!mv(e))return!1;var t=e[kv];return void 0!==t?!!t:pv(e)};hv({target:"Array",proto:!0,arity:1,forced:!Ev||!wv("concat")},{concat:function(e){var t,n,r,a,i,s=gv(this),o=_v(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(xv(i=-1===t?s:arguments[t]))for(a=vv(i),bv(d+a),n=0;n<a;n++,d++)n in i&&yv(o,d,i[n]);else bv(d+1),yv(o,d++,i);return o.length=d,o}});var Sv=$e,Dv=dn.EXISTS,Tv=re,Rv=Ys,Ov=Function.prototype,Pv=Tv(Ov.toString),Iv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Cv=Tv(Iv.exec);function Lv(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 Uv(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 Uv(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 Uv(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 Mv(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 jv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mv(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Sv&&!Dv&&Rv(Ov,"name",{configurable:!0,get:function(){try{return Cv(Iv,Pv(this))[1]}catch(e){return""}}});var Bv,Gv={react:{src:"https://pm.azerioncircle.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.azerioncircle.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.azerioncircle.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.azerioncircle.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.azerioncircle.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Nv={},qv=function(e,t){Nv[e]=jv(jv({},t),{},{isLoading:!1})},Fv=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))},Vv=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=Nv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=Lv(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=Gv[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Fv({id:s,src:Gv[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,Fv({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=S.default((function e(){var t=this;D.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,Vv("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.azerioncircle.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},qv(this.moduleName,this.moduleConfig)})),zv=new Hv,Wv=Ye,Kv=fr,$v=Ne("match"),Qv=function(e){var t;return Wv(e)&&(void 0!==(t=e[$v])?!!t:"RegExp"==Kv(e))},Jv=Qv,Yv=TypeError,Xv=function(e){if(Jv(e))throw Yv("The method doesn't accept regular expressions");return e},Zv=Ne("match"),eb=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Zv]=!1,"/./"[e](t)}catch(e){}}return!1},tb=zi,nb=Rr,rb=Ua.f,ab=zr,ib=ds,sb=Xv,ob=oe,db=eb,ub=nb("".startsWith),cb=nb("".slice),lb=Math.min,hb=db("startsWith");tb({target:"String",proto:!0,forced:!!(hb||(Bv=rb(String.prototype,"startsWith"),!Bv||Bv.writable))&&!hb},{startsWith:function(e){var t=ib(ob(this));sb(e);var n=ab(lb(arguments.length>1?arguments[1]:void 0,t.length)),r=ib(e);return ub?ub(t,r,n):cb(t,n,n+r.length)===r}});var fb=lt,pb=fe,mb=mt,gb=ih,vb=RegExp.prototype,bb=function(e){var t=e.flags;return void 0!==t||"flags"in vb||pb(e,"flags")||!mb(vb,e)?t:fb(gb,e)},yb=dn.PROPER,_b=ur,wb=dt,Ab=ds,kb=Y,Eb=bb,xb="toString",Sb=RegExp.prototype[xb],Db=kb((function(){return"/a/b"!=Sb.call({source:"a",flags:"b"})})),Tb=yb&&Sb.name!=xb;(Db||Tb)&&_b(RegExp.prototype,xb,(function(){var e=wb(this);return"/"+Ab(e.source)+"/"+Ab(Eb(e))}),{unsafe:!0});var Rb=Rr,Ob=ur,Pb=jh,Ib=Y,Cb=Ne,Lb=An,Ub=Cb("species"),Mb=RegExp.prototype,jb=function(e,t,n,r){var a=Cb(e),i=!Ib((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!Ib((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ub]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=Rb(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=Rb(e),d=t.exec;return d===Pb||d===Mb.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Ob(String.prototype,e,d[0]),Ob(Mb,a,d[1])}r&&Lb(Mb[a],"sham",!0)},Bb=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Gb=lt,Nb=dt,qb=We,Fb=fr,Vb=jh,Hb=TypeError,zb=function(e,t){var n=e.exec;if(qb(n)){var r=Gb(n,e,t);return null!==r&&Nb(r),r}if("RegExp"===Fb(e))return Gb(Vb,e,t);throw Hb("RegExp#exec called on incompatible receiver")},Wb=lt,Kb=dt,$b=ae,Qb=oe,Jb=Bb,Yb=ds,Xb=Rt,Zb=zb;function ey(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 ty(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ey(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ey(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}jb("search",(function(e,t,n){return[function(t){var n=Qb(this),r=$b(t)?void 0:Xb(t,e);return r?Wb(r,t,n):new RegExp(t)[e](Yb(n))},function(e){var r=Kb(this),a=Yb(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;Jb(s,0)||(r.lastIndex=0);var o=Zb(r,a);return Jb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var ny,ry,ay=function(){function e(){D.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 R.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 R.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new R.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 R.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 R.default(e,!0);return n.query=ty(ty({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),iy=function(){try{return(new ay).getBridgeContext()}catch(e){return{}}}(),sy={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(ny=!1,(ry=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===ry.xanthophyll&&(ny=!0),ny)},oy=$c.charAt,dy=re,uy=ce,cy=Math.floor,ly=dy("".charAt),hy=dy("".replace),fy=dy("".slice),py=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,my=/\$([$&'`]|\d{1,2})/g,gy=qd,vy=lt,by=re,yy=jb,_y=Y,wy=dt,Ay=We,ky=ae,Ey=Fr,xy=zr,Sy=ds,Dy=oe,Ty=function(e,t,n){return t+(n?oy(e,t).length:1)},Ry=Rt,Oy=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=my;return void 0!==a&&(a=uy(a),d=py),hy(i,d,(function(i,d){var u;switch(ly(d,0)){case"$":return"$";case"&":return e;case"`":return fy(t,0,n);case"'":return fy(t,s);case"<":u=a[fy(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=cy(c/10);return 0===l?i:l<=o?void 0===r[l-1]?ly(d,1):r[l-1]+ly(d,1):i}u=r[c-1]}return void 0===u?"":u}))},Py=zb,Iy=Ne("replace"),Cy=Math.max,Ly=Math.min,Uy=by([].concat),My=by([].push),jy=by("".indexOf),By=by("".slice),Gy="$0"==="a".replace(/./,"$0"),Ny=!!/./[Iy]&&""===/./[Iy]("a","$0");yy("replace",(function(e,t,n){var r=Ny?"$":"$0";return[function(e,n){var r=Dy(this),a=ky(e)?void 0:Ry(e,Iy);return a?vy(a,e,r,n):vy(t,Sy(r),e,n)},function(e,a){var i=wy(this),s=Sy(e);if("string"==typeof a&&-1===jy(a,r)&&-1===jy(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=Ay(a);d||(a=Sy(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=Py(i,s);if(null===h)break;if(My(l,h),!u)break;""===Sy(h[0])&&(i.lastIndex=Ty(s,xy(i.lastIndex),c))}for(var f,p="",m=0,g=0;g<l.length;g++){for(var v=Sy((h=l[g])[0]),b=Cy(Ly(Ey(h.index),s.length),0),y=[],_=1;_<h.length;_++)My(y,void 0===(f=h[_])?f:String(f));var w=h.groups;if(d){var A=Uy([v],y,b,s);void 0!==w&&My(A,w);var k=Sy(gy(a,void 0,A))}else k=Oy(v,s,b,y,w,a);b>=m&&(p+=By(s,m,b)+k,m=b+v.length)}return p+By(s,m)}]}),!!_y((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Gy||Ny);var qy=Y,Fy=$e,Vy=Ne("iterator"),Hy=!qy((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Fy||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Vy]||"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})),zy=ur,Wy=Vs,Ky=Math.floor,$y=function(e,t){var n=e.length,r=Ky(n/2);return n<8?Qy(e,t):Jy(e,$y(Wy(e,0,r),t),$y(Wy(e,r),t),t)},Qy=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},Jy=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},Yy=zi,Xy=N,Zy=lt,e_=re,t_=$e,n_=Hy,r_=ur,a_=Ys,i_=function(e,t,n){for(var r in t)zy(e,r,t[r],n);return e},s_=fo,o_=yl,d_=qn,u_=Wf,c_=We,l_=fe,h_=Cr,f_=_r,p_=dt,m_=Ye,g_=ds,v_=Ps,b_=yn,y_=bc,__=lc,w_=np,A_=$y,k_=Ne("iterator"),E_="URLSearchParams",x_=E_+"Iterator",S_=d_.set,D_=d_.getterFor(E_),T_=d_.getterFor(x_),R_=Object.getOwnPropertyDescriptor,O_=function(e){if(!t_)return Xy[e];var t=R_(Xy,e);return t&&t.value},P_=O_("fetch"),I_=O_("Request"),C_=O_("Headers"),L_=I_&&I_.prototype,U_=C_&&C_.prototype,M_=Xy.RegExp,j_=Xy.TypeError,B_=Xy.decodeURIComponent,G_=Xy.encodeURIComponent,N_=e_("".charAt),q_=e_([].join),F_=e_([].push),V_=e_("".replace),H_=e_([].shift),z_=e_([].splice),W_=e_("".split),K_=e_("".slice),$_=/\+/g,Q_=Array(4),J_=function(e){return Q_[e-1]||(Q_[e-1]=M_("((?:%[\\da-f]{2}){"+e+"})","gi"))},Y_=function(e){try{return B_(e)}catch(t){return e}},X_=function(e){var t=V_(e,$_," "),n=4;try{return B_(t)}catch(e){for(;n;)t=V_(t,J_(n--),Y_);return t}},Z_=/[!'()~]|%20/g,ew={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},tw=function(e){return ew[e]},nw=function(e){return V_(G_(e),Z_,tw)},rw=o_((function(e,t){S_(this,{type:x_,iterator:y_(D_(e).entries),kind:t})}),"Iterator",(function(){var e=T_(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),aw=function(e){this.entries=[],this.url=null,void 0!==e&&(m_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===N_(e,0)?K_(e,1):e:g_(e)))};aw.prototype={type:E_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,s,o,d=__(e);if(d)for(n=(t=y_(e,d)).next;!(r=Zy(n,t)).done;){if(i=(a=y_(p_(r.value))).next,(s=Zy(i,a)).done||(o=Zy(i,a)).done||!Zy(i,a).done)throw j_("Expected sequence with length 2");F_(this.entries,{key:g_(s.value),value:g_(o.value)})}else for(var u in e)l_(e,u)&&F_(this.entries,{key:u,value:g_(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=W_(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=W_(t,"="),F_(this.entries,{key:X_(H_(n)),value:X_(q_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],F_(n,nw(e.key)+"="+nw(e.value));return q_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var iw=function(){u_(this,sw);var e=S_(this,new aw(arguments.length>0?arguments[0]:void 0));t_||(this.length=e.entries.length)},sw=iw.prototype;if(i_(sw,{append:function(e,t){w_(arguments.length,2);var n=D_(this);F_(n.entries,{key:g_(e),value:g_(t)}),t_||this.length++,n.updateURL()},delete:function(e){w_(arguments.length,1);for(var t=D_(this),n=t.entries,r=g_(e),a=0;a<n.length;)n[a].key===r?z_(n,a,1):a++;t_||(this.length=n.length),t.updateURL()},get:function(e){w_(arguments.length,1);for(var t=D_(this).entries,n=g_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){w_(arguments.length,1);for(var t=D_(this).entries,n=g_(e),r=[],a=0;a<t.length;a++)t[a].key===n&&F_(r,t[a].value);return r},has:function(e){w_(arguments.length,1);for(var t=D_(this).entries,n=g_(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){w_(arguments.length,1);for(var n,r=D_(this),a=r.entries,i=!1,s=g_(e),o=g_(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?z_(a,d--,1):(i=!0,n.value=o));i||F_(a,{key:s,value:o}),t_||(this.length=a.length),r.updateURL()},sort:function(){var e=D_(this);A_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=D_(this).entries,r=h_(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 rw(this,"keys")},values:function(){return new rw(this,"values")},entries:function(){return new rw(this,"entries")}},{enumerable:!0}),r_(sw,k_,sw.entries,{name:"entries"}),r_(sw,"toString",(function(){return D_(this).serialize()}),{enumerable:!0}),t_&&a_(sw,"size",{get:function(){return D_(this).entries.length},configurable:!0,enumerable:!0}),s_(iw,E_),Yy({global:!0,constructor:!0,forced:!n_},{URLSearchParams:iw}),!n_&&c_(C_)){var ow=e_(U_.has),dw=e_(U_.set),uw=function(e){if(m_(e)){var t,n=e.body;if(f_(n)===E_)return t=e.headers?new C_(e.headers):new C_,ow(t,"content-type")||dw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),v_(e,{body:b_(0,g_(n)),headers:b_(0,t)})}return e};if(c_(P_)&&Yy({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return P_(e,arguments.length>1?uw(arguments[1]):{})}}),c_(I_)){var cw=function(e){return u_(this,L_),new I_(e,arguments.length>1?uw(arguments[1]):{})};L_.constructor=cw,cw.prototype=L_,Yy({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:cw})}}var lw={URLSearchParams:iw,getState:D_},hw=oi.includes,fw=uf;zi({target:"Array",proto:!0,forced:Y((function(){return!Array(1).includes()}))},{includes:function(e){return hw(this,e,arguments.length>1?arguments[1]:void 0)}}),fw("includes");var pw=zi,mw=Xv,gw=oe,vw=ds,bw=eb,yw=re("".indexOf);function _w(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 I.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 R.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(P.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?P.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))}}}pw({target:"String",proto:!0,forced:!bw("includes")},{includes:function(e){return!!~yw(vw(gw(this)),vw(mw(e)),arguments.length>1?arguments[1]:void 0)}});var ww="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==ww&&ww,Aw={searchParams:"URLSearchParams"in ww,iterable:"Symbol"in ww&&"iterator"in Symbol,blob:"FileReader"in ww&&"Blob"in ww&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in ww,arrayBuffer:"ArrayBuffer"in ww};if(Aw.arrayBuffer)var kw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Ew=ArrayBuffer.isView||function(e){return e&&kw.indexOf(Object.prototype.toString.call(e))>-1};function xw(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 Sw(e){return"string"!=typeof e&&(e=String(e)),e}function Dw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Aw.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Tw(e){this.map={},e instanceof Tw?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 Rw(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Ow(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Pw(e){var t=new FileReader,n=Ow(t);return t.readAsArrayBuffer(e),n}function Iw(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Cw(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Aw.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Aw.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Aw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Aw.arrayBuffer&&Aw.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Iw(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Aw.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Ew(e))?this._bodyArrayBuffer=Iw(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):Aw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Aw.blob&&(this.blob=function(){var e=Rw(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=Rw(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(Pw)}),this.text=function(){var e=Rw(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Ow(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)},Aw.formData&&(this.formData=function(){return this.text().then(Mw)}),this.json=function(){return this.text().then(JSON.parse)},this}Tw.prototype.append=function(e,t){e=xw(e),t=Sw(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Tw.prototype.delete=function(e){delete this.map[xw(e)]},Tw.prototype.get=function(e){return e=xw(e),this.has(e)?this.map[e]:null},Tw.prototype.has=function(e){return this.map.hasOwnProperty(xw(e))},Tw.prototype.set=function(e,t){this.map[xw(e)]=Sw(t)},Tw.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Tw.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Dw(e)},Tw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Dw(e)},Tw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Dw(e)},Aw.iterable&&(Tw.prototype[Symbol.iterator]=Tw.prototype.entries);var Lw=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Uw(e,t){if(!(this instanceof Uw))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 Uw){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Tw(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 Tw(t.headers)),this.method=function(e){var t=e.toUpperCase();return Lw.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 Mw(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 jw(e,t){if(!(this instanceof jw))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 Tw(t.headers),this.url=t.url||"",this._initBody(e)}Uw.prototype.clone=function(){return new Uw(this,{body:this._bodyInit})},Cw.call(Uw.prototype),Cw.call(jw.prototype),jw.prototype.clone=function(){return new jw(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Tw(this.headers),url:this.url})},jw.error=function(){var e=new jw(null,{status:0,statusText:""});return e.type="error",e};var Bw=[301,302,303,307,308];jw.redirect=function(e,t){if(-1===Bw.indexOf(t))throw new RangeError("Invalid status code");return new jw(null,{status:t,headers:{location:e}})};var Gw,Nw=ww.DOMException;try{new Nw}catch(e){Nw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Nw.prototype=Object.create(Error.prototype),Nw.prototype.constructor=Nw}function qw(e,t){return new Promise((function(n,r){var a=new Uw(e,t);if(a.signal&&a.signal.aborted)return r(new Nw("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 Tw,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 jw(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 Nw("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&ww.location.href?ww.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&&(Aw.blob?i.responseType="blob":Aw.arrayBuffer&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Tw?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,Sw(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)}))}qw.polyfill=!0,ww.fetch||(ww.fetch=qw,ww.Headers=Tw,ww.Request=Uw,ww.Response=jw);var Fw=function(e){var t=this;if(!Gw){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:iy.topDomain,domain:iy.parentDomain,referrer:iy.parentURL,depth:a.getIframeDepth(),version:es.version,byloader:iy.isTokenGameURL,isTokenGameURL:iy.isTokenGameURL,isMasterGameURL:iy.isMasterGameURL,isExtHostedGameURL:iy.isExtHostedGameURL,byloaderVersion:iy.version,tracking:sy.userDeclinedTracking,whitelabel:sy.whitelabelPartner,platform:a.getMobilePlatform()};Gw=new a.MessageRouter(n)}return Gw||{send:function(){k.default(this,t)}.bind(this)}},Vw={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){}}},Hw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},zw={gameAPI:"game.api.gamedistribution.com"},Ww={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},Kw=function(){var e=this,t=Hw.acc.some(function(t){var n;return k.default(this,e),t===(null===(n=window.location.host)||void 0===n?void 0:n.toLowerCase())}.bind(this));return{env:t?"acc":"prod",config:t?Ww:zw}},$w=function(e){var t=this,n=e.url;return new Promise(function(e,r){k.default(this,t);var a=new XMLHttpRequest;a.open("GET",n,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else r(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){r(e)},a.send()}.bind(this))};function Qw(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 Jw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qw(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yw,Xw,Zw,eA=new m.EventEmitter,tA=[],nA=function(e){tA.push(e)},rA=function(e){Yw=Fw(Zw=e)},aA=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(Xw){e.next=6;break}return e.next=3,oA(Zw);case 3:Xw=e.sent,eA.emit("game-data-ready",Xw),iA();case 6:return e.abrupt("return",Xw);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),iA=function(){var e,t;if(null!==(e=Xw)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(sA(),null!==(n=Xw)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=Xw)&&void 0!==i&&i.url)Vw.getGameData(null===(s=Xw)||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,oA(Zw);case 3:Xw=e.sent,null===(t=Xw)||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)}},sA=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=Xw)||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=Xw)||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=Xw)||void 0===g||g.aws_tst,null===(v=Xw)||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)})))},oA=function(e){var t=this;Yw.send("gdfw.loading",{message:"loading"}),tA=[],nA("1"),nA("2");var n=new _w;nA("3");var r=n.get("partner.domain.value");nA("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);nA("5");var s=function(){k.default(this,t);var n=o(),a=n?"&mode=".concat(n):"",i=Kw().config;return"https://".concat(i.gameAPI,"/game/v4/get/").concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(es.version,"&localTime=").concat((new Date).getHours())}.bind(this);nA("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 nA("7"),new Promise(function(e){var n=this;k.default(this,t),nA("7.1");var r=i();try{nA("7.2");var o=s();nA("7.3"),fetch(o).then(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:return nA("7.4"),e.prev=1,e.next=4,t.json();case 4:n=e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(1),e.t0,e.next=12,$w({url:o});case 12:n=e.sent;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(t){return e.apply(this,arguments)}}()).then(function(t){var i=this;if(k.default(this,n),nA("7.5"),t.success){var s,d,u,c=t.result.game;nA("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,publishedAt:c.publishedAt,tags:c.tags,category:c.category,assets:c.assets,disp_2nd_prer:c.disp_2nd_prer,ctry_vst:c.ctry_vst,ctry:c.ctry,crtv:c.crtv,dmain:c.dmain,aws_tst:c.aws_tst,meta:c.meta,__t4r:ts(c.__t4r)||{},block_exts:ts(c.push_cuda),bloc_gard:ts(c.bloc_gard),cookie:ts(c.cookie),gdpr:ts(c.gdpr),diagnostic:ts(c.diagnostic),cmp:ts(c.cmp),gft:ts(c.gft)||{},sdk:ts(c.sdk)||{},sdkfw:ts(c.sdkfw)||{},loader:ts(c.loader)||{},splash:ts(c.splash)||{},promo:ts(c.promo)||{},dAds:ts(c.dads)||{},pAds:ts(c.pads)||{},mAds:ts(c.mads)||{},rAds:ts(c.rads)||{},lp:ts(c.lp)||{},extsc:ts(c.extsc)||{},evnts:ts(c.evnts)||{},dp:ts(c.dp)||{},adflw:ts(c.adflw)||{},afgszf:ts(c.afgszf)||{},fllc:ts(c.fllc)||{},lotm:ts(c.lotm)||{},t4rc:ts(c.t4rc)||{},midroll_plus:ts(c.midroll_plus)||{},gmky:ts(c.gmky)||{},urlBlockExc:ts(c.url_blck_exc)||{},sdk_wrp:ts(c.sdk_wrp)||{},dbglg:ts(c.dbglg)||{},extHosting:ts(c.ext_hosting)||{},directTokenUse:ts(c.dtu)||{}};nA("7.7");var h=a.extendDefaults(L.default(r),l);nA("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!==is.afgEnabled&&(h.afg_disabled=!is.afgEnabled),void 0!==is.promoEnabled&&(h.promo=h.promo||{},h.promo=Jw(Jw({},h.promo),{},{rainbow:{enabled:is.promoEnabled}}))}.bind(this),nA("7.9"),null!==(u=h.pAds)&&void 0!==u&&u.enabled&&(h.preroll=!0),nA("7.10"),Yw.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=tA[tA.length-1];Yw.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){k.default(this,n);var a=tA[tA.length-1];Yw.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var d=tA[tA.length-1];Yw.send("gdfw.err",{message:"".concat(d,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}.bind(this))},dA=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,aA();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)}}(),uA=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,aA();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)}}(),cA=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,aA();case 2:return n=e.sent,e.next=5,dA();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)}}(),lA=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,aA();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)}}(),hA=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,lA();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)}}(),fA=!1,pA=!1,mA=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(!fA){e.next=4;break}return e.abrupt("return",t(pA));case 4:fA=!0;case 5:return e.next=7,lA();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 pA=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){k.default(this,d),s&&(s=!1,fA=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){k.default(this,d),s&&i&&window[a]?(s=!1,fA=!0,pA=!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)}}())},gA=zi,vA=im,bA=Y,yA=pt,_A=We,wA=ep,AA=ov,kA=ur,EA=vA&&vA.prototype;if(gA({target:"Promise",proto:!0,real:!0,forced:!!vA&&bA((function(){EA.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=wA(this,yA("Promise")),n=_A(e);return this.then(n?function(n){return AA(t,e()).then((function(){return n}))}:e,n?function(n){return AA(t,e()).then((function(){throw n}))}:e)}}),_A(vA)){var xA=yA("Promise").prototype.finally;EA.finally!==xA&&kA(EA,"finally",xA,{unsafe:!0})}var SA="\t\n\v\f\r \u2028\u2029\ufeff",DA=oe,TA=ds,RA=SA,OA=re("".replace),PA=RegExp("^["+RA+"]+"),IA=RegExp("(^|[^"+RA+"])["+RA+"]+$"),CA=function(e){return function(t){var n=TA(DA(t));return 1&e&&(n=OA(n,PA,"")),2&e&&(n=OA(n,IA,"$1")),n}},LA={start:CA(1),end:CA(2),trim:CA(3)},UA=dn.PROPER,MA=Y,jA=SA,BA=LA.trim;zi({target:"String",proto:!0,forced:function(e){return MA((function(){return!!jA[e]()||"
"!=="
"[e]()||UA&&jA[e].name!==e}))}("trim")},{trim:function(){return BA(this)}});var GA=zi,NA=Ea.find,qA=uf,FA="find",VA=!0;FA in[]&&Array(1)[FA]((function(){VA=!1})),GA({target:"Array",proto:!0,forced:VA},{find:function(e){return NA(this,e,arguments.length>1?arguments[1]:void 0)}}),qA(FA);var HA=We,zA=Ye,WA=Tl,KA=Ke.f,$A=$e,QA=N,JA=re,YA=ji,XA=function(e,t,n){var r,a;return WA&&HA(r=t.constructor)&&r!==n&&zA(a=r.prototype)&&a!==n.prototype&&WA(e,a),e},ZA=An,ek=Xa.f,tk=mt,nk=Qv,rk=ds,ak=bb,ik=ch,sk=function(e,t,n){n in e||KA(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},ok=ur,dk=Y,uk=fe,ck=qn.enforce,lk=Vf,hk=fh,fk=gh,pk=Ne("match"),mk=QA.RegExp,gk=mk.prototype,vk=QA.SyntaxError,bk=JA(gk.exec),yk=JA("".charAt),_k=JA("".replace),wk=JA("".indexOf),Ak=JA("".slice),kk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Ek=/a/g,xk=/a/g,Sk=new mk(Ek)!==Ek,Dk=ik.MISSED_STICKY,Tk=ik.UNSUPPORTED_Y,Rk=$A&&(!Sk||Dk||hk||fk||dk((function(){return xk[pk]=!1,mk(Ek)!=Ek||mk(xk)==xk||"/a/i"!=mk(Ek,"i")})));if(YA("RegExp",Rk)){for(var Ok=function(e,t){var n,r,a,i,s,o,d=tk(gk,this),u=nk(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===Ok)return e;if((u||tk(gk,e))&&(e=e.source,c&&(t=ak(h))),e=void 0===e?"":rk(e),t=void 0===t?"":rk(t),h=e,hk&&"dotAll"in Ek&&(r=!!t&&wk(t,"s")>-1)&&(t=_k(t,/s/g,"")),n=t,Dk&&"sticky"in Ek&&(a=!!t&&wk(t,"y")>-1)&&Tk&&(t=_k(t,/y/g,"")),fk&&(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=yk(e,r)))t+=yk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:bk(kk,Ak(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||uk(s,c))throw new vk("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=XA(mk(e,t),d?this:gk,Ok),(r||a||l.length)&&(o=ck(s),r&&(o.dotAll=!0,o.raw=Ok(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=yk(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+yk(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{ZA(s,"source",""===h?"(?:)":h)}catch(e){}return s},Pk=ek(mk),Ik=0;Pk.length>Ik;)sk(Ok,mk,Pk[Ik++]);gk.constructor=Ok,Ok.prototype=gk,ok(QA,"RegExp",Ok,{constructor:!0})}lk("RegExp");var Ck=zi,Lk=Br,Uk=Fa,Mk=Sa,jk=re([].join);Ck({target:"Array",proto:!0,forced:Lk!=Object||!Mk("join",",")},{join:function(e){return jk(Uk(this),void 0===e?",":e)}});var Bk=Ea.map;zi({target:"Array",proto:!0,forced:!Eu("map")},{map:function(e){return Bk(this,e,arguments.length>1?arguments[1]:void 0)}});var Gk=$e,Nk=re,qk=lt,Fk=Y,Vk=$i,Hk=vi,zk=Ma,Wk=ce,Kk=Br,$k=Object.assign,Qk=Object.defineProperty,Jk=Nk([].concat),Yk=!$k||Fk((function(){if(Gk&&1!==$k({b:1},$k(Qk({},"a",{enumerable:!0,get:function(){Qk(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!=$k({},e)[n]||Vk($k({},t)).join("")!=r}))?function(e,t){for(var n=Wk(e),r=arguments.length,a=1,i=Hk.f,s=zk.f;r>a;)for(var o,d=Kk(arguments[a++]),u=i?Jk(Vk(d),i(d)):Vk(d),c=u.length,l=0;c>l;)o=u[l++],Gk&&!qk(s,d,o)||(n[o]=d[o]);return n}:$k,Xk=Yk;zi({target:"Object",stat:!0,arity:2,forced:Object.assign!==Xk},{assign:Xk});var Zk,eE=re,tE=2147483647,nE=/[^\0-\u007E]/,rE=/[.\u3002\uFF0E\uFF61]/g,aE="Overflow: input needs wider integers to process",iE=RangeError,sE=eE(rE.exec),oE=Math.floor,dE=String.fromCharCode,uE=eE("".charCodeAt),cE=eE([].join),lE=eE([].push),hE=eE("".replace),fE=eE("".split),pE=eE("".toLowerCase),mE=function(e){return e+22+75*(e<26)},gE=function(e,t,n){var r=0;for(e=n?oE(e/700):e>>1,e+=oE(e/t);e>455;)e=oE(e/35),r+=36;return oE(r+36*e/(e+38))},vE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=uE(e,n++);if(a>=55296&&a<=56319&&n<r){var i=uE(e,n++);56320==(64512&i)?lE(t,((1023&a)<<10)+(1023&i)+65536):(lE(t,a),n--)}else lE(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&&lE(t,dE(r));var d=t.length,u=d;for(d&&lE(t,"-");u<a;){var c=tE;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<c&&(c=r);var l=u+1;if(c-i>oE((tE-s)/l))throw iE(aE);for(s+=(c-i)*l,i=c,n=0;n<e.length;n++){if((r=e[n])<i&&++s>tE)throw iE(aE);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;lE(t,dE(mE(p+m%g))),h=oE(m/g),f+=36}lE(t,dE(mE(h))),o=gE(s,l,u==d),s=0,u++}}s++,i++}return cE(t,"")},bE=zi,yE=$e,_E=Hy,wE=N,AE=Cr,kE=re,EE=ur,xE=Ys,SE=Wf,DE=fe,TE=Yk,RE=Oc,OE=Vs,PE=$c.codeAt,IE=function(e){var t,n,r=[],a=fE(hE(pE(e),rE,"."),".");for(t=0;t<a.length;t++)n=a[t],lE(r,sE(nE,n)?"xn--"+vE(n):n);return cE(r,".")},CE=ds,LE=fo,UE=np,ME=lw,jE=qn,BE=jE.set,GE=jE.getterFor("URL"),NE=ME.URLSearchParams,qE=ME.getState,FE=wE.URL,VE=wE.TypeError,HE=wE.parseInt,zE=Math.floor,WE=Math.pow,KE=kE("".charAt),$E=kE(/./.exec),QE=kE([].join),JE=kE(1..toString),YE=kE([].pop),XE=kE([].push),ZE=kE("".replace),ex=kE([].shift),tx=kE("".split),nx=kE("".slice),rx=kE("".toLowerCase),ax=kE([].unshift),ix="Invalid scheme",sx="Invalid host",ox="Invalid port",dx=/[a-z]/i,ux=/[\d+-.a-z]/i,cx=/\d/,lx=/^0x/i,hx=/^[0-7]+$/,fx=/^\d+$/,px=/^[\da-f]+$/i,mx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,gx=/[\0\t\n\r #/:<>?@[\\\]^|]/,vx=/^[\u0000-\u0020]+/,bx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,yx=/[\t\n\r]/g,_x=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)ax(t,e%256),e=zE(e/256);return QE(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+=JE(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},wx={},Ax=TE({},wx,{" ":1,'"':1,"<":1,">":1,"`":1}),kx=TE({},Ax,{"#":1,"?":1,"{":1,"}":1}),Ex=TE({},kx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),xx=function(e,t){var n=PE(e,0);return n>32&&n<127&&!DE(t,e)?e:encodeURIComponent(e)},Sx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Dx=function(e,t){var n;return 2==e.length&&$E(dx,KE(e,0))&&(":"==(n=KE(e,1))||!t&&"|"==n)},Tx=function(e){var t;return e.length>1&&Dx(nx(e,0,2))&&(2==e.length||"/"===(t=KE(e,2))||"\\"===t||"?"===t||"#"===t)},Rx=function(e){return"."===e||"%2e"===rx(e)},Ox={},Px={},Ix={},Cx={},Lx={},Ux={},Mx={},jx={},Bx={},Gx={},Nx={},qx={},Fx={},Vx={},Hx={},zx={},Wx={},Kx={},$x={},Qx={},Jx={},Yx=function(e,t,n){var r,a,i,s=CE(e);if(t){if(a=this.parse(s))throw VE(a);this.searchParams=null}else{if(void 0!==n&&(r=new Yx(n,!0)),a=this.parse(s,null,r))throw VE(a);(i=qE(new NE)).bindURL(this),this.searchParams=i}};Yx.prototype={type:"URL",parse:function(e,t,n){var r,a,i,s,o,d=this,u=t||Ox,c=0,l="",h=!1,f=!1,p=!1;for(e=CE(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=ZE(e,vx,""),e=ZE(e,bx,"$1")),e=ZE(e,yx,""),r=RE(e);c<=r.length;){switch(a=r[c],u){case Ox:if(!a||!$E(dx,a)){if(t)return ix;u=Ix;continue}l+=rx(a),u=Px;break;case Px:if(a&&($E(ux,a)||"+"==a||"-"==a||"."==a))l+=rx(a);else{if(":"!=a){if(t)return ix;l="",u=Ix,c=0;continue}if(t&&(d.isSpecial()!=DE(Sx,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&Sx[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?u=Vx:d.isSpecial()&&n&&n.scheme==d.scheme?u=Cx:d.isSpecial()?u=jx:"/"==r[c+1]?(u=Lx,c++):(d.cannotBeABaseURL=!0,XE(d.path,""),u=$x)}break;case Ix:if(!n||n.cannotBeABaseURL&&"#"!=a)return ix;if(n.cannotBeABaseURL&&"#"==a){d.scheme=n.scheme,d.path=OE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,u=Jx;break}u="file"==n.scheme?Vx:Ux;continue;case Cx:if("/"!=a||"/"!=r[c+1]){u=Ux;continue}u=Bx,c++;break;case Lx:if("/"==a){u=Gx;break}u=Kx;continue;case Ux:if(d.scheme=n.scheme,a==Zk)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=OE(n.path),d.query=n.query;else if("/"==a||"\\"==a&&d.isSpecial())u=Mx;else if("?"==a)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=OE(n.path),d.query="",u=Qx;else{if("#"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=OE(n.path),d.path.length--,u=Kx;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=OE(n.path),d.query=n.query,d.fragment="",u=Jx}break;case Mx:if(!d.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,u=Kx;continue}u=Gx}else u=Bx;break;case jx:if(u=Bx,"/"!=a||"/"!=KE(l,c+1))continue;c++;break;case Bx:if("/"!=a&&"\\"!=a){u=Gx;continue}break;case Gx:if("@"==a){h&&(l="%40"+l),h=!0,i=RE(l);for(var m=0;m<i.length;m++){var g=i[m];if(":"!=g||p){var v=xx(g,Ex);p?d.password+=v:d.username+=v}else p=!0}l=""}else if(a==Zk||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(h&&""==l)return"Invalid authority";c-=RE(l).length+1,l="",u=Nx}else l+=a;break;case Nx:case qx:if(t&&"file"==d.scheme){u=zx;continue}if(":"!=a||f){if(a==Zk||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(d.isSpecial()&&""==l)return sx;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 sx;if(s=d.parseHost(l))return s;if(l="",u=Fx,t==qx)return}break;case Fx:if(!$E(cx,a)){if(a==Zk||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()||t){if(""!=l){var b=HE(l,10);if(b>65535)return ox;d.port=d.isSpecial()&&b===Sx[d.scheme]?null:b,l=""}if(t)return;u=Wx;continue}return ox}l+=a;break;case Vx:if(d.scheme="file","/"==a||"\\"==a)u=Hx;else{if(!n||"file"!=n.scheme){u=Kx;continue}if(a==Zk)d.host=n.host,d.path=OE(n.path),d.query=n.query;else if("?"==a)d.host=n.host,d.path=OE(n.path),d.query="",u=Qx;else{if("#"!=a){Tx(QE(OE(r,c),""))||(d.host=n.host,d.path=OE(n.path),d.shortenPath()),u=Kx;continue}d.host=n.host,d.path=OE(n.path),d.query=n.query,d.fragment="",u=Jx}}break;case Hx:if("/"==a||"\\"==a){u=zx;break}n&&"file"==n.scheme&&!Tx(QE(OE(r,c),""))&&(Dx(n.path[0],!0)?XE(d.path,n.path[0]):d.host=n.host),u=Kx;continue;case zx:if(a==Zk||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&Dx(l))u=Kx;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=Kx,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=Zk&&(u=Kx,"/"!=a))continue}else d.fragment="",u=Jx;else d.query="",u=Qx;break;case Kx:if(a==Zk||"/"==a||"\\"==a&&d.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(o=rx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==a||"\\"==a&&d.isSpecial()||XE(d.path,"")):Rx(l)?"/"==a||"\\"==a&&d.isSpecial()||XE(d.path,""):("file"==d.scheme&&!d.path.length&&Dx(l)&&(d.host&&(d.host=""),l=KE(l,0)+":"),XE(d.path,l)),l="","file"==d.scheme&&(a==Zk||"?"==a||"#"==a))for(;d.path.length>1&&""===d.path[0];)ex(d.path);"?"==a?(d.query="",u=Qx):"#"==a&&(d.fragment="",u=Jx)}else l+=xx(a,kx);break;case $x:"?"==a?(d.query="",u=Qx):"#"==a?(d.fragment="",u=Jx):a!=Zk&&(d.path[0]+=xx(a,wx));break;case Qx:t||"#"!=a?a!=Zk&&("'"==a&&d.isSpecial()?d.query+="%27":d.query+="#"==a?"%23":xx(a,wx)):(d.fragment="",u=Jx);break;case Jx:a!=Zk&&(d.fragment+=xx(a,Ax))}c++}},parseHost:function(e){var t,n,r;if("["==KE(e,0)){if("]"!=KE(e,e.length-1))return sx;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 KE(e,l)};if(":"==h()){if(":"!=KE(e,1))return;l+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&$E(px,h());)t=16*t+HE(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(!$E(cx,h()))return;for(;$E(cx,h());){if(i=HE(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}(nx(e,1,-1)),!t)return sx;this.host=t}else if(this.isSpecial()){if(e=IE(e),$E(mx,e))return sx;if(t=function(e){var t,n,r,a,i,s,o,d=tx(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"==KE(a,0)&&(i=$E(lx,a)?16:8,a=nx(a,8==i?1:2)),""===a)s=0;else{if(!$E(10==i?fx:8==i?hx:px,a))return e;s=HE(a,i)}XE(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=WE(256,5-t))return null}else if(s>255)return null;for(o=YE(n),r=0;r<n.length;r++)o+=n[r]*WE(256,3-r);return o}(e),null===t)return sx;this.host=t}else{if($E(gx,e))return sx;for(t="",n=RE(e),r=0;r<n.length;r++)t+=xx(n[r],wx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return DE(Sx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Dx(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+=_x(a),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+QE(s,"/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},setHref:function(e){var t=this.parse(e);if(t)throw VE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Xx(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+_x(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(CE(e)+":",Ox)},getUsername:function(){return this.username},setUsername:function(e){var t=RE(CE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=xx(t[n],Ex)}},getPassword:function(){return this.password},setPassword:function(e){var t=RE(CE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=xx(t[n],Ex)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?_x(e):_x(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Nx)},getHostname:function(){var e=this.host;return null===e?"":_x(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,qx)},getPort:function(){var e=this.port;return null===e?"":CE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=CE(e))?this.port=null:this.parse(e,Fx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+QE(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=CE(e))?this.query=null:("?"==KE(e,0)&&(e=nx(e,1)),this.query="",this.parse(e,Qx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=CE(e))?("#"==KE(e,0)&&(e=nx(e,1)),this.fragment="",this.parse(e,Jx)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Xx=function(e){var t=SE(this,Zx),n=UE(arguments.length,1)>1?arguments[1]:void 0,r=BE(t,new Yx(e,!1,n));yE||(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())},Zx=Xx.prototype,eS=function(e,t){return{get:function(){return GE(this)[e]()},set:t&&function(e){return GE(this)[t](e)},configurable:!0,enumerable:!0}};if(yE&&(xE(Zx,"href",eS("serialize","setHref")),xE(Zx,"origin",eS("getOrigin")),xE(Zx,"protocol",eS("getProtocol","setProtocol")),xE(Zx,"username",eS("getUsername","setUsername")),xE(Zx,"password",eS("getPassword","setPassword")),xE(Zx,"host",eS("getHost","setHost")),xE(Zx,"hostname",eS("getHostname","setHostname")),xE(Zx,"port",eS("getPort","setPort")),xE(Zx,"pathname",eS("getPathname","setPathname")),xE(Zx,"search",eS("getSearch","setSearch")),xE(Zx,"searchParams",eS("getSearchParams")),xE(Zx,"hash",eS("getHash","setHash"))),EE(Zx,"toJSON",(function(){return GE(this).serialize()}),{enumerable:!0}),EE(Zx,"toString",(function(){return GE(this).serialize()}),{enumerable:!0}),FE){var tS=FE.createObjectURL,nS=FE.revokeObjectURL;tS&&EE(Xx,"createObjectURL",AE(tS,FE)),nS&&EE(Xx,"revokeObjectURL",AE(nS,FE))}LE(Xx,"URL"),bE({global:!0,constructor:!0,forced:!_E,sham:!yE},{URL:Xx});var rS=function(){function e(t){D.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 R.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}(),aS=function(){function e(t,n){D.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}(),iS=function(){function e(t,n){D.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}(),sS=function(){function e(t){D.default(this,e),this.adContainer=t}return S.default(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{key:"mute",value:function(){document.getElementById("game").contentWindow.postMessage("mute","*")}},{key:"unmute",value:function(){document.getElementById("game").contentWindow.postMessage("unmute","*")}},{key:"add",value:function(){try{var e=document.createElement("div");this.audioLabel=e;var t=document.createElement("span");t.innerText="Audio Ad is Playing";var n=document.createElement("span");n.innerHTML="ⓘ",this.addStyles(),e.classList.add("gd__audio__label"),t.classList.add("gd__audio__span"),n.classList.add("gd__audio__span"),this.audioLabel.appendChild(n),this.audioLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__audio__label__style",e,"\n .gd__audio__label{\n background-color: #ffca00; \n width: 200px;\n position: relative;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n border-radius: 0px;\n border: 0px;\n text-align: center;\n height: 30px;\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px;\n }\n .gd__audio__span{\n color: black;\n font-size: 14px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),oS=function(){function e(t){D.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}(),dS=function(e){if(!e)return!1;var t=uS.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)},uS=Object.prototype.toString;function cS(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 lS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cS(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hS(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>"):'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>")}var fS,pS="13998",mS="_cc".concat(pS),gS=["https://tags.crwdcntrl.net/c/".concat(pS,"/cc.js?ns=").concat(mS)],vS=function(){return!!fS&&"function"==typeof fS.bcpf&&"function"==typeof fS.add},bS=function(e,t){try{if(!vS())return;fS.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},yS=function(e,t){try{if(!vS())return;fS.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},_S=function(e){var t=this;try{bS("act","play"),bS("med","game"),"complete"===document.readyState?fS.bcpf():fS.bcp(),e.tags.forEach(function(e){k.default(this,t),yS("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),yS("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},wS=function(){window.addEventListener("load",(function(){eA.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!=iy&&iy.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,dA();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(gS[0],"LOTCC_".concat(pS),{alternates:gS});case 16:"object"===E.default(window[mS])&&(fS=window[mS]),vS()&&_S(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)}}())}))},AS=function(){yS("genp","ad video"),yS("act","ad impression")},kS=function(){yS("act","ad skipped")},ES=function(){yS("act","ad click")},xS=function(){yS("act","ad complete")},SS=new _w,DS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},TS=function(e,t){var n=this,r=function(e,t){var n=SS.get("partner.url.value"),r=DS[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)},RS=(new _w).get("partner.domain.value"),OS=["latimes.com"],PS={exist:function(e){var t=this;return"Softgames-Azerion"===e.dname&&OS.some(function(e){return k.default(this,t),e===RS}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return TS(n,e)}}[RS](e)}(e,t)}},IS=function(){var e=(new _w).get("partner.url.value"),t=new R.default(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,a="1"===r||"2"===r,i="1"===r;n={useTestAds:a,disableMidrolltimer:i,isRevisionTest:i||a}}return n};function CS(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 LS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CS(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var US=new m.EventEmitter,MS=null,jS=function(){function e(t,n,r){var i=this;if(D.default(this,e),MS)return MS;MS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=n?a.extendDefaults(s,n):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new a.EventBus,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=a.getIMASampleTags(),this.atom_display,this.adType_="",this.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,P,I,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),as("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:(I=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 I.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:(P=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 P.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")||IS().useTestAds)){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="","audio"===t.adapter||"audio"===t.giftType?(n.isAudioAd=!0,l="midrollaudio"):(n.isAudioAd=!1,l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),r.next=19,window.idhb.isLoaded();case 19:return r.next=21,n._create_dp_context(u,t);case 21:h=r.sent,rs("gd-adflow, before idhb",u,l),f=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(LS(LS({},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:LS(LS({},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=33;break;case 30:throw r.prev=30,r.t0=r.catch(10),new Error(r.t0);case 33:case"end":return r.stop()}}),r,this,[[10,30]])})));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,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,t),c=LS(LS({},t),{},{adTag:u,tnl_ad_pos:o});this.adCounter[o]=this.adCounter[o]||0,this.adCounter[o]++;var l=e.dp,h=e.hl;this.current_dp=l,l&&!u.bidder&&(l.adtag_url=u.url,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)}).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){for(var t=[],n="",r=Date.now(),a={ppos:1,lip:!0,vad_type:"linear"},i=0;i<e.length;i++){var s=new R.default(e[i].adtag.url,!0);s.query=lS(lS({},s.query),{},{ad_rule:0,vpos:e[i].positon,pod:1,correlator:0===i?r:++r,output:"xml_vast3"}),0===i&&(s.query=lS(lS({},s.query),a)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var u,c,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(d,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(hS({id:o++,adtag_url:t[d-1],error_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.error_url,impression_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.impression_url,fallback_url:null===(l=e[d-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[d-1].dp)||void 0===h?void 0:h.fallback_imp_url}),"</vmap:AdSource>\n </vmap:AdBreak>")}return'<?xml version="1.0" encoding="UTF-8"?>\n <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n '.concat(n,"\n </vmap:VMAP>").trim()}(this._get_vmap_context({dp:l,adtag:u,position:"preroll"===c.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));d.adsResponse=m}else if(l&&h.bidFloorApplied){l.adtag_url||(l.adtag_url=u.url);var g=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(l);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=PS.exist(this.gameData)&&PS.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.isAudioAd=!1,this.adContext=LS(LS({},r),{},{adType:n}),"promo"!==(null==r?void 0:r.adapter)){e.next=6;break}return e.abrupt("return",this._startPromo(r,n));case 6:if("adsense"!==(null==r?void 0:r.adapter)){e.next=30;break}if(n!==a.AdType.Interstitial){e.next=23;break}if("preroll"!==(null==r?void 0:r.position)){e.next=12;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 12:if("start"!==(null==r?void 0:r.position)){e.next=16;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 16:if("next"!==(null==r?void 0:r.position)){e.next=20;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 20:return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 21:e.next=28;break;case 23:if(n!==a.AdType.Rewarded){e.next=27;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 27:case 40:throw new Error("Unsupported ad type");case 28:e.next=41;break;case 30:if(!["ima","spil","audio"].some(function(e){return k.default(this,i),e===(null==r?void 0:r.adapter)}.bind(this))){e.next=41;break}if(n!==a.AdType.Interstitial){e.next=36;break}return e.abrupt("return",this._startInterstitialAd(r));case 36:if(n!==a.AdType.Rewarded){e.next=40;break}return e.abrupt("return",this._startRewardedAd(r));case 41: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:"addAdComponents",value:function(){var e=this,t=function(){k.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new aS(this.adContainer,t),this.adResume.add(),this.rewardedLabel=new iS(this.adContainer,t),this.rewardedLabel.add(),this.audioAdLabel=new sS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}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,a,i=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,i),is.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(LS(LS({},n),t));case 13:if(r=e.sent,a=r.success,r.args,a){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,a,i;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(LS(LS({},r),t),n);case 11:if(a=e.sent,i=a.success,a.args,i){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,LS({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,LS({adType:a.AdType.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return 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,a,i=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,i),is.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(LS(LS({},n),t));case 13:if(r=e.sent,a=r.success,r.args,a){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,LS({adType:a.AdType.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return 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.isAudioAd||(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 oS(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.addAdComponents(),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:this.contentPaused&&(c=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),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}),ES();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"),this.contentPaused=!0,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.",this.contentPaused?c=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this.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(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this.isAudioAd&&this.audioAdLabel.show();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.",kS(),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){var b=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,y=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;b||y||this.isAudioAd||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)}})}if(c&&!this.adSuccess){this.adSuccess=!0;var _=e.getAd(),w="Rainbow"===(null==_?void 0:_.getAdSystem())&&(null==_?void 0:_.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this)));null==_||_.getAdSystem(),null==_||_.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:w}),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);US.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(dS(e.getInnerError)){var t=e.getInnerError();if(t)return dS(t.getErrorCode)&&dS(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 R.default(r.url,!0);return j.default(s.query,r.query||{}),LS({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new R.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new R.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,i=(null===(t=this._adrequest_user_context)||void 0===t||null===(n=t.adTag)||void 0===n?void 0:n.bidder)||"adx";this.msgrt.send("bidder",{message:i}),this._adrequest_user_context,'bidder:"'.concat(i,'"');var s=(null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[],o=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return o.length>0?d=!o.some(function(t){return k.default(this,e),t===i}.bind(this)):s.length>0&&(d=s.some(function(t){return k.default(this,e),t===i}.bind(this))),d}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;var i=this.gameData.meta,s=e.t4r.meta;if((null==i?void 0:i.ast.c)>=(null==s?void 0:s.ast.c)&&(null==i?void 0:i.sit.c)>=(null==s?void 0:s.sit.c))return!1;if(this._isExcludedBidderForT4R())return this.msgrt.send("bidder.ex",{message:"true"}),!1;this.msgrt.send("bidder.ex",{message:"false"});var o,d=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[d]>=(null===(n=e.t4r[d])||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 d&&(null===(o=e.t4r[d])||void 0===o?void 0:o.enabled);if(null!=e&&e.contentType.startsWith("video/")){var u,c=(null===(u=e.t4r[d])||void 0===u?void 0:u.viper)||0;if(c>0){var l,h=Math.random()<c;return d&&h&&(null===(l=e.t4r[d])||void 0===l?void 0:l.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){for(var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=r.count||2,s=[],o=1;o<=i;o++){var d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:a,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(t){var n=this;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 rS(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),is.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=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 rS(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,!1,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,l),e.json()}.bind(this)).then(function(e){if(k.default(this,l),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;n.msgrt.send("dp.fp",{message:t}),a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){k.default(this,l),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=20;break;case 16:r.prev=16,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 20:case"end":return r.stop()}}),r,this,[[0,16]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new R.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.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 R.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(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(k.default(this,c),is.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();var t="rewarded";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),u=function(e){window.adsbygoogle.push(e)},setTimeout(function(){k.default(this,c),n||(rs("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(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(k.default(this,r),is.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();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),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(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(k.default(this,i),is.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();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),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(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(k.default(this,i),is.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();var t="midroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),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}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new _w).get();return n=LS(LS({},n),r),n=t?LS(LS({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===a.AdType.Rewarded)t="reward";else if(n===a.AdType.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,t){var n=this,r=!1;["AD_ERROR"].some(function(t){return 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,LS(LS({},t),{},{skipForward:r,adPosition:a}))}}]),e}(),BS=S.default((function e(t){var n=this;D.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,Vv(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.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},qv(this.moduleName,this.moduleConfig)})),GS=S.default((function e(t){var n=this;D.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,Vv(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.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},qv(this.moduleName,this.moduleConfig)})),NS=function(e,t){console.log(e,t)},qS={},FS={},VS=null;function HS(){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 qS.version=r,qS.frame=e,qS.function=n,qS.version}function zS(e){var t=this;return VS||(VS=new Promise(function(n){function r(t,r){if(NS("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:qS,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}k.default(this,t),HS(),qS.frame?2===qS.version?(NS("TCF v2 CMP found. Fetching the consent."),qS.function?(NS("CMP API is directly accessible, calling it now..."),qS.function("addEventListener",qS.version,r)):(NS("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!==FS[r.callId]&&FS[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});FS[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,qS.version,n)}("addEventListener",qS.frame,r))):n({result:"cmpVersionNotV2",cmp:qS}):n({result:"cmpNotFound"})}.bind(this)),VS)}var WS=new(function(){function e(){D.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.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(u,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,n){return t.apply(this,arguments)})}]),e}());function KS(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 QS=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=KS(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))},JS="ffd4774b-99ae-4464-8f40-3afa12b4692e",YS=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,QS({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,QS({src:"https://cdn.cookielaw.org/consent/".concat(JS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,QS({src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:JS}],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)}}(),XS=new m.EventEmitter,ZS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},eD=!1;function tD(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(ZS).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)&&(eD=!0),a&&eD&&(eD=!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=ZS[r][a];h&&XS.emit(h,n)}}}),!1);var nD="__msgr",rD=_.v4(),aD=function(e){var t=this;if(!window[nD]){var n=document.createElement("iframe");if(n.src="https://static.gamedistribution.com/message/index.html",n.style.display="none",n.name=nD,document.body.appendChild(n),window!==window.top){var r={gameId:e.gameId,target:e.evnts.domain,token:rD,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){oD(r)},setInterval(function(){k.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",oD(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?tD(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=rD,oD(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},iD=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=sD(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},sD=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}},oD=function(e){try{window[nD]&&window[nD].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},dD=function(){function e(t){D.default(this,e),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=t.adRequest,this._gameData=t._gameData,this._msgrt=t._msgrt,this._adInstance=t._adInstance,this._eventBus=t._eventBus,this.blockedAdsMap=t._blockedAdsMap,this._parentURL=t._parentURL,this._parentDomain=t._parentDomain,this._onResumeGame=t._onResumeGame.bind(t),this._onPauseGame=t._onPauseGame.bind(t),this._onRewardedWatchComplete=t._onRewardedWatchComplete.bind(t),this._onAdError=t._onAdError.bind(t),this._promoShowSuccess=!1}var t,n,r;return S.default(e,[{key:"run",value:function(e){var t=e.duration,n=this;return new Promise(function(){var e=A.default(x.default.mark((function e(r,a){var i,s=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.add();case 3:i=n.show(),setTimeout(function(){k.default(this,s);try{n.hide(),r({success:i})}catch(e){a(e)}}.bind(this),1e3*t),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}())}},{key:"show",value:function(){return this.promo_data.game?(this.adContainer.style.visibility="visible",this.promo.style.display="block",this._onPauseGame("Pause the game for the promo","success"),this._promoShowSuccess=!0):this._onAdError("Promo not found"),this._promoShowSuccess}},{key:"hide",value:function(){var e;(this.promo.remove(),this.adContainer.style.visibility="hidden",this._promoShowSuccess)&&("reward"===(null===(e=this._adRequest.params)||void 0===e?void 0:e.position)&&this._onRewardedWatchComplete());this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success")}},{key:"add",value:(r=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.fetch_promo();case 3:this.promo_data=e.sent,t=document.createElement("div"),this.promo=t,n=this.promo_data,this.promo.addEventListener("click",function(){var e=A.default(x.default.mark((function e(t){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(n),a.track_click(n.click_tracking),window.open(n.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(r=document.createElement("iframe")).src=this.promo_data.renderer_url,r.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),r.classList.add("gd__promo__iframe"),this.promo.appendChild(r),this.adContainer.appendChild(this.promo),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.log(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return r.apply(this,arguments)})},{key:"addStyles",value:function(){var e="\n .gd__promo{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: transparent;\n z-index: 1;\n cursor: pointer;\n }\n .gd__promo__iframe{\n position: relative;\n z-index: -1;\n width:".concat(this.adContainerInner.style.width,";\n height:").concat(this.adContainerInner.style.height,";\n }\n "),t=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__promo__style",t,e)}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}},{key:"fetch_promo",value:(n=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,fetch("https://tag.atom.gamedistribution.com/v1/rainbow/pick?id=".concat(this._parentDomain,"&aid=").concat(this._gameData.gameId)).then(function(e){return k.default(this,n),e.json()}.bind(this));case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"track_click",value:(t=A.default(x.default.mark((function e(t){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}();function uD(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 cD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uD(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lD(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 hD(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 hD(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 hD(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 fD,pD,mD=function(){function e(t){var n=this;D.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._parentDomain=t._parentDomain,this._onResumeGame=t.onResumeGame.bind(t),this._onPauseGame=t.onPauseGame.bind(t),this._onRewardedWatchComplete=t.onRewardedWatchComplete.bind(t),this._onAdError=t.onAdError.bind(t),this._setAdRequestTimer=t._setAdRequestTimer.bind(t),this._giveGift=t._giveGift.bind(t),this._runAutoResume=t._runAutoResume.bind(t),this.send_atom_event=t.send_atom_event.bind(t),this.get_session_id=t.get_session_id.bind(t),this.get_ad_system_init_result=t.get_ad_system_init_result.bind(t),this.eventBus=new a.EventBus}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,D,R,O,P,I,C,L,U,M,j,B,G,N,q,F,V,H,z,W=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=t,s=this._getAdTypeByAfgPosition(t),t.params.position,o=this._getAdFlow(s),d=this._gameData,u=d.afg_disabled,c=null===(n=t.params)||void 0===n?void 0:n.isGift,null===(r=t.params)||void 0===r||r.position,l=null===(a=d.promo)||void 0===a?void 0:a.rainbow,h=(null==l?void 0:l.enabled)&&(null===(i=l.position)||void 0===i?void 0:i[s]),f=null==l?void 0:l.gift,p=h&&null!=l&&l.duration?null==l?void 0:l.duration:5,m=u?o.filter(function(e){return k.default(this,W),"adsense"!==e}.bind(this)):o,g=this.get_ad_system_init_result(),v=g.afg,b=g.ima,this.adsBlocked=!v||!b,this.adsBlocked?(rs("gd-adflow adsBlocked so changing the flow"),m=[]):(v||(m=m.filter(function(e){return k.default(this,W),"adsense"!==e}.bind(this))),b||(m=m.filter(function(e){return k.default(this,W),"ima"!==e}.bind(this)))),y=!1,_=!1,w=[],A=0,E=!1,S=lD(m),e.prev=26,S.s();case 28:if((D=S.n()).done){e.next=62;break}return R=D.value,t.params.adapter=R,O=A===m.length-1,P=c&&f||!c,I=O&&h&&P,t.params=cD(cD({},t.params),{},{adapterIndex:A,isLastAdapter:O,shouldFail:!1,extraPromoRunOnFail:I}),function(){k.default(this,W),is.firstSuccessOrder&&!isNaN(is.firstSuccessOrder)&&(t.params.shouldFail=A<is.firstSuccessOrder)}.bind(this),rs("gd-adflow, before adInvoke",A,R,t.params.shouldFail),e.next=39,this.adInvoke(t);case 39:if(C=e.sent,L=C.success,U=C.args,M=C.isSkipped,j=C.noVast,!L){e.next=51;break}return rs("gd-adflow, adapter-result-success",A,R,U),y=!0,_=!(null==U||!U.isPromoSuccess),e.abrupt("break",62);case 51:if(rs("gd-adflow, adapter-result-failure",A,R,U.message),A++,w.push(U.message),!M){e.next=56;break}return e.abrupt("break",62);case 56:if(!j){e.next=59;break}return this._runAutoResume(),e.abrupt("break",62);case 59:E=I;case 60:e.next=28;break;case 62:e.next=67;break;case 64:e.prev=64,e.t0=e.catch(26),S.e(e.t0);case 67:return e.prev=67,S.f(),e.finish(67);case 70:if(!E){e.next=76;break}return e.next=73,new dD(this).run({duration:p});case 73:e.sent.success&&(_=!0);case 76:return function(){var e;k.default(this,W),is.disableGift&&null!==(e=d.gft)&&void 0!==e&&e[s].enabled&&(d.gft[s].enabled=!1)}.bind(this),B=w.join(" /n"),y?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(s)):(this._onResumeGame(B,"warning"),this._giveGift(s)),G="-1",N="none",y?(G="index_".concat(A),N=m[A]):_&&(G="promo",N="promo"),q=this.get_session_id(),this.adsBlocked&&"-1"===G?(F="rewarded"===s?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[F]=this.blockedAdsMap[F]?this.blockedAdsMap[F]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(F)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:F,sessionId:q,successAdapter:"none",adFlowIndex:G})):(V={},T.default(V,"adflow.all.index",{message:"".concat(G)}),T.default(V,"adflow.all.success_adapter",{message:"".concat(N)}),T.default(V,"adflow.".concat(s,".index"),{message:"".concat(G)}),T.default(V,"adflow.".concat(s,".success_adapter"),{message:"".concat(N)}),H=V,Object.keys(H).forEach(function(e){k.default(this,W);var t=H[e];this._msgrt.send(e,t)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:G,successAdapter:N,adBlocker:!1,afgBlocked:!v,imaBlocked:!b,adType:s,sessionId:q})),z={adType:s},this.eventBus.broadcast("AD_FLOW_COMPLETE",z),e.abrupt("return",z);case 89:case"end":return e.stop()}}),e,this,[[26,64,67,70]])}))),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),as("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),is.customAdFlow)return JSON.parse(is.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}(),gD=function(){function e(){D.default(this,e),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},qv(this.moduleName,this.moduleConfig)}var t,n;return S.default(e,[{key:"load",value:(n=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,Vv(this.moduleName);case 3:this.module=e.sent,this.module,e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("aeria module load error",e.t0),this.module=null;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return n.apply(this,arguments)})},{key:"runYMenu",value:(t=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(n=t.gameId,this.module){e.next=4;break}return e.next=4,this.load();case 4:(new this.module.Aeria).renderYMenu({gameId:n});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),vD=function(){var e=this,t=function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),n=function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),r=function(){k.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){k.default(this,e);var r="html5.gamedistribution.com"!==R.default(window.location.href).host;return t()&&!(n()||r)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:t,isTokenGameURL:n,isExtHostedGameURL:r,whichFrame:a}},bD={isAeriaDomain:"minigame.aeriagames.jp"===(pD=(fD=new _w).get("partner.domain.value")||fD.get("top.domain.value"))||"minigame-stg.aeriagames.jp"===pD,isAeriaStagingDomain:"minigame-stg.aeriagames.jp"===pD},yD=bD.isAeriaStagingDomain;if(bD.isAeriaDomain){var _D=function(){var e,t="ae-soft-323";try{var n=(e=(new _w).get("partner.url.value"),new R.default(e,!0)),r=n.pathname,a=r.split("/"),i=a[a.length-1];rs("aeria-ylogin:loc",n,r,i),t=i}catch(e){as("Error on getting aeria game id",e)}return t}(),wD={action:"score",data:{gameId:_D,score:100},env:yD?"staging":"production",system:"Softgames"};(new a.EventBus).subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&function(){var e=window.parent||window,t=wD;e.postMessage(t,"*")}()}));var AD=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.next=2,(new gD).runYMenu({gameId:_D});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();"game-frame"===(0,vD().whichFrame)()&&AD()}var kD,ED=new m.EventEmitter,xD=["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(xD.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)kD=a,(window.parent||window).postMessage(n,"*"),ED.emit("aeria-event",n);else if(s){kD&&kD.postMessage(n,"*");var o=window.parent||window;o&&o.postMessage(n,"*")}}}),!1);var SD="https://html5.gamedistribution.com",DD="parent-data-request",TD="parent-data-response",RD=function(){function e(){D.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,a===SD&&s===DD){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:TD,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;r===SD&&i===TD&&(e(s),a=!0)})),setTimeout(function(){k.default(this,r),a||e()}.bind(this),1e3);var i={type:DD};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),OD=new RD,PD={SDKExistsOnUpperFrame:!1};function ID(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 CD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ID(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ID(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var LD=_.v4(),UD=null,MD=null,jD=function(){function e(t){var n=this;if(D.default(this,e),UD)return UD;UD=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 _w,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={preroll:0,midroll:0,rewarded: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,a,i=this;if((k.default(this,n),null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this._sendLoadedEvent(2),!0===(null===(r=this._gameData.lp)||void 0===r?void 0:r.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(a=this._gameData.evnts)&&void 0!==a&&a.enabled&&this._isLoaderGameURL()&&(aD(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){k.default(this,i),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),OD.init(this),this._send_gametag_data("sdk_init"),this._executeMidrollPlus()}.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 _w,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,YS();case 6:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"testConsent",value:function(){try{HS();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,zS({});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;XS.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(e){if(this._isLoaded||(this._isLoaded={}),!this._isLoaded[e]){this._isLoaded[e]=!0;var t="loader-frame"===this._whichFrame()&&(this._isHostHTML5Domain()||this._isExternalHoster());R.default(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{this._whichFrame(),this._sendTunnlEvent(e),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"})}catch(e){}}}},{key:"_sendGamedockGamePlay",value:function(){var e=this._isTokenGameURL();if(!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||!this._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:");rs("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=es.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._sendHLAnalyicsLog({query:n,eventType:e}),this.adInstance._send_atom_event("hl.config",n),this._send_gametag_data("sdk_gameplay")}},{key:"_sendHLAnalyicsLog",value:function(e){var t,n=this,r=e.query,a=e.eventType,i=this._gameData.dbglg;if(i&&i.enabled&&i.topics&&(1===a?t="hl.gameplay":2===a&&(t="hl.gameload"),t)){if(!i.topics.some(function(e){return k.default(this,n),e===t}.bind(this)))return;this.adInstance._send_atom_event(t,r)}}},{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:es.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:a.getMobilePlatform(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var t=[this._gameData.gmky.url];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;k.default(this,e),MD=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&MD.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),WS.track(MD,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=MD)||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,uA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus"],a.getScript(t[0],"locus",{alternates:t}).catch(function(e){k.default(this,n),this._sendSDKError(e)}.bind(this));case 8: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(){k.default(this,e);var t=this._getDeveloperDomains(),n=t.developerDomain,r=t.gameApiDomain;if(n){fetch("https://".concat(r,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}xS()}.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"),AS(),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&WS.track(MD,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,t=Kw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(es.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(h=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:t=!0,n=this._gameData,r=this._parentDomain.indexOf("gamedistribution.com")>=0,t=void 0===this._gameData.dmain||this._gameData.dmain,console.log("zxcv exclude, isAllowedDomain",r,t),t=t||r,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking();case 8:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new _w,a="html5.gamedistribution.com"!==R.default(document.referrer).host,i=n&&!PD.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&a;if(i&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,d=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===d?this._redirectToLoaderFrame():"to-blocked-page"===d&&this._redirectToBlocking(!0)}return{blocked:i}}},{key:"_redirectToBlocking",value:function(e){var t=this;this.msgrt.send("blocked");var n=this._gameData;setTimeout(A.default(x.default.mark((function r(){return x.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e){r.next=9;break}return r.prev=1,r.next=4,t.adInstance._send_atom_event("token-blocked");case 4:r.next=9;break;case 6:r.prev=6,r.t0=r.catch(1),console.log("Could not send dump.token-blocked",r.t0);case 9:window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(M.default.stringify({domain:t._parentDomain,id:n.gameId,img:t._get_game_thumbnail_url(),title:n.title}));case 10:case"end":return r.stop()}}),r,null,[[1,6]])}))),100)}},{key:"_redirectToLoaderFrame",value:function(){var e=this,t=this._gameData;setTimeout(A.default(x.default.mark((function n(){var r,a,i,s;return x.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.adInstance._send_atom_event("loader-redirect");case 3:n.next=8;break;case 5:n.prev=5,n.t0=n.catch(0),console.log("Could not send dump.loader-redirect",n.t0);case 8:r=R.default(location.href,!0),a=CD(CD({},r.query),{},{rd:"1"}),i=M.default.stringify(a),s="https://html5.gamedistribution.com/".concat(t.gameId,"/?").concat(i),window.location.href=s;case 13:case"end":return n.stop()}}),n,null,[[0,5]])}))),100)}},{key:"_checkGameDeleted",value:function(){var e=this;6===this._gameData.status&&(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;IS().disableMidrolltimer?e.midroll=0:a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&(a.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;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 jS(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=es,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){a.dankLog(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward,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,aA();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(CD(CD({},this.options),{},{isConsentDomain:n,version:es.version}),t,this._parentDomain),e.next=6,lA();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),is.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&&(iD({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(CD(CD({},this.options),{},{isConsentDomain:n,version:es.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(CD(CD({},this.options),{},{isConsentDomain:n,version:es.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(1),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 mD(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(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(a=r.gft)||void 0===a||null===(i=a[e].durations[this._giftCount[e]])||void 0===i?void 0:i.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(d=this._gameData)||void 0===d||null===(u=d.gft)||void 0===u||null===(c=u[e].durations[this._giftCount[e]])||void 0===c?void 0:c.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(f=this._gameData)||void 0===f||null===(p=f.gft)||void 0===p||null===(m=p[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=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()||(iD({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()||(iD({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"onRewardedWatchComplete",value:function(){this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"})}},{key:"onAdError",value:function(e){this.eventBus.broadcast("AD_ERROR",{message:e,status:"error"})}},{key:"openConsole",value:function(){try{new a.ImplementationTest(this).start(),a.Ls.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(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:"_shouldAllowExternalUrl",value:function(e){var t,n=this,r=new R.default(e),a=r.host;return r.href,((null===(t=this._gameData.urlBlockExc)||void 0===t?void 0:t.hosts)||[]).some(function(e){return k.default(this,n),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;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");if(!this._shouldAllowExternalUrl(a)){var i=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(i)}),!1}.bind(this))}}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,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:"_isHostHTML5Domain",value:function(){var e=new R.default(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_checkTokenGameUrl",value:function(){var e=R.default(location.href),t=e.origin,n=e.pathname,r="".concat(t).concat(n);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(r)}},{key:"_isTokenGameURL",value:function(){var e,t=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i,n="1"===(null===(e=R.default(location.href,!0).query)||void 0===e?void 0:e.rd);return t.test(location.href)||!n&&t.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new R.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 R.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new R.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 GS(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 BS(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 R.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 R.default(e,!0);return n.query=CD(CD({},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)MD.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(e){var t=this;try{var n,r=null===(n=this._gameData)||void 0===n?void 0:n.gft[e],i=setInterval(A.default(x.default.mark((function n(){var r=this;return x.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t.adInstance.requestRunning||t.adFlowRunning?console.log("Advertisement already running..."):(t.showAd(a.AdType.Interstitial,{position:e,isGift:!0}).catch(function(e){k.default(this,r)}.bind(this)),clearInterval(i),t._giftCount[e]++);case 1:case"end":return n.stop()}}),n,this)}))),1e3*r.durations[this._giftCount[e]].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return LD}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_getDeveloperDomains",value:function(){var e,t;return"developer.gamedistribution.com"===this._parentDomain||"developer-acc.gamedistribution.com"===this._parentDomain?e=this._parentDomain:!0===new RegExp("^localhost").test(this._parentDomain)&&(e="localhost"),e&&(t={"developer-acc.gamedistribution.com":"game-api-acc-real-aws.gamedistribution.com","developer.gamedistribution.com":"game.api.gamedistribution.com",localhost:"game-api-acc-real-aws.gamedistribution.com"}[e]),{developerDomain:e,gameApiDomain:t}}},{key:"_setGameRewardedFlag",value:function(){try{var e=this._getDeveloperDomains(),t=e.developerDomain,n=e.gameApiDomain;if(t){fetch("https://".concat(n,"/game/v2/hasrewarded/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var r=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(r,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(r,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,t=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return 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=this;if(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&this.adInstance.adMidrollCount<=0){var n,r=this._gameData.midroll_plus.type||"midroll";if(null!==(n=this._gameData.midroll_plus)&&void 0!==n&&n.interval)var i=setInterval(function(){var e,n,s=this;(k.default(this,t),this.adFlowRunning)||(this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r}).catch(function(e){k.default(this,s)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(n=this._gameData.midroll_plus)||void 0===n?void 0:n.interval)&&clearInterval(i))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;k.default(this,t),this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r}).catch(function(t){k.default(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),e}();function BD(){return(BD=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,uA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus"],console.log("locus loading"),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){k.default(this,n),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var GD=new m.EventEmitter,ND=function(e){var t=this;!function(){BD.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&&(GD.off("sdk-event",i),t())}.bind(this);GD.on("sdk-event",i),p("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return k.default(this,t),n||(n=new jD(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),c=function(){return k.default(this,t),p("showBanner")}.bind(this),l=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{GD.emit("sdk-event",n),e.onEvent&&e.onEvent(n)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:c,showAd:i,preloadAd:s,showDisplayAd:o,cancelAd:d,openConsole:u,getSession:l,onEvent:v,init:g,_sendSDKReady:f,sendGenericEvent:h}},qD=function(e){var t=ND(e);return t.init(),t},FD="gd-sdk-frame-handshake-request",VD="gd-sdk-frame-handshake-response",HD=function(e){var t=this;return new Promise(function(e,n){var r=this;k.default(this,t);var a={type:FD},i=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,s=n.type;if(s===FD){var o={type:VD};a.postMessage(o,r)}else s===VD&&(i=!0,e({origin:r,source:a}))})),setTimeout(function(){k.default(this,r),i||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},zD=function(){var e=A.default(x.default.mark((function e(){var t,n,r,a,i,s,o;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dA();case 2:return t=e.sent,e.next=6,HD();case 6:if(n=e.sent,PD.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return r=vD(),a=r.isMasterGameURL,r.isTokenGameURL,i=a(),e.next=14,cA();case 14:return s=e.sent,o=!1,o=s?!i&&!!n:!i,e.abrupt("return",o);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),WD=$e,KD=re,$D=$i,QD=Fa,JD=KD(Ma.f),YD=KD([].push),XD=function(e){return function(t){for(var n,r=QD(t),a=$D(r),i=a.length,s=0,o=[];i>s;)n=a[s++],WD&&!JD(r,n)||YD(o,e?[n,r[n]]:r[n]);return o}},ZD={entries:XD(!0),values:XD(!1)}.values;zi({target:"Object",stat:!0},{values:function(e){return ZD(e)}});var eT,tT={},nT=function(e){try{if(e.skipForward)return;if(tT.source){var t={type:"gd-sdk-on-event",event:e};tT.source.postMessage(t,tT.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},rT=function(){nT({name:"SDK_READY",status:"success",message:"Everything is ready."}),nT({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),nT({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},aT=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(!tT.source&&"init"===s)return function(e){var t=e.source,n=e.origin;tT={source:t,origin:n}}({source:a,origin:r}),void rT();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&&is.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)},iT=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){nT(e),t.apply(this,arguments)}}(e);var t=new jD(e);return aT(t),t},sT=function(e){try{var t=Fw(e);e.gameId||t.send("nogameid",{message:"".concat(iy.parentURL)})}catch(e){}},oT={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,sT(t),rA(t),e.next=5,zD();case 5:return n=e.sent,r=n?qD(t):iT(t),hA(),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",iT(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}()};function dT(){return(dT=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,mA();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,lT(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 uT,cT=!1;function lT(e){var t=this;return new Promise(function(n,r){var a=this;if(k.default(this,t),eT)return n(eT);if(cT)var i=setInterval(function(){k.default(this,a),eT&&(cT=!1,clearInterval(i),n(eT))}.bind(this),100);else cT=!0,oT.create(e).then(function(e){k.default(this,a),eT=e,e._sendSDKReady(),cT=!1,n(eT)}.bind(this))}.bind(this))}function hT(e){return lT(e),{invoke:function(t){return function(e,t){return dT.apply(this,arguments)}(e,t)}}}function fT(e){var t=this;return new Promise(function(n,r){var i=this;k.default(this,t);var s=["https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js"];a.getScript(s[0],"gd-sdk-wrp",{alternates:s}).catch(function(e){k.default(this,i),this._sendSDKError(e),r(e)}.bind(this)).then(A.default(x.default.mark((function t(){var r,a;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=window.GDSDKWRP.GDSDKWRP,a=new r,t.next=4,a.init(e);case 4:uT=t.sent,n(uT);case 6:case"end":return t.stop()}}),t)}))))}.bind(this))}function pT(e){return mT.apply(this,arguments)}function mT(){return(mT=A.default(x.default.mark((function e(t){var n,r,a,i;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return rA(t),e.next=3,aA();case 3:if(a=e.sent,!uT){e.next=6;break}return e.abrupt("return",uT);case 6:if(null==a||null===(n=a.sdk_wrp)||void 0===n?void 0:n.enabled){e.next=9;break}return e.abrupt("return");case 9:return i=null==a||null===(r=a.sdk_wrp)||void 0===r?void 0:r.wrapper,e.next=12,fT(i);case 12:return uT=e.sent,e.abrupt("return",uT);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gT(){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}"img.samsunapps.com"===R.default(window.location.href).host||function(){wS();var e=hT(gT());function t(){var t=this;this.AdType=a.AdType,this.preloadAd=function(t){var n=this;return e.invoke(function(e){return k.default(this,n),e.preloadAd(t)}.bind(this))},this.showAd=function(){var t=A.default(x.default.mark((function t(n,r){var i=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.invoke(function(e){var t=this;if(k.default(this,i),n===a.AdType.Display)return e.showDisplayAd(r);var s={};return function(){k.default(this,t),is.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),s.adapter="adsense")}.bind(this),e.showAd(n,s)}.bind(this)));case 1:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),this.cancelAd=function(){var t=this;return e.invoke(function(e){return k.default(this,t),e.cancelAd()}.bind(this))},this.openConsole=function(){var t=this;return e.invoke(function(e){return k.default(this,t),e.openConsole()}.bind(this))},this.getSession=function(){var t=this;return e.invoke(function(e){return k.default(this,t),e.session()}.bind(this))},this.sendEvent=function(t){var n=this;return e.invoke(function(e){return k.default(this,n),e.sendGenericEvent(t)}.bind(this))},this.leaderboard={show:function(){k.default(this,t),zv.showLeaderboard()}.bind(this),addScore:function(e){k.default(this,t),zv.addScore(e)}.bind(this)}}t.prototype=new function(){this.showBanner=function(){var t=this;return e.invoke(function(e){return k.default(this,t),e.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new t,window.gdApi=window.gdsdk}(),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 t=gT(),e.next=3,pT(t);case 3:(n=e.sent)&&(console.log("sdk-init: proceeding with gd-sdk wrapper initialize!..."),window.gdsdk=n,window.gdApi=window.gdsdk);case 5:case"end":return e.stop()}}),e)})))();
|