@bygd/gd-sdk-pes 1.32.3 → 1.32.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/newArrowCheck";import n from"@babel/runtime/helpers/typeof";import r from"@babel/runtime/regenerator";import{parseJSON as i,getParentUrl as a,getParentDomain as s,getIframeDepth as o,getQueryParams as c,getTopDomain as u,getMobilePlatform as d,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as g,Layers as v,getKeyByValue as b,getQueryString as y,EventBus as _,getIMASampleTags as w,SDKEvents as A,IMAEvents as k,Macros as E,setDankLog as x,ImplementationTest as S}from"@bygd/gd-sdk-era/dist/default";import R from"@babel/runtime/helpers/createClass";import D from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import O from"url-parse";import{Base64 as P}from"js-base64";import I from"validator";import C from"is-valid-domain";import L from"get-value";import U from"set-value";import M from"lodash.clonedeep";import{EventEmitter as j}from"events";import B from"can-autoplay";import{isPlainObject as G}from"is-plain-object";import N from"querystringify";import F from"lodash.merge";import{v4 as q}from"uuid";var V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},H=function(e){return e&&e.Math==Math&&e},z=H("object"==typeof globalThis&&globalThis)||H("object"==typeof window&&window)||H("object"==typeof self&&self)||H("object"==typeof V&&V)||function(){return this}()||Function("return this")(),W={exports:{}},K=z,$=Object.defineProperty,Q=function(e,t){try{$(K,e,{value:t,configurable:!0,writable:!0})}catch(n){K[e]=t}return t},J=Q,Y="__core-js_shared__",X=z[Y]||J(Y,{}),Z=X;(W.exports=function(e,t){return Z[e]||(Z[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 ee,te,ne=function(e){try{return!!e()}catch(e){return!0}},re=!ne((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ie=re,ae=Function.prototype,se=ae.call,oe=ie&&ae.bind.bind(se,se),ce=ie?oe:function(e){return function(){return se.apply(e,arguments)}},ue=function(e){return null==e},de=ue,le=TypeError,he=function(e){if(de(e))throw le("Can't call method on "+e);return e},pe=he,fe=Object,me=function(e){return fe(pe(e))},ge=me,ve=ce({}.hasOwnProperty),be=Object.hasOwn||function(e,t){return ve(ge(e),t)},ye=ce,_e=0,we=Math.random(),Ae=ye(1..toString),ke=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ae(++_e+we,36)},Ee="undefined"!=typeof navigator&&String(navigator.userAgent)||"",xe=z,Se=Ee,Re=xe.process,De=xe.Deno,Te=Re&&Re.versions||De&&De.version,Oe=Te&&Te.v8;Oe&&(te=(ee=Oe.split("."))[0]>0&&ee[0]<4?1:+(ee[0]+ee[1])),!te&&Se&&(!(ee=Se.match(/Edge\/(\d+)/))||ee[1]>=74)&&(ee=Se.match(/Chrome\/(\d+)/))&&(te=+ee[1]);var Pe=te,Ie=Pe,Ce=ne,Le=!!Object.getOwnPropertySymbols&&!Ce((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ie&&Ie<41})),Ue=Le&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=z,je=W.exports,Be=be,Ge=ke,Ne=Le,Fe=Ue,qe=Me.Symbol,Ve=je("wks"),He=Fe?qe.for||qe:qe&&qe.withoutSetter||Ge,ze=function(e){return Be(Ve,e)||(Ve[e]=Ne&&Be(qe,e)?qe[e]:He("Symbol."+e)),Ve[e]},We={};We[ze("toStringTag")]="z";var Ke="[object z]"===String(We),$e="object"==typeof document&&document.all,Qe={all:$e,IS_HTMLDDA:void 0===$e&&void 0!==$e},Je=Qe.all,Ye=Qe.IS_HTMLDDA?function(e){return"function"==typeof e||e===Je}:function(e){return"function"==typeof e},Xe={},Ze=!ne((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),et=Ye,tt=Qe.all,nt=Qe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:et(e)||e===tt}:function(e){return"object"==typeof e?null!==e:et(e)},rt=nt,it=z.document,at=rt(it)&&rt(it.createElement),st=function(e){return at?it.createElement(e):{}},ot=st,ct=!Ze&&!ne((function(){return 7!=Object.defineProperty(ot("div"),"a",{get:function(){return 7}}).a})),ut=Ze&&ne((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),dt=nt,lt=String,ht=TypeError,pt=function(e){if(dt(e))return e;throw ht(lt(e)+" is not an object")},ft=re,mt=Function.prototype.call,gt=ft?mt.bind(mt):function(){return mt.apply(mt,arguments)},vt=z,bt=Ye,yt=function(e,t){return arguments.length<2?(n=vt[e],bt(n)?n:void 0):vt[e]&&vt[e][t];var n},_t=ce({}.isPrototypeOf),wt=yt,At=Ye,kt=_t,Et=Object,xt=Ue?function(e){return"symbol"==typeof e}:function(e){var t=wt("Symbol");return At(t)&&kt(t.prototype,Et(e))},St=String,Rt=function(e){try{return St(e)}catch(e){return"Object"}},Dt=Ye,Tt=Rt,Ot=TypeError,Pt=function(e){if(Dt(e))return e;throw Ot(Tt(e)+" is not a function")},It=Pt,Ct=ue,Lt=function(e,t){var n=e[t];return Ct(n)?void 0:It(n)},Ut=gt,Mt=Ye,jt=nt,Bt=TypeError,Gt=gt,Nt=nt,Ft=xt,qt=Lt,Vt=function(e,t){var n,r;if("string"===t&&Mt(n=e.toString)&&!jt(r=Ut(n,e)))return r;if(Mt(n=e.valueOf)&&!jt(r=Ut(n,e)))return r;if("string"!==t&&Mt(n=e.toString)&&!jt(r=Ut(n,e)))return r;throw Bt("Can't convert object to primitive value")},Ht=TypeError,zt=ze("toPrimitive"),Wt=function(e,t){if(!Nt(e)||Ft(e))return e;var n,r=qt(e,zt);if(r){if(void 0===t&&(t="default"),n=Gt(r,e,t),!Nt(n)||Ft(n))return n;throw Ht("Can't convert object to primitive value")}return void 0===t&&(t="number"),Vt(e,t)},Kt=xt,$t=function(e){var t=Wt(e,"string");return Kt(t)?t:t+""},Qt=Ze,Jt=ct,Yt=ut,Xt=pt,Zt=$t,en=TypeError,tn=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,rn="enumerable",an="configurable",sn="writable";Xe.f=Qt?Yt?function(e,t,n){if(Xt(e),t=Zt(t),Xt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&sn in n&&!n[sn]){var r=nn(e,t);r&&r[sn]&&(e[t]=n.value,n={configurable:an in n?n[an]:r[an],enumerable:rn in n?n[rn]:r[rn],writable:!1})}return tn(e,t,n)}:tn:function(e,t,n){if(Xt(e),t=Zt(t),Xt(n),Jt)try{return tn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw en("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var on={exports:{}},cn=Ze,un=be,dn=Function.prototype,ln=cn&&Object.getOwnPropertyDescriptor,hn=un(dn,"name"),pn={EXISTS:hn,PROPER:hn&&"something"===function(){}.name,CONFIGURABLE:hn&&(!cn||cn&&ln(dn,"name").configurable)},fn=Ye,mn=X,gn=ce(Function.toString);fn(mn.inspectSource)||(mn.inspectSource=function(e){return gn(e)});var vn,bn,yn,_n=mn.inspectSource,wn=Ye,An=z.WeakMap,kn=wn(An)&&/native code/.test(String(An)),En=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},xn=Xe,Sn=En,Rn=Ze?function(e,t,n){return xn.f(e,t,Sn(1,n))}:function(e,t,n){return e[t]=n,e},Dn=W.exports,Tn=ke,On=Dn("keys"),Pn=function(e){return On[e]||(On[e]=Tn(e))},In={},Cn=kn,Ln=z,Un=nt,Mn=Rn,jn=be,Bn=X,Gn=Pn,Nn=In,Fn="Object already initialized",qn=Ln.TypeError,Vn=Ln.WeakMap;if(Cn||Bn.state){var Hn=Bn.state||(Bn.state=new Vn);Hn.get=Hn.get,Hn.has=Hn.has,Hn.set=Hn.set,vn=function(e,t){if(Hn.has(e))throw qn(Fn);return t.facade=e,Hn.set(e,t),t},bn=function(e){return Hn.get(e)||{}},yn=function(e){return Hn.has(e)}}else{var zn=Gn("state");Nn[zn]=!0,vn=function(e,t){if(jn(e,zn))throw qn(Fn);return t.facade=e,Mn(e,zn,t),t},bn=function(e){return jn(e,zn)?e[zn]:{}},yn=function(e){return jn(e,zn)}}var Wn={set:vn,get:bn,has:yn,enforce:function(e){return yn(e)?bn(e):vn(e,{})},getterFor:function(e){return function(t){var n;if(!Un(t)||(n=bn(t)).type!==e)throw qn("Incompatible receiver, "+e+" required");return n}}},Kn=ce,$n=ne,Qn=Ye,Jn=be,Yn=Ze,Xn=pn.CONFIGURABLE,Zn=_n,er=Wn.enforce,tr=Wn.get,nr=String,rr=Object.defineProperty,ir=Kn("".slice),ar=Kn("".replace),sr=Kn([].join),or=Yn&&!$n((function(){return 8!==rr((function(){}),"length",{value:8}).length})),cr=String(String).split("String"),ur=on.exports=function(e,t,n){"Symbol("===ir(nr(t),0,7)&&(t="["+ar(nr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Jn(e,"name")||Xn&&e.name!==t)&&(Yn?rr(e,"name",{value:t,configurable:!0}):e.name=t),or&&n&&Jn(n,"arity")&&e.length!==n.arity&&rr(e,"length",{value:n.arity});try{n&&Jn(n,"constructor")&&n.constructor?Yn&&rr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=er(e);return Jn(r,"source")||(r.source=sr(cr,"string"==typeof t?t:"")),e};Function.prototype.toString=ur((function(){return Qn(this)&&tr(this).source||Zn(this)}),"toString");var dr=Ye,lr=Xe,hr=on.exports,pr=Q,fr=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(dr(n)&&hr(n,a,r),r.global)i?e[t]=n:pr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:lr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},mr=ce,gr=mr({}.toString),vr=mr("".slice),br=function(e){return vr(gr(e),8,-1)},yr=Ke,_r=Ye,wr=br,Ar=ze("toStringTag"),kr=Object,Er="Arguments"==wr(function(){return arguments}()),xr=yr?wr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=kr(e),Ar))?n:Er?wr(t):"Object"==(r=wr(t))&&_r(t.callee)?"Arguments":r},Sr=xr,Rr=Ke?{}.toString:function(){return"[object "+Sr(this)+"]"};Ke||fr(Object.prototype,"toString",Rr,{unsafe:!0});var Dr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Tr=st("span").classList,Or=Tr&&Tr.constructor&&Tr.constructor.prototype,Pr=Or===Object.prototype?void 0:Or,Ir=br,Cr=ce,Lr=function(e){if("Function"===Ir(e))return Cr(e)},Ur=Pt,Mr=re,jr=Lr(Lr.bind),Br=function(e,t){return Ur(e),void 0===t?e:Mr?jr(e,t):function(){return e.apply(t,arguments)}},Gr=ne,Nr=br,Fr=Object,qr=ce("".split),Vr=Gr((function(){return!Fr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Nr(e)?qr(e,""):Fr(e)}:Fr,Hr=Math.ceil,zr=Math.floor,Wr=Math.trunc||function(e){var t=+e;return(t>0?zr:Hr)(t)},Kr=function(e){var t=+e;return t!=t||0===t?0:Wr(t)},$r=Kr,Qr=Math.min,Jr=function(e){return e>0?Qr($r(e),9007199254740991):0},Yr=Jr,Xr=function(e){return Yr(e.length)},Zr=br,ei=Array.isArray||function(e){return"Array"==Zr(e)},ti=ce,ni=ne,ri=Ye,ii=xr,ai=_n,si=function(){},oi=[],ci=yt("Reflect","construct"),ui=/^\s*(?:class|function)\b/,di=ti(ui.exec),li=!ui.exec(si),hi=function(e){if(!ri(e))return!1;try{return ci(si,oi,e),!0}catch(e){return!1}},pi=function(e){if(!ri(e))return!1;switch(ii(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return li||!!di(ui,ai(e))}catch(e){return!0}};pi.sham=!0;var fi=!ci||ni((function(){var e;return hi(hi.call)||!hi(Object)||!hi((function(){e=!0}))||e}))?pi:hi,mi=ei,gi=fi,vi=nt,bi=ze("species"),yi=Array,_i=function(e){var t;return mi(e)&&(t=e.constructor,(gi(t)&&(t===yi||mi(t.prototype))||vi(t)&&null===(t=t[bi]))&&(t=void 0)),void 0===t?yi:t},wi=function(e,t){return new(_i(e))(0===t?0:t)},Ai=Br,ki=Vr,Ei=me,xi=Xr,Si=wi,Ri=ce([].push),Di=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,s=7==e,o=5==e||a;return function(c,u,d,l){for(var h,p,f=Ei(c),m=ki(f),g=Ai(u,d),v=xi(m),b=0,y=l||Si,_=t?y(c,v):n||s?y(c,0):void 0;v>b;b++)if((o||b in m)&&(p=g(h=m[b],b,f),e))if(t)_[b]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:Ri(_,h)}else switch(e){case 4:return!1;case 7:Ri(_,h)}return a?-1:r||i?i:_}},Ti={forEach:Di(0),map:Di(1),filter:Di(2),some:Di(3),every:Di(4),find:Di(5),findIndex:Di(6),filterReject:Di(7)},Oi=ne,Pi=function(e,t){var n=[][e];return!!n&&Oi((function(){n.call(null,t||function(){return 1},1)}))},Ii=Ti.forEach,Ci=z,Li=Dr,Ui=Pr,Mi=Pi("forEach")?[].forEach:function(e){return Ii(this,e,arguments.length>1?arguments[1]:void 0)},ji=Rn,Bi=function(e){if(e&&e.forEach!==Mi)try{ji(e,"forEach",Mi)}catch(t){e.forEach=Mi}};for(var Gi in Li)Li[Gi]&&Bi(Ci[Gi]&&Ci[Gi].prototype);Bi(Ui);var Ni={},Fi={},qi={}.propertyIsEnumerable,Vi=Object.getOwnPropertyDescriptor,Hi=Vi&&!qi.call({1:2},1);Fi.f=Hi?function(e){var t=Vi(this,e);return!!t&&t.enumerable}:qi;var zi=Vr,Wi=he,Ki=function(e){return zi(Wi(e))},$i=Ze,Qi=gt,Ji=Fi,Yi=En,Xi=Ki,Zi=$t,ea=be,ta=ct,na=Object.getOwnPropertyDescriptor;Ni.f=$i?na:function(e,t){if(e=Xi(e),t=Zi(t),ta)try{return na(e,t)}catch(e){}if(ea(e,t))return Yi(!Qi(Ji.f,e,t),e[t])};var ra={},ia=Kr,aa=Math.max,sa=Math.min,oa=function(e,t){var n=ia(e);return n<0?aa(n+t,0):sa(n,t)},ca=Ki,ua=oa,da=Xr,la=function(e){return function(t,n,r){var i,a=ca(t),s=da(a),o=ua(r,s);if(e&&n!=n){for(;s>o;)if((i=a[o++])!=i)return!0}else for(;s>o;o++)if((e||o in a)&&a[o]===n)return e||o||0;return!e&&-1}},ha={includes:la(!0),indexOf:la(!1)},pa=be,fa=Ki,ma=ha.indexOf,ga=In,va=ce([].push),ba=function(e,t){var n,r=fa(e),i=0,a=[];for(n in r)!pa(ga,n)&&pa(r,n)&&va(a,n);for(;t.length>i;)pa(r,n=t[i++])&&(~ma(a,n)||va(a,n));return a},ya=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_a=ba,wa=ya.concat("length","prototype");ra.f=Object.getOwnPropertyNames||function(e){return _a(e,wa)};var Aa={};Aa.f=Object.getOwnPropertySymbols;var ka=yt,Ea=ra,xa=Aa,Sa=pt,Ra=ce([].concat),Da=ka("Reflect","ownKeys")||function(e){var t=Ea.f(Sa(e)),n=xa.f;return n?Ra(t,n(e)):t},Ta=be,Oa=Da,Pa=Ni,Ia=Xe,Ca=function(e,t,n){for(var r=Oa(t),i=Ia.f,a=Pa.f,s=0;s<r.length;s++){var o=r[s];Ta(e,o)||n&&Ta(n,o)||i(e,o,a(t,o))}},La=ne,Ua=Ye,Ma=/#|\.prototype\./,ja=function(e,t){var n=Ga[Ba(e)];return n==Fa||n!=Na&&(Ua(t)?La(t):!!t)},Ba=ja.normalize=function(e){return String(e).replace(Ma,".").toLowerCase()},Ga=ja.data={},Na=ja.NATIVE="N",Fa=ja.POLYFILL="P",qa=ja,Va=z,Ha=Ni.f,za=Rn,Wa=fr,Ka=Q,$a=Ca,Qa=qa,Ja=function(e,t){var n,r,i,a,s,o=e.target,c=e.global,u=e.stat;if(n=c?Va:u?Va[o]||Ka(o,{}):(Va[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Ha(n,r))&&s.value:n[r],!Qa(c?r:o+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;$a(a,i)}(e.sham||i&&i.sham)&&za(a,"sham",!0),Wa(n,r,a,e)}},Ya=ba,Xa=ya,Za=Object.keys||function(e){return Ya(e,Xa)},es=me,ts=Za;Ja({target:"Object",stat:!0,forced:ne((function(){ts(1)}))},{keys:function(e){return ts(es(e))}});var ns=Array.isArray,rs=Object.prototype.toString,is=ns||function(e){return!!e&&"[object Array]"==rs.call(e)},as={name:"@bygd/gd-sdk-pes",version:"1.32.3",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"}},ss=function(e){var t=os("object"===n(e)?e:i(e));return t&&t.version?as.version>=t.version?t:void 0:t},os=function(e){var n=this;if(!is(e)||0===e.length)return e;if(1===e.length)return e[0];var r=0;e.forEach(function(e){t(this,n),e.weight=e.weight||1,r+=e.weight}.bind(this));var i=Math.floor(Math.random()*Math.floor(r));r=0;for(var a=0;a<e.length;a++){var s=e[a];if(i<(r+=s.weight))return s}},cs=function(){var e;(e=console).log.apply(e,arguments)},us=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 ds={},ls=xr,hs=String,ps=function(e){if("Symbol"===ls(e))throw TypeError("Cannot convert a Symbol value to a string");return hs(e)},fs={},ms=Ze,gs=ut,vs=Xe,bs=pt,ys=Ki,_s=Za;fs.f=ms&&!gs?Object.defineProperties:function(e,t){bs(e);for(var n,r=ys(t),i=_s(t),a=i.length,s=0;a>s;)vs.f(e,n=i[s++],r[n]);return e};var ws,As=yt("document","documentElement"),ks=pt,Es=fs,xs=ya,Ss=In,Rs=As,Ds=st,Ts="prototype",Os="script",Ps=Pn("IE_PROTO"),Is=function(){},Cs=function(e){return"<"+Os+">"+e+"</"+Os+">"},Ls=function(e){e.write(Cs("")),e.close();var t=e.parentWindow.Object;return e=null,t},Us=function(){try{ws=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Us="undefined"!=typeof document?document.domain&&ws?Ls(ws):(t=Ds("iframe"),n="java"+Os+":",t.style.display="none",Rs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Cs("document.F=Object")),e.close(),e.F):Ls(ws);for(var r=xs.length;r--;)delete Us[Ts][xs[r]];return Us()};Ss[Ps]=!0;var Ms=Object.create||function(e,t){var n;return null!==e?(Is[Ts]=ks(e),n=new Is,Is[Ts]=null,n[Ps]=e):n=Us(),void 0===t?n:Es.f(n,t)},js={},Bs=$t,Gs=Xe,Ns=En,Fs=function(e,t,n){var r=Bs(t);r in e?Gs.f(e,r,Ns(0,n)):e[r]=n},Vs=oa,Hs=Xr,zs=Fs,Ws=Array,Ks=Math.max,$s=function(e,t,n){for(var r=Hs(e),i=Vs(t,r),a=Vs(void 0===n?r:n,r),s=Ws(Ks(a-i,0)),o=0;i<a;i++,o++)zs(s,o,e[i]);return s.length=o,s},Qs=br,Js=Ki,Ys=ra.f,Xs=$s,Zs="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];js.f=function(e){return Zs&&"Window"==Qs(e)?function(e){try{return Ys(e)}catch(e){return Xs(Zs)}}(e):Ys(Js(e))};var eo=on.exports,to=Xe,no=function(e,t,n){return n.get&&eo(n.get,t,{getter:!0}),n.set&&eo(n.set,t,{setter:!0}),to.f(e,t,n)},ro={},io=ze;ro.f=io;var ao=z,so=be,oo=ro,co=Xe.f,uo=function(e){var t=ao.Symbol||(ao.Symbol={});so(t,e)||co(t,e,{value:oo.f(e)})},lo=gt,ho=yt,po=ze,fo=fr,mo=Xe.f,go=be,vo=ze("toStringTag"),bo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!go(e,vo)&&mo(e,vo,{configurable:!0,value:t})},yo=Ja,_o=z,wo=gt,Ao=ce,ko=Ze,Eo=Le,xo=ne,So=be,Ro=_t,Do=pt,To=Ki,Oo=$t,Po=ps,Io=En,Co=Ms,Lo=Za,Uo=ra,Mo=js,jo=Aa,Bo=Ni,Go=Xe,No=fs,Fo=Fi,qo=fr,Vo=no,Ho=W.exports,zo=In,Wo=ke,Ko=ze,$o=ro,Qo=uo,Jo=function(){var e=ho("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=po("toPrimitive");t&&!t[r]&&fo(t,r,(function(e){return lo(n,this)}),{arity:1})},Yo=bo,Xo=Wn,Zo=Ti.forEach,ec=Pn("hidden"),tc="Symbol",nc="prototype",rc=Xo.set,ic=Xo.getterFor(tc),ac=Object[nc],sc=_o.Symbol,oc=sc&&sc[nc],cc=_o.TypeError,uc=_o.QObject,dc=Bo.f,lc=Go.f,hc=Mo.f,pc=Fo.f,fc=Ao([].push),mc=Ho("symbols"),gc=Ho("op-symbols"),vc=Ho("wks"),bc=!uc||!uc[nc]||!uc[nc].findChild,yc=ko&&xo((function(){return 7!=Co(lc({},"a",{get:function(){return lc(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=dc(ac,t);r&&delete ac[t],lc(e,t,n),r&&e!==ac&&lc(ac,t,r)}:lc,_c=function(e,t){var n=mc[e]=Co(oc);return rc(n,{type:tc,tag:e,description:t}),ko||(n.description=t),n},wc=function(e,t,n){e===ac&&wc(gc,t,n),Do(e);var r=Oo(t);return Do(n),So(mc,r)?(n.enumerable?(So(e,ec)&&e[ec][r]&&(e[ec][r]=!1),n=Co(n,{enumerable:Io(0,!1)})):(So(e,ec)||lc(e,ec,Io(1,{})),e[ec][r]=!0),yc(e,r,n)):lc(e,r,n)},Ac=function(e,t){Do(e);var n=To(t),r=Lo(n).concat(Sc(n));return Zo(r,(function(t){ko&&!wo(kc,n,t)||wc(e,t,n[t])})),e},kc=function(e){var t=Oo(e),n=wo(pc,this,t);return!(this===ac&&So(mc,t)&&!So(gc,t))&&(!(n||!So(this,t)||!So(mc,t)||So(this,ec)&&this[ec][t])||n)},Ec=function(e,t){var n=To(e),r=Oo(t);if(n!==ac||!So(mc,r)||So(gc,r)){var i=dc(n,r);return!i||!So(mc,r)||So(n,ec)&&n[ec][r]||(i.enumerable=!0),i}},xc=function(e){var t=hc(To(e)),n=[];return Zo(t,(function(e){So(mc,e)||So(zo,e)||fc(n,e)})),n},Sc=function(e){var t=e===ac,n=hc(t?gc:To(e)),r=[];return Zo(n,(function(e){!So(mc,e)||t&&!So(ac,e)||fc(r,mc[e])})),r};Eo||(qo(oc=(sc=function(){if(Ro(oc,this))throw cc("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Po(arguments[0]):void 0,t=Wo(e),n=function(e){this===ac&&wo(n,gc,e),So(this,ec)&&So(this[ec],t)&&(this[ec][t]=!1),yc(this,t,Io(1,e))};return ko&&bc&&yc(ac,t,{configurable:!0,set:n}),_c(t,e)})[nc],"toString",(function(){return ic(this).tag})),qo(sc,"withoutSetter",(function(e){return _c(Wo(e),e)})),Fo.f=kc,Go.f=wc,No.f=Ac,Bo.f=Ec,Uo.f=Mo.f=xc,jo.f=Sc,$o.f=function(e){return _c(Ko(e),e)},ko&&(Vo(oc,"description",{configurable:!0,get:function(){return ic(this).description}}),qo(ac,"propertyIsEnumerable",kc,{unsafe:!0}))),yo({global:!0,constructor:!0,wrap:!0,forced:!Eo,sham:!Eo},{Symbol:sc}),Zo(Lo(vc),(function(e){Qo(e)})),yo({target:tc,stat:!0,forced:!Eo},{useSetter:function(){bc=!0},useSimple:function(){bc=!1}}),yo({target:"Object",stat:!0,forced:!Eo,sham:!ko},{create:function(e,t){return void 0===t?Co(e):Ac(Co(e),t)},defineProperty:wc,defineProperties:Ac,getOwnPropertyDescriptor:Ec}),yo({target:"Object",stat:!0,forced:!Eo},{getOwnPropertyNames:xc}),Jo(),Yo(sc,tc),zo[ec]=!0;var Rc=Le&&!!Symbol.for&&!!Symbol.keyFor,Dc=Ja,Tc=yt,Oc=be,Pc=ps,Ic=W.exports,Cc=Rc,Lc=Ic("string-to-symbol-registry"),Uc=Ic("symbol-to-string-registry");Dc({target:"Symbol",stat:!0,forced:!Cc},{for:function(e){var t=Pc(e);if(Oc(Lc,t))return Lc[t];var n=Tc("Symbol")(t);return Lc[t]=n,Uc[n]=t,n}});var Mc=Ja,jc=be,Bc=xt,Gc=Rt,Nc=Rc,Fc=(0,W.exports)("symbol-to-string-registry");Mc({target:"Symbol",stat:!0,forced:!Nc},{keyFor:function(e){if(!Bc(e))throw TypeError(Gc(e)+" is not a symbol");if(jc(Fc,e))return Fc[e]}});var qc=re,Vc=Function.prototype,Hc=Vc.apply,zc=Vc.call,Wc="object"==typeof Reflect&&Reflect.apply||(qc?zc.bind(Hc):function(){return zc.apply(Hc,arguments)}),Kc=ce([].slice),$c=ei,Qc=Ye,Jc=br,Yc=ps,Xc=ce([].push),Zc=Ja,eu=yt,tu=Wc,nu=gt,ru=ce,iu=ne,au=Ye,su=xt,ou=Kc,cu=function(e){if(Qc(e))return e;if($c(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Xc(n,i):"number"!=typeof i&&"Number"!=Jc(i)&&"String"!=Jc(i)||Xc(n,Yc(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if($c(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},uu=Le,du=String,lu=eu("JSON","stringify"),hu=ru(/./.exec),pu=ru("".charAt),fu=ru("".charCodeAt),mu=ru("".replace),gu=ru(1..toString),vu=/[\uD800-\uDFFF]/g,bu=/^[\uD800-\uDBFF]$/,yu=/^[\uDC00-\uDFFF]$/,_u=!uu||iu((function(){var e=eu("Symbol")();return"[null]"!=lu([e])||"{}"!=lu({a:e})||"{}"!=lu(Object(e))})),wu=iu((function(){return'"\\udf06\\ud834"'!==lu("\udf06\ud834")||'"\\udead"'!==lu("\udead")})),Au=function(e,t){var n=ou(arguments),r=cu(t);if(au(r)||void 0!==e&&!su(e))return n[1]=function(e,t){if(au(r)&&(t=nu(r,this,du(e),t)),!su(t))return t},tu(lu,null,n)},ku=function(e,t,n){var r=pu(n,t-1),i=pu(n,t+1);return hu(bu,e)&&!hu(yu,i)||hu(yu,e)&&!hu(bu,r)?"\\u"+gu(fu(e,0),16):e};lu&&Zc({target:"JSON",stat:!0,arity:3,forced:_u||wu},{stringify:function(e,t,n){var r=ou(arguments),i=tu(_u?Au:lu,null,r);return wu&&"string"==typeof i?mu(i,vu,ku):i}});var Eu=Aa,xu=me;Ja({target:"Object",stat:!0,forced:!Le||ne((function(){Eu.f(1)}))},{getOwnPropertySymbols:function(e){var t=Eu.f;return t?t(xu(e)):[]}});var Su=ne,Ru=Pe,Du=ze("species"),Tu=function(e){return Ru>=51||!Su((function(){var t=[];return(t.constructor={})[Du]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ou=Ti.filter;Ja({target:"Array",proto:!0,forced:!Tu("filter")},{filter:function(e){return Ou(this,e,arguments.length>1?arguments[1]:void 0)}});var Pu=Ja,Iu=ne,Cu=Ki,Lu=Ni.f,Uu=Ze;Pu({target:"Object",stat:!0,forced:!Uu||Iu((function(){Lu(1)})),sham:!Uu},{getOwnPropertyDescriptor:function(e,t){return Lu(Cu(e),t)}});var Mu=Da,ju=Ki,Bu=Ni,Gu=Fs;Ja({target:"Object",stat:!0,sham:!Ze},{getOwnPropertyDescriptors:function(e){for(var t,n,r=ju(e),i=Bu.f,a=Mu(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&Gu(s,t,n);return s}});var Nu=Ja,Fu=ei,qu=fi,Vu=nt,Hu=oa,zu=Xr,Wu=Ki,Ku=Fs,$u=ze,Qu=Kc,Ju=Tu("slice"),Yu=$u("species"),Xu=Array,Zu=Math.max;Nu({target:"Array",proto:!0,forced:!Ju},{slice:function(e,t){var n,r,i,a=Wu(this),s=zu(a),o=Hu(e,s),c=Hu(void 0===t?s:t,s);if(Fu(a)&&(n=a.constructor,(qu(n)&&(n===Xu||Fu(n.prototype))||Vu(n)&&null===(n=n[Yu]))&&(n=void 0),n===Xu||void 0===n))return Qu(a,o,c);for(r=new(void 0===n?Xu:n)(Zu(c-o,0)),i=0;o<c;o++,i++)o in a&&Ku(r,i,a[o]);return r.length=i,r}});var ed=gt,td=pt,nd=Lt,rd=function(e,t,n){var r,i;td(e);try{if(!(r=nd(e,"return"))){if("throw"===t)throw n;return n}r=ed(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return td(r),n},id=pt,ad=rd,sd={},od=sd,cd=ze("iterator"),ud=Array.prototype,dd=function(e){return void 0!==e&&(od.Array===e||ud[cd]===e)},ld=xr,hd=Lt,pd=ue,fd=sd,md=ze("iterator"),gd=function(e){if(!pd(e))return hd(e,md)||hd(e,"@@iterator")||fd[ld(e)]},vd=gt,bd=Pt,yd=pt,_d=Rt,wd=gd,Ad=TypeError,kd=function(e,t){var n=arguments.length<2?wd(e):t;if(bd(n))return yd(vd(n,e));throw Ad(_d(e)+" is not iterable")},Ed=Br,xd=gt,Sd=me,Rd=function(e,t,n,r){try{return r?t(id(n)[0],n[1]):t(n)}catch(t){ad(e,"throw",t)}},Dd=dd,Td=fi,Od=Xr,Pd=Fs,Id=kd,Cd=gd,Ld=Array,Ud=function(e){var t=Sd(e),n=Td(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Ed(i,r>2?arguments[2]:void 0));var s,o,c,u,d,l,h=Cd(t),p=0;if(!h||this===Ld&&Dd(h))for(s=Od(t),o=n?new this(s):Ld(s);s>p;p++)l=a?i(t[p],p):t[p],Pd(o,p,l);else for(d=(u=Id(t,h)).next,o=n?new this:[];!(c=xd(d,u)).done;p++)l=a?Rd(u,i,[c.value,p],!0):c.value,Pd(o,p,l);return o.length=p,o},Md=ze("iterator"),jd=!1;try{var Bd=0,Gd={next:function(){return{done:!!Bd++}},return:function(){jd=!0}};Gd[Md]=function(){return this},Array.from(Gd,(function(){throw 2}))}catch(e){}var Nd=function(e,t){if(!t&&!jd)return!1;var n=!1;try{var r={};r[Md]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Fd=Ud;Ja({target:"Array",stat:!0,forced:!Nd((function(e){Array.from(e)}))},{from:Fd});var qd,Vd,Hd,zd=ce,Wd=Kr,Kd=ps,$d=he,Qd=zd("".charAt),Jd=zd("".charCodeAt),Yd=zd("".slice),Xd=function(e){return function(t,n){var r,i,a=Kd($d(t)),s=Wd(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Jd(a,s))<55296||r>56319||s+1===o||(i=Jd(a,s+1))<56320||i>57343?e?Qd(a,s):r:e?Yd(a,s,s+2):i-56320+(r-55296<<10)+65536}},Zd={codeAt:Xd(!1),charAt:Xd(!0)},el=!ne((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),tl=be,nl=Ye,rl=me,il=el,al=Pn("IE_PROTO"),sl=Object,ol=sl.prototype,cl=il?sl.getPrototypeOf:function(e){var t=rl(e);if(tl(t,al))return t[al];var n=t.constructor;return nl(n)&&t instanceof n?n.prototype:t instanceof sl?ol:null},ul=ne,dl=Ye,ll=nt,hl=cl,pl=fr,fl=ze("iterator"),ml=!1;[].keys&&("next"in(Hd=[].keys())?(Vd=hl(hl(Hd)))!==Object.prototype&&(qd=Vd):ml=!0);var gl=!ll(qd)||ul((function(){var e={};return qd[fl].call(e)!==e}));gl&&(qd={}),dl(qd[fl])||pl(qd,fl,(function(){return this}));var vl={IteratorPrototype:qd,BUGGY_SAFARI_ITERATORS:ml},bl=vl.IteratorPrototype,yl=Ms,_l=En,wl=bo,Al=sd,kl=function(){return this},El=function(e,t,n,r){var i=t+" Iterator";return e.prototype=yl(bl,{next:_l(+!r,n)}),wl(e,i,!1),Al[i]=kl,e},xl=ce,Sl=Pt,Rl=Ye,Dl=String,Tl=TypeError,Ol=function(e,t,n){try{return xl(Sl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Pl=pt,Il=function(e){if("object"==typeof e||Rl(e))return e;throw Tl("Can't set "+Dl(e)+" as a prototype")},Cl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Ol(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Pl(n),Il(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ll=Ja,Ul=gt,Ml=Ye,jl=El,Bl=cl,Gl=Cl,Nl=bo,Fl=Rn,ql=fr,Vl=sd,Hl=pn.PROPER,zl=pn.CONFIGURABLE,Wl=vl.IteratorPrototype,Kl=vl.BUGGY_SAFARI_ITERATORS,$l=ze("iterator"),Ql="keys",Jl="values",Yl="entries",Xl=function(){return this},Zl=function(e,t,n,r,i,a,s){jl(n,t,r);var o,c,u,d=function(e){if(e===i&&m)return m;if(!Kl&&e in p)return p[e];switch(e){case Ql:case Jl:case Yl:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[$l]||p["@@iterator"]||i&&p[i],m=!Kl&&f||d(i),g="Array"==t&&p.entries||f;if(g&&(o=Bl(g.call(new e)))!==Object.prototype&&o.next&&(Bl(o)!==Wl&&(Gl?Gl(o,Wl):Ml(o[$l])||ql(o,$l,Xl)),Nl(o,l,!0)),Hl&&i==Jl&&f&&f.name!==Jl&&(zl?Fl(p,"name",Jl):(h=!0,m=function(){return Ul(f,this)})),i)if(c={values:d(Jl),keys:a?m:d(Ql),entries:d(Yl)},s)for(u in c)(Kl||h||!(u in p))&&ql(p,u,c[u]);else Ll({target:t,proto:!0,forced:Kl||h},c);return p[$l]!==m&&ql(p,$l,m,{name:i}),Vl[t]=m,c},eh=function(e,t){return{value:e,done:t}},th=Zd.charAt,nh=ps,rh=Wn,ih=Zl,ah=eh,sh="String Iterator",oh=rh.set,ch=rh.getterFor(sh);ih(String,"String",(function(e){oh(this,{type:sh,string:nh(e),index:0})}),(function(){var e,t=ch(this),n=t.string,r=t.index;return r>=n.length?ah(void 0,!0):(e=th(n,r),t.index+=e.length,ah(e,!1))}));var uh=pt,dh=function(){var e=uh(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},lh=ne,hh=z.RegExp,ph=lh((function(){var e=hh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),fh=ph||lh((function(){return!hh("a","y").sticky})),mh={BROKEN_CARET:ph||lh((function(){var e=hh("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:fh,UNSUPPORTED_Y:ph},gh=ne,vh=z.RegExp,bh=gh((function(){var e=vh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),yh=ne,_h=z.RegExp,wh=yh((function(){var e=_h("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ah=gt,kh=ce,Eh=ps,xh=dh,Sh=mh,Rh=W.exports,Dh=Ms,Th=Wn.get,Oh=bh,Ph=wh,Ih=Rh("native-string-replace",String.prototype.replace),Ch=RegExp.prototype.exec,Lh=Ch,Uh=kh("".charAt),Mh=kh("".indexOf),jh=kh("".replace),Bh=kh("".slice),Gh=function(){var e=/a/,t=/b*/g;return Ah(Ch,e,"a"),Ah(Ch,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Nh=Sh.BROKEN_CARET,Fh=void 0!==/()??/.exec("")[1];(Gh||Fh||Nh||Oh||Ph)&&(Lh=function(e){var t,n,r,i,a,s,o,c=this,u=Th(c),d=Eh(e),l=u.raw;if(l)return l.lastIndex=c.lastIndex,t=Ah(Lh,l,d),c.lastIndex=l.lastIndex,t;var h=u.groups,p=Nh&&c.sticky,f=Ah(xh,c),m=c.source,g=0,v=d;if(p&&(f=jh(f,"y",""),-1===Mh(f,"g")&&(f+="g"),v=Bh(d,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Uh(d,c.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",f)),Fh&&(n=new RegExp("^"+m+"$(?!\\s)",f)),Gh&&(r=c.lastIndex),i=Ah(Ch,p?n:c,v),p?i?(i.input=Bh(i.input,g),i[0]=Bh(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Gh&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),Fh&&i&&i.length>1&&Ah(Ih,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=s=Dh(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var qh=Lh;Ja({target:"RegExp",proto:!0,forced:/./.exec!==qh},{exec:qh});var Vh=Ja,Hh=Ze,zh=ce,Wh=be,Kh=Ye,$h=_t,Qh=ps,Jh=no,Yh=Ca,Xh=z.Symbol,Zh=Xh&&Xh.prototype;if(Hh&&Kh(Xh)&&(!("description"in Zh)||void 0!==Xh().description)){var ep={},tp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Qh(arguments[0]),t=$h(Zh,this)?new Xh(e):void 0===e?Xh():Xh(e);return""===e&&(ep[t]=!0),t};Yh(tp,Xh),tp.prototype=Zh,Zh.constructor=tp;var np="Symbol(test)"==String(Xh("test")),rp=zh(Zh.valueOf),ip=zh(Zh.toString),ap=/^Symbol\((.*)\)[^)]+$/,sp=zh("".replace),op=zh("".slice);Jh(Zh,"description",{configurable:!0,get:function(){var e=rp(this);if(Wh(ep,e))return"";var t=ip(e),n=np?op(t,7,-1):sp(t,ap,"$1");return""===n?void 0:n}}),Vh({global:!0,constructor:!0,forced:!0},{Symbol:tp})}uo("iterator");var cp=ze,up=Ms,dp=Xe.f,lp=cp("unscopables"),hp=Array.prototype;null==hp[lp]&&dp(hp,lp,{configurable:!0,value:up(null)});var pp=function(e){hp[lp][e]=!0},fp=Ki,mp=pp,gp=sd,vp=Wn,bp=Xe.f,yp=Zl,_p=eh,wp=Ze,Ap="Array Iterator",kp=vp.set,Ep=vp.getterFor(Ap),xp=yp(Array,"Array",(function(e,t){kp(this,{type:Ap,target:fp(e),index:0,kind:t})}),(function(){var e=Ep(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,_p(void 0,!0)):_p("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Sp=gp.Arguments=gp.Array;if(mp("keys"),mp("values"),mp("entries"),wp&&"values"!==Sp.name)try{bp(Sp,"name",{value:"values"})}catch(e){}var Rp=z,Dp=Dr,Tp=Pr,Op=xp,Pp=Rn,Ip=ze,Cp=Ip("iterator"),Lp=Ip("toStringTag"),Up=Op.values,Mp=function(e,t){if(e){if(e[Cp]!==Up)try{Pp(e,Cp,Up)}catch(t){e[Cp]=Up}if(e[Lp]||Pp(e,Lp,t),Dp[t])for(var n in Op)if(e[n]!==Op[n])try{Pp(e,n,Op[n])}catch(t){e[n]=Op[n]}}};for(var jp in Dp)Mp(Rp[jp]&&Rp[jp].prototype,jp);Mp(Tp,"DOMTokenList");var Bp,Gp,Np,Fp,qp="undefined"!=typeof process&&"process"==br(process),Vp=yt,Hp=no,zp=Ze,Wp=ze("species"),Kp=function(e){var t=Vp(e);zp&&t&&!t[Wp]&&Hp(t,Wp,{configurable:!0,get:function(){return this}})},$p=_t,Qp=TypeError,Jp=function(e,t){if($p(t,e))return e;throw Qp("Incorrect invocation")},Yp=fi,Xp=Rt,Zp=TypeError,ef=pt,tf=function(e){if(Yp(e))return e;throw Zp(Xp(e)+" is not a constructor")},nf=ue,rf=ze("species"),af=function(e,t){var n,r=ef(e).constructor;return void 0===r||nf(n=ef(r)[rf])?t:tf(n)},sf=TypeError,of=function(e,t){if(e<t)throw sf("Not enough arguments");return e},cf=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ee),uf=z,df=Wc,lf=Br,hf=Ye,pf=be,ff=ne,mf=As,gf=Kc,vf=st,bf=of,yf=cf,_f=qp,wf=uf.setImmediate,Af=uf.clearImmediate,kf=uf.process,Ef=uf.Dispatch,xf=uf.Function,Sf=uf.MessageChannel,Rf=uf.String,Df=0,Tf={},Of="onreadystatechange";ff((function(){Bp=uf.location}));var Pf=function(e){if(pf(Tf,e)){var t=Tf[e];delete Tf[e],t()}},If=function(e){return function(){Pf(e)}},Cf=function(e){Pf(e.data)},Lf=function(e){uf.postMessage(Rf(e),Bp.protocol+"//"+Bp.host)};wf&&Af||(wf=function(e){bf(arguments.length,1);var t=hf(e)?e:xf(e),n=gf(arguments,1);return Tf[++Df]=function(){df(t,void 0,n)},Gp(Df),Df},Af=function(e){delete Tf[e]},_f?Gp=function(e){kf.nextTick(If(e))}:Ef&&Ef.now?Gp=function(e){Ef.now(If(e))}:Sf&&!yf?(Fp=(Np=new Sf).port2,Np.port1.onmessage=Cf,Gp=lf(Fp.postMessage,Fp)):uf.addEventListener&&hf(uf.postMessage)&&!uf.importScripts&&Bp&&"file:"!==Bp.protocol&&!ff(Lf)?(Gp=Lf,uf.addEventListener("message",Cf,!1)):Gp=Of in vf("script")?function(e){mf.appendChild(vf("script"))[Of]=function(){mf.removeChild(this),Pf(e)}}:function(e){setTimeout(If(e),0)});var Uf={set:wf,clear:Af},Mf=function(){this.head=null,this.tail=null};Mf.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 jf,Bf,Gf,Nf,Ff,qf=Mf,Vf=/ipad|iphone|ipod/i.test(Ee)&&"undefined"!=typeof Pebble,Hf=/web0s(?!.*chrome)/i.test(Ee),zf=z,Wf=Br,Kf=Ni.f,$f=Uf.set,Qf=qf,Jf=cf,Yf=Vf,Xf=Hf,Zf=qp,em=zf.MutationObserver||zf.WebKitMutationObserver,tm=zf.document,nm=zf.process,rm=zf.Promise,im=Kf(zf,"queueMicrotask"),am=im&&im.value;if(!am){var sm=new Qf,om=function(){var e,t;for(Zf&&(e=nm.domain)&&e.exit();t=sm.get();)try{t()}catch(e){throw sm.head&&jf(),e}e&&e.enter()};Jf||Zf||Xf||!em||!tm?!Yf&&rm&&rm.resolve?((Nf=rm.resolve(void 0)).constructor=rm,Ff=Wf(Nf.then,Nf),jf=function(){Ff(om)}):Zf?jf=function(){nm.nextTick(om)}:($f=Wf($f,zf),jf=function(){$f(om)}):(Bf=!0,Gf=tm.createTextNode(""),new em(om).observe(Gf,{characterData:!0}),jf=function(){Gf.data=Bf=!Bf}),am=function(e){sm.head||jf(),sm.add(e)}}var cm=am,um=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},dm=z.Promise,lm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,hm=!lm&&!qp&&"object"==typeof window&&"object"==typeof document,pm=z,fm=dm,mm=Ye,gm=qa,vm=_n,bm=ze,ym=hm,_m=lm,wm=Pe;fm&&fm.prototype;var Am=bm("species"),km=!1,Em=mm(pm.PromiseRejectionEvent),xm=gm("Promise",(function(){var e=vm(fm),t=e!==String(fm);if(!t&&66===wm)return!0;if(!wm||wm<51||!/native code/.test(e)){var n=new fm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Am]=r,!(km=n.then((function(){}))instanceof r))return!0}return!t&&(ym||_m)&&!Em})),Sm={CONSTRUCTOR:xm,REJECTION_EVENT:Em,SUBCLASSING:km},Rm={},Dm=Pt,Tm=TypeError,Om=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Tm("Bad Promise constructor");t=e,n=r})),this.resolve=Dm(t),this.reject=Dm(n)};Rm.f=function(e){return new Om(e)};var Pm,Im,Cm,Lm=Ja,Um=qp,Mm=z,jm=gt,Bm=fr,Gm=Cl,Nm=bo,Fm=Kp,qm=Pt,Vm=Ye,Hm=nt,zm=Jp,Wm=af,Km=Uf.set,$m=cm,Qm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},Jm=um,Ym=qf,Xm=Wn,Zm=dm,eg=Rm,tg="Promise",ng=Sm.CONSTRUCTOR,rg=Sm.REJECTION_EVENT,ig=Sm.SUBCLASSING,ag=Xm.getterFor(tg),sg=Xm.set,og=Zm&&Zm.prototype,cg=Zm,ug=og,dg=Mm.TypeError,lg=Mm.document,hg=Mm.process,pg=eg.f,fg=pg,mg=!!(lg&&lg.createEvent&&Mm.dispatchEvent),gg="unhandledrejection",vg=function(e){var t;return!(!Hm(e)||!Vm(t=e.then))&&t},bg=function(e,t){var n,r,i,a=t.value,s=1==t.state,o=s?e.ok:e.fail,c=e.resolve,u=e.reject,d=e.domain;try{o?(s||(2===t.rejection&&kg(t),t.rejection=1),!0===o?n=a:(d&&d.enter(),n=o(a),d&&(d.exit(),i=!0)),n===e.promise?u(dg("Promise-chain cycle")):(r=vg(n))?jm(r,n,c,u):c(n)):u(a)}catch(e){d&&!i&&d.exit(),u(e)}},yg=function(e,t){e.notified||(e.notified=!0,$m((function(){for(var n,r=e.reactions;n=r.get();)bg(n,e);e.notified=!1,t&&!e.rejection&&wg(e)})))},_g=function(e,t,n){var r,i;mg?((r=lg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Mm.dispatchEvent(r)):r={promise:t,reason:n},!rg&&(i=Mm["on"+e])?i(r):e===gg&&Qm("Unhandled promise rejection",n)},wg=function(e){jm(Km,Mm,(function(){var t,n=e.facade,r=e.value;if(Ag(e)&&(t=Jm((function(){Um?hg.emit("unhandledRejection",r,n):_g(gg,n,r)})),e.rejection=Um||Ag(e)?2:1,t.error))throw t.value}))},Ag=function(e){return 1!==e.rejection&&!e.parent},kg=function(e){jm(Km,Mm,(function(){var t=e.facade;Um?hg.emit("rejectionHandled",t):_g("rejectionhandled",t,e.value)}))},Eg=function(e,t,n){return function(r){e(t,r,n)}},xg=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,yg(e,!0))},Sg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw dg("Promise can't be resolved itself");var r=vg(t);r?$m((function(){var n={done:!1};try{jm(r,t,Eg(Sg,n,e),Eg(xg,n,e))}catch(t){xg(n,t,e)}})):(e.value=t,e.state=1,yg(e,!1))}catch(t){xg({done:!1},t,e)}}};if(ng&&(ug=(cg=function(e){zm(this,ug),qm(e),jm(Pm,this);var t=ag(this);try{e(Eg(Sg,t),Eg(xg,t))}catch(e){xg(t,e)}}).prototype,(Pm=function(e){sg(this,{type:tg,done:!1,notified:!1,parent:!1,reactions:new Ym,rejection:!1,state:0,value:void 0})}).prototype=Bm(ug,"then",(function(e,t){var n=ag(this),r=pg(Wm(this,cg));return n.parent=!0,r.ok=!Vm(e)||e,r.fail=Vm(t)&&t,r.domain=Um?hg.domain:void 0,0==n.state?n.reactions.add(r):$m((function(){bg(r,n)})),r.promise})),Im=function(){var e=new Pm,t=ag(e);this.promise=e,this.resolve=Eg(Sg,t),this.reject=Eg(xg,t)},eg.f=pg=function(e){return e===cg||undefined===e?new Im(e):fg(e)},Vm(Zm)&&og!==Object.prototype)){Cm=og.then,ig||Bm(og,"then",(function(e,t){var n=this;return new cg((function(e,t){jm(Cm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete og.constructor}catch(e){}Gm&&Gm(og,ug)}Lm({global:!0,constructor:!0,wrap:!0,forced:ng},{Promise:cg}),Nm(cg,tg,!1),Fm(tg);var Rg=Br,Dg=gt,Tg=pt,Og=Rt,Pg=dd,Ig=Xr,Cg=_t,Lg=kd,Ug=gd,Mg=rd,jg=TypeError,Bg=function(e,t){this.stopped=e,this.result=t},Gg=Bg.prototype,Ng=function(e,t,n){var r,i,a,s,o,c,u,d=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=Rg(t,d),g=function(e){return r&&Mg(r,"normal",e),new Bg(!0,e)},v=function(e){return l?(Tg(e),f?m(e[0],e[1],g):m(e[0],e[1])):f?m(e,g):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=Ug(e)))throw jg(Og(e)+" is not iterable");if(Pg(i)){for(a=0,s=Ig(e);s>a;a++)if((o=v(e[a]))&&Cg(Gg,o))return o;return new Bg(!1)}r=Lg(e,i)}for(c=h?e.next:r.next;!(u=Dg(c,r)).done;){try{o=v(u.value)}catch(e){Mg(r,"throw",e)}if("object"==typeof o&&o&&Cg(Gg,o))return o}return new Bg(!1)},Fg=dm,qg=Sm.CONSTRUCTOR||!Nd((function(e){Fg.all(e).then(void 0,(function(){}))})),Vg=gt,Hg=Pt,zg=Rm,Wg=um,Kg=Ng;Ja({target:"Promise",stat:!0,forced:qg},{all:function(e){var t=this,n=zg.f(t),r=n.resolve,i=n.reject,a=Wg((function(){var n=Hg(t.resolve),a=[],s=0,o=1;Kg(e,(function(e){var c=s++,u=!1;o++,Vg(n,t,e).then((function(e){u||(u=!0,a[c]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var $g=Ja,Qg=Sm.CONSTRUCTOR,Jg=dm,Yg=yt,Xg=Ye,Zg=fr,ev=Jg&&Jg.prototype;if($g({target:"Promise",proto:!0,forced:Qg,real:!0},{catch:function(e){return this.then(void 0,e)}}),Xg(Jg)){var tv=Yg("Promise").prototype.catch;ev.catch!==tv&&Zg(ev,"catch",tv,{unsafe:!0})}var nv=gt,rv=Pt,iv=Rm,av=um,sv=Ng;Ja({target:"Promise",stat:!0,forced:qg},{race:function(e){var t=this,n=iv.f(t),r=n.reject,i=av((function(){var i=rv(t.resolve);sv(e,(function(e){nv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var ov=gt,cv=Rm;Ja({target:"Promise",stat:!0,forced:Sm.CONSTRUCTOR},{reject:function(e){var t=cv.f(this);return ov(t.reject,void 0,e),t.promise}});var uv=pt,dv=nt,lv=Rm,hv=function(e,t){if(uv(e),dv(t)&&t.constructor===e)return t;var n=lv.f(e);return(0,n.resolve)(t),n.promise},pv=Ja,fv=Sm.CONSTRUCTOR,mv=hv;yt("Promise"),pv({target:"Promise",stat:!0,forced:fv},{resolve:function(e){return mv(this,e)}});var gv=TypeError,vv=Ja,bv=ne,yv=ei,_v=nt,wv=me,Av=Xr,kv=function(e){if(e>9007199254740991)throw gv("Maximum allowed index exceeded");return e},Ev=Fs,xv=wi,Sv=Tu,Rv=Pe,Dv=ze("isConcatSpreadable"),Tv=Rv>=51||!bv((function(){var e=[];return e[Dv]=!1,e.concat()[0]!==e})),Ov=function(e){if(!_v(e))return!1;var t=e[Dv];return void 0!==t?!!t:yv(e)};vv({target:"Array",proto:!0,arity:1,forced:!Tv||!Sv("concat")},{concat:function(e){var t,n,r,i,a,s=wv(this),o=xv(s,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(Ov(a=-1===t?s:arguments[t]))for(i=Av(a),kv(c+i),n=0;n<i;n++,c++)n in a&&Ev(o,c,a[n]);else kv(c+1),Ev(o,c++,a);return o.length=c,o}});var Pv=Ze,Iv=pn.EXISTS,Cv=ce,Lv=no,Uv=Function.prototype,Mv=Cv(Uv.toString),jv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Bv=Cv(jv.exec);function Gv(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 Nv(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 Nv(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,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,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function Nv(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 Fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fv(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Pv&&!Iv&&Lv(Uv,"name",{configurable:!0,get:function(){try{return Bv(jv,Mv(this))[1]}catch(e){return""}}});var Vv,Hv={react:{src:"https://pm.gamedistribution.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.gamedistribution.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.gamedistribution.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.gamedistribution.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.gamedistribution.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},zv={},Wv=function(e,t){zv[e]=qv(qv({},t),{},{isLoading:!1})},Kv=function(e){var n=this,r=e.id,i=e.src;return new Promise(function(e,a){if(t(this,n),document.getElementById(r))e();else{var s=document.createElement("script");s.onload=function(){e()},s.id=r,s.setAttribute("crossorigin",!0),s.src=i,document.head.appendChild(s)}}.bind(this))},$v=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,c,u,d;return r.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(!(i=zv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=Gv(i.dependencies),e.prev=8,a.s();case 10:if((s=a.n()).done){e.next=26;break}if(o=s.value,e.prev=12,c=Hv[o].name,!window[c]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Kv({id:o,src:Hv[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),u=o.id,d=o.src,console.log("Could not load external script ".concat(u," ").concat(d),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,Kv({id:t,src:i.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(i.source,"."),e.t2);case 43:return i.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(e){return t.apply(this,arguments)}}(),Qv=new(R((function t(){var n=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v("Leaderboard");case 2:n.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"showLeaderboard",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=window.GD_OPTIONS.gameId,n.leaderboard){e.next=4;break}return e.next=4,n.load();case 4:n.leaderboard.showLeaderBoard(i,t);case 5:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),T(this,"addScore",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.leaderboard){e.next=3;break}return e.next=3,n.load();case 3:n.leaderboard.addScore(t);case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Wv(this.moduleName,this.moduleConfig)}))),Jv=nt,Yv=br,Xv=ze("match"),Zv=function(e){var t;return Jv(e)&&(void 0!==(t=e[Xv])?!!t:"RegExp"==Yv(e))},eb=Zv,tb=TypeError,nb=function(e){if(eb(e))throw tb("The method doesn't accept regular expressions");return e},rb=ze("match"),ib=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[rb]=!1,"/./"[e](t)}catch(e){}}return!1},ab=Ja,sb=Lr,ob=Ni.f,cb=Jr,ub=ps,db=nb,lb=he,hb=ib,pb=sb("".startsWith),fb=sb("".slice),mb=Math.min,gb=hb("startsWith");ab({target:"String",proto:!0,forced:!!(gb||(Vv=ob(String.prototype,"startsWith"),!Vv||Vv.writable))&&!gb},{startsWith:function(e){var t=ub(lb(this));db(e);var n=cb(mb(arguments.length>1?arguments[1]:void 0,t.length)),r=ub(e);return pb?pb(t,r,n):fb(t,n,n+r.length)===r}});var vb=gt,bb=be,yb=_t,_b=dh,wb=RegExp.prototype,Ab=function(e){var t=e.flags;return void 0!==t||"flags"in wb||bb(e,"flags")||!yb(wb,e)?t:vb(_b,e)},kb=pn.PROPER,Eb=fr,xb=pt,Sb=ps,Rb=ne,Db=Ab,Tb="toString",Ob=RegExp.prototype[Tb],Pb=Rb((function(){return"/a/b"!=Ob.call({source:"a",flags:"b"})})),Ib=kb&&Ob.name!=Tb;(Pb||Ib)&&Eb(RegExp.prototype,Tb,(function(){var e=xb(this);return"/"+Sb(e.source)+"/"+Sb(Db(e))}),{unsafe:!0});var Cb=Lr,Lb=fr,Ub=qh,Mb=ne,jb=ze,Bb=Rn,Gb=jb("species"),Nb=RegExp.prototype,Fb=function(e,t,n,r){var i=jb(e),a=!Mb((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!Mb((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Gb]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=Cb(/./[i]),c=t(i,""[e],(function(e,t,n,r,i){var s=Cb(e),c=t.exec;return c===Ub||c===Nb.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Lb(String.prototype,e,c[0]),Lb(Nb,i,c[1])}r&&Bb(Nb[i],"sham",!0)},qb=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Vb=gt,Hb=pt,zb=Ye,Wb=br,Kb=qh,$b=TypeError,Qb=function(e,t){var n=e.exec;if(zb(n)){var r=Vb(n,e,t);return null!==r&&Hb(r),r}if("RegExp"===Wb(e))return Vb(Kb,e,t);throw $b("RegExp#exec called on incompatible receiver")},Jb=gt,Yb=pt,Xb=ue,Zb=he,ey=qb,ty=ps,ny=Lt,ry=Qb;function iy(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 ay(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iy(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Fb("search",(function(e,t,n){return[function(t){var n=Zb(this),r=Xb(t)?void 0:ny(t,e);return r?Jb(r,t,n):new RegExp(t)[e](ty(n))},function(e){var r=Yb(this),i=ty(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;ey(s,0)||(r.lastIndex=0);var o=ry(r,i);return ey(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var sy,oy,cy=function(){function e(){D(this,e)}return R(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()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),d=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:u()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",v);var b=(e||n)&&r.loaderEnabled,y=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:b,parentURL:i,parentDomain:c,topDomain:d&&d.length?d:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,depth:o(),domainMatched:c===d,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new O(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(P.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(P.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(qs.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new O(e,!0);return n.query=ay(ay({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return P.encode(JSON.stringify(e))}}]),e}(),uy=function(){try{return(new cy).getBridgeContext()}catch(e){return{}}}(),dy={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(sy=!1,(oy=c("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===oy.xanthophyll&&(sy=!0),sy)},ly=Zd.charAt,hy=ce,py=me,fy=Math.floor,my=hy("".charAt),gy=hy("".replace),vy=hy("".slice),by=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,yy=/\$([$&'`]|\d{1,2})/g,_y=Wc,wy=gt,Ay=ce,ky=Fb,Ey=ne,xy=pt,Sy=Ye,Ry=ue,Dy=Kr,Ty=Jr,Oy=ps,Py=he,Iy=function(e,t,n){return t+(n?ly(e,t).length:1)},Cy=Lt,Ly=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,c=yy;return void 0!==i&&(i=py(i),c=by),gy(a,c,(function(a,c){var u;switch(my(c,0)){case"$":return"$";case"&":return e;case"`":return vy(t,0,n);case"'":return vy(t,s);case"<":u=i[vy(c,1,-1)];break;default:var d=+c;if(0===d)return a;if(d>o){var l=fy(d/10);return 0===l?a:l<=o?void 0===r[l-1]?my(c,1):r[l-1]+my(c,1):a}u=r[d-1]}return void 0===u?"":u}))},Uy=Qb,My=ze("replace"),jy=Math.max,By=Math.min,Gy=Ay([].concat),Ny=Ay([].push),Fy=Ay("".indexOf),qy=Ay("".slice),Vy="$0"==="a".replace(/./,"$0"),Hy=!!/./[My]&&""===/./[My]("a","$0");ky("replace",(function(e,t,n){var r=Hy?"$":"$0";return[function(e,n){var r=Py(this),i=Ry(e)?void 0:Cy(e,My);return i?wy(i,e,r,n):wy(t,Oy(r),e,n)},function(e,i){var a=xy(this),s=Oy(e);if("string"==typeof i&&-1===Fy(i,r)&&-1===Fy(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var c=Sy(i);c||(i=Oy(i));var u=a.global;if(u){var d=a.unicode;a.lastIndex=0}for(var l=[];;){var h=Uy(a,s);if(null===h)break;if(Ny(l,h),!u)break;""===Oy(h[0])&&(a.lastIndex=Iy(s,Ty(a.lastIndex),d))}for(var p,f="",m=0,g=0;g<l.length;g++){for(var v=Oy((h=l[g])[0]),b=jy(By(Dy(h.index),s.length),0),y=[],_=1;_<h.length;_++)Ny(y,void 0===(p=h[_])?p:String(p));var w=h.groups;if(c){var A=Gy([v],y,b,s);void 0!==w&&Ny(A,w);var k=Oy(_y(i,void 0,A))}else k=Ly(v,s,b,y,w,i);b>=m&&(f+=qy(s,m,b)+k,m=b+v.length)}return f+qy(s,m)}]}),!!Ey((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Vy||Hy);var zy=ne,Wy=Ze,Ky=ze("iterator"),$y=!zy((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&&!Wy||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Ky]||"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})),Qy=fr,Jy=$s,Yy=Math.floor,Xy=function(e,t){var n=e.length,r=Yy(n/2);return n<8?Zy(e,t):e_(e,Xy(Jy(e,0,r),t),Xy(Jy(e,r),t),t)},Zy=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},e_=function(e,t,n,r){for(var i=t.length,a=n.length,s=0,o=0;s<i||o<a;)e[s+o]=s<i&&o<a?r(t[s],n[o])<=0?t[s++]:n[o++]:s<i?t[s++]:n[o++];return e},t_=Ja,n_=z,r_=gt,i_=ce,a_=Ze,s_=$y,o_=fr,c_=no,u_=function(e,t,n){for(var r in t)Qy(e,r,t[r],n);return e},d_=bo,l_=El,h_=Wn,p_=Jp,f_=Ye,m_=be,g_=Br,v_=xr,b_=pt,y_=nt,__=ps,w_=Ms,A_=En,k_=kd,E_=gd,x_=of,S_=Xy,R_=ze("iterator"),D_="URLSearchParams",T_=D_+"Iterator",O_=h_.set,P_=h_.getterFor(D_),I_=h_.getterFor(T_),C_=Object.getOwnPropertyDescriptor,L_=function(e){if(!a_)return n_[e];var t=C_(n_,e);return t&&t.value},U_=L_("fetch"),M_=L_("Request"),j_=L_("Headers"),B_=M_&&M_.prototype,G_=j_&&j_.prototype,N_=n_.RegExp,F_=n_.TypeError,q_=n_.decodeURIComponent,V_=n_.encodeURIComponent,H_=i_("".charAt),z_=i_([].join),W_=i_([].push),K_=i_("".replace),$_=i_([].shift),Q_=i_([].splice),J_=i_("".split),Y_=i_("".slice),X_=/\+/g,Z_=Array(4),ew=function(e){return Z_[e-1]||(Z_[e-1]=N_("((?:%[\\da-f]{2}){"+e+"})","gi"))},tw=function(e){try{return q_(e)}catch(t){return e}},nw=function(e){var t=K_(e,X_," "),n=4;try{return q_(t)}catch(e){for(;n;)t=K_(t,ew(n--),tw);return t}},rw=/[!'()~]|%20/g,iw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},aw=function(e){return iw[e]},sw=function(e){return K_(V_(e),rw,aw)},ow=l_((function(e,t){O_(this,{type:T_,iterator:k_(P_(e).entries),kind:t})}),"Iterator",(function(){var e=I_(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),cw=function(e){this.entries=[],this.url=null,void 0!==e&&(y_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===H_(e,0)?Y_(e,1):e:__(e)))};cw.prototype={type:D_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,c=E_(e);if(c)for(n=(t=k_(e,c)).next;!(r=r_(n,t)).done;){if(a=(i=k_(b_(r.value))).next,(s=r_(a,i)).done||(o=r_(a,i)).done||!r_(a,i).done)throw F_("Expected sequence with length 2");W_(this.entries,{key:__(s.value),value:__(o.value)})}else for(var u in e)m_(e,u)&&W_(this.entries,{key:u,value:__(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=J_(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=J_(t,"="),W_(this.entries,{key:nw($_(n)),value:nw(z_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],W_(n,sw(e.key)+"="+sw(e.value));return z_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var uw=function(){p_(this,dw);var e=O_(this,new cw(arguments.length>0?arguments[0]:void 0));a_||(this.length=e.entries.length)},dw=uw.prototype;if(u_(dw,{append:function(e,t){x_(arguments.length,2);var n=P_(this);W_(n.entries,{key:__(e),value:__(t)}),a_||this.length++,n.updateURL()},delete:function(e){x_(arguments.length,1);for(var t=P_(this),n=t.entries,r=__(e),i=0;i<n.length;)n[i].key===r?Q_(n,i,1):i++;a_||(this.length=n.length),t.updateURL()},get:function(e){x_(arguments.length,1);for(var t=P_(this).entries,n=__(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){x_(arguments.length,1);for(var t=P_(this).entries,n=__(e),r=[],i=0;i<t.length;i++)t[i].key===n&&W_(r,t[i].value);return r},has:function(e){x_(arguments.length,1);for(var t=P_(this).entries,n=__(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){x_(arguments.length,1);for(var n,r=P_(this),i=r.entries,a=!1,s=__(e),o=__(t),c=0;c<i.length;c++)(n=i[c]).key===s&&(a?Q_(i,c--,1):(a=!0,n.value=o));a||W_(i,{key:s,value:o}),a_||(this.length=i.length),r.updateURL()},sort:function(){var e=P_(this);S_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=P_(this).entries,r=g_(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new ow(this,"keys")},values:function(){return new ow(this,"values")},entries:function(){return new ow(this,"entries")}},{enumerable:!0}),o_(dw,R_,dw.entries,{name:"entries"}),o_(dw,"toString",(function(){return P_(this).serialize()}),{enumerable:!0}),a_&&c_(dw,"size",{get:function(){return P_(this).entries.length},configurable:!0,enumerable:!0}),d_(uw,D_),t_({global:!0,constructor:!0,forced:!s_},{URLSearchParams:uw}),!s_&&f_(j_)){var lw=i_(G_.has),hw=i_(G_.set),pw=function(e){if(y_(e)){var t,n=e.body;if(v_(n)===D_)return t=e.headers?new j_(e.headers):new j_,lw(t,"content-type")||hw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),w_(e,{body:A_(0,__(n)),headers:A_(0,t)})}return e};if(f_(U_)&&t_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return U_(e,arguments.length>1?pw(arguments[1]):{})}}),f_(M_)){var fw=function(e){return p_(this,B_),new M_(e,arguments.length>1?pw(arguments[1]):{})};B_.constructor=fw,fw.prototype=B_,t_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:fw})}}var mw={URLSearchParams:uw,getState:P_},gw=ha.includes,vw=pp;Ja({target:"Array",proto:!0,forced:ne((function(){return!Array(1).includes()}))},{includes:function(e){return gw(this,e,arguments.length>1?arguments[1]:void 0)}}),vw("includes");var bw=Ja,yw=nb,_w=he,ww=ps,Aw=ib,kw=ce("".indexOf);function Ew(e){var n=this,r={},i=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,s=(null==e?void 0:e.self_origin)||window.location.origin,o=(null==e?void 0:e.referrer_url)||document.referrer;function c(e){return L(r,e)}function u(e,t){return U(r,e,t)}function d(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new O(e,t)}catch(e){console.log(e)}}function l(){for(var t=(null==e?void 0:e.urls)||[a,o],n=0;n<t.length;n++){var r,i=d(t[n]);if(i){var s=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(s&&(s=decodeURIComponent(s),I.isURL(s)))return s}}}return function(){var e;t(this,n),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){u("depth.error",e.message)}u("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(u("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],u("top.domain.from","origins");else if(0===t)n=s,u("top.domain.from","self-top");else if(1===t){var a=d(o);a&&(n=a.origin,u("top.domain.from","referrer"))}u("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(C(e))u("partner.domain.value",e),u("partner.domain.from","partner-domain");else{var t=d(e,!1);if(t)u("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),u("partner.domain.from","partner-url");else u("partner.domain.value",r.top.domain.value),u("partner.domain.from","partner-fallback")}else u("partner.domain.value",r.top.domain.value),u("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(u("partner.url.value",a),u("partner.url.from","self-top")):e?C(e)?(u("partner.url.value",a),u("partner.url.from","partner-domain")):(u("partner.url.value",e),u("partner.url.from","partner-url")):(u("partner.url.value",o),u("partner.url.from","fallback"))}.bind(this)(),{get:c,print:function(e){console.log(c(e))}}}bw({target:"String",proto:!0,forced:!Aw("includes")},{includes:function(e){return!!~kw(ww(_w(this)),ww(yw(e)),arguments.length>1?arguments[1]:void 0)}});var xw="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==xw&&xw,Sw={searchParams:"URLSearchParams"in xw,iterable:"Symbol"in xw&&"iterator"in Symbol,blob:"FileReader"in xw&&"Blob"in xw&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in xw,arrayBuffer:"ArrayBuffer"in xw};if(Sw.arrayBuffer)var Rw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Dw=ArrayBuffer.isView||function(e){return e&&Rw.indexOf(Object.prototype.toString.call(e))>-1};function Tw(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 Ow(e){return"string"!=typeof e&&(e=String(e)),e}function Pw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Sw.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Iw(e){this.map={},e instanceof Iw?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 Cw(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Lw(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Uw(e){var t=new FileReader,n=Lw(t);return t.readAsArrayBuffer(e),n}function Mw(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function jw(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Sw.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Sw.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Sw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Sw.arrayBuffer&&Sw.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Mw(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Sw.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Dw(e))?this._bodyArrayBuffer=Mw(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):Sw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Sw.blob&&(this.blob=function(){var e=Cw(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=Cw(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(Uw)}),this.text=function(){var e=Cw(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Lw(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)},Sw.formData&&(this.formData=function(){return this.text().then(Nw)}),this.json=function(){return this.text().then(JSON.parse)},this}Iw.prototype.append=function(e,t){e=Tw(e),t=Ow(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Iw.prototype.delete=function(e){delete this.map[Tw(e)]},Iw.prototype.get=function(e){return e=Tw(e),this.has(e)?this.map[e]:null},Iw.prototype.has=function(e){return this.map.hasOwnProperty(Tw(e))},Iw.prototype.set=function(e,t){this.map[Tw(e)]=Ow(t)},Iw.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Iw.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Pw(e)},Iw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Pw(e)},Iw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Pw(e)},Sw.iterable&&(Iw.prototype[Symbol.iterator]=Iw.prototype.entries);var Bw=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Gw(e,t){if(!(this instanceof Gw))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 Gw){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Iw(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 Iw(t.headers)),this.method=function(e){var t=e.toUpperCase();return Bw.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 Nw(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Fw(e,t){if(!(this instanceof Fw))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 Iw(t.headers),this.url=t.url||"",this._initBody(e)}Gw.prototype.clone=function(){return new Gw(this,{body:this._bodyInit})},jw.call(Gw.prototype),jw.call(Fw.prototype),Fw.prototype.clone=function(){return new Fw(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Iw(this.headers),url:this.url})},Fw.error=function(){var e=new Fw(null,{status:0,statusText:""});return e.type="error",e};var qw=[301,302,303,307,308];Fw.redirect=function(e,t){if(-1===qw.indexOf(t))throw new RangeError("Invalid status code");return new Fw(null,{status:t,headers:{location:e}})};var Vw,Hw=xw.DOMException;try{new Hw}catch(e){Hw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Hw.prototype=Object.create(Error.prototype),Hw.prototype.constructor=Hw}function zw(e,t){return new Promise((function(n,r){var i=new Gw(e,t);if(i.signal&&i.signal.aborted)return r(new Hw("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Iw,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 i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new Fw(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new Hw("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&xw.location.href?xw.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&(Sw.blob?a.responseType="blob":Sw.arrayBuffer&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Iw?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,Ow(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}zw.polyfill=!0,xw.fetch||(xw.fetch=zw,xw.Headers=Iw,xw.Request=Gw,xw.Response=Fw);var Ww=function(e){var n=this;if(!Vw){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:uy.topDomain,domain:uy.parentDomain,referrer:uy.parentURL,depth:o(),version:as.version,byloader:uy.isTokenGameURL,isTokenGameURL:uy.isTokenGameURL,isMasterGameURL:uy.isMasterGameURL,isExtHostedGameURL:uy.isExtHostedGameURL,byloaderVersion:uy.version,tracking:dy.userDeclinedTracking,whitelabel:dy.whitelabelPartner,platform:d()};Vw=new l(r)}return Vw||{send:function(){t(this,n)}.bind(this)}},Kw={getGameData:function(e){var n=this;try{var r=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var n=this;try{var r="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}}},$w={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},Qw={gameAPI:"game.api.gamedistribution.com"},Jw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},Yw=function(){var e=this,n=$w.acc.some(function(n){var r;return t(this,e),n===(null===(r=window.location.host)||void 0===r?void 0:r.toLowerCase())}.bind(this));return{env:n?"acc":"prod",config:n?Jw:Qw}};function Xw(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 Zw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xw(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var eA,tA,nA,rA=new j,iA=[],aA=function(e){iA.push(e)},sA=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(tA){e.next=6;break}return e.next=3,uA(nA);case 3:tA=e.sent,rA.emit("game-data-ready",tA),oA();case 6:return e.abrupt("return",tA);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),oA=function(){var t,n;if(null!==(t=tA)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,c;if(cA(),null!==(i=tA)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=tA)&&void 0!==o&&o.url)Kw.getGameData(null===(c=tA)||void 0===c?void 0:c.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,uA(nA);case 3:tA=e.sent,null===(t=tA)||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)}},cA=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,c,u,d,l,h,p,f,m,g,v,b,y,_,w,A,k=this,E=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(d=E.length,l=new Array(d),h=0;h<d;h++)l[h]=E[h];p=l[0],f=l[1],m=null===(i=tA)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,g=null===(o=tA)||void 0===o||null===(c=o.aws_tst)||void 0===c||null===(u=c.ep)||void 0===u?void 0:u.msgrt,v=function(e,r){var i=this;t(this,k);var a=p.replace(e,r);n(a,f).then(function(){t(this,i)}.bind(this))}.bind(this);try{m&&p.indexOf("tag.atom")>0&&v("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),g&&p.indexOf("msgrt.gamedistribution.com")>0&&(null===(b=tA)||void 0===b||b.aws_tst,null===(y=tA)||void 0===y||null===(_=y.aws_tst)||void 0===_||null===(w=_.ep)||void 0===w||w.msgrt,v("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(p,f);case 9:return A=e.sent,e.abrupt("return",A);case 11:case"end":return e.stop()}}),e,this)})))},uA=function(e){var n=this;eA.send("gdfw.loading",{message:"loading"}),iA=[],aA("1"),aA("2");var r=new Ew;aA("3");var i=r.get("partner.domain.value");aA("4");var a=function(){return t(this,n),{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);aA("5");var s=function(){t(this,n);var r=o(),a=r?"&mode=".concat(r):"",s=Yw().config;return"https://".concat(s.gameAPI,"/game/v4/get/").concat(e.gameId.replace(/-/g,""),"/?domain=").concat(i).concat(a,"&v=").concat(as.version,"&localTime=").concat((new Date).getHours())}.bind(this);aA("6");var o=function(){var e=this;t(this,n);var r=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!r.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:r.gd_mode}.bind(this);return aA("7"),new Promise(function(e){var r=this;t(this,n),aA("7.1");var i=a();try{aA("7.2");var o=s();aA("7.3"),fetch(o).then(function(e){return t(this,r),aA("7.4"),e.json()}.bind(this)).then(function(n){var a=this;if(t(this,r),aA("7.5"),n.success){var s,c,u,d=n.result.game;aA("7.6");var l={gameId:d.gameMd5,slug:d.slug,pname:d.pname,dname:d.dname,status:d.status,description:d.description,disableAds:d.enableAds,preroll:d.preRoll,midroll:6e4*d.timeAds,rewardedAds:d.rewardedAds,title:d.title,publishedAt:d.publishedAt,tags:d.tags,category:d.category,assets:d.assets,disp_2nd_prer:d.disp_2nd_prer,ctry_vst:d.ctry_vst,ctry:d.ctry,crtv:d.crtv,dmain:d.dmain,aws_tst:d.aws_tst,__t4r:ss(d.__t4r)||{},block_exts:ss(d.push_cuda),bloc_gard:ss(d.bloc_gard),cookie:ss(d.cookie),gdpr:ss(d.gdpr),diagnostic:ss(d.diagnostic),cmp:ss(d.cmp),gft:ss(d.gft)||{},sdk:ss(d.sdk)||{},sdkfw:ss(d.sdkfw)||{},loader:ss(d.loader)||{},splash:ss(d.splash)||{},promo:ss(d.promo)||{},dAds:ss(d.dads)||{},pAds:ss(d.pads)||{},mAds:ss(d.mads)||{},rAds:ss(d.rads)||{},lp:ss(d.lp)||{},extsc:ss(d.extsc)||{},evnts:ss(d.evnts)||{},dp:ss(d.dp)||{},adflw:ss(d.adflw)||{},afgszf:ss(d.afgszf)||{},fllc:ss(d.fllc)||{},lotm:ss(d.lotm)||{},t4rc:ss(d.t4rc)||{},midroll_plus:ss(d.midroll_plus)||{},gmky:ss(d.gmky)||{}};aA("7.7");var p=h(M(i),l);aA("7.8"),p.afg_disabled=!1===(null===(s=p.sdk)||void 0===s||null===(c=s.afg)||void 0===c?void 0:c.enabled),p.url=o,function(){t(this,a),void 0!==ds.afgEnabled&&(p.afg_disabled=!ds.afgEnabled),void 0!==ds.promoEnabled&&(p.promo=p.promo||{},p.promo=Zw(Zw({},p.promo),{},{rainbow:{enabled:ds.promoEnabled}}))}.bind(this),aA("7.9"),null!==(u=p.pAds)&&void 0!==u&&u.enabled&&(p.preroll=!0),aA("7.10"),eA.send("gdfw.success",{message:"success"}),e(p)}else{i.failed=!0;var f=iA[iA.length-1];eA.send("gdfw.err",{message:"".concat(f,": json error")}),e(i)}}.bind(this)).catch(function(n){t(this,r);var a=iA[iA.length-1];eA.send("gdfw.err",{message:"".concat(a,": ").concat(n.message?n.message:n)}),i.failed=!0,e(i)}.bind(this))}catch(t){var c=iA[iA.length-1];eA.send("gdfw.err",{message:"".concat(c,": global ").concat(t.message?t.message:t)}),i.failed=!0,e(i)}}.bind(this))},dA=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sA();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 t.apply(this,arguments)}}(),lA=function(){var t=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sA();case 2:return n=e.sent,i=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),hA=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sA();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 t.apply(this,arguments)}}(),pA=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sA();case 2:return c=e.sent,u=!(null==c||null===(t=c.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:u,path:u?null==c||null===(n=c.extsc)||void 0===n?void 0:n.path:"",name:u?null==c||null===(i=c.extsc)||void 0===i?void 0:i.name:"",ref:u?null==c||null===(a=c.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:u?null==c||null===(s=c.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!u&&!(null==c||null===(o=c.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),fA=function(){var n=e(r.mark((function e(){var n,i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pA();case 2:if((n=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return i=n.path,a=n.name,s=n.ref,e.prev=6,o={},e.next=10,f(i,a,{error_prefix:"Blocked:",exists:function(){return t(this,c),!!s&&!!window[s]}.bind(this),attrs:o});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",a,e.t0),p("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return n.apply(this,arguments)}}(),mA=!1,gA=!1,vA=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,c,u,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!mA){e.next=4;break}return e.abrupt("return",n(gA));case 4:mA=!0;case 5:return e.next=7,pA();case 7:if((a=e.sent).enabled){e.next=10;break}return e.abrupt("return",n(!1));case 10:if(s=a.loadedFlag,!(o=a.loadedFlagCheck)||s){e.next=13;break}return e.abrupt("return",n(!1));case 13:if(o){e.next=16;break}return gA=!0,e.abrupt("return",n(!0));case 16:c=!0,setTimeout(function(){t(this,d),c&&(c=!1,mA=!0,n(!1))}.bind(this),5e3),u=setInterval(function(){t(this,d),c&&o&&window[s]?(c=!1,mA=!0,gA=!0,clearInterval(u),n(!0)):c||clearInterval(u)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},bA=Ja,yA=dm,_A=ne,wA=yt,AA=Ye,kA=af,EA=hv,xA=fr,SA=yA&&yA.prototype;if(bA({target:"Promise",proto:!0,real:!0,forced:!!yA&&_A((function(){SA.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=kA(this,wA("Promise")),n=AA(e);return this.then(n?function(n){return EA(t,e()).then((function(){return n}))}:e,n?function(n){return EA(t,e()).then((function(){throw n}))}:e)}}),AA(yA)){var RA=wA("Promise").prototype.finally;SA.finally!==RA&&xA(SA,"finally",RA,{unsafe:!0})}var DA="\t\n\v\f\r \u2028\u2029\ufeff",TA=he,OA=ps,PA=DA,IA=ce("".replace),CA=RegExp("^["+PA+"]+"),LA=RegExp("(^|[^"+PA+"])["+PA+"]+$"),UA=function(e){return function(t){var n=OA(TA(t));return 1&e&&(n=IA(n,CA,"")),2&e&&(n=IA(n,LA,"$1")),n}},MA={start:UA(1),end:UA(2),trim:UA(3)},jA=pn.PROPER,BA=ne,GA=DA,NA=MA.trim;Ja({target:"String",proto:!0,forced:function(e){return BA((function(){return!!GA[e]()||"
"!=="
"[e]()||jA&&GA[e].name!==e}))}("trim")},{trim:function(){return NA(this)}});var FA=Ja,qA=Ti.find,VA=pp,HA="find",zA=!0;HA in[]&&Array(1)[HA]((function(){zA=!1})),FA({target:"Array",proto:!0,forced:zA},{find:function(e){return qA(this,e,arguments.length>1?arguments[1]:void 0)}}),VA(HA);var WA=Ye,KA=nt,$A=Cl,QA=Xe.f,JA=Ze,YA=z,XA=ce,ZA=qa,ek=function(e,t,n){var r,i;return $A&&WA(r=t.constructor)&&r!==n&&KA(i=r.prototype)&&i!==n.prototype&&$A(e,i),e},tk=Rn,nk=ra.f,rk=_t,ik=Zv,ak=ps,sk=Ab,ok=mh,ck=function(e,t,n){n in e||QA(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},uk=fr,dk=ne,lk=be,hk=Wn.enforce,pk=Kp,fk=bh,mk=wh,gk=ze("match"),vk=YA.RegExp,bk=vk.prototype,yk=YA.SyntaxError,_k=XA(bk.exec),wk=XA("".charAt),Ak=XA("".replace),kk=XA("".indexOf),Ek=XA("".slice),xk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Sk=/a/g,Rk=/a/g,Dk=new vk(Sk)!==Sk,Tk=ok.MISSED_STICKY,Ok=ok.UNSUPPORTED_Y,Pk=JA&&(!Dk||Tk||fk||mk||dk((function(){return Rk[gk]=!1,vk(Sk)!=Sk||vk(Rk)==Rk||"/a/i"!=vk(Sk,"i")})));if(ZA("RegExp",Pk)){for(var Ik=function(e,t){var n,r,i,a,s,o,c=rk(bk,this),u=ik(e),d=void 0===t,l=[],h=e;if(!c&&u&&d&&e.constructor===Ik)return e;if((u||rk(bk,e))&&(e=e.source,d&&(t=sk(h))),e=void 0===e?"":ak(e),t=void 0===t?"":ak(t),h=e,fk&&"dotAll"in Sk&&(r=!!t&&kk(t,"s")>-1)&&(t=Ak(t,/s/g,"")),n=t,Tk&&"sticky"in Sk&&(i=!!t&&kk(t,"y")>-1)&&Ok&&(t=Ak(t,/y/g,"")),mk&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,c=!1,u=0,d="";r<=n;r++){if("\\"===(t=wk(e,r)))t+=wk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:_k(xk,Ek(e,r+1))&&(r+=2,c=!0),i+=t,u++;continue;case">"===t&&c:if(""===d||lk(s,d))throw new yk("Invalid capture group name");s[d]=!0,a[a.length]=[d,u],c=!1,d="";continue}c?d+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=ek(vk(e,t),c?this:bk,Ik),(r||i||l.length)&&(o=hk(s),r&&(o.dotAll=!0,o.raw=Ik(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=wk(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+wk(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{tk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Ck=nk(vk),Lk=0;Ck.length>Lk;)ck(Ik,vk,Ck[Lk++]);bk.constructor=Ik,Ik.prototype=bk,uk(YA,"RegExp",Ik,{constructor:!0})}pk("RegExp");var Uk=Ja,Mk=Vr,jk=Ki,Bk=Pi,Gk=ce([].join);Uk({target:"Array",proto:!0,forced:Mk!=Object||!Bk("join",",")},{join:function(e){return Gk(jk(this),void 0===e?",":e)}});var Nk=Ti.map;Ja({target:"Array",proto:!0,forced:!Tu("map")},{map:function(e){return Nk(this,e,arguments.length>1?arguments[1]:void 0)}});var Fk=Ze,qk=ce,Vk=gt,Hk=ne,zk=Za,Wk=Aa,Kk=Fi,$k=me,Qk=Vr,Jk=Object.assign,Yk=Object.defineProperty,Xk=qk([].concat),Zk=!Jk||Hk((function(){if(Fk&&1!==Jk({b:1},Jk(Yk({},"a",{enumerable:!0,get:function(){Yk(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!=Jk({},e)[n]||zk(Jk({},t)).join("")!=r}))?function(e,t){for(var n=$k(e),r=arguments.length,i=1,a=Wk.f,s=Kk.f;r>i;)for(var o,c=Qk(arguments[i++]),u=a?Xk(zk(c),a(c)):zk(c),d=u.length,l=0;d>l;)o=u[l++],Fk&&!Vk(s,c,o)||(n[o]=c[o]);return n}:Jk,eE=Zk;Ja({target:"Object",stat:!0,arity:2,forced:Object.assign!==eE},{assign:eE});var tE,nE=ce,rE=2147483647,iE=/[^\0-\u007E]/,aE=/[.\u3002\uFF0E\uFF61]/g,sE="Overflow: input needs wider integers to process",oE=RangeError,cE=nE(aE.exec),uE=Math.floor,dE=String.fromCharCode,lE=nE("".charCodeAt),hE=nE([].join),pE=nE([].push),fE=nE("".replace),mE=nE("".split),gE=nE("".toLowerCase),vE=function(e){return e+22+75*(e<26)},bE=function(e,t,n){var r=0;for(e=n?uE(e/700):e>>1,e+=uE(e/t);e>455;)e=uE(e/35),r+=36;return uE(r+36*e/(e+38))},yE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=lE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=lE(e,n++);56320==(64512&a)?pE(t,((1023&i)<<10)+(1023&a)+65536):(pE(t,i),n--)}else pE(t,i)}return t}(e);var n,r,i=e.length,a=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&pE(t,dE(r));var c=t.length,u=c;for(c&&pE(t,"-");u<i;){var d=rE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<d&&(d=r);var l=u+1;if(d-a>uE((rE-s)/l))throw oE(sE);for(s+=(d-a)*l,a=d,n=0;n<e.length;n++){if((r=e[n])<a&&++s>rE)throw oE(sE);if(r==a){for(var h=s,p=36;;){var f=p<=o?1:p>=o+26?26:p-o;if(h<f)break;var m=h-f,g=36-f;pE(t,dE(vE(f+m%g))),h=uE(m/g),p+=36}pE(t,dE(vE(h))),o=bE(s,l,u==c),s=0,u++}}s++,a++}return hE(t,"")},_E=Ja,wE=Ze,AE=$y,kE=z,EE=Br,xE=ce,SE=fr,RE=no,DE=Jp,TE=be,OE=Zk,PE=Ud,IE=$s,CE=Zd.codeAt,LE=function(e){var t,n,r=[],i=mE(fE(gE(e),aE,"."),".");for(t=0;t<i.length;t++)n=i[t],pE(r,cE(iE,n)?"xn--"+yE(n):n);return hE(r,".")},UE=ps,ME=bo,jE=of,BE=mw,GE=Wn,NE=GE.set,FE=GE.getterFor("URL"),qE=BE.URLSearchParams,VE=BE.getState,HE=kE.URL,zE=kE.TypeError,WE=kE.parseInt,KE=Math.floor,$E=Math.pow,QE=xE("".charAt),JE=xE(/./.exec),YE=xE([].join),XE=xE(1..toString),ZE=xE([].pop),ex=xE([].push),tx=xE("".replace),nx=xE([].shift),rx=xE("".split),ix=xE("".slice),ax=xE("".toLowerCase),sx=xE([].unshift),ox="Invalid scheme",cx="Invalid host",ux="Invalid port",dx=/[a-z]/i,lx=/[\d+-.a-z]/i,hx=/\d/,px=/^0x/i,fx=/^[0-7]+$/,mx=/^\d+$/,gx=/^[\da-f]+$/i,vx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,bx=/[\0\t\n\r #/:<>?@[\\\]^|]/,yx=/^[\u0000-\u0020]+/,_x=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,wx=/[\t\n\r]/g,Ax=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)sx(t,e%256),e=KE(e/256);return YE(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=XE(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},kx={},Ex=OE({},kx,{" ":1,'"':1,"<":1,">":1,"`":1}),xx=OE({},Ex,{"#":1,"?":1,"{":1,"}":1}),Sx=OE({},xx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Rx=function(e,t){var n=CE(e,0);return n>32&&n<127&&!TE(t,e)?e:encodeURIComponent(e)},Dx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Tx=function(e,t){var n;return 2==e.length&&JE(dx,QE(e,0))&&(":"==(n=QE(e,1))||!t&&"|"==n)},Ox=function(e){var t;return e.length>1&&Tx(ix(e,0,2))&&(2==e.length||"/"===(t=QE(e,2))||"\\"===t||"?"===t||"#"===t)},Px=function(e){return"."===e||"%2e"===ax(e)},Ix={},Cx={},Lx={},Ux={},Mx={},jx={},Bx={},Gx={},Nx={},Fx={},qx={},Vx={},Hx={},zx={},Wx={},Kx={},$x={},Qx={},Jx={},Yx={},Xx={},Zx=function(e,t,n){var r,i,a,s=UE(e);if(t){if(i=this.parse(s))throw zE(i);this.searchParams=null}else{if(void 0!==n&&(r=new Zx(n,!0)),i=this.parse(s,null,r))throw zE(i);(a=VE(new qE)).bindURL(this),this.searchParams=a}};Zx.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,c=this,u=t||Ix,d=0,l="",h=!1,p=!1,f=!1;for(e=UE(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=tx(e,yx,""),e=tx(e,_x,"$1")),e=tx(e,wx,""),r=PE(e);d<=r.length;){switch(i=r[d],u){case Ix:if(!i||!JE(dx,i)){if(t)return ox;u=Lx;continue}l+=ax(i),u=Cx;break;case Cx:if(i&&(JE(lx,i)||"+"==i||"-"==i||"."==i))l+=ax(i);else{if(":"!=i){if(t)return ox;l="",u=Lx,d=0;continue}if(t&&(c.isSpecial()!=TE(Dx,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&Dx[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?u=zx:c.isSpecial()&&n&&n.scheme==c.scheme?u=Ux:c.isSpecial()?u=Gx:"/"==r[d+1]?(u=Mx,d++):(c.cannotBeABaseURL=!0,ex(c.path,""),u=Jx)}break;case Lx:if(!n||n.cannotBeABaseURL&&"#"!=i)return ox;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=IE(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=Xx;break}u="file"==n.scheme?zx:jx;continue;case Ux:if("/"!=i||"/"!=r[d+1]){u=jx;continue}u=Nx,d++;break;case Mx:if("/"==i){u=Fx;break}u=Qx;continue;case jx:if(c.scheme=n.scheme,i==tE)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=IE(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())u=Bx;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=IE(n.path),c.query="",u=Yx;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=IE(n.path),c.path.length--,u=Qx;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=IE(n.path),c.query=n.query,c.fragment="",u=Xx}break;case Bx:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=Qx;continue}u=Fx}else u=Nx;break;case Gx:if(u=Nx,"/"!=i||"/"!=QE(l,d+1))continue;d++;break;case Nx:if("/"!=i&&"\\"!=i){u=Fx;continue}break;case Fx:if("@"==i){h&&(l="%40"+l),h=!0,a=PE(l);for(var m=0;m<a.length;m++){var g=a[m];if(":"!=g||f){var v=Rx(g,Sx);f?c.password+=v:c.username+=v}else f=!0}l=""}else if(i==tE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==l)return"Invalid authority";d-=PE(l).length+1,l="",u=qx}else l+=i;break;case qx:case Vx:if(t&&"file"==c.scheme){u=Kx;continue}if(":"!=i||p){if(i==tE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==l)return cx;if(t&&""==l&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(l))return s;if(l="",u=$x,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return cx;if(s=c.parseHost(l))return s;if(l="",u=Hx,t==Vx)return}break;case Hx:if(!JE(hx,i)){if(i==tE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=l){var b=WE(l,10);if(b>65535)return ux;c.port=c.isSpecial()&&b===Dx[c.scheme]?null:b,l=""}if(t)return;u=$x;continue}return ux}l+=i;break;case zx:if(c.scheme="file","/"==i||"\\"==i)u=Wx;else{if(!n||"file"!=n.scheme){u=Qx;continue}if(i==tE)c.host=n.host,c.path=IE(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=IE(n.path),c.query="",u=Yx;else{if("#"!=i){Ox(YE(IE(r,d),""))||(c.host=n.host,c.path=IE(n.path),c.shortenPath()),u=Qx;continue}c.host=n.host,c.path=IE(n.path),c.query=n.query,c.fragment="",u=Xx}}break;case Wx:if("/"==i||"\\"==i){u=Kx;break}n&&"file"==n.scheme&&!Ox(YE(IE(r,d),""))&&(Tx(n.path[0],!0)?ex(c.path,n.path[0]):c.host=n.host),u=Qx;continue;case Kx:if(i==tE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Tx(l))u=Qx;else if(""==l){if(c.host="",t)return;u=$x}else{if(s=c.parseHost(l))return s;if("localhost"==c.host&&(c.host=""),t)return;l="",u=$x}continue}l+=i;break;case $x:if(c.isSpecial()){if(u=Qx,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=tE&&(u=Qx,"/"!=i))continue}else c.fragment="",u=Xx;else c.query="",u=Yx;break;case Qx:if(i==tE||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=ax(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||ex(c.path,"")):Px(l)?"/"==i||"\\"==i&&c.isSpecial()||ex(c.path,""):("file"==c.scheme&&!c.path.length&&Tx(l)&&(c.host&&(c.host=""),l=QE(l,0)+":"),ex(c.path,l)),l="","file"==c.scheme&&(i==tE||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)nx(c.path);"?"==i?(c.query="",u=Yx):"#"==i&&(c.fragment="",u=Xx)}else l+=Rx(i,xx);break;case Jx:"?"==i?(c.query="",u=Yx):"#"==i?(c.fragment="",u=Xx):i!=tE&&(c.path[0]+=Rx(i,kx));break;case Yx:t||"#"!=i?i!=tE&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Rx(i,kx)):(c.fragment="",u=Xx);break;case Xx:i!=tE&&(c.fragment+=Rx(i,Ex))}d++}},parseHost:function(e){var t,n,r;if("["==QE(e,0)){if("]"!=QE(e,e.length-1))return cx;if(t=function(e){var t,n,r,i,a,s,o,c=[0,0,0,0,0,0,0,0],u=0,d=null,l=0,h=function(){return QE(e,l)};if(":"==h()){if(":"!=QE(e,1))return;l+=2,d=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&JE(gx,h());)t=16*t+WE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;l++}if(!JE(hx,h()))return;for(;JE(hx,h());){if(a=WE(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}c[u]=256*c[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[u++]=t}else{if(null!==d)return;l++,d=++u}}if(null!==d)for(s=u-d,u=7;0!=u&&s>0;)o=c[u],c[u--]=c[d+s-1],c[d+--s]=o;else if(8!=u)return;return c}(ix(e,1,-1)),!t)return cx;this.host=t}else if(this.isSpecial()){if(e=LE(e),JE(vx,e))return cx;if(t=function(e){var t,n,r,i,a,s,o,c=rx(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(a=10,i.length>1&&"0"==QE(i,0)&&(a=JE(px,i)?16:8,i=ix(i,8==a?1:2)),""===i)s=0;else{if(!JE(10==a?mx:8==a?fx:gx,i))return e;s=WE(i,a)}ex(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=$E(256,5-t))return null}else if(s>255)return null;for(o=ZE(n),r=0;r<n.length;r++)o+=n[r]*$E(256,3-r);return o}(e),null===t)return cx;this.host=t}else{if(JE(bx,e))return cx;for(t="",n=PE(e),r=0;r<n.length;r++)t+=Rx(n[r],kx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return TE(Dx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Tx(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,s=e.path,o=e.query,c=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=Ax(i),null!==a&&(u+=":"+a)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+YE(s,"/"):"",null!==o&&(u+="?"+o),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw zE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new eS(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Ax(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(UE(e)+":",Ix)},getUsername:function(){return this.username},setUsername:function(e){var t=PE(UE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Rx(t[n],Sx)}},getPassword:function(){return this.password},setPassword:function(e){var t=PE(UE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Rx(t[n],Sx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Ax(e):Ax(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,qx)},getHostname:function(){var e=this.host;return null===e?"":Ax(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Vx)},getPort:function(){var e=this.port;return null===e?"":UE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=UE(e))?this.port=null:this.parse(e,Hx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+YE(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,$x))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=UE(e))?this.query=null:("?"==QE(e,0)&&(e=ix(e,1)),this.query="",this.parse(e,Yx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=UE(e))?("#"==QE(e,0)&&(e=ix(e,1)),this.fragment="",this.parse(e,Xx)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var eS=function(e){var t=DE(this,tS),n=jE(arguments.length,1)>1?arguments[1]:void 0,r=NE(t,new Zx(e,!1,n));wE||(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())},tS=eS.prototype,nS=function(e,t){return{get:function(){return FE(this)[e]()},set:t&&function(e){return FE(this)[t](e)},configurable:!0,enumerable:!0}};if(wE&&(RE(tS,"href",nS("serialize","setHref")),RE(tS,"origin",nS("getOrigin")),RE(tS,"protocol",nS("getProtocol","setProtocol")),RE(tS,"username",nS("getUsername","setUsername")),RE(tS,"password",nS("getPassword","setPassword")),RE(tS,"host",nS("getHost","setHost")),RE(tS,"hostname",nS("getHostname","setHostname")),RE(tS,"port",nS("getPort","setPort")),RE(tS,"pathname",nS("getPathname","setPathname")),RE(tS,"search",nS("getSearch","setSearch")),RE(tS,"searchParams",nS("getSearchParams")),RE(tS,"hash",nS("getHash","setHash"))),SE(tS,"toJSON",(function(){return FE(this).serialize()}),{enumerable:!0}),SE(tS,"toString",(function(){return FE(this).serialize()}),{enumerable:!0}),HE){var rS=HE.createObjectURL,iS=HE.revokeObjectURL;rS&&SE(eS,"createObjectURL",EE(rS,HE)),iS&&SE(eS,"revokeObjectURL",EE(iS,HE))}ME(eS,"URL"),_E({global:!0,constructor:!0,forced:!AE,sham:!wE},{URL:eS});var aS=function(){function e(t){D(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return R(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 n={},r=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,i=new O(location.href,!0);for(var a in i.query)n[a]=i.query[a];return Object.keys(n).filter(function(n){var r=this;return t(this,e),this.customParamKeys.some(function(e){return t(this,r),e===n}.bind(this))}.bind(this)).length>0||r?(console.log("custom-params",n,r),n):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),sS=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(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 n=document.createElement("div");this.adResumeButton=n,n.id="gd__resume__button",n.setAttribute("title","Resume"),this.addStyles(),n.classList.add("gd__resume__button"),n.addEventListener("click",function(){t(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(n);var r=document.createElement("div");this.adResumeButtonOverlay=r,r.id="gd__resume__button__overlay",r.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(r)}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}(),oS=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),cS=function(){function e(t){D(this,e),this.adContainer=t}return R(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}(),uS=function(e){if(!e)return!1;var t=dS.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)},dS=Object.prototype.toString;function lS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pS(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}var fS,mS="13998",gS="_cc".concat(mS),vS=["https://tags.crwdcntrl.net/c/".concat(mS,"/cc.js?ns=").concat(gS)],bS=function(){return!!fS&&"function"==typeof fS.bcpf&&"function"==typeof fS.add},yS=function(e,t){try{if(!bS())return;fS.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},_S=function(e,t){try{if(!bS())return;fS.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},wS=function(e){var n=this;try{yS("act","play"),yS("med","game"),"complete"===document.readyState?fS.bcpf():fS.bcp(),e.tags.forEach(function(e){t(this,n),_S("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),_S("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},AS=function(){window.addEventListener("load",(function(){rA.once("game-data-ready",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=uy&&uy.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!==(i=t.lotm)&&void 0!==i&&i.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,f(vS[0],"LOTCC_".concat(mS),{alternates:vS});case 16:"object"===n(window[gS])&&(fS=window[gS]),bS()&&wS(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(e){return t.apply(this,arguments)}}())}))},kS=function(){_S("genp","ad video"),_S("act","ad impression")},ES=function(){_S("act","ad skipped")},xS=function(){_S("act","ad click")},SS=function(){_S("act","ad complete")},RS=new Ew,DS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},TS=function(e,n){var r=this,i=function(e,t){var n=RS.get("partner.url.value"),r=DS[t],i="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(i),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,n),a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(i[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},OS=(new Ew).get("partner.domain.value"),PS=["latimes.com"],IS={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&PS.some(function(e){return t(this,n),e===OS}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return TS(n,e)}}[OS](e)}(e,t)}};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(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 j,MS=null,jS=function(){function n(e,r,i){var a=this;if(D(this,n),MS)return MS;MS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?h(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new _,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=i.parentDomain,this.topDomain=i.topDomain,this.parentURL=i.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=w(),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=""!==e?document.getElementById(e):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,c=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:c,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){t(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){t(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var i,a,s,o,c,u,d,l,p,A,k,E,x,S,I,C,L,U,j,q,V,H,z;return R(n,[{key:"start",value:(z=e(r.mark((function n(){var i,a,s,o=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_afg_script({adsense_channel:"4089988593"});case 2:case"end":return e.stop()}}),e)}))));case 3:return i=n.sent,this.afgInitSuccess=i.success,n.next=7,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_hl_script();case 2:return e.next=4,o._init_ima_script();case 4:o._createPlayer(),o._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(a=n.sent,this.imaInitSuccess=a.success,s=[],this.afgInitSuccess||s.push(i.error),this.imaInitSuccess||s.push(a.error),!(s.length>0)){n.next=14;break}throw s[0];case 14:window.eventTest=function(e){t(this,o),this._broadcast(e,{message:"",status:"success"})}.bind(this),n.next=21;break;case 17:throw n.prev=17,n.t0=n.catch(0),us("gd-adflow error on ads.start",n.t0),new Error(n.t0);case 21:case"end":return n.stop()}}),n,this,[[0,17]])}))),function(){return z.apply(this,arguments)})},{key:"adSystemInitialize",value:(H=e(r.mark((function e(t){var n;return r.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 H.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:(V=e(r.mark((function e(t){var n,i,a,s,o,c,u,d,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,c=this.nextAdPosition(n),e.next=6,this._create_dp_context(c,i);case 6:return u=e.sent,o?(this.gameData,d=o[c]||o.default||this._getDefaultSpilAdapterConfig()):d=this._getDefaultSpilAdapterConfig(),l=100*u.floor_price,u.floor_price,h=this._createCustomAdVastUrl(d,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,dp:u,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return V.apply(this,arguments)})},{key:"_getAdVast",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,u,d,l,h,p,f,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m.available&&m.getBoolean("gd_debug_ex")&&m.getBoolean("gd_tag"))){e.next=6;break}return o=a.IMASampleTags[n],c=Math.floor(Math.random()*o.length),u=o[c],s({url:u}),e.abrupt("return");case 6:if("spil"!==i.adapter){e.next=8;break}return e.abrupt("return",s(a._getSpilUrl({adType:n,options:i})));case 8:if(void 0!==window.idhb.requestAds){e.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return e.prev=10,d=a.nextAdPosition(n),a._broadcast("AD_REQUEST",{message:d}),l=a.options,"preroll"===d&&G(l.preroll)?l=l.preroll:"midroll"===d&&G(l.midroll)?l=l.midroll:"rewarded"===d&&G(l.rewarded)&&(l=l.rewarded),h="rewarded"===d?"rewardedVideo":"gdbanner"===d?"gd__banner":"midroll"===d?"midroll":"video1",e.next=18,window.idhb.isLoaded();case 18:return e.next=20,a._create_dp_context(d,i);case 20:p=e.sent,cs("gd-adflow, before idhb",d,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(LS(LS({},f),{},{adaptor_order:i.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.requestAds({slots:T({},h,{bidFloor:(null==p?void 0:p.floor_price)||void 0}),callback:function(e,n){var r=this;t(this,g),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:LS(LS({},window.idhb.getAdserverTargetingForAdSlot(h)),{},{tnl_ad_pos:d,tnl_asset_id:a.gameData.gameId}),url:e,dp:p,hl:n};a._extend_hl_url(i),s(i)}.bind(this)}),e.next=32;break;case 29:throw e.prev=29,e.t0=e.catch(10),new Error(e.t0);case 32:case"end":return e.stop()}}),e,this,[[10,29]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===g.Rewarded)return this.adRewardedCount++,"rewarded";if(e===g.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===g.Rewarded?"rewarded":e===g.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===g.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===g.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,n){var r=this;return n=n||{},new Promise(function(i){var a=this;if(t(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var s,o,c=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var u=new google.ima.AdsRequest,d=this._transformVast(e,n),l=LS(LS({},n),{},{adTag:d,tnl_ad_pos:c});this.adCounter[c]=this.adCounter[c]||0,this.adCounter[c]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!d.bidder&&(h.adtag_url=d.url,this._extend_dp_with_adsense(h,p,null==e?void 0:e.tnl_keys));var f=this._isVMAP(c);(function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):d.url="original_broken",null==h||h.adtag_url,null==h||h.fallback_url,d.url)}).bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)u.adTagUrl=m;else if(f){var g=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,i=Date.now(),a=new O(e.adtag_url_1,!0);a.query=hS(hS({},a.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:i,output:"xml_vast3"});var s=a.toString(),o=new O(e.adtag_url_2,!0);o.query=hS(hS({},o.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++i,output:"xml_vast3"});var c=o.toString(),u=Date.now();return'<?xml version="1.0" encoding="UTF-8"?>\n<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-1">\n <vmap:AdSource id="'.concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(pS({id:u++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url,fallback_url:null==n?void 0:n.fallback_url,fallback_imp_url:null==n?void 0:n.fallback_imp_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(pS({id:u++,adtag_url:c,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url,fallback_url:null==r?void 0:r.fallback_url,fallback_imp_url:null==r?void 0:r.fallback_imp_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:h,adtag:d,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(c)}));u.adsResponse=g}else if(h&&p.bidFloorApplied){var v=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(h);u.adsResponse=v}else if(h&&h.fallback_url){var b=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()}(h);u.adsResponse=b}else u.adTagUrl=d.url;u.linearAdSlotWidth=this.options.width,u.linearAdSlotHeight=this.options.height,u.nonLinearAdSlotWidth=this.options.width,u.nonLinearAdSlotHeight=this.options.height,u.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(u.vastLoadTimeout=this.options.vast_load_timeout),u.setAdWillAutoPlay(n.autoplayAllowed),u.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(u,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(u)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=IS.exist(this.gameData)&&IS.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:(q=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):B.video({inline:!0,muted:!1}).then(function(n){t(this,i);var r=n.result;n.error,e(!0===r?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(j=e(r.mark((function e(){var t;return r.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 j.apply(this,arguments)})},{key:"startAd",value:(U=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.adType,a=n.params,this.adType_=i,this.adContext=LS(LS({},a),{},{adType:i}),"promo"!==(null==a?void 0:a.adapter)){e.next=5;break}return e.abrupt("return",this._startPromo(a,i));case 5:if("adsense"!==(null==a?void 0:a.adapter)){e.next=29;break}if(i!==g.Interstitial){e.next=22;break}if("preroll"!==(null==a?void 0:a.position)){e.next=11;break}return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 11:if("start"!==(null==a?void 0:a.position)){e.next=15;break}return e.abrupt("return",this._startAdsensePlacementStart(n));case 15:if("next"!==(null==a?void 0:a.position)){e.next=19;break}return e.abrupt("return",this._startAdsensePlacementNext(n));case 19:return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 20:e.next=27;break;case 22:if(i!==g.Rewarded){e.next=26;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(n));case 26:case 39:throw new Error("Unsupported ad type");case 27:e.next=40;break;case 29:if(!["ima","spil"].some(function(e){return t(this,s),e===(null==a?void 0:a.adapter)}.bind(this))){e.next=40;break}if(i!==g.Interstitial){e.next=35;break}return e.abrupt("return",this._startInterstitialAd(a));case 35:if(i!==g.Rewarded){e.next=39;break}return e.abrupt("return",this._startRewardedAd(a));case 40:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"preloadAd",value:(L=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==g.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==g.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 L.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,n=function(){t(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new sS(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new oS(this.adContainer,n),this.rewardedLabel.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(C=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,u,d,l,h,p,f,m,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(c=i?i.containerId:null)||s("Container id is not specified"),u=document.getElementById(c),document.getElementById(c)||s("No container is found with this id - ".concat(c)),void 0===window.idhb.requestAds&&s("Prebid.js wrapper script hit an error or didn't exist!"),d=i.slotId?i.slotId:"gd__banner@".concat(c),document.getElementById(d)||(l="\n .gd__banner{\n z-index: ".concat(v.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((h=document.createElement("style")).type="text/css",h.id="gd__banner__style",h.styleSheet?h.styleSheet.cssText=l:h.appendChild(document.createTextNode(l)),u.appendChild(h)),(p=document.createElement("div")).id=d,p.classList.add("gd__banner"),u.appendChild(p)),e.next=11,a._create_dp_display_context();case 11:a.atom_display=e.sent,a.atom_display,null!==(o=a.atom_display)&&void 0!==o&&o.params&&window.idhb.setAdserverTargeting(null===(f=a.atom_display)||void 0===f?void 0:f.params),(m={})[d]={maxSize:[u.offsetWidth,u.offsetHeight]},window.idhb.requestAds({slots:m,callback:function(e){t(this,g),JSON.stringify(e,null,2)}.bind(this)}),n(),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(0),console.log("display_test error",e.t0),s(e.t0.message||e.t0);case 24:case"end":return e.stop()}}),e,this,[[0,20]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return C.apply(this,arguments)})},{key:"_startInterstitialAd",value:(I=e(r.mark((function e(n){var i,a,s,o=this;return r.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(t(this,o),ds.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 i=e.sent,e.next=13,this._loadInterstitialAd(LS(LS({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.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 I.apply(this,arguments)})},{key:"_startPromo",value:(S=e(r.mark((function e(t,n){var i,a,s;return r.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 i=e.sent,e.next=11,this._loadPromo(LS(LS({},i),t),n);case 11:if(a=e.sent,s=a.success,a.args,s){e.next=16;break}return e.abrupt("return");case 16:i.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 S.apply(this,arguments)})},{key:"_loadPromo",value:(x=e(r.mark((function e(t,n){var i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,i=this.nextAdPosition(n),a=this._create_promo_context(i),this._requestPromo(a,LS({adType:g.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 x.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(E=e(r.mark((function e(t){var n;return r.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(g.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:g.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 E.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var s=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!0,args:e})}.bind(this),1)}.bind(this),o=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",s,a),this.eventBus.subscribe("AD_SDK_CANCELED",o,a),this.eventBus.subscribe("AD_ERROR",o,a)}.bind(this))}},{key:"_startRewardedAd",value:(k=e(r.mark((function e(n){var i,a,s,o=this;return r.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(t(this,o),ds.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 i=e.sent,e.next=13,this._loadRewardedAd(LS(LS({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.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 k.apply(this,arguments)})},{key:"_loadRewardedAd",value:(A=e(r.mark((function e(t){var n;return r.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(g.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:g.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 A.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(p=e(r.mark((function e(){return r.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(g.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return p.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(l=e(r.mark((function e(){return r.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(g.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return l.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var n=this;if(this.activeAdContainer){this.activeAdContainer.style.visibility="visible";var r=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var i=this._isT4R(e),a=this._getT4ROptions(e);if("loaded"===r)this.activeAdContainer.style.opacity=i?.001:1,i&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new cS(this.adContainer),this.t4rButton.add()),i&&this.adsManager.setVolume(0),i&&this._broadcast("AD_T4R"),i&&setTimeout(function(){t(this,n),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"===r||"first_quartile"===r){if(i&&"click"===r){var s,o=null===(s=this._adrequest_user_context)||void 0===s?void 0:s.tnl_ad_pos;this.clickCount[o]++}this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}}}},{key:"_createPlayer",value:function(){var e=this,n=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=v.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 r=document.createElement("video");r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline",!0),r.id="".concat(this.prefix,"advertisement_video"),r.style.position="absolute",r.style.backgroundColor="#000000",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.video_ad_player=r,this.adContainer.appendChild(r);var i=document.createElement("div");i.id="".concat(this.prefix,"advertisement_slot"),i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",this.adContainerInner=i,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(i),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(i),n.appendChild(this.adContainer)),this.addAdResume(),this.activeAdContainer.style.visibility="hidden";var a=function(){t(this,e);var n=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:n,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",a),window.document.addEventListener("DOMContentLoaded",a)}},{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 n=this,r=new google.ima.AdsRenderingSettings;r.autoAlign=!1,r.enablePreloading=!1,r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.useStyledNonLinearAds=!0,r.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,r),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(){t(this,n),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 i=new Date,a=i.getHours(),s=i.getDate(),o=i.getMonth(),c=i.getFullYear(),u="AD_SDK_MANAGER_READY";this._broadcast(u,{name:u,message:"AD SDK is ready",status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(c)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r=this,i=new Date,a=i.getHours(),s=i.getDate(),o=i.getMonth(),c=i.getFullYear(),u=b(google.ima.AdEvent.Type,e.type),d=!1,l=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",h=!l.startsWith("image")&&!l.startsWith("text");this._sendIMAEventsToHB(e);var p=document.getElementById("game"),f="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:f="Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.";break;case google.ima.AdEvent.Type.AD_METADATA:f="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(d=!0),f="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:f="Fired when the ad is clicked.";var m=e.getAd().getContentType();this._show({mode:"click",contentType:m}),xS();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),d=this._is_completed(e.getAd()),f="Fired when the ad completes playing.",this.adType_===g.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(p.style.display="none"),this.contentPaused=!0,f="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(p.style.display="block"),f="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?d=!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:f="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:f="Fired when the ad playhead crosses first quartile.";var v=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:v});break;case google.ima.AdEvent.Type.IMPRESSION:f="Fired when the impression URL has been pinged.",e.getAd();break;case google.ima.AdEvent.Type.INTERACTION:f="Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.";break;case google.ima.AdEvent.Type.LINEAR_CHANGED:f="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var y=e.getAd().getContentType();f=y,this._show({mode:"loaded",contentType:y});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(f=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:f="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:h&&this.adResume.show(),f="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:f="Fired when the ad is resumed.",h&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:f="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:d=this._is_completed(e.getAd()),f="Fired when the ad is skipped by the user.",ES(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:this.adType_===g.Rewarded&&this.rewardedLabel.show(),this._hideAddResume(),f="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:f="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:d=this._is_completed(e.getAd()),f="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:f="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:f="Fired when the ad volume has been muted."}if(""!==u&&""!==f){var _=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,w=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;_||w||this._broadcast(u,{name:u,message:f,status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(c)}})}if(d&&!this.adSuccess){this.adSuccess=!0;var A=e.getAd(),k="Rainbow"===(null==A?void 0:A.getAdSystem())&&(null==A?void 0:A.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this)));null==A||A.getAdSystem(),null==A||A.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:k}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var c=e.type,u=e.url;if("none"===c||!u)return;u=u.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(u).then(function(){t(this,n)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,n){var r=this,i={type:"none"};try{var a=this.current_dp,s=a.id,o=a.error_url,c=a.impression_url,u=a.fallback_imp_url,d=a.promo_imp_green_url;if(!e&&!n)return i={type:"imp_err",url:o};var l=e.getWrapperAdIds().some(function(e){return t(this,r),e==="".concat(s)}.bind(this)),h=e.getWrapperAdIds().some(function(e){return t(this,r),"fallback"===e}.bind(this)),p=e.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this));l&&n?i={type:"normal_imp",url:c}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:d}:h&&n&&(i={type:"fallbacj_imp",url:u})}catch(e){}return i}},{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(),i=this._getInnerErrorCode(n);US.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,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_===g.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,n){var r=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){t(this,r),this.cancel(),this._clearSafetyTimer(n)}.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(uS(e.getInnerError)){var t=e.getInnerError();if(t)return uS(t.getErrorCode)&&uS(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,n){var r=this;if(e){var i=this.macros.transform(e,{get:function(e){if(t(this,r),n&&n.tnl_keys)return n.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in i.query||{}){var s=i.query[a];G(s)&&(i.query[a]=N.stringify(s))}var o=new O(i.url,!0);return F(o.query,i.query||{}),LS({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new O(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new O(e.url,!0);if(a.query.cust_params){var s=N.parse(a.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=a}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,n,r){var i=this;if(e&&n&&e.tnl_keys){var a=this.options.vast_query;if(n.retry_on_success&&this.options.retry_on_success&&G(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&G(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M(a),G(a)){var s=r.query;if(a.$$remove){for(var o in s){new RegExp(a.$$remove,"i").test(o)&&delete s[o]}delete a.$$remove}var c=N.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var u in c){new RegExp(a.cust_params.$$remove,"i").test(u)&&delete c[u]}delete a.cust_params.$$remove}var d=this.macros.transform(a,{get:function(n){return t(this,i),e.tnl_keys[n.toLowerCase()]}.bind(this)});return s.cust_params=c,F(s,d),s.cust_params=N.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a=null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder;return this.msgrt.send("bidder",{message:a}),this._adrequest_user_context,'bidder:"'.concat(a,'"'),((null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[]).some(function(n){return t(this,e),n===a}.bind(this))}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isT4R",value:function(e){var t,n,r;if(!this.gameData.publishedAt)return!1;var i=new Date(this.gameData.publishedAt);if(((new Date).getTime()-i.getTime())/864e5<=10)return!1;if(this._isExcludedBidderForT4R())return this.msgrt.send("bidder.ex",{message:"true"}),!1;this.msgrt.send("bidder.ex",{message:"false"});var a,s=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[s]>=(null===(n=e.t4r[s])||void 0===n?void 0:n.count))return!1;if(null!=e&&null!==(r=e.contentType)&&void 0!==r&&r.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return s&&(null===(a=e.t4r[s])||void 0===a?void 0:a.enabled);if(null!=e&&e.contentType.startsWith("video/")){var o,c=(null===(o=e.t4r[s])||void 0===o?void 0:o.viper)||0;if(c>0){var u,d=Math.random()<c;return s&&d&&(null===(u=e.t4r[s])||void 0===u?void 0:u.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s,o,c,u,d,l,h,p,f,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===(i=r.pAds)||void 0===i||null===(a=i.vmap)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(c=this.gameData)||void 0===c||null===(u=c.mAds)||void 0===u||null===(d=u.vmap)||void 0===d?void 0:d.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),b=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?b>=(null==v?void 0:v.start):g}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,s=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,o=null!=r&&r.vast_1?void 0:i,c=null!=r&&r.vast_2?void 0:i;return{adtag_url_1:null==a?void 0:a.url,adtag_url_2:null==s?void 0:s.url,position:n,dp_1:o,dp_2:c}}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,s,o,c;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===(i=r.mAds)||void 0===i?void 0:i.vmap;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(c=o.pAds)||void 0===c?void 0:c.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(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new aS(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(P.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(s)).then(function(e){return t(this,r),e.json()}.bind(this)).then(function(e){if(t(this,r),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),n();var i=e.p/100;this.msgrt.send("dp.fp",{message:i}),n({params:{fp:i},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(s),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(s)})}.bind(this)).catch(function(e){t(this,r),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var n,r=this,i={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(encodeURIComponent(i[e]))}.bind(this)).join("&");encodeURIComponent(P.encode(JSON.stringify(i)));var s=null===(n=this.gameData.promo)||void 0===n?void 0:n.rainbow,o=null==s?void 0:s.enabled,c="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),u=o?c:void 0;return function(){t(this,r),ds.promoError&&(console.log("promo-test fictional promo error"),u=void 0)}.bind(this),{promo_url:u,promo_imp_blue_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,u,d,l,h,p=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a._isDP(n)){e.next=5;break}return a.msgrt.send("dp.na",{message:"rule"}),e.abrupt("return",s());case 5:c={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(u=new aS(a.gameData).checkCustomParams())&&(c.cp=u),d=encodeURIComponent(P.encode(JSON.stringify(c))),null==i||i.adapterIndex,null==i||i.isLastAdapter,l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,h=(null==l?void 0:l.enabled)&&(null==i?void 0:i.isLastAdapter)&&"rewarded"===n,null==l||l.enabled,null==i||i.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return t(this,p),e.json()}.bind(this)).then(function(e){if(t(this,p),!e||!e.p)return a.msgrt.send("dp.na",{message:"atom"}),s();var n=e.p/100;a.msgrt.send("dp.fp",{message:n}),s({id:Date.now(),floor_price:n,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:h?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(d):void 0,promo_imp_blue_url:h?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:h?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){t(this,p),a.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),s()}.bind(this)),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),a.msgrt.send("dp.err",{message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||e.t0}),s();case 20:case"end":return e.stop()}}),e,this,[[0,16]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new O(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var i=N.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=N.stringify(i,!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 i,a=new O(e.url,!0);if(null===(i=a.query)||void 0===i||!i.cust_params)return;var s=N.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=N.stringify(s,!1),e.url=a.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(d=e(r.mark((function e(n){var i,a,s,o,c,u,d,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._getPrebidScripts(),a=i[0],s=function(){return t(this,l),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:s},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||[],(o=new URL(a)).searchParams.append("referer",window.idhb.options.configUrl),a=o.href,e.next=13,f(a,"gdsdk_prebid",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,l),window.idhb.requestAds}.bind(this)});case 13:c=y("ch",window.location.href),u=y("ch_date",window.location.href),d={tnl_content_category:this.category.toLowerCase()},c&&(d.channel=c),u&&(d.ch_date=u),window.idhb.setAdserverTargeting(d),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var n=this;t(this,l);try{var r,i=e.slotId.split("@");i=1===i.length?i[0]:i[1],e.isEmpty?(null!==(r=this.atom_display)&&void 0!==r&&r.error_url&&(fetch(this.atom_display.error_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_ERROR",{message:i,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_IMPRESSION",{message:i,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:(u=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=["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"],a=this.options.debug?i[0]:i[1],e.next=4,f(a,"gdsdk_ima",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,s),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"_init_afg_script",value:(c=e(r.mark((function e(n){var i,a,s,o,c=this;return r.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(o={}).crossorigin="anonymous",o["data-ad-client"]=(null==n||null===(i=n.adsense_client)||void 0===i?void 0:i.length)>0?n.adsense_client:"ca-pub-2316275586951220",o["data-ad-frequency-hint"]="30s",o.allow="autoplay",(null==n||null===(a=n.adsense_channel)||void 0===a?void 0:a.length)>0&&(o["data-ad-channel"]=n.adsense_channel),(null==n||null===(s=n.adsense_host)||void 0===s?void 0:s.length)>0&&(o["data-ad-host"]=n.adsense_host),!0===(null==n?void 0:n.adsense_adbreak_test)&&(o["data-adbreak-test"]="on"),e.next=14,f("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,c),!!window.adsbygoogle}.bind(this),attrs:o});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 c.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",i=n||!0,a=document.getElementsByClassName("adsbygoogle"),s=0;s<a.length;s++){var o,c=a[s],u=c&&(null===(o=c.children[0])||void 0===o?void 0:o.children[0]);u&&"IFRAME"===u.tagName&&u.style.height!==r&&(u.style.height=r,i&&(u.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=e(r.mark((function e(n){var i,a,s,o,c,u,d,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.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(t(this,h),ds.fictionalAdSenseError||n.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"),i=!1,a=function(){t(this,h),i=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),s=function(){t(this,h),i=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),o=function(){t(this,h),i=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),c=function(){t(this,h),i=!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),u=function(e){t(this,h),i=!0,e()}.bind(this),d=function(e){t(this,h),i=!0,this.resetForNext();var n="rewarded";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"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),l=function(e){window.adsbygoogle.push(e)},setTimeout(function(){t(this,h),i||(cs("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),l({type:"reward",name:"reward-in-game",beforeAd:a,afterAd:s,adDismissed:o,adViewed:c,beforeReward:u,adBreakDone:d}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return o.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(s=e(r.mark((function e(n){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.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(t(this,a),ds.fictionalAdSenseError||n.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"),i=function(e){t(this,a),this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"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),r={type:"preroll",adBreakDone:i},window.adsbygoogle.push(r),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 r}),e,this,[[1,15]])}))),function(e){return s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(a=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.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(t(this,o),ds.fictionalAdSenseError||n.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"),i=function(){t(this,o),this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"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),r={type:"start",name:"start-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),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 r}),e,this,[[1,17]])}))),function(e){return a.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(i=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.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(t(this,o),ds.fictionalAdSenseError||n.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"),i=function(){t(this,o),this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),this.resetForNext();var n="midroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"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),r={type:"next",name:"next-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),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 r}),e,this,[[1,17]])}))),function(e){return i.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,i=n._ua,a={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:i.browser.name,brvs:i.browser.version,osnm:i.os.name,osvs:i.os.version,dvmd:i.device.model,w:r.w,h:r.h}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(P.encode(JSON.stringify(a)))))}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 Ew).get();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===g.Rewarded)t="reward";else if(n===g.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,n){var r=this,i=!1;["AD_ERROR"].some(function(n){return t(this,r),n===e}.bind(this))&&(i=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,LS(LS({},n),{},{skipForward:i,adPosition:a}))}}]),n}(),BS=R((function t(n){var i=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"promo",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-stone-dynamic",s=n.package_version||"1.1.1",o=n.template||"puzzle",c=n.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},Wv(this.moduleName,this.moduleConfig)})),GS=R((function t(n){var i=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"splash",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-air-dynamic",s=n.package_version||"1.2.0",o=n.template||"pluto",c=n.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},Wv(this.moduleName,this.moduleConfig)})),NS=function(e,t){console.log(e,t)},FS={},qS={},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 FS.version=r,FS.frame=e,FS.function=n,FS.version}function zS(e){var n=this;return VS||(VS=new Promise(function(r){function i(t,n){if(NS("Received a response from CMP",t),n){var i,a;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(a=(i=t)&&"boolean"==typeof i.gdprApplies?i.gdprApplies:e.defaultGdprScope)||!0===a&&"string"!=typeof i.tcString)&&r({result:"cmpUnexpectedResponse",cmp:FS,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),HS(),FS.frame?2===FS.version?(NS("TCF v2 CMP found. Fetching the consent."),FS.function?(NS("CMP API is directly accessible, calling it now..."),FS.function("addEventListener",FS.version,i)):(NS("CMP API is outside the current iframe, calling it now..."),function(e,n,r){var i=this,a="__tcfapi";function s(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!==qS[r.callId]&&qS[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var c=Math.random()+"",u="".concat(a,"Call"),d=T({},u,{command:e,parameter:o,callId:c,version:r});qS[c]=s,n.postMessage(d,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,FS.version,r)}("addEventListener",FS.frame,i))):r({result:"cmpVersionNotV2",cmp:FS}):r({result:"cmpNotFound"})}.bind(this)),VS)}var WS=new(function(){function t(){D(this,t),this.productName="Game Distribution"}var n;return R(t,[{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:(n=e(r.mark((function e(t,n){var i,a,s,o,c,u,d;return r.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(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),c=encodeURIComponent(s),e.prev=8,u="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=12,fetch(u,{method:"POST"});case 12:e.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,d="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=22,fetch(d,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,t){return n.apply(this,arguments)})}]),t}());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,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,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,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}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 n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var c=this;t(this,n);try{var u=document.createElement("script");if(u.async=null==s||s,u.type="text/javascript",u.onload=function(){t(this,c),e()}.bind(this),u.onerror=function(){t(this,c);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),u.src=r,i){var d,l=KS(i);try{for(l.s();!(d=l.n()).done;){var h=d.value,p=h.key,f=h.value;u.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(u)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},JS="140feb72-7952-4420-8ae5-e8978d87bc17",YS=function(){var t=e(r.mark((function e(){return r.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://cookie-cdn.cookiepro.com/consent/".concat(JS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,QS({src:"https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:JS}],isAsync:!1});case 7:n=void 0,r=void 0,i=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(i=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(i),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,i}),e,null,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),XS=new j,ZS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},eR=!1;function tR(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 n=this,r=e.data,i=e.origin,a=r.type;if(Object.keys(ZS).some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=!r.type||!r.type.startsWith("gd-sdk")&&!("parent-data-response"===r.type)||"sg-game-event"===r.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 i="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)&&(eR=!0),i&&eR&&(eR=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var c=o();if(!c)return;var u=c&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),c.indexOf(e)>0}.bind(this)),d=["sg-game-event"].some(function(e){return t(this,n),e===(null==r?void 0:r.type)}.bind(this));if(!u&&!d)return}var l=r.eventName,h=r.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==l&&"levelFinish"!==l||window.mpHelper.sendStat("level",h.level),"levelFinish"===l&&window.mpHelper.sendStat("score",h.score)),window.parent.postMessage(r,"*")}if(a){var p=ZS[i][a];p&&XS.emit(p,r)}}}),!1);var nR="__msgr",rR=q(),iR=function(e){var n=this;if(!window[nR]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=nR,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:rR,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){oR(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",oR(i)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){t(this,n);try{var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=rR,oR(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},aR=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=sR(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},sR=function e(t){try{var n,r,i=null==t?void 0:t.parent;if("game"===(null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return i;e(i)}catch(e){return t}},oR=function(e){try{window[nR]&&window[nR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}};function cR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dR(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 lR(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 lR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,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,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function lR(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 hR,pR=function(){function n(e){var r=this;D(this,n),T(this,"_getAdTypeByAfgPosition",function(e){var n=this;t(this,r);var i={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(i).find(function(r){var a=this;return t(this,n),i[r].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),this._gameData=e._gameData,this._msgrt=e.msgrt,this._adInstance=e.adInstance,this._eventBus=e.eventBus,this.blockedAdsMap=e.blockedAdsMap,this._parentURL=e._parentURL,this._onResumeGame=e.onResumeGame.bind(e),this._setAdRequestTimer=e._setAdRequestTimer.bind(e),this._giveGift=e._giveGift.bind(e),this._runAutoResume=e._runAutoResume.bind(e),this.send_atom_event=e.send_atom_event.bind(e),this.get_session_id=e.get_session_id.bind(e),this.get_ad_system_init_result=e.get_ad_system_init_result.bind(e)}var i,a;return R(n,[{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,c,u,d,l,h,p,f,m,g,v,b,y,_,w,A,k,E,x,S,R,D,T,O,P,I,C,L,U,M,j,B,G,N,F=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=this._getAdTypeByAfgPosition(n),n.params.position,u=this._getAdFlow(c),d=this._gameData,l=d.afg_disabled,h=null===(i=d.promo)||void 0===i||null===(a=i.rainbow)||void 0===a?void 0:a.enabled,p=null===(s=d.promo)||void 0===s?void 0:s.onadsense,f="reward"===(null===(o=n.params)||void 0===o?void 0:o.position),m=l?u.filter(function(e){return t(this,F),"adsense"!==e}.bind(this)):u,g=this.get_ad_system_init_result(),v=g.afg,b=g.ima,this.adsBlocked=!v&&!b,this.adsBlocked?(cs("gd-adflow adsBlocked so changing the flow"),m=[m[0]]):(v||(m=m.filter(function(e){return t(this,F),"adsense"!==e}.bind(this))),b||(m=m.filter(function(e){return t(this,F),"ima"!==e}.bind(this)))),y=!1,_=!1,w=[],A=0,k=!1,E=dR(m),e.prev=21,E.s();case 23:if((x=E.n()).done){e.next=57;break}return S=x.value,n.params.adapter=S,R=A===m.length-1,h&&R&&"ima"===S&&(n.params.runPromoAsImaFallback=!0),D=R&&"adsense"===S&&h&&p&&f,n.params=uR(uR({},n.params),{},{adapterIndex:A,isLastAdapter:R,shouldFail:!1,extraPromoRunOnFail:D}),function(){t(this,F),ds.firstSuccessOrder&&!isNaN(ds.firstSuccessOrder)&&(n.params.shouldFail=A<ds.firstSuccessOrder)}.bind(this),cs("gd-adflow, before adInvoke",A,S,n.params.shouldFail),e.next=34,this.adInvoke(n);case 34:if(T=e.sent,O=T.success,P=T.args,I=T.isSkipped,C=T.noVast,!O){e.next=46;break}return cs("gd-adflow, adapter-result-success",A,S,P),y=!0,_=!(null==P||!P.isPromoSuccess),e.abrupt("break",57);case 46:if(cs("gd-adflow, adapter-result-failure",A,S,P.message),A++,w.push(P.message),!I){e.next=51;break}return e.abrupt("break",57);case 51:if(!C){e.next=54;break}return this._runAutoResume(),e.abrupt("break",57);case 54:R&&"adsense"===S&&h&&p&&f&&(k=!0);case 55:e.next=23;break;case 57:e.next=62;break;case 59:e.prev=59,e.t0=e.catch(21),E.e(e.t0);case 62:return e.prev=62,E.f(),e.finish(62);case 65:if(!k){e.next=74;break}return n.params.adapter="promo",e.next=70,this.adInvoke(n);case 70:L=e.sent,U=L.success,L.args,U&&(_=!0);case 74:(function(){var e;t(this,F),ds.disableGift&&null!==(e=d.gft)&&void 0!==e&&e.enabled&&(d.gft.enabled=!1)}).bind(this),M=w.join(" /n"),y?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift()):(this._onResumeGame(M,"warning"),this._giveGift()),j="-1",B="none",y&&_?j="promo_ima":y?(j="index_".concat(A),B=m[A]):_&&(j="promo_adsense"),G=this.get_session_id(),this.adsBlocked&&"-1"===j?(N="rewarded"===c?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[N]=this.blockedAdsMap[N]?this.blockedAdsMap[N]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(N)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:N,sessionId:G,successAdapter:"none",adFlowIndex:j})):(this._msgrt.send("adflow.all.index",{message:"".concat(j)}),this._msgrt.send("adflow.all.success_adapter",{message:"".concat(B)}),this._msgrt.send("adflow.".concat(c,".index"),{message:"".concat(j)}),this._msgrt.send("adflow.".concat(c,".success_adapter"),{message:"".concat(B)}),this.send_atom_event("gd.adflow",{adFlowIndex:j,successAdapter:B,adBlocker:!1,afgBlocked:!v,imaBlocked:!b,adType:c,sessionId:G}));case 84:case"end":return e.stop()}}),e,this,[[21,59,62,65]])}))),function(e){return a.apply(this,arguments)})},{key:"adInvoke",value:(i=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,u,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="main.showad.".concat(i.params.adapter,".").concat(i.params.adapterIndex),c=function(e){t(this,d),a._eventBus.unsubscribeScope(o);var r="dismissed"===(null==e?void 0:e.message);n({success:!1,args:e,isSkipped:r,noVast:e.noVast})}.bind(this),u=function(e){t(this,d),a._eventBus.unsubscribeScope(o),n({success:!0,args:e})}.bind(this),a._eventBus.subscribe("AD_ERROR",c,o),a._eventBus.subscribe("AD_SDK_CANCELED",c,o),a._eventBus.subscribe("AD_SUCCESS",u,o),e.prev=6,e.next=9,a._adInstance.startAd(i);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),us("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return i.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var n,r,i,a,s,o,c,u,d=this,l=void function(){if(t(this,d),ds.customAdFlow)return JSON.parse(ds.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(c=h)||void 0===c||null===(u=c.adapters)||void 0===u?void 0:u[e]:p}}]),n}(),fR=new j,mR=["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 n=this,r=e.data,i=e.origin,a=e.source;if(mR.some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=r.system;r.action;var o="aeriaExternalHostsConnector"===s;if("Softgames"===s)hR=a,(window.parent||window).postMessage(r,"*"),fR.emit("aeria-event",r);else if(o){hR&&hR.postMessage(r,"*");var c=window.parent||window;c&&c.postMessage(r,"*")}}}),!1);var gR="https://html5.gamedistribution.com",vR="parent-data-request",bR="parent-data-response",yR=function(){function n(){D(this,n)}var i;return R(n,[{key:"init",value:function(e){var n=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(r){if(t(this,n),r){var i=r.adRequestTimer;e.adRequestTimer=i,e.adRequestTimer}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var n=this;window.addEventListener("message",function(r){t(this,n);var i=r.data,a=r.origin,s=r.source,o=i.type;if(i.value,a===gR&&o===vR){var c={adRequestTimer:e.adRequestTimer};s.postMessage({type:bR,value:c})}}.bind(this))}},{key:"_askForParentFrameData",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);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===gR&&i===bR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:vR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),_R=new yR;function wR(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 AR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kR=q(),ER=null,xR=null,SR=function(){function n(e){var r=this;if(D(this,n),ER)return ER;ER=this,this.blockedAdsMap={},this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,e),this._version=e.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new Ew,this._location.print(),this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._giftCount=0,this._mplus_count=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,r),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,r),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,i=this;t(this,r),!0===(null===(e=this._gameData.lp)||void 0===e?void 0:e.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(n=this._gameData.evnts)&&void 0!==n&&n.enabled&&this._isLoaderGameURL()&&(iR(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,i),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),_R.init(this),this._send_gametag_data("sdk_init")}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,v,b,y,w,T,I,C,L,U,j,B,G;return R(n,[{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(t(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var n=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];n&&n.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(G=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=d()||"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 G.apply(this,arguments)})},{key:"_loadCMP",value:(B=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=6;break}if(i=new Ew,0!==(null==(a=i.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 B.apply(this,arguments)})},{key:"testConsent",value:function(){try{HS();e(r.mark((function e(){return r.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(n){t(this,e),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"_sendLoadedEvent",value:function(){if(!this._isLoaded&&(this._isLoaded=!0,"loader-frame"===this._whichFrame()))try{this._whichFrame(),this._sendTunnlEvent(1),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"})}catch(e){}}},{key:"_sendGamedockGamePlay",value:function(){var e=this._isTokenGameURL();if(!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||!this._bridge.isCoreSDKMode&&this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||(console.log("noMinijuegosSDK",!this._bridge.isCoreSDKMode,!this._bridge.noMinijuegosSDK,document.location.search.indexOf("mp_game_id")>=0),!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker())}},{key:"_initializeSDKWithGameData",value:(j=e(r.mark((function e(n,i){var a,s=this;return r.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===(a=this._gameData.disableAds)||void 0===a?void 0:a.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(){t(this,s),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"}))}.bind(this)).catch(function(e){t(this,s);var n="".concat(e).startsWith("Error: Blocked:");cs("gd-adflow adsBlocked",n,e);var r=this.get_ad_system_init_result(),i=r.ima,a=r.afg;if(this.adsBlocked=!i&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var o=i||a?i?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(o)})}console.error(e.message||e)}.bind(this))),n(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"),i(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return j.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=M(e);this.options=t?h(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=as.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 n=this;void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var r={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(N.stringify(r))).catch(function(e){t(this,n)}.bind(this)),this.adInstance._send_atom_event("hl.config",r),this._send_gametag_data("sdk_gameplay")}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=c("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,p("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!m.available)return;"developer.gamedistribution.com"===this._parentDomain?(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0),m.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0)),m.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 l({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:o(),version:as.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:d(),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 n=[this._gameData.gmky.url];f(n[0],"GamedockSDK",{alternates:n}).then(function(){var n,r;t(this,e),xR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&xR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),WS.track(xR,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.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=xR)||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 n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),f(n[0],"MinijuegosSDK",{alternates:n}).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_loadLocus",value:function(){var n=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:n=["https://tag.atom.gamedistribution.com/v1/locus"],console.log("locus loading"),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}()},{key:"_loadGoogleAnalytics",value:function(){var e=this,n=["https://www.google-analytics.com/analytics.js"];f(n[0],"gdsdk_google_analytics",{alternates:n,error_prefix:"Blocked:",exists:function(){return t(this,e),window.ga}.bind(this)}).then(function(){t(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(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new _,A.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),k.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){t(this,e);var n=this._getDeveloperDomains(),r=n.developerDomain,i=n.gameApiDomain;if(r){fetch("https://".concat(i,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}SS()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),kS(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&WS.track(xR,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(n){t(this,e),this.msgrt.send("ad.error",{message:n.message,details:n.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(n){t(this,e),this._sendAdRequestContext(n.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(n){if(t(this,e),n.message.startsWith("Blocked:")){if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:n.message}),!this._hasBlocker)){this._hasBlocker=!0;var r=Math.random()<.25;this.msgrt.send("adblck.src",{message:n.message}),r&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:n.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(n){t(this,e),this.msgrt.send("tunnl.keys.empty",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(n){t(this,e),this.msgrt.send("tunnl.keys.fallback",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(n){return t(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=Yw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(as.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(U=e(r.mark((function e(){var n,i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this._gameData,n=void 0===this._gameData.dmain||this._gameData.dmain,(i.bloc_gard&&!0===i.bloc_gard.enabled||!n)&&(this.msgrt.send("blocked"),setTimeout(function(){t(this,a),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(N.stringify({domain:this._parentDomain,id:i.gameId,img:this._get_game_thumbnail_url(),title:i.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return U.apply(this,arguments)})},{key:"_checkGameDeleted",value:function(){var e=this;6===this._gameData.status&&(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){t(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;m.available&&m.getBoolean("gd_debug_ex")&&(m.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,i=this._gameData,a=i.gdpr&&!0===i.gdpr.consent,s=i.loader,o=null===(e=i.promo)||void 0===e?void 0:e[null===(t=i.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(i,a):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||a?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):!1!==s.enabled&&this._createSplash(i,a):null!=o&&o.enabled&&this._createPromo(i,a))}},{key:"_initializeVideoAd",value:(L=e(r.mark((function e(){var t;return r.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=h(this.options.advertisementSettings,t.sdk)),this.macros=new E({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=as,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:this._executeMidrollPlus();case 18:case"end":return e.stop()}}),e,this)}))),function(){return L.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){p("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){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){p(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){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(C=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sA();case 2:return t=e.sent,this.msgrt.setGameData(t),x(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return C.apply(this,arguments)})},{key:"_createSplash",value:(I=e(r.mark((function e(n,i){var a,s,o,c,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(n);case 2:return a=e.sent,s=new a(AR(AR({},this.options),{},{isConsentDomain:i,version:as.version}),n,this._parentDomain),e.next=6,pA();case 6:o=e.sent,c=o.enabled,s.on("playClick",function(){var e,n,r=this;if(t(this,u),i){var a=new Date;a.setDate(a.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(a.toUTCString(),"; path=/")}if(this._hideCMPButton(),c)window.gdsdk.showAd(g.Interstitial,{position:"preroll"}).catch(function(e){t(this,r),s.hide()}.bind(this));else{var o={position:"preroll"};(function(){t(this,r),ds.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),o.adapter="adsense")}).bind(this),this.showAd(g.Interstitial,o).catch(function(e){t(this,r)}.bind(this))}null!==(e=this._gameData)&&void 0!==e&&null!==(n=e.evnts)&&void 0!==n&&n.enabled&&(aR({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(){t(this,u),s.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,u),s.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(T=e(r.mark((function e(n,i){var a,s,o,c,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o(AR(AR({},this.options),{},{isConsentDomain:i,version:as.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,u),c.hide(),this._createSplash(n,i)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(n,i);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return T.apply(this,arguments)})},{key:"_createPromo",value:(w=e(r.mark((function e(n,i){var a,s,o,c,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o(AR(AR({},this.options),{},{isConsentDomain:i,version:as.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,u),c.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 w.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(g.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"showAd",value:(y=e(r.mark((function t(n){var i,a=this,s=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:{},t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,s){var o,c,u,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!a._autoResumeIfAdsAreDisabled(n||"interstitial")){e.next=5;break}return e.abrupt("return",t());case 5:return c={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=9,a.sdkReady;case 9:return u=e.sent,e.next=12,a.videoAdReady;case 12:if(null!==(o=a._gameData.lp)&&void 0!==o&&o.load||a._sendLoadedEvent(),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:u,adRequest:c}),a._rejectAdIfAdDisabled({gameData:u,adRequest:c}),a._rejectAdIfUnsupportedType({adRequest:c}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||a._rejectAdIfAdRateHits({gameData:u,adRequest:c}),a.adInstance.attachAfgPosition(c),!a.adFlowRunning){e.next=22;break}return e.abrupt("return",t());case 22:return a.adFlowRunning=!0,d=new pR(a),e.next=26,d.runAdFlow(c);case 26:a.adFlowRunning=!1,t(),a._post_message({topic:"adrequest.instream"}),e.next=36;break;case 31:e.prev=31,e.t0=e.catch(0),a.adFlowRunning=!1,a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 36:case"end":return e.stop()}}),e,null,[[0,31]])})));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}}),t)}))),function(e){return y.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t=!1,n=this._gameData.diagnostic.close_ads,r=this._gameData.disableAds[e],i=n||r;return this._gameData.diagnostic,this._gameData.disableAds,i&&(this._runAutoResume(),t=!0),t}},{key:"_runAutoResume",value:function(){var e="CONTENT_PAUSE_REQUESTED",t="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(e,{name:e,message:"Auto pause when ads are disabled"}),this.eventBus.broadcast(t,{name:t,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}},{key:"_giveGift",value:function(){var e,t,n,r,i;null!==(e=this._gameData)&&void 0!==e&&null!==(t=e.gft)&&void 0!==t&&t.enabled&&(null===(n=this._gameData)||void 0===n||null===(r=n.gft)||void 0===r||null===(i=r.durations[this._giftCount])||void 0===i?void 0:i.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift()}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=e.adRequest;if(t.disableAds[n.adType]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==g.Interstitial&&t.adType!==g.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=g.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===g.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,a,s,o=e.gameData,c=e.adRequest,u=null;c.adType===g.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(u=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):u=o.midroll;if(c.adType===g.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<u)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(b=e(r.mark((function t(n){var i=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,a){var s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.sdkReady;case 3:return s=e.sent,e.next=6,i.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[n]&&!i._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(n,"..."));case 10:if(n){e.next=14;break}n=g.Rewarded,e.next=16;break;case 14:if(n===g.Interstitial||n===g.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:return e.next=18,i.adInstance.preloadAd(n);case 18:o=e.sent,t(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),a(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return b.apply(this,arguments)})},{key:"cancelAd",value:(v=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.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.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.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),p("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()||(aR({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){p("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()||(aR({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"openConsole",value:function(){try{new S(this).start(),m.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 n=this._gameData;n.sdk.fullscreen&&"auto"===n.sdk.fullscreen&&document.addEventListener("click",function(){if(t(this,e),!this._isFullScreen){var n=document.body,r=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullscreen;if(r)r.call(n);else if(void 0!==window.ActiveXObject){var i=new ActiveXObject("WScript.Shell");null!==i&&i.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var n=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){t(this,n),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_removeExternalsInHtml",value:function(e){var n=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var r=this;t(this,n);var i=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");e.removeAttribute("href"),i||(e.onclick=function(e){return t(this,r),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),d=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:u()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled,y=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:b,parentURL:i,parentDomain:c,topDomain:d&&d.length?d:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,depth:o(),domainMatched:c===d,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new O(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(P.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new GS(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new BS(s),e.abrupt("return",o.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(P.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(N.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new O(e,!0);return n.query=AR(AR({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return P.encode(JSON.stringify(e))}},{key:"session",value:function(){var t=this;return new Promise(function(){var n=e(r.mark((function e(n,i){var a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.sdkReady;case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:a=t._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:t._bridge.parentDomain,topDomain:t._bridge.topDomain,parentURL:t._bridge.parentURL,depth:t._bridge.depth,loadedByGameZone:t._bridge.isTokenGameURL}});case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(e,t){return n.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)xR.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,n=this._gameData,r=n.assets.find(function(n){return t(this,e),n.hasOwnProperty("name")&&512===n.width&&512===n.height}.bind(this));return r||(r=n.assets.length>0?n.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(r.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,i=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var a=window.top||window.parent;a&&a.postMessage({source:"gdsdk",topic:n,data:r},i)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(){var n=this;try{var i,a=null===(i=this._gameData)||void 0===i?void 0:i.gft,s=setInterval(e(r.mark((function e(){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.adInstance.requestRunning||n.adFlowRunning?console.log("Advertisement already running..."):(n.showAd(g.Interstitial,{position:"midroll",isGift:!0}).catch(function(e){t(this,i)}.bind(this)),clearInterval(s),n._giftCount++);case 1:case"end":return e.stop()}}),e,this)}))),1e3*a.durations[this._giftCount].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return kR}},{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,n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,n,r=this;if(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&this.adInstance.adMidrollCount<=0)if(null!==(n=this._gameData.midroll_plus)&&void 0!==n&&n.interval)var i=setInterval(function(){var e,n,a=this;t(this,r),this.showAd(g.Interstitial,{position:"midroll",isGift:!0}).catch(function(e){t(this,a)}.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;t(this,r),this.showAd(g.Interstitial,{position:"midroll",isGift:!0}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}]),n}();function RR(){return(RR=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:n=["https://tag.atom.gamedistribution.com/v1/locus"],console.log("locus loading"),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var DR=new j,TR=function(e){var n=this;!function(){RR.apply(this,arguments)}();var r,i=function(e){var r=this;return t(this,n),new Promise(function(n,i){var a=this;t(this,r);var s=function(e){t(this,a),"SDK_GAME_START"===e.name&&(DR.off("sdk-event",s),n())}.bind(this);DR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new SR(e)),r}.bind(this),s=function(e){return t(this,n),i(e)}.bind(this),o=function(e){return t(this,n),"gdsdk://preloaded"}.bind(this),c=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),u=function(){return t(this,n),m("cancelAd")}.bind(this),d=function(){return t(this,n),m("openConsole")}.bind(this),l=function(){return t(this,n),m("showBanner")}.bind(this),h=function(){return t(this,n),m("session")}.bind(this),p=function(e){return t(this,n),m("sendGenericEvent",{options:e})}.bind(this),f=function(){t(this,n),console.log("_sendSDKReady")}.bind(this),m=function(e,r){var i=this;return t(this,n),r||(r={}),new Promise(function(n,a){t(this,i);try{var s={type:"gd-sdk",method:e,options:r};window.parent.postMessage(s,"*"),n()}catch(e){console.log("gd:adp:m:s:error",e),n()}}.bind(this))}.bind(this),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&b(r)}),!1)}.bind(this),v=function(){t(this,n),g(),m("init")}.bind(this),b=function(r){t(this,n);try{DR.emit("sdk-event",r),e.onEvent&&e.onEvent(r)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:c,cancelAd:u,openConsole:d,getSession:h,onEvent:b,init:v,_sendSDKReady:f,sendGenericEvent:p}},OR=function(e){var t=TR(e);return t.init(),t},PR=function(){var e=this;return{isMasterGameURL:function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),isTokenGameURL:function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),isExtHostedGameURL:function(){t(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this)}},IR="gd-sdk-frame-handshake-request",CR="gd-sdk-frame-handshake-response",LR=function(e){var n=this;return new Promise(function(r,i){var a=this;t(this,n);var s={type:IR},o=!1;window.addEventListener("message",(function(e){var t=e.data,n=e.origin,i=e.source,a=t.type;if(a===IR){var s={type:CR};i.postMessage(s,n)}else a===CR&&(o=!0,r({origin:n,source:i}))})),e?r():(setTimeout(function(){t(this,a),o||r()}.bind(this),200),window.parent!==window?window.parent.postMessage(s,"*"):r())}.bind(this))},UR=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dA();case 2:return t=e.sent,n=!t,e.next=6,LR(n);case 6:if(i=e.sent,t){e.next=9;break}return e.abrupt("return",!1);case 9:return a=PR(),s=a.isMasterGameURL,a.isTokenGameURL,o=s(),e.next=13,hA();case 13:return c=e.sent,u=!1,u=c?!o&&!!i:!o,e.abrupt("return",u);case 17:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),MR=Ze,jR=ce,BR=Za,GR=Ki,NR=jR(Fi.f),FR=jR([].push),qR=function(e){return function(t){for(var n,r=GR(t),i=BR(r),a=i.length,s=0,o=[];a>s;)n=i[s++],MR&&!NR(r,n)||FR(o,e?[n,r[n]]:r[n]);return o}},VR={entries:qR(!0),values:qR(!1)}.values;Ja({target:"Object",stat:!0},{values:function(e){return VR(e)}});var HR,zR={},WR=function(e){try{if(e.skipForward)return;if(zR.source){var t={type:"gd-sdk-on-event",event:e};zR.source.postMessage(t,zR.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},KR=function(){WR({name:"SDK_READY",status:"success",message:"Everything is ready."}),WR({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),WR({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},$R=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,c=a.type,u=a.method,d=a.options;if("gd-sdk-self"!==c){if("gd-sdk"===c){if(!zR.source&&"init"===u)return function(e){var t=e.source,n=e.origin;zR={source:t,origin:n}}({source:o,origin:s}),void KR();var l=n[u];l&&e(r.mark((function e(){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,function(){t(this,a),"showAd"===u&&ds.firstAdapterModeAdsense&&"rewarded"!==d.adType&&(console.log("promo-test, set first adapter to adssense 3"),d.params=d.params?d.params:{},d.params.adapter="adsense")}.bind(this),!(i=l.apply(n,Object.values(d)))||!i.then){e.next=6;break}return e.next=6,i;case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("gd:adp:m:r onFrameMessage error",e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))()}}else{var h={type:"gd-sdk",method:u,options:d};window.postMessage(h,location.origin)}}),!1)},QR=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){WR(e),t.apply(this,arguments)}}(e);var t=new SR(e);return $R(t),t},JR=function(e){try{var t=Ww(e);e.gameId||t.send("nogameid",{message:"".concat(uy.parentURL)})}catch(e){}},YR={create:function(){var t=e(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,JR(t),eA=Ww(nA=t),e.next=5,UR();case 5:return n=e.sent,i=n?OR(t):QR(t),fA(),e.abrupt("return",i);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",QR(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(e){return t.apply(this,arguments)}}()};function XR(){return(XR=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vA();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,eD(t);case 9:e.t0=e.sent;case 10:return i=e.t0,e.abrupt("return",n(i));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ZR=!1;function eD(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),HR)return r(HR);if(ZR)var s=setInterval(function(){t(this,a),HR&&(ZR=!1,clearInterval(s),r(HR))}.bind(this),100);else ZR=!0,YR.create(e).then(function(e){t(this,a),HR=e,e._sendSDKReady(),ZR=!1,r(HR)}.bind(this))}.bind(this))}AS();var tD,nD=(eD(tD=function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":n(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===n(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}()),{invoke:function(e){return function(e,t){return XR.apply(this,arguments)}(tD,e)}});function rD(){var n=this;this.AdType=g,this.preloadAd=function(e){var n=this;return nD.invoke(function(r){return t(this,n),r.preloadAd(e)}.bind(this))},this.showAd=function(){var n=e(r.mark((function e(n,i){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",nD.invoke(function(e){var r=this;if(t(this,a),n===g.Display)return e.showDisplayAd(i);var s={};return function(){t(this,r),ds.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 e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return nD.invoke(function(n){return t(this,e),n.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return nD.invoke(function(n){return t(this,e),n.openConsole()}.bind(this))},this.getSession=function(){var e=this;return nD.invoke(function(n){return t(this,e),n.session()}.bind(this))},this.sendEvent=function(e){var n=this;return nD.invoke(function(r){return t(this,n),r.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){t(this,n),Qv.showLeaderboard()}.bind(this),addScore:function(e){t(this,n),Qv.addScore(e)}.bind(this)}}rD.prototype=new function(){this.showBanner=function(){var e=this;return nD.invoke(function(n){return t(this,e),n.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new rD,window.gdApi=window.gdsdk;
|
|
1
|
+
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/newArrowCheck";import n from"@babel/runtime/helpers/typeof";import r from"@babel/runtime/regenerator";import{parseJSON as i,getParentUrl as a,getParentDomain as s,getIframeDepth as o,getQueryParams as c,getTopDomain as d,getMobilePlatform as u,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as g,Layers as v,getKeyByValue as b,getQueryString as y,EventBus as _,getIMASampleTags as w,SDKEvents as A,IMAEvents as k,Macros as E,setDankLog as x,ImplementationTest as S}from"@bygd/gd-sdk-era/dist/default";import R from"@babel/runtime/helpers/createClass";import D from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import O from"url-parse";import{Base64 as P}from"js-base64";import I from"validator";import C from"is-valid-domain";import L from"get-value";import U from"set-value";import M from"lodash.clonedeep";import{EventEmitter as j}from"events";import B from"can-autoplay";import{isPlainObject as N}from"is-plain-object";import G from"querystringify";import F from"lodash.merge";import{v4 as q}from"uuid";var V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},H=function(e){return e&&e.Math==Math&&e},z=H("object"==typeof globalThis&&globalThis)||H("object"==typeof window&&window)||H("object"==typeof self&&self)||H("object"==typeof V&&V)||function(){return this}()||Function("return this")(),W={exports:{}},K=z,$=Object.defineProperty,Q=function(e,t){try{$(K,e,{value:t,configurable:!0,writable:!0})}catch(n){K[e]=t}return t},J=Q,Y="__core-js_shared__",X=z[Y]||J(Y,{}),Z=X;(W.exports=function(e,t){return Z[e]||(Z[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 ee,te,ne=function(e){try{return!!e()}catch(e){return!0}},re=!ne((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ie=re,ae=Function.prototype,se=ae.call,oe=ie&&ae.bind.bind(se,se),ce=ie?oe:function(e){return function(){return se.apply(e,arguments)}},de=function(e){return null==e},ue=de,le=TypeError,he=function(e){if(ue(e))throw le("Can't call method on "+e);return e},pe=he,fe=Object,me=function(e){return fe(pe(e))},ge=me,ve=ce({}.hasOwnProperty),be=Object.hasOwn||function(e,t){return ve(ge(e),t)},ye=ce,_e=0,we=Math.random(),Ae=ye(1..toString),ke=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ae(++_e+we,36)},Ee="undefined"!=typeof navigator&&String(navigator.userAgent)||"",xe=z,Se=Ee,Re=xe.process,De=xe.Deno,Te=Re&&Re.versions||De&&De.version,Oe=Te&&Te.v8;Oe&&(te=(ee=Oe.split("."))[0]>0&&ee[0]<4?1:+(ee[0]+ee[1])),!te&&Se&&(!(ee=Se.match(/Edge\/(\d+)/))||ee[1]>=74)&&(ee=Se.match(/Chrome\/(\d+)/))&&(te=+ee[1]);var Pe=te,Ie=Pe,Ce=ne,Le=!!Object.getOwnPropertySymbols&&!Ce((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ie&&Ie<41})),Ue=Le&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=z,je=W.exports,Be=be,Ne=ke,Ge=Le,Fe=Ue,qe=Me.Symbol,Ve=je("wks"),He=Fe?qe.for||qe:qe&&qe.withoutSetter||Ne,ze=function(e){return Be(Ve,e)||(Ve[e]=Ge&&Be(qe,e)?qe[e]:He("Symbol."+e)),Ve[e]},We={};We[ze("toStringTag")]="z";var Ke="[object z]"===String(We),$e="object"==typeof document&&document.all,Qe={all:$e,IS_HTMLDDA:void 0===$e&&void 0!==$e},Je=Qe.all,Ye=Qe.IS_HTMLDDA?function(e){return"function"==typeof e||e===Je}:function(e){return"function"==typeof e},Xe={},Ze=!ne((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),et=Ye,tt=Qe.all,nt=Qe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:et(e)||e===tt}:function(e){return"object"==typeof e?null!==e:et(e)},rt=nt,it=z.document,at=rt(it)&&rt(it.createElement),st=function(e){return at?it.createElement(e):{}},ot=st,ct=!Ze&&!ne((function(){return 7!=Object.defineProperty(ot("div"),"a",{get:function(){return 7}}).a})),dt=Ze&&ne((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ut=nt,lt=String,ht=TypeError,pt=function(e){if(ut(e))return e;throw ht(lt(e)+" is not an object")},ft=re,mt=Function.prototype.call,gt=ft?mt.bind(mt):function(){return mt.apply(mt,arguments)},vt=z,bt=Ye,yt=function(e,t){return arguments.length<2?(n=vt[e],bt(n)?n:void 0):vt[e]&&vt[e][t];var n},_t=ce({}.isPrototypeOf),wt=yt,At=Ye,kt=_t,Et=Object,xt=Ue?function(e){return"symbol"==typeof e}:function(e){var t=wt("Symbol");return At(t)&&kt(t.prototype,Et(e))},St=String,Rt=function(e){try{return St(e)}catch(e){return"Object"}},Dt=Ye,Tt=Rt,Ot=TypeError,Pt=function(e){if(Dt(e))return e;throw Ot(Tt(e)+" is not a function")},It=Pt,Ct=de,Lt=function(e,t){var n=e[t];return Ct(n)?void 0:It(n)},Ut=gt,Mt=Ye,jt=nt,Bt=TypeError,Nt=gt,Gt=nt,Ft=xt,qt=Lt,Vt=function(e,t){var n,r;if("string"===t&&Mt(n=e.toString)&&!jt(r=Ut(n,e)))return r;if(Mt(n=e.valueOf)&&!jt(r=Ut(n,e)))return r;if("string"!==t&&Mt(n=e.toString)&&!jt(r=Ut(n,e)))return r;throw Bt("Can't convert object to primitive value")},Ht=TypeError,zt=ze("toPrimitive"),Wt=function(e,t){if(!Gt(e)||Ft(e))return e;var n,r=qt(e,zt);if(r){if(void 0===t&&(t="default"),n=Nt(r,e,t),!Gt(n)||Ft(n))return n;throw Ht("Can't convert object to primitive value")}return void 0===t&&(t="number"),Vt(e,t)},Kt=xt,$t=function(e){var t=Wt(e,"string");return Kt(t)?t:t+""},Qt=Ze,Jt=ct,Yt=dt,Xt=pt,Zt=$t,en=TypeError,tn=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,rn="enumerable",an="configurable",sn="writable";Xe.f=Qt?Yt?function(e,t,n){if(Xt(e),t=Zt(t),Xt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&sn in n&&!n[sn]){var r=nn(e,t);r&&r[sn]&&(e[t]=n.value,n={configurable:an in n?n[an]:r[an],enumerable:rn in n?n[rn]:r[rn],writable:!1})}return tn(e,t,n)}:tn:function(e,t,n){if(Xt(e),t=Zt(t),Xt(n),Jt)try{return tn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw en("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var on={exports:{}},cn=Ze,dn=be,un=Function.prototype,ln=cn&&Object.getOwnPropertyDescriptor,hn=dn(un,"name"),pn={EXISTS:hn,PROPER:hn&&"something"===function(){}.name,CONFIGURABLE:hn&&(!cn||cn&&ln(un,"name").configurable)},fn=Ye,mn=X,gn=ce(Function.toString);fn(mn.inspectSource)||(mn.inspectSource=function(e){return gn(e)});var vn,bn,yn,_n=mn.inspectSource,wn=Ye,An=z.WeakMap,kn=wn(An)&&/native code/.test(String(An)),En=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},xn=Xe,Sn=En,Rn=Ze?function(e,t,n){return xn.f(e,t,Sn(1,n))}:function(e,t,n){return e[t]=n,e},Dn=W.exports,Tn=ke,On=Dn("keys"),Pn=function(e){return On[e]||(On[e]=Tn(e))},In={},Cn=kn,Ln=z,Un=nt,Mn=Rn,jn=be,Bn=X,Nn=Pn,Gn=In,Fn="Object already initialized",qn=Ln.TypeError,Vn=Ln.WeakMap;if(Cn||Bn.state){var Hn=Bn.state||(Bn.state=new Vn);Hn.get=Hn.get,Hn.has=Hn.has,Hn.set=Hn.set,vn=function(e,t){if(Hn.has(e))throw qn(Fn);return t.facade=e,Hn.set(e,t),t},bn=function(e){return Hn.get(e)||{}},yn=function(e){return Hn.has(e)}}else{var zn=Nn("state");Gn[zn]=!0,vn=function(e,t){if(jn(e,zn))throw qn(Fn);return t.facade=e,Mn(e,zn,t),t},bn=function(e){return jn(e,zn)?e[zn]:{}},yn=function(e){return jn(e,zn)}}var Wn={set:vn,get:bn,has:yn,enforce:function(e){return yn(e)?bn(e):vn(e,{})},getterFor:function(e){return function(t){var n;if(!Un(t)||(n=bn(t)).type!==e)throw qn("Incompatible receiver, "+e+" required");return n}}},Kn=ce,$n=ne,Qn=Ye,Jn=be,Yn=Ze,Xn=pn.CONFIGURABLE,Zn=_n,er=Wn.enforce,tr=Wn.get,nr=String,rr=Object.defineProperty,ir=Kn("".slice),ar=Kn("".replace),sr=Kn([].join),or=Yn&&!$n((function(){return 8!==rr((function(){}),"length",{value:8}).length})),cr=String(String).split("String"),dr=on.exports=function(e,t,n){"Symbol("===ir(nr(t),0,7)&&(t="["+ar(nr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Jn(e,"name")||Xn&&e.name!==t)&&(Yn?rr(e,"name",{value:t,configurable:!0}):e.name=t),or&&n&&Jn(n,"arity")&&e.length!==n.arity&&rr(e,"length",{value:n.arity});try{n&&Jn(n,"constructor")&&n.constructor?Yn&&rr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=er(e);return Jn(r,"source")||(r.source=sr(cr,"string"==typeof t?t:"")),e};Function.prototype.toString=dr((function(){return Qn(this)&&tr(this).source||Zn(this)}),"toString");var ur=Ye,lr=Xe,hr=on.exports,pr=Q,fr=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(ur(n)&&hr(n,a,r),r.global)i?e[t]=n:pr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:lr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},mr=ce,gr=mr({}.toString),vr=mr("".slice),br=function(e){return vr(gr(e),8,-1)},yr=Ke,_r=Ye,wr=br,Ar=ze("toStringTag"),kr=Object,Er="Arguments"==wr(function(){return arguments}()),xr=yr?wr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=kr(e),Ar))?n:Er?wr(t):"Object"==(r=wr(t))&&_r(t.callee)?"Arguments":r},Sr=xr,Rr=Ke?{}.toString:function(){return"[object "+Sr(this)+"]"};Ke||fr(Object.prototype,"toString",Rr,{unsafe:!0});var Dr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Tr=st("span").classList,Or=Tr&&Tr.constructor&&Tr.constructor.prototype,Pr=Or===Object.prototype?void 0:Or,Ir=br,Cr=ce,Lr=function(e){if("Function"===Ir(e))return Cr(e)},Ur=Pt,Mr=re,jr=Lr(Lr.bind),Br=function(e,t){return Ur(e),void 0===t?e:Mr?jr(e,t):function(){return e.apply(t,arguments)}},Nr=ne,Gr=br,Fr=Object,qr=ce("".split),Vr=Nr((function(){return!Fr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Gr(e)?qr(e,""):Fr(e)}:Fr,Hr=Math.ceil,zr=Math.floor,Wr=Math.trunc||function(e){var t=+e;return(t>0?zr:Hr)(t)},Kr=function(e){var t=+e;return t!=t||0===t?0:Wr(t)},$r=Kr,Qr=Math.min,Jr=function(e){return e>0?Qr($r(e),9007199254740991):0},Yr=Jr,Xr=function(e){return Yr(e.length)},Zr=br,ei=Array.isArray||function(e){return"Array"==Zr(e)},ti=ce,ni=ne,ri=Ye,ii=xr,ai=_n,si=function(){},oi=[],ci=yt("Reflect","construct"),di=/^\s*(?:class|function)\b/,ui=ti(di.exec),li=!di.exec(si),hi=function(e){if(!ri(e))return!1;try{return ci(si,oi,e),!0}catch(e){return!1}},pi=function(e){if(!ri(e))return!1;switch(ii(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return li||!!ui(di,ai(e))}catch(e){return!0}};pi.sham=!0;var fi=!ci||ni((function(){var e;return hi(hi.call)||!hi(Object)||!hi((function(){e=!0}))||e}))?pi:hi,mi=ei,gi=fi,vi=nt,bi=ze("species"),yi=Array,_i=function(e){var t;return mi(e)&&(t=e.constructor,(gi(t)&&(t===yi||mi(t.prototype))||vi(t)&&null===(t=t[bi]))&&(t=void 0)),void 0===t?yi:t},wi=function(e,t){return new(_i(e))(0===t?0:t)},Ai=Br,ki=Vr,Ei=me,xi=Xr,Si=wi,Ri=ce([].push),Di=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,s=7==e,o=5==e||a;return function(c,d,u,l){for(var h,p,f=Ei(c),m=ki(f),g=Ai(d,u),v=xi(m),b=0,y=l||Si,_=t?y(c,v):n||s?y(c,0):void 0;v>b;b++)if((o||b in m)&&(p=g(h=m[b],b,f),e))if(t)_[b]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:Ri(_,h)}else switch(e){case 4:return!1;case 7:Ri(_,h)}return a?-1:r||i?i:_}},Ti={forEach:Di(0),map:Di(1),filter:Di(2),some:Di(3),every:Di(4),find:Di(5),findIndex:Di(6),filterReject:Di(7)},Oi=ne,Pi=function(e,t){var n=[][e];return!!n&&Oi((function(){n.call(null,t||function(){return 1},1)}))},Ii=Ti.forEach,Ci=z,Li=Dr,Ui=Pr,Mi=Pi("forEach")?[].forEach:function(e){return Ii(this,e,arguments.length>1?arguments[1]:void 0)},ji=Rn,Bi=function(e){if(e&&e.forEach!==Mi)try{ji(e,"forEach",Mi)}catch(t){e.forEach=Mi}};for(var Ni in Li)Li[Ni]&&Bi(Ci[Ni]&&Ci[Ni].prototype);Bi(Ui);var Gi={},Fi={},qi={}.propertyIsEnumerable,Vi=Object.getOwnPropertyDescriptor,Hi=Vi&&!qi.call({1:2},1);Fi.f=Hi?function(e){var t=Vi(this,e);return!!t&&t.enumerable}:qi;var zi=Vr,Wi=he,Ki=function(e){return zi(Wi(e))},$i=Ze,Qi=gt,Ji=Fi,Yi=En,Xi=Ki,Zi=$t,ea=be,ta=ct,na=Object.getOwnPropertyDescriptor;Gi.f=$i?na:function(e,t){if(e=Xi(e),t=Zi(t),ta)try{return na(e,t)}catch(e){}if(ea(e,t))return Yi(!Qi(Ji.f,e,t),e[t])};var ra={},ia=Kr,aa=Math.max,sa=Math.min,oa=function(e,t){var n=ia(e);return n<0?aa(n+t,0):sa(n,t)},ca=Ki,da=oa,ua=Xr,la=function(e){return function(t,n,r){var i,a=ca(t),s=ua(a),o=da(r,s);if(e&&n!=n){for(;s>o;)if((i=a[o++])!=i)return!0}else for(;s>o;o++)if((e||o in a)&&a[o]===n)return e||o||0;return!e&&-1}},ha={includes:la(!0),indexOf:la(!1)},pa=be,fa=Ki,ma=ha.indexOf,ga=In,va=ce([].push),ba=function(e,t){var n,r=fa(e),i=0,a=[];for(n in r)!pa(ga,n)&&pa(r,n)&&va(a,n);for(;t.length>i;)pa(r,n=t[i++])&&(~ma(a,n)||va(a,n));return a},ya=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_a=ba,wa=ya.concat("length","prototype");ra.f=Object.getOwnPropertyNames||function(e){return _a(e,wa)};var Aa={};Aa.f=Object.getOwnPropertySymbols;var ka=yt,Ea=ra,xa=Aa,Sa=pt,Ra=ce([].concat),Da=ka("Reflect","ownKeys")||function(e){var t=Ea.f(Sa(e)),n=xa.f;return n?Ra(t,n(e)):t},Ta=be,Oa=Da,Pa=Gi,Ia=Xe,Ca=function(e,t,n){for(var r=Oa(t),i=Ia.f,a=Pa.f,s=0;s<r.length;s++){var o=r[s];Ta(e,o)||n&&Ta(n,o)||i(e,o,a(t,o))}},La=ne,Ua=Ye,Ma=/#|\.prototype\./,ja=function(e,t){var n=Na[Ba(e)];return n==Fa||n!=Ga&&(Ua(t)?La(t):!!t)},Ba=ja.normalize=function(e){return String(e).replace(Ma,".").toLowerCase()},Na=ja.data={},Ga=ja.NATIVE="N",Fa=ja.POLYFILL="P",qa=ja,Va=z,Ha=Gi.f,za=Rn,Wa=fr,Ka=Q,$a=Ca,Qa=qa,Ja=function(e,t){var n,r,i,a,s,o=e.target,c=e.global,d=e.stat;if(n=c?Va:d?Va[o]||Ka(o,{}):(Va[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Ha(n,r))&&s.value:n[r],!Qa(c?r:o+(d?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;$a(a,i)}(e.sham||i&&i.sham)&&za(a,"sham",!0),Wa(n,r,a,e)}},Ya=ba,Xa=ya,Za=Object.keys||function(e){return Ya(e,Xa)},es=me,ts=Za;Ja({target:"Object",stat:!0,forced:ne((function(){ts(1)}))},{keys:function(e){return ts(es(e))}});var ns=Array.isArray,rs=Object.prototype.toString,is=ns||function(e){return!!e&&"[object Array]"==rs.call(e)},as={name:"@bygd/gd-sdk-pes",version:"1.32.4",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.6",axios:"^0.26.1","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",uuid:"^8.3.2",validator:"^13.6.0"}},ss=function(e){var t=os("object"===n(e)?e:i(e));return t&&t.version?as.version>=t.version?t:void 0:t},os=function(e){var n=this;if(!is(e)||0===e.length)return e;if(1===e.length)return e[0];var r=0;e.forEach(function(e){t(this,n),e.weight=e.weight||1,r+=e.weight}.bind(this));var i=Math.floor(Math.random()*Math.floor(r));r=0;for(var a=0;a<e.length;a++){var s=e[a];if(i<(r+=s.weight))return s}},cs=function(){var e;(e=console).log.apply(e,arguments)},ds=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 us={},ls=xr,hs=String,ps=function(e){if("Symbol"===ls(e))throw TypeError("Cannot convert a Symbol value to a string");return hs(e)},fs={},ms=Ze,gs=dt,vs=Xe,bs=pt,ys=Ki,_s=Za;fs.f=ms&&!gs?Object.defineProperties:function(e,t){bs(e);for(var n,r=ys(t),i=_s(t),a=i.length,s=0;a>s;)vs.f(e,n=i[s++],r[n]);return e};var ws,As=yt("document","documentElement"),ks=pt,Es=fs,xs=ya,Ss=In,Rs=As,Ds=st,Ts="prototype",Os="script",Ps=Pn("IE_PROTO"),Is=function(){},Cs=function(e){return"<"+Os+">"+e+"</"+Os+">"},Ls=function(e){e.write(Cs("")),e.close();var t=e.parentWindow.Object;return e=null,t},Us=function(){try{ws=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Us="undefined"!=typeof document?document.domain&&ws?Ls(ws):(t=Ds("iframe"),n="java"+Os+":",t.style.display="none",Rs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Cs("document.F=Object")),e.close(),e.F):Ls(ws);for(var r=xs.length;r--;)delete Us[Ts][xs[r]];return Us()};Ss[Ps]=!0;var Ms=Object.create||function(e,t){var n;return null!==e?(Is[Ts]=ks(e),n=new Is,Is[Ts]=null,n[Ps]=e):n=Us(),void 0===t?n:Es.f(n,t)},js={},Bs=$t,Ns=Xe,Gs=En,Fs=function(e,t,n){var r=Bs(t);r in e?Ns.f(e,r,Gs(0,n)):e[r]=n},Vs=oa,Hs=Xr,zs=Fs,Ws=Array,Ks=Math.max,$s=function(e,t,n){for(var r=Hs(e),i=Vs(t,r),a=Vs(void 0===n?r:n,r),s=Ws(Ks(a-i,0)),o=0;i<a;i++,o++)zs(s,o,e[i]);return s.length=o,s},Qs=br,Js=Ki,Ys=ra.f,Xs=$s,Zs="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];js.f=function(e){return Zs&&"Window"==Qs(e)?function(e){try{return Ys(e)}catch(e){return Xs(Zs)}}(e):Ys(Js(e))};var eo=on.exports,to=Xe,no=function(e,t,n){return n.get&&eo(n.get,t,{getter:!0}),n.set&&eo(n.set,t,{setter:!0}),to.f(e,t,n)},ro={},io=ze;ro.f=io;var ao=z,so=be,oo=ro,co=Xe.f,uo=function(e){var t=ao.Symbol||(ao.Symbol={});so(t,e)||co(t,e,{value:oo.f(e)})},lo=gt,ho=yt,po=ze,fo=fr,mo=Xe.f,go=be,vo=ze("toStringTag"),bo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!go(e,vo)&&mo(e,vo,{configurable:!0,value:t})},yo=Ja,_o=z,wo=gt,Ao=ce,ko=Ze,Eo=Le,xo=ne,So=be,Ro=_t,Do=pt,To=Ki,Oo=$t,Po=ps,Io=En,Co=Ms,Lo=Za,Uo=ra,Mo=js,jo=Aa,Bo=Gi,No=Xe,Go=fs,Fo=Fi,qo=fr,Vo=no,Ho=W.exports,zo=In,Wo=ke,Ko=ze,$o=ro,Qo=uo,Jo=function(){var e=ho("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=po("toPrimitive");t&&!t[r]&&fo(t,r,(function(e){return lo(n,this)}),{arity:1})},Yo=bo,Xo=Wn,Zo=Ti.forEach,ec=Pn("hidden"),tc="Symbol",nc="prototype",rc=Xo.set,ic=Xo.getterFor(tc),ac=Object[nc],sc=_o.Symbol,oc=sc&&sc[nc],cc=_o.TypeError,dc=_o.QObject,uc=Bo.f,lc=No.f,hc=Mo.f,pc=Fo.f,fc=Ao([].push),mc=Ho("symbols"),gc=Ho("op-symbols"),vc=Ho("wks"),bc=!dc||!dc[nc]||!dc[nc].findChild,yc=ko&&xo((function(){return 7!=Co(lc({},"a",{get:function(){return lc(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=uc(ac,t);r&&delete ac[t],lc(e,t,n),r&&e!==ac&&lc(ac,t,r)}:lc,_c=function(e,t){var n=mc[e]=Co(oc);return rc(n,{type:tc,tag:e,description:t}),ko||(n.description=t),n},wc=function(e,t,n){e===ac&&wc(gc,t,n),Do(e);var r=Oo(t);return Do(n),So(mc,r)?(n.enumerable?(So(e,ec)&&e[ec][r]&&(e[ec][r]=!1),n=Co(n,{enumerable:Io(0,!1)})):(So(e,ec)||lc(e,ec,Io(1,{})),e[ec][r]=!0),yc(e,r,n)):lc(e,r,n)},Ac=function(e,t){Do(e);var n=To(t),r=Lo(n).concat(Sc(n));return Zo(r,(function(t){ko&&!wo(kc,n,t)||wc(e,t,n[t])})),e},kc=function(e){var t=Oo(e),n=wo(pc,this,t);return!(this===ac&&So(mc,t)&&!So(gc,t))&&(!(n||!So(this,t)||!So(mc,t)||So(this,ec)&&this[ec][t])||n)},Ec=function(e,t){var n=To(e),r=Oo(t);if(n!==ac||!So(mc,r)||So(gc,r)){var i=uc(n,r);return!i||!So(mc,r)||So(n,ec)&&n[ec][r]||(i.enumerable=!0),i}},xc=function(e){var t=hc(To(e)),n=[];return Zo(t,(function(e){So(mc,e)||So(zo,e)||fc(n,e)})),n},Sc=function(e){var t=e===ac,n=hc(t?gc:To(e)),r=[];return Zo(n,(function(e){!So(mc,e)||t&&!So(ac,e)||fc(r,mc[e])})),r};Eo||(qo(oc=(sc=function(){if(Ro(oc,this))throw cc("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Po(arguments[0]):void 0,t=Wo(e),n=function(e){this===ac&&wo(n,gc,e),So(this,ec)&&So(this[ec],t)&&(this[ec][t]=!1),yc(this,t,Io(1,e))};return ko&&bc&&yc(ac,t,{configurable:!0,set:n}),_c(t,e)})[nc],"toString",(function(){return ic(this).tag})),qo(sc,"withoutSetter",(function(e){return _c(Wo(e),e)})),Fo.f=kc,No.f=wc,Go.f=Ac,Bo.f=Ec,Uo.f=Mo.f=xc,jo.f=Sc,$o.f=function(e){return _c(Ko(e),e)},ko&&(Vo(oc,"description",{configurable:!0,get:function(){return ic(this).description}}),qo(ac,"propertyIsEnumerable",kc,{unsafe:!0}))),yo({global:!0,constructor:!0,wrap:!0,forced:!Eo,sham:!Eo},{Symbol:sc}),Zo(Lo(vc),(function(e){Qo(e)})),yo({target:tc,stat:!0,forced:!Eo},{useSetter:function(){bc=!0},useSimple:function(){bc=!1}}),yo({target:"Object",stat:!0,forced:!Eo,sham:!ko},{create:function(e,t){return void 0===t?Co(e):Ac(Co(e),t)},defineProperty:wc,defineProperties:Ac,getOwnPropertyDescriptor:Ec}),yo({target:"Object",stat:!0,forced:!Eo},{getOwnPropertyNames:xc}),Jo(),Yo(sc,tc),zo[ec]=!0;var Rc=Le&&!!Symbol.for&&!!Symbol.keyFor,Dc=Ja,Tc=yt,Oc=be,Pc=ps,Ic=W.exports,Cc=Rc,Lc=Ic("string-to-symbol-registry"),Uc=Ic("symbol-to-string-registry");Dc({target:"Symbol",stat:!0,forced:!Cc},{for:function(e){var t=Pc(e);if(Oc(Lc,t))return Lc[t];var n=Tc("Symbol")(t);return Lc[t]=n,Uc[n]=t,n}});var Mc=Ja,jc=be,Bc=xt,Nc=Rt,Gc=Rc,Fc=(0,W.exports)("symbol-to-string-registry");Mc({target:"Symbol",stat:!0,forced:!Gc},{keyFor:function(e){if(!Bc(e))throw TypeError(Nc(e)+" is not a symbol");if(jc(Fc,e))return Fc[e]}});var qc=re,Vc=Function.prototype,Hc=Vc.apply,zc=Vc.call,Wc="object"==typeof Reflect&&Reflect.apply||(qc?zc.bind(Hc):function(){return zc.apply(Hc,arguments)}),Kc=ce([].slice),$c=ei,Qc=Ye,Jc=br,Yc=ps,Xc=ce([].push),Zc=Ja,ed=yt,td=Wc,nd=gt,rd=ce,id=ne,ad=Ye,sd=xt,od=Kc,cd=function(e){if(Qc(e))return e;if($c(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Xc(n,i):"number"!=typeof i&&"Number"!=Jc(i)&&"String"!=Jc(i)||Xc(n,Yc(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if($c(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},dd=Le,ud=String,ld=ed("JSON","stringify"),hd=rd(/./.exec),pd=rd("".charAt),fd=rd("".charCodeAt),md=rd("".replace),gd=rd(1..toString),vd=/[\uD800-\uDFFF]/g,bd=/^[\uD800-\uDBFF]$/,yd=/^[\uDC00-\uDFFF]$/,_d=!dd||id((function(){var e=ed("Symbol")();return"[null]"!=ld([e])||"{}"!=ld({a:e})||"{}"!=ld(Object(e))})),wd=id((function(){return'"\\udf06\\ud834"'!==ld("\udf06\ud834")||'"\\udead"'!==ld("\udead")})),Ad=function(e,t){var n=od(arguments),r=cd(t);if(ad(r)||void 0!==e&&!sd(e))return n[1]=function(e,t){if(ad(r)&&(t=nd(r,this,ud(e),t)),!sd(t))return t},td(ld,null,n)},kd=function(e,t,n){var r=pd(n,t-1),i=pd(n,t+1);return hd(bd,e)&&!hd(yd,i)||hd(yd,e)&&!hd(bd,r)?"\\u"+gd(fd(e,0),16):e};ld&&Zc({target:"JSON",stat:!0,arity:3,forced:_d||wd},{stringify:function(e,t,n){var r=od(arguments),i=td(_d?Ad:ld,null,r);return wd&&"string"==typeof i?md(i,vd,kd):i}});var Ed=Aa,xd=me;Ja({target:"Object",stat:!0,forced:!Le||ne((function(){Ed.f(1)}))},{getOwnPropertySymbols:function(e){var t=Ed.f;return t?t(xd(e)):[]}});var Sd=ne,Rd=Pe,Dd=ze("species"),Td=function(e){return Rd>=51||!Sd((function(){var t=[];return(t.constructor={})[Dd]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Od=Ti.filter;Ja({target:"Array",proto:!0,forced:!Td("filter")},{filter:function(e){return Od(this,e,arguments.length>1?arguments[1]:void 0)}});var Pd=Ja,Id=ne,Cd=Ki,Ld=Gi.f,Ud=Ze;Pd({target:"Object",stat:!0,forced:!Ud||Id((function(){Ld(1)})),sham:!Ud},{getOwnPropertyDescriptor:function(e,t){return Ld(Cd(e),t)}});var Md=Da,jd=Ki,Bd=Gi,Nd=Fs;Ja({target:"Object",stat:!0,sham:!Ze},{getOwnPropertyDescriptors:function(e){for(var t,n,r=jd(e),i=Bd.f,a=Md(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&Nd(s,t,n);return s}});var Gd=Ja,Fd=ei,qd=fi,Vd=nt,Hd=oa,zd=Xr,Wd=Ki,Kd=Fs,$d=ze,Qd=Kc,Jd=Td("slice"),Yd=$d("species"),Xd=Array,Zd=Math.max;Gd({target:"Array",proto:!0,forced:!Jd},{slice:function(e,t){var n,r,i,a=Wd(this),s=zd(a),o=Hd(e,s),c=Hd(void 0===t?s:t,s);if(Fd(a)&&(n=a.constructor,(qd(n)&&(n===Xd||Fd(n.prototype))||Vd(n)&&null===(n=n[Yd]))&&(n=void 0),n===Xd||void 0===n))return Qd(a,o,c);for(r=new(void 0===n?Xd:n)(Zd(c-o,0)),i=0;o<c;o++,i++)o in a&&Kd(r,i,a[o]);return r.length=i,r}});var eu=gt,tu=pt,nu=Lt,ru=function(e,t,n){var r,i;tu(e);try{if(!(r=nu(e,"return"))){if("throw"===t)throw n;return n}r=eu(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return tu(r),n},iu=pt,au=ru,su={},ou=su,cu=ze("iterator"),du=Array.prototype,uu=function(e){return void 0!==e&&(ou.Array===e||du[cu]===e)},lu=xr,hu=Lt,pu=de,fu=su,mu=ze("iterator"),gu=function(e){if(!pu(e))return hu(e,mu)||hu(e,"@@iterator")||fu[lu(e)]},vu=gt,bu=Pt,yu=pt,_u=Rt,wu=gu,Au=TypeError,ku=function(e,t){var n=arguments.length<2?wu(e):t;if(bu(n))return yu(vu(n,e));throw Au(_u(e)+" is not iterable")},Eu=Br,xu=gt,Su=me,Ru=function(e,t,n,r){try{return r?t(iu(n)[0],n[1]):t(n)}catch(t){au(e,"throw",t)}},Du=uu,Tu=fi,Ou=Xr,Pu=Fs,Iu=ku,Cu=gu,Lu=Array,Uu=function(e){var t=Su(e),n=Tu(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Eu(i,r>2?arguments[2]:void 0));var s,o,c,d,u,l,h=Cu(t),p=0;if(!h||this===Lu&&Du(h))for(s=Ou(t),o=n?new this(s):Lu(s);s>p;p++)l=a?i(t[p],p):t[p],Pu(o,p,l);else for(u=(d=Iu(t,h)).next,o=n?new this:[];!(c=xu(u,d)).done;p++)l=a?Ru(d,i,[c.value,p],!0):c.value,Pu(o,p,l);return o.length=p,o},Mu=ze("iterator"),ju=!1;try{var Bu=0,Nu={next:function(){return{done:!!Bu++}},return:function(){ju=!0}};Nu[Mu]=function(){return this},Array.from(Nu,(function(){throw 2}))}catch(e){}var Gu=function(e,t){if(!t&&!ju)return!1;var n=!1;try{var r={};r[Mu]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Fu=Uu;Ja({target:"Array",stat:!0,forced:!Gu((function(e){Array.from(e)}))},{from:Fu});var qu,Vu,Hu,zu=ce,Wu=Kr,Ku=ps,$u=he,Qu=zu("".charAt),Ju=zu("".charCodeAt),Yu=zu("".slice),Xu=function(e){return function(t,n){var r,i,a=Ku($u(t)),s=Wu(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Ju(a,s))<55296||r>56319||s+1===o||(i=Ju(a,s+1))<56320||i>57343?e?Qu(a,s):r:e?Yu(a,s,s+2):i-56320+(r-55296<<10)+65536}},Zu={codeAt:Xu(!1),charAt:Xu(!0)},el=!ne((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),tl=be,nl=Ye,rl=me,il=el,al=Pn("IE_PROTO"),sl=Object,ol=sl.prototype,cl=il?sl.getPrototypeOf:function(e){var t=rl(e);if(tl(t,al))return t[al];var n=t.constructor;return nl(n)&&t instanceof n?n.prototype:t instanceof sl?ol:null},dl=ne,ul=Ye,ll=nt,hl=cl,pl=fr,fl=ze("iterator"),ml=!1;[].keys&&("next"in(Hu=[].keys())?(Vu=hl(hl(Hu)))!==Object.prototype&&(qu=Vu):ml=!0);var gl=!ll(qu)||dl((function(){var e={};return qu[fl].call(e)!==e}));gl&&(qu={}),ul(qu[fl])||pl(qu,fl,(function(){return this}));var vl={IteratorPrototype:qu,BUGGY_SAFARI_ITERATORS:ml},bl=vl.IteratorPrototype,yl=Ms,_l=En,wl=bo,Al=su,kl=function(){return this},El=function(e,t,n,r){var i=t+" Iterator";return e.prototype=yl(bl,{next:_l(+!r,n)}),wl(e,i,!1),Al[i]=kl,e},xl=ce,Sl=Pt,Rl=Ye,Dl=String,Tl=TypeError,Ol=function(e,t,n){try{return xl(Sl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Pl=pt,Il=function(e){if("object"==typeof e||Rl(e))return e;throw Tl("Can't set "+Dl(e)+" as a prototype")},Cl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Ol(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Pl(n),Il(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ll=Ja,Ul=gt,Ml=Ye,jl=El,Bl=cl,Nl=Cl,Gl=bo,Fl=Rn,ql=fr,Vl=su,Hl=pn.PROPER,zl=pn.CONFIGURABLE,Wl=vl.IteratorPrototype,Kl=vl.BUGGY_SAFARI_ITERATORS,$l=ze("iterator"),Ql="keys",Jl="values",Yl="entries",Xl=function(){return this},Zl=function(e,t,n,r,i,a,s){jl(n,t,r);var o,c,d,u=function(e){if(e===i&&m)return m;if(!Kl&&e in p)return p[e];switch(e){case Ql:case Jl:case Yl:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[$l]||p["@@iterator"]||i&&p[i],m=!Kl&&f||u(i),g="Array"==t&&p.entries||f;if(g&&(o=Bl(g.call(new e)))!==Object.prototype&&o.next&&(Bl(o)!==Wl&&(Nl?Nl(o,Wl):Ml(o[$l])||ql(o,$l,Xl)),Gl(o,l,!0)),Hl&&i==Jl&&f&&f.name!==Jl&&(zl?Fl(p,"name",Jl):(h=!0,m=function(){return Ul(f,this)})),i)if(c={values:u(Jl),keys:a?m:u(Ql),entries:u(Yl)},s)for(d in c)(Kl||h||!(d in p))&&ql(p,d,c[d]);else Ll({target:t,proto:!0,forced:Kl||h},c);return p[$l]!==m&&ql(p,$l,m,{name:i}),Vl[t]=m,c},eh=function(e,t){return{value:e,done:t}},th=Zu.charAt,nh=ps,rh=Wn,ih=Zl,ah=eh,sh="String Iterator",oh=rh.set,ch=rh.getterFor(sh);ih(String,"String",(function(e){oh(this,{type:sh,string:nh(e),index:0})}),(function(){var e,t=ch(this),n=t.string,r=t.index;return r>=n.length?ah(void 0,!0):(e=th(n,r),t.index+=e.length,ah(e,!1))}));var dh=pt,uh=function(){var e=dh(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},lh=ne,hh=z.RegExp,ph=lh((function(){var e=hh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),fh=ph||lh((function(){return!hh("a","y").sticky})),mh={BROKEN_CARET:ph||lh((function(){var e=hh("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:fh,UNSUPPORTED_Y:ph},gh=ne,vh=z.RegExp,bh=gh((function(){var e=vh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),yh=ne,_h=z.RegExp,wh=yh((function(){var e=_h("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ah=gt,kh=ce,Eh=ps,xh=uh,Sh=mh,Rh=W.exports,Dh=Ms,Th=Wn.get,Oh=bh,Ph=wh,Ih=Rh("native-string-replace",String.prototype.replace),Ch=RegExp.prototype.exec,Lh=Ch,Uh=kh("".charAt),Mh=kh("".indexOf),jh=kh("".replace),Bh=kh("".slice),Nh=function(){var e=/a/,t=/b*/g;return Ah(Ch,e,"a"),Ah(Ch,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Gh=Sh.BROKEN_CARET,Fh=void 0!==/()??/.exec("")[1];(Nh||Fh||Gh||Oh||Ph)&&(Lh=function(e){var t,n,r,i,a,s,o,c=this,d=Th(c),u=Eh(e),l=d.raw;if(l)return l.lastIndex=c.lastIndex,t=Ah(Lh,l,u),c.lastIndex=l.lastIndex,t;var h=d.groups,p=Gh&&c.sticky,f=Ah(xh,c),m=c.source,g=0,v=u;if(p&&(f=jh(f,"y",""),-1===Mh(f,"g")&&(f+="g"),v=Bh(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Uh(u,c.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",f)),Fh&&(n=new RegExp("^"+m+"$(?!\\s)",f)),Nh&&(r=c.lastIndex),i=Ah(Ch,p?n:c,v),p?i?(i.input=Bh(i.input,g),i[0]=Bh(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Nh&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),Fh&&i&&i.length>1&&Ah(Ih,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=s=Dh(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var qh=Lh;Ja({target:"RegExp",proto:!0,forced:/./.exec!==qh},{exec:qh});var Vh=Ja,Hh=Ze,zh=ce,Wh=be,Kh=Ye,$h=_t,Qh=ps,Jh=no,Yh=Ca,Xh=z.Symbol,Zh=Xh&&Xh.prototype;if(Hh&&Kh(Xh)&&(!("description"in Zh)||void 0!==Xh().description)){var ep={},tp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Qh(arguments[0]),t=$h(Zh,this)?new Xh(e):void 0===e?Xh():Xh(e);return""===e&&(ep[t]=!0),t};Yh(tp,Xh),tp.prototype=Zh,Zh.constructor=tp;var np="Symbol(test)"==String(Xh("test")),rp=zh(Zh.valueOf),ip=zh(Zh.toString),ap=/^Symbol\((.*)\)[^)]+$/,sp=zh("".replace),op=zh("".slice);Jh(Zh,"description",{configurable:!0,get:function(){var e=rp(this);if(Wh(ep,e))return"";var t=ip(e),n=np?op(t,7,-1):sp(t,ap,"$1");return""===n?void 0:n}}),Vh({global:!0,constructor:!0,forced:!0},{Symbol:tp})}uo("iterator");var cp=ze,dp=Ms,up=Xe.f,lp=cp("unscopables"),hp=Array.prototype;null==hp[lp]&&up(hp,lp,{configurable:!0,value:dp(null)});var pp=function(e){hp[lp][e]=!0},fp=Ki,mp=pp,gp=su,vp=Wn,bp=Xe.f,yp=Zl,_p=eh,wp=Ze,Ap="Array Iterator",kp=vp.set,Ep=vp.getterFor(Ap),xp=yp(Array,"Array",(function(e,t){kp(this,{type:Ap,target:fp(e),index:0,kind:t})}),(function(){var e=Ep(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,_p(void 0,!0)):_p("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Sp=gp.Arguments=gp.Array;if(mp("keys"),mp("values"),mp("entries"),wp&&"values"!==Sp.name)try{bp(Sp,"name",{value:"values"})}catch(e){}var Rp=z,Dp=Dr,Tp=Pr,Op=xp,Pp=Rn,Ip=ze,Cp=Ip("iterator"),Lp=Ip("toStringTag"),Up=Op.values,Mp=function(e,t){if(e){if(e[Cp]!==Up)try{Pp(e,Cp,Up)}catch(t){e[Cp]=Up}if(e[Lp]||Pp(e,Lp,t),Dp[t])for(var n in Op)if(e[n]!==Op[n])try{Pp(e,n,Op[n])}catch(t){e[n]=Op[n]}}};for(var jp in Dp)Mp(Rp[jp]&&Rp[jp].prototype,jp);Mp(Tp,"DOMTokenList");var Bp,Np,Gp,Fp,qp="undefined"!=typeof process&&"process"==br(process),Vp=yt,Hp=no,zp=Ze,Wp=ze("species"),Kp=function(e){var t=Vp(e);zp&&t&&!t[Wp]&&Hp(t,Wp,{configurable:!0,get:function(){return this}})},$p=_t,Qp=TypeError,Jp=function(e,t){if($p(t,e))return e;throw Qp("Incorrect invocation")},Yp=fi,Xp=Rt,Zp=TypeError,ef=pt,tf=function(e){if(Yp(e))return e;throw Zp(Xp(e)+" is not a constructor")},nf=de,rf=ze("species"),af=function(e,t){var n,r=ef(e).constructor;return void 0===r||nf(n=ef(r)[rf])?t:tf(n)},sf=TypeError,of=function(e,t){if(e<t)throw sf("Not enough arguments");return e},cf=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ee),df=z,uf=Wc,lf=Br,hf=Ye,pf=be,ff=ne,mf=As,gf=Kc,vf=st,bf=of,yf=cf,_f=qp,wf=df.setImmediate,Af=df.clearImmediate,kf=df.process,Ef=df.Dispatch,xf=df.Function,Sf=df.MessageChannel,Rf=df.String,Df=0,Tf={},Of="onreadystatechange";ff((function(){Bp=df.location}));var Pf=function(e){if(pf(Tf,e)){var t=Tf[e];delete Tf[e],t()}},If=function(e){return function(){Pf(e)}},Cf=function(e){Pf(e.data)},Lf=function(e){df.postMessage(Rf(e),Bp.protocol+"//"+Bp.host)};wf&&Af||(wf=function(e){bf(arguments.length,1);var t=hf(e)?e:xf(e),n=gf(arguments,1);return Tf[++Df]=function(){uf(t,void 0,n)},Np(Df),Df},Af=function(e){delete Tf[e]},_f?Np=function(e){kf.nextTick(If(e))}:Ef&&Ef.now?Np=function(e){Ef.now(If(e))}:Sf&&!yf?(Fp=(Gp=new Sf).port2,Gp.port1.onmessage=Cf,Np=lf(Fp.postMessage,Fp)):df.addEventListener&&hf(df.postMessage)&&!df.importScripts&&Bp&&"file:"!==Bp.protocol&&!ff(Lf)?(Np=Lf,df.addEventListener("message",Cf,!1)):Np=Of in vf("script")?function(e){mf.appendChild(vf("script"))[Of]=function(){mf.removeChild(this),Pf(e)}}:function(e){setTimeout(If(e),0)});var Uf={set:wf,clear:Af},Mf=function(){this.head=null,this.tail=null};Mf.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 jf,Bf,Nf,Gf,Ff,qf=Mf,Vf=/ipad|iphone|ipod/i.test(Ee)&&"undefined"!=typeof Pebble,Hf=/web0s(?!.*chrome)/i.test(Ee),zf=z,Wf=Br,Kf=Gi.f,$f=Uf.set,Qf=qf,Jf=cf,Yf=Vf,Xf=Hf,Zf=qp,em=zf.MutationObserver||zf.WebKitMutationObserver,tm=zf.document,nm=zf.process,rm=zf.Promise,im=Kf(zf,"queueMicrotask"),am=im&&im.value;if(!am){var sm=new Qf,om=function(){var e,t;for(Zf&&(e=nm.domain)&&e.exit();t=sm.get();)try{t()}catch(e){throw sm.head&&jf(),e}e&&e.enter()};Jf||Zf||Xf||!em||!tm?!Yf&&rm&&rm.resolve?((Gf=rm.resolve(void 0)).constructor=rm,Ff=Wf(Gf.then,Gf),jf=function(){Ff(om)}):Zf?jf=function(){nm.nextTick(om)}:($f=Wf($f,zf),jf=function(){$f(om)}):(Bf=!0,Nf=tm.createTextNode(""),new em(om).observe(Nf,{characterData:!0}),jf=function(){Nf.data=Bf=!Bf}),am=function(e){sm.head||jf(),sm.add(e)}}var cm=am,dm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},um=z.Promise,lm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,hm=!lm&&!qp&&"object"==typeof window&&"object"==typeof document,pm=z,fm=um,mm=Ye,gm=qa,vm=_n,bm=ze,ym=hm,_m=lm,wm=Pe;fm&&fm.prototype;var Am=bm("species"),km=!1,Em=mm(pm.PromiseRejectionEvent),xm=gm("Promise",(function(){var e=vm(fm),t=e!==String(fm);if(!t&&66===wm)return!0;if(!wm||wm<51||!/native code/.test(e)){var n=new fm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Am]=r,!(km=n.then((function(){}))instanceof r))return!0}return!t&&(ym||_m)&&!Em})),Sm={CONSTRUCTOR:xm,REJECTION_EVENT:Em,SUBCLASSING:km},Rm={},Dm=Pt,Tm=TypeError,Om=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Tm("Bad Promise constructor");t=e,n=r})),this.resolve=Dm(t),this.reject=Dm(n)};Rm.f=function(e){return new Om(e)};var Pm,Im,Cm,Lm=Ja,Um=qp,Mm=z,jm=gt,Bm=fr,Nm=Cl,Gm=bo,Fm=Kp,qm=Pt,Vm=Ye,Hm=nt,zm=Jp,Wm=af,Km=Uf.set,$m=cm,Qm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},Jm=dm,Ym=qf,Xm=Wn,Zm=um,eg=Rm,tg="Promise",ng=Sm.CONSTRUCTOR,rg=Sm.REJECTION_EVENT,ig=Sm.SUBCLASSING,ag=Xm.getterFor(tg),sg=Xm.set,og=Zm&&Zm.prototype,cg=Zm,dg=og,ug=Mm.TypeError,lg=Mm.document,hg=Mm.process,pg=eg.f,fg=pg,mg=!!(lg&&lg.createEvent&&Mm.dispatchEvent),gg="unhandledrejection",vg=function(e){var t;return!(!Hm(e)||!Vm(t=e.then))&&t},bg=function(e,t){var n,r,i,a=t.value,s=1==t.state,o=s?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{o?(s||(2===t.rejection&&kg(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?d(ug("Promise-chain cycle")):(r=vg(n))?jm(r,n,c,d):c(n)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},yg=function(e,t){e.notified||(e.notified=!0,$m((function(){for(var n,r=e.reactions;n=r.get();)bg(n,e);e.notified=!1,t&&!e.rejection&&wg(e)})))},_g=function(e,t,n){var r,i;mg?((r=lg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Mm.dispatchEvent(r)):r={promise:t,reason:n},!rg&&(i=Mm["on"+e])?i(r):e===gg&&Qm("Unhandled promise rejection",n)},wg=function(e){jm(Km,Mm,(function(){var t,n=e.facade,r=e.value;if(Ag(e)&&(t=Jm((function(){Um?hg.emit("unhandledRejection",r,n):_g(gg,n,r)})),e.rejection=Um||Ag(e)?2:1,t.error))throw t.value}))},Ag=function(e){return 1!==e.rejection&&!e.parent},kg=function(e){jm(Km,Mm,(function(){var t=e.facade;Um?hg.emit("rejectionHandled",t):_g("rejectionhandled",t,e.value)}))},Eg=function(e,t,n){return function(r){e(t,r,n)}},xg=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,yg(e,!0))},Sg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw ug("Promise can't be resolved itself");var r=vg(t);r?$m((function(){var n={done:!1};try{jm(r,t,Eg(Sg,n,e),Eg(xg,n,e))}catch(t){xg(n,t,e)}})):(e.value=t,e.state=1,yg(e,!1))}catch(t){xg({done:!1},t,e)}}};if(ng&&(dg=(cg=function(e){zm(this,dg),qm(e),jm(Pm,this);var t=ag(this);try{e(Eg(Sg,t),Eg(xg,t))}catch(e){xg(t,e)}}).prototype,(Pm=function(e){sg(this,{type:tg,done:!1,notified:!1,parent:!1,reactions:new Ym,rejection:!1,state:0,value:void 0})}).prototype=Bm(dg,"then",(function(e,t){var n=ag(this),r=pg(Wm(this,cg));return n.parent=!0,r.ok=!Vm(e)||e,r.fail=Vm(t)&&t,r.domain=Um?hg.domain:void 0,0==n.state?n.reactions.add(r):$m((function(){bg(r,n)})),r.promise})),Im=function(){var e=new Pm,t=ag(e);this.promise=e,this.resolve=Eg(Sg,t),this.reject=Eg(xg,t)},eg.f=pg=function(e){return e===cg||undefined===e?new Im(e):fg(e)},Vm(Zm)&&og!==Object.prototype)){Cm=og.then,ig||Bm(og,"then",(function(e,t){var n=this;return new cg((function(e,t){jm(Cm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete og.constructor}catch(e){}Nm&&Nm(og,dg)}Lm({global:!0,constructor:!0,wrap:!0,forced:ng},{Promise:cg}),Gm(cg,tg,!1),Fm(tg);var Rg=Br,Dg=gt,Tg=pt,Og=Rt,Pg=uu,Ig=Xr,Cg=_t,Lg=ku,Ug=gu,Mg=ru,jg=TypeError,Bg=function(e,t){this.stopped=e,this.result=t},Ng=Bg.prototype,Gg=function(e,t,n){var r,i,a,s,o,c,d,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=Rg(t,u),g=function(e){return r&&Mg(r,"normal",e),new Bg(!0,e)},v=function(e){return l?(Tg(e),f?m(e[0],e[1],g):m(e[0],e[1])):f?m(e,g):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=Ug(e)))throw jg(Og(e)+" is not iterable");if(Pg(i)){for(a=0,s=Ig(e);s>a;a++)if((o=v(e[a]))&&Cg(Ng,o))return o;return new Bg(!1)}r=Lg(e,i)}for(c=h?e.next:r.next;!(d=Dg(c,r)).done;){try{o=v(d.value)}catch(e){Mg(r,"throw",e)}if("object"==typeof o&&o&&Cg(Ng,o))return o}return new Bg(!1)},Fg=um,qg=Sm.CONSTRUCTOR||!Gu((function(e){Fg.all(e).then(void 0,(function(){}))})),Vg=gt,Hg=Pt,zg=Rm,Wg=dm,Kg=Gg;Ja({target:"Promise",stat:!0,forced:qg},{all:function(e){var t=this,n=zg.f(t),r=n.resolve,i=n.reject,a=Wg((function(){var n=Hg(t.resolve),a=[],s=0,o=1;Kg(e,(function(e){var c=s++,d=!1;o++,Vg(n,t,e).then((function(e){d||(d=!0,a[c]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var $g=Ja,Qg=Sm.CONSTRUCTOR,Jg=um,Yg=yt,Xg=Ye,Zg=fr,ev=Jg&&Jg.prototype;if($g({target:"Promise",proto:!0,forced:Qg,real:!0},{catch:function(e){return this.then(void 0,e)}}),Xg(Jg)){var tv=Yg("Promise").prototype.catch;ev.catch!==tv&&Zg(ev,"catch",tv,{unsafe:!0})}var nv=gt,rv=Pt,iv=Rm,av=dm,sv=Gg;Ja({target:"Promise",stat:!0,forced:qg},{race:function(e){var t=this,n=iv.f(t),r=n.reject,i=av((function(){var i=rv(t.resolve);sv(e,(function(e){nv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var ov=gt,cv=Rm;Ja({target:"Promise",stat:!0,forced:Sm.CONSTRUCTOR},{reject:function(e){var t=cv.f(this);return ov(t.reject,void 0,e),t.promise}});var dv=pt,uv=nt,lv=Rm,hv=function(e,t){if(dv(e),uv(t)&&t.constructor===e)return t;var n=lv.f(e);return(0,n.resolve)(t),n.promise},pv=Ja,fv=Sm.CONSTRUCTOR,mv=hv;yt("Promise"),pv({target:"Promise",stat:!0,forced:fv},{resolve:function(e){return mv(this,e)}});var gv=TypeError,vv=Ja,bv=ne,yv=ei,_v=nt,wv=me,Av=Xr,kv=function(e){if(e>9007199254740991)throw gv("Maximum allowed index exceeded");return e},Ev=Fs,xv=wi,Sv=Td,Rv=Pe,Dv=ze("isConcatSpreadable"),Tv=Rv>=51||!bv((function(){var e=[];return e[Dv]=!1,e.concat()[0]!==e})),Ov=function(e){if(!_v(e))return!1;var t=e[Dv];return void 0!==t?!!t:yv(e)};vv({target:"Array",proto:!0,arity:1,forced:!Tv||!Sv("concat")},{concat:function(e){var t,n,r,i,a,s=wv(this),o=xv(s,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(Ov(a=-1===t?s:arguments[t]))for(i=Av(a),kv(c+i),n=0;n<i;n++,c++)n in a&&Ev(o,c,a[n]);else kv(c+1),Ev(o,c++,a);return o.length=c,o}});var Pv=Ze,Iv=pn.EXISTS,Cv=ce,Lv=no,Uv=Function.prototype,Mv=Cv(Uv.toString),jv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Bv=Cv(jv.exec);function Nv(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Gv(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 Gv(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,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,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function Gv(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 Fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fv(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Pv&&!Iv&&Lv(Uv,"name",{configurable:!0,get:function(){try{return Bv(jv,Mv(this))[1]}catch(e){return""}}});var Vv,Hv={react:{src:"https://pm.gamedistribution.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.gamedistribution.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.gamedistribution.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.gamedistribution.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.gamedistribution.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},zv={},Wv=function(e,t){zv[e]=qv(qv({},t),{},{isLoading:!1})},Kv=function(e){var n=this,r=e.id,i=e.src;return new Promise(function(e,a){if(t(this,n),document.getElementById(r))e();else{var s=document.createElement("script");s.onload=function(){e()},s.id=r,s.setAttribute("crossorigin",!0),s.src=i,document.head.appendChild(s)}}.bind(this))},$v=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,c,d,u;return r.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(!(i=zv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=Nv(i.dependencies),e.prev=8,a.s();case 10:if((s=a.n()).done){e.next=26;break}if(o=s.value,e.prev=12,c=Hv[o].name,!window[c]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Kv({id:o,src:Hv[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=o.id,u=o.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,Kv({id:t,src:i.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(i.source,"."),e.t2);case 43:return i.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(e){return t.apply(this,arguments)}}(),Qv=new(R((function t(){var n=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v("Leaderboard");case 2:n.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"showLeaderboard",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=window.GD_OPTIONS.gameId,n.leaderboard){e.next=4;break}return e.next=4,n.load();case 4:n.leaderboard.showLeaderBoard(i,t);case 5:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),T(this,"addScore",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.leaderboard){e.next=3;break}return e.next=3,n.load();case 3:n.leaderboard.addScore(t);case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Wv(this.moduleName,this.moduleConfig)}))),Jv=nt,Yv=br,Xv=ze("match"),Zv=function(e){var t;return Jv(e)&&(void 0!==(t=e[Xv])?!!t:"RegExp"==Yv(e))},eb=Zv,tb=TypeError,nb=function(e){if(eb(e))throw tb("The method doesn't accept regular expressions");return e},rb=ze("match"),ib=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[rb]=!1,"/./"[e](t)}catch(e){}}return!1},ab=Ja,sb=Lr,ob=Gi.f,cb=Jr,db=ps,ub=nb,lb=he,hb=ib,pb=sb("".startsWith),fb=sb("".slice),mb=Math.min,gb=hb("startsWith");ab({target:"String",proto:!0,forced:!!(gb||(Vv=ob(String.prototype,"startsWith"),!Vv||Vv.writable))&&!gb},{startsWith:function(e){var t=db(lb(this));ub(e);var n=cb(mb(arguments.length>1?arguments[1]:void 0,t.length)),r=db(e);return pb?pb(t,r,n):fb(t,n,n+r.length)===r}});var vb=gt,bb=be,yb=_t,_b=uh,wb=RegExp.prototype,Ab=function(e){var t=e.flags;return void 0!==t||"flags"in wb||bb(e,"flags")||!yb(wb,e)?t:vb(_b,e)},kb=pn.PROPER,Eb=fr,xb=pt,Sb=ps,Rb=ne,Db=Ab,Tb="toString",Ob=RegExp.prototype[Tb],Pb=Rb((function(){return"/a/b"!=Ob.call({source:"a",flags:"b"})})),Ib=kb&&Ob.name!=Tb;(Pb||Ib)&&Eb(RegExp.prototype,Tb,(function(){var e=xb(this);return"/"+Sb(e.source)+"/"+Sb(Db(e))}),{unsafe:!0});var Cb=Lr,Lb=fr,Ub=qh,Mb=ne,jb=ze,Bb=Rn,Nb=jb("species"),Gb=RegExp.prototype,Fb=function(e,t,n,r){var i=jb(e),a=!Mb((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!Mb((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Nb]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=Cb(/./[i]),c=t(i,""[e],(function(e,t,n,r,i){var s=Cb(e),c=t.exec;return c===Ub||c===Gb.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Lb(String.prototype,e,c[0]),Lb(Gb,i,c[1])}r&&Bb(Gb[i],"sham",!0)},qb=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Vb=gt,Hb=pt,zb=Ye,Wb=br,Kb=qh,$b=TypeError,Qb=function(e,t){var n=e.exec;if(zb(n)){var r=Vb(n,e,t);return null!==r&&Hb(r),r}if("RegExp"===Wb(e))return Vb(Kb,e,t);throw $b("RegExp#exec called on incompatible receiver")},Jb=gt,Yb=pt,Xb=de,Zb=he,ey=qb,ty=ps,ny=Lt,ry=Qb;function iy(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 ay(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iy(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Fb("search",(function(e,t,n){return[function(t){var n=Zb(this),r=Xb(t)?void 0:ny(t,e);return r?Jb(r,t,n):new RegExp(t)[e](ty(n))},function(e){var r=Yb(this),i=ty(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;ey(s,0)||(r.lastIndex=0);var o=ry(r,i);return ey(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var sy,oy,cy=function(){function e(){D(this,e)}return R(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()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",v);var b=(e||n)&&r.loaderEnabled,y=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:b,parentURL:i,parentDomain:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,depth:o(),domainMatched:c===u,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new O(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(P.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(P.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(qs.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new O(e,!0);return n.query=ay(ay({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return P.encode(JSON.stringify(e))}}]),e}(),dy=function(){try{return(new cy).getBridgeContext()}catch(e){return{}}}(),uy={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(sy=!1,(oy=c("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===oy.xanthophyll&&(sy=!0),sy)},ly=Zu.charAt,hy=ce,py=me,fy=Math.floor,my=hy("".charAt),gy=hy("".replace),vy=hy("".slice),by=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,yy=/\$([$&'`]|\d{1,2})/g,_y=Wc,wy=gt,Ay=ce,ky=Fb,Ey=ne,xy=pt,Sy=Ye,Ry=de,Dy=Kr,Ty=Jr,Oy=ps,Py=he,Iy=function(e,t,n){return t+(n?ly(e,t).length:1)},Cy=Lt,Ly=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,c=yy;return void 0!==i&&(i=py(i),c=by),gy(a,c,(function(a,c){var d;switch(my(c,0)){case"$":return"$";case"&":return e;case"`":return vy(t,0,n);case"'":return vy(t,s);case"<":d=i[vy(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>o){var l=fy(u/10);return 0===l?a:l<=o?void 0===r[l-1]?my(c,1):r[l-1]+my(c,1):a}d=r[u-1]}return void 0===d?"":d}))},Uy=Qb,My=ze("replace"),jy=Math.max,By=Math.min,Ny=Ay([].concat),Gy=Ay([].push),Fy=Ay("".indexOf),qy=Ay("".slice),Vy="$0"==="a".replace(/./,"$0"),Hy=!!/./[My]&&""===/./[My]("a","$0");ky("replace",(function(e,t,n){var r=Hy?"$":"$0";return[function(e,n){var r=Py(this),i=Ry(e)?void 0:Cy(e,My);return i?wy(i,e,r,n):wy(t,Oy(r),e,n)},function(e,i){var a=xy(this),s=Oy(e);if("string"==typeof i&&-1===Fy(i,r)&&-1===Fy(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var c=Sy(i);c||(i=Oy(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=Uy(a,s);if(null===h)break;if(Gy(l,h),!d)break;""===Oy(h[0])&&(a.lastIndex=Iy(s,Ty(a.lastIndex),u))}for(var p,f="",m=0,g=0;g<l.length;g++){for(var v=Oy((h=l[g])[0]),b=jy(By(Dy(h.index),s.length),0),y=[],_=1;_<h.length;_++)Gy(y,void 0===(p=h[_])?p:String(p));var w=h.groups;if(c){var A=Ny([v],y,b,s);void 0!==w&&Gy(A,w);var k=Oy(_y(i,void 0,A))}else k=Ly(v,s,b,y,w,i);b>=m&&(f+=qy(s,m,b)+k,m=b+v.length)}return f+qy(s,m)}]}),!!Ey((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Vy||Hy);var zy=ne,Wy=Ze,Ky=ze("iterator"),$y=!zy((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&&!Wy||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Ky]||"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})),Qy=fr,Jy=$s,Yy=Math.floor,Xy=function(e,t){var n=e.length,r=Yy(n/2);return n<8?Zy(e,t):e_(e,Xy(Jy(e,0,r),t),Xy(Jy(e,r),t),t)},Zy=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},e_=function(e,t,n,r){for(var i=t.length,a=n.length,s=0,o=0;s<i||o<a;)e[s+o]=s<i&&o<a?r(t[s],n[o])<=0?t[s++]:n[o++]:s<i?t[s++]:n[o++];return e},t_=Ja,n_=z,r_=gt,i_=ce,a_=Ze,s_=$y,o_=fr,c_=no,d_=function(e,t,n){for(var r in t)Qy(e,r,t[r],n);return e},u_=bo,l_=El,h_=Wn,p_=Jp,f_=Ye,m_=be,g_=Br,v_=xr,b_=pt,y_=nt,__=ps,w_=Ms,A_=En,k_=ku,E_=gu,x_=of,S_=Xy,R_=ze("iterator"),D_="URLSearchParams",T_=D_+"Iterator",O_=h_.set,P_=h_.getterFor(D_),I_=h_.getterFor(T_),C_=Object.getOwnPropertyDescriptor,L_=function(e){if(!a_)return n_[e];var t=C_(n_,e);return t&&t.value},U_=L_("fetch"),M_=L_("Request"),j_=L_("Headers"),B_=M_&&M_.prototype,N_=j_&&j_.prototype,G_=n_.RegExp,F_=n_.TypeError,q_=n_.decodeURIComponent,V_=n_.encodeURIComponent,H_=i_("".charAt),z_=i_([].join),W_=i_([].push),K_=i_("".replace),$_=i_([].shift),Q_=i_([].splice),J_=i_("".split),Y_=i_("".slice),X_=/\+/g,Z_=Array(4),ew=function(e){return Z_[e-1]||(Z_[e-1]=G_("((?:%[\\da-f]{2}){"+e+"})","gi"))},tw=function(e){try{return q_(e)}catch(t){return e}},nw=function(e){var t=K_(e,X_," "),n=4;try{return q_(t)}catch(e){for(;n;)t=K_(t,ew(n--),tw);return t}},rw=/[!'()~]|%20/g,iw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},aw=function(e){return iw[e]},sw=function(e){return K_(V_(e),rw,aw)},ow=l_((function(e,t){O_(this,{type:T_,iterator:k_(P_(e).entries),kind:t})}),"Iterator",(function(){var e=I_(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),cw=function(e){this.entries=[],this.url=null,void 0!==e&&(y_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===H_(e,0)?Y_(e,1):e:__(e)))};cw.prototype={type:D_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,c=E_(e);if(c)for(n=(t=k_(e,c)).next;!(r=r_(n,t)).done;){if(a=(i=k_(b_(r.value))).next,(s=r_(a,i)).done||(o=r_(a,i)).done||!r_(a,i).done)throw F_("Expected sequence with length 2");W_(this.entries,{key:__(s.value),value:__(o.value)})}else for(var d in e)m_(e,d)&&W_(this.entries,{key:d,value:__(e[d])})},parseQuery:function(e){if(e)for(var t,n,r=J_(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=J_(t,"="),W_(this.entries,{key:nw($_(n)),value:nw(z_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],W_(n,sw(e.key)+"="+sw(e.value));return z_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var dw=function(){p_(this,uw);var e=O_(this,new cw(arguments.length>0?arguments[0]:void 0));a_||(this.length=e.entries.length)},uw=dw.prototype;if(d_(uw,{append:function(e,t){x_(arguments.length,2);var n=P_(this);W_(n.entries,{key:__(e),value:__(t)}),a_||this.length++,n.updateURL()},delete:function(e){x_(arguments.length,1);for(var t=P_(this),n=t.entries,r=__(e),i=0;i<n.length;)n[i].key===r?Q_(n,i,1):i++;a_||(this.length=n.length),t.updateURL()},get:function(e){x_(arguments.length,1);for(var t=P_(this).entries,n=__(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){x_(arguments.length,1);for(var t=P_(this).entries,n=__(e),r=[],i=0;i<t.length;i++)t[i].key===n&&W_(r,t[i].value);return r},has:function(e){x_(arguments.length,1);for(var t=P_(this).entries,n=__(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){x_(arguments.length,1);for(var n,r=P_(this),i=r.entries,a=!1,s=__(e),o=__(t),c=0;c<i.length;c++)(n=i[c]).key===s&&(a?Q_(i,c--,1):(a=!0,n.value=o));a||W_(i,{key:s,value:o}),a_||(this.length=i.length),r.updateURL()},sort:function(){var e=P_(this);S_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=P_(this).entries,r=g_(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new ow(this,"keys")},values:function(){return new ow(this,"values")},entries:function(){return new ow(this,"entries")}},{enumerable:!0}),o_(uw,R_,uw.entries,{name:"entries"}),o_(uw,"toString",(function(){return P_(this).serialize()}),{enumerable:!0}),a_&&c_(uw,"size",{get:function(){return P_(this).entries.length},configurable:!0,enumerable:!0}),u_(dw,D_),t_({global:!0,constructor:!0,forced:!s_},{URLSearchParams:dw}),!s_&&f_(j_)){var lw=i_(N_.has),hw=i_(N_.set),pw=function(e){if(y_(e)){var t,n=e.body;if(v_(n)===D_)return t=e.headers?new j_(e.headers):new j_,lw(t,"content-type")||hw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),w_(e,{body:A_(0,__(n)),headers:A_(0,t)})}return e};if(f_(U_)&&t_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return U_(e,arguments.length>1?pw(arguments[1]):{})}}),f_(M_)){var fw=function(e){return p_(this,B_),new M_(e,arguments.length>1?pw(arguments[1]):{})};B_.constructor=fw,fw.prototype=B_,t_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:fw})}}var mw={URLSearchParams:dw,getState:P_},gw=ha.includes,vw=pp;Ja({target:"Array",proto:!0,forced:ne((function(){return!Array(1).includes()}))},{includes:function(e){return gw(this,e,arguments.length>1?arguments[1]:void 0)}}),vw("includes");var bw=Ja,yw=nb,_w=he,ww=ps,Aw=ib,kw=ce("".indexOf);function Ew(e){var n=this,r={},i=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,s=(null==e?void 0:e.self_origin)||window.location.origin,o=(null==e?void 0:e.referrer_url)||document.referrer;function c(e){return L(r,e)}function d(e,t){return U(r,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new O(e,t)}catch(e){console.log(e)}}function l(){for(var t=(null==e?void 0:e.urls)||[a,o],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var s=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(s&&(s=decodeURIComponent(s),I.isURL(s)))return s}}}return function(){var e;t(this,n),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=i,t=r.depth.value,n=s;if(d("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],d("top.domain.from","origins");else if(0===t)n=s,d("top.domain.from","self-top");else if(1===t){var a=u(o);a&&(n=a.origin,d("top.domain.from","referrer"))}d("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(C(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",r.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?C(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",o),d("partner.url.from","fallback"))}.bind(this)(),{get:c,print:function(e){console.log(c(e))}}}bw({target:"String",proto:!0,forced:!Aw("includes")},{includes:function(e){return!!~kw(ww(_w(this)),ww(yw(e)),arguments.length>1?arguments[1]:void 0)}});var xw="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==xw&&xw,Sw={searchParams:"URLSearchParams"in xw,iterable:"Symbol"in xw&&"iterator"in Symbol,blob:"FileReader"in xw&&"Blob"in xw&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in xw,arrayBuffer:"ArrayBuffer"in xw};if(Sw.arrayBuffer)var Rw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Dw=ArrayBuffer.isView||function(e){return e&&Rw.indexOf(Object.prototype.toString.call(e))>-1};function Tw(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 Ow(e){return"string"!=typeof e&&(e=String(e)),e}function Pw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Sw.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Iw(e){this.map={},e instanceof Iw?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 Cw(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Lw(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Uw(e){var t=new FileReader,n=Lw(t);return t.readAsArrayBuffer(e),n}function Mw(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function jw(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Sw.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Sw.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Sw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Sw.arrayBuffer&&Sw.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Mw(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Sw.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Dw(e))?this._bodyArrayBuffer=Mw(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):Sw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Sw.blob&&(this.blob=function(){var e=Cw(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=Cw(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(Uw)}),this.text=function(){var e=Cw(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Lw(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)},Sw.formData&&(this.formData=function(){return this.text().then(Gw)}),this.json=function(){return this.text().then(JSON.parse)},this}Iw.prototype.append=function(e,t){e=Tw(e),t=Ow(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Iw.prototype.delete=function(e){delete this.map[Tw(e)]},Iw.prototype.get=function(e){return e=Tw(e),this.has(e)?this.map[e]:null},Iw.prototype.has=function(e){return this.map.hasOwnProperty(Tw(e))},Iw.prototype.set=function(e,t){this.map[Tw(e)]=Ow(t)},Iw.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Iw.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Pw(e)},Iw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Pw(e)},Iw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Pw(e)},Sw.iterable&&(Iw.prototype[Symbol.iterator]=Iw.prototype.entries);var Bw=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Nw(e,t){if(!(this instanceof Nw))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 Nw){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Iw(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 Iw(t.headers)),this.method=function(e){var t=e.toUpperCase();return Bw.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 Gw(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Fw(e,t){if(!(this instanceof Fw))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 Iw(t.headers),this.url=t.url||"",this._initBody(e)}Nw.prototype.clone=function(){return new Nw(this,{body:this._bodyInit})},jw.call(Nw.prototype),jw.call(Fw.prototype),Fw.prototype.clone=function(){return new Fw(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Iw(this.headers),url:this.url})},Fw.error=function(){var e=new Fw(null,{status:0,statusText:""});return e.type="error",e};var qw=[301,302,303,307,308];Fw.redirect=function(e,t){if(-1===qw.indexOf(t))throw new RangeError("Invalid status code");return new Fw(null,{status:t,headers:{location:e}})};var Vw,Hw=xw.DOMException;try{new Hw}catch(e){Hw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Hw.prototype=Object.create(Error.prototype),Hw.prototype.constructor=Hw}function zw(e,t){return new Promise((function(n,r){var i=new Nw(e,t);if(i.signal&&i.signal.aborted)return r(new Hw("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Iw,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 i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new Fw(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new Hw("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&xw.location.href?xw.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&(Sw.blob?a.responseType="blob":Sw.arrayBuffer&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Iw?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,Ow(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}zw.polyfill=!0,xw.fetch||(xw.fetch=zw,xw.Headers=Iw,xw.Request=Nw,xw.Response=Fw);var Ww=function(e){var n=this;if(!Vw){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:dy.topDomain,domain:dy.parentDomain,referrer:dy.parentURL,depth:o(),version:as.version,byloader:dy.isTokenGameURL,isTokenGameURL:dy.isTokenGameURL,isMasterGameURL:dy.isMasterGameURL,isExtHostedGameURL:dy.isExtHostedGameURL,byloaderVersion:dy.version,tracking:uy.userDeclinedTracking,whitelabel:uy.whitelabelPartner,platform:u()};Vw=new l(r)}return Vw||{send:function(){t(this,n)}.bind(this)}},Kw={getGameData:function(e){var n=this;try{var r=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var n=this;try{var r="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}}},$w={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},Qw={gameAPI:"game.api.gamedistribution.com"},Jw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},Yw=function(){var e=this,n=$w.acc.some(function(n){var r;return t(this,e),n===(null===(r=window.location.host)||void 0===r?void 0:r.toLowerCase())}.bind(this));return{env:n?"acc":"prod",config:n?Jw:Qw}};function Xw(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 Zw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xw(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var eA,tA,nA,rA=new j,iA=[],aA=function(e){iA.push(e)},sA=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(tA){e.next=6;break}return e.next=3,dA(nA);case 3:tA=e.sent,rA.emit("game-data-ready",tA),oA();case 6:return e.abrupt("return",tA);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),oA=function(){var t,n;if(null!==(t=tA)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,c;if(cA(),null!==(i=tA)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=tA)&&void 0!==o&&o.url)Kw.getGameData(null===(c=tA)||void 0===c?void 0:c.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dA(nA);case 3:tA=e.sent,null===(t=tA)||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)}},cA=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,c,d,u,l,h,p,f,m,g,v,b,y,_,w,A,k=this,E=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(u=E.length,l=new Array(u),h=0;h<u;h++)l[h]=E[h];p=l[0],f=l[1],m=null===(i=tA)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,g=null===(o=tA)||void 0===o||null===(c=o.aws_tst)||void 0===c||null===(d=c.ep)||void 0===d?void 0:d.msgrt,v=function(e,r){var i=this;t(this,k);var a=p.replace(e,r);n(a,f).then(function(){t(this,i)}.bind(this))}.bind(this);try{m&&p.indexOf("tag.atom")>0&&v("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),g&&p.indexOf("msgrt.gamedistribution.com")>0&&(null===(b=tA)||void 0===b||b.aws_tst,null===(y=tA)||void 0===y||null===(_=y.aws_tst)||void 0===_||null===(w=_.ep)||void 0===w||w.msgrt,v("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(p,f);case 9:return A=e.sent,e.abrupt("return",A);case 11:case"end":return e.stop()}}),e,this)})))},dA=function(e){var n=this;eA.send("gdfw.loading",{message:"loading"}),iA=[],aA("1"),aA("2");var r=new Ew;aA("3");var i=r.get("partner.domain.value");aA("4");var a=function(){return t(this,n),{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);aA("5");var s=function(){t(this,n);var r=o(),a=r?"&mode=".concat(r):"",s=Yw().config;return"https://".concat(s.gameAPI,"/game/v4/get/").concat(e.gameId.replace(/-/g,""),"/?domain=").concat(i).concat(a,"&v=").concat(as.version,"&localTime=").concat((new Date).getHours())}.bind(this);aA("6");var o=function(){var e=this;t(this,n);var r=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!r.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:r.gd_mode}.bind(this);return aA("7"),new Promise(function(e){var r=this;t(this,n),aA("7.1");var i=a();try{aA("7.2");var o=s();aA("7.3"),fetch(o).then(function(e){return t(this,r),aA("7.4"),e.json()}.bind(this)).then(function(n){var a=this;if(t(this,r),aA("7.5"),n.success){var s,c,d,u=n.result.game;aA("7.6");var l={gameId:u.gameMd5,slug:u.slug,pname:u.pname,dname:u.dname,status:u.status,description:u.description,disableAds:u.enableAds,preroll:u.preRoll,midroll:6e4*u.timeAds,rewardedAds:u.rewardedAds,title:u.title,publishedAt:u.publishedAt,tags:u.tags,category:u.category,assets:u.assets,disp_2nd_prer:u.disp_2nd_prer,ctry_vst:u.ctry_vst,ctry:u.ctry,crtv:u.crtv,dmain:u.dmain,aws_tst:u.aws_tst,__t4r:ss(u.__t4r)||{},block_exts:ss(u.push_cuda),bloc_gard:ss(u.bloc_gard),cookie:ss(u.cookie),gdpr:ss(u.gdpr),diagnostic:ss(u.diagnostic),cmp:ss(u.cmp),gft:ss(u.gft)||{},sdk:ss(u.sdk)||{},sdkfw:ss(u.sdkfw)||{},loader:ss(u.loader)||{},splash:ss(u.splash)||{},promo:ss(u.promo)||{},dAds:ss(u.dads)||{},pAds:ss(u.pads)||{},mAds:ss(u.mads)||{},rAds:ss(u.rads)||{},lp:ss(u.lp)||{},extsc:ss(u.extsc)||{},evnts:ss(u.evnts)||{},dp:ss(u.dp)||{},adflw:ss(u.adflw)||{},afgszf:ss(u.afgszf)||{},fllc:ss(u.fllc)||{},lotm:ss(u.lotm)||{},t4rc:ss(u.t4rc)||{},midroll_plus:ss(u.midroll_plus)||{},gmky:ss(u.gmky)||{}};aA("7.7");var p=h(M(i),l);aA("7.8"),p.afg_disabled=!1===(null===(s=p.sdk)||void 0===s||null===(c=s.afg)||void 0===c?void 0:c.enabled),p.url=o,function(){t(this,a),void 0!==us.afgEnabled&&(p.afg_disabled=!us.afgEnabled),void 0!==us.promoEnabled&&(p.promo=p.promo||{},p.promo=Zw(Zw({},p.promo),{},{rainbow:{enabled:us.promoEnabled}}))}.bind(this),aA("7.9"),null!==(d=p.pAds)&&void 0!==d&&d.enabled&&(p.preroll=!0),aA("7.10"),eA.send("gdfw.success",{message:"success"}),e(p)}else{i.failed=!0;var f=iA[iA.length-1];eA.send("gdfw.err",{message:"".concat(f,": json error")}),e(i)}}.bind(this)).catch(function(n){t(this,r);var a=iA[iA.length-1];eA.send("gdfw.err",{message:"".concat(a,": ").concat(n.message?n.message:n)}),i.failed=!0,e(i)}.bind(this))}catch(t){var c=iA[iA.length-1];eA.send("gdfw.err",{message:"".concat(c,": global ").concat(t.message?t.message:t)}),i.failed=!0,e(i)}}.bind(this))},uA=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sA();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 t.apply(this,arguments)}}(),lA=function(){var t=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sA();case 2:return n=e.sent,i=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),hA=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sA();case 2:return n=e.sent,e.next=5,uA();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 t.apply(this,arguments)}}(),pA=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sA();case 2:return c=e.sent,d=!(null==c||null===(t=c.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==c||null===(n=c.extsc)||void 0===n?void 0:n.path:"",name:d?null==c||null===(i=c.extsc)||void 0===i?void 0:i.name:"",ref:d?null==c||null===(a=c.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==c||null===(s=c.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==c||null===(o=c.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),fA=function(){var n=e(r.mark((function e(){var n,i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pA();case 2:if((n=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return i=n.path,a=n.name,s=n.ref,e.prev=6,o={},e.next=10,f(i,a,{error_prefix:"Blocked:",exists:function(){return t(this,c),!!s&&!!window[s]}.bind(this),attrs:o});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",a,e.t0),p("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return n.apply(this,arguments)}}(),mA=!1,gA=!1,vA=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,c,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!mA){e.next=4;break}return e.abrupt("return",n(gA));case 4:mA=!0;case 5:return e.next=7,pA();case 7:if((a=e.sent).enabled){e.next=10;break}return e.abrupt("return",n(!1));case 10:if(s=a.loadedFlag,!(o=a.loadedFlagCheck)||s){e.next=13;break}return e.abrupt("return",n(!1));case 13:if(o){e.next=16;break}return gA=!0,e.abrupt("return",n(!0));case 16:c=!0,setTimeout(function(){t(this,u),c&&(c=!1,mA=!0,n(!1))}.bind(this),5e3),d=setInterval(function(){t(this,u),c&&o&&window[s]?(c=!1,mA=!0,gA=!0,clearInterval(d),n(!0)):c||clearInterval(d)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},bA=Ja,yA=um,_A=ne,wA=yt,AA=Ye,kA=af,EA=hv,xA=fr,SA=yA&&yA.prototype;if(bA({target:"Promise",proto:!0,real:!0,forced:!!yA&&_A((function(){SA.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=kA(this,wA("Promise")),n=AA(e);return this.then(n?function(n){return EA(t,e()).then((function(){return n}))}:e,n?function(n){return EA(t,e()).then((function(){throw n}))}:e)}}),AA(yA)){var RA=wA("Promise").prototype.finally;SA.finally!==RA&&xA(SA,"finally",RA,{unsafe:!0})}var DA="\t\n\v\f\r \u2028\u2029\ufeff",TA=he,OA=ps,PA=DA,IA=ce("".replace),CA=RegExp("^["+PA+"]+"),LA=RegExp("(^|[^"+PA+"])["+PA+"]+$"),UA=function(e){return function(t){var n=OA(TA(t));return 1&e&&(n=IA(n,CA,"")),2&e&&(n=IA(n,LA,"$1")),n}},MA={start:UA(1),end:UA(2),trim:UA(3)},jA=pn.PROPER,BA=ne,NA=DA,GA=MA.trim;Ja({target:"String",proto:!0,forced:function(e){return BA((function(){return!!NA[e]()||"
"!=="
"[e]()||jA&&NA[e].name!==e}))}("trim")},{trim:function(){return GA(this)}});var FA=Ja,qA=Ti.find,VA=pp,HA="find",zA=!0;HA in[]&&Array(1)[HA]((function(){zA=!1})),FA({target:"Array",proto:!0,forced:zA},{find:function(e){return qA(this,e,arguments.length>1?arguments[1]:void 0)}}),VA(HA);var WA=Ye,KA=nt,$A=Cl,QA=Xe.f,JA=Ze,YA=z,XA=ce,ZA=qa,ek=function(e,t,n){var r,i;return $A&&WA(r=t.constructor)&&r!==n&&KA(i=r.prototype)&&i!==n.prototype&&$A(e,i),e},tk=Rn,nk=ra.f,rk=_t,ik=Zv,ak=ps,sk=Ab,ok=mh,ck=function(e,t,n){n in e||QA(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},dk=fr,uk=ne,lk=be,hk=Wn.enforce,pk=Kp,fk=bh,mk=wh,gk=ze("match"),vk=YA.RegExp,bk=vk.prototype,yk=YA.SyntaxError,_k=XA(bk.exec),wk=XA("".charAt),Ak=XA("".replace),kk=XA("".indexOf),Ek=XA("".slice),xk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Sk=/a/g,Rk=/a/g,Dk=new vk(Sk)!==Sk,Tk=ok.MISSED_STICKY,Ok=ok.UNSUPPORTED_Y,Pk=JA&&(!Dk||Tk||fk||mk||uk((function(){return Rk[gk]=!1,vk(Sk)!=Sk||vk(Rk)==Rk||"/a/i"!=vk(Sk,"i")})));if(ZA("RegExp",Pk)){for(var Ik=function(e,t){var n,r,i,a,s,o,c=rk(bk,this),d=ik(e),u=void 0===t,l=[],h=e;if(!c&&d&&u&&e.constructor===Ik)return e;if((d||rk(bk,e))&&(e=e.source,u&&(t=sk(h))),e=void 0===e?"":ak(e),t=void 0===t?"":ak(t),h=e,fk&&"dotAll"in Sk&&(r=!!t&&kk(t,"s")>-1)&&(t=Ak(t,/s/g,"")),n=t,Tk&&"sticky"in Sk&&(i=!!t&&kk(t,"y")>-1)&&Ok&&(t=Ak(t,/y/g,"")),mk&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,c=!1,d=0,u="";r<=n;r++){if("\\"===(t=wk(e,r)))t+=wk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:_k(xk,Ek(e,r+1))&&(r+=2,c=!0),i+=t,d++;continue;case">"===t&&c:if(""===u||lk(s,u))throw new yk("Invalid capture group name");s[u]=!0,a[a.length]=[u,d],c=!1,u="";continue}c?u+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=ek(vk(e,t),c?this:bk,Ik),(r||i||l.length)&&(o=hk(s),r&&(o.dotAll=!0,o.raw=Ik(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=wk(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+wk(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{tk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Ck=nk(vk),Lk=0;Ck.length>Lk;)ck(Ik,vk,Ck[Lk++]);bk.constructor=Ik,Ik.prototype=bk,dk(YA,"RegExp",Ik,{constructor:!0})}pk("RegExp");var Uk=Ja,Mk=Vr,jk=Ki,Bk=Pi,Nk=ce([].join);Uk({target:"Array",proto:!0,forced:Mk!=Object||!Bk("join",",")},{join:function(e){return Nk(jk(this),void 0===e?",":e)}});var Gk=Ti.map;Ja({target:"Array",proto:!0,forced:!Td("map")},{map:function(e){return Gk(this,e,arguments.length>1?arguments[1]:void 0)}});var Fk=Ze,qk=ce,Vk=gt,Hk=ne,zk=Za,Wk=Aa,Kk=Fi,$k=me,Qk=Vr,Jk=Object.assign,Yk=Object.defineProperty,Xk=qk([].concat),Zk=!Jk||Hk((function(){if(Fk&&1!==Jk({b:1},Jk(Yk({},"a",{enumerable:!0,get:function(){Yk(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!=Jk({},e)[n]||zk(Jk({},t)).join("")!=r}))?function(e,t){for(var n=$k(e),r=arguments.length,i=1,a=Wk.f,s=Kk.f;r>i;)for(var o,c=Qk(arguments[i++]),d=a?Xk(zk(c),a(c)):zk(c),u=d.length,l=0;u>l;)o=d[l++],Fk&&!Vk(s,c,o)||(n[o]=c[o]);return n}:Jk,eE=Zk;Ja({target:"Object",stat:!0,arity:2,forced:Object.assign!==eE},{assign:eE});var tE,nE=ce,rE=2147483647,iE=/[^\0-\u007E]/,aE=/[.\u3002\uFF0E\uFF61]/g,sE="Overflow: input needs wider integers to process",oE=RangeError,cE=nE(aE.exec),dE=Math.floor,uE=String.fromCharCode,lE=nE("".charCodeAt),hE=nE([].join),pE=nE([].push),fE=nE("".replace),mE=nE("".split),gE=nE("".toLowerCase),vE=function(e){return e+22+75*(e<26)},bE=function(e,t,n){var r=0;for(e=n?dE(e/700):e>>1,e+=dE(e/t);e>455;)e=dE(e/35),r+=36;return dE(r+36*e/(e+38))},yE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=lE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=lE(e,n++);56320==(64512&a)?pE(t,((1023&i)<<10)+(1023&a)+65536):(pE(t,i),n--)}else pE(t,i)}return t}(e);var n,r,i=e.length,a=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&pE(t,uE(r));var c=t.length,d=c;for(c&&pE(t,"-");d<i;){var u=rE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=d+1;if(u-a>dE((rE-s)/l))throw oE(sE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>rE)throw oE(sE);if(r==a){for(var h=s,p=36;;){var f=p<=o?1:p>=o+26?26:p-o;if(h<f)break;var m=h-f,g=36-f;pE(t,uE(vE(f+m%g))),h=dE(m/g),p+=36}pE(t,uE(vE(h))),o=bE(s,l,d==c),s=0,d++}}s++,a++}return hE(t,"")},_E=Ja,wE=Ze,AE=$y,kE=z,EE=Br,xE=ce,SE=fr,RE=no,DE=Jp,TE=be,OE=Zk,PE=Uu,IE=$s,CE=Zu.codeAt,LE=function(e){var t,n,r=[],i=mE(fE(gE(e),aE,"."),".");for(t=0;t<i.length;t++)n=i[t],pE(r,cE(iE,n)?"xn--"+yE(n):n);return hE(r,".")},UE=ps,ME=bo,jE=of,BE=mw,NE=Wn,GE=NE.set,FE=NE.getterFor("URL"),qE=BE.URLSearchParams,VE=BE.getState,HE=kE.URL,zE=kE.TypeError,WE=kE.parseInt,KE=Math.floor,$E=Math.pow,QE=xE("".charAt),JE=xE(/./.exec),YE=xE([].join),XE=xE(1..toString),ZE=xE([].pop),ex=xE([].push),tx=xE("".replace),nx=xE([].shift),rx=xE("".split),ix=xE("".slice),ax=xE("".toLowerCase),sx=xE([].unshift),ox="Invalid scheme",cx="Invalid host",dx="Invalid port",ux=/[a-z]/i,lx=/[\d+-.a-z]/i,hx=/\d/,px=/^0x/i,fx=/^[0-7]+$/,mx=/^\d+$/,gx=/^[\da-f]+$/i,vx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,bx=/[\0\t\n\r #/:<>?@[\\\]^|]/,yx=/^[\u0000-\u0020]+/,_x=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,wx=/[\t\n\r]/g,Ax=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)sx(t,e%256),e=KE(e/256);return YE(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=XE(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},kx={},Ex=OE({},kx,{" ":1,'"':1,"<":1,">":1,"`":1}),xx=OE({},Ex,{"#":1,"?":1,"{":1,"}":1}),Sx=OE({},xx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Rx=function(e,t){var n=CE(e,0);return n>32&&n<127&&!TE(t,e)?e:encodeURIComponent(e)},Dx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Tx=function(e,t){var n;return 2==e.length&&JE(ux,QE(e,0))&&(":"==(n=QE(e,1))||!t&&"|"==n)},Ox=function(e){var t;return e.length>1&&Tx(ix(e,0,2))&&(2==e.length||"/"===(t=QE(e,2))||"\\"===t||"?"===t||"#"===t)},Px=function(e){return"."===e||"%2e"===ax(e)},Ix={},Cx={},Lx={},Ux={},Mx={},jx={},Bx={},Nx={},Gx={},Fx={},qx={},Vx={},Hx={},zx={},Wx={},Kx={},$x={},Qx={},Jx={},Yx={},Xx={},Zx=function(e,t,n){var r,i,a,s=UE(e);if(t){if(i=this.parse(s))throw zE(i);this.searchParams=null}else{if(void 0!==n&&(r=new Zx(n,!0)),i=this.parse(s,null,r))throw zE(i);(a=VE(new qE)).bindURL(this),this.searchParams=a}};Zx.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,c=this,d=t||Ix,u=0,l="",h=!1,p=!1,f=!1;for(e=UE(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=tx(e,yx,""),e=tx(e,_x,"$1")),e=tx(e,wx,""),r=PE(e);u<=r.length;){switch(i=r[u],d){case Ix:if(!i||!JE(ux,i)){if(t)return ox;d=Lx;continue}l+=ax(i),d=Cx;break;case Cx:if(i&&(JE(lx,i)||"+"==i||"-"==i||"."==i))l+=ax(i);else{if(":"!=i){if(t)return ox;l="",d=Lx,u=0;continue}if(t&&(c.isSpecial()!=TE(Dx,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&Dx[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?d=zx:c.isSpecial()&&n&&n.scheme==c.scheme?d=Ux:c.isSpecial()?d=Nx:"/"==r[u+1]?(d=Mx,u++):(c.cannotBeABaseURL=!0,ex(c.path,""),d=Jx)}break;case Lx:if(!n||n.cannotBeABaseURL&&"#"!=i)return ox;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=IE(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,d=Xx;break}d="file"==n.scheme?zx:jx;continue;case Ux:if("/"!=i||"/"!=r[u+1]){d=jx;continue}d=Gx,u++;break;case Mx:if("/"==i){d=Fx;break}d=Qx;continue;case jx:if(c.scheme=n.scheme,i==tE)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=IE(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Bx;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=IE(n.path),c.query="",d=Yx;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=IE(n.path),c.path.length--,d=Qx;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=IE(n.path),c.query=n.query,c.fragment="",d=Xx}break;case Bx:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,d=Qx;continue}d=Fx}else d=Gx;break;case Nx:if(d=Gx,"/"!=i||"/"!=QE(l,u+1))continue;u++;break;case Gx:if("/"!=i&&"\\"!=i){d=Fx;continue}break;case Fx:if("@"==i){h&&(l="%40"+l),h=!0,a=PE(l);for(var m=0;m<a.length;m++){var g=a[m];if(":"!=g||f){var v=Rx(g,Sx);f?c.password+=v:c.username+=v}else f=!0}l=""}else if(i==tE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==l)return"Invalid authority";u-=PE(l).length+1,l="",d=qx}else l+=i;break;case qx:case Vx:if(t&&"file"==c.scheme){d=Kx;continue}if(":"!=i||p){if(i==tE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==l)return cx;if(t&&""==l&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(l))return s;if(l="",d=$x,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return cx;if(s=c.parseHost(l))return s;if(l="",d=Hx,t==Vx)return}break;case Hx:if(!JE(hx,i)){if(i==tE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=l){var b=WE(l,10);if(b>65535)return dx;c.port=c.isSpecial()&&b===Dx[c.scheme]?null:b,l=""}if(t)return;d=$x;continue}return dx}l+=i;break;case zx:if(c.scheme="file","/"==i||"\\"==i)d=Wx;else{if(!n||"file"!=n.scheme){d=Qx;continue}if(i==tE)c.host=n.host,c.path=IE(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=IE(n.path),c.query="",d=Yx;else{if("#"!=i){Ox(YE(IE(r,u),""))||(c.host=n.host,c.path=IE(n.path),c.shortenPath()),d=Qx;continue}c.host=n.host,c.path=IE(n.path),c.query=n.query,c.fragment="",d=Xx}}break;case Wx:if("/"==i||"\\"==i){d=Kx;break}n&&"file"==n.scheme&&!Ox(YE(IE(r,u),""))&&(Tx(n.path[0],!0)?ex(c.path,n.path[0]):c.host=n.host),d=Qx;continue;case Kx:if(i==tE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Tx(l))d=Qx;else if(""==l){if(c.host="",t)return;d=$x}else{if(s=c.parseHost(l))return s;if("localhost"==c.host&&(c.host=""),t)return;l="",d=$x}continue}l+=i;break;case $x:if(c.isSpecial()){if(d=Qx,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=tE&&(d=Qx,"/"!=i))continue}else c.fragment="",d=Xx;else c.query="",d=Yx;break;case Qx:if(i==tE||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=ax(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||ex(c.path,"")):Px(l)?"/"==i||"\\"==i&&c.isSpecial()||ex(c.path,""):("file"==c.scheme&&!c.path.length&&Tx(l)&&(c.host&&(c.host=""),l=QE(l,0)+":"),ex(c.path,l)),l="","file"==c.scheme&&(i==tE||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)nx(c.path);"?"==i?(c.query="",d=Yx):"#"==i&&(c.fragment="",d=Xx)}else l+=Rx(i,xx);break;case Jx:"?"==i?(c.query="",d=Yx):"#"==i?(c.fragment="",d=Xx):i!=tE&&(c.path[0]+=Rx(i,kx));break;case Yx:t||"#"!=i?i!=tE&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Rx(i,kx)):(c.fragment="",d=Xx);break;case Xx:i!=tE&&(c.fragment+=Rx(i,Ex))}u++}},parseHost:function(e){var t,n,r;if("["==QE(e,0)){if("]"!=QE(e,e.length-1))return cx;if(t=function(e){var t,n,r,i,a,s,o,c=[0,0,0,0,0,0,0,0],d=0,u=null,l=0,h=function(){return QE(e,l)};if(":"==h()){if(":"!=QE(e,1))return;l+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=n=0;n<4&&JE(gx,h());)t=16*t+WE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,d>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;l++}if(!JE(hx,h()))return;for(;JE(hx,h());){if(a=WE(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}c[d]=256*c[d]+i,2!=++r&&4!=r||d++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;l++,u=++d}}if(null!==u)for(s=d-u,d=7;0!=d&&s>0;)o=c[d],c[d--]=c[u+s-1],c[u+--s]=o;else if(8!=d)return;return c}(ix(e,1,-1)),!t)return cx;this.host=t}else if(this.isSpecial()){if(e=LE(e),JE(vx,e))return cx;if(t=function(e){var t,n,r,i,a,s,o,c=rx(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(a=10,i.length>1&&"0"==QE(i,0)&&(a=JE(px,i)?16:8,i=ix(i,8==a?1:2)),""===i)s=0;else{if(!JE(10==a?mx:8==a?fx:gx,i))return e;s=WE(i,a)}ex(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=$E(256,5-t))return null}else if(s>255)return null;for(o=ZE(n),r=0;r<n.length;r++)o+=n[r]*$E(256,3-r);return o}(e),null===t)return cx;this.host=t}else{if(JE(bx,e))return cx;for(t="",n=PE(e),r=0;r<n.length;r++)t+=Rx(n[r],kx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return TE(Dx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Tx(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,s=e.path,o=e.query,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=n+(r?":"+r:"")+"@"),d+=Ax(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?s[0]:s.length?"/"+YE(s,"/"):"",null!==o&&(d+="?"+o),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw zE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new eS(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Ax(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(UE(e)+":",Ix)},getUsername:function(){return this.username},setUsername:function(e){var t=PE(UE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Rx(t[n],Sx)}},getPassword:function(){return this.password},setPassword:function(e){var t=PE(UE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Rx(t[n],Sx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Ax(e):Ax(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,qx)},getHostname:function(){var e=this.host;return null===e?"":Ax(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Vx)},getPort:function(){var e=this.port;return null===e?"":UE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=UE(e))?this.port=null:this.parse(e,Hx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+YE(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,$x))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=UE(e))?this.query=null:("?"==QE(e,0)&&(e=ix(e,1)),this.query="",this.parse(e,Yx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=UE(e))?("#"==QE(e,0)&&(e=ix(e,1)),this.fragment="",this.parse(e,Xx)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var eS=function(e){var t=DE(this,tS),n=jE(arguments.length,1)>1?arguments[1]:void 0,r=GE(t,new Zx(e,!1,n));wE||(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())},tS=eS.prototype,nS=function(e,t){return{get:function(){return FE(this)[e]()},set:t&&function(e){return FE(this)[t](e)},configurable:!0,enumerable:!0}};if(wE&&(RE(tS,"href",nS("serialize","setHref")),RE(tS,"origin",nS("getOrigin")),RE(tS,"protocol",nS("getProtocol","setProtocol")),RE(tS,"username",nS("getUsername","setUsername")),RE(tS,"password",nS("getPassword","setPassword")),RE(tS,"host",nS("getHost","setHost")),RE(tS,"hostname",nS("getHostname","setHostname")),RE(tS,"port",nS("getPort","setPort")),RE(tS,"pathname",nS("getPathname","setPathname")),RE(tS,"search",nS("getSearch","setSearch")),RE(tS,"searchParams",nS("getSearchParams")),RE(tS,"hash",nS("getHash","setHash"))),SE(tS,"toJSON",(function(){return FE(this).serialize()}),{enumerable:!0}),SE(tS,"toString",(function(){return FE(this).serialize()}),{enumerable:!0}),HE){var rS=HE.createObjectURL,iS=HE.revokeObjectURL;rS&&SE(eS,"createObjectURL",EE(rS,HE)),iS&&SE(eS,"revokeObjectURL",EE(iS,HE))}ME(eS,"URL"),_E({global:!0,constructor:!0,forced:!AE,sham:!wE},{URL:eS});var aS=function(){function e(t){D(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return R(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 n={},r=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,i=new O(location.href,!0);for(var a in i.query)n[a]=i.query[a];return Object.keys(n).filter(function(n){var r=this;return t(this,e),this.customParamKeys.some(function(e){return t(this,r),e===n}.bind(this))}.bind(this)).length>0||r?(console.log("custom-params",n,r),n):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),sS=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(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 n=document.createElement("div");this.adResumeButton=n,n.id="gd__resume__button",n.setAttribute("title","Resume"),this.addStyles(),n.classList.add("gd__resume__button"),n.addEventListener("click",function(){t(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(n);var r=document.createElement("div");this.adResumeButtonOverlay=r,r.id="gd__resume__button__overlay",r.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(r)}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}(),oS=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),cS=function(){function e(t){D(this,e),this.adContainer=t}return R(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{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}(),dS=function(){function e(t){D(this,e),this.adContainer=t}return R(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}(),uS=function(e){if(!e)return!1;var t=lS.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)},lS=Object.prototype.toString;function hS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fS(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}var mS,gS="13998",vS="_cc".concat(gS),bS=["https://tags.crwdcntrl.net/c/".concat(gS,"/cc.js?ns=").concat(vS)],yS=function(){return!!mS&&"function"==typeof mS.bcpf&&"function"==typeof mS.add},_S=function(e,t){try{if(!yS())return;mS.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},wS=function(e,t){try{if(!yS())return;mS.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},AS=function(e){var n=this;try{_S("act","play"),_S("med","game"),"complete"===document.readyState?mS.bcpf():mS.bcp(),e.tags.forEach(function(e){t(this,n),wS("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),wS("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},kS=function(){window.addEventListener("load",(function(){rA.once("game-data-ready",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=dy&&dy.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,uA();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(i=t.lotm)&&void 0!==i&&i.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,f(bS[0],"LOTCC_".concat(gS),{alternates:bS});case 16:"object"===n(window[vS])&&(mS=window[vS]),yS()&&AS(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(e){return t.apply(this,arguments)}}())}))},ES=function(){wS("genp","ad video"),wS("act","ad impression")},xS=function(){wS("act","ad skipped")},SS=function(){wS("act","ad click")},RS=function(){wS("act","ad complete")},DS=new Ew,TS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},OS=function(e,n){var r=this,i=function(e,t){var n=DS.get("partner.url.value"),r=TS[t],i="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(i),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,n),a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(i[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},PS=(new Ew).get("partner.domain.value"),IS=["latimes.com"],CS={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&IS.some(function(e){return t(this,n),e===PS}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return OS(n,e)}}[PS](e)}(e,t)}};function LS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function US(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var MS=new j,jS=null,BS=function(){function n(e,r,i){var a=this;if(D(this,n),jS)return jS;jS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?h(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new _,this.audioAdLabel=new cS(window.document.body),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=i.parentDomain,this.topDomain=i.topDomain,this.parentURL=i.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=w(),this.atom_display,this.adType_="",this.isAudioAd=!1,this.clickCount={midroll:0,preroll:0,rewarded:0},this.audioAdLabel.add(),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=""!==e?document.getElementById(e):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,c=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:c,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){t(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){t(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var i,a,s,o,c,d,u,l,p,A,k,E,x,S,I,C,L,U,j,q,V,H,z;return R(n,[{key:"start",value:(z=e(r.mark((function n(){var i,a,s,o=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_afg_script({adsense_channel:"4089988593"});case 2:case"end":return e.stop()}}),e)}))));case 3:return i=n.sent,this.afgInitSuccess=i.success,n.next=7,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_hl_script();case 2:return e.next=4,o._init_ima_script();case 4:o._createPlayer(),o._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(a=n.sent,this.imaInitSuccess=a.success,s=[],this.afgInitSuccess||s.push(i.error),this.imaInitSuccess||s.push(a.error),!(s.length>0)){n.next=14;break}throw s[0];case 14:window.eventTest=function(e){t(this,o),this._broadcast(e,{message:"",status:"success"})}.bind(this),n.next=21;break;case 17:throw n.prev=17,n.t0=n.catch(0),ds("gd-adflow error on ads.start",n.t0),new Error(n.t0);case 21:case"end":return n.stop()}}),n,this,[[0,17]])}))),function(){return z.apply(this,arguments)})},{key:"adSystemInitialize",value:(H=e(r.mark((function e(t){var n;return r.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 H.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:(V=e(r.mark((function e(t){var n,i,a,s,o,c,d,u,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,c=this.nextAdPosition(n),e.next=6,this._create_dp_context(c,i);case 6:return d=e.sent,o?(this.gameData,u=o[c]||o.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),l=100*d.floor_price,d.floor_price,h=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,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 V.apply(this,arguments)})},{key:"_getAdVast",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,d,u,l,h,p,f,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m.available&&m.getBoolean("gd_debug_ex")&&m.getBoolean("gd_tag"))){e.next=6;break}return o=a.IMASampleTags[n],c=Math.floor(Math.random()*o.length),d=o[c],s({url:d}),e.abrupt("return");case 6:if("spil"!==i.adapter){e.next=8;break}return e.abrupt("return",s(a._getSpilUrl({adType:n,options:i})));case 8:if(void 0!==window.idhb.requestAds){e.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return e.prev=10,u=a.nextAdPosition(n),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&N(l.preroll)?l=l.preroll:"midroll"===u&&N(l.midroll)?l=l.midroll:"rewarded"===u&&N(l.rewarded)&&(l=l.rewarded),h="","audio"===i.adapter?(a.isAudioAd=!0,h="midrollaudio"):(a.isAudioAd=!1,h="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),e.next=19,window.idhb.isLoaded();case 19:return e.next=21,a._create_dp_context(u,i);case 21:p=e.sent,cs("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(US(US({},f),{},{adaptor_order:i.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.requestAds({slots:T({},h,{bidFloor:(null==p?void 0:p.floor_price)||void 0}),callback:function(e,n){var r=this;t(this,g),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:US(US({},window.idhb.getAdserverTargetingForAdSlot(h)),{},{tnl_ad_pos:u,tnl_asset_id:a.gameData.gameId}),url:e,dp:p,hl:n};a._extend_hl_url(i),s(i)}.bind(this)}),e.next=33;break;case 30:throw e.prev=30,e.t0=e.catch(10),new Error(e.t0);case 33:case"end":return e.stop()}}),e,this,[[10,30]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===g.Rewarded)return this.adRewardedCount++,"rewarded";if(e===g.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===g.Rewarded?"rewarded":e===g.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===g.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===g.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,n){var r=this;return n=n||{},new Promise(function(i){var a=this;if(t(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var s,o,c=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,n),l=US(US({},n),{},{adTag:u,tnl_ad_pos:c});this.adCounter[c]=this.adCounter[c]||0,this.adCounter[c]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!u.bidder&&(h.adtag_url=u.url,this._extend_dp_with_adsense(h,p,null==e?void 0:e.tnl_keys));var f=this._isVMAP(c);(function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):u.url="original_broken",null==h||h.adtag_url,null==h||h.fallback_url,u.url),f=!1}).bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)d.adTagUrl=m;else if(f){var g=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,i=Date.now(),a=new O(e.adtag_url_1,!0);a.query=pS(pS({},a.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:i,output:"xml_vast3"});var s=a.toString(),o=new O(e.adtag_url_2,!0);o.query=pS(pS({},o.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++i,output:"xml_vast3"});var c=o.toString(),d=Date.now();return'<?xml version="1.0" encoding="UTF-8"?>\n<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-1">\n <vmap:AdSource id="'.concat(d++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(fS({id:d++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url,fallback_url:null==n?void 0:n.fallback_url,fallback_imp_url:null==n?void 0:n.fallback_imp_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(d++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(fS({id:d++,adtag_url:c,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url,fallback_url:null==r?void 0:r.fallback_url,fallback_imp_url:null==r?void 0:r.fallback_imp_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:h,adtag:u,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(c)}));d.adsResponse=g}else if(h&&p.bidFloorApplied){var v=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(h);d.adsResponse=v}else if(h&&h.fallback_url){var b=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()}(h);d.adsResponse=b}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(n.autoplayAllowed),d.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(d,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=CS.exist(this.gameData)&&CS.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:(q=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):B.video({inline:!0,muted:!1}).then(function(n){t(this,i);var r=n.result;n.error,e(!0===r?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(j=e(r.mark((function e(){var t;return r.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 j.apply(this,arguments)})},{key:"startAd",value:(U=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.adType,a=n.params,this.adType_=i,this.adContext=US(US({},a),{},{adType:i}),"promo"!==(null==a?void 0:a.adapter)){e.next=5;break}return e.abrupt("return",this._startPromo(a,i));case 5:if("adsense"!==(null==a?void 0:a.adapter)){e.next=29;break}if(i!==g.Interstitial){e.next=22;break}if("preroll"!==(null==a?void 0:a.position)){e.next=11;break}return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 11:if("start"!==(null==a?void 0:a.position)){e.next=15;break}return e.abrupt("return",this._startAdsensePlacementStart(n));case 15:if("next"!==(null==a?void 0:a.position)){e.next=19;break}return e.abrupt("return",this._startAdsensePlacementNext(n));case 19:return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 20:e.next=27;break;case 22:if(i!==g.Rewarded){e.next=26;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(n));case 26:case 39:throw new Error("Unsupported ad type");case 27:e.next=40;break;case 29:if(!["ima","spil","audio"].some(function(e){return t(this,s),e===(null==a?void 0:a.adapter)}.bind(this))){e.next=40;break}if(i!==g.Interstitial){e.next=35;break}return e.abrupt("return",this._startInterstitialAd(a));case 35:if(i!==g.Rewarded){e.next=39;break}return e.abrupt("return",this._startRewardedAd(a));case 40:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"preloadAd",value:(L=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==g.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==g.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 L.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,n=function(){t(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new sS(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new oS(this.adContainer,n),this.rewardedLabel.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(C=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,d,u,l,h,p,f,m,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(c=i?i.containerId:null)||s("Container id is not specified"),d=document.getElementById(c),document.getElementById(c)||s("No container is found with this id - ".concat(c)),void 0===window.idhb.requestAds&&s("Prebid.js wrapper script hit an error or didn't exist!"),u=i.slotId?i.slotId:"gd__banner@".concat(c),document.getElementById(u)||(l="\n .gd__banner{\n z-index: ".concat(v.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((h=document.createElement("style")).type="text/css",h.id="gd__banner__style",h.styleSheet?h.styleSheet.cssText=l:h.appendChild(document.createTextNode(l)),d.appendChild(h)),(p=document.createElement("div")).id=u,p.classList.add("gd__banner"),d.appendChild(p)),e.next=11,a._create_dp_display_context();case 11:a.atom_display=e.sent,a.atom_display,null!==(o=a.atom_display)&&void 0!==o&&o.params&&window.idhb.setAdserverTargeting(null===(f=a.atom_display)||void 0===f?void 0:f.params),(m={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:m,callback:function(e){t(this,g),JSON.stringify(e,null,2)}.bind(this)}),n(),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(0),console.log("display_test error",e.t0),s(e.t0.message||e.t0);case 24:case"end":return e.stop()}}),e,this,[[0,20]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return C.apply(this,arguments)})},{key:"_startInterstitialAd",value:(I=e(r.mark((function e(n){var i,a,s,o=this;return r.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(t(this,o),us.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 i=e.sent,e.next=13,this._loadInterstitialAd(US(US({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.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 I.apply(this,arguments)})},{key:"_startPromo",value:(S=e(r.mark((function e(t,n){var i,a,s;return r.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 i=e.sent,e.next=11,this._loadPromo(US(US({},i),t),n);case 11:if(a=e.sent,s=a.success,a.args,s){e.next=16;break}return e.abrupt("return");case 16:i.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 S.apply(this,arguments)})},{key:"_loadPromo",value:(x=e(r.mark((function e(t,n){var i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,i=this.nextAdPosition(n),a=this._create_promo_context(i),this._requestPromo(a,US({adType:g.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 x.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(E=e(r.mark((function e(t){var n;return r.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(g.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,US({adType:g.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 E.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var s=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!0,args:e})}.bind(this),1)}.bind(this),o=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",s,a),this.eventBus.subscribe("AD_SDK_CANCELED",o,a),this.eventBus.subscribe("AD_ERROR",o,a)}.bind(this))}},{key:"_startRewardedAd",value:(k=e(r.mark((function e(n){var i,a,s,o=this;return r.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(t(this,o),us.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 i=e.sent,e.next=13,this._loadRewardedAd(US(US({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.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 k.apply(this,arguments)})},{key:"_loadRewardedAd",value:(A=e(r.mark((function e(t){var n;return r.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(g.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,US({adType:g.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 A.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(p=e(r.mark((function e(){return r.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(g.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return p.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(l=e(r.mark((function e(){return r.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(g.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return l.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var n=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var r=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var i=this._isT4R(e),a=this._getT4ROptions(e);if("loaded"===r)this.activeAdContainer.style.opacity=i?.001:1,i&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new dS(this.adContainer),this.t4rButton.add()),i&&this.adsManager.setVolume(0),i&&this._broadcast("AD_T4R"),i&&setTimeout(function(){t(this,n),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"===r||"first_quartile"===r){if(i&&"click"===r){var s,o=null===(s=this._adrequest_user_context)||void 0===s?void 0:s.tnl_ad_pos;this.clickCount[o]++}this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}}}},{key:"_createPlayer",value:function(){var e=this,n=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=v.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 r=document.createElement("video");r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline",!0),r.id="".concat(this.prefix,"advertisement_video"),r.style.position="absolute",r.style.backgroundColor="#000000",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.video_ad_player=r,this.adContainer.appendChild(r);var i=document.createElement("div");i.id="".concat(this.prefix,"advertisement_slot"),i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",this.adContainerInner=i,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(i),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(i),n.appendChild(this.adContainer)),this.addAdResume(),this.activeAdContainer.style.visibility="hidden";var a=function(){t(this,e);var n=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:n,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",a),window.document.addEventListener("DOMContentLoaded",a)}},{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 n=this,r=new google.ima.AdsRenderingSettings;r.autoAlign=!1,r.enablePreloading=!1,r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.useStyledNonLinearAds=!0,r.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,r),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(){t(this,n),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 i=new Date,a=i.getHours(),s=i.getDate(),o=i.getMonth(),c=i.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(s," m").concat(o," y").concat(c)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r=this,i=new Date,a=i.getHours(),s=i.getDate(),o=i.getMonth(),c=i.getFullYear(),d=b(google.ima.AdEvent.Type,e.type),u=!1,l=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",h=!l.startsWith("image")&&!l.startsWith("text");this._sendIMAEventsToHB(e);var p=document.getElementById("game"),f="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:f="Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.";break;case google.ima.AdEvent.Type.AD_METADATA:f="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(u=!0),f="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:f="Fired when the ad is clicked.";var m=e.getAd().getContentType();this._show({mode:"click",contentType:m}),SS();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),u=this._is_completed(e.getAd()),f="Fired when the ad completes playing.",this.adType_===g.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(p.style.display="none"),this.contentPaused=!0,f="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(p.style.display="block"),f="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?u=!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:f="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:f="Fired when the ad playhead crosses first quartile.";var v=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:v});break;case google.ima.AdEvent.Type.IMPRESSION:f="Fired when the impression URL has been pinged.",e.getAd();break;case google.ima.AdEvent.Type.INTERACTION:f="Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.";break;case google.ima.AdEvent.Type.LINEAR_CHANGED:f="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var y=e.getAd().getContentType();f=y,this._show({mode:"loaded",contentType:y});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(f=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:f="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:h&&this.adResume.show(),f="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:f="Fired when the ad is resumed.",h&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:f="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:u=this._is_completed(e.getAd()),f="Fired when the ad is skipped by the user.",xS(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:this.adType_===g.Rewarded&&this.rewardedLabel.show(),this._hideAddResume(),f="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:f="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:u=this._is_completed(e.getAd()),f="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:f="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:f="Fired when the ad volume has been muted."}if(""!==d&&""!==f){var _=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,w=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;_||w||("CONTENT_PAUSE_REQUESTED"!==d||this.isAudioAd||this._broadcast(d,{name:d,message:f,status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(c)}}),"CONTENT_PAUSE_REQUESTED"===d&&this.isAudioAd&&this.audioAdLabel.show(),"ALL_ADS_COMPLETED"===d&&this.isAudioAd&&this.audioAdLabel.hide())}if(u&&!this.adSuccess){this.adSuccess=!0;var A=e.getAd(),k="Rainbow"===(null==A?void 0:A.getAdSystem())&&(null==A?void 0:A.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this)));null==A||A.getAdSystem(),null==A||A.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:k}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var c=e.type,d=e.url;if("none"===c||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){t(this,n)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,n){var r=this,i={type:"none"};try{var a=this.current_dp,s=a.id,o=a.error_url,c=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!n)return i={type:"imp_err",url:o};var l=e.getWrapperAdIds().some(function(e){return t(this,r),e==="".concat(s)}.bind(this)),h=e.getWrapperAdIds().some(function(e){return t(this,r),"fallback"===e}.bind(this)),p=e.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this));l&&n?i={type:"normal_imp",url:c}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:u}:h&&n&&(i={type:"fallbacj_imp",url:d})}catch(e){}return i}},{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(),i=this._getInnerErrorCode(n);MS.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,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_===g.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,n){var r=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){t(this,r),this.cancel(),this._clearSafetyTimer(n)}.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(uS(e.getInnerError)){var t=e.getInnerError();if(t)return uS(t.getErrorCode)&&uS(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,n){var r=this;if(e){var i=this.macros.transform(e,{get:function(e){if(t(this,r),n&&n.tnl_keys)return n.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in i.query||{}){var s=i.query[a];N(s)&&(i.query[a]=G.stringify(s))}var o=new O(i.url,!0);return F(o.query,i.query||{}),US({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new O(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new O(e.url,!0);if(a.query.cust_params){var s=G.parse(a.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=a}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,n,r){var i=this;if(e&&n&&e.tnl_keys){var a=this.options.vast_query;if(n.retry_on_success&&this.options.retry_on_success&&N(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&N(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M(a),N(a)){var s=r.query;if(a.$$remove){for(var o in s){new RegExp(a.$$remove,"i").test(o)&&delete s[o]}delete a.$$remove}var c=G.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in c){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete c[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(n){return t(this,i),e.tnl_keys[n.toLowerCase()]}.bind(this)});return s.cust_params=c,F(s,u),s.cust_params=G.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a=null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder;return this.msgrt.send("bidder",{message:a}),this._adrequest_user_context,'bidder:"'.concat(a,'"'),((null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[]).some(function(n){return t(this,e),n===a}.bind(this))}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isT4R",value:function(e){var t,n,r;if(!this.gameData.publishedAt)return!1;var i=new Date(this.gameData.publishedAt);if(((new Date).getTime()-i.getTime())/864e5<=10)return!1;if(this._isExcludedBidderForT4R())return this.msgrt.send("bidder.ex",{message:"true"}),!1;this.msgrt.send("bidder.ex",{message:"false"});var a,s=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[s]>=(null===(n=e.t4r[s])||void 0===n?void 0:n.count))return!1;if(null!=e&&null!==(r=e.contentType)&&void 0!==r&&r.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return s&&(null===(a=e.t4r[s])||void 0===a?void 0:a.enabled);if(null!=e&&e.contentType.startsWith("video/")){var o,c=(null===(o=e.t4r[s])||void 0===o?void 0:o.viper)||0;if(c>0){var d,u=Math.random()<c;return s&&u&&(null===(d=e.t4r[s])||void 0===d?void 0:d.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s,o,c,d,u,l,h,p,f,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===(i=r.pAds)||void 0===i||null===(a=i.vmap)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(c=this.gameData)||void 0===c||null===(d=c.mAds)||void 0===d||null===(u=d.vmap)||void 0===u?void 0:u.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),b=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?b>=(null==v?void 0:v.start):g}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,s=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,o=null!=r&&r.vast_1?void 0:i,c=null!=r&&r.vast_2?void 0:i;return{adtag_url_1:null==a?void 0:a.url,adtag_url_2:null==s?void 0:s.url,position:n,dp_1:o,dp_2:c}}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,s,o,c;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===(i=r.mAds)||void 0===i?void 0:i.vmap;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(c=o.pAds)||void 0===c?void 0:c.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(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new aS(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(P.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(s)).then(function(e){return t(this,r),e.json()}.bind(this)).then(function(e){if(t(this,r),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),n();var i=e.p/100;this.msgrt.send("dp.fp",{message:i}),n({params:{fp:i},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(s),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(s)})}.bind(this)).catch(function(e){t(this,r),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var n,r=this,i={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(encodeURIComponent(i[e]))}.bind(this)).join("&");encodeURIComponent(P.encode(JSON.stringify(i)));var s=null===(n=this.gameData.promo)||void 0===n?void 0:n.rainbow,o=null==s?void 0:s.enabled,c="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),d=o?c:void 0;return function(){t(this,r),us.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,promo_imp_blue_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,d,u,l,h,p=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a._isDP(n)){e.next=5;break}return a.msgrt.send("dp.na",{message:"rule"}),e.abrupt("return",s());case 5:c={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(d=new aS(a.gameData).checkCustomParams())&&(c.cp=d),u=encodeURIComponent(P.encode(JSON.stringify(c))),null==i||i.adapterIndex,null==i||i.isLastAdapter,l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,h=(null==l?void 0:l.enabled)&&(null==i?void 0:i.isLastAdapter)&&"rewarded"===n,null==l||l.enabled,null==i||i.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(u)).then(function(e){return t(this,p),e.json()}.bind(this)).then(function(e){if(t(this,p),!e||!e.p)return a.msgrt.send("dp.na",{message:"atom"}),s();var n=e.p/100;a.msgrt.send("dp.fp",{message:n}),s({id:Date.now(),floor_price:n,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(u,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(u),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(u),promo_url:h?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(u):void 0,promo_imp_blue_url:h?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:h?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){t(this,p),a.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),s()}.bind(this)),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),a.msgrt.send("dp.err",{message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||e.t0}),s();case 20:case"end":return e.stop()}}),e,this,[[0,16]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new O(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var i=G.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=G.stringify(i,!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 i,a=new O(e.url,!0);if(null===(i=a.query)||void 0===i||!i.cust_params)return;var s=G.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=G.stringify(s,!1),e.url=a.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(u=e(r.mark((function e(n){var i,a,s,o,c,d,u,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._getPrebidScripts(),a=i[0],s=function(){return t(this,l),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:s},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||[],(o=new URL(a)).searchParams.append("referer",window.idhb.options.configUrl),a=o.href,e.next=13,f(a,"gdsdk_prebid",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,l),window.idhb.requestAds}.bind(this)});case 13:c=y("ch",window.location.href),d=y("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},c&&(u.channel=c),d&&(u.ch_date=d),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var n=this;t(this,l);try{var r,i=e.slotId.split("@");i=1===i.length?i[0]:i[1],e.isEmpty?(null!==(r=this.atom_display)&&void 0!==r&&r.error_url&&(fetch(this.atom_display.error_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_ERROR",{message:i,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_IMPRESSION",{message:i,status:"success"}))}catch(e){}}.bind(this));case 21:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"_init_ima_script",value:(d=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=["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"],a=this.options.debug?i[0]:i[1],e.next=4,f(a,"gdsdk_ima",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,s),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"_init_afg_script",value:(c=e(r.mark((function e(n){var i,a,s,o,c=this;return r.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(o={}).crossorigin="anonymous",o["data-ad-client"]=(null==n||null===(i=n.adsense_client)||void 0===i?void 0:i.length)>0?n.adsense_client:"ca-pub-2316275586951220",o["data-ad-frequency-hint"]="30s",o.allow="autoplay",(null==n||null===(a=n.adsense_channel)||void 0===a?void 0:a.length)>0&&(o["data-ad-channel"]=n.adsense_channel),(null==n||null===(s=n.adsense_host)||void 0===s?void 0:s.length)>0&&(o["data-ad-host"]=n.adsense_host),!0===(null==n?void 0:n.adsense_adbreak_test)&&(o["data-adbreak-test"]="on"),e.next=14,f("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,c),!!window.adsbygoogle}.bind(this),attrs:o});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 c.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",i=n||!0,a=document.getElementsByClassName("adsbygoogle"),s=0;s<a.length;s++){var o,c=a[s],d=c&&(null===(o=c.children[0])||void 0===o?void 0:o.children[0]);d&&"IFRAME"===d.tagName&&d.style.height!==r&&(d.style.height=r,i&&(d.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.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(t(this,h),us.fictionalAdSenseError||n.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"),i=!1,a=function(){t(this,h),i=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),s=function(){t(this,h),i=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),o=function(){t(this,h),i=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),c=function(){t(this,h),i=!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),d=function(e){t(this,h),i=!0,e()}.bind(this),u=function(e){t(this,h),i=!0,this.resetForNext();var n="rewarded";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"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),l=function(e){window.adsbygoogle.push(e)},setTimeout(function(){t(this,h),i||(cs("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),l({type:"reward",name:"reward-in-game",beforeAd:a,afterAd:s,adDismissed:o,adViewed:c,beforeReward:d,adBreakDone:u}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return o.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(s=e(r.mark((function e(n){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.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(t(this,a),us.fictionalAdSenseError||n.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"),i=function(e){t(this,a),this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"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),r={type:"preroll",adBreakDone:i},window.adsbygoogle.push(r),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 r}),e,this,[[1,15]])}))),function(e){return s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(a=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.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(t(this,o),us.fictionalAdSenseError||n.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"),i=function(){t(this,o),this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"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),r={type:"start",name:"start-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),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 r}),e,this,[[1,17]])}))),function(e){return a.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(i=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.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(t(this,o),us.fictionalAdSenseError||n.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"),i=function(){t(this,o),this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),this.resetForNext();var n="midroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"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),r={type:"next",name:"next-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),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 r}),e,this,[[1,17]])}))),function(e){return i.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,i=n._ua,a={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:i.browser.name,brvs:i.browser.version,osnm:i.os.name,osvs:i.os.version,dvmd:i.device.model,w:r.w,h:r.h}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(P.encode(JSON.stringify(a)))))}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 Ew).get();n=US(US({},n),r),n=t?US(US({},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===g.Rewarded)t="reward";else if(n===g.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,n){var r=this,i=!1;["AD_ERROR"].some(function(n){return t(this,r),n===e}.bind(this))&&(i=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,US(US({},n),{},{skipForward:i,adPosition:a}))}}]),n}(),NS=R((function t(n){var i=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"promo",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-stone-dynamic",s=n.package_version||"1.1.1",o=n.template||"puzzle",c=n.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},Wv(this.moduleName,this.moduleConfig)})),GS=R((function t(n){var i=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"splash",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-air-dynamic",s=n.package_version||"1.2.0",o=n.template||"pluto",c=n.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},Wv(this.moduleName,this.moduleConfig)})),FS=function(e,t){console.log(e,t)},qS={},VS={},HS=null;function zS(){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 WS(e){var n=this;return HS||(HS=new Promise(function(r){function i(t,n){if(FS("Received a response from CMP",t),n){var i,a;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(a=(i=t)&&"boolean"==typeof i.gdprApplies?i.gdprApplies:e.defaultGdprScope)||!0===a&&"string"!=typeof i.tcString)&&r({result:"cmpUnexpectedResponse",cmp:qS,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),zS(),qS.frame?2===qS.version?(FS("TCF v2 CMP found. Fetching the consent."),qS.function?(FS("CMP API is directly accessible, calling it now..."),qS.function("addEventListener",qS.version,i)):(FS("CMP API is outside the current iframe, calling it now..."),function(e,n,r){var i=this,a="__tcfapi";function s(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!==VS[r.callId]&&VS[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var c=Math.random()+"",d="".concat(a,"Call"),u=T({},d,{command:e,parameter:o,callId:c,version:r});VS[c]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,qS.version,r)}("addEventListener",qS.frame,i))):r({result:"cmpVersionNotV2",cmp:qS}):r({result:"cmpNotFound"})}.bind(this)),HS)}var KS=new(function(){function t(){D(this,t),this.productName="Game Distribution"}var n;return R(t,[{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:(n=e(r.mark((function e(t,n){var i,a,s,o,c,d,u;return r.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(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),c=encodeURIComponent(s),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),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(o,"/user_id/").concat(c),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,t){return n.apply(this,arguments)})}]),t}());function $S(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 QS(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 QS(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,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,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function QS(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 JS=function(e){var n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var c=this;t(this,n);try{var d=document.createElement("script");if(d.async=null==s||s,d.type="text/javascript",d.onload=function(){t(this,c),e()}.bind(this),d.onerror=function(){t(this,c);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),d.src=r,i){var u,l=$S(i);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=h.key,f=h.value;d.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},YS="140feb72-7952-4420-8ae5-e8978d87bc17",XS=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,JS({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,JS({src:"https://cookie-cdn.cookiepro.com/consent/".concat(YS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,JS({src:"https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:YS}],isAsync:!1});case 7:n=void 0,r=void 0,i=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(i=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(i),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,i}),e,null,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),ZS=new j,eR={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},tR=!1;function nR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=r.type;if(Object.keys(eR).some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=!r.type||!r.type.startsWith("gd-sdk")&&!("parent-data-response"===r.type)||"sg-game-event"===r.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 i="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)&&(tR=!0),i&&tR&&(tR=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var c=o();if(!c)return;var d=c&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),c.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return t(this,n),e===(null==r?void 0:r.type)}.bind(this));if(!d&&!u)return}var l=r.eventName,h=r.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==l&&"levelFinish"!==l||window.mpHelper.sendStat("level",h.level),"levelFinish"===l&&window.mpHelper.sendStat("score",h.score)),window.parent.postMessage(r,"*")}if(a){var p=eR[i][a];p&&ZS.emit(p,r)}}}),!1);var rR="__msgr",iR=q(),aR=function(e){var n=this;if(!window[rR]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=rR,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:iR,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){cR(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",cR(i)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){t(this,n);try{var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=iR,cR(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},sR=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=oR(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},oR=function e(t){try{var n,r,i=null==t?void 0:t.parent;if("game"===(null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return i;e(i)}catch(e){return t}},cR=function(e){try{window[rR]&&window[rR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}};function dR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lR(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 hR(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 hR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,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,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function hR(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 pR,fR=function(){function n(e){var r=this;D(this,n),T(this,"_getAdTypeByAfgPosition",function(e){var n=this;t(this,r);var i={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(i).find(function(r){var a=this;return t(this,n),i[r].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),this._gameData=e._gameData,this._msgrt=e.msgrt,this._adInstance=e.adInstance,this._eventBus=e.eventBus,this.blockedAdsMap=e.blockedAdsMap,this._parentURL=e._parentURL,this._onResumeGame=e.onResumeGame.bind(e),this._setAdRequestTimer=e._setAdRequestTimer.bind(e),this._giveGift=e._giveGift.bind(e),this._runAutoResume=e._runAutoResume.bind(e),this.send_atom_event=e.send_atom_event.bind(e),this.get_session_id=e.get_session_id.bind(e),this.get_ad_system_init_result=e.get_ad_system_init_result.bind(e)}var i,a;return R(n,[{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h,p,f,m,g,v,b,y,_,w,A,k,E,x,S,R,D,T,O,P,I,C,L,U,M,j,B,N,G,F=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=this._getAdTypeByAfgPosition(n),n.params.position,d=this._getAdFlow(c),u=this._gameData,l=u.afg_disabled,h=null===(i=u.promo)||void 0===i||null===(a=i.rainbow)||void 0===a?void 0:a.enabled,p=null===(s=u.promo)||void 0===s?void 0:s.onadsense,f="reward"===(null===(o=n.params)||void 0===o?void 0:o.position),m=l?d.filter(function(e){return t(this,F),"adsense"!==e}.bind(this)):d,g=this.get_ad_system_init_result(),v=g.afg,b=g.ima,this.adsBlocked=!v&&!b,this.adsBlocked?(cs("gd-adflow adsBlocked so changing the flow"),m=[m[0]]):(v||(m=m.filter(function(e){return t(this,F),"adsense"!==e}.bind(this))),b||(m=m.filter(function(e){return t(this,F),"ima"!==e}.bind(this)))),y=!1,_=!1,w=[],A=0,k=!1,E=lR(m),e.prev=21,E.s();case 23:if((x=E.n()).done){e.next=57;break}return S=x.value,n.params.adapter=S,R=A===m.length-1,h&&R&&"ima"===S&&(n.params.runPromoAsImaFallback=!0),D=R&&"adsense"===S&&h&&p&&f,n.params=uR(uR({},n.params),{},{adapterIndex:A,isLastAdapter:R,shouldFail:!1,extraPromoRunOnFail:D}),function(){t(this,F),us.firstSuccessOrder&&!isNaN(us.firstSuccessOrder)&&(n.params.shouldFail=A<us.firstSuccessOrder)}.bind(this),cs("gd-adflow, before adInvoke",A,S,n.params.shouldFail),e.next=34,this.adInvoke(n);case 34:if(T=e.sent,O=T.success,P=T.args,I=T.isSkipped,C=T.noVast,!O){e.next=46;break}return cs("gd-adflow, adapter-result-success",A,S,P),y=!0,_=!(null==P||!P.isPromoSuccess),e.abrupt("break",57);case 46:if(cs("gd-adflow, adapter-result-failure",A,S,P.message),A++,w.push(P.message),!I){e.next=51;break}return e.abrupt("break",57);case 51:if(!C){e.next=54;break}return this._runAutoResume(),e.abrupt("break",57);case 54:R&&"adsense"===S&&h&&p&&f&&(k=!0);case 55:e.next=23;break;case 57:e.next=62;break;case 59:e.prev=59,e.t0=e.catch(21),E.e(e.t0);case 62:return e.prev=62,E.f(),e.finish(62);case 65:if(!k){e.next=74;break}return n.params.adapter="promo",e.next=70,this.adInvoke(n);case 70:L=e.sent,U=L.success,L.args,U&&(_=!0);case 74:(function(){var e;t(this,F),us.disableGift&&null!==(e=u.gft)&&void 0!==e&&e.enabled&&(u.gft.enabled=!1)}).bind(this),M=w.join(" /n"),y?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift()):(this._onResumeGame(M,"warning"),this._giveGift()),j="-1",B="none",y&&_?j="promo_ima":y?(j="index_".concat(A),B=m[A]):_&&(j="promo_adsense"),N=this.get_session_id(),this.adsBlocked&&"-1"===j?(G="rewarded"===c?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[G]=this.blockedAdsMap[G]?this.blockedAdsMap[G]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(G)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:G,sessionId:N,successAdapter:"none",adFlowIndex:j})):(this._msgrt.send("adflow.all.index",{message:"".concat(j)}),this._msgrt.send("adflow.all.success_adapter",{message:"".concat(B)}),this._msgrt.send("adflow.".concat(c,".index"),{message:"".concat(j)}),this._msgrt.send("adflow.".concat(c,".success_adapter"),{message:"".concat(B)}),this.send_atom_event("gd.adflow",{adFlowIndex:j,successAdapter:B,adBlocker:!1,afgBlocked:!v,imaBlocked:!b,adType:c,sessionId:N}));case 84:case"end":return e.stop()}}),e,this,[[21,59,62,65]])}))),function(e){return a.apply(this,arguments)})},{key:"adInvoke",value:(i=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="main.showad.".concat(i.params.adapter,".").concat(i.params.adapterIndex),c=function(e){t(this,u),a._eventBus.unsubscribeScope(o);var r="dismissed"===(null==e?void 0:e.message);n({success:!1,args:e,isSkipped:r,noVast:e.noVast})}.bind(this),d=function(e){t(this,u),a._eventBus.unsubscribeScope(o),n({success:!0,args:e})}.bind(this),a._eventBus.subscribe("AD_ERROR",c,o),a._eventBus.subscribe("AD_SDK_CANCELED",c,o),a._eventBus.subscribe("AD_SUCCESS",d,o),e.prev=6,e.next=9,a._adInstance.startAd(i);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),ds("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return i.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var n,r,i,a,s,o,c,d,u=this,l=void function(){if(t(this,u),us.customAdFlow)return JSON.parse(us.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(c=h)||void 0===c||null===(d=c.adapters)||void 0===d?void 0:d[e]:p}}]),n}(),mR=new j,gR=["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 n=this,r=e.data,i=e.origin,a=e.source;if(gR.some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=r.system;r.action;var o="aeriaExternalHostsConnector"===s;if("Softgames"===s)pR=a,(window.parent||window).postMessage(r,"*"),mR.emit("aeria-event",r);else if(o){pR&&pR.postMessage(r,"*");var c=window.parent||window;c&&c.postMessage(r,"*")}}}),!1);var vR="https://html5.gamedistribution.com",bR="parent-data-request",yR="parent-data-response",_R=function(){function n(){D(this,n)}var i;return R(n,[{key:"init",value:function(e){var n=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(r){if(t(this,n),r){var i=r.adRequestTimer;e.adRequestTimer=i,e.adRequestTimer}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var n=this;window.addEventListener("message",function(r){t(this,n);var i=r.data,a=r.origin,s=r.source,o=i.type;if(i.value,a===vR&&o===bR){var c={adRequestTimer:e.adRequestTimer};s.postMessage({type:yR,value:c})}}.bind(this))}},{key:"_askForParentFrameData",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);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===vR&&i===yR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:bR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),wR=new _R;function AR(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 kR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ER=q(),xR=null,SR=null,RR=function(){function n(e){var r=this;if(D(this,n),xR)return xR;xR=this,this.blockedAdsMap={},this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,e),this._version=e.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new Ew,this._location.print(),this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._giftCount=0,this._mplus_count=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,r),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,r),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,i=this;t(this,r),!0===(null===(e=this._gameData.lp)||void 0===e?void 0:e.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(n=this._gameData.evnts)&&void 0!==n&&n.enabled&&this._isLoaderGameURL()&&(aR(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,i),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),wR.init(this),this._send_gametag_data("sdk_init")}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,v,b,y,w,T,I,C,L,U,j,B,N;return R(n,[{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(t(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var n=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];n&&n.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(N=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=u()||"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 N.apply(this,arguments)})},{key:"_loadCMP",value:(B=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=6;break}if(i=new Ew,0!==(null==(a=i.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,XS();case 6:case"end":return e.stop()}}),e,this)}))),function(){return B.apply(this,arguments)})},{key:"testConsent",value:function(){try{zS();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,WS({});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;ZS.on("splash-hidden",function(n){t(this,e),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"_sendLoadedEvent",value:function(){if(!this._isLoaded&&(this._isLoaded=!0,"loader-frame"===this._whichFrame()))try{this._whichFrame(),this._sendTunnlEvent(1),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"})}catch(e){}}},{key:"_sendGamedockGamePlay",value:function(){var e=this._isTokenGameURL();if(!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||!this._bridge.isCoreSDKMode&&this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||(console.log("noMinijuegosSDK",!this._bridge.isCoreSDKMode,!this._bridge.noMinijuegosSDK,document.location.search.indexOf("mp_game_id")>=0),!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker())}},{key:"_initializeSDKWithGameData",value:(j=e(r.mark((function e(n,i){var a,s=this;return r.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===(a=this._gameData.disableAds)||void 0===a?void 0:a.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(){t(this,s),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"}))}.bind(this)).catch(function(e){t(this,s);var n="".concat(e).startsWith("Error: Blocked:");cs("gd-adflow adsBlocked",n,e);var r=this.get_ad_system_init_result(),i=r.ima,a=r.afg;if(this.adsBlocked=!i&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var o=i||a?i?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(o)})}console.error(e.message||e)}.bind(this))),n(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"),i(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return j.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=M(e);this.options=t?h(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=as.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 n=this;void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var r={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(G.stringify(r))).catch(function(e){t(this,n)}.bind(this)),this.adInstance._send_atom_event("hl.config",r),this._send_gametag_data("sdk_gameplay")}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=c("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,p("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!m.available)return;"developer.gamedistribution.com"===this._parentDomain?(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0),m.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0)),m.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 l({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:o(),version:as.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:u(),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 n=[this._gameData.gmky.url];f(n[0],"GamedockSDK",{alternates:n}).then(function(){var n,r;t(this,e),SR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&SR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),KS.track(SR,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.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=SR)||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 n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),f(n[0],"MinijuegosSDK",{alternates:n}).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_loadLocus",value:function(){var n=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:n=["https://tag.atom.gamedistribution.com/v1/locus"],console.log("locus loading"),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}()},{key:"_loadGoogleAnalytics",value:function(){var e=this,n=["https://www.google-analytics.com/analytics.js"];f(n[0],"gdsdk_google_analytics",{alternates:n,error_prefix:"Blocked:",exists:function(){return t(this,e),window.ga}.bind(this)}).then(function(){t(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(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new _,A.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),k.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){t(this,e);var n=this._getDeveloperDomains(),r=n.developerDomain,i=n.gameApiDomain;if(r){fetch("https://".concat(i,"/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){}}RS()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),ES(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&KS.track(SR,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(n){t(this,e),this.msgrt.send("ad.error",{message:n.message,details:n.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(n){t(this,e),this._sendAdRequestContext(n.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(n){if(t(this,e),n.message.startsWith("Blocked:")){if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:n.message}),!this._hasBlocker)){this._hasBlocker=!0;var r=Math.random()<.25;this.msgrt.send("adblck.src",{message:n.message}),r&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:n.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(n){t(this,e),this.msgrt.send("tunnl.keys.empty",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(n){t(this,e),this.msgrt.send("tunnl.keys.fallback",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(n){return t(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=Yw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(as.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(U=e(r.mark((function e(){var n,i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this._gameData,n=void 0===this._gameData.dmain||this._gameData.dmain,(i.bloc_gard&&!0===i.bloc_gard.enabled||!n)&&(this.msgrt.send("blocked"),setTimeout(function(){t(this,a),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(G.stringify({domain:this._parentDomain,id:i.gameId,img:this._get_game_thumbnail_url(),title:i.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return U.apply(this,arguments)})},{key:"_checkGameDeleted",value:function(){var e=this;6===this._gameData.status&&(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){t(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;m.available&&m.getBoolean("gd_debug_ex")&&(m.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,i=this._gameData,a=i.gdpr&&!0===i.gdpr.consent,s=i.loader,o=null===(e=i.promo)||void 0===e?void 0:e[null===(t=i.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(i,a):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||a?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):!1!==s.enabled&&this._createSplash(i,a):null!=o&&o.enabled&&this._createPromo(i,a))}},{key:"_initializeVideoAd",value:(L=e(r.mark((function e(){var t;return r.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=h(this.options.advertisementSettings,t.sdk)),this.macros=new E({game:t,bridge:this._bridge}),this.adInstance=new BS(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=as,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:this._executeMidrollPlus();case 18:case"end":return e.stop()}}),e,this)}))),function(){return L.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){p("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){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){p(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){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(C=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sA();case 2:return t=e.sent,this.msgrt.setGameData(t),x(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return C.apply(this,arguments)})},{key:"_createSplash",value:(I=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(n);case 2:return a=e.sent,s=new a(kR(kR({},this.options),{},{isConsentDomain:i,version:as.version}),n,this._parentDomain),e.next=6,pA();case 6:o=e.sent,c=o.enabled,s.on("playClick",function(){var e,n,r=this;if(t(this,d),i){var a=new Date;a.setDate(a.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(a.toUTCString(),"; path=/")}if(this._hideCMPButton(),c)window.gdsdk.showAd(g.Interstitial,{position:"preroll"}).catch(function(e){t(this,r),s.hide()}.bind(this));else{var o={position:"preroll"};(function(){t(this,r),us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),o.adapter="adsense")}).bind(this),this.showAd(g.Interstitial,o).catch(function(e){t(this,r)}.bind(this))}null!==(e=this._gameData)&&void 0!==e&&null!==(n=e.evnts)&&void 0!==n&&n.enabled&&(sR({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(){t(this,d),s.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,d),s.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(T=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o(kR(kR({},this.options),{},{isConsentDomain:i,version:as.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.hide(),this._createSplash(n,i)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(n,i);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return T.apply(this,arguments)})},{key:"_createPromo",value:(w=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o(kR(kR({},this.options),{},{isConsentDomain:i,version:as.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.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 w.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(g.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"showAd",value:(y=e(r.mark((function t(n){var i,a=this,s=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:{},t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,s){var o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!a._autoResumeIfAdsAreDisabled(n||"interstitial")){e.next=5;break}return e.abrupt("return",t());case 5:return c={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=9,a.sdkReady;case 9:return d=e.sent,e.next=12,a.videoAdReady;case 12:if(null!==(o=a._gameData.lp)&&void 0!==o&&o.load||a._sendLoadedEvent(),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:d,adRequest:c}),a._rejectAdIfAdDisabled({gameData:d,adRequest:c}),a._rejectAdIfUnsupportedType({adRequest:c}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||a._rejectAdIfAdRateHits({gameData:d,adRequest:c}),a.adInstance.attachAfgPosition(c),!a.adFlowRunning){e.next=22;break}return e.abrupt("return",t());case 22:return a.adFlowRunning=!0,u=new fR(a),e.next=26,u.runAdFlow(c);case 26:a.adFlowRunning=!1,t(),a._post_message({topic:"adrequest.instream"}),e.next=36;break;case 31:e.prev=31,e.t0=e.catch(0),a.adFlowRunning=!1,a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 36:case"end":return e.stop()}}),e,null,[[0,31]])})));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}}),t)}))),function(e){return y.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t=!1,n=this._gameData.diagnostic.close_ads,r=this._gameData.disableAds[e],i=n||r;return this._gameData.diagnostic,this._gameData.disableAds,i&&(this._runAutoResume(),t=!0),t}},{key:"_runAutoResume",value:function(){var e="CONTENT_PAUSE_REQUESTED",t="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(e,{name:e,message:"Auto pause when ads are disabled"}),this.eventBus.broadcast(t,{name:t,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}},{key:"_giveGift",value:function(){var e,t,n,r,i;null!==(e=this._gameData)&&void 0!==e&&null!==(t=e.gft)&&void 0!==t&&t.enabled&&(null===(n=this._gameData)||void 0===n||null===(r=n.gft)||void 0===r||null===(i=r.durations[this._giftCount])||void 0===i?void 0:i.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift()}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=e.adRequest;if(t.disableAds[n.adType]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==g.Interstitial&&t.adType!==g.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=g.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===g.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,a,s,o=e.gameData,c=e.adRequest,d=null;c.adType===g.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(d=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):d=o.midroll;if(c.adType===g.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<d)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(b=e(r.mark((function t(n){var i=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,a){var s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.sdkReady;case 3:return s=e.sent,e.next=6,i.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[n]&&!i._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(n,"..."));case 10:if(n){e.next=14;break}n=g.Rewarded,e.next=16;break;case 14:if(n===g.Interstitial||n===g.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:return e.next=18,i.adInstance.preloadAd(n);case 18:o=e.sent,t(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),a(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return b.apply(this,arguments)})},{key:"cancelAd",value:(v=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.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.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.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),p("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()||(sR({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){p("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()||(sR({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"openConsole",value:function(){try{new S(this).start(),m.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 n=this._gameData;n.sdk.fullscreen&&"auto"===n.sdk.fullscreen&&document.addEventListener("click",function(){if(t(this,e),!this._isFullScreen){var n=document.body,r=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullscreen;if(r)r.call(n);else if(void 0!==window.ActiveXObject){var i=new ActiveXObject("WScript.Shell");null!==i&&i.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var n=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){t(this,n),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_removeExternalsInHtml",value:function(e){var n=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var r=this;t(this,n);var i=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");e.removeAttribute("href"),i||(e.onclick=function(e){return t(this,r),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled,y=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:b,parentURL:i,parentDomain:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,depth:o(),domainMatched:c===u,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new O(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(P.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new GS(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new NS(s),e.abrupt("return",o.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(P.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(G.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new O(e,!0);return n.query=kR(kR({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return P.encode(JSON.stringify(e))}},{key:"session",value:function(){var t=this;return new Promise(function(){var n=e(r.mark((function e(n,i){var a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.sdkReady;case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:a=t._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:t._bridge.parentDomain,topDomain:t._bridge.topDomain,parentURL:t._bridge.parentURL,depth:t._bridge.depth,loadedByGameZone:t._bridge.isTokenGameURL}});case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(e,t){return n.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)SR.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,n=this._gameData,r=n.assets.find(function(n){return t(this,e),n.hasOwnProperty("name")&&512===n.width&&512===n.height}.bind(this));return r||(r=n.assets.length>0?n.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(r.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,i=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var a=window.top||window.parent;a&&a.postMessage({source:"gdsdk",topic:n,data:r},i)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(){var n=this;try{var i,a=null===(i=this._gameData)||void 0===i?void 0:i.gft,s=setInterval(e(r.mark((function e(){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.adInstance.requestRunning||n.adFlowRunning?console.log("Advertisement already running..."):(n.showAd(g.Interstitial,{position:"midroll",isGift:!0}).catch(function(e){t(this,i)}.bind(this)),clearInterval(s),n._giftCount++);case 1:case"end":return e.stop()}}),e,this)}))),1e3*a.durations[this._giftCount].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return ER}},{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,n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,n,r=this;if(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&this.adInstance.adMidrollCount<=0)if(null!==(n=this._gameData.midroll_plus)&&void 0!==n&&n.interval)var i=setInterval(function(){var e,n,a=this;t(this,r),this.showAd(g.Interstitial,{position:"midroll",isGift:!0}).catch(function(e){t(this,a)}.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;t(this,r),this.showAd(g.Interstitial,{position:"midroll",isGift:!0}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}]),n}();function DR(){return(DR=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:n=["https://tag.atom.gamedistribution.com/v1/locus"],console.log("locus loading"),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var TR=new j,OR=function(e){var n=this;!function(){DR.apply(this,arguments)}();var r,i=function(e){var r=this;return t(this,n),new Promise(function(n,i){var a=this;t(this,r);var s=function(e){t(this,a),"SDK_GAME_START"===e.name&&(TR.off("sdk-event",s),n())}.bind(this);TR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new RR(e)),r}.bind(this),s=function(e){return t(this,n),i(e)}.bind(this),o=function(e){return t(this,n),"gdsdk://preloaded"}.bind(this),c=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),d=function(){return t(this,n),m("cancelAd")}.bind(this),u=function(){return t(this,n),m("openConsole")}.bind(this),l=function(){return t(this,n),m("showBanner")}.bind(this),h=function(){return t(this,n),m("session")}.bind(this),p=function(e){return t(this,n),m("sendGenericEvent",{options:e})}.bind(this),f=function(){t(this,n),console.log("_sendSDKReady")}.bind(this),m=function(e,r){var i=this;return t(this,n),r||(r={}),new Promise(function(n,a){t(this,i);try{var s={type:"gd-sdk",method:e,options:r};window.parent.postMessage(s,"*"),n()}catch(e){console.log("gd:adp:m:s:error",e),n()}}.bind(this))}.bind(this),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&b(r)}),!1)}.bind(this),v=function(){t(this,n),g(),m("init")}.bind(this),b=function(r){t(this,n);try{TR.emit("sdk-event",r),e.onEvent&&e.onEvent(r)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:c,cancelAd:d,openConsole:u,getSession:h,onEvent:b,init:v,_sendSDKReady:f,sendGenericEvent:p}},PR=function(e){var t=OR(e);return t.init(),t},IR=function(){var e=this;return{isMasterGameURL:function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),isTokenGameURL:function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),isExtHostedGameURL:function(){t(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this)}},CR="gd-sdk-frame-handshake-request",LR="gd-sdk-frame-handshake-response",UR=function(e){var n=this;return new Promise(function(r,i){var a=this;t(this,n);var s={type:CR},o=!1;window.addEventListener("message",(function(e){var t=e.data,n=e.origin,i=e.source,a=t.type;if(a===CR){var s={type:LR};i.postMessage(s,n)}else a===LR&&(o=!0,r({origin:n,source:i}))})),e?r():(setTimeout(function(){t(this,a),o||r()}.bind(this),200),window.parent!==window?window.parent.postMessage(s,"*"):r())}.bind(this))},MR=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uA();case 2:return t=e.sent,n=!t,e.next=6,UR(n);case 6:if(i=e.sent,t){e.next=9;break}return e.abrupt("return",!1);case 9:return a=IR(),s=a.isMasterGameURL,a.isTokenGameURL,o=s(),e.next=13,hA();case 13:return c=e.sent,d=!1,d=c?!o&&!!i:!o,e.abrupt("return",d);case 17:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),jR=Ze,BR=ce,NR=Za,GR=Ki,FR=BR(Fi.f),qR=BR([].push),VR=function(e){return function(t){for(var n,r=GR(t),i=NR(r),a=i.length,s=0,o=[];a>s;)n=i[s++],jR&&!FR(r,n)||qR(o,e?[n,r[n]]:r[n]);return o}},HR={entries:VR(!0),values:VR(!1)}.values;Ja({target:"Object",stat:!0},{values:function(e){return HR(e)}});var zR,WR={},KR=function(e){try{if(e.skipForward)return;if(WR.source){var t={type:"gd-sdk-on-event",event:e};WR.source.postMessage(t,WR.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},$R=function(){KR({name:"SDK_READY",status:"success",message:"Everything is ready."}),KR({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),KR({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},QR=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,c=a.type,d=a.method,u=a.options;if("gd-sdk-self"!==c){if("gd-sdk"===c){if(!WR.source&&"init"===d)return function(e){var t=e.source,n=e.origin;WR={source:t,origin:n}}({source:o,origin:s}),void $R();var l=n[d];l&&e(r.mark((function e(){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,function(){t(this,a),"showAd"===d&&us.firstAdapterModeAdsense&&"rewarded"!==u.adType&&(console.log("promo-test, set first adapter to adssense 3"),u.params=u.params?u.params:{},u.params.adapter="adsense")}.bind(this),!(i=l.apply(n,Object.values(u)))||!i.then){e.next=6;break}return e.next=6,i;case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("gd:adp:m:r onFrameMessage error",e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))()}}else{var h={type:"gd-sdk",method:d,options:u};window.postMessage(h,location.origin)}}),!1)},JR=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){KR(e),t.apply(this,arguments)}}(e);var t=new RR(e);return QR(t),t},YR=function(e){try{var t=Ww(e);e.gameId||t.send("nogameid",{message:"".concat(dy.parentURL)})}catch(e){}},XR={create:function(){var t=e(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,YR(t),eA=Ww(nA=t),e.next=5,MR();case 5:return n=e.sent,i=n?PR(t):JR(t),fA(),e.abrupt("return",i);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",JR(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(e){return t.apply(this,arguments)}}()};function ZR(){return(ZR=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vA();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,tD(t);case 9:e.t0=e.sent;case 10:return i=e.t0,e.abrupt("return",n(i));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var eD=!1;function tD(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),zR)return r(zR);if(eD)var s=setInterval(function(){t(this,a),zR&&(eD=!1,clearInterval(s),r(zR))}.bind(this),100);else eD=!0,XR.create(e).then(function(e){t(this,a),zR=e,e._sendSDKReady(),eD=!1,r(zR)}.bind(this))}.bind(this))}kS();var nD,rD=(tD(nD=function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":n(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===n(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}()),{invoke:function(e){return function(e,t){return ZR.apply(this,arguments)}(nD,e)}});function iD(){var n=this;this.AdType=g,this.preloadAd=function(e){var n=this;return rD.invoke(function(r){return t(this,n),r.preloadAd(e)}.bind(this))},this.showAd=function(){var n=e(r.mark((function e(n,i){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",rD.invoke(function(e){var r=this;if(t(this,a),n===g.Display)return e.showDisplayAd(i);var s={};return function(){t(this,r),us.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 e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return rD.invoke(function(n){return t(this,e),n.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return rD.invoke(function(n){return t(this,e),n.openConsole()}.bind(this))},this.getSession=function(){var e=this;return rD.invoke(function(n){return t(this,e),n.session()}.bind(this))},this.sendEvent=function(e){var n=this;return rD.invoke(function(r){return t(this,n),r.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){t(this,n),Qv.showLeaderboard()}.bind(this),addScore:function(e){t(this,n),Qv.addScore(e)}.bind(this)}}iD.prototype=new function(){this.showBanner=function(){var e=this;return rD.invoke(function(n){return t(this,e),n.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new iD,window.gdApi=window.gdsdk;
|