@bygd/gd-sdk-pes 1.28.2 → 1.28.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/newArrowCheck"),n=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/regenerator"),a=require("@bygd/gd-sdk-era/dist/default"),i=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/defineProperty"),o=require("url-parse"),u=require("validator"),d=require("is-valid-domain"),c=require("get-value"),l=require("set-value"),h=require("lodash.clonedeep"),f=require("@babel/runtime/helpers/createClass"),p=require("can-autoplay"),m=require("is-plain-object"),g=require("querystringify"),v=require("lodash.merge"),y=require("js-base64"),b=require("events"),_=require("uuid");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var A=w(e),k=w(t),E=w(n),x=w(r),S=w(i),T=w(s),D=w(o),R=w(u),I=w(d),C=w(c),P=w(l),O=w(h),L=w(f),U=w(p),M=w(g),j=w(v),B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},q=function(e){return e&&e.Math==Math&&e},G=q("object"==typeof globalThis&&globalThis)||q("object"==typeof window&&window)||q("object"==typeof self&&self)||q("object"==typeof B&&B)||Function("return this")(),N={},F=function(e){try{return!!e()}catch(e){return!0}},V=!F((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),K={},W={}.propertyIsEnumerable,H=Object.getOwnPropertyDescriptor,z=H&&!W.call({1:2},1);K.f=z?function(e){var t=H(this,e);return!!t&&t.enumerable}:W;var $=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Q={}.toString,Y=function(e){return Q.call(e).slice(8,-1)},J=Y,X="".split,Z=F((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==J(e)?X.call(e,""):Object(e)}:Object,ee=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},te=Z,ne=ee,re=function(e){return te(ne(e))},ae=function(e){return"object"==typeof e?null!==e:"function"==typeof e},ie=ae,se=function(e,t){if(!ie(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!ie(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!ie(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!ie(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},oe={}.hasOwnProperty,ue=function(e,t){return oe.call(e,t)},de=ae,ce=G.document,le=de(ce)&&de(ce.createElement),he=function(e){return le?ce.createElement(e):{}},fe=he,pe=!V&&!F((function(){return 7!=Object.defineProperty(fe("div"),"a",{get:function(){return 7}}).a})),me=V,ge=K,ve=$,ye=re,be=se,_e=ue,we=pe,Ae=Object.getOwnPropertyDescriptor;N.f=me?Ae:function(e,t){if(e=ye(e),t=be(t,!0),we)try{return Ae(e,t)}catch(e){}if(_e(e,t))return ve(!ge.f.call(e,t),e[t])};var ke={},Ee=ae,xe=function(e){if(!Ee(e))throw TypeError(String(e)+" is not an object");return e},Se=V,Te=pe,De=xe,Re=se,Ie=Object.defineProperty;ke.f=Se?Ie:function(e,t,n){if(De(e),t=Re(t,!0),De(n),Te)try{return Ie(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Ce=ke,Pe=$,Oe=V?function(e,t,n){return Ce.f(e,t,Pe(1,n))}:function(e,t,n){return e[t]=n,e},Le={exports:{}},Ue=G,Me=Oe,je=function(e,t){try{Me(Ue,e,t)}catch(n){Ue[e]=t}return t},Be=je,qe=G["__core-js_shared__"]||Be("__core-js_shared__",{}),Ge=qe,Ne=Function.toString;"function"!=typeof Ge.inspectSource&&(Ge.inspectSource=function(e){return Ne.call(e)});var Fe=Ge.inspectSource,Ve=Fe,Ke=G.WeakMap,We="function"==typeof Ke&&/native code/.test(Ve(Ke)),He={exports:{}},ze=qe;(He.exports=function(e,t){return ze[e]||(ze[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});var $e,Qe,Ye,Je=0,Xe=Math.random(),Ze=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Je+Xe).toString(36)},et=He.exports,tt=Ze,nt=et("keys"),rt=function(e){return nt[e]||(nt[e]=tt(e))},at={},it=We,st=ae,ot=Oe,ut=ue,dt=rt,ct=at,lt=G.WeakMap;if(it){var ht=new lt,ft=ht.get,pt=ht.has,mt=ht.set;$e=function(e,t){return mt.call(ht,e,t),t},Qe=function(e){return ft.call(ht,e)||{}},Ye=function(e){return pt.call(ht,e)}}else{var gt=dt("state");ct[gt]=!0,$e=function(e,t){return ot(e,gt,t),t},Qe=function(e){return ut(e,gt)?e[gt]:{}},Ye=function(e){return ut(e,gt)}}var vt={set:$e,get:Qe,has:Ye,enforce:function(e){return Ye(e)?Qe(e):$e(e,{})},getterFor:function(e){return function(t){var n;if(!st(t)||(n=Qe(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},yt=G,bt=Oe,_t=ue,wt=je,At=Fe,kt=vt.get,Et=vt.enforce,xt=String(String).split("String");(Le.exports=function(e,t,n,r){var a=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||_t(n,"name")||bt(n,"name",t),Et(n).source=xt.join("string"==typeof t?t:"")),e!==yt?(a?!s&&e[t]&&(i=!0):delete e[t],i?e[t]=n:bt(e,t,n)):i?e[t]=n:wt(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&kt(this).source||At(this)}));var St=G,Tt=St,Dt=G,Rt=function(e){return"function"==typeof e?e:void 0},It=function(e,t){return arguments.length<2?Rt(Tt[e])||Rt(Dt[e]):Tt[e]&&Tt[e][t]||Dt[e]&&Dt[e][t]},Ct={},Pt=Math.ceil,Ot=Math.floor,Lt=function(e){return isNaN(e=+e)?0:(e>0?Ot:Pt)(e)},Ut=Lt,Mt=Math.min,jt=function(e){return e>0?Mt(Ut(e),9007199254740991):0},Bt=Lt,qt=Math.max,Gt=Math.min,Nt=function(e,t){var n=Bt(e);return n<0?qt(n+t,0):Gt(n,t)},Ft=re,Vt=jt,Kt=Nt,Wt=function(e){return function(t,n,r){var a,i=Ft(t),s=Vt(i.length),o=Kt(r,s);if(e&&n!=n){for(;s>o;)if((a=i[o++])!=a)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Ht={includes:Wt(!0),indexOf:Wt(!1)},zt=ue,$t=re,Qt=Ht.indexOf,Yt=at,Jt=function(e,t){var n,r=$t(e),a=0,i=[];for(n in r)!zt(Yt,n)&&zt(r,n)&&i.push(n);for(;t.length>a;)zt(r,n=t[a++])&&(~Qt(i,n)||i.push(n));return i},Xt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Zt=Jt,en=Xt.concat("length","prototype");Ct.f=Object.getOwnPropertyNames||function(e){return Zt(e,en)};var tn={};tn.f=Object.getOwnPropertySymbols;var nn=Ct,rn=tn,an=xe,sn=It("Reflect","ownKeys")||function(e){var t=nn.f(an(e)),n=rn.f;return n?t.concat(n(e)):t},on=ue,un=sn,dn=N,cn=ke,ln=function(e,t){for(var n=un(t),r=cn.f,a=dn.f,i=0;i<n.length;i++){var s=n[i];on(e,s)||r(e,s,a(t,s))}},hn=F,fn=/#|\.prototype\./,pn=function(e,t){var n=gn[mn(e)];return n==yn||n!=vn&&("function"==typeof t?hn(t):!!t)},mn=pn.normalize=function(e){return String(e).replace(fn,".").toLowerCase()},gn=pn.data={},vn=pn.NATIVE="N",yn=pn.POLYFILL="P",bn=pn,_n=G,wn=N.f,An=Oe,kn=Le.exports,En=je,xn=ln,Sn=bn,Tn=function(e,t){var n,r,a,i,s,o=e.target,u=e.global,d=e.stat;if(n=u?_n:d?_n[o]||En(o,{}):(_n[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=wn(n,r))&&s.value:n[r],!Sn(u?r:o+(d?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;xn(i,a)}(e.sham||a&&a.sham)&&An(i,"sham",!0),kn(n,r,i,e)}},Dn=ee,Rn=function(e){return Object(Dn(e))},In=Jt,Cn=Xt,Pn=Object.keys||function(e){return In(e,Cn)},On=Rn,Ln=Pn;Tn({target:"Object",stat:!0,forced:F((function(){Ln(1)}))},{keys:function(e){return Ln(On(e))}});var Un,Mn=F,jn=!!Object.getOwnPropertySymbols&&!Mn((function(){return!String(Symbol())})),Bn=jn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,qn=Y,Gn=Array.isArray||function(e){return"Array"==qn(e)},Nn=ke,Fn=xe,Vn=Pn,Kn=V?Object.defineProperties:function(e,t){Fn(e);for(var n,r=Vn(t),a=r.length,i=0;a>i;)Nn.f(e,n=r[i++],t[n]);return e},Wn=It("document","documentElement"),Hn=xe,zn=Kn,$n=Xt,Qn=at,Yn=Wn,Jn=he,Xn=rt("IE_PROTO"),Zn=function(){},er=function(e){return"<script>"+e+"<\/script>"},tr=function(){try{Un=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;tr=Un?function(e){e.write(er("")),e.close();var t=e.parentWindow.Object;return e=null,t}(Un):((t=Jn("iframe")).style.display="none",Yn.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(er("document.F=Object")),e.close(),e.F);for(var n=$n.length;n--;)delete tr.prototype[$n[n]];return tr()};Qn[Xn]=!0;var nr=Object.create||function(e,t){var n;return null!==e?(Zn.prototype=Hn(e),n=new Zn,Zn.prototype=null,n[Xn]=e):n=tr(),void 0===t?n:zn(n,t)},rr={},ar=re,ir=Ct.f,sr={}.toString,or="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];rr.f=function(e){return or&&"[object Window]"==sr.call(e)?function(e){try{return ir(e)}catch(e){return or.slice()}}(e):ir(ar(e))};var ur=G,dr=He.exports,cr=ue,lr=Ze,hr=jn,fr=Bn,pr=dr("wks"),mr=ur.Symbol,gr=fr?mr:mr&&mr.withoutSetter||lr,vr=function(e){return cr(pr,e)||(hr&&cr(mr,e)?pr[e]=mr[e]:pr[e]=gr("Symbol."+e)),pr[e]},yr={},br=vr;yr.f=br;var _r=St,wr=ue,Ar=yr,kr=ke.f,Er=function(e){var t=_r.Symbol||(_r.Symbol={});wr(t,e)||kr(t,e,{value:Ar.f(e)})},xr=ke.f,Sr=ue,Tr=vr("toStringTag"),Dr=function(e,t,n){e&&!Sr(e=n?e:e.prototype,Tr)&&xr(e,Tr,{configurable:!0,value:t})},Rr=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},Ir=Rr,Cr=function(e,t,n){if(Ir(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}},Pr=ae,Or=Gn,Lr=vr("species"),Ur=function(e,t){var n;return Or(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Or(n.prototype)?Pr(n)&&null===(n=n[Lr])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},Mr=Cr,jr=Z,Br=Rn,qr=jt,Gr=Ur,Nr=[].push,Fr=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=5==e||i;return function(o,u,d,c){for(var l,h,f=Br(o),p=jr(f),m=Mr(u,d,3),g=qr(p.length),v=0,y=c||Gr,b=t?y(o,g):n?y(o,0):void 0;g>v;v++)if((s||v in p)&&(h=m(l=p[v],v,f),e))if(t)b[v]=h;else if(h)switch(e){case 3:return!0;case 5:return l;case 6:return v;case 2:Nr.call(b,l)}else if(a)return!1;return i?-1:r||a?a:b}},Vr={forEach:Fr(0),map:Fr(1),filter:Fr(2),some:Fr(3),every:Fr(4),find:Fr(5),findIndex:Fr(6)},Kr=Tn,Wr=G,Hr=It,zr=V,$r=jn,Qr=Bn,Yr=F,Jr=ue,Xr=Gn,Zr=ae,ea=xe,ta=Rn,na=re,ra=se,aa=$,ia=nr,sa=Pn,oa=Ct,ua=rr,da=tn,ca=N,la=ke,ha=K,fa=Oe,pa=Le.exports,ma=He.exports,ga=at,va=Ze,ya=vr,ba=yr,_a=Er,wa=Dr,Aa=vt,ka=Vr.forEach,Ea=rt("hidden"),xa=ya("toPrimitive"),Sa=Aa.set,Ta=Aa.getterFor("Symbol"),Da=Object.prototype,Ra=Wr.Symbol,Ia=Hr("JSON","stringify"),Ca=ca.f,Pa=la.f,Oa=ua.f,La=ha.f,Ua=ma("symbols"),Ma=ma("op-symbols"),ja=ma("string-to-symbol-registry"),Ba=ma("symbol-to-string-registry"),qa=ma("wks"),Ga=Wr.QObject,Na=!Ga||!Ga.prototype||!Ga.prototype.findChild,Fa=zr&&Yr((function(){return 7!=ia(Pa({},"a",{get:function(){return Pa(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ca(Da,t);r&&delete Da[t],Pa(e,t,n),r&&e!==Da&&Pa(Da,t,r)}:Pa,Va=function(e,t){var n=Ua[e]=ia(Ra.prototype);return Sa(n,{type:"Symbol",tag:e,description:t}),zr||(n.description=t),n},Ka=Qr?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Ra},Wa=function(e,t,n){e===Da&&Wa(Ma,t,n),ea(e);var r=ra(t,!0);return ea(n),Jr(Ua,r)?(n.enumerable?(Jr(e,Ea)&&e[Ea][r]&&(e[Ea][r]=!1),n=ia(n,{enumerable:aa(0,!1)})):(Jr(e,Ea)||Pa(e,Ea,aa(1,{})),e[Ea][r]=!0),Fa(e,r,n)):Pa(e,r,n)},Ha=function(e,t){ea(e);var n=na(t),r=sa(n).concat(Ya(n));return ka(r,(function(t){zr&&!za.call(n,t)||Wa(e,t,n[t])})),e},za=function(e){var t=ra(e,!0),n=La.call(this,t);return!(this===Da&&Jr(Ua,t)&&!Jr(Ma,t))&&(!(n||!Jr(this,t)||!Jr(Ua,t)||Jr(this,Ea)&&this[Ea][t])||n)},$a=function(e,t){var n=na(e),r=ra(t,!0);if(n!==Da||!Jr(Ua,r)||Jr(Ma,r)){var a=Ca(n,r);return!a||!Jr(Ua,r)||Jr(n,Ea)&&n[Ea][r]||(a.enumerable=!0),a}},Qa=function(e){var t=Oa(na(e)),n=[];return ka(t,(function(e){Jr(Ua,e)||Jr(ga,e)||n.push(e)})),n},Ya=function(e){var t=e===Da,n=Oa(t?Ma:na(e)),r=[];return ka(n,(function(e){!Jr(Ua,e)||t&&!Jr(Da,e)||r.push(Ua[e])})),r};($r||(pa((Ra=function(){if(this instanceof Ra)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=va(e),n=function(e){this===Da&&n.call(Ma,e),Jr(this,Ea)&&Jr(this[Ea],t)&&(this[Ea][t]=!1),Fa(this,t,aa(1,e))};return zr&&Na&&Fa(Da,t,{configurable:!0,set:n}),Va(t,e)}).prototype,"toString",(function(){return Ta(this).tag})),pa(Ra,"withoutSetter",(function(e){return Va(va(e),e)})),ha.f=za,la.f=Wa,ca.f=$a,oa.f=ua.f=Qa,da.f=Ya,ba.f=function(e){return Va(ya(e),e)},zr&&(Pa(Ra.prototype,"description",{configurable:!0,get:function(){return Ta(this).description}}),pa(Da,"propertyIsEnumerable",za,{unsafe:!0}))),Kr({global:!0,wrap:!0,forced:!$r,sham:!$r},{Symbol:Ra}),ka(sa(qa),(function(e){_a(e)})),Kr({target:"Symbol",stat:!0,forced:!$r},{for:function(e){var t=String(e);if(Jr(ja,t))return ja[t];var n=Ra(t);return ja[t]=n,Ba[n]=t,n},keyFor:function(e){if(!Ka(e))throw TypeError(e+" is not a symbol");if(Jr(Ba,e))return Ba[e]},useSetter:function(){Na=!0},useSimple:function(){Na=!1}}),Kr({target:"Object",stat:!0,forced:!$r,sham:!zr},{create:function(e,t){return void 0===t?ia(e):Ha(ia(e),t)},defineProperty:Wa,defineProperties:Ha,getOwnPropertyDescriptor:$a}),Kr({target:"Object",stat:!0,forced:!$r},{getOwnPropertyNames:Qa,getOwnPropertySymbols:Ya}),Kr({target:"Object",stat:!0,forced:Yr((function(){da.f(1)}))},{getOwnPropertySymbols:function(e){return da.f(ta(e))}}),Ia)&&Kr({target:"JSON",stat:!0,forced:!$r||Yr((function(){var e=Ra();return"[null]"!=Ia([e])||"{}"!=Ia({a:e})||"{}"!=Ia(Object(e))}))},{stringify:function(e,t,n){for(var r,a=[e],i=1;arguments.length>i;)a.push(arguments[i++]);if(r=t,(Zr(t)||void 0!==e)&&!Ka(e))return Xr(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!Ka(t))return t}),a[1]=t,Ia.apply(null,a)}});Ra.prototype[xa]||fa(Ra.prototype,xa,Ra.prototype.valueOf),wa(Ra,"Symbol"),ga[Ea]=!0;var Ja,Xa,Za=It("navigator","userAgent")||"",ei=Za,ti=G.process,ni=ti&&ti.versions,ri=ni&&ni.v8;ri?Xa=(Ja=ri.split("."))[0]+Ja[1]:ei&&(!(Ja=ei.match(/Edge\/(\d+)/))||Ja[1]>=74)&&(Ja=ei.match(/Chrome\/(\d+)/))&&(Xa=Ja[1]);var ai=Xa&&+Xa,ii=F,si=ai,oi=vr("species"),ui=function(e){return si>=51||!ii((function(){var t=[];return(t.constructor={})[oi]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},di=V,ci=F,li=ue,hi=Object.defineProperty,fi={},pi=function(e){throw e},mi=function(e,t){if(li(fi,e))return fi[e];t||(t={});var n=[][e],r=!!li(t,"ACCESSORS")&&t.ACCESSORS,a=li(t,0)?t[0]:pi,i=li(t,1)?t[1]:void 0;return fi[e]=!!n&&!ci((function(){if(r&&!di)return!0;var e={length:-1};r?hi(e,1,{enumerable:!0,get:pi}):e[1]=1,n.call(e,a,i)}))},gi=Tn,vi=Vr.filter,yi=mi,bi=ui("filter"),_i=yi("filter");gi({target:"Array",proto:!0,forced:!bi||!_i},{filter:function(e){return vi(this,e,arguments.length>1?arguments[1]:void 0)}});var wi=Tn,Ai=F,ki=re,Ei=N.f,xi=V,Si=Ai((function(){Ei(1)}));wi({target:"Object",stat:!0,forced:!xi||Si,sham:!xi},{getOwnPropertyDescriptor:function(e,t){return Ei(ki(e),t)}});var Ti={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},Di=F,Ri=Vr.forEach,Ii=mi,Ci=function(e,t){var n=[][e];return!!n&&Di((function(){n.call(null,t||function(){throw 1},1)}))}("forEach"),Pi=Ii("forEach"),Oi=G,Li=Ti,Ui=Ci&&Pi?[].forEach:function(e){return Ri(this,e,arguments.length>1?arguments[1]:void 0)},Mi=Oe;for(var ji in Li){var Bi=Oi[ji],qi=Bi&&Bi.prototype;if(qi&&qi.forEach!==Ui)try{Mi(qi,"forEach",Ui)}catch(e){qi.forEach=Ui}}var Gi=se,Ni=ke,Fi=$,Vi=function(e,t,n){var r=Gi(t);r in e?Ni.f(e,r,Fi(0,n)):e[r]=n},Ki=sn,Wi=re,Hi=N,zi=Vi;Tn({target:"Object",stat:!0,sham:!V},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Wi(e),a=Hi.f,i=Ki(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&zi(s,t,n);return s}});var $i=Tn,Qi=ae,Yi=Gn,Ji=Nt,Xi=jt,Zi=re,es=Vi,ts=vr,ns=mi,rs=ui("slice"),as=ns("slice",{ACCESSORS:!0,0:0,1:2}),is=ts("species"),ss=[].slice,os=Math.max;$i({target:"Array",proto:!0,forced:!rs||!as},{slice:function(e,t){var n,r,a,i=Zi(this),s=Xi(i.length),o=Ji(e,s),u=Ji(void 0===t?s:t,s);if(Yi(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!Yi(n.prototype)?Qi(n)&&null===(n=n[is])&&(n=void 0):n=void 0,n===Array||void 0===n))return ss.call(i,o,u);for(r=new(void 0===n?Array:n)(os(u-o,0)),a=0;o<u;o++,a++)o in i&&es(r,a,i[o]);return r.length=a,r}});var us=xe,ds=function(e,t,n,r){try{return r?t(us(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&us(a.call(e)),t}},cs={},ls=cs,hs=vr("iterator"),fs=Array.prototype,ps=function(e){return void 0!==e&&(ls.Array===e||fs[hs]===e)},ms={};ms[vr("toStringTag")]="z";var gs="[object z]"===String(ms),vs=gs,ys=Y,bs=vr("toStringTag"),_s="Arguments"==ys(function(){return arguments}()),ws=vs?ys:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),bs))?n:_s?ys(t):"Object"==(r=ys(t))&&"function"==typeof t.callee?"Arguments":r},As=ws,ks=cs,Es=vr("iterator"),xs=function(e){if(null!=e)return e[Es]||e["@@iterator"]||ks[As(e)]},Ss=Cr,Ts=Rn,Ds=ds,Rs=ps,Is=jt,Cs=Vi,Ps=xs,Os=function(e){var t,n,r,a,i,s,o=Ts(e),u="function"==typeof this?this:Array,d=arguments.length,c=d>1?arguments[1]:void 0,l=void 0!==c,h=Ps(o),f=0;if(l&&(c=Ss(c,d>2?arguments[2]:void 0,2)),null==h||u==Array&&Rs(h))for(n=new u(t=Is(o.length));t>f;f++)s=l?c(o[f],f):o[f],Cs(n,f,s);else for(i=(a=h.call(o)).next,n=new u;!(r=i.call(a)).done;f++)s=l?Ds(a,c,[r.value,f],!0):r.value,Cs(n,f,s);return n.length=f,n},Ls=vr("iterator"),Us=!1;try{var Ms=0,js={next:function(){return{done:!!Ms++}},return:function(){Us=!0}};js[Ls]=function(){return this},Array.from(js,(function(){throw 2}))}catch(e){}var Bs=function(e,t){if(!t&&!Us)return!1;var n=!1;try{var r={};r[Ls]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},qs=Os;Tn({target:"Array",stat:!0,forced:!Bs((function(e){Array.from(e)}))},{from:qs});var Gs,Ns,Fs,Vs=Lt,Ks=ee,Ws=function(e){return function(t,n){var r,a,i=String(Ks(t)),s=Vs(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=i.charCodeAt(s))<55296||r>56319||s+1===o||(a=i.charCodeAt(s+1))<56320||a>57343?e?i.charAt(s):r:e?i.slice(s,s+2):a-56320+(r-55296<<10)+65536}},Hs={codeAt:Ws(!1),charAt:Ws(!0)},zs=!F((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),$s=ue,Qs=Rn,Ys=zs,Js=rt("IE_PROTO"),Xs=Object.prototype,Zs=Ys?Object.getPrototypeOf:function(e){return e=Qs(e),$s(e,Js)?e[Js]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Xs:null},eo=Zs,to=Oe,no=ue,ro=vr("iterator"),ao=!1;[].keys&&("next"in(Fs=[].keys())?(Ns=eo(eo(Fs)))!==Object.prototype&&(Gs=Ns):ao=!0),null==Gs&&(Gs={}),no(Gs,ro)||to(Gs,ro,(function(){return this}));var io={IteratorPrototype:Gs,BUGGY_SAFARI_ITERATORS:ao},so=io.IteratorPrototype,oo=nr,uo=$,co=Dr,lo=cs,ho=function(){return this},fo=function(e,t,n){var r=t+" Iterator";return e.prototype=oo(so,{next:uo(1,n)}),co(e,r,!1),lo[r]=ho,e},po=ae,mo=xe,go=function(e){if(!po(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},vo=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return mo(n),go(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),yo=Tn,bo=fo,_o=Zs,wo=vo,Ao=Dr,ko=Oe,Eo=Le.exports,xo=cs,So=io.IteratorPrototype,To=io.BUGGY_SAFARI_ITERATORS,Do=vr("iterator"),Ro=function(){return this},Io=function(e,t,n,r,a,i,s){bo(n,t,r);var o,u,d,c=function(e){if(e===a&&m)return m;if(!To&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Do]||f["@@iterator"]||a&&f[a],m=!To&&p||c(a),g="Array"==t&&f.entries||p;if(g&&(o=_o(g.call(new e)),So!==Object.prototype&&o.next&&(_o(o)!==So&&(wo?wo(o,So):"function"!=typeof o[Do]&&ko(o,Do,Ro)),Ao(o,l,!0))),"values"==a&&p&&"values"!==p.name&&(h=!0,m=function(){return p.call(this)}),f[Do]!==m&&ko(f,Do,m),xo[t]=m,a)if(u={values:c("values"),keys:i?m:c("keys"),entries:c("entries")},s)for(d in u)(To||h||!(d in f))&&Eo(f,d,u[d]);else yo({target:t,proto:!0,forced:To||h},u);return u},Co=Hs.charAt,Po=vt,Oo=Io,Lo=Po.set,Uo=Po.getterFor("String Iterator");Oo(String,"String",(function(e){Lo(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=Uo(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Co(n,r),t.index+=e.length,{value:e,done:!1})}));var Mo=Tn,jo=V,Bo=G,qo=ue,Go=ae,No=ke.f,Fo=ln,Vo=Bo.Symbol;if(jo&&"function"==typeof Vo&&(!("description"in Vo.prototype)||void 0!==Vo().description)){var Ko={},Wo=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof Wo?new Vo(e):void 0===e?Vo():Vo(e);return""===e&&(Ko[t]=!0),t};Fo(Wo,Vo);var Ho=Wo.prototype=Vo.prototype;Ho.constructor=Wo;var zo=Ho.toString,$o="Symbol(test)"==String(Vo("test")),Qo=/^Symbol\((.*)\)[^)]+$/;No(Ho,"description",{configurable:!0,get:function(){var e=Go(this)?this.valueOf():this,t=zo.call(e);if(qo(Ko,e))return"";var n=$o?t.slice(7,-1):t.replace(Qo,"$1");return""===n?void 0:n}}),Mo({global:!0,forced:!0},{Symbol:Wo})}Er("iterator");var Yo=nr,Jo=ke,Xo=vr("unscopables"),Zo=Array.prototype;null==Zo[Xo]&&Jo.f(Zo,Xo,{configurable:!0,value:Yo(null)});var eu=function(e){Zo[Xo][e]=!0},tu=re,nu=eu,ru=cs,au=vt,iu=Io,su=au.set,ou=au.getterFor("Array Iterator"),uu=iu(Array,"Array",(function(e,t){su(this,{type:"Array Iterator",target:tu(e),index:0,kind:t})}),(function(){var e=ou(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");ru.Arguments=ru.Array,nu("keys"),nu("values"),nu("entries");var du=G,cu=Ti,lu=uu,hu=Oe,fu=vr,pu=fu("iterator"),mu=fu("toStringTag"),gu=lu.values;for(var vu in cu){var yu=du[vu],bu=yu&&yu.prototype;if(bu){if(bu[pu]!==gu)try{hu(bu,pu,gu)}catch(e){bu[pu]=gu}if(bu[mu]||hu(bu,mu,vu),cu[vu])for(var _u in lu)if(bu[_u]!==lu[_u])try{hu(bu,_u,lu[_u])}catch(e){bu[_u]=lu[_u]}}}var wu=ws,Au=gs?{}.toString:function(){return"[object "+wu(this)+"]"},ku=gs,Eu=Le.exports,xu=Au;ku||Eu(Object.prototype,"toString",xu,{unsafe:!0});var Su=G.Promise,Tu=Le.exports,Du=function(e,t,n){for(var r in t)Tu(e,r,t[r],n);return e},Ru=It,Iu=ke,Cu=V,Pu=vr("species"),Ou=function(e){var t=Ru(e),n=Iu.f;Cu&&t&&!t[Pu]&&n(t,Pu,{configurable:!0,get:function(){return this}})},Lu=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},Uu={exports:{}},Mu=xe,ju=ps,Bu=jt,qu=Cr,Gu=xs,Nu=ds,Fu=function(e,t){this.stopped=e,this.result=t};(Uu.exports=function(e,t,n,r,a){var i,s,o,u,d,c,l,h=qu(t,n,r?2:1);if(a)i=e;else{if("function"!=typeof(s=Gu(e)))throw TypeError("Target is not iterable");if(ju(s)){for(o=0,u=Bu(e.length);u>o;o++)if((d=r?h(Mu(l=e[o])[0],l[1]):h(e[o]))&&d instanceof Fu)return d;return new Fu(!1)}i=s.call(e)}for(c=i.next;!(l=c.call(i)).done;)if("object"==typeof(d=Nu(i,h,l.value,r))&&d&&d instanceof Fu)return d;return new Fu(!1)}).stop=function(e){return new Fu(!0,e)};var Vu,Ku,Wu,Hu=xe,zu=Rr,$u=vr("species"),Qu=function(e,t){var n,r=Hu(e).constructor;return void 0===r||null==(n=Hu(r)[$u])?t:zu(n)},Yu=/(iphone|ipod|ipad).*applewebkit/i.test(Za),Ju=G,Xu=F,Zu=Y,ed=Cr,td=Wn,nd=he,rd=Yu,ad=Ju.location,id=Ju.setImmediate,sd=Ju.clearImmediate,od=Ju.process,ud=Ju.MessageChannel,dd=Ju.Dispatch,cd=0,ld={},hd=function(e){if(ld.hasOwnProperty(e)){var t=ld[e];delete ld[e],t()}},fd=function(e){return function(){hd(e)}},pd=function(e){hd(e.data)},md=function(e){Ju.postMessage(e+"",ad.protocol+"//"+ad.host)};id&&sd||(id=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return ld[++cd]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},Vu(cd),cd},sd=function(e){delete ld[e]},"process"==Zu(od)?Vu=function(e){od.nextTick(fd(e))}:dd&&dd.now?Vu=function(e){dd.now(fd(e))}:ud&&!rd?(Wu=(Ku=new ud).port2,Ku.port1.onmessage=pd,Vu=ed(Wu.postMessage,Wu,1)):!Ju.addEventListener||"function"!=typeof postMessage||Ju.importScripts||Xu(md)||"file:"===ad.protocol?Vu="onreadystatechange"in nd("script")?function(e){td.appendChild(nd("script")).onreadystatechange=function(){td.removeChild(this),hd(e)}}:function(e){setTimeout(fd(e),0)}:(Vu=md,Ju.addEventListener("message",pd,!1)));var gd,vd,yd,bd,_d,wd,Ad,kd,Ed={set:id,clear:sd},xd=G,Sd=N.f,Td=Y,Dd=Ed.set,Rd=Yu,Id=xd.MutationObserver||xd.WebKitMutationObserver,Cd=xd.process,Pd=xd.Promise,Od="process"==Td(Cd),Ld=Sd(xd,"queueMicrotask"),Ud=Ld&&Ld.value;Ud||(gd=function(){var e,t;for(Od&&(e=Cd.domain)&&e.exit();vd;){t=vd.fn,vd=vd.next;try{t()}catch(e){throw vd?bd():yd=void 0,e}}yd=void 0,e&&e.enter()},Od?bd=function(){Cd.nextTick(gd)}:Id&&!Rd?(_d=!0,wd=document.createTextNode(""),new Id(gd).observe(wd,{characterData:!0}),bd=function(){wd.data=_d=!_d}):Pd&&Pd.resolve?(Ad=Pd.resolve(void 0),kd=Ad.then,bd=function(){kd.call(Ad,gd)}):bd=function(){Dd.call(xd,gd)});var Md=Ud||function(e){var t={fn:e,next:void 0};yd&&(yd.next=t),vd||(vd=t,bd()),yd=t},jd={},Bd=Rr,qd=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=Bd(t),this.reject=Bd(n)};jd.f=function(e){return new qd(e)};var Gd,Nd,Fd,Vd,Kd=xe,Wd=ae,Hd=jd,zd=function(e,t){if(Kd(e),Wd(t)&&t.constructor===e)return t;var n=Hd.f(e);return(0,n.resolve)(t),n.promise},$d=G,Qd=Tn,Yd=G,Jd=It,Xd=Su,Zd=Le.exports,ec=Du,tc=Dr,nc=Ou,rc=ae,ac=Rr,ic=Lu,sc=Y,oc=Fe,uc=Uu.exports,dc=Bs,cc=Qu,lc=Ed.set,hc=Md,fc=zd,pc=function(e,t){var n=$d.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))},mc=jd,gc=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},vc=vt,yc=bn,bc=ai,_c=vr("species"),wc="Promise",Ac=vc.get,kc=vc.set,Ec=vc.getterFor(wc),xc=Xd,Sc=Yd.TypeError,Tc=Yd.document,Dc=Yd.process,Rc=Jd("fetch"),Ic=mc.f,Cc=Ic,Pc="process"==sc(Dc),Oc=!!(Tc&&Tc.createEvent&&Yd.dispatchEvent),Lc=yc(wc,(function(){if(!(oc(xc)!==String(xc))){if(66===bc)return!0;if(!Pc&&"function"!=typeof PromiseRejectionEvent)return!0}if(bc>=51&&/native code/.test(xc))return!1;var e=xc.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[_c]=t,!(e.then((function(){}))instanceof t)})),Uc=Lc||!dc((function(e){xc.all(e).catch((function(){}))})),Mc=function(e){var t;return!(!rc(e)||"function"!=typeof(t=e.then))&&t},jc=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;hc((function(){for(var a=t.value,i=1==t.state,s=0;r.length>s;){var o,u,d,c=r[s++],l=i?c.ok:c.fail,h=c.resolve,f=c.reject,p=c.domain;try{l?(i||(2===t.rejection&&Nc(e,t),t.rejection=1),!0===l?o=a:(p&&p.enter(),o=l(a),p&&(p.exit(),d=!0)),o===c.promise?f(Sc("Promise-chain cycle")):(u=Mc(o))?u.call(o,h,f):h(o)):f(a)}catch(e){p&&!d&&p.exit(),f(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&qc(e,t)}))}},Bc=function(e,t,n){var r,a;Oc?((r=Tc.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Yd.dispatchEvent(r)):r={promise:t,reason:n},(a=Yd["on"+e])?a(r):"unhandledrejection"===e&&pc("Unhandled promise rejection",n)},qc=function(e,t){lc.call(Yd,(function(){var n,r=t.value;if(Gc(t)&&(n=gc((function(){Pc?Dc.emit("unhandledRejection",r,e):Bc("unhandledrejection",e,r)})),t.rejection=Pc||Gc(t)?2:1,n.error))throw n.value}))},Gc=function(e){return 1!==e.rejection&&!e.parent},Nc=function(e,t){lc.call(Yd,(function(){Pc?Dc.emit("rejectionHandled",e):Bc("rejectionhandled",e,t.value)}))},Fc=function(e,t,n,r){return function(a){e(t,n,a,r)}},Vc=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,jc(e,t,!0))},Kc=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw Sc("Promise can't be resolved itself");var a=Mc(n);a?hc((function(){var r={done:!1};try{a.call(n,Fc(Kc,e,r,t),Fc(Vc,e,r,t))}catch(n){Vc(e,r,n,t)}})):(t.value=n,t.state=1,jc(e,t,!1))}catch(n){Vc(e,{done:!1},n,t)}}};Lc&&(xc=function(e){ic(this,xc,wc),ac(e),Gd.call(this);var t=Ac(this);try{e(Fc(Kc,this,t),Fc(Vc,this,t))}catch(e){Vc(this,t,e)}},(Gd=function(e){kc(this,{type:wc,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=ec(xc.prototype,{then:function(e,t){var n=Ec(this),r=Ic(cc(this,xc));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=Pc?Dc.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&jc(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Nd=function(){var e=new Gd,t=Ac(e);this.promise=e,this.resolve=Fc(Kc,e,t),this.reject=Fc(Vc,e,t)},mc.f=Ic=function(e){return e===xc||e===Fd?new Nd(e):Cc(e)},"function"==typeof Xd&&(Vd=Xd.prototype.then,Zd(Xd.prototype,"then",(function(e,t){var n=this;return new xc((function(e,t){Vd.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof Rc&&Qd({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return fc(xc,Rc.apply(Yd,arguments))}}))),Qd({global:!0,wrap:!0,forced:Lc},{Promise:xc}),tc(xc,wc,!1),nc(wc),Fd=Jd(wc),Qd({target:wc,stat:!0,forced:Lc},{reject:function(e){var t=Ic(this);return t.reject.call(void 0,e),t.promise}}),Qd({target:wc,stat:!0,forced:Lc},{resolve:function(e){return fc(this,e)}}),Qd({target:wc,stat:!0,forced:Uc},{all:function(e){var t=this,n=Ic(t),r=n.resolve,a=n.reject,i=gc((function(){var n=ac(t.resolve),i=[],s=0,o=1;uc(e,(function(e){var u=s++,d=!1;i.push(void 0),o++,n.call(t,e).then((function(e){d||(d=!0,i[u]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=Ic(t),r=n.reject,a=gc((function(){var a=ac(t.resolve);uc(e,(function(e){a.call(t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var Wc=Tn,Hc=F,zc=Gn,$c=ae,Qc=Rn,Yc=jt,Jc=Vi,Xc=Ur,Zc=ui,el=ai,tl=vr("isConcatSpreadable"),nl=el>=51||!Hc((function(){var e=[];return e[tl]=!1,e.concat()[0]!==e})),rl=Zc("concat"),al=function(e){if(!$c(e))return!1;var t=e[tl];return void 0!==t?!!t:zc(e)};Wc({target:"Array",proto:!0,forced:!nl||!rl},{concat:function(e){var t,n,r,a,i,s=Qc(this),o=Xc(s,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(al(i=-1===t?s:arguments[t])){if(u+(a=Yc(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<a;n++,u++)n in i&&Jc(o,u,i[n])}else{if(u>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Jc(o,u++,i)}return o.length=u,o}});var il=V,sl=ke.f,ol=Function.prototype,ul=ol.toString,dl=/^\s*function ([^ (]*)/;function cl(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 ll(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 ll(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function ll(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 hl(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 fl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hl(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}il&&!("name"in ol)&&sl(ol,"name",{configurable:!0,get:function(){try{return ul.call(this).match(dl)[1]}catch(e){return""}}});var pl={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"}},ml={},gl=function(e,t){ml[e]=fl(fl({},t),{},{isLoading:!1})},vl=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(k.default(this,t),document.getElementById(n))e();else{var i=document.createElement("script");i.onload=function(){e()},i.id=n,i.setAttribute("crossorigin",!0),i.src=r,document.head.appendChild(i)}}.bind(this))},yl=function(){var e=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,u,d;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(r=ml[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=cl(r.dependencies),e.prev=8,a.s();case 10:if((i=a.n()).done){e.next=26;break}if(s=i.value,e.prev=12,o=pl[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,vl({id:s,src:pl[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),u=s.id,d=s.src,console.log("Could not load external script ".concat(u," ").concat(d),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,vl({id:t,src:r.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(r.source,"."),e.t2);case 43:return r.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(t){return e.apply(this,arguments)}}(),bl=new function e(){var t=this;S.default(this,e),T.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yl("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),T.default(this,"showLeaderboard",function(){var e=A.default(x.default.mark((function e(n){var r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),T.default(this,"addScore",function(){var e=A.default(x.default.mark((function e(n){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},gl(this.moduleName,this.moduleConfig)},_l=xe,wl=function(){var e=_l(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Al={},kl=F;function El(e,t){return RegExp(e,t)}Al.UNSUPPORTED_Y=kl((function(){var e=El("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Al.BROKEN_CARET=kl((function(){var e=El("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var xl=wl,Sl=Al,Tl=RegExp.prototype.exec,Dl=String.prototype.replace,Rl=Tl,Il=function(){var e=/a/,t=/b*/g;return Tl.call(e,"a"),Tl.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Cl=Sl.UNSUPPORTED_Y||Sl.BROKEN_CARET,Pl=void 0!==/()??/.exec("")[1];(Il||Pl||Cl)&&(Rl=function(e){var t,n,r,a,i=this,s=Cl&&i.sticky,o=xl.call(i),u=i.source,d=0,c=e;return s&&(-1===(o=o.replace("y","")).indexOf("g")&&(o+="g"),c=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(u="(?: "+u+")",c=" "+c,d++),n=new RegExp("^(?:"+u+")",o)),Pl&&(n=new RegExp("^"+u+"$(?!\\s)",o)),Il&&(t=i.lastIndex),r=Tl.call(s?n:i,c),s?r?(r.input=r.input.slice(d),r[0]=r[0].slice(d),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Il&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),Pl&&r&&r.length>1&&Dl.call(r[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)})),r});var Ol=Rl;Tn({target:"RegExp",proto:!0,forced:/./.exec!==Ol},{exec:Ol});var Ll=Le.exports,Ul=F,Ml=vr,jl=Ol,Bl=Oe,ql=Ml("species"),Gl=!Ul((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Nl="$0"==="a".replace(/./,"$0"),Fl=Ml("replace"),Vl=!!/./[Fl]&&""===/./[Fl]("a","$0"),Kl=!Ul((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Wl=function(e,t,n,r){var a=Ml(e),i=!Ul((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!Ul((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ql]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||"replace"===e&&(!Gl||!Nl||Vl)||"split"===e&&!Kl){var o=/./[a],u=n(a,""[e],(function(e,t,n,r,a){return t.exec===jl?i&&!a?{done:!0,value:o.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Nl,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Vl}),d=u[0],c=u[1];Ll(String.prototype,e,d),Ll(RegExp.prototype,a,2==t?function(e,t){return c.call(e,this,t)}:function(e){return c.call(e,this)})}r&&Bl(RegExp.prototype[a],"sham",!0)},Hl=Hs.charAt,zl=function(e,t,n){return t+(n?Hl(e,t).length:1)},$l=Y,Ql=Ol,Yl=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==$l(e))throw TypeError("RegExp#exec called on incompatible receiver");return Ql.call(e,t)},Jl=Wl,Xl=xe,Zl=Rn,eh=jt,th=Lt,nh=ee,rh=zl,ah=Yl,ih=Math.max,sh=Math.min,oh=Math.floor,uh=/\$([$&'`]|\d\d?|<[^>]*>)/g,dh=/\$([$&'`]|\d\d?)/g;Jl("replace",2,(function(e,t,n,r){var a=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,s=a?"$":"$0";return[function(n,r){var a=nh(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,a,r):t.call(String(a),n,r)},function(e,r){if(!a&&i||"string"==typeof r&&-1===r.indexOf(s)){var u=n(t,e,this,r);if(u.done)return u.value}var d=Xl(e),c=String(this),l="function"==typeof r;l||(r=String(r));var h=d.global;if(h){var f=d.unicode;d.lastIndex=0}for(var p=[];;){var m=ah(d,c);if(null===m)break;if(p.push(m),!h)break;""===String(m[0])&&(d.lastIndex=rh(c,eh(d.lastIndex),f))}for(var g,v="",y=0,b=0;b<p.length;b++){m=p[b];for(var _=String(m[0]),w=ih(sh(th(m.index),c.length),0),A=[],k=1;k<m.length;k++)A.push(void 0===(g=m[k])?g:String(g));var E=m.groups;if(l){var x=[_].concat(A,w,c);void 0!==E&&x.push(E);var S=String(r.apply(void 0,x))}else S=o(_,c,w,A,E,r);w>=y&&(v+=c.slice(y,w)+S,y=w+_.length)}return v+c.slice(y)}];function o(e,n,r,a,i,s){var o=r+e.length,u=a.length,d=dh;return void 0!==i&&(i=Zl(i),d=uh),t.call(s,d,(function(t,s){var d;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(o);case"<":d=i[s.slice(1,-1)];break;default:var c=+s;if(0===c)return t;if(c>u){var l=oh(c/10);return 0===l?t:l<=u?void 0===a[l-1]?s.charAt(1):a[l-1]+s.charAt(1):t}d=a[c-1]}return void 0===d?"":d}))}}));var ch=F,lh=vr("iterator"),hh=!ch((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[lh]||"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})),fh=V,ph=F,mh=Pn,gh=tn,vh=K,yh=Rn,bh=Z,_h=Object.assign,wh=Object.defineProperty,Ah=!_h||ph((function(){if(fh&&1!==_h({b:1},_h(wh({},"a",{enumerable:!0,get:function(){wh(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!=_h({},e)[n]||mh(_h({},t)).join("")!=r}))?function(e,t){for(var n=yh(e),r=arguments.length,a=1,i=gh.f,s=vh.f;r>a;)for(var o,u=bh(arguments[a++]),d=i?mh(u).concat(i(u)):mh(u),c=d.length,l=0;c>l;)o=d[l++],fh&&!s.call(u,o)||(n[o]=u[o]);return n}:_h,kh=/[^\0-\u007E]/,Eh=/[.\u3002\uFF0E\uFF61]/g,xh="Overflow: input needs wider integers to process",Sh=Math.floor,Th=String.fromCharCode,Dh=function(e){return e+22+75*(e<26)},Rh=function(e,t,n){var r=0;for(e=n?Sh(e/700):e>>1,e+=Sh(e/t);e>455;r+=36)e=Sh(e/35);return Sh(r+36*e/(e+38))},Ih=function(e){var t,n,r=[],a=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&a)<<10)+(1023&i)+65536):(t.push(a),n--)}else t.push(a)}return t}(e)).length,i=128,s=0,o=72;for(t=0;t<e.length;t++)(n=e[t])<128&&r.push(Th(n));var u=r.length,d=u;for(u&&r.push("-");d<a;){var c=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=i&&n<c&&(c=n);var l=d+1;if(c-i>Sh((2147483647-s)/l))throw RangeError(xh);for(s+=(c-i)*l,i=c,t=0;t<e.length;t++){if((n=e[t])<i&&++s>2147483647)throw RangeError(xh);if(n==i){for(var h=s,f=36;;f+=36){var p=f<=o?1:f>=o+26?26:f-o;if(h<p)break;var m=h-p,g=36-p;r.push(Th(Dh(p+m%g))),h=Sh(m/g)}r.push(Th(Dh(h))),o=Rh(s,l,d==u),s=0,++d}}++s,++i}return r.join("")},Ch=xe,Ph=xs,Oh=Tn,Lh=It,Uh=hh,Mh=Le.exports,jh=Du,Bh=Dr,qh=fo,Gh=vt,Nh=Lu,Fh=ue,Vh=Cr,Kh=ws,Wh=xe,Hh=ae,zh=nr,$h=$,Qh=function(e){var t=Ph(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return Ch(t.call(e))},Yh=xs,Jh=vr,Xh=Lh("fetch"),Zh=Lh("Headers"),ef=Jh("iterator"),tf=Gh.set,nf=Gh.getterFor("URLSearchParams"),rf=Gh.getterFor("URLSearchParamsIterator"),af=/\+/g,sf=Array(4),of=function(e){return sf[e-1]||(sf[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},uf=function(e){try{return decodeURIComponent(e)}catch(t){return e}},df=function(e){var t=e.replace(af," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(of(n--),uf);return t}},cf=/[!'()~]|%20/g,lf={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},hf=function(e){return lf[e]},ff=function(e){return encodeURIComponent(e).replace(cf,hf)},pf=function(e,t){if(t)for(var n,r,a=t.split("&"),i=0;i<a.length;)(n=a[i++]).length&&(r=n.split("="),e.push({key:df(r.shift()),value:df(r.join("="))}))},mf=function(e){this.entries.length=0,pf(this.entries,e)},gf=function(e,t){if(e<t)throw TypeError("Not enough arguments")},vf=qh((function(e,t){tf(this,{type:"URLSearchParamsIterator",iterator:Qh(nf(e).entries),kind:t})}),"Iterator",(function(){var e=rf(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})),yf=function(){Nh(this,yf,"URLSearchParams");var e,t,n,r,a,i,s,o,u,d=arguments.length>0?arguments[0]:void 0,c=this,l=[];if(tf(c,{type:"URLSearchParams",entries:l,updateURL:function(){},updateSearchParams:mf}),void 0!==d)if(Hh(d))if("function"==typeof(e=Yh(d)))for(n=(t=e.call(d)).next;!(r=n.call(t)).done;){if((s=(i=(a=Qh(Wh(r.value))).next).call(a)).done||(o=i.call(a)).done||!i.call(a).done)throw TypeError("Expected sequence with length 2");l.push({key:s.value+"",value:o.value+""})}else for(u in d)Fh(d,u)&&l.push({key:u,value:d[u]+""});else pf(l,"string"==typeof d?"?"===d.charAt(0)?d.slice(1):d:d+"")},bf=yf.prototype;jh(bf,{append:function(e,t){gf(arguments.length,2);var n=nf(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){gf(arguments.length,1);for(var t=nf(this),n=t.entries,r=e+"",a=0;a<n.length;)n[a].key===r?n.splice(a,1):a++;t.updateURL()},get:function(e){gf(arguments.length,1);for(var t=nf(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){gf(arguments.length,1);for(var t=nf(this).entries,n=e+"",r=[],a=0;a<t.length;a++)t[a].key===n&&r.push(t[a].value);return r},has:function(e){gf(arguments.length,1);for(var t=nf(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){gf(arguments.length,1);for(var n,r=nf(this),a=r.entries,i=!1,s=e+"",o=t+"",u=0;u<a.length;u++)(n=a[u]).key===s&&(i?a.splice(u--,1):(i=!0,n.value=o));i||a.push({key:s,value:o}),r.updateURL()},sort:function(){var e,t,n,r=nf(this),a=r.entries,i=a.slice();for(a.length=0,n=0;n<i.length;n++){for(e=i[n],t=0;t<n;t++)if(a[t].key>e.key){a.splice(t,0,e);break}t===n&&a.push(e)}r.updateURL()},forEach:function(e){for(var t,n=nf(this).entries,r=Vh(e,arguments.length>1?arguments[1]:void 0,3),a=0;a<n.length;)r((t=n[a++]).value,t.key,this)},keys:function(){return new vf(this,"keys")},values:function(){return new vf(this,"values")},entries:function(){return new vf(this,"entries")}},{enumerable:!0}),Mh(bf,ef,bf.entries),Mh(bf,"toString",(function(){for(var e,t=nf(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(ff(e.key)+"="+ff(e.value));return n.join("&")}),{enumerable:!0}),Bh(yf,"URLSearchParams"),Oh({global:!0,forced:!Uh},{URLSearchParams:yf}),Uh||"function"!=typeof Xh||"function"!=typeof Zh||Oh({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,a=[e];return arguments.length>1&&(Hh(t=arguments[1])&&(n=t.body,"URLSearchParams"===Kh(n)&&((r=t.headers?new Zh(t.headers):new Zh).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=zh(t,{body:$h(0,String(n)),headers:$h(0,r)}))),a.push(t)),Xh.apply(this,a)}});var _f,wf={URLSearchParams:yf,getState:nf},Af=Tn,kf=V,Ef=hh,xf=G,Sf=Kn,Tf=Le.exports,Df=Lu,Rf=ue,If=Ah,Cf=Os,Pf=Hs.codeAt,Of=function(e){var t,n,r=[],a=e.toLowerCase().replace(Eh,".").split(".");for(t=0;t<a.length;t++)n=a[t],r.push(kh.test(n)?"xn--"+Ih(n):n);return r.join(".")},Lf=Dr,Uf=wf,Mf=vt,jf=xf.URL,Bf=Uf.URLSearchParams,qf=Uf.getState,Gf=Mf.set,Nf=Mf.getterFor("URL"),Ff=Math.floor,Vf=Math.pow,Kf=/[A-Za-z]/,Wf=/[\d+-.A-Za-z]/,Hf=/\d/,zf=/^(0x|0X)/,$f=/^[0-7]+$/,Qf=/^\d+$/,Yf=/^[\dA-Fa-f]+$/,Jf=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,Xf=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,Zf=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,ep=/[\u0009\u000A\u000D]/g,tp=function(e,t){var n,r,a;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=rp(t.slice(1,-1))))return"Invalid host";e.host=n}else if(lp(e)){if(t=Of(t),Jf.test(t))return"Invalid host";if(null===(n=np(t)))return"Invalid host";e.host=n}else{if(Xf.test(t))return"Invalid host";for(n="",r=Cf(t),a=0;a<r.length;a++)n+=dp(r[a],ip);e.host=n}},np=function(e){var t,n,r,a,i,s,o,u=e.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=u[r]))return e;if(i=10,a.length>1&&"0"==a.charAt(0)&&(i=zf.test(a)?16:8,a=a.slice(8==i?1:2)),""===a)s=0;else{if(!(10==i?Qf:8==i?$f:Yf).test(a))return e;s=parseInt(a,i)}n.push(s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=Vf(256,5-t))return null}else if(s>255)return null;for(o=n.pop(),r=0;r<n.length;r++)o+=n[r]*Vf(256,3-r);return o},rp=function(e){var t,n,r,a,i,s,o,u=[0,0,0,0,0,0,0,0],d=0,c=null,l=0,h=function(){return e.charAt(l)};if(":"==h()){if(":"!=e.charAt(1))return;l+=2,c=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=n=0;n<4&&Yf.test(h());)t=16*t+parseInt(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,d>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;l++}if(!Hf.test(h()))return;for(;Hf.test(h());){if(i=parseInt(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}u[d]=256*u[d]+a,2!=++r&&4!=r||d++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;u[d++]=t}else{if(null!==c)return;l++,c=++d}}if(null!==c)for(s=d-c,d=7;0!=d&&s>0;)o=u[d],u[d--]=u[c+s-1],u[c+--s]=o;else if(8!=d)return;return u},ap=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=Ff(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,i=0;i<8;i++)0!==e[i]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=i),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},ip={},sp=If({},ip,{" ":1,'"':1,"<":1,">":1,"`":1}),op=If({},sp,{"#":1,"?":1,"{":1,"}":1}),up=If({},op,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),dp=function(e,t){var n=Pf(e,0);return n>32&&n<127&&!Rf(t,e)?e:encodeURIComponent(e)},cp={ftp:21,file:null,http:80,https:443,ws:80,wss:443},lp=function(e){return Rf(cp,e.scheme)},hp=function(e){return""!=e.username||""!=e.password},fp=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},pp=function(e,t){var n;return 2==e.length&&Kf.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},mp=function(e){var t;return e.length>1&&pp(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},gp=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&pp(t[0],!0)||t.pop()},vp=function(e){return"."===e||"%2e"===e.toLowerCase()},yp={},bp={},_p={},wp={},Ap={},kp={},Ep={},xp={},Sp={},Tp={},Dp={},Rp={},Ip={},Cp={},Pp={},Op={},Lp={},Up={},Mp={},jp={},Bp={},qp=function(e,t,n,r){var a,i,s,o,u,d=n||yp,c=0,l="",h=!1,f=!1,p=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(Zf,"")),t=t.replace(ep,""),a=Cf(t);c<=a.length;){switch(i=a[c],d){case yp:if(!i||!Kf.test(i)){if(n)return"Invalid scheme";d=_p;continue}l+=i.toLowerCase(),d=bp;break;case bp:if(i&&(Wf.test(i)||"+"==i||"-"==i||"."==i))l+=i.toLowerCase();else{if(":"!=i){if(n)return"Invalid scheme";l="",d=_p,c=0;continue}if(n&&(lp(e)!=Rf(cp,l)||"file"==l&&(hp(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=l,n)return void(lp(e)&&cp[e.scheme]==e.port&&(e.port=null));l="","file"==e.scheme?d=Cp:lp(e)&&r&&r.scheme==e.scheme?d=wp:lp(e)?d=xp:"/"==a[c+1]?(d=Ap,c++):(e.cannotBeABaseURL=!0,e.path.push(""),d=Mp)}break;case _p:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){e.scheme=r.scheme,e.path=r.path.slice(),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,d=Bp;break}d="file"==r.scheme?Cp:kp;continue;case wp:if("/"!=i||"/"!=a[c+1]){d=kp;continue}d=Sp,c++;break;case Ap:if("/"==i){d=Tp;break}d=Up;continue;case kp:if(e.scheme=r.scheme,i==_f)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query;else if("/"==i||"\\"==i&&lp(e))d=Ep;else if("?"==i)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query="",d=jp;else{if("#"!=i){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.path.pop(),d=Up;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query,e.fragment="",d=Bp}break;case Ep:if(!lp(e)||"/"!=i&&"\\"!=i){if("/"!=i){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,d=Up;continue}d=Tp}else d=Sp;break;case xp:if(d=Sp,"/"!=i||"/"!=l.charAt(c+1))continue;c++;break;case Sp:if("/"!=i&&"\\"!=i){d=Tp;continue}break;case Tp:if("@"==i){h&&(l="%40"+l),h=!0,s=Cf(l);for(var m=0;m<s.length;m++){var g=s[m];if(":"!=g||p){var v=dp(g,up);p?e.password+=v:e.username+=v}else p=!0}l=""}else if(i==_f||"/"==i||"?"==i||"#"==i||"\\"==i&&lp(e)){if(h&&""==l)return"Invalid authority";c-=Cf(l).length+1,l="",d=Dp}else l+=i;break;case Dp:case Rp:if(n&&"file"==e.scheme){d=Op;continue}if(":"!=i||f){if(i==_f||"/"==i||"?"==i||"#"==i||"\\"==i&&lp(e)){if(lp(e)&&""==l)return"Invalid host";if(n&&""==l&&(hp(e)||null!==e.port))return;if(o=tp(e,l))return o;if(l="",d=Lp,n)return;continue}"["==i?f=!0:"]"==i&&(f=!1),l+=i}else{if(""==l)return"Invalid host";if(o=tp(e,l))return o;if(l="",d=Ip,n==Rp)return}break;case Ip:if(!Hf.test(i)){if(i==_f||"/"==i||"?"==i||"#"==i||"\\"==i&&lp(e)||n){if(""!=l){var y=parseInt(l,10);if(y>65535)return"Invalid port";e.port=lp(e)&&y===cp[e.scheme]?null:y,l=""}if(n)return;d=Lp;continue}return"Invalid port"}l+=i;break;case Cp:if(e.scheme="file","/"==i||"\\"==i)d=Pp;else{if(!r||"file"!=r.scheme){d=Up;continue}if(i==_f)e.host=r.host,e.path=r.path.slice(),e.query=r.query;else if("?"==i)e.host=r.host,e.path=r.path.slice(),e.query="",d=jp;else{if("#"!=i){mp(a.slice(c).join(""))||(e.host=r.host,e.path=r.path.slice(),gp(e)),d=Up;continue}e.host=r.host,e.path=r.path.slice(),e.query=r.query,e.fragment="",d=Bp}}break;case Pp:if("/"==i||"\\"==i){d=Op;break}r&&"file"==r.scheme&&!mp(a.slice(c).join(""))&&(pp(r.path[0],!0)?e.path.push(r.path[0]):e.host=r.host),d=Up;continue;case Op:if(i==_f||"/"==i||"\\"==i||"?"==i||"#"==i){if(!n&&pp(l))d=Up;else if(""==l){if(e.host="",n)return;d=Lp}else{if(o=tp(e,l))return o;if("localhost"==e.host&&(e.host=""),n)return;l="",d=Lp}continue}l+=i;break;case Lp:if(lp(e)){if(d=Up,"/"!=i&&"\\"!=i)continue}else if(n||"?"!=i)if(n||"#"!=i){if(i!=_f&&(d=Up,"/"!=i))continue}else e.fragment="",d=Bp;else e.query="",d=jp;break;case Up:if(i==_f||"/"==i||"\\"==i&&lp(e)||!n&&("?"==i||"#"==i)){if(".."===(u=(u=l).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(gp(e),"/"==i||"\\"==i&&lp(e)||e.path.push("")):vp(l)?"/"==i||"\\"==i&&lp(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&pp(l)&&(e.host&&(e.host=""),l=l.charAt(0)+":"),e.path.push(l)),l="","file"==e.scheme&&(i==_f||"?"==i||"#"==i))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==i?(e.query="",d=jp):"#"==i&&(e.fragment="",d=Bp)}else l+=dp(i,op);break;case Mp:"?"==i?(e.query="",d=jp):"#"==i?(e.fragment="",d=Bp):i!=_f&&(e.path[0]+=dp(i,ip));break;case jp:n||"#"!=i?i!=_f&&("'"==i&&lp(e)?e.query+="%27":e.query+="#"==i?"%23":dp(i,ip)):(e.fragment="",d=Bp);break;case Bp:i!=_f&&(e.fragment+=dp(i,sp))}c++}},Gp=function(e){var t,n,r=Df(this,Gp,"URL"),a=arguments.length>1?arguments[1]:void 0,i=String(e),s=Gf(r,{type:"URL"});if(void 0!==a)if(a instanceof Gp)t=Nf(a);else if(n=qp(t={},String(a)))throw TypeError(n);if(n=qp(s,i,null,t))throw TypeError(n);var o=s.searchParams=new Bf,u=qf(o);u.updateSearchParams(s.query),u.updateURL=function(){s.query=String(o)||null},kf||(r.href=Fp.call(r),r.origin=Vp.call(r),r.protocol=Kp.call(r),r.username=Wp.call(r),r.password=Hp.call(r),r.host=zp.call(r),r.hostname=$p.call(r),r.port=Qp.call(r),r.pathname=Yp.call(r),r.search=Jp.call(r),r.searchParams=Xp.call(r),r.hash=Zp.call(r))},Np=Gp.prototype,Fp=function(){var e=Nf(this),t=e.scheme,n=e.username,r=e.password,a=e.host,i=e.port,s=e.path,o=e.query,u=e.fragment,d=t+":";return null!==a?(d+="//",hp(e)&&(d+=n+(r?":"+r:"")+"@"),d+=ap(a),null!==i&&(d+=":"+i)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==o&&(d+="?"+o),null!==u&&(d+="#"+u),d},Vp=function(){var e=Nf(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&lp(e)?t+"://"+ap(e.host)+(null!==n?":"+n:""):"null"},Kp=function(){return Nf(this).scheme+":"},Wp=function(){return Nf(this).username},Hp=function(){return Nf(this).password},zp=function(){var e=Nf(this),t=e.host,n=e.port;return null===t?"":null===n?ap(t):ap(t)+":"+n},$p=function(){var e=Nf(this).host;return null===e?"":ap(e)},Qp=function(){var e=Nf(this).port;return null===e?"":String(e)},Yp=function(){var e=Nf(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Jp=function(){var e=Nf(this).query;return e?"?"+e:""},Xp=function(){return Nf(this).searchParams},Zp=function(){var e=Nf(this).fragment;return e?"#"+e:""},em=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(kf&&Sf(Np,{href:em(Fp,(function(e){var t=Nf(this),n=String(e),r=qp(t,n);if(r)throw TypeError(r);qf(t.searchParams).updateSearchParams(t.query)})),origin:em(Vp),protocol:em(Kp,(function(e){var t=Nf(this);qp(t,String(e)+":",yp)})),username:em(Wp,(function(e){var t=Nf(this),n=Cf(String(e));if(!fp(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=dp(n[r],up)}})),password:em(Hp,(function(e){var t=Nf(this),n=Cf(String(e));if(!fp(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=dp(n[r],up)}})),host:em(zp,(function(e){var t=Nf(this);t.cannotBeABaseURL||qp(t,String(e),Dp)})),hostname:em($p,(function(e){var t=Nf(this);t.cannotBeABaseURL||qp(t,String(e),Rp)})),port:em(Qp,(function(e){var t=Nf(this);fp(t)||(""==(e=String(e))?t.port=null:qp(t,e,Ip))})),pathname:em(Yp,(function(e){var t=Nf(this);t.cannotBeABaseURL||(t.path=[],qp(t,e+"",Lp))})),search:em(Jp,(function(e){var t=Nf(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",qp(t,e,jp)),qf(t.searchParams).updateSearchParams(t.query)})),searchParams:em(Xp),hash:em(Zp,(function(e){var t=Nf(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",qp(t,e,Bp)):t.fragment=null}))}),Tf(Np,"toJSON",(function(){return Fp.call(this)}),{enumerable:!0}),Tf(Np,"toString",(function(){return Fp.call(this)}),{enumerable:!0}),jf){var tm=jf.createObjectURL,nm=jf.revokeObjectURL;tm&&Tf(Gp,"createObjectURL",(function(e){return tm.apply(jf,arguments)})),nm&&Tf(Gp,"revokeObjectURL",(function(e){return nm.apply(jf,arguments)}))}Lf(Gp,"URL"),Af({global:!0,forced:!Ef,sham:!kf},{URL:Gp});var rm=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},am=xe,im=ee,sm=rm,om=Yl;Wl("search",1,(function(e,t,n){return[function(t){var n=im(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=am(e),i=String(this),s=a.lastIndex;sm(s,0)||(a.lastIndex=0);var o=om(a,i);return sm(a.lastIndex,s)||(a.lastIndex=s),null===o?-1:o.index}]}));var um=Ht.includes,dm=eu;Tn({target:"Array",proto:!0,forced:!mi("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return um(this,e,arguments.length>1?arguments[1]:void 0)}}),dm("includes");var cm=ae,lm=Y,hm=vr("match"),fm=function(e){var t;return cm(e)&&(void 0!==(t=e[hm])?!!t:"RegExp"==lm(e))},pm=fm,mm=function(e){if(pm(e))throw TypeError("The method doesn't accept regular expressions");return e},gm=vr("match"),vm=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[gm]=!1,"/./"[e](t)}catch(e){}}return!1},ym=mm,bm=ee;Tn({target:"String",proto:!0,forced:!vm("includes")},{includes:function(e){return!!~String(bm(this)).indexOf(ym(e),arguments.length>1?arguments[1]:void 0)}});var _m=Wl,wm=fm,Am=xe,km=ee,Em=Qu,xm=zl,Sm=jt,Tm=Yl,Dm=Ol,Rm=F,Im=[].push,Cm=Math.min,Pm=!Rm((function(){return!RegExp(4294967295,"y")}));function Om(e){var t=this,n={},r=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,i=(null==e?void 0:e.self_origin)||window.location.origin,s=(null==e?void 0:e.referrer_url)||document.referrer;function o(e){return C.default(n,e)}function u(e,t){return P.default(n,e,t)}function d(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new D.default(e,t)}catch(e){console.log(e)}}function c(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=d(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=decodeURIComponent(o),R.default.isURL(o)))return o}}}return function(){var e;k.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){u("depth.error",e.message)}u("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(u("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],u("top.domain.from","origins");else if(0===t)a=i,u("top.domain.from","self-top");else if(1===t){var o=d(s);o&&(a=o.origin,u("top.domain.from","referrer"))}u("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(I.default(e))u("partner.domain.value",e),u("partner.domain.from","partner-domain");else{var t=d(e,!1);if(t)u("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),u("partner.domain.from","partner-url");else u("partner.domain.value",n.top.domain.value),u("partner.domain.from","partner-fallback")}else u("partner.domain.value",n.top.domain.value),u("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(u("partner.url.value",a),u("partner.url.from","self-top")):e?I.default(e)?(u("partner.url.value",a),u("partner.url.from","partner-domain")):(u("partner.url.value",e),u("partner.url.from","partner-url")):(u("partner.url.value",s),u("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}_m("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(km(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!wm(e))return t.call(r,e,a);for(var i,s,o,u=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,l=new RegExp(e.source,d+"g");(i=Dm.call(l,r))&&!((s=l.lastIndex)>c&&(u.push(r.slice(c,i.index)),i.length>1&&i.index<r.length&&Im.apply(u,i.slice(1)),o=i[0].length,c=s,u.length>=a));)l.lastIndex===i.index&&l.lastIndex++;return c===r.length?!o&&l.test("")||u.push(""):u.push(r.slice(c)),u.length>a?u.slice(0,a):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var a=km(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,a,n):r.call(String(a),t,n)},function(e,a){var i=n(r,e,this,a,r!==t);if(i.done)return i.value;var s=Am(e),o=String(this),u=Em(s,RegExp),d=s.unicode,c=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(Pm?"y":"g"),l=new u(Pm?s:"^(?:"+s.source+")",c),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===o.length)return null===Tm(l,o)?[o]:[];for(var f=0,p=0,m=[];p<o.length;){l.lastIndex=Pm?p:0;var g,v=Tm(l,Pm?o:o.slice(p));if(null===v||(g=Cm(Sm(l.lastIndex+(Pm?0:p)),o.length))===f)p=xm(o,p,d);else{if(m.push(o.slice(f,p)),m.length===h)return m;for(var y=1;y<=v.length-1;y++)if(m.push(v[y]),m.length===h)return m;p=f=g}}return m.push(o.slice(f)),m}]}),!Pm);var Lm={name:"@bygd/gd-sdk-pes",version:"1.28.2",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.4","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"}},Um="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Um&&Um,Mm="URLSearchParams"in Um,jm="Symbol"in Um&&"iterator"in Symbol,Bm="FileReader"in Um&&"Blob"in Um&&function(){try{return new Blob,!0}catch(e){return!1}}(),qm="FormData"in Um,Gm="ArrayBuffer"in Um;if(Gm)var Nm=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Fm=ArrayBuffer.isView||function(e){return e&&Nm.indexOf(Object.prototype.toString.call(e))>-1};function Vm(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function Km(e){return"string"!=typeof e&&(e=String(e)),e}function Wm(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return jm&&(t[Symbol.iterator]=function(){return t}),t}function Hm(e){this.map={},e instanceof Hm?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 zm(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function $m(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Qm(e){var t=new FileReader,n=$m(t);return t.readAsArrayBuffer(e),n}function Ym(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Jm(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Bm&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:qm&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Mm&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Gm&&Bm&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Ym(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Gm&&(ArrayBuffer.prototype.isPrototypeOf(e)||Fm(e))?this._bodyArrayBuffer=Ym(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):Mm&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Bm&&(this.blob=function(){var e=zm(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=zm(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(Qm)}),this.text=function(){var e=zm(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=$m(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)},qm&&(this.formData=function(){return this.text().then(eg)}),this.json=function(){return this.text().then(JSON.parse)},this}Hm.prototype.append=function(e,t){e=Vm(e),t=Km(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Hm.prototype.delete=function(e){delete this.map[Vm(e)]},Hm.prototype.get=function(e){return e=Vm(e),this.has(e)?this.map[e]:null},Hm.prototype.has=function(e){return this.map.hasOwnProperty(Vm(e))},Hm.prototype.set=function(e,t){this.map[Vm(e)]=Km(t)},Hm.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Hm.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Wm(e)},Hm.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Wm(e)},Hm.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Wm(e)},jm&&(Hm.prototype[Symbol.iterator]=Hm.prototype.entries);var Xm=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Zm(e,t){if(!(this instanceof Zm))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,a=(t=t||{}).body;if(e instanceof Zm){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Hm(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Hm(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Xm.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function eg(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function tg(e,t){if(!(this instanceof tg))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new Hm(t.headers),this.url=t.url||"",this._initBody(e)}Zm.prototype.clone=function(){return new Zm(this,{body:this._bodyInit})},Jm.call(Zm.prototype),Jm.call(tg.prototype),tg.prototype.clone=function(){return new tg(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Hm(this.headers),url:this.url})},tg.error=function(){var e=new tg(null,{status:0,statusText:""});return e.type="error",e};var ng=[301,302,303,307,308];tg.redirect=function(e,t){if(-1===ng.indexOf(t))throw new RangeError("Invalid status code");return new tg(null,{status:t,headers:{location:e}})};var rg=Um.DOMException;try{new rg}catch(e){(rg=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),rg.prototype.constructor=rg}function ag(e,t){return new Promise((function(n,r){var a=new Zm(e,t);if(a.signal&&a.signal.aborted)return r(new rg("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new Hm,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout((function(){n(new tg(a,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){r(new rg("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&Um.location.href?Um.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&(Bm?i.responseType="blob":Gm&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Hm?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,Km(t.headers[e]))})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}ag.polyfill=!0,Um.fetch||(Um.fetch=ag,Um.Headers=Hm,Um.Request=Zm,Um.Response=tg);var ig,sg,og=Array.isArray,ug=Object.prototype.toString,dg=og||function(e){return!!e&&"[object Array]"==ug.call(e)},cg=function(e){var t=lg("object"===E.default(e)?e:a.parseJSON(e));return t&&t.version?Lm.version>=t.version?t:void 0:t},lg=function(e){var t=this;if(!dg(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){k.default(this,t),e.weight=e.weight||1,n+=e.weight}.bind(this));var r=Math.floor(Math.random()*Math.floor(n));n=0;for(var a=0;a<e.length;a++){var i=e[a];if(r<(n+=i.weight))return i}},hg=[],fg=function(e){hg.push(e)},pg=function(){return sg},mg=function(e){var t=this,n="";hg=[],fg("1"),function(e){ig||(ig=new a.MessageRouter({gameId:e.gameId,hours:(new Date).getHours(),topDomain:"gamedistribution.com",domain:"gamedistribution.com",referrer:"gamedistribution.com",depth:0}))}(e),fg("2");var r=new Om;r.get(),fg("3");var i=r.get("partner.domain.value");fg("4");var s=function(){return k.default(this,t),{gameId:e.gameId,enableAds:!0,preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);fg("5");var o=function(){k.default(this,t);var n=u(),r=n?"&mode=".concat(n):"";return"https://game.api.gamedistribution.com/game/v4/get/".concat(e.gameId.replace(/-/g,""),"/?domain=").concat(i).concat(r,"&v=").concat(Lm.version,"&localTime=").concat((new Date).getHours())}.bind(this);fg("6");var u=function(){var e=this;k.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return k.default(this,e),t.get(n)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}.bind(this);return fg("7"),new Promise(function(e){var r=this;if(k.default(this,t),sg)e(sg);else{fg("7.1");var i=s();fg("7.2");var u=o();fg("7.3"),n=u,fetch(u).then(function(e){return k.default(this,r),fg("7.4"),e.json()}.bind(this)).then(function(t){if(k.default(this,r),fg("7.5"),t.success){var n,s,o,u,d=t.result.game;fg("7.6");var c={gameId:d.gameMd5,slug:d.slug,pname:d.pname,dname:d.dname,status:d.status,description:d.description,enableAds:!0===d.enableAds||!0===(null===(n=d.enableAds)||void 0===n?void 0:n.enabled),preroll:d.preRoll,midroll:6e4*d.timeAds,rewardedAds:d.rewardedAds,title:d.title,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,__t4r:d.__t4r||{},block_exts:cg(d.push_cuda),bloc_gard:cg(d.bloc_gard),cookie:cg(d.cookie),gdpr:cg(d.gdpr),diagnostic:cg(d.diagnostic),cmp:cg(d.cmp),gft:cg(d.gft)||{},sdk:cg(d.sdk)||{},sdkfw:cg(d.sdkfw)||{},loader:cg(d.loader)||{},splash:cg(d.splash)||{},promo:cg(d.promo)||{},dAds:cg(d.dads)||{},pAds:cg(d.pads)||{},mAds:cg(d.mads)||{},rAds:cg(d.rads)||{},lp:cg(d.lp)||{},extsc:cg(d.extsc)||{},evnts:cg(d.evnts)||{},dp:cg(d.dp)||{}};fg("7.7");var l=a.extendDefaults(O.default(i),c);fg("7.8"),l.afg_disabled=!1===(null===(s=l.sdk)||void 0===s||null===(o=s.afg)||void 0===o?void 0:o.enabled),fg("7.9"),null!==(u=l.pAds)&&void 0!==u&&u.enabled&&(l.preroll=!0),fg("7.10"),sg=l,e(l)}else i.failed=!0,e(i)}.bind(this)).catch(function(t){k.default(this,r);var a=hg[hg.length-1];console.log("gd:adp failed game data",t);try{ig.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t," url:[").concat(n,"]")})}catch(e){}i.failed=!0,e(i)}.bind(this))}}.bind(this))},gg=function(){var e,t=pg();return!(null==t||null===(e=t.sdkfw)||void 0===e||!e.enabled)},vg=function(){var e,t,n,r,a,i,s=pg(),o=!(null==s||null===(e=s.extsc)||void 0===e||!e.enabled);return{enabled:o,path:o?null==s||null===(t=s.extsc)||void 0===t?void 0:t.path:"",name:o?null==s||null===(n=s.extsc)||void 0===n?void 0:n.name:"",ref:o?null==s||null===(r=s.extsc)||void 0===r?void 0:r.ref:"",loadedFlag:o?null==s||null===(a=s.extsc)||void 0===a?void 0:a.loadedFlag:void 0,loadedFlagCheck:!!o&&!(null==s||null===(i=s.extsc)||void 0===i||!i.loadedFlagCheck)}},yg=function(){var e=A.default(x.default.mark((function e(){var t,n,r,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t=vg()).enabled){e.next=3;break}return e.abrupt("return");case 3:return n=t.path,r=t.name,i=t.ref,e.prev=4,s={},e.next=8,a.getScript(n,r,{error_prefix:"Blocked:",exists:function(){return k.default(this,o),!!i&&!!window[i]}.bind(this),attrs:s});case 8:console.log("extsc: after external partner script load",r,n),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(4),console.log("extsc: error on external partner script load",r,e.t0),a.dankLog("DEVELOPER_ERROR",e.t0,"warning");case 15:case"end":return e.stop()}}),e,this,[[4,11]])})));return function(){return e.apply(this,arguments)}}(),bg=!1,_g=!1,wg=function(){var e=this;return new Promise(function(t,n){var r=this;if(k.default(this,e),bg)return t(_g);bg=!0;var a=vg();if(!a.enabled)return t(!1);var i=a.loadedFlag,s=a.loadedFlagCheck;if(s&&!i)return t(!1);if(!s)return _g=!0,t(!0);var o=!0;setTimeout(function(){k.default(this,r),o&&(console.log("extsc: clearing on wait after timeout"),o=!1,bg=!0,t(!1))}.bind(this),5e3);var u=setInterval(function(){k.default(this,r),o&&s&&window[i]?(console.log("extsc: loaderflag for external script is set!"),o=!1,bg=!0,_g=!0,clearInterval(u),t(!0)):o||(console.log("extsc: clearing interval after timeout"),clearInterval(u))}.bind(this),100)}.bind(this))},Ag=function(e){var t=function(e){var t=this,n=function(e){return k.default(this,t),c("showAd",{adType:e})}.bind(this),r=function(e){return k.default(this,t),c("preloadAd",{adType:e})}.bind(this),a=function(e){return k.default(this,t),c("showDisplayAd",{options:e})}.bind(this),i=function(){return k.default(this,t),c("cancelAd")}.bind(this),s=function(){return k.default(this,t),c("openConsole")}.bind(this),o=function(){return k.default(this,t),c("showBanner")}.bind(this),u=function(){return k.default(this,t),c("session")}.bind(this),d=function(){k.default(this,t),console.log("_sendSDKReady")}.bind(this),c=function(e,n){var r=this;return k.default(this,t),n||(n={}),new Promise(function(t,a){k.default(this,r);try{var i={type:"gd-sdk",method:e,options:n};window.parent.postMessage(i,"https://html5.gamedistribution.com"),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),l=function(){k.default(this,t),window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&(console.log("gd:adp received on-event",r),r&&f(r))}),!1)}.bind(this),h=function(){k.default(this,t),l(),c("init")}.bind(this),f=function(n){k.default(this,t),e.onEvent&&e.onEvent(n)}.bind(this);return{showBanner:o,showAd:n,preloadAd:r,showDisplayAd:a,cancelAd:i,openConsole:s,getSession:u,onEvent:f,init:h,_sendSDKReady:d}}(e);return t.init(),t},kg=function(){var e=this;return{isMasterGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),isTokenGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),isExtHostedGameURL:function(){k.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this)}},Eg=function(e){var t=this;return new Promise(function(n,r){var a=this;k.default(this,t);var i={type:"gd-sdk-frame-handshake-request"},s=!1;window.addEventListener("message",(function(e){var t=e.data,r=e.origin,a=e.source,i=t.type;if("gd-sdk-frame-handshake-request"===i){var o={type:"gd-sdk-frame-handshake-response"};a.postMessage(o,r)}else"gd-sdk-frame-handshake-response"===i&&(s=!0,n({origin:r,source:a}))})),e?n():(setTimeout(function(){k.default(this,a),s||n()}.bind(this),200),window.parent!==window?window.parent.postMessage(i,"*"):n())}.bind(this))},xg=function(){var e=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mg(t);case 2:return e.next=5,gg();case 5:return n=e.sent,console.log("gd:adp ,isSDKForwardEnable",n),r=!n,e.next=10,Eg(r);case 10:if(a=e.sent,n){e.next=13;break}return e.abrupt("return",!1);case 13:return i=kg(),s=i.isMasterGameURL,o=i.isTokenGameURL,u=s(),d=o(),h=void 0,f=void 0,f=pg(),c=gg()&&!(null==f||null===(h=f.sdkfw)||void 0===h||!h.handshake),l=!1,l=c?!u&&!!a:!u,console.log("gd:adp: frameCheck result",{_isMasterGameURL:u,_isTokenGameURL:d,isHandshakeEnabled:c,hsResult:a,result:l}),e.abrupt("return",l);case 21:case"end":return e.stop()}var h,f}),e)})));return function(t){return e.apply(this,arguments)}}(),Sg=V,Tg=Pn,Dg=re,Rg=K.f,Ig=function(e){return function(t){for(var n,r=Dg(t),a=Tg(r),i=a.length,s=0,o=[];i>s;)n=a[s++],Sg&&!Rg.call(r,n)||o.push(e?[n,r[n]]:r[n]);return o}},Cg={entries:Ig(!0),values:Ig(!1)}.values;Tn({target:"Object",stat:!0},{values:function(e){return Cg(e)}});var Pg=Tn,Og=Su,Lg=F,Ug=It,Mg=Qu,jg=zd,Bg=Le.exports;Pg({target:"Promise",proto:!0,real:!0,forced:!!Og&&Lg((function(){Og.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Mg(this,Ug("Promise")),n="function"==typeof e;return this.then(n?function(n){return jg(t,e()).then((function(){return n}))}:e,n?function(n){return jg(t,e()).then((function(){throw n}))}:e)}}),"function"!=typeof Og||Og.prototype.finally||Bg(Og.prototype,"finally",Ug("Promise").prototype.finally);var qg=ee,Gg="[\t\n\v\f\r                 \u2028\u2029\ufeff]",Ng=RegExp("^"+Gg+Gg+"*"),Fg=RegExp(Gg+Gg+"*$"),Vg=function(e){return function(t){var n=String(qg(t));return 1&e&&(n=n.replace(Ng,"")),2&e&&(n=n.replace(Fg,"")),n}},Kg={start:Vg(1),end:Vg(2),trim:Vg(3)},Wg=F,Hg="\t\n\v\f\r                 \u2028\u2029\ufeff",zg=Kg.trim;Tn({target:"String",proto:!0,forced:function(e){return Wg((function(){return!!Hg[e]()||"​…᠎"!="​…᠎"[e]()||Hg[e].name!==e}))}("trim")},{trim:function(){return zg(this)}});var $g=ae,Qg=vo,Yg=V,Jg=G,Xg=bn,Zg=function(e,t,n){var r,a;return Qg&&"function"==typeof(r=t.constructor)&&r!==n&&$g(a=r.prototype)&&a!==n.prototype&&Qg(e,a),e},ev=ke.f,tv=Ct.f,nv=fm,rv=wl,av=Al,iv=Le.exports,sv=F,ov=vt.set,uv=Ou,dv=vr("match"),cv=Jg.RegExp,lv=cv.prototype,hv=/a/g,fv=/a/g,pv=new cv(hv)!==hv,mv=av.UNSUPPORTED_Y;if(Yg&&Xg("RegExp",!pv||mv||sv((function(){return fv[dv]=!1,cv(hv)!=hv||cv(fv)==fv||"/a/i"!=cv(hv,"i")})))){for(var gv=function(e,t){var n,r=this instanceof gv,a=nv(e),i=void 0===t;if(!r&&a&&e.constructor===gv&&i)return e;pv?a&&!i&&(e=e.source):e instanceof gv&&(i&&(t=rv.call(e)),e=e.source),mv&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=Zg(pv?new cv(e,t):cv(e,t),r?this:lv,gv);return mv&&n&&ov(s,{sticky:n}),s},vv=function(e){e in gv||ev(gv,e,{configurable:!0,get:function(){return cv[e]},set:function(t){cv[e]=t}})},yv=tv(cv),bv=0;yv.length>bv;)vv(yv[bv++]);lv.constructor=gv,gv.prototype=lv,iv(Jg,"RegExp",gv)}uv("RegExp");var _v=Le.exports,wv=xe,Av=F,kv=wl,Ev=RegExp.prototype,xv=Ev.toString,Sv=Av((function(){return"/a/b"!=xv.call({source:"a",flags:"b"})})),Tv="toString"!=xv.name;(Sv||Tv)&&_v(RegExp.prototype,"toString",(function(){var e=wv(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in Ev)?kv.call(e):n)}),{unsafe:!0});var Dv,Rv=Tn,Iv=N.f,Cv=jt,Pv=mm,Ov=ee,Lv=vm,Uv="".startsWith,Mv=Math.min,jv=Lv("startsWith");Rv({target:"String",proto:!0,forced:!!(jv||(Dv=Iv(String.prototype,"startsWith"),!Dv||Dv.writable))&&!jv},{startsWith:function(e){var t=String(Ov(this));Pv(e);var n=Cv(Mv(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return Uv?Uv.call(t,r,n):t.slice(n,n+r.length)===r}});var Bv=Tn,qv=Vr.find,Gv=eu,Nv=!0,Fv=mi("find");"find"in[]&&Array(1).find((function(){Nv=!1})),Bv({target:"Array",proto:!0,forced:Nv||!Fv},{find:function(e){return qv(this,e,arguments.length>1?arguments[1]:void 0)}}),Gv("find");var Vv=Ah;Tn({target:"Object",stat:!0,forced:Object.assign!==Vv},{assign:Vv});var Kv=function(){function e(t){S.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return L.default(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new D.default(location.href,!0);for(var a in r.query)t[a]=r.query[a];return Object.keys(t).filter(function(t){var n=this;return k.default(this,e),this.customParamKeys.some(function(e){return k.default(this,n),e===t}.bind(this))}.bind(this)).length>0||n?(console.log("custom-params",t,n),t):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),Wv=function(){function e(t,n){S.default(this,e),this.adContainer=t,this.onResume=n}return L.default(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){k.default(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(t);var n=document.createElement("div");this.adResumeButtonOverlay=n,n.id="gd__resume__button__overlay",n.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(n)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),Hv=function(e){if(!e)return!1;var t=zv.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)},zv=Object.prototype.toString;function $v(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?$v(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yv(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}function Jv(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 Xv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jv(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zv=null,ey=function(){function e(t,n,r){var i=this;if(S.default(this,e),Zv)return Zv;Zv=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=n?a.extendDefaults(s,n):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new a.EventBus,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=a.getIMASampleTags(),this.atom_display,this.adType_="",this.clickCount={midroll:0,preroll:0,rewarded:0},this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==t?document.getElementById(t):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,u=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:u,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){k.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){k.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,i,s,o,u,d,c,l,h,f,p,g,v,b,_,w,E;return L.default(e,[{key:"start",value:(E=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._init_afg_script({adsense_channel:"4089988593"});case 3:return e.next=5,this._init_hl_script();case 5:return e.next=7,this._init_ima_script();case 7:this._createPlayer(),this._setUpIMA(),e.next=14;break;case 11:throw e.prev=11,e.t0=e.catch(0),new Error(e.t0);case 14:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(i){var s,o,u,d,c,l,h,f,p=this;return x.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag"))){r.next=6;break}return s=n.IMASampleTags[e],o=Math.floor(Math.random()*s.length),u=s[o],i({url:u}),r.abrupt("return");case 6:if(void 0!==window.idhb.requestAds){r.next=8;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 8:return r.prev=8,d=n.nextAdPosition(e),n.eventBus.broadcast("AD_REQUEST",{message:d}),c=n.options,"preroll"===d&&m.isPlainObject(c.preroll)?c=c.preroll:"midroll"===d&&m.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===d&&m.isPlainObject(c.rewarded)&&(c=c.rewarded),l="rewarded"===d?"rewardedVideo":"gdbanner"===d?"gd__banner":"midroll"===d?"midroll":"video1",r.next=16,window.idhb.isLoaded();case 16:if(h={tnl_keys:Xv(Xv({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:d,tnl_asset_id:n.gameData.gameId})},!(t&&t.retry_on_success&&m.isPlainObject(c.retry_on_success)&&m.isPlainObject(c.retry_on_success.vast))){r.next=21;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_success.vast,h)));case 21:if(!(t&&t.retry_on_failure&&n.options.retry_on_failure&&m.isPlainObject(c.retry_on_failure.vast))){r.next=25;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_failure.vast,h)));case 25:if(!m.isPlainObject(c.vast)){r.next=27;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.vast,h)));case 27:return r.next=29,n._create_dp_context(d,t);case 29:f=r.sent,window.idhb.requestAds({slots:T.default({},l,{bidFloor:null!=f&&f.floor_price?f.floor_price:void 0}),callback:function(e,t){var r=this;k.default(this,p),!f||null!=t&&t.bidFloorApplied||fetch(f.skip_url).catch(function(e){k.default(this,r)}.bind(this)),i({tnl_keys:Xv(Xv({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:d,tnl_asset_id:n.gameData.gameId}),url:e,dp:f,hl:t})}.bind(this)}),r.next=36;break;case 33:throw r.prev=33,r.t0=r.catch(8),new Error(r.t0);case 36:case"end":return r.stop()}}),r,this,[[8,33]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===a.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===a.AdType.Interstitial){var t=!1===this.gameData.preroll||!0===this.noPreroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===a.AdType.Rewarded?"rewarded":e===a.AdType.Interstitial?!1===this.gameData.preroll||!0===this.noPreroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"_requestAd",value:function(e,t){var n=this;return t=t||{},new Promise(function(r){if(k.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var a,i=null==e||null===(a=e.tnl_keys)||void 0===a?void 0:a.tnl_ad_pos;this.adSuccess=!1;var s=new google.ima.AdsRequest,o=this._transformVast(e,t),u=Xv(Xv({},t),{},{adTag:o,tnl_ad_pos:i});this.adCounter[i]=this.adCounter[i]||0,this.adCounter[i]++;var d=e.dp,c=e.hl;if(d&&(d.adtag_url=o.url,this._extend_dp_with_adsense(d,c,null==e?void 0:e.tnl_keys)),this._isVMAP(i)){var l=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new D.default(e.adtag_url_1,!0);i.query=Qv(Qv({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new D.default(e.adtag_url_2,!0);o.query=Qv(Qv({},o.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++a,output:"xml_vast3"});var u=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(Yv({id:d++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(d++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(Yv({id:d++,adtag_url:u,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:d,adtag:o,position:"preroll"===u.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(i)}));s.adsResponse=l}else if(d&&c.bidFloorApplied){var h=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()}(d);s.adsResponse=h}else if(d&&d.fallback_url){var f=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()}(d);s.adsResponse=f}else s.adTagUrl=o.url;s.linearAdSlotWidth=this.options.width,s.linearAdSlotHeight=this.options.height,s.nonLinearAdSlotWidth=this.options.width,s.nonLinearAdSlotHeight=this.options.height,s.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(s.vastLoadTimeout=this.options.vast_load_timeout),s.setAdWillAutoPlay(t.autoplayAllowed),s.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(s,u);try{this.eventBus.broadcast("AD_SDK_REQUEST",{message:u})}catch(e){}r(s)}catch(e){throw new Error(e)}}.bind(this))}},{key:"cancel",value:function(){if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var e="AD_SDK_CANCELED";this.eventBus.broadcast(e,{name:e,message:"Advertisement has been canceled.",status:"warning",analytics:{category:this.eventCategory,action:e,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(w=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;k.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):U.default.video({inline:!0,muted:!1}).then(function(t){k.default(this,r);var n=t.result;t.error,e(!0===n?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(_=A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"startAd",value:(b=A.default(x.default.mark((function e(t){var n,r,i;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.gameData.afg_disabled,r=t.adType,i=t.params,this.adType_=r,console.log("gd:adp startAd afgDisabled",n),r!==a.AdType.Interstitial){e.next=24;break}if(!n){e.next=9;break}return e.abrupt("return",this._startInterstitialAd(i));case 9:if("preroll"!==(null==i?void 0:i.position)||"adsense"!==(null==i?void 0:i.adapter)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 13:if("start"!==(null==i?void 0:i.position)||"adsense"!==(null==i?void 0:i.adapter)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 17:if("next"!==(null==i?void 0:i.position)||"adsense"!==(null==i?void 0:i.adapter)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 21:return e.abrupt("return",this._startInterstitialAd(i));case 22:e.next=33;break;case 24:if(r!==a.AdType.Rewarded){e.next=32;break}if(!n){e.next=29;break}return e.abrupt("return",this._startRewardedAd(i));case 29:return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 30:e.next=33;break;case 32:throw new Error("Unsupported ad type");case 33:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"preloadAd",value:(v=A.default(x.default.mark((function e(t){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==a.AdType.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==a.AdType.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return v.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,t=function(){k.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new Wv(this.adContainer,t),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(g=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o,u,d,c,l,h,f,p,m=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(o=t?t.containerId:null)||i("Container id is not specified"),u=document.getElementById(o),document.getElementById(o)||i("No container is found with this id - ".concat(o)),void 0===window.idhb.requestAds&&i("Prebid.js wrapper script hit an error or didn't exist!"),d=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(d)||(c="\n .gd__banner{\n z-index: ".concat(a.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=c:l.appendChild(document.createTextNode(c)),u.appendChild(l)),(h=document.createElement("div")).id=d,h.classList.add("gd__banner"),u.appendChild(h)),e.next=10,n._create_dp_display_context();case 10:n.atom_display=e.sent,null!==(s=n.atom_display)&&void 0!==s&&s.params&&window.idhb.setAdserverTargeting(null===(f=n.atom_display)||void 0===f?void 0:f.params),(p={})[d]={maxSize:[u.offsetWidth,u.offsetHeight]},window.idhb.requestAds({slots:p,callback:function(e){k.default(this,m)}.bind(this)}),r(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),i(e.t0.message||e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return g.apply(this,arguments)})},{key:"_startInterstitialAd",value:(p=A.default(x.default.mark((function e(t){var n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,e.next=7,this._initDisplayContainerWithAutoPlay();case 7:return n=e.sent,e.next=10,this._loadInterstitialAd(Xv(Xv({},n),t));case 10:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return p.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(f=A.default(x.default.mark((function e(t){var n,r,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(a.AdType.Interstitial,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedInterstitialAdVast,e.next=11,this._requestAd(n,Xv({adType:a.AdType.Interstitial},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;k.default(this,i);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var a=function(t){k.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){k.default(this,n),this.eventBus.unsubscribeScope(r),t(e.message)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",a,r),this.eventBus.subscribe("AD_SDK_CANCELED",s,r),this.eventBus.subscribe("AD_ERROR",s,r)}.bind(this));case 14:return e.abrupt("return",r);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 f.apply(this,arguments)})},{key:"_startRewardedAd",value:(h=A.default(x.default.mark((function e(t){var n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,e.next=7,this._initDisplayContainerWithAutoPlay();case 7:return n=e.sent,e.next=10,this._loadRewardedAd(Xv(Xv({},n),t));case 10:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return h.apply(this,arguments)})},{key:"_loadRewardedAd",value:(l=A.default(x.default.mark((function e(t){var n,r,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(a.AdType.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,Xv({adType:a.AdType.Rewarded},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;k.default(this,i);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var a=function(t){k.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){k.default(this,n),this.eventBus.unsubscribeScope(r),t(e.message)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",a,r),this.eventBus.subscribe("AD_SDK_CANCELED",s,r),this.eventBus.subscribe("AD_ERROR",s,r)}.bind(this));case 14:return e.abrupt("return",r);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 l.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(c=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(a.AdType.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return c.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(d=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(a.AdType.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return d.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player.src="",this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var t=this;if(this.activeAdContainer){this.activeAdContainer.style.visibility="visible";var n=null==e?void 0:e.mode;e.t4r=cg(this.gameData.__t4r)||{};var r=this._isT4R(e),a=this._getT4ROptions(e);if("loaded"===n)this.activeAdContainer.style.opacity=r?.001:1,r&&this.adsManager.setVolume(0),r&&this.eventBus.broadcast("AD_T4R"),r&&setTimeout(function(){k.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210));else if("click"===n||"first_quartile"===n){if(r&&"click"===n){var i,s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos;this.clickCount[s]++}this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}}}},{key:"_createPlayer",value:function(){var e=this,t=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=a.Layers.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var n=document.createElement("video");n.setAttribute("playsinline",!0),n.setAttribute("webkit-playsinline",!0),n.id="".concat(this.prefix,"advertisement_video"),n.style.position="absolute",n.style.backgroundColor="#000000",n.style.top="0",n.style.left="0",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px",this.video_ad_player=n,this.adContainer.appendChild(n);var r=document.createElement("div");r.id="".concat(this.prefix,"advertisement_slot"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.adContainerInner=r,this.activeAdContainer=this.adContainer,this.thirdPartyContainer?(this.adContainer.appendChild(r),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(r),t.appendChild(this.adContainer)),this.addAdResume(),this.activeAdContainer.style.visibility="hidden";var i=function(){k.default(this,e);var t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:t,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",i),window.document.addEventListener("DOMContentLoaded",i)}},{key:"_setUpIMA",value:function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.adContainerInner,this.video_ad_player),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(!0),this.adsLoader.getSettings().setLocale(this.options.locale),this.adsLoader.getSettings().setVpaidMode(this._getVPAIDMode()),this.adsLoader.getSettings().setAutoPlayAdBreaks(!0);var e=this.adsLoader.getSettings().getNumRedirects();this.adsLoader.getSettings().setNumRedirects(2*e),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1,this),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError,!1,this)}},{key:"_onAdsManagerLoaded",value:function(e){var t=this,n=new google.ima.AdsRenderingSettings;n.autoAlign=!1,n.enablePreloading=!1,n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.useStyledNonLinearAds=!0,n.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,n),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){k.default(this,t),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),u="AD_SDK_MANAGER_READY";this.eventBus.broadcast(u,{name:u,message:"AD SDK is ready",status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t,n=new Date,r=n.getHours(),i=n.getDate(),s=n.getMonth(),o=n.getFullYear(),u=a.getKeyByValue(google.ima.AdEvent.Type,e.type),d=!1,c=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",l=!c.startsWith("image")&&!c.startsWith("text");this._sendIMAEventsToHB(e);var h="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:h="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:h="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:d=!0,h="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:h="Fired when the ad is clicked.";var f=e.getAd().getContentType();this._show({mode:"click",contentType:f});break;case google.ima.AdEvent.Type.COMPLETE:d=this._is_completed(e.getAd()),h="Fired when the ad completes playing.",this.adType_===a.AdType.Rewarded&&this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:h="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:h="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",d=!0,this._hideAddResume();break;case google.ima.AdEvent.Type.DURATION_CHANGE:h="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:h="Fired when the ad playhead crosses first quartile.";var p=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:p});break;case google.ima.AdEvent.Type.IMPRESSION:h="Fired when the impression URL has been pinged.";break;case google.ima.AdEvent.Type.INTERACTION:h="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:h="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var m=e.getAd().getContentType();h=m,this._show({mode:"loaded",contentType:m});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(h=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:h="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:l&&this.adResume.show(),h="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:h="Fired when the ad is resumed.",l&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:h="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:d=this._is_completed(e.getAd()),h="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:this._hideAddResume(),h="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:h="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:d=this._is_completed(e.getAd()),h="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:h="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:h="Fired when the ad volume has been muted."}""!==u&&""!==h&&this.eventBus.broadcast(u,{name:u,message:h,status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(r," d").concat(i," m").concat(s," y").concat(o)}}),d&&!this.adSuccess&&(this.adSuccess=!0,this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this.resetForNext(e))}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),a=this._getInnerErrorCode(n);this.eventBus.broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,label:r}}),this._hideAddResume()}catch(e){}}},{key:"_hideAddResume",value:function(){try{console.log("gd:adp will hide adresume"),this.adResume&&this.adResume.hide(),console.log("gd:adp hiding adresume")}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event:e})}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,t){var n=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){k.default(this,n),this.cancel(),this._clearSafetyTimer(t)}.bind(this),e)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/headerlift.min.js","http://hb.improvedigital.com/pbw/headerlift.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(Hv(e.getInnerError)){var t=e.getInnerError();if(t)return Hv(t.getErrorCode)&&Hv(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,t){var n=this;if(e){var r=this.macros.transform(e,{get:function(e){if(k.default(this,n),t&&t.tnl_keys)return t.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in r.query||{}){var i=r.query[a];m.isPlainObject(i)&&(r.query[a]=M.default.stringify(i))}var s=new D.default(r.url,!0);return j.default(s.query,r.query||{}),Xv({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new D.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new D.default(e.url,!0);if(i.query.cust_params){var s=M.default.parse(i.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=i}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,t,n){var r=this;if(e&&t&&e.tnl_keys){var a=this.options.vast_query;if(t.retry_on_success&&this.options.retry_on_success&&m.isPlainObject(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:t.retry_on_failure&&this.options.retry_on_failure&&m.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=O.default(a),m.isPlainObject(a)){var i=n.query;if(a.$$remove){for(var s in i){new RegExp(a.$$remove,"i").test(s)&&delete i[s]}delete a.$$remove}var o=M.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var u in o){new RegExp(a.cust_params.$$remove,"i").test(u)&&delete o[u]}delete a.cust_params.$$remove}var d=this.macros.transform(a,{get:function(t){return k.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,j.default(i,d),i.cust_params=M.default.stringify(i.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,a,i=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[i]>=(null===(n=e.t4r[i])||void 0===n?void 0:n.count))return!1;if(null!=e&&null!==(r=e.contentType)&&void 0!==r&&r.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return i&&(null===(a=e.t4r[i])||void 0===a?void 0:a.enabled);if(null!=e&&e.contentType.startsWith("video/")){var s,o=(null===(s=e.t4r[i])||void 0===s?void 0:s.viper)||0;if(o>0){var u,d=Math.random()<o;return i&&d&&(null===(u=e.t4r[i])||void 0===u?void 0:u.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,u,d,c,l,h,f,p,m;if(!e)return!1;var g="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(a=r.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(u=this.gameData)||void 0===u||null===(d=u.mAds)||void 0===d||null===(c=d.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(f=this.gameData)||void 0===f||null===(p=f.rAds)||void 0===p||null===(m=p.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),y=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?y>=(null==v?void 0:v.start):g}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,s=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,o=null!=r&&r.vast_1?void 0:a,u=null!=r&&r.vast_2?void 0:a;return{adtag_url_1:null==i?void 0:i.url,adtag_url_2:null==s?void 0:s.url,position:n,dp_1:o,dp_2:u}}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,u;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(u=o.pAds)||void 0===u?void 0:u.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(t){var n=this;k.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new Kv(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(y.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return k.default(this,n),e.json()}.bind(this)).then(function(e){if(k.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();this.msgrt.send("dp.fp",{message:e.p/100}),t({params:{fp:e.p/100},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){k.default(this,n),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}}.bind(this))}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(a){var i,s,o,u,d,c,l=this;return x.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(e)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",a());case 5:s={id:n.topDomain||n.parentDomain,au:e||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(o=new Kv(n.gameData).checkCustomParams())&&(s.cp=o),u=encodeURIComponent(y.Base64.encode(JSON.stringify(s))),d=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,c=(null==d?void 0:d.enabled)&&!0!==(null==t?void 0:t.fallback_adsense),fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(u)).then(function(e){return k.default(this,l),e.json()}.bind(this)).then(function(e){if(k.default(this,l),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(u,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(u),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(u),promo_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(u):void 0,promo_imp_blue_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){k.default(this,l),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=18;break;case 14:r.prev=14,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 18:case"end":return r.stop()}}),r,this,[[0,14]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new D.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=M.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=M.default.stringify(a,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_init_hl_script",value:(u=A.default(x.default.mark((function e(t){var n,r,i,s,o,u=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._getPrebidScripts(),r=n[0],window.idhb=window.idhb||{},window.idhb.options=window.idhb.options||{},Object.assign(window.idhb.options,{assetId:this.gameData.gameId,configUrl:this.topDomain||this.parentDomain,parentUrl:this.parentURL,pageType:"gd"}),window.idhb.que=window.idhb.que||[],e.next=8,a.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,u),window.idhb.requestAds}.bind(this)});case 8:i=a.getQueryString("ch",window.location.href),s=a.getQueryString("ch_date",window.location.href),o={tnl_content_category:this.category.toLowerCase()},i&&(o.channel=i),s&&(o.ch_date=s),window.idhb.setAdserverTargeting(o),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;k.default(this,u);try{var n,r=e.slotId.split("@");r=1===r.length?r[0]:r[1],e.isEmpty?(null!==(n=this.atom_display)&&void 0!==n&&n.error_url&&(fetch(this.atom_display.error_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this.eventBus.broadcast("DISPLAYAD_ERROR",{message:r,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this.eventBus.broadcast("DISPLAYAD_IMPRESSION",{message:r,status:"success"}))}catch(e){}}.bind(this));case 16:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"_init_ima_script",value:(o=A.default(x.default.mark((function e(t){var n,r,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],r=this.options.debug?n[0]:n[1],e.next=4,a.getScript(r,"gdsdk_ima",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,i),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_init_afg_script",value:(s=A.default(x.default.mark((function e(t){var n,r,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(s={}).crossorigin="anonymous",s["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",s["data-ad-frequency-hint"]="30s",s.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(s["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(s["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(s["data-adbreak-test"]="on"),e.next=14,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return k.default(this,o),!!window.adsbygoogle}.bind(this),attrs:s});case 14:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(i=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,u=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("gd:adp _startAdsensePlacementRewardedAd"),e.prev=2,!this.requestRunning){e.next=6;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 6:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),n=function(){k.default(this,u),console.log("gd:adp rw beforeAd"),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,u),console.log("gd:adp rw afterAd"),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(){k.default(this,u),console.log("gd:adp rw adDismmissed"),this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),i=function(){k.default(this,u),console.log("gd:adp rw adViewed"),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),s=function(e){k.default(this,u),console.log("gd:adp rw beforeReward"),e()}.bind(this),o=function(e){k.default(this,u),console.log("gd:adp rw adBreakDone"),this.resetForNext(),this.adCounter.rewarded=this.adCounter.rewarded||0,this.adCounter.rewarded++,"viewed"===e.breakStatus?this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),t={type:"reward",name:"reward-in-game",beforeAd:n,afterAd:r,adDismissed:a,adViewed:i,beforeReward:s,adBreakDone:o},window.adsbygoogle.push(t),console.log("gd:adp rw window.adsbygoogle.push(o). tm",window.adsbygoogle),e.next=22;break;case 18:throw e.prev=18,e.t0=e.catch(2),this._onError(e.t0),e.t0;case 22:case"end":return e.stop()}var t}),e,this,[[2,18]])}))),function(e){return i.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(r=A.default(x.default.mark((function e(t){var n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(e){k.default(this,r),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"}),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),t={type:"preroll",adBreakDone:n},window.adsbygoogle.push(t),e.next=16;break;case 12:throw e.prev=12,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 16:case"end":return e.stop()}var t}),e,this,[[1,12]])}))),function(e){return r.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(n=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(){k.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),t={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(t),e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 18:case"end":return e.stop()}var t}),e,this,[[1,14]])}))),function(e){return n.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),n=function(){k.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.midroll=this.adCounter.midroll||0,this.adCounter.midroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),t={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(t),e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 18:case"end":return e.stop()}var t}),e,this,[[1,14]])}))),function(e){return t.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,a=n._ua,i={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:a.browser.name,brvs:a.browser.version,osnm:a.os.name,osvs:a.os.version,dvmd:a.device.model,w:r.w,h:r.h}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(y.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){this._send(e,{gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href})}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;return this.adCounter.preroll=this.adCounter.preroll||0,0===this.adCounter.preroll}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===a.AdType.Rewarded)t="reward";else if(n===a.AdType.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}e.params.position=t}}]),e}(),ty=function e(t){var n=this;S.default(this,e),T.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yl(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T.default(this,"promo",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-stone-dynamic",a=t.package_version||"1.1.1",i=t.template||"puzzle",s=t.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},gl(this.moduleName,this.moduleConfig)},ny=function e(t){var n=this;S.default(this,e),T.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yl(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T.default(this,"splash",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-air-dynamic",a=t.package_version||"1.2.0",i=t.template||"pluto",s=t.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},gl(this.moduleName,this.moduleConfig)},ry=function(e,t){console.log(e,t)},ay={},iy={},sy=null;function oy(){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 ay.version=r,ay.frame=e,ay.function=n,ay.version}function uy(e){var t=this;return sy||(sy=new Promise(function(n){function r(t,r){if(ry("Received a response from CMP",t),r){var a,i;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(i=(a=t)&&"boolean"==typeof a.gdprApplies?a.gdprApplies:e.defaultGdprScope)||!0===i&&"string"!=typeof a.tcString)&&n({result:"cmpUnexpectedResponse",cmp:ay,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}k.default(this,t),oy(),ay.frame?2===ay.version?(ry("TCF v2 CMP found. Fetching the consent."),ay.function?(ry("CMP API is directly accessible, calling it now..."),ay.function("addEventListener",ay.version,r)):(ry("CMP API is outside the current iframe, calling it now..."),function(e,t,n){var r=this,a="__tcfapi";function i(e){var t="".concat(a,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==iy[r.callId]&&iy[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){k.default(this,r);var o=Math.random()+"",u="".concat(a,"Call"),d=T.default({},u,{command:e,parameter:s,callId:o,version:n});iy[o]=i,t.postMessage(d,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,ay.version,n)}("addEventListener",ay.frame,r))):n({result:"cmpVersionNotV2",cmp:ay}):n({result:"cmpNotFound"})}.bind(this)))}var dy=new(function(){function e(){S.default(this,e),this.productName="Game Distribution"}var t;return L.default(e,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(t=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,u;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(a=null==t||null===(r=t.visitor)||void 0===r?void 0:r.visitorId){e.next=6;break}return e.abrupt("return");case 6:return i=encodeURIComponent(this.productName),s=encodeURIComponent(a),e.prev=8,o="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(s),e.next=12,fetch(o,{method:"POST"});case 12:e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(s),e.next=22,fetch(u,{method:"POST"});case 22:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,n){return t.apply(this,arguments)})}]),e}());function cy(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 ly(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 ly(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function ly(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 hy=function(e){var t=this,n=e.src,r=e.attributes,a=e.target,i=e.isAsync;return new Promise(function(e,s){var o=this;k.default(this,t);try{var u=document.createElement("script");if(u.async=null==i||i,u.type="text/javascript",u.onload=function(){k.default(this,o),e()}.bind(this),u.onerror=function(){k.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),u.src=n,r){var d,c=cy(r);try{for(c.s();!(d=c.n()).done;){var l=d.value,h=l.key,f=l.value;u.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(u)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},fy=function(){var e=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,hy({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,hy({src:"https://cookie-cdn.cookiepro.com/consent/".concat("140feb72-7952-4420-8ae5-e8978d87bc17","/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,hy({src:"https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:"140feb72-7952-4420-8ae5-e8978d87bc17"}],isAsync:!1});case 7:n=void 0,r=void 0,a=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(a=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(a),console.log("GD: CMP cookie pro loaded successfully."),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 14:case"end":return e.stop()}var t,n,r,a}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}(),py=new b.EventEmitter,my={"https://games.softgames.com":{"splash-hidden":"splash-hidden"}};function gy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=n.type;if(Object.keys(my).some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)&&(window.parent&&!n.type.startsWith("gd-sdk")&&(window.parent.postMessage(n,"*"),console.log("GD-SDK:pst fw sg event to parent complete",window.parent.location.href,n)),a)){var i=my[r][a];i&&py.emit(i,n)}}),!1);var vy=_.v4(),yy=function(e){var t=this;if(!window.__msgr){var n=document.createElement("iframe");if(n.src="https://static.gamedistribution.com/message/index.html",n.style.display="none",n.name="__msgr",document.body.appendChild(n),window!==window.top){var r={gameId:e.gameId,target:e.evnts.domain,token:vy,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){wy(r)},setInterval(function(){k.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",wy(r)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){k.default(this,t);try{var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gy(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=vy,wy(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},by=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=_y(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},_y=function e(t){try{var n,r,a=null==t?void 0:t.parent;if("game"===(null===(n=a.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return a;e(a)}catch(e){return t}},wy=function(e){window.__msgr.postMessage(e,"https://static.gamedistribution.com")};function Ay(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 ky(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ay(Object(n),!0).forEach((function(t){T.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ay(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ey,xy=null,Sy=null,Ty=function(){function e(t){var n=this;if(S.default(this,e),xy)return xy;xy=this,this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new Om,this._location.print(),this._parentURL=this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._giftCount=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){k.default(this,n),this._sdk_ready=!0}.bind(this)).catch(function(e){k.default(this,n),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t;k.default(this,n),!0===(null===(e=this._gameData.lp)||void 0===e?void 0:e.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(t=this._gameData.evnts)&&void 0!==t&&t.enabled&&this._isLoaderGameURL()&&yy(this._gameData)}.bind(this)),this._registerSGBridge()}var t,n,r,i,s,o,u,d,c,l,h;return L.default(e,[{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(k.default(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var t=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];t&&t.setAttribute("style","display:none")}}.bind(this))}},{key:"_loadCMP",value:(h=A.default(x.default.mark((function e(){var t,n,r,a;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=8;break}if(r=new Om,a=r.get("depth"),console.log("CMP location.depth",a),0!==(null==a?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=8;break}return e.next=7,fy();case 7:console.log("CMP loaded");case 8:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"testConsent",value:function(){console.log("test-consent. Finding CMP");try{var e=oy();console.log("CMP found",e),A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uy({});case 2:t=e.sent,console.log("After lookup IAB consent",t);case 4: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;py.on("splash-hidden",function(t){k.default(this,e),console.log("GD-SDK:pst on splash-hidden",t),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){console.log(":pst hide cmp button");var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"isLoaded",value:function(){if(void 0===this._isLoaded){var e=this._isTokenGameURL(),t=this._isExtHostedGameURL(),n=this._isMasterGameURL();this._isLoaded=(e||t&&!n)&&this._gameData.loader.enabled}return this._isLoaded}},{key:"setIsLoaded",value:function(e){this._isLoaded=e}},{key:"_sendLoadedEvent",value:function(){if(!this.isLoaded()){this.setIsLoaded(!0);try{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(console.log("in gamedock gameplay",this._gameData.loader.enabled,e),!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),console.log("gamedock gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||!this._bridge.isCoreSDKMode&&this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker()}},{key:"_initializeSDKWithGameData",value:(l=A.default(x.default.mark((function e(t,n){var r,a=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this._gameData=this._getGameData(),e.next=4,this._loadCMP();case 4:this._bridge.isCoreSDKMode=!(!0===this._gameData.enableAds||!0===(null===(r=this._gameData.enableAds)||void 0===r?void 0:r.enabled)),this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==this._gameData.diagnostic.close_ads&&!1!==this._gameData.diagnostic.close_ads||(this.videoAdReady=this._initializeVideoAd().catch(function(e){return k.default(this,a),console.error(e.message||e)}.bind(this))),t(this._gameData),e.next=19;break;case 14:e.prev=14,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),n(e.t0);case 19:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(e,t){return l.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=O.default(e);this.options=t?a.extendDefaults(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=Lm.version,t=console.log("%c %c %c GameDistribution.com HTML5 SDK | Version: "+e+" %c %c %c","background: #9854d8","background: #6c2ca7","color: #fff; background: #450f78;","background: #6c2ca7","background: #9854d8","background: #ffffff");console.log.apply(console,t)}}},{key:"_sendTunnlEvent",value:function(e){var t=this;void 0===this._topDomain&&(this._topDomain=void 0);var n={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(M.default.stringify(n))).catch(function(e){k.default(this,t)}.bind(this))}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=a.getQueryParams("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,a.dankLog("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!a.Ls.available)return;"developer.gamedistribution.com"===this._parentDomain?(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0),a.Ls.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0)),a.Ls.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new a.MessageRouter({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:a.getIframeDepth(),version:Lm.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:a.getMobilePlatform(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var t=["https://cdn.gamedock.io/gamedock-web-tracker/4.4.0/script/gamedock-sdk.min.js"];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;k.default(this,e),Sy=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&Sy.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"}),dy.track(Sy,this._gameData)}.bind(this)).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=Sy)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var t=["https://ext.minijuegosgratis.com/external-host/main.js"];a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadGoogleAnalytics",value:function(){var e=this,t=["https://www.google-analytics.com/analytics.js"];a.getScript(t[0],"gdsdk_google_analytics",{alternates:t,error_prefix:"Blocked:",exists:function(){return k.default(this,e),window.ga}.bind(this)}).then(function(){k.default(this,e),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new a.EventBus,a.SDKEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(k.default(this,e),"developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasapi/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var t=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(t,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(t,"*")}catch(e){}}}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return k.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;k.default(this,e),this.msgrt.send("ad.impression"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&dy.track(Sy,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){k.default(this,e),this.msgrt.send("ad.error",{message:t.message,details:t.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(t){k.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){k.default(this,e),t.message.startsWith("Blocked:")?this._bridge.noBlockerEvent||(this.msgrt.send("error",{message:t.message}),this._hasBlocker||(this._hasBlocker=!0,this._sendTunnlEvent(3))):this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){k.default(this,e),this.msgrt.send("tunnl.keys.empty",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(t){k.default(this,e),this.msgrt.send("tunnl.keys.fallback",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(t){return k.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,enableAds:!0,preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Lm.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(c=A.default(x.default.mark((function e(){var t,n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this._gameData,t=void 0===this._gameData.dmain||this._gameData.dmain,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&(this.msgrt.send("blocked"),setTimeout(function(){k.default(this,r),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(M.default.stringify({domain:this._parentDomain,id:n.gameId,img:this._get_game_thumbnail_url(),title:n.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"_checkGameDeleted",value:function(){var e=this;6===this._gameData.status&&(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){k.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&(a.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,a=this._gameData,i=a.gdpr&&!0===a.gdpr.consent,s=a.loader,o=null===(e=a.promo)||void 0===e?void 0:e[null===(t=a.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(a,i):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||i?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):!1!==s.enabled&&this._createSplash(a,i):null!=o&&o.enabled&&this._createPromo(a,i))}},{key:"_initializeVideoAd",value:(d=A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=a.extendDefaults(this.options.advertisementSettings,t.sdk)),this.macros=new a.Macros({game:t,bridge:this._bridge}),this.adInstance=new ey(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=Lm,this.adInstance._send("gd.location",this._location.get()),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){a.dankLog(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:function(){var e=pg();return this._bridge.noPreroll=(!this._getisMobile()||!1!==e.loader.mobile)&&this._bridge.noPreroll,this._bridge.noPreroll&&(this.adRequestTimer=Date.now()),this.msgrt.setGameData(e),a.setDankLog(e.diagnostic),e}},{key:"_createSplash",value:(u=A.default(x.default.mark((function e(t,n){var r,i,s,o,u=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(t);case 2:r=e.sent,i=new r(ky(ky({},this.options),{},{isConsentDomain:n,version:Lm.version}),t,this._parentDomain),s=vg(),o=s.enabled,i.on("playClick",function(){var e=this;if(k.default(this,u),n){var t=new Date;t.setDate(t.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(t.toUTCString(),"; path=/")}this._hideCMPButton(),o?window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e),console.log("extsc: splash error",t),i.hide()}.bind(this)):this.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e)}.bind(this))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){k.default(this,u),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){k.default(this,u),i.hide()}.bind(this));case 9:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(o=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(ky(ky({},this.options),{},{isConsentDomain:n,version:Lm.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return o.apply(this,arguments)})},{key:"_createPromo",value:(s=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(ky(ky({},this.options),{},{isConsentDomain:n,version:Lm.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.default(this,o),s.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return s.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){k.default(this,e)}.bind(this))}},{key:"showAd",value:(i=A.default(x.default.mark((function e(t){var n,r=this,a=arguments;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},console.log("gd:adp, showAd izMaster,izToken",this._isMasterGameURL(),this._isTokenGameURL()),e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(a,i){var s,o,u,d,c,l,h,f,p,m,g,v=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,l={adType:t,params:n,adTimestamp:r.adRequestTimer},e.next=4,r.sdkReady;case 4:return h=e.sent,e.next=7,r.videoAdReady;case 7:return null!==(s=r._gameData.lp)&&void 0!==s&&s.load||r._sendLoadedEvent(),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:h,adRequest:l}),r._rejectAdIfAdDisabled({gameData:h,adRequest:l}),r._rejectAdIfUnsupportedType({adRequest:l}),r._rejectAdIfRewardedDisabled({gameData:h,adRequest:l}),(null===(o=h.gft)||void 0===o||!o.enabled||null!==(u=h.gft)&&void 0!==u&&u.enabled&&(null==h||null===(d=h.gft)||void 0===d||null===(c=d.durations[r._giftCount])||void 0===c?void 0:c.after)!==r.adInstance.adMidrollCount)&&r._rejectAdIfAdRateHits({gameData:h,adRequest:l}),r.adInstance.attachAfgPosition(l),r._attachAfgFallback({gameData:h,adRequest:l}),f="main.showad",p=function(e){var t,n,a;k.default(this,v),r.eventBus.unsubscribeScope(f),r.onResumeGame(e.message,"warning"),null!=h&&null!==(t=h.gft)&&void 0!==t&&t.enabled&&(null==h||null===(n=h.gft)||void 0===n||null===(a=n.durations[r._giftCount])||void 0===a?void 0:a.after)===r.adInstance.adMidrollCount&&r.decideToGiveAGift(),i(e.message)}.bind(this),m=function(e){var t,n,i;k.default(this,v),r.eventBus.unsubscribeScope(f),r.adRequestTimer=Date.now(),r.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),null!=h&&null!==(t=h.gft)&&void 0!==t&&t.enabled&&(null==h||null===(n=h.gft)||void 0===n||null===(i=n.durations[r._giftCount])||void 0===i?void 0:i.after)===r.adInstance.adMidrollCount&&r.decideToGiveAGift(),a(e.message)}.bind(this),g=function(e){var s=this;k.default(this,v),r.eventBus.unsubscribeScope(f),n.fallback_adsense=!1,r.showAd(t,ky(ky({},n),{},{adapter:"adsense"})).then(function(e){k.default(this,s),a(e)}.bind(this)).catch(function(e){k.default(this,s),i(e)}.bind(this))}.bind(this),r.eventBus.subscribe("AD_ERROR",null!=n&&n.fallback_adsense?g:p,f),r.eventBus.subscribe("AD_SDK_CANCELED",null!=n&&n.fallback_adsense?g:p,f),r.eventBus.subscribe("AD_SUCCESS",m,f),e.next=25,r.adInstance.startAd(l);case 25:r._post_message({topic:"adrequest.instream"}),e.next=32;break;case 28:e.prev=28,e.t0=e.catch(0),r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 32:case"end":return e.stop()}}),e,this,[[0,28]])})));return function(t,n){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){if(!e.gameData.enableAds||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==a.AdType.Interstitial&&t.adType!==a.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=a.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===a.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,s,o,u=e.gameData,d=e.adRequest,c=null;d.adType===a.AdType.Interstitial&&null!==(t=u.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=u.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=u.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=u.midroll;if(d.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(s.enableAds&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled.");case 10:if(t){e.next=14;break}t=a.AdType.Rewarded,e.next=16;break;case 14:if(t===a.AdType.Interstitial||t===a.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:if(t!==a.AdType.Rewarded||s.rewardedAds){e.next=18;break}throw new Error("Rewarded ads are disabled.");case 18:return e.next=20,n.adInstance.preloadAd(t);case 20:o=e.sent,r(o),e.next=27;break;case 24:e.prev=24,e.t0=e.catch(0),i(e.t0);case 27:case"end":return e.stop()}}),e,null,[[0,24]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"cancelAd",value:(n=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(n,r){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=A.default(x.default.mark((function n(r,a){var i;return x.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return i=n.sent,n.next=6,t.videoAdReady;case 6:if(!i.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:a("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),a(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;this._allowExternals({enabled:!1});try{this.options.resumeGame()}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||by({event:"GameStarted",game:this._gameData})}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||by({event:"GamePaused",game:this._gameData})}},{key:"openConsole",value:function(){try{new a.ImplementationTest(this).start(),a.Ls.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(k.default(this,e),!this._isFullScreen){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var t=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){k.default(this,t),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;k.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return k.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),u=(e||n)&&r.loaderEnabled,d=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:u,noLoadedEvent:d,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:g,depth:a.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new D.default(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new D.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new D.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(y.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new ny(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i,s;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(n=t.promo)||void 0===n?void 0:n[null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll],s=new ty(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(y.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new D.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(M.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new D.default(e,!0);return n.query=ky(ky({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return y.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=A.default(x.default.mark((function t(n,r){var a;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:a=e._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,t=this._gameData,n=t.assets.find(function(t){return k.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(){var e=this;try{var t,n=null===(t=this._gameData)||void 0===t?void 0:t.gft,r=setInterval(A.default(x.default.mark((function t(){var n=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.adInstance.requestRunning?console.log("Advertisement already running..."):(e.showAd(a.AdType.Interstitial,{position:"midroll"}).catch(function(e){k.default(this,n)}.bind(this)),clearInterval(r),e._giftCount++);case 1:case"end":return t.stop()}}),t,this)}))),1e3*n.durations[this._giftCount].wait)}catch(e){console.log("Advertisement Error...")}}}]),e}(),Dy={},Ry=function(e){try{if(Dy.source){var t={type:"gd-sdk-on-event",event:e};Dy.source.postMessage(t,Dy.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},Iy=function(){Ry({name:"SDK_READY",status:"success",message:"Everything is ready."}),Ry({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),Ry({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},Cy=function(e){console.log("gd:adp registerForForwarderPosts");window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,i=n.type,s=n.method,o=n.options;if("gd-sdk-self"===i){var u={type:"gd-sdk",method:s,options:o};return window.postMessage(u,"https://html5.gamedistribution.com"),void console.log("gd:adp after self post")}if("gd-sdk"===i){if(!Dy.source&&"init"===s)return function(e){var t=e.source,n=e.origin;Dy={source:t,origin:n}}({source:a,origin:r}),void Iy();var d=e[s];d&&A.default(x.default.mark((function t(){var n;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(n=d.apply(e,Object.values(o)))||!n.then){t.next=5;break}return t.next=5,n;case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()}}),!1)},Py=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){Ry(e),t.apply(this,arguments)}}(e);var t=new Ty(e);return Cy(t),t},Oy={create:function(){var e=A.default(x.default.mark((function e(t){var n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,xg(t);case 3:return n=e.sent,r=n?Ag(t):Py(t),yg(),e.abrupt("return",r);case 9:return e.prev=9,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",Py(t));case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}()};function Ly(){return(Ly=A.default(x.default.mark((function e(t,n){var r,a;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wg();case 2:if(r=e.sent,console.log("extsc: should wrapper be called?",r),!r){e.next=8;break}e.t0=window.gdsdk,e.next=11;break;case 8:return e.next=10,My(t);case 10:e.t0=e.sent;case 11:return a=e.t0,e.abrupt("return",n(a));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Uy=!1;function My(e){var t=this;return new Promise(function(n,r){var a=this;if(k.default(this,t),Ey)return n(Ey);if(Uy)var i=setInterval(function(){k.default(this,a),Ey&&(Uy=!1,clearInterval(i),n(Ey))}.bind(this),100);else Uy=!0,Oy.create(e).then(function(e){k.default(this,a),console.log("sdk created!"),Ey=e,e._sendSDKReady(),Uy=!1,n(Ey)}.bind(this))}.bind(this))}var jy,By=(My(jy=function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":E.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===E.default(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}()),{invoke:function(e){return function(e,t){return Ly.apply(this,arguments)}(jy,e)}});function qy(){var e=this;this.AdType=a.AdType,this.preloadAd=function(e){var t=this;return By.invoke(function(n){return k.default(this,t),n.preloadAd(e)}.bind(this))},this.showAd=function(){var e=A.default(x.default.mark((function e(t,n){var r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",By.invoke(function(e){return k.default(this,r),t===a.AdType.Display?e.showDisplayAd(n):e.showAd(t)}.bind(this)));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return By.invoke(function(t){return k.default(this,e),t.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return By.invoke(function(t){return k.default(this,e),t.openConsole()}.bind(this))},this.getSession=function(){var e=this;return By.invoke(function(t){return k.default(this,e),t.session()}.bind(this))},this.leaderboard={show:function(){k.default(this,e),bl.showLeaderboard()}.bind(this),addScore:function(t){k.default(this,e),bl.addScore(t)}.bind(this)}}qy.prototype=new function(){this.showBanner=function(){var e=this;return By.invoke(function(t){return k.default(this,e),t.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new qy,window.gdApi=window.gdsdk;
1
+ "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/newArrowCheck"),n=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/regenerator"),a=require("@bygd/gd-sdk-era/dist/default"),i=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/classCallCheck"),o=require("@babel/runtime/helpers/defineProperty"),d=require("url-parse"),u=require("validator"),c=require("is-valid-domain"),l=require("get-value"),h=require("set-value"),f=require("lodash.clonedeep"),p=require("can-autoplay"),m=require("is-plain-object"),v=require("querystringify"),g=require("lodash.merge"),y=require("js-base64"),b=require("events"),_=require("uuid");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var A=w(e),k=w(t),E=w(n),x=w(r),S=w(i),T=w(s),D=w(o),R=w(d),I=w(u),O=w(c),P=w(l),C=w(h),L=w(f),M=w(p),U=w(v),j=w(g),B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},G=function(e){return e&&e.Math==Math&&e},N=G("object"==typeof globalThis&&globalThis)||G("object"==typeof window&&window)||G("object"==typeof self&&self)||G("object"==typeof B&&B)||function(){return this}()||Function("return this")(),q={},F=function(e){try{return!!e()}catch(e){return!0}},V=!F((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),K=!F((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),W=K,H=Function.prototype.call,z=W?H.bind(H):function(){return H.apply(H,arguments)},$={},Q={}.propertyIsEnumerable,Y=Object.getOwnPropertyDescriptor,J=Y&&!Q.call({1:2},1);$.f=J?function(e){var t=Y(this,e);return!!t&&t.enumerable}:Q;var X,Z,ee=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},te=K,ne=Function.prototype,re=ne.bind,ae=ne.call,ie=te&&re.bind(ae,ae),se=te?function(e){return e&&ie(e)}:function(e){return e&&function(){return ae.apply(e,arguments)}},oe=se,de=oe({}.toString),ue=oe("".slice),ce=function(e){return ue(de(e),8,-1)},le=se,he=F,fe=ce,pe=N.Object,me=le("".split),ve=he((function(){return!pe("z").propertyIsEnumerable(0)}))?function(e){return"String"==fe(e)?me(e,""):pe(e)}:pe,ge=N.TypeError,ye=function(e){if(null==e)throw ge("Can't call method on "+e);return e},be=ve,_e=ye,we=function(e){return be(_e(e))},Ae=function(e){return"function"==typeof e},ke=Ae,Ee=function(e){return"object"==typeof e?null!==e:ke(e)},xe=N,Se=Ae,Te=function(e){return Se(e)?e:void 0},De=function(e,t){return arguments.length<2?Te(xe[e]):xe[e]&&xe[e][t]},Re=se({}.isPrototypeOf),Ie=De("navigator","userAgent")||"",Oe=N,Pe=Ie,Ce=Oe.process,Le=Oe.Deno,Me=Ce&&Ce.versions||Le&&Le.version,Ue=Me&&Me.v8;Ue&&(Z=(X=Ue.split("."))[0]>0&&X[0]<4?1:+(X[0]+X[1])),!Z&&Pe&&(!(X=Pe.match(/Edge\/(\d+)/))||X[1]>=74)&&(X=Pe.match(/Chrome\/(\d+)/))&&(Z=+X[1]);var je=Z,Be=je,Ge=F,Ne=!!Object.getOwnPropertySymbols&&!Ge((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Be&&Be<41})),qe=Ne&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Fe=De,Ve=Ae,Ke=Re,We=qe,He=N.Object,ze=We?function(e){return"symbol"==typeof e}:function(e){var t=Fe("Symbol");return Ve(t)&&Ke(t.prototype,He(e))},$e=N.String,Qe=function(e){try{return $e(e)}catch(e){return"Object"}},Ye=Ae,Je=Qe,Xe=N.TypeError,Ze=function(e){if(Ye(e))return e;throw Xe(Je(e)+" is not a function")},et=Ze,tt=function(e,t){var n=e[t];return null==n?void 0:et(n)},nt=z,rt=Ae,at=Ee,it=N.TypeError,st={exports:{}},ot=N,dt=Object.defineProperty,ut=function(e,t){try{dt(ot,e,{value:t,configurable:!0,writable:!0})}catch(n){ot[e]=t}return t},ct=ut,lt=N["__core-js_shared__"]||ct("__core-js_shared__",{}),ht=lt;(st.exports=function(e,t){return ht[e]||(ht[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"});var ft=ye,pt=N.Object,mt=function(e){return pt(ft(e))},vt=mt,gt=se({}.hasOwnProperty),yt=Object.hasOwn||function(e,t){return gt(vt(e),t)},bt=se,_t=0,wt=Math.random(),At=bt(1..toString),kt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+At(++_t+wt,36)},Et=N,xt=st.exports,St=yt,Tt=kt,Dt=Ne,Rt=qe,It=xt("wks"),Ot=Et.Symbol,Pt=Ot&&Ot.for,Ct=Rt?Ot:Ot&&Ot.withoutSetter||Tt,Lt=function(e){if(!St(It,e)||!Dt&&"string"!=typeof It[e]){var t="Symbol."+e;Dt&&St(Ot,e)?It[e]=Ot[e]:It[e]=Rt&&Pt?Pt(t):Ct(t)}return It[e]},Mt=z,Ut=Ee,jt=ze,Bt=tt,Gt=function(e,t){var n,r;if("string"===t&&rt(n=e.toString)&&!at(r=nt(n,e)))return r;if(rt(n=e.valueOf)&&!at(r=nt(n,e)))return r;if("string"!==t&&rt(n=e.toString)&&!at(r=nt(n,e)))return r;throw it("Can't convert object to primitive value")},Nt=Lt,qt=N.TypeError,Ft=Nt("toPrimitive"),Vt=function(e,t){if(!Ut(e)||jt(e))return e;var n,r=Bt(e,Ft);if(r){if(void 0===t&&(t="default"),n=Mt(r,e,t),!Ut(n)||jt(n))return n;throw qt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Gt(e,t)},Kt=ze,Wt=function(e){var t=Vt(e,"string");return Kt(t)?t:t+""},Ht=Ee,zt=N.document,$t=Ht(zt)&&Ht(zt.createElement),Qt=function(e){return $t?zt.createElement(e):{}},Yt=Qt,Jt=!V&&!F((function(){return 7!=Object.defineProperty(Yt("div"),"a",{get:function(){return 7}}).a})),Xt=V,Zt=z,en=$,tn=ee,nn=we,rn=Wt,an=yt,sn=Jt,on=Object.getOwnPropertyDescriptor;q.f=Xt?on:function(e,t){if(e=nn(e),t=rn(t),sn)try{return on(e,t)}catch(e){}if(an(e,t))return tn(!Zt(en.f,e,t),e[t])};var dn={},un=V&&F((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),cn=N,ln=Ee,hn=cn.String,fn=cn.TypeError,pn=function(e){if(ln(e))return e;throw fn(hn(e)+" is not an object")},mn=V,vn=Jt,gn=un,yn=pn,bn=Wt,_n=N.TypeError,wn=Object.defineProperty,An=Object.getOwnPropertyDescriptor;dn.f=mn?gn?function(e,t,n){if(yn(e),t=bn(t),yn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=An(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return wn(e,t,n)}:wn:function(e,t,n){if(yn(e),t=bn(t),yn(n),vn)try{return wn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw _n("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var kn=dn,En=ee,xn=V?function(e,t,n){return kn.f(e,t,En(1,n))}:function(e,t,n){return e[t]=n,e},Sn={exports:{}},Tn=Ae,Dn=lt,Rn=se(Function.toString);Tn(Dn.inspectSource)||(Dn.inspectSource=function(e){return Rn(e)});var In,On,Pn,Cn=Dn.inspectSource,Ln=Ae,Mn=Cn,Un=N.WeakMap,jn=Ln(Un)&&/native code/.test(Mn(Un)),Bn=st.exports,Gn=kt,Nn=Bn("keys"),qn=function(e){return Nn[e]||(Nn[e]=Gn(e))},Fn={},Vn=jn,Kn=N,Wn=se,Hn=Ee,zn=xn,$n=yt,Qn=lt,Yn=qn,Jn=Fn,Xn=Kn.TypeError,Zn=Kn.WeakMap;if(Vn||Qn.state){var er=Qn.state||(Qn.state=new Zn),tr=Wn(er.get),nr=Wn(er.has),rr=Wn(er.set);In=function(e,t){if(nr(er,e))throw new Xn("Object already initialized");return t.facade=e,rr(er,e,t),t},On=function(e){return tr(er,e)||{}},Pn=function(e){return nr(er,e)}}else{var ar=Yn("state");Jn[ar]=!0,In=function(e,t){if($n(e,ar))throw new Xn("Object already initialized");return t.facade=e,zn(e,ar,t),t},On=function(e){return $n(e,ar)?e[ar]:{}},Pn=function(e){return $n(e,ar)}}var ir={set:In,get:On,has:Pn,enforce:function(e){return Pn(e)?On(e):In(e,{})},getterFor:function(e){return function(t){var n;if(!Hn(t)||(n=On(t)).type!==e)throw Xn("Incompatible receiver, "+e+" required");return n}}},sr=V,or=yt,dr=Function.prototype,ur=sr&&Object.getOwnPropertyDescriptor,cr=or(dr,"name"),lr={EXISTS:cr,PROPER:cr&&"something"===function(){}.name,CONFIGURABLE:cr&&(!sr||sr&&ur(dr,"name").configurable)},hr=N,fr=Ae,pr=yt,mr=xn,vr=ut,gr=Cn,yr=lr.CONFIGURABLE,br=ir.get,_r=ir.enforce,wr=String(String).split("String");(Sn.exports=function(e,t,n,r){var a,i=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,o=!!r&&!!r.noTargetGet,d=r&&void 0!==r.name?r.name:t;fr(n)&&("Symbol("===String(d).slice(0,7)&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!pr(n,"name")||yr&&n.name!==d)&&mr(n,"name",d),(a=_r(n)).source||(a.source=wr.join("string"==typeof d?d:""))),e!==hr?(i?!o&&e[t]&&(s=!0):delete e[t],s?e[t]=n:mr(e,t,n)):s?e[t]=n:vr(t,n)})(Function.prototype,"toString",(function(){return fr(this)&&br(this).source||gr(this)}));var Ar={},kr=Math.ceil,Er=Math.floor,xr=function(e){var t=+e;return t!=t||0===t?0:(t>0?Er:kr)(t)},Sr=xr,Tr=Math.max,Dr=Math.min,Rr=function(e,t){var n=Sr(e);return n<0?Tr(n+t,0):Dr(n,t)},Ir=xr,Or=Math.min,Pr=function(e){return e>0?Or(Ir(e),9007199254740991):0},Cr=Pr,Lr=function(e){return Cr(e.length)},Mr=we,Ur=Rr,jr=Lr,Br=function(e){return function(t,n,r){var a,i=Mr(t),s=jr(i),o=Ur(r,s);if(e&&n!=n){for(;s>o;)if((a=i[o++])!=a)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Gr={includes:Br(!0),indexOf:Br(!1)},Nr=yt,qr=we,Fr=Gr.indexOf,Vr=Fn,Kr=se([].push),Wr=function(e,t){var n,r=qr(e),a=0,i=[];for(n in r)!Nr(Vr,n)&&Nr(r,n)&&Kr(i,n);for(;t.length>a;)Nr(r,n=t[a++])&&(~Fr(i,n)||Kr(i,n));return i},Hr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],zr=Wr,$r=Hr.concat("length","prototype");Ar.f=Object.getOwnPropertyNames||function(e){return zr(e,$r)};var Qr={};Qr.f=Object.getOwnPropertySymbols;var Yr=De,Jr=Ar,Xr=Qr,Zr=pn,ea=se([].concat),ta=Yr("Reflect","ownKeys")||function(e){var t=Jr.f(Zr(e)),n=Xr.f;return n?ea(t,n(e)):t},na=yt,ra=ta,aa=q,ia=dn,sa=function(e,t,n){for(var r=ra(t),a=ia.f,i=aa.f,s=0;s<r.length;s++){var o=r[s];na(e,o)||n&&na(n,o)||a(e,o,i(t,o))}},oa=F,da=Ae,ua=/#|\.prototype\./,ca=function(e,t){var n=ha[la(e)];return n==pa||n!=fa&&(da(t)?oa(t):!!t)},la=ca.normalize=function(e){return String(e).replace(ua,".").toLowerCase()},ha=ca.data={},fa=ca.NATIVE="N",pa=ca.POLYFILL="P",ma=ca,va=N,ga=q.f,ya=xn,ba=Sn.exports,_a=ut,wa=sa,Aa=ma,ka=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?va:u?va[o]||_a(o,{}):(va[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=ga(n,r))&&s.value:n[r],!Aa(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;wa(i,a)}(e.sham||a&&a.sham)&&ya(i,"sham",!0),ba(n,r,i,e)}},Ea=Wr,xa=Hr,Sa=Object.keys||function(e){return Ea(e,xa)},Ta=mt,Da=Sa;ka({target:"Object",stat:!0,forced:F((function(){Da(1)}))},{keys:function(e){return Da(Ta(e))}});var Ra=K,Ia=Function.prototype,Oa=Ia.apply,Pa=Ia.call,Ca="object"==typeof Reflect&&Reflect.apply||(Ra?Pa.bind(Oa):function(){return Pa.apply(Oa,arguments)}),La=ce,Ma=Array.isArray||function(e){return"Array"==La(e)},Ua={};Ua[Lt("toStringTag")]="z";var ja="[object z]"===String(Ua),Ba=N,Ga=ja,Na=Ae,qa=ce,Fa=Lt("toStringTag"),Va=Ba.Object,Ka="Arguments"==qa(function(){return arguments}()),Wa=Ga?qa: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=Va(e),Fa))?n:Ka?qa(t):"Object"==(r=qa(t))&&Na(t.callee)?"Arguments":r},Ha=Wa,za=N.String,$a=function(e){if("Symbol"===Ha(e))throw TypeError("Cannot convert a Symbol value to a string");return za(e)},Qa={},Ya=V,Ja=un,Xa=dn,Za=pn,ei=we,ti=Sa;Qa.f=Ya&&!Ja?Object.defineProperties:function(e,t){Za(e);for(var n,r=ei(t),a=ti(t),i=a.length,s=0;i>s;)Xa.f(e,n=a[s++],r[n]);return e};var ni,ri=De("document","documentElement"),ai=pn,ii=Qa,si=Hr,oi=Fn,di=ri,ui=Qt,ci=qn("IE_PROTO"),li=function(){},hi=function(e){return"<script>"+e+"<\/script>"},fi=function(e){e.write(hi("")),e.close();var t=e.parentWindow.Object;return e=null,t},pi=function(){try{ni=new ActiveXObject("htmlfile")}catch(e){}var e,t;pi="undefined"!=typeof document?document.domain&&ni?fi(ni):((t=ui("iframe")).style.display="none",di.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(hi("document.F=Object")),e.close(),e.F):fi(ni);for(var n=si.length;n--;)delete pi.prototype[si[n]];return pi()};oi[ci]=!0;var mi=Object.create||function(e,t){var n;return null!==e?(li.prototype=ai(e),n=new li,li.prototype=null,n[ci]=e):n=pi(),void 0===t?n:ii.f(n,t)},vi={},gi=Wt,yi=dn,bi=ee,_i=function(e,t,n){var r=gi(t);r in e?yi.f(e,r,bi(0,n)):e[r]=n},wi=Rr,Ai=Lr,ki=_i,Ei=N.Array,xi=Math.max,Si=function(e,t,n){for(var r=Ai(e),a=wi(t,r),i=wi(void 0===n?r:n,r),s=Ei(xi(i-a,0)),o=0;a<i;a++,o++)ki(s,o,e[a]);return s.length=o,s},Ti=ce,Di=we,Ri=Ar.f,Ii=Si,Oi="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];vi.f=function(e){return Oi&&"Window"==Ti(e)?function(e){try{return Ri(e)}catch(e){return Ii(Oi)}}(e):Ri(Di(e))};var Pi=se([].slice),Ci={},Li=Lt;Ci.f=Li;var Mi=N,Ui=yt,ji=Ci,Bi=dn.f,Gi=function(e){var t=Mi.Symbol||(Mi.Symbol={});Ui(t,e)||Bi(t,e,{value:ji.f(e)})},Ni=dn.f,qi=yt,Fi=Lt("toStringTag"),Vi=function(e,t,n){e&&!n&&(e=e.prototype),e&&!qi(e,Fi)&&Ni(e,Fi,{configurable:!0,value:t})},Ki=Ze,Wi=K,Hi=se(se.bind),zi=function(e,t){return Ki(e),void 0===t?e:Wi?Hi(e,t):function(){return e.apply(t,arguments)}},$i=se,Qi=F,Yi=Ae,Ji=Wa,Xi=Cn,Zi=function(){},es=[],ts=De("Reflect","construct"),ns=/^\s*(?:class|function)\b/,rs=$i(ns.exec),as=!ns.exec(Zi),is=function(e){if(!Yi(e))return!1;try{return ts(Zi,es,e),!0}catch(e){return!1}},ss=function(e){if(!Yi(e))return!1;switch(Ji(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return as||!!rs(ns,Xi(e))}catch(e){return!0}};ss.sham=!0;var os=!ts||Qi((function(){var e;return is(is.call)||!is(Object)||!is((function(){e=!0}))||e}))?ss:is,ds=N,us=Ma,cs=os,ls=Ee,hs=Lt("species"),fs=ds.Array,ps=function(e){var t;return us(e)&&(t=e.constructor,(cs(t)&&(t===fs||us(t.prototype))||ls(t)&&null===(t=t[hs]))&&(t=void 0)),void 0===t?fs:t},ms=function(e,t){return new(ps(e))(0===t?0:t)},vs=zi,gs=ve,ys=mt,bs=Lr,_s=ms,ws=se([].push),As=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=7==e,o=5==e||i;return function(d,u,c,l){for(var h,f,p=ys(d),m=gs(p),v=vs(u,c),g=bs(m),y=0,b=l||_s,_=t?b(d,g):n||s?b(d,0):void 0;g>y;y++)if((o||y in m)&&(f=v(h=m[y],y,p),e))if(t)_[y]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:ws(_,h)}else switch(e){case 4:return!1;case 7:ws(_,h)}return i?-1:r||a?a:_}},ks={forEach:As(0),map:As(1),filter:As(2),some:As(3),every:As(4),find:As(5),findIndex:As(6),filterReject:As(7)},Es=ka,xs=N,Ss=De,Ts=Ca,Ds=z,Rs=se,Is=V,Os=Ne,Ps=F,Cs=yt,Ls=Ma,Ms=Ae,Us=Ee,js=Re,Bs=ze,Gs=pn,Ns=mt,qs=we,Fs=Wt,Vs=$a,Ks=ee,Ws=mi,Hs=Sa,zs=Ar,$s=vi,Qs=Qr,Ys=q,Js=dn,Xs=Qa,Zs=$,eo=Pi,to=Sn.exports,no=st.exports,ro=Fn,ao=kt,io=Lt,so=Ci,oo=Gi,uo=Vi,co=ir,lo=ks.forEach,ho=qn("hidden"),fo=io("toPrimitive"),po=co.set,mo=co.getterFor("Symbol"),vo=Object.prototype,go=xs.Symbol,yo=go&&go.prototype,bo=xs.TypeError,_o=xs.QObject,wo=Ss("JSON","stringify"),Ao=Ys.f,ko=Js.f,Eo=$s.f,xo=Zs.f,So=Rs([].push),To=no("symbols"),Do=no("op-symbols"),Ro=no("string-to-symbol-registry"),Io=no("symbol-to-string-registry"),Oo=no("wks"),Po=!_o||!_o.prototype||!_o.prototype.findChild,Co=Is&&Ps((function(){return 7!=Ws(ko({},"a",{get:function(){return ko(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ao(vo,t);r&&delete vo[t],ko(e,t,n),r&&e!==vo&&ko(vo,t,r)}:ko,Lo=function(e,t){var n=To[e]=Ws(yo);return po(n,{type:"Symbol",tag:e,description:t}),Is||(n.description=t),n},Mo=function(e,t,n){e===vo&&Mo(Do,t,n),Gs(e);var r=Fs(t);return Gs(n),Cs(To,r)?(n.enumerable?(Cs(e,ho)&&e[ho][r]&&(e[ho][r]=!1),n=Ws(n,{enumerable:Ks(0,!1)})):(Cs(e,ho)||ko(e,ho,Ks(1,{})),e[ho][r]=!0),Co(e,r,n)):ko(e,r,n)},Uo=function(e,t){Gs(e);var n=qs(t),r=Hs(n).concat(No(n));return lo(r,(function(t){Is&&!Ds(jo,n,t)||Mo(e,t,n[t])})),e},jo=function(e){var t=Fs(e),n=Ds(xo,this,t);return!(this===vo&&Cs(To,t)&&!Cs(Do,t))&&(!(n||!Cs(this,t)||!Cs(To,t)||Cs(this,ho)&&this[ho][t])||n)},Bo=function(e,t){var n=qs(e),r=Fs(t);if(n!==vo||!Cs(To,r)||Cs(Do,r)){var a=Ao(n,r);return!a||!Cs(To,r)||Cs(n,ho)&&n[ho][r]||(a.enumerable=!0),a}},Go=function(e){var t=Eo(qs(e)),n=[];return lo(t,(function(e){Cs(To,e)||Cs(ro,e)||So(n,e)})),n},No=function(e){var t=e===vo,n=Eo(t?Do:qs(e)),r=[];return lo(n,(function(e){!Cs(To,e)||t&&!Cs(vo,e)||So(r,To[e])})),r};(Os||(to(yo=(go=function(){if(js(yo,this))throw bo("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Vs(arguments[0]):void 0,t=ao(e),n=function(e){this===vo&&Ds(n,Do,e),Cs(this,ho)&&Cs(this[ho],t)&&(this[ho][t]=!1),Co(this,t,Ks(1,e))};return Is&&Po&&Co(vo,t,{configurable:!0,set:n}),Lo(t,e)}).prototype,"toString",(function(){return mo(this).tag})),to(go,"withoutSetter",(function(e){return Lo(ao(e),e)})),Zs.f=jo,Js.f=Mo,Xs.f=Uo,Ys.f=Bo,zs.f=$s.f=Go,Qs.f=No,so.f=function(e){return Lo(io(e),e)},Is&&(ko(yo,"description",{configurable:!0,get:function(){return mo(this).description}}),to(vo,"propertyIsEnumerable",jo,{unsafe:!0}))),Es({global:!0,wrap:!0,forced:!Os,sham:!Os},{Symbol:go}),lo(Hs(Oo),(function(e){oo(e)})),Es({target:"Symbol",stat:!0,forced:!Os},{for:function(e){var t=Vs(e);if(Cs(Ro,t))return Ro[t];var n=go(t);return Ro[t]=n,Io[n]=t,n},keyFor:function(e){if(!Bs(e))throw bo(e+" is not a symbol");if(Cs(Io,e))return Io[e]},useSetter:function(){Po=!0},useSimple:function(){Po=!1}}),Es({target:"Object",stat:!0,forced:!Os,sham:!Is},{create:function(e,t){return void 0===t?Ws(e):Uo(Ws(e),t)},defineProperty:Mo,defineProperties:Uo,getOwnPropertyDescriptor:Bo}),Es({target:"Object",stat:!0,forced:!Os},{getOwnPropertyNames:Go,getOwnPropertySymbols:No}),Es({target:"Object",stat:!0,forced:Ps((function(){Qs.f(1)}))},{getOwnPropertySymbols:function(e){return Qs.f(Ns(e))}}),wo)&&Es({target:"JSON",stat:!0,forced:!Os||Ps((function(){var e=go();return"[null]"!=wo([e])||"{}"!=wo({a:e})||"{}"!=wo(Object(e))}))},{stringify:function(e,t,n){var r=eo(arguments),a=t;if((Us(t)||void 0!==e)&&!Bs(e))return Ls(t)||(t=function(e,t){if(Ms(a)&&(t=Ds(a,this,e,t)),!Bs(t))return t}),r[1]=t,Ts(wo,null,r)}});if(!yo[fo]){var qo=yo.valueOf;to(yo,fo,(function(e){return Ds(qo,this)}))}uo(go,"Symbol"),ro[ho]=!0;var Fo=F,Vo=je,Ko=Lt("species"),Wo=function(e){return Vo>=51||!Fo((function(){var t=[];return(t.constructor={})[Ko]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ho=ks.filter;ka({target:"Array",proto:!0,forced:!Wo("filter")},{filter:function(e){return Ho(this,e,arguments.length>1?arguments[1]:void 0)}});var zo=ka,$o=F,Qo=we,Yo=q.f,Jo=V,Xo=$o((function(){Yo(1)}));zo({target:"Object",stat:!0,forced:!Jo||Xo,sham:!Jo},{getOwnPropertyDescriptor:function(e,t){return Yo(Qo(e),t)}});var Zo={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},ed=Qt("span").classList,td=ed&&ed.constructor&&ed.constructor.prototype,nd=td===Object.prototype?void 0:td,rd=F,ad=ks.forEach,id=function(e,t){var n=[][e];return!!n&&rd((function(){n.call(null,t||function(){return 1},1)}))},sd=N,od=Zo,dd=nd,ud=id("forEach")?[].forEach:function(e){return ad(this,e,arguments.length>1?arguments[1]:void 0)},cd=xn,ld=function(e){if(e&&e.forEach!==ud)try{cd(e,"forEach",ud)}catch(t){e.forEach=ud}};for(var hd in od)od[hd]&&ld(sd[hd]&&sd[hd].prototype);ld(dd);var fd=ta,pd=we,md=q,vd=_i;ka({target:"Object",stat:!0,sham:!V},{getOwnPropertyDescriptors:function(e){for(var t,n,r=pd(e),a=md.f,i=fd(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&vd(s,t,n);return s}});var gd=ka,yd=N,bd=Ma,_d=os,wd=Ee,Ad=Rr,kd=Lr,Ed=we,xd=_i,Sd=Lt,Td=Pi,Dd=Wo("slice"),Rd=Sd("species"),Id=yd.Array,Od=Math.max;gd({target:"Array",proto:!0,forced:!Dd},{slice:function(e,t){var n,r,a,i=Ed(this),s=kd(i),o=Ad(e,s),d=Ad(void 0===t?s:t,s);if(bd(i)&&(n=i.constructor,(_d(n)&&(n===Id||bd(n.prototype))||wd(n)&&null===(n=n[Rd]))&&(n=void 0),n===Id||void 0===n))return Td(i,o,d);for(r=new(void 0===n?Id:n)(Od(d-o,0)),a=0;o<d;o++,a++)o in i&&xd(r,a,i[o]);return r.length=a,r}});var Pd=z,Cd=pn,Ld=tt,Md=function(e,t,n){var r,a;Cd(e);try{if(!(r=Ld(e,"return"))){if("throw"===t)throw n;return n}r=Pd(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Cd(r),n},Ud=pn,jd=Md,Bd={},Gd=Bd,Nd=Lt("iterator"),qd=Array.prototype,Fd=function(e){return void 0!==e&&(Gd.Array===e||qd[Nd]===e)},Vd=Wa,Kd=tt,Wd=Bd,Hd=Lt("iterator"),zd=function(e){if(null!=e)return Kd(e,Hd)||Kd(e,"@@iterator")||Wd[Vd(e)]},$d=z,Qd=Ze,Yd=pn,Jd=Qe,Xd=zd,Zd=N.TypeError,eu=function(e,t){var n=arguments.length<2?Xd(e):t;if(Qd(n))return Yd($d(n,e));throw Zd(Jd(e)+" is not iterable")},tu=zi,nu=z,ru=mt,au=function(e,t,n,r){try{return r?t(Ud(n)[0],n[1]):t(n)}catch(t){jd(e,"throw",t)}},iu=Fd,su=os,ou=Lr,du=_i,uu=eu,cu=zd,lu=N.Array,hu=Lt("iterator"),fu=!1;try{var pu=0,mu={next:function(){return{done:!!pu++}},return:function(){fu=!0}};mu[hu]=function(){return this},Array.from(mu,(function(){throw 2}))}catch(e){}var vu=function(e,t){if(!t&&!fu)return!1;var n=!1;try{var r={};r[hu]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},gu=function(e){var t=ru(e),n=su(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=tu(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=cu(t),f=0;if(!h||this==lu&&iu(h))for(s=ou(t),o=n?new this(s):lu(s);s>f;f++)l=i?a(t[f],f):t[f],du(o,f,l);else for(c=(u=uu(t,h)).next,o=n?new this:[];!(d=nu(c,u)).done;f++)l=i?au(u,a,[d.value,f],!0):d.value,du(o,f,l);return o.length=f,o};ka({target:"Array",stat:!0,forced:!vu((function(e){Array.from(e)}))},{from:gu});var yu,bu,_u,wu=se,Au=xr,ku=$a,Eu=ye,xu=wu("".charAt),Su=wu("".charCodeAt),Tu=wu("".slice),Du=function(e){return function(t,n){var r,a,i=ku(Eu(t)),s=Au(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=Su(i,s))<55296||r>56319||s+1===o||(a=Su(i,s+1))<56320||a>57343?e?xu(i,s):r:e?Tu(i,s,s+2):a-56320+(r-55296<<10)+65536}},Ru={codeAt:Du(!1),charAt:Du(!0)},Iu=!F((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ou=N,Pu=yt,Cu=Ae,Lu=mt,Mu=Iu,Uu=qn("IE_PROTO"),ju=Ou.Object,Bu=ju.prototype,Gu=Mu?ju.getPrototypeOf:function(e){var t=Lu(e);if(Pu(t,Uu))return t[Uu];var n=t.constructor;return Cu(n)&&t instanceof n?n.prototype:t instanceof ju?Bu:null},Nu=F,qu=Ae,Fu=Gu,Vu=Sn.exports,Ku=Lt("iterator"),Wu=!1;[].keys&&("next"in(_u=[].keys())?(bu=Fu(Fu(_u)))!==Object.prototype&&(yu=bu):Wu=!0);var Hu=null==yu||Nu((function(){var e={};return yu[Ku].call(e)!==e}));Hu&&(yu={}),qu(yu[Ku])||Vu(yu,Ku,(function(){return this}));var zu={IteratorPrototype:yu,BUGGY_SAFARI_ITERATORS:Wu},$u=zu.IteratorPrototype,Qu=mi,Yu=ee,Ju=Vi,Xu=Bd,Zu=function(){return this},ec=function(e,t,n,r){var a=t+" Iterator";return e.prototype=Qu($u,{next:Yu(+!r,n)}),Ju(e,a,!1),Xu[a]=Zu,e},tc=N,nc=Ae,rc=tc.String,ac=tc.TypeError,ic=se,sc=pn,oc=function(e){if("object"==typeof e||nc(e))return e;throw ac("Can't set "+rc(e)+" as a prototype")},dc=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=ic(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return sc(n),oc(r),t?e(n,r):n.__proto__=r,n}}():void 0),uc=ka,cc=z,lc=lr,hc=Ae,fc=ec,pc=Gu,mc=dc,vc=Vi,gc=xn,yc=Sn.exports,bc=Bd,_c=lc.PROPER,wc=lc.CONFIGURABLE,Ac=zu.IteratorPrototype,kc=zu.BUGGY_SAFARI_ITERATORS,Ec=Lt("iterator"),xc=function(){return this},Sc=function(e,t,n,r,a,i,s){fc(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!kc&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Ec]||f["@@iterator"]||a&&f[a],m=!kc&&p||c(a),v="Array"==t&&f.entries||p;if(v&&(o=pc(v.call(new e)))!==Object.prototype&&o.next&&(pc(o)!==Ac&&(mc?mc(o,Ac):hc(o[Ec])||yc(o,Ec,xc)),vc(o,l,!0)),_c&&"values"==a&&p&&"values"!==p.name&&(wc?gc(f,"name","values"):(h=!0,m=function(){return cc(p,this)})),a)if(d={values:c("values"),keys:i?m:c("keys"),entries:c("entries")},s)for(u in d)(kc||h||!(u in f))&&yc(f,u,d[u]);else uc({target:t,proto:!0,forced:kc||h},d);return f[Ec]!==m&&yc(f,Ec,m,{name:a}),bc[t]=m,d},Tc=Ru.charAt,Dc=$a,Rc=ir,Ic=Sc,Oc=Rc.set,Pc=Rc.getterFor("String Iterator");Ic(String,"String",(function(e){Oc(this,{type:"String Iterator",string:Dc(e),index:0})}),(function(){var e,t=Pc(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Tc(n,r),t.index+=e.length,{value:e,done:!1})}));var Cc=pn,Lc=function(){var e=Cc(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Mc=F,Uc=N.RegExp,jc=Mc((function(){var e=Uc("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Bc=jc||Mc((function(){return!Uc("a","y").sticky})),Gc={BROKEN_CARET:jc||Mc((function(){var e=Uc("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Bc,UNSUPPORTED_Y:jc},Nc=F,qc=N.RegExp,Fc=Nc((function(){var e=qc(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Vc=F,Kc=N.RegExp,Wc=Vc((function(){var e=Kc("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Hc=z,zc=se,$c=$a,Qc=Lc,Yc=Gc,Jc=st.exports,Xc=mi,Zc=ir.get,el=Fc,tl=Wc,nl=Jc("native-string-replace",String.prototype.replace),rl=RegExp.prototype.exec,al=rl,il=zc("".charAt),sl=zc("".indexOf),ol=zc("".replace),dl=zc("".slice),ul=function(){var e=/a/,t=/b*/g;return Hc(rl,e,"a"),Hc(rl,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),cl=Yc.BROKEN_CARET,ll=void 0!==/()??/.exec("")[1];(ul||ll||cl||el||tl)&&(al=function(e){var t,n,r,a,i,s,o,d=this,u=Zc(d),c=$c(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=Hc(al,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=cl&&d.sticky,p=Hc(Qc,d),m=d.source,v=0,g=c;if(f&&(p=ol(p,"y",""),-1===sl(p,"g")&&(p+="g"),g=dl(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==il(c,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,v++),n=new RegExp("^(?:"+m+")",p)),ll&&(n=new RegExp("^"+m+"$(?!\\s)",p)),ul&&(r=d.lastIndex),a=Hc(rl,f?n:d,g),f?a?(a.input=dl(a.input,v),a[0]=dl(a[0],v),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:ul&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),ll&&a&&a.length>1&&Hc(nl,a[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&h)for(a.groups=s=Xc(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var hl=al;ka({target:"RegExp",proto:!0,forced:/./.exec!==hl},{exec:hl});var fl=ka,pl=V,ml=N,vl=se,gl=yt,yl=Ae,bl=Re,_l=$a,wl=dn.f,Al=sa,kl=ml.Symbol,El=kl&&kl.prototype;if(pl&&yl(kl)&&(!("description"in El)||void 0!==kl().description)){var xl={},Sl=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:_l(arguments[0]),t=bl(El,this)?new kl(e):void 0===e?kl():kl(e);return""===e&&(xl[t]=!0),t};Al(Sl,kl),Sl.prototype=El,El.constructor=Sl;var Tl="Symbol(test)"==String(kl("test")),Dl=vl(El.toString),Rl=vl(El.valueOf),Il=/^Symbol\((.*)\)[^)]+$/,Ol=vl("".replace),Pl=vl("".slice);wl(El,"description",{configurable:!0,get:function(){var e=Rl(this),t=Dl(e);if(gl(xl,e))return"";var n=Tl?Pl(t,7,-1):Ol(t,Il,"$1");return""===n?void 0:n}}),fl({global:!0,forced:!0},{Symbol:Sl})}Gi("iterator");var Cl=mi,Ll=dn,Ml=Lt("unscopables"),Ul=Array.prototype;null==Ul[Ml]&&Ll.f(Ul,Ml,{configurable:!0,value:Cl(null)});var jl=function(e){Ul[Ml][e]=!0},Bl=we,Gl=jl,Nl=Bd,ql=ir,Fl=dn.f,Vl=Sc,Kl=V,Wl=ql.set,Hl=ql.getterFor("Array Iterator"),zl=Vl(Array,"Array",(function(e,t){Wl(this,{type:"Array Iterator",target:Bl(e),index:0,kind:t})}),(function(){var e=Hl(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),$l=Nl.Arguments=Nl.Array;if(Gl("keys"),Gl("values"),Gl("entries"),Kl&&"values"!==$l.name)try{Fl($l,"name",{value:"values"})}catch(e){}var Ql=N,Yl=Zo,Jl=nd,Xl=zl,Zl=xn,eh=Lt,th=eh("iterator"),nh=eh("toStringTag"),rh=Xl.values,ah=function(e,t){if(e){if(e[th]!==rh)try{Zl(e,th,rh)}catch(t){e[th]=rh}if(e[nh]||Zl(e,nh,t),Yl[t])for(var n in Xl)if(e[n]!==Xl[n])try{Zl(e,n,Xl[n])}catch(t){e[n]=Xl[n]}}};for(var ih in Yl)ah(Ql[ih]&&Ql[ih].prototype,ih);ah(Jl,"DOMTokenList");var sh=Wa,oh=ja?{}.toString:function(){return"[object "+sh(this)+"]"},dh=ja,uh=Sn.exports,ch=oh;dh||uh(Object.prototype,"toString",ch,{unsafe:!0});var lh,hh,fh,ph,mh=N.Promise,vh=Sn.exports,gh=function(e,t,n){for(var r in t)vh(e,r,t[r],n);return e},yh=De,bh=dn,_h=V,wh=Lt("species"),Ah=function(e){var t=yh(e),n=bh.f;_h&&t&&!t[wh]&&n(t,wh,{configurable:!0,get:function(){return this}})},kh=Re,Eh=N.TypeError,xh=function(e,t){if(kh(t,e))return e;throw Eh("Incorrect invocation")},Sh=zi,Th=z,Dh=pn,Rh=Qe,Ih=Fd,Oh=Lr,Ph=Re,Ch=eu,Lh=zd,Mh=Md,Uh=N.TypeError,jh=function(e,t){this.stopped=e,this.result=t},Bh=jh.prototype,Gh=os,Nh=Qe,qh=N.TypeError,Fh=pn,Vh=function(e){if(Gh(e))return e;throw qh(Nh(e)+" is not a constructor")},Kh=Lt("species"),Wh=function(e,t){var n,r=Fh(e).constructor;return void 0===r||null==(n=Fh(r)[Kh])?t:Vh(n)},Hh=N.TypeError,zh=function(e,t){if(e<t)throw Hh("Not enough arguments");return e},$h=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ie),Qh="process"==ce(N.process),Yh=N,Jh=Ca,Xh=zi,Zh=Ae,ef=yt,tf=F,nf=ri,rf=Pi,af=Qt,sf=zh,of=$h,df=Qh,uf=Yh.setImmediate,cf=Yh.clearImmediate,lf=Yh.process,hf=Yh.Dispatch,ff=Yh.Function,pf=Yh.MessageChannel,mf=Yh.String,vf=0,gf={};try{lh=Yh.location}catch(e){}var yf=function(e){if(ef(gf,e)){var t=gf[e];delete gf[e],t()}},bf=function(e){return function(){yf(e)}},_f=function(e){yf(e.data)},wf=function(e){Yh.postMessage(mf(e),lh.protocol+"//"+lh.host)};uf&&cf||(uf=function(e){sf(arguments.length,1);var t=Zh(e)?e:ff(e),n=rf(arguments,1);return gf[++vf]=function(){Jh(t,void 0,n)},hh(vf),vf},cf=function(e){delete gf[e]},df?hh=function(e){lf.nextTick(bf(e))}:hf&&hf.now?hh=function(e){hf.now(bf(e))}:pf&&!of?(ph=(fh=new pf).port2,fh.port1.onmessage=_f,hh=Xh(ph.postMessage,ph)):Yh.addEventListener&&Zh(Yh.postMessage)&&!Yh.importScripts&&lh&&"file:"!==lh.protocol&&!tf(wf)?(hh=wf,Yh.addEventListener("message",_f,!1)):hh="onreadystatechange"in af("script")?function(e){nf.appendChild(af("script")).onreadystatechange=function(){nf.removeChild(this),yf(e)}}:function(e){setTimeout(bf(e),0)});var Af,kf,Ef,xf,Sf,Tf,Df,Rf,If={set:uf,clear:cf},Of=N,Pf=/ipad|iphone|ipod/i.test(Ie)&&void 0!==Of.Pebble,Cf=/web0s(?!.*chrome)/i.test(Ie),Lf=N,Mf=zi,Uf=q.f,jf=If.set,Bf=$h,Gf=Pf,Nf=Cf,qf=Qh,Ff=Lf.MutationObserver||Lf.WebKitMutationObserver,Vf=Lf.document,Kf=Lf.process,Wf=Lf.Promise,Hf=Uf(Lf,"queueMicrotask"),zf=Hf&&Hf.value;zf||(Af=function(){var e,t;for(qf&&(e=Kf.domain)&&e.exit();kf;){t=kf.fn,kf=kf.next;try{t()}catch(e){throw kf?xf():Ef=void 0,e}}Ef=void 0,e&&e.enter()},Bf||qf||Nf||!Ff||!Vf?!Gf&&Wf&&Wf.resolve?((Df=Wf.resolve(void 0)).constructor=Wf,Rf=Mf(Df.then,Df),xf=function(){Rf(Af)}):qf?xf=function(){Kf.nextTick(Af)}:(jf=Mf(jf,Lf),xf=function(){jf(Af)}):(Sf=!0,Tf=Vf.createTextNode(""),new Ff(Af).observe(Tf,{characterData:!0}),xf=function(){Tf.data=Sf=!Sf}));var $f=zf||function(e){var t={fn:e,next:void 0};Ef&&(Ef.next=t),kf||(kf=t,xf()),Ef=t},Qf={},Yf=Ze,Jf=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=Yf(t),this.reject=Yf(n)};Qf.f=function(e){return new Jf(e)};var Xf=pn,Zf=Ee,ep=Qf,tp=function(e,t){if(Xf(e),Zf(t)&&t.constructor===e)return t;var n=ep.f(e);return(0,n.resolve)(t),n.promise},np=N,rp=function(){this.head=null,this.tail=null};rp.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var ap,ip,sp,op,dp=rp,up="object"==typeof window,cp=ka,lp=N,hp=De,fp=z,pp=mh,mp=Sn.exports,vp=gh,gp=dc,yp=Vi,bp=Ah,_p=Ze,wp=Ae,Ap=Ee,kp=xh,Ep=Cn,xp=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),p=Sh(t,c),m=function(e){return r&&Mh(r,"normal",e),new jh(!0,e)},v=function(e){return l?(Dh(e),f?p(e[0],e[1],m):p(e[0],e[1])):f?p(e,m):p(e)};if(h)r=e;else{if(!(a=Lh(e)))throw Uh(Rh(e)+" is not iterable");if(Ih(a)){for(i=0,s=Oh(e);s>i;i++)if((o=v(e[i]))&&Ph(Bh,o))return o;return new jh(!1)}r=Ch(e,a)}for(d=r.next;!(u=Th(d,r)).done;){try{o=v(u.value)}catch(e){Mh(r,"throw",e)}if("object"==typeof o&&o&&Ph(Bh,o))return o}return new jh(!1)},Sp=vu,Tp=Wh,Dp=If.set,Rp=$f,Ip=tp,Op=function(e,t){var n=np.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},Pp=Qf,Cp=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Lp=dp,Mp=ir,Up=ma,jp=up,Bp=Qh,Gp=je,Np=Lt("species"),qp="Promise",Fp=Mp.getterFor(qp),Vp=Mp.set,Kp=Mp.getterFor(qp),Wp=pp&&pp.prototype,Hp=pp,zp=Wp,$p=lp.TypeError,Qp=lp.document,Yp=lp.process,Jp=Pp.f,Xp=Jp,Zp=!!(Qp&&Qp.createEvent&&lp.dispatchEvent),em=wp(lp.PromiseRejectionEvent),tm=!1,nm=Up(qp,(function(){var e=Ep(Hp),t=e!==String(Hp);if(!t&&66===Gp)return!0;if(Gp>=51&&/native code/.test(e))return!1;var n=new Hp((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[Np]=r,!(tm=n.then((function(){}))instanceof r)||!t&&jp&&!em})),rm=nm||!Sp((function(e){Hp.all(e).catch((function(){}))})),am=function(e){var t;return!(!Ap(e)||!wp(t=e.then))&&t},im=function(e,t){var n,r,a,i=t.value,s=1==t.state,o=s?e.ok:e.fail,d=e.resolve,u=e.reject,c=e.domain;try{o?(s||(2===t.rejection&&cm(t),t.rejection=1),!0===o?n=i:(c&&c.enter(),n=o(i),c&&(c.exit(),a=!0)),n===e.promise?u($p("Promise-chain cycle")):(r=am(n))?fp(r,n,d,u):d(n)):u(i)}catch(e){c&&!a&&c.exit(),u(e)}},sm=function(e,t){e.notified||(e.notified=!0,Rp((function(){for(var n,r=e.reactions;n=r.get();)im(n,e);e.notified=!1,t&&!e.rejection&&dm(e)})))},om=function(e,t,n){var r,a;Zp?((r=Qp.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),lp.dispatchEvent(r)):r={promise:t,reason:n},!em&&(a=lp["on"+e])?a(r):"unhandledrejection"===e&&Op("Unhandled promise rejection",n)},dm=function(e){fp(Dp,lp,(function(){var t,n=e.facade,r=e.value;if(um(e)&&(t=Cp((function(){Bp?Yp.emit("unhandledRejection",r,n):om("unhandledrejection",n,r)})),e.rejection=Bp||um(e)?2:1,t.error))throw t.value}))},um=function(e){return 1!==e.rejection&&!e.parent},cm=function(e){fp(Dp,lp,(function(){var t=e.facade;Bp?Yp.emit("rejectionHandled",t):om("rejectionhandled",t,e.value)}))},lm=function(e,t,n){return function(r){e(t,r,n)}},hm=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,sm(e,!0))},fm=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw $p("Promise can't be resolved itself");var r=am(t);r?Rp((function(){var n={done:!1};try{fp(r,t,lm(fm,n,e),lm(hm,n,e))}catch(t){hm(n,t,e)}})):(e.value=t,e.state=1,sm(e,!1))}catch(t){hm({done:!1},t,e)}}};if(nm&&(zp=(Hp=function(e){kp(this,zp),_p(e),fp(ap,this);var t=Fp(this);try{e(lm(fm,t),lm(hm,t))}catch(e){hm(t,e)}}).prototype,(ap=function(e){Vp(this,{type:qp,done:!1,notified:!1,parent:!1,reactions:new Lp,rejection:!1,state:0,value:void 0})}).prototype=vp(zp,{then:function(e,t){var n=Kp(this),r=Jp(Tp(this,Hp));return n.parent=!0,r.ok=!wp(e)||e,r.fail=wp(t)&&t,r.domain=Bp?Yp.domain:void 0,0==n.state?n.reactions.add(r):Rp((function(){im(r,n)})),r.promise},catch:function(e){return this.then(void 0,e)}}),ip=function(){var e=new ap,t=Fp(e);this.promise=e,this.resolve=lm(fm,t),this.reject=lm(hm,t)},Pp.f=Jp=function(e){return e===Hp||e===sp?new ip(e):Xp(e)},wp(pp)&&Wp!==Object.prototype)){op=Wp.then,tm||(mp(Wp,"then",(function(e,t){var n=this;return new Hp((function(e,t){fp(op,n,e,t)})).then(e,t)}),{unsafe:!0}),mp(Wp,"catch",zp.catch,{unsafe:!0}));try{delete Wp.constructor}catch(e){}gp&&gp(Wp,zp)}cp({global:!0,wrap:!0,forced:nm},{Promise:Hp}),yp(Hp,qp,!1),bp(qp),sp=hp(qp),cp({target:qp,stat:!0,forced:nm},{reject:function(e){var t=Jp(this);return fp(t.reject,void 0,e),t.promise}}),cp({target:qp,stat:!0,forced:nm},{resolve:function(e){return Ip(this,e)}}),cp({target:qp,stat:!0,forced:rm},{all:function(e){var t=this,n=Jp(t),r=n.resolve,a=n.reject,i=Cp((function(){var n=_p(t.resolve),i=[],s=0,o=1;xp(e,(function(e){var d=s++,u=!1;o++,fp(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=Jp(t),r=n.reject,a=Cp((function(){var a=_p(t.resolve);xp(e,(function(e){fp(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var pm=ka,mm=N,vm=F,gm=Ma,ym=Ee,bm=mt,_m=Lr,wm=_i,Am=ms,km=Wo,Em=je,xm=Lt("isConcatSpreadable"),Sm=mm.TypeError,Tm=Em>=51||!vm((function(){var e=[];return e[xm]=!1,e.concat()[0]!==e})),Dm=km("concat"),Rm=function(e){if(!ym(e))return!1;var t=e[xm];return void 0!==t?!!t:gm(e)};pm({target:"Array",proto:!0,forced:!Tm||!Dm},{concat:function(e){var t,n,r,a,i,s=bm(this),o=Am(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Rm(i=-1===t?s:arguments[t])){if(d+(a=_m(i))>9007199254740991)throw Sm("Maximum allowed index exceeded");for(n=0;n<a;n++,d++)n in i&&wm(o,d,i[n])}else{if(d>=9007199254740991)throw Sm("Maximum allowed index exceeded");wm(o,d++,i)}return o.length=d,o}});var Im=V,Om=lr.EXISTS,Pm=se,Cm=dn.f,Lm=Function.prototype,Mm=Pm(Lm.toString),Um=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,jm=Pm(Um.exec);function Bm(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 Gm(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 Gm(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function Gm(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 Nm(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 qm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nm(Object(n),!0).forEach((function(t){D.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Im&&!Om&&Cm(Lm,"name",{configurable:!0,get:function(){try{return jm(Um,Mm(this))[1]}catch(e){return""}}});var Fm={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"}},Vm={},Km=function(e,t){Vm[e]=qm(qm({},t),{},{isLoading:!1})},Wm=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(k.default(this,t),document.getElementById(n))e();else{var i=document.createElement("script");i.onload=function(){e()},i.id=n,i.setAttribute("crossorigin",!0),i.src=r,document.head.appendChild(i)}}.bind(this))},Hm=function(){var e=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(r=Vm[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=Bm(r.dependencies),e.prev=8,a.s();case 10:if((i=a.n()).done){e.next=26;break}if(s=i.value,e.prev=12,o=Fm[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Wm({id:s,src:Fm[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=s.id,u=s.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,Wm({id:t,src:r.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(r.source,"."),e.t2);case 43:return r.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(t){return e.apply(this,arguments)}}(),zm=new(S.default((function e(){var t=this;T.default(this,e),D.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Hm("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),D.default(this,"showLeaderboard",function(){var e=A.default(x.default.mark((function e(n){var r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),D.default(this,"addScore",function(){var e=A.default(x.default.mark((function e(n){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Km(this.moduleName,this.moduleConfig)}))),$m=se,Qm=Sn.exports,Ym=hl,Jm=F,Xm=Lt,Zm=xn,ev=Xm("species"),tv=RegExp.prototype,nv=function(e,t,n,r){var a=Xm(e),i=!Jm((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!Jm((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ev]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=$m(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=$m(e),d=t.exec;return d===Ym||d===tv.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Qm(String.prototype,e,d[0]),Qm(tv,a,d[1])}r&&Zm(tv[a],"sham",!0)},rv=Ru.charAt,av=function(e,t,n){return t+(n?rv(e,t).length:1)},iv=se,sv=mt,ov=Math.floor,dv=iv("".charAt),uv=iv("".replace),cv=iv("".slice),lv=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,hv=/\$([$&'`]|\d{1,2})/g,fv=z,pv=pn,mv=Ae,vv=ce,gv=hl,yv=N.TypeError,bv=function(e,t){var n=e.exec;if(mv(n)){var r=fv(n,e,t);return null!==r&&pv(r),r}if("RegExp"===vv(e))return fv(gv,e,t);throw yv("RegExp#exec called on incompatible receiver")},_v=Ca,wv=z,Av=se,kv=nv,Ev=F,xv=pn,Sv=Ae,Tv=xr,Dv=Pr,Rv=$a,Iv=ye,Ov=av,Pv=tt,Cv=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=hv;return void 0!==a&&(a=sv(a),d=lv),uv(i,d,(function(i,d){var u;switch(dv(d,0)){case"$":return"$";case"&":return e;case"`":return cv(t,0,n);case"'":return cv(t,s);case"<":u=a[cv(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=ov(c/10);return 0===l?i:l<=o?void 0===r[l-1]?dv(d,1):r[l-1]+dv(d,1):i}u=r[c-1]}return void 0===u?"":u}))},Lv=bv,Mv=Lt("replace"),Uv=Math.max,jv=Math.min,Bv=Av([].concat),Gv=Av([].push),Nv=Av("".indexOf),qv=Av("".slice),Fv="$0"==="a".replace(/./,"$0"),Vv=!!/./[Mv]&&""===/./[Mv]("a","$0");kv("replace",(function(e,t,n){var r=Vv?"$":"$0";return[function(e,n){var r=Iv(this),a=null==e?void 0:Pv(e,Mv);return a?wv(a,e,r,n):wv(t,Rv(r),e,n)},function(e,a){var i=xv(this),s=Rv(e);if("string"==typeof a&&-1===Nv(a,r)&&-1===Nv(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=Sv(a);d||(a=Rv(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=Lv(i,s);if(null===h)break;if(Gv(l,h),!u)break;""===Rv(h[0])&&(i.lastIndex=Ov(s,Dv(i.lastIndex),c))}for(var f,p="",m=0,v=0;v<l.length;v++){for(var g=Rv((h=l[v])[0]),y=Uv(jv(Tv(h.index),s.length),0),b=[],_=1;_<h.length;_++)Gv(b,void 0===(f=h[_])?f:String(f));var w=h.groups;if(d){var A=Bv([g],b,y,s);void 0!==w&&Gv(A,w);var k=Rv(_v(a,void 0,A))}else k=Cv(g,s,y,b,w,a);y>=m&&(p+=qv(s,m,y)+k,m=y+g.length)}return p+qv(s,m)}]}),!!Ev((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Fv||Vv);var Kv=F,Wv=Lt("iterator"),Hv=!Kv((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Wv]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),zv=Si,$v=Math.floor,Qv=function(e,t){var n=e.length,r=$v(n/2);return n<8?Yv(e,t):Jv(e,Qv(zv(e,0,r),t),Qv(zv(e,r),t),t)},Yv=function(e,t){for(var n,r,a=e.length,i=1;i<a;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},Jv=function(e,t,n,r){for(var a=t.length,i=n.length,s=0,o=0;s<a||o<i;)e[s+o]=s<a&&o<i?r(t[s],n[o])<=0?t[s++]:n[o++]:s<a?t[s++]:n[o++];return e},Xv=Qv,Zv=ka,eg=N,tg=De,ng=z,rg=se,ag=Hv,ig=Sn.exports,sg=gh,og=Vi,dg=ec,ug=ir,cg=xh,lg=Ae,hg=yt,fg=zi,pg=Wa,mg=pn,vg=Ee,gg=$a,yg=mi,bg=ee,_g=eu,wg=zd,Ag=zh,kg=Xv,Eg=Lt("iterator"),xg=ug.set,Sg=ug.getterFor("URLSearchParams"),Tg=ug.getterFor("URLSearchParamsIterator"),Dg=tg("fetch"),Rg=tg("Request"),Ig=tg("Headers"),Og=Rg&&Rg.prototype,Pg=Ig&&Ig.prototype,Cg=eg.RegExp,Lg=eg.TypeError,Mg=eg.decodeURIComponent,Ug=eg.encodeURIComponent,jg=rg("".charAt),Bg=rg([].join),Gg=rg([].push),Ng=rg("".replace),qg=rg([].shift),Fg=rg([].splice),Vg=rg("".split),Kg=rg("".slice),Wg=/\+/g,Hg=Array(4),zg=function(e){return Hg[e-1]||(Hg[e-1]=Cg("((?:%[\\da-f]{2}){"+e+"})","gi"))},$g=function(e){try{return Mg(e)}catch(t){return e}},Qg=function(e){var t=Ng(e,Wg," "),n=4;try{return Mg(t)}catch(e){for(;n;)t=Ng(t,zg(n--),$g);return t}},Yg=/[!'()~]|%20/g,Jg={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Xg=function(e){return Jg[e]},Zg=function(e){return Ng(Ug(e),Yg,Xg)},ey=dg((function(e,t){xg(this,{type:"URLSearchParamsIterator",iterator:_g(Sg(e).entries),kind:t})}),"Iterator",(function(){var e=Tg(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),ty=function(e){this.entries=[],this.url=null,void 0!==e&&(vg(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===jg(e,0)?Kg(e,1):e:gg(e)))};ty.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,s,o,d=wg(e);if(d)for(n=(t=_g(e,d)).next;!(r=ng(n,t)).done;){if(i=(a=_g(mg(r.value))).next,(s=ng(i,a)).done||(o=ng(i,a)).done||!ng(i,a).done)throw Lg("Expected sequence with length 2");Gg(this.entries,{key:gg(s.value),value:gg(o.value)})}else for(var u in e)hg(e,u)&&Gg(this.entries,{key:u,value:gg(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=Vg(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=Vg(t,"="),Gg(this.entries,{key:Qg(qg(n)),value:Qg(Bg(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Gg(n,Zg(e.key)+"="+Zg(e.value));return Bg(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ny=function(){cg(this,ry);var e=arguments.length>0?arguments[0]:void 0;xg(this,new ty(e))},ry=ny.prototype;if(sg(ry,{append:function(e,t){Ag(arguments.length,2);var n=Sg(this);Gg(n.entries,{key:gg(e),value:gg(t)}),n.updateURL()},delete:function(e){Ag(arguments.length,1);for(var t=Sg(this),n=t.entries,r=gg(e),a=0;a<n.length;)n[a].key===r?Fg(n,a,1):a++;t.updateURL()},get:function(e){Ag(arguments.length,1);for(var t=Sg(this).entries,n=gg(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Ag(arguments.length,1);for(var t=Sg(this).entries,n=gg(e),r=[],a=0;a<t.length;a++)t[a].key===n&&Gg(r,t[a].value);return r},has:function(e){Ag(arguments.length,1);for(var t=Sg(this).entries,n=gg(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Ag(arguments.length,1);for(var n,r=Sg(this),a=r.entries,i=!1,s=gg(e),o=gg(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?Fg(a,d--,1):(i=!0,n.value=o));i||Gg(a,{key:s,value:o}),r.updateURL()},sort:function(){var e=Sg(this);kg(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=Sg(this).entries,r=fg(e,arguments.length>1?arguments[1]:void 0),a=0;a<n.length;)r((t=n[a++]).value,t.key,this)},keys:function(){return new ey(this,"keys")},values:function(){return new ey(this,"values")},entries:function(){return new ey(this,"entries")}},{enumerable:!0}),ig(ry,Eg,ry.entries,{name:"entries"}),ig(ry,"toString",(function(){return Sg(this).serialize()}),{enumerable:!0}),og(ny,"URLSearchParams"),Zv({global:!0,forced:!ag},{URLSearchParams:ny}),!ag&&lg(Ig)){var ay=rg(Pg.has),iy=rg(Pg.set),sy=function(e){if(vg(e)){var t,n=e.body;if("URLSearchParams"===pg(n))return t=e.headers?new Ig(e.headers):new Ig,ay(t,"content-type")||iy(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),yg(e,{body:bg(0,gg(n)),headers:bg(0,t)})}return e};if(lg(Dg)&&Zv({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Dg(e,arguments.length>1?sy(arguments[1]):{})}}),lg(Rg)){var oy=function(e){return cg(this,Og),new Rg(e,arguments.length>1?sy(arguments[1]):{})};Og.constructor=oy,oy.prototype=Og,Zv({global:!0,forced:!0},{Request:oy})}}var dy=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},uy=z,cy=pn,ly=ye,hy=dy,fy=$a,py=tt,my=bv;nv("search",(function(e,t,n){return[function(t){var n=ly(this),r=null==t?void 0:py(t,e);return r?uy(r,t,n):new RegExp(t)[e](fy(n))},function(e){var r=cy(this),a=fy(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;hy(s,0)||(r.lastIndex=0);var o=my(r,a);return hy(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var vy=Gr.includes,gy=jl;ka({target:"Array",proto:!0},{includes:function(e){return vy(this,e,arguments.length>1?arguments[1]:void 0)}}),gy("includes");var yy=Ee,by=ce,_y=Lt("match"),wy=function(e){var t;return yy(e)&&(void 0!==(t=e[_y])?!!t:"RegExp"==by(e))},Ay=wy,ky=N.TypeError,Ey=function(e){if(Ay(e))throw ky("The method doesn't accept regular expressions");return e},xy=Lt("match"),Sy=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[xy]=!1,"/./"[e](t)}catch(e){}}return!1},Ty=ka,Dy=Ey,Ry=ye,Iy=$a,Oy=Sy,Py=se("".indexOf);Ty({target:"String",proto:!0,forced:!Oy("includes")},{includes:function(e){return!!~Py(Iy(Ry(this)),Iy(Dy(e)),arguments.length>1?arguments[1]:void 0)}});var Cy=Ca,Ly=z,My=se,Uy=nv,jy=wy,By=pn,Gy=ye,Ny=Wh,qy=av,Fy=Pr,Vy=$a,Ky=tt,Wy=Si,Hy=bv,zy=hl,$y=F,Qy=Gc.UNSUPPORTED_Y,Yy=Math.min,Jy=[].push,Xy=My(/./.exec),Zy=My(Jy),eb=My("".slice);function tb(e){var t=this,n={},r=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,i=(null==e?void 0:e.self_origin)||window.location.origin,s=(null==e?void 0:e.referrer_url)||document.referrer;function o(e){return P.default(n,e)}function d(e,t){return C.default(n,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new R.default(e,t)}catch(e){console.log(e)}}function c(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=decodeURIComponent(o),I.default.isURL(o)))return o}}}return function(){var e;k.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(d("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],d("top.domain.from","origins");else if(0===t)a=i,d("top.domain.from","self-top");else if(1===t){var o=u(s);o&&(a=o.origin,d("top.domain.from","referrer"))}d("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(O.default(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?O.default(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",s),d("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}Uy("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=Vy(Gy(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!jy(e))return Ly(t,r,e,a);for(var i,s,o,d=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,l=new RegExp(e.source,u+"g");(i=Ly(zy,l,r))&&!((s=l.lastIndex)>c&&(Zy(d,eb(r,c,i.index)),i.length>1&&i.index<r.length&&Cy(Jy,d,Wy(i,1)),o=i[0].length,c=s,d.length>=a));)l.lastIndex===i.index&&l.lastIndex++;return c===r.length?!o&&Xy(l,"")||Zy(d,""):Zy(d,eb(r,c)),d.length>a?Wy(d,0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:Ly(t,this,e,n)}:t,[function(t,n){var a=Gy(this),i=null==t?void 0:Ky(t,e);return i?Ly(i,t,a,n):Ly(r,Vy(a),t,n)},function(e,a){var i=By(this),s=Vy(e),o=n(r,i,s,a,r!==t);if(o.done)return o.value;var d=Ny(i,RegExp),u=i.unicode,c=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(Qy?"g":"y"),l=new d(Qy?"^(?:"+i.source+")":i,c),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===s.length)return null===Hy(l,s)?[s]:[];for(var f=0,p=0,m=[];p<s.length;){l.lastIndex=Qy?0:p;var v,g=Hy(l,Qy?eb(s,p):s);if(null===g||(v=Yy(Fy(l.lastIndex+(Qy?p:0)),s.length))===f)p=qy(s,p,u);else{if(Zy(m,eb(s,f,p)),m.length===h)return m;for(var y=1;y<=g.length-1;y++)if(Zy(m,g[y]),m.length===h)return m;p=f=v}}return Zy(m,eb(s,f)),m}]}),!!$y((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Qy);var nb={name:"@bygd/gd-sdk-pes",version:"1.28.8",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.3",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"}},rb="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==rb&&rb,ab="URLSearchParams"in rb,ib="Symbol"in rb&&"iterator"in Symbol,sb="FileReader"in rb&&"Blob"in rb&&function(){try{return new Blob,!0}catch(e){return!1}}(),ob="FormData"in rb,db="ArrayBuffer"in rb;if(db)var ub=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],cb=ArrayBuffer.isView||function(e){return e&&ub.indexOf(Object.prototype.toString.call(e))>-1};function lb(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 hb(e){return"string"!=typeof e&&(e=String(e)),e}function fb(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return ib&&(t[Symbol.iterator]=function(){return t}),t}function pb(e){this.map={},e instanceof pb?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 mb(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function vb(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function gb(e){var t=new FileReader,n=vb(t);return t.readAsArrayBuffer(e),n}function yb(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function bb(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:sb&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:ob&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:ab&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():db&&sb&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=yb(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):db&&(ArrayBuffer.prototype.isPrototypeOf(e)||cb(e))?this._bodyArrayBuffer=yb(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):ab&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},sb&&(this.blob=function(){var e=mb(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=mb(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(gb)}),this.text=function(){var e=mb(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=vb(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)},ob&&(this.formData=function(){return this.text().then(Ab)}),this.json=function(){return this.text().then(JSON.parse)},this}pb.prototype.append=function(e,t){e=lb(e),t=hb(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},pb.prototype.delete=function(e){delete this.map[lb(e)]},pb.prototype.get=function(e){return e=lb(e),this.has(e)?this.map[e]:null},pb.prototype.has=function(e){return this.map.hasOwnProperty(lb(e))},pb.prototype.set=function(e,t){this.map[lb(e)]=hb(t)},pb.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},pb.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),fb(e)},pb.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),fb(e)},pb.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),fb(e)},ib&&(pb.prototype[Symbol.iterator]=pb.prototype.entries);var _b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function wb(e,t){if(!(this instanceof wb))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 wb){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new pb(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 pb(t.headers)),this.method=function(e){var t=e.toUpperCase();return _b.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 Ab(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function kb(e,t){if(!(this instanceof kb))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 pb(t.headers),this.url=t.url||"",this._initBody(e)}wb.prototype.clone=function(){return new wb(this,{body:this._bodyInit})},bb.call(wb.prototype),bb.call(kb.prototype),kb.prototype.clone=function(){return new kb(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new pb(this.headers),url:this.url})},kb.error=function(){var e=new kb(null,{status:0,statusText:""});return e.type="error",e};var Eb=[301,302,303,307,308];kb.redirect=function(e,t){if(-1===Eb.indexOf(t))throw new RangeError("Invalid status code");return new kb(null,{status:t,headers:{location:e}})};var xb=rb.DOMException;try{new xb}catch(e){xb=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},xb.prototype=Object.create(Error.prototype),xb.prototype.constructor=xb}function Sb(e,t){return new Promise((function(n,r){var a=new wb(e,t);if(a.signal&&a.signal.aborted)return r(new xb("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new pb,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout((function(){n(new kb(a,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){r(new xb("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&rb.location.href?rb.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&(sb?i.responseType="blob":db&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof pb?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,hb(t.headers[e]))})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}Sb.polyfill=!0,rb.fetch||(rb.fetch=Sb,rb.Headers=pb,rb.Request=wb,rb.Response=kb);var Tb,Db,Rb=Array.isArray,Ib=Object.prototype.toString,Ob=Rb||function(e){return!!e&&"[object Array]"==Ib.call(e)},Pb=function(e){var t=Cb("object"===E.default(e)?e:a.parseJSON(e));return t&&t.version?nb.version>=t.version?t:void 0:t},Cb=function(e){var t=this;if(!Ob(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){k.default(this,t),e.weight=e.weight||1,n+=e.weight}.bind(this));var r=Math.floor(Math.random()*Math.floor(n));n=0;for(var a=0;a<e.length;a++){var i=e[a];if(r<(n+=i.weight))return i}},Lb=[],Mb=function(e){Lb.push(e)},Ub=function(){return Db},jb=function(e){var t=this;Lb=[],Mb("1"),function(e){Tb||(Tb=new a.MessageRouter({gameId:e.gameId,hours:(new Date).getHours(),topDomain:"gamedistribution.com",domain:"gamedistribution.com",referrer:"gamedistribution.com",depth:0}))}(e),Mb("2");var n=new tb;n.get(),Mb("3");var r=n.get("partner.domain.value");Mb("4");var i=function(){return k.default(this,t),{gameId:e.gameId,enableAds:!0,preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);Mb("5");var s=function(){k.default(this,t);var n=o(),a=n?"&mode=".concat(n):"";return"https://game.api.gamedistribution.com/game/v4/get/".concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(nb.version,"&localTime=").concat((new Date).getHours())}.bind(this);Mb("6");var o=function(){var e=this;k.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return k.default(this,e),t.get(n)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}.bind(this);return Mb("7"),new Promise(function(e){var n=this;if(k.default(this,t),Db)e(Db);else{Mb("7.1");var r=i();Mb("7.2");var o=s();Mb("7.3"),fetch(o).then(function(e){return k.default(this,n),Mb("7.4"),e.json()}.bind(this)).then(function(t){if(k.default(this,n),Mb("7.5"),t.success){var i,s,o,d,u=t.result.game;Mb("7.6");var c={gameId:u.gameMd5,slug:u.slug,pname:u.pname,dname:u.dname,status:u.status,description:u.description,enableAds:!0===u.enableAds||!0===(null===(i=u.enableAds)||void 0===i?void 0:i.enabled),preroll:u.preRoll,midroll:6e4*u.timeAds,rewardedAds:u.rewardedAds,title:u.title,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,__t4r:u.__t4r||{},block_exts:Pb(u.push_cuda),bloc_gard:Pb(u.bloc_gard),cookie:Pb(u.cookie),gdpr:Pb(u.gdpr),diagnostic:Pb(u.diagnostic),cmp:Pb(u.cmp),gft:Pb(u.gft)||{},sdk:Pb(u.sdk)||{},sdkfw:Pb(u.sdkfw)||{},loader:Pb(u.loader)||{},splash:Pb(u.splash)||{},promo:Pb(u.promo)||{},dAds:Pb(u.dads)||{},pAds:Pb(u.pads)||{},mAds:Pb(u.mads)||{},rAds:Pb(u.rads)||{},lp:Pb(u.lp)||{},extsc:Pb(u.extsc)||{},evnts:Pb(u.evnts)||{},dp:Pb(u.dp)||{}};Mb("7.7");var l=a.extendDefaults(L.default(r),c);Mb("7.8"),l.afg_disabled=!1===(null===(s=l.sdk)||void 0===s||null===(o=s.afg)||void 0===o?void 0:o.enabled),Mb("7.9"),null!==(d=l.pAds)&&void 0!==d&&d.enabled&&(l.preroll=!0),Mb("7.10"),Db=l,e(l)}else r.failed=!0,e(r)}.bind(this)).catch(function(t){k.default(this,n);var a=Lb[Lb.length-1];console.log("gd:adp failed game data",t),Tb.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}}.bind(this))},Bb=function(){var e,t=Ub();return!(null==t||null===(e=t.sdkfw)||void 0===e||!e.enabled)},Gb=function(){var e,t,n,r,a,i,s=Ub(),o=!(null==s||null===(e=s.extsc)||void 0===e||!e.enabled);return{enabled:o,path:o?null==s||null===(t=s.extsc)||void 0===t?void 0:t.path:"",name:o?null==s||null===(n=s.extsc)||void 0===n?void 0:n.name:"",ref:o?null==s||null===(r=s.extsc)||void 0===r?void 0:r.ref:"",loadedFlag:o?null==s||null===(a=s.extsc)||void 0===a?void 0:a.loadedFlag:void 0,loadedFlagCheck:!!o&&!(null==s||null===(i=s.extsc)||void 0===i||!i.loadedFlagCheck)}},Nb=function(){var e=A.default(x.default.mark((function e(){var t,n,r,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t=Gb()).enabled){e.next=3;break}return e.abrupt("return");case 3:return n=t.path,r=t.name,i=t.ref,e.prev=4,s={},e.next=8,a.getScript(n,r,{error_prefix:"Blocked:",exists:function(){return k.default(this,o),!!i&&!!window[i]}.bind(this),attrs:s});case 8:console.log("extsc: after external partner script load",r,n),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(4),console.log("extsc: error on external partner script load",r,e.t0),a.dankLog("DEVELOPER_ERROR",e.t0,"warning");case 15:case"end":return e.stop()}}),e,this,[[4,11]])})));return function(){return e.apply(this,arguments)}}(),qb=!1,Fb=!1,Vb=function(){var e=this;return new Promise(function(t,n){var r=this;if(k.default(this,e),qb)return t(Fb);qb=!0;var a=Gb();if(!a.enabled)return t(!1);var i=a.loadedFlag,s=a.loadedFlagCheck;if(s&&!i)return t(!1);if(!s)return Fb=!0,t(!0);var o=!0;setTimeout(function(){k.default(this,r),o&&(console.log("extsc: clearing on wait after timeout"),o=!1,qb=!0,t(!1))}.bind(this),5e3);var d=setInterval(function(){k.default(this,r),o&&s&&window[i]?(console.log("extsc: loaderflag for external script is set!"),o=!1,qb=!0,Fb=!0,clearInterval(d),t(!0)):o||(console.log("extsc: clearing interval after timeout"),clearInterval(d))}.bind(this),100)}.bind(this))},Kb=function(e){var t=function(e){var t=this,n=function(e){return k.default(this,t),c("showAd",{adType:e})}.bind(this),r=function(e){return k.default(this,t),c("preloadAd",{adType:e})}.bind(this),a=function(e){return k.default(this,t),c("showDisplayAd",{options:e})}.bind(this),i=function(){return k.default(this,t),c("cancelAd")}.bind(this),s=function(){return k.default(this,t),c("openConsole")}.bind(this),o=function(){return k.default(this,t),c("showBanner")}.bind(this),d=function(){return k.default(this,t),c("session")}.bind(this),u=function(){k.default(this,t),console.log("_sendSDKReady")}.bind(this),c=function(e,n){var r=this;return k.default(this,t),n||(n={}),new Promise(function(t,a){k.default(this,r);try{var i={type:"gd-sdk",method:e,options:n};window.parent.postMessage(i,"https://html5.gamedistribution.com"),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),l=function(){k.default(this,t),window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&(console.log("gd:adp received on-event",r),r&&f(r))}),!1)}.bind(this),h=function(){k.default(this,t),l(),c("init")}.bind(this),f=function(n){k.default(this,t),e.onEvent&&e.onEvent(n)}.bind(this);return{showBanner:o,showAd:n,preloadAd:r,showDisplayAd:a,cancelAd:i,openConsole:s,getSession:d,onEvent:f,init:h,_sendSDKReady:u}}(e);return t.init(),t},Wb=function(){var e=this;return{isMasterGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),isTokenGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),isExtHostedGameURL:function(){k.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this)}},Hb=function(e){var t=this;return new Promise(function(n,r){var a=this;k.default(this,t);var i={type:"gd-sdk-frame-handshake-request"},s=!1;window.addEventListener("message",(function(e){var t=e.data,r=e.origin,a=e.source,i=t.type;if("gd-sdk-frame-handshake-request"===i){var o={type:"gd-sdk-frame-handshake-response"};a.postMessage(o,r)}else"gd-sdk-frame-handshake-response"===i&&(s=!0,n({origin:r,source:a}))})),e?n():(setTimeout(function(){k.default(this,a),s||n()}.bind(this),200),window.parent!==window?window.parent.postMessage(i,"*"):n())}.bind(this))},zb=function(){var e=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jb(t);case 2:return e.next=5,Bb();case 5:return n=e.sent,console.log("gd:adp ,isSDKForwardEnable",n),r=!n,e.next=10,Hb(r);case 10:if(a=e.sent,n){e.next=13;break}return e.abrupt("return",!1);case 13:return i=Wb(),s=i.isMasterGameURL,o=i.isTokenGameURL,d=s(),u=o(),h=void 0,f=void 0,f=Ub(),c=Bb()&&!(null==f||null===(h=f.sdkfw)||void 0===h||!h.handshake),l=!1,l=c?!d&&!!a:!d,console.log("gd:adp: frameCheck result",{_isMasterGameURL:d,_isTokenGameURL:u,isHandshakeEnabled:c,hsResult:a,result:l}),e.abrupt("return",l);case 21:case"end":return e.stop()}var h,f}),e)})));return function(t){return e.apply(this,arguments)}}(),$b=V,Qb=se,Yb=Sa,Jb=we,Xb=Qb($.f),Zb=Qb([].push),e_=function(e){return function(t){for(var n,r=Jb(t),a=Yb(r),i=a.length,s=0,o=[];i>s;)n=a[s++],$b&&!Xb(r,n)||Zb(o,e?[n,r[n]]:r[n]);return o}},t_={entries:e_(!0),values:e_(!1)}.values;ka({target:"Object",stat:!0},{values:function(e){return t_(e)}});var n_=ka,r_=mh,a_=F,i_=De,s_=Ae,o_=Wh,d_=tp,u_=Sn.exports;if(n_({target:"Promise",proto:!0,real:!0,forced:!!r_&&a_((function(){r_.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=o_(this,i_("Promise")),n=s_(e);return this.then(n?function(n){return d_(t,e()).then((function(){return n}))}:e,n?function(n){return d_(t,e()).then((function(){throw n}))}:e)}}),s_(r_)){var c_=i_("Promise").prototype.finally;r_.prototype.finally!==c_&&u_(r_.prototype,"finally",c_,{unsafe:!0})}var l_=ye,h_=$a,f_=se("".replace),p_="[\t\n\v\f\r                 \u2028\u2029\ufeff]",m_=RegExp("^"+p_+p_+"*"),v_=RegExp(p_+p_+"*$"),g_=function(e){return function(t){var n=h_(l_(t));return 1&e&&(n=f_(n,m_,"")),2&e&&(n=f_(n,v_,"")),n}},y_={start:g_(1),end:g_(2),trim:g_(3)},b_=lr.PROPER,__=F,w_="\t\n\v\f\r                 \u2028\u2029\ufeff",A_=y_.trim;ka({target:"String",proto:!0,forced:function(e){return __((function(){return!!w_[e]()||"​…᠎"!=="​…᠎"[e]()||b_&&w_[e].name!==e}))}("trim")},{trim:function(){return A_(this)}});var k_=Ae,E_=Ee,x_=dc,S_=V,T_=N,D_=se,R_=ma,I_=function(e,t,n){var r,a;return x_&&k_(r=t.constructor)&&r!==n&&E_(a=r.prototype)&&a!==n.prototype&&x_(e,a),e},O_=xn,P_=dn.f,C_=Ar.f,L_=Re,M_=wy,U_=$a,j_=Lc,B_=Gc,G_=Sn.exports,N_=F,q_=yt,F_=ir.enforce,V_=Ah,K_=Fc,W_=Wc,H_=Lt("match"),z_=T_.RegExp,$_=z_.prototype,Q_=T_.SyntaxError,Y_=D_(j_),J_=D_($_.exec),X_=D_("".charAt),Z_=D_("".replace),ew=D_("".indexOf),tw=D_("".slice),nw=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,rw=/a/g,aw=/a/g,iw=new z_(rw)!==rw,sw=B_.MISSED_STICKY,ow=B_.UNSUPPORTED_Y,dw=S_&&(!iw||sw||K_||W_||N_((function(){return aw[H_]=!1,z_(rw)!=rw||z_(aw)==aw||"/a/i"!=z_(rw,"i")})));if(R_("RegExp",dw)){for(var uw=function(e,t){var n,r,a,i,s,o,d=L_($_,this),u=M_(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===uw)return e;if((u||L_($_,e))&&(e=e.source,c&&(t="flags"in h?h.flags:Y_(h))),e=void 0===e?"":U_(e),t=void 0===t?"":U_(t),h=e,K_&&"dotAll"in rw&&(r=!!t&&ew(t,"s")>-1)&&(t=Z_(t,/s/g,"")),n=t,sw&&"sticky"in rw&&(a=!!t&&ew(t,"y")>-1)&&ow&&(t=Z_(t,/y/g,"")),W_&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,d=!1,u=0,c="";r<=n;r++){if("\\"===(t=X_(e,r)))t+=X_(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:J_(nw,tw(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||q_(s,c))throw new Q_("Invalid capture group name");s[c]=!0,i[i.length]=[c,u],d=!1,c="";continue}d?c+=t:a+=t}return[a,i]}(e),e=i[0],l=i[1]),s=I_(z_(e,t),d?this:$_,uw),(r||a||l.length)&&(o=F_(s),r&&(o.dotAll=!0,o.raw=uw(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=X_(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+X_(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{O_(s,"source",""===h?"(?:)":h)}catch(e){}return s},cw=function(e){e in uw||P_(uw,e,{configurable:!0,get:function(){return z_[e]},set:function(t){z_[e]=t}})},lw=C_(z_),hw=0;lw.length>hw;)cw(lw[hw++]);$_.constructor=uw,uw.prototype=$_,G_(T_,"RegExp",uw)}V_("RegExp");var fw=se,pw=lr.PROPER,mw=Sn.exports,vw=pn,gw=Re,yw=$a,bw=F,_w=Lc,ww=RegExp.prototype,Aw=ww.toString,kw=fw(_w),Ew=bw((function(){return"/a/b"!=Aw.call({source:"a",flags:"b"})})),xw=pw&&"toString"!=Aw.name;(Ew||xw)&&mw(RegExp.prototype,"toString",(function(){var e=vw(this),t=yw(e.source),n=e.flags;return"/"+t+"/"+yw(void 0===n&&gw(ww,e)&&!("flags"in ww)?kw(e):n)}),{unsafe:!0});var Sw,Tw=ka,Dw=se,Rw=q.f,Iw=Pr,Ow=$a,Pw=Ey,Cw=ye,Lw=Sy,Mw=Dw("".startsWith),Uw=Dw("".slice),jw=Math.min,Bw=Lw("startsWith");Tw({target:"String",proto:!0,forced:!!(Bw||(Sw=Rw(String.prototype,"startsWith"),!Sw||Sw.writable))&&!Bw},{startsWith:function(e){var t=Ow(Cw(this));Pw(e);var n=Iw(jw(arguments.length>1?arguments[1]:void 0,t.length)),r=Ow(e);return Mw?Mw(t,r,n):Uw(t,n,n+r.length)===r}});var Gw=ka,Nw=ks.find,qw=jl,Fw=!0;"find"in[]&&Array(1).find((function(){Fw=!1})),Gw({target:"Array",proto:!0,forced:Fw},{find:function(e){return Nw(this,e,arguments.length>1?arguments[1]:void 0)}}),qw("find");var Vw=V,Kw=se,Ww=z,Hw=F,zw=Sa,$w=Qr,Qw=$,Yw=mt,Jw=ve,Xw=Object.assign,Zw=Object.defineProperty,eA=Kw([].concat),tA=!Xw||Hw((function(){if(Vw&&1!==Xw({b:1},Xw(Zw({},"a",{enumerable:!0,get:function(){Zw(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!=Xw({},e)[n]||zw(Xw({},t)).join("")!=r}))?function(e,t){for(var n=Yw(e),r=arguments.length,a=1,i=$w.f,s=Qw.f;r>a;)for(var o,d=Jw(arguments[a++]),u=i?eA(zw(d),i(d)):zw(d),c=u.length,l=0;c>l;)o=u[l++],Vw&&!Ww(s,d,o)||(n[o]=d[o]);return n}:Xw,nA=tA;ka({target:"Object",stat:!0,forced:Object.assign!==nA},{assign:nA});var rA=function(){function e(t){T.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return S.default(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new R.default(location.href,!0);for(var a in r.query)t[a]=r.query[a];return Object.keys(t).filter(function(t){var n=this;return k.default(this,e),this.customParamKeys.some(function(e){return k.default(this,n),e===t}.bind(this))}.bind(this)).length>0||n?(console.log("custom-params",t,n),t):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),aA=function(){function e(t,n){T.default(this,e),this.adContainer=t,this.onResume=n}return S.default(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){k.default(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(t);var n=document.createElement("div");this.adResumeButtonOverlay=n,n.id="gd__resume__button__overlay",n.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(n)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),iA=function(e){if(!e)return!1;var t=sA.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)},sA=Object.prototype.toString;function oA(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 dA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oA(Object(n),!0).forEach((function(t){D.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uA(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}function cA(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 lA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cA(Object(n),!0).forEach((function(t){D.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hA=null,fA=function(){function e(t,n,r){var i=this;if(T.default(this,e),hA)return hA;hA=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=n?a.extendDefaults(s,n):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new a.EventBus,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=a.getIMASampleTags(),this.atom_display,this.adType_="",this.clickCount={midroll:0,preroll:0,rewarded:0},this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==t?document.getElementById(t):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:d,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){k.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){k.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,i,s,o,d,u,c,l,h,f,p,v,g,b,_,w,E;return S.default(e,[{key:"start",value:(E=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._init_afg_script({adsense_channel:"4089988593"});case 3:return e.next=5,this._init_hl_script();case 5:return e.next=7,this._init_ima_script();case 7:this._createPlayer(),this._setUpIMA(),e.next=14;break;case 11:throw e.prev=11,e.t0=e.catch(0),new Error(e.t0);case 14:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(){return E.apply(this,arguments)})},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(i){var s,o,d,u,c,l,h,f,p=this;return x.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag"))){r.next=6;break}return s=n.IMASampleTags[e],o=Math.floor(Math.random()*s.length),d=s[o],i({url:d}),r.abrupt("return");case 6:if(void 0!==window.idhb.requestAds){r.next=8;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 8:return r.prev=8,u=n.nextAdPosition(e),n.eventBus.broadcast("AD_REQUEST",{message:u}),c=n.options,"preroll"===u&&m.isPlainObject(c.preroll)?c=c.preroll:"midroll"===u&&m.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===u&&m.isPlainObject(c.rewarded)&&(c=c.rewarded),l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1",r.next=16,window.idhb.isLoaded();case 16:if(h={tnl_keys:lA(lA({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId})},!(t&&t.retry_on_success&&m.isPlainObject(c.retry_on_success)&&m.isPlainObject(c.retry_on_success.vast))){r.next=21;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_success.vast,h)));case 21:if(!(t&&t.retry_on_failure&&n.options.retry_on_failure&&m.isPlainObject(c.retry_on_failure.vast))){r.next=25;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_failure.vast,h)));case 25:if(!m.isPlainObject(c.vast)){r.next=27;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.vast,h)));case 27:return r.next=29,n._create_dp_context(u,t);case 29:f=r.sent,window.idhb.requestAds({slots:D.default({},l,{bidFloor:null!=f&&f.floor_price?f.floor_price:void 0}),callback:function(e,t){var r=this;k.default(this,p),!f||null!=t&&t.bidFloorApplied||fetch(f.skip_url).catch(function(e){k.default(this,r)}.bind(this)),i({tnl_keys:lA(lA({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId}),url:e,dp:f,hl:t})}.bind(this)}),r.next=36;break;case 33:throw r.prev=33,r.t0=r.catch(8),new Error(r.t0);case 36:case"end":return r.stop()}}),r,this,[[8,33]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===a.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===a.AdType.Interstitial){var t=!1===this.gameData.preroll||!0===this.noPreroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===a.AdType.Rewarded?"rewarded":e===a.AdType.Interstitial?!1===this.gameData.preroll||!0===this.noPreroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"_requestAd",value:function(e,t){var n=this;return t=t||{},new Promise(function(r){if(k.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var a,i=null==e||null===(a=e.tnl_keys)||void 0===a?void 0:a.tnl_ad_pos;this.adSuccess=!1;var s=new google.ima.AdsRequest,o=this._transformVast(e,t),d=lA(lA({},t),{},{adTag:o,tnl_ad_pos:i});this.adCounter[i]=this.adCounter[i]||0,this.adCounter[i]++;var u=e.dp,c=e.hl;if(u&&(u.adtag_url=o.url,this._extend_dp_with_adsense(u,c,null==e?void 0:e.tnl_keys)),this._isVMAP(i)){var l=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new R.default(e.adtag_url_1,!0);i.query=dA(dA({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new R.default(e.adtag_url_2,!0);o.query=dA(dA({},o.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++a,output:"xml_vast3"});var d=o.toString(),u=Date.now();return'<?xml version="1.0" encoding="UTF-8"?>\n<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-1">\n <vmap:AdSource id="'.concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(uA({id:u++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(uA({id:u++,adtag_url:d,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:u,adtag:o,position:"preroll"===d.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(i)}));s.adsResponse=l}else if(u&&c.bidFloorApplied){var h=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()}(u);s.adsResponse=h}else if(u&&u.fallback_url){var f=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()}(u);s.adsResponse=f}else s.adTagUrl=o.url;s.linearAdSlotWidth=this.options.width,s.linearAdSlotHeight=this.options.height,s.nonLinearAdSlotWidth=this.options.width,s.nonLinearAdSlotHeight=this.options.height,s.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(s.vastLoadTimeout=this.options.vast_load_timeout),s.setAdWillAutoPlay(t.autoplayAllowed),s.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(s,d);try{this.eventBus.broadcast("AD_SDK_REQUEST",{message:d})}catch(e){}r(s)}catch(e){throw new Error(e)}}.bind(this))}},{key:"cancel",value:function(){if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var e="AD_SDK_CANCELED";this.eventBus.broadcast(e,{name:e,message:"Advertisement has been canceled.",status:"warning",analytics:{category:this.eventCategory,action:e,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(w=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;k.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):M.default.video({inline:!0,muted:!1}).then(function(t){k.default(this,r);var n=t.result;t.error,e(!0===n?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(_=A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"startAd",value:(b=A.default(x.default.mark((function e(t){var n,r,i;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.gameData.afg_disabled,r=t.adType,i=t.params,this.adType_=r,console.log("gd:adp startAd afgDisabled",n),r!==a.AdType.Interstitial){e.next=24;break}if(!n){e.next=9;break}return e.abrupt("return",this._startInterstitialAd(i));case 9:if("preroll"!==(null==i?void 0:i.position)||"adsense"!==(null==i?void 0:i.adapter)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 13:if("start"!==(null==i?void 0:i.position)||"adsense"!==(null==i?void 0:i.adapter)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 17:if("next"!==(null==i?void 0:i.position)||"adsense"!==(null==i?void 0:i.adapter)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 21:return e.abrupt("return",this._startInterstitialAd(i));case 22:case 30:e.next=33;break;case 24:if(r!==a.AdType.Rewarded){e.next=32;break}if(!n){e.next=29;break}return e.abrupt("return",this._startRewardedAd(i));case 29:return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 32:throw new Error("Unsupported ad type");case 33:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"preloadAd",value:(g=A.default(x.default.mark((function e(t){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==a.AdType.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==a.AdType.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return g.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,t=function(){k.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new aA(this.adContainer,t),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(v=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o,d,u,c,l,h,f,p,m=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(o=t?t.containerId:null)||i("Container id is not specified"),d=document.getElementById(o),document.getElementById(o)||i("No container is found with this id - ".concat(o)),void 0===window.idhb.requestAds&&i("Prebid.js wrapper script hit an error or didn't exist!"),u=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(u)||(c="\n .gd__banner{\n z-index: ".concat(a.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=c:l.appendChild(document.createTextNode(c)),d.appendChild(l)),(h=document.createElement("div")).id=u,h.classList.add("gd__banner"),d.appendChild(h)),e.next=10,n._create_dp_display_context();case 10:n.atom_display=e.sent,null!==(s=n.atom_display)&&void 0!==s&&s.params&&window.idhb.setAdserverTargeting(null===(f=n.atom_display)||void 0===f?void 0:f.params),(p={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:p,callback:function(e){k.default(this,m)}.bind(this)}),r(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),i(e.t0.message||e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return v.apply(this,arguments)})},{key:"_startInterstitialAd",value:(p=A.default(x.default.mark((function e(t){var n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,e.next=7,this._initDisplayContainerWithAutoPlay();case 7:return n=e.sent,e.next=10,this._loadInterstitialAd(lA(lA({},n),t));case 10:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return p.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(f=A.default(x.default.mark((function e(t){var n,r,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(a.AdType.Interstitial,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedInterstitialAdVast,e.next=11,this._requestAd(n,lA({adType:a.AdType.Interstitial},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;k.default(this,i);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var a=function(t){k.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){k.default(this,n),this.eventBus.unsubscribeScope(r),t(e.message)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",a,r),this.eventBus.subscribe("AD_SDK_CANCELED",s,r),this.eventBus.subscribe("AD_ERROR",s,r)}.bind(this));case 14:return e.abrupt("return",r);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 f.apply(this,arguments)})},{key:"_startRewardedAd",value:(h=A.default(x.default.mark((function e(t){var n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,e.next=7,this._initDisplayContainerWithAutoPlay();case 7:return n=e.sent,e.next=10,this._loadRewardedAd(lA(lA({},n),t));case 10:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return h.apply(this,arguments)})},{key:"_loadRewardedAd",value:(l=A.default(x.default.mark((function e(t){var n,r,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(a.AdType.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,lA({adType:a.AdType.Rewarded},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;k.default(this,i);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var a=function(t){k.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){k.default(this,n),this.eventBus.unsubscribeScope(r),t(e.message)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",a,r),this.eventBus.subscribe("AD_SDK_CANCELED",s,r),this.eventBus.subscribe("AD_ERROR",s,r)}.bind(this));case 14:return e.abrupt("return",r);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 l.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(c=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(a.AdType.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return c.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(u=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(a.AdType.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return u.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player.src="",this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var t=this;if(this.activeAdContainer){this.activeAdContainer.style.visibility="visible";var n=null==e?void 0:e.mode;e.t4r=Pb(this.gameData.__t4r)||{};var r=this._isT4R(e),a=this._getT4ROptions(e);if("loaded"===n)this.activeAdContainer.style.opacity=r?.001:1,r&&this.adsManager.setVolume(0),r&&this.eventBus.broadcast("AD_T4R"),r&&setTimeout(function(){k.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210));else if("click"===n||"first_quartile"===n){if(r&&"click"===n){var i,s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos;this.clickCount[s]++}this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}}}},{key:"_createPlayer",value:function(){var e=this,t=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=a.Layers.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var n=document.createElement("video");n.setAttribute("playsinline",!0),n.setAttribute("webkit-playsinline",!0),n.id="".concat(this.prefix,"advertisement_video"),n.style.position="absolute",n.style.backgroundColor="#000000",n.style.top="0",n.style.left="0",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px",this.video_ad_player=n,this.adContainer.appendChild(n);var r=document.createElement("div");r.id="".concat(this.prefix,"advertisement_slot"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.adContainerInner=r,this.activeAdContainer=this.adContainer,this.thirdPartyContainer?(this.adContainer.appendChild(r),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(r),t.appendChild(this.adContainer)),this.addAdResume(),this.activeAdContainer.style.visibility="hidden";var i=function(){k.default(this,e);var t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:t,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",i),window.document.addEventListener("DOMContentLoaded",i)}},{key:"_setUpIMA",value:function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.adContainerInner,this.video_ad_player),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(!0),this.adsLoader.getSettings().setLocale(this.options.locale),this.adsLoader.getSettings().setVpaidMode(this._getVPAIDMode()),this.adsLoader.getSettings().setAutoPlayAdBreaks(!0);var e=this.adsLoader.getSettings().getNumRedirects();this.adsLoader.getSettings().setNumRedirects(2*e),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1,this),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError,!1,this)}},{key:"_onAdsManagerLoaded",value:function(e){var t=this,n=new google.ima.AdsRenderingSettings;n.autoAlign=!1,n.enablePreloading=!1,n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.useStyledNonLinearAds=!0,n.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,n),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){k.default(this,t),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),d="AD_SDK_MANAGER_READY";this.eventBus.broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t,n=new Date,r=n.getHours(),i=n.getDate(),s=n.getMonth(),o=n.getFullYear(),d=a.getKeyByValue(google.ima.AdEvent.Type,e.type),u=!1,c=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",l=!c.startsWith("image")&&!c.startsWith("text");this._sendIMAEventsToHB(e);var h="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:h="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:h="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:u=!0,h="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:h="Fired when the ad is clicked.";var f=e.getAd().getContentType();this._show({mode:"click",contentType:f});break;case google.ima.AdEvent.Type.COMPLETE:u=this._is_completed(e.getAd()),h="Fired when the ad completes playing.",this.adType_===a.AdType.Rewarded&&this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:h="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:h="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",u=!0,this._hideAddResume();break;case google.ima.AdEvent.Type.DURATION_CHANGE:h="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:h="Fired when the ad playhead crosses first quartile.";var p=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:p});break;case google.ima.AdEvent.Type.IMPRESSION:h="Fired when the impression URL has been pinged.";break;case google.ima.AdEvent.Type.INTERACTION:h="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:h="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var m=e.getAd().getContentType();h=m,this._show({mode:"loaded",contentType:m});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(h=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:h="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:l&&this.adResume.show(),h="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:h="Fired when the ad is resumed.",l&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:h="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:u=this._is_completed(e.getAd()),h="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:this._hideAddResume(),h="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:h="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:u=this._is_completed(e.getAd()),h="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:h="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:h="Fired when the ad volume has been muted."}""!==d&&""!==h&&this.eventBus.broadcast(d,{name:d,message:h,status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(r," d").concat(i," m").concat(s," y").concat(o)}}),u&&!this.adSuccess&&(this.adSuccess=!0,this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this.resetForNext(e))}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),a=this._getInnerErrorCode(n);this.eventBus.broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,label:r}}),this._hideAddResume()}catch(e){}}},{key:"_hideAddResume",value:function(){try{console.log("gd:adp will hide adresume"),this.adResume&&this.adResume.hide(),console.log("gd:adp hiding adresume")}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event:e})}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,t){var n=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){k.default(this,n),this.cancel(),this._clearSafetyTimer(t)}.bind(this),e)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/headerlift.min.js","http://hb.improvedigital.com/pbw/headerlift.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(iA(e.getInnerError)){var t=e.getInnerError();if(t)return iA(t.getErrorCode)&&iA(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,t){var n=this;if(e){var r=this.macros.transform(e,{get:function(e){if(k.default(this,n),t&&t.tnl_keys)return t.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in r.query||{}){var i=r.query[a];m.isPlainObject(i)&&(r.query[a]=U.default.stringify(i))}var s=new R.default(r.url,!0);return j.default(s.query,r.query||{}),lA({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new R.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new R.default(e.url,!0);if(i.query.cust_params){var s=U.default.parse(i.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=i}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,t,n){var r=this;if(e&&t&&e.tnl_keys){var a=this.options.vast_query;if(t.retry_on_success&&this.options.retry_on_success&&m.isPlainObject(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:t.retry_on_failure&&this.options.retry_on_failure&&m.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=L.default(a),m.isPlainObject(a)){var i=n.query;if(a.$$remove){for(var s in i){new RegExp(a.$$remove,"i").test(s)&&delete i[s]}delete a.$$remove}var o=U.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in o){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete o[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(t){return k.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,j.default(i,u),i.cust_params=U.default.stringify(i.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,a,i=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[i]>=(null===(n=e.t4r[i])||void 0===n?void 0:n.count))return!1;if(null!=e&&null!==(r=e.contentType)&&void 0!==r&&r.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return i&&(null===(a=e.t4r[i])||void 0===a?void 0:a.enabled);if(null!=e&&e.contentType.startsWith("video/")){var s,o=(null===(s=e.t4r[i])||void 0===s?void 0:s.viper)||0;if(o>0){var d,u=Math.random()<o;return i&&u&&(null===(d=e.t4r[i])||void 0===d?void 0:d.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;if(!e)return!1;var v="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(a=r.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(f=this.gameData)||void 0===f||null===(p=f.rAds)||void 0===p||null===(m=p.vmap)||void 0===m?void 0:m.enabled));if(!v)return!1;var g=this._get_vmap_config(e),y=this.adCounter[e];return void 0!==(null==g?void 0:g.start)?y>=(null==g?void 0:g.start):v}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,s=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,o=null!=r&&r.vast_1?void 0:a,d=null!=r&&r.vast_2?void 0:a;return{adtag_url_1:null==i?void 0:i.url,adtag_url_2:null==s?void 0:s.url,position:n,dp_1:o,dp_2:d}}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(t){var n=this;k.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new rA(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(y.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return k.default(this,n),e.json()}.bind(this)).then(function(e){if(k.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();this.msgrt.send("dp.fp",{message:e.p/100}),t({params:{fp:e.p/100},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){k.default(this,n),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}}.bind(this))}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(a){var i,s,o,d,u,c,l=this;return x.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(e)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",a());case 5:s={id:n.topDomain||n.parentDomain,au:e||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(o=new rA(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(y.Base64.encode(JSON.stringify(s))),u=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,c=(null==u?void 0:u.enabled)&&!0!==(null==t?void 0:t.fallback_adsense),fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return k.default(this,l),e.json()}.bind(this)).then(function(e){if(k.default(this,l),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(d):void 0,promo_imp_blue_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){k.default(this,l),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=18;break;case 14:r.prev=14,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 18:case"end":return r.stop()}}),r,this,[[0,14]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new R.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=U.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=U.default.stringify(a,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_init_hl_script",value:(d=A.default(x.default.mark((function e(t){var n,r,i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._getPrebidScripts(),r=n[0],window.idhb=window.idhb||{},window.idhb.options=window.idhb.options||{},Object.assign(window.idhb.options,{assetId:this.gameData.gameId,configUrl:this.topDomain||this.parentDomain,parentUrl:this.parentURL,pageType:"gd"}),window.idhb.que=window.idhb.que||[],e.next=8,a.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,d),window.idhb.requestAds}.bind(this)});case 8:i=a.getQueryString("ch",window.location.href),s=a.getQueryString("ch_date",window.location.href),o={tnl_content_category:this.category.toLowerCase()},i&&(o.channel=i),s&&(o.ch_date=s),window.idhb.setAdserverTargeting(o),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;k.default(this,d);try{var n,r=e.slotId.split("@");r=1===r.length?r[0]:r[1],e.isEmpty?(null!==(n=this.atom_display)&&void 0!==n&&n.error_url&&(fetch(this.atom_display.error_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this.eventBus.broadcast("DISPLAYAD_ERROR",{message:r,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this.eventBus.broadcast("DISPLAYAD_IMPRESSION",{message:r,status:"success"}))}catch(e){}}.bind(this));case 16:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"_init_ima_script",value:(o=A.default(x.default.mark((function e(t){var n,r,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],r=this.options.debug?n[0]:n[1],e.next=4,a.getScript(r,"gdsdk_ima",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,i),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_init_afg_script",value:(s=A.default(x.default.mark((function e(t){var n,r,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(s={}).crossorigin="anonymous",s["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",s["data-ad-frequency-hint"]="30s",s.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(s["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(s["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(s["data-adbreak-test"]="on"),e.next=14,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return k.default(this,o),!!window.adsbygoogle}.bind(this),attrs:s});case 14:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(i=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("gd:adp _startAdsensePlacementRewardedAd"),e.prev=2,!this.requestRunning){e.next=6;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 6:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),n=function(){k.default(this,d),console.log("gd:adp rw beforeAd"),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,d),console.log("gd:adp rw afterAd"),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(){k.default(this,d),console.log("gd:adp rw adDismmissed"),this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),i=function(){k.default(this,d),console.log("gd:adp rw adViewed"),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),s=function(e){k.default(this,d),console.log("gd:adp rw beforeReward"),e()}.bind(this),o=function(e){k.default(this,d),console.log("gd:adp rw adBreakDone"),this.resetForNext(),this.adCounter.rewarded=this.adCounter.rewarded||0,this.adCounter.rewarded++,"viewed"===e.breakStatus?this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),t={type:"reward",name:"reward-in-game",beforeAd:n,afterAd:r,adDismissed:a,adViewed:i,beforeReward:s,adBreakDone:o},window.adsbygoogle.push(t),console.log("gd:adp rw window.adsbygoogle.push(o). tm",window.adsbygoogle),e.next=22;break;case 18:throw e.prev=18,e.t0=e.catch(2),this._onError(e.t0),e.t0;case 22:case"end":return e.stop()}var t}),e,this,[[2,18]])}))),function(e){return i.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(r=A.default(x.default.mark((function e(t){var n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(e){k.default(this,r),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"}),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),t={type:"preroll",adBreakDone:n},window.adsbygoogle.push(t),e.next=16;break;case 12:throw e.prev=12,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 16:case"end":return e.stop()}var t}),e,this,[[1,12]])}))),function(e){return r.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(n=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(){k.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),t={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(t),e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 18:case"end":return e.stop()}var t}),e,this,[[1,14]])}))),function(e){return n.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),n=function(){k.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.midroll=this.adCounter.midroll||0,this.adCounter.midroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),t={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(t),e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 18:case"end":return e.stop()}var t}),e,this,[[1,14]])}))),function(e){return t.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,a=n._ua,i={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:a.browser.name,brvs:a.browser.version,osnm:a.os.name,osvs:a.os.version,dvmd:a.device.model,w:r.w,h:r.h}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(y.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){this._send(e,{gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href})}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;return this.adCounter.preroll=this.adCounter.preroll||0,0===this.adCounter.preroll}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===a.AdType.Rewarded)t="reward";else if(n===a.AdType.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}e.params.position=t}}]),e}(),pA=S.default((function e(t){var n=this;T.default(this,e),D.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Hm(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),D.default(this,"promo",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-stone-dynamic",a=t.package_version||"1.1.1",i=t.template||"puzzle",s=t.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Km(this.moduleName,this.moduleConfig)})),mA=S.default((function e(t){var n=this;T.default(this,e),D.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Hm(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),D.default(this,"splash",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-air-dynamic",a=t.package_version||"1.2.0",i=t.template||"pluto",s=t.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Km(this.moduleName,this.moduleConfig)})),vA=function(e,t){console.log(e,t)},gA={},yA={},bA=null;function _A(){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 gA.version=r,gA.frame=e,gA.function=n,gA.version}function wA(e){var t=this;return bA||(bA=new Promise(function(n){function r(t,r){if(vA("Received a response from CMP",t),r){var a,i;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(i=(a=t)&&"boolean"==typeof a.gdprApplies?a.gdprApplies:e.defaultGdprScope)||!0===i&&"string"!=typeof a.tcString)&&n({result:"cmpUnexpectedResponse",cmp:gA,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}k.default(this,t),_A(),gA.frame?2===gA.version?(vA("TCF v2 CMP found. Fetching the consent."),gA.function?(vA("CMP API is directly accessible, calling it now..."),gA.function("addEventListener",gA.version,r)):(vA("CMP API is outside the current iframe, calling it now..."),function(e,t,n){var r=this,a="__tcfapi";function i(e){var t="".concat(a,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==yA[r.callId]&&yA[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){k.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=D.default({},d,{command:e,parameter:s,callId:o,version:n});yA[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,gA.version,n)}("addEventListener",gA.frame,r))):n({result:"cmpVersionNotV2",cmp:gA}):n({result:"cmpNotFound"})}.bind(this)),bA)}var AA=new(function(){function e(){T.default(this,e),this.productName="Game Distribution"}var t;return S.default(e,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(t=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,d;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(a=null==t||null===(r=t.visitor)||void 0===r?void 0:r.visitorId){e.next=6;break}return e.abrupt("return");case 6:return i=encodeURIComponent(this.productName),s=encodeURIComponent(a),e.prev=8,o="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(s),e.next=12,fetch(o,{method:"POST"});case 12:e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,d="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(s),e.next=22,fetch(d,{method:"POST"});case 22:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,n){return t.apply(this,arguments)})}]),e}());function kA(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 EA(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 EA(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function EA(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 xA=function(e){var t=this,n=e.src,r=e.attributes,a=e.target,i=e.isAsync;return new Promise(function(e,s){var o=this;k.default(this,t);try{var d=document.createElement("script");if(d.async=null==i||i,d.type="text/javascript",d.onload=function(){k.default(this,o),e()}.bind(this),d.onerror=function(){k.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),d.src=n,r){var u,c=kA(r);try{for(c.s();!(u=c.n()).done;){var l=u.value,h=l.key,f=l.value;d.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},SA=function(){var e=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,xA({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,xA({src:"https://cookie-cdn.cookiepro.com/consent/".concat("140feb72-7952-4420-8ae5-e8978d87bc17","/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,xA({src:"https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:"140feb72-7952-4420-8ae5-e8978d87bc17"}],isAsync:!1});case 7:n=void 0,r=void 0,a=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(a=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(a),console.log("GD: CMP cookie pro loaded successfully."),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 14:case"end":return e.stop()}var t,n,r,a}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}(),TA=new b.EventEmitter,DA={"https://games.softgames.com":{"splash-hidden":"splash-hidden"}};function RA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=n.type;if(Object.keys(DA).some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)&&(window.parent&&!n.type.startsWith("gd-sdk")&&(window.parent.postMessage(n,"*"),console.log("GD-SDK:pst fw sg event to parent complete",window.parent.location.href,n)),a)){var i=DA[r][a];i&&TA.emit(i,n)}}),!1);var IA=_.v4(),OA=function(e){var t=this;if(!window.__msgr){var n=document.createElement("iframe");if(n.src="https://static.gamedistribution.com/message/index.html",n.style.display="none",n.name="__msgr",document.body.appendChild(n),window!==window.top){var r={gameId:e.gameId,target:e.evnts.domain,token:IA,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){LA(r)},setInterval(function(){k.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",LA(r)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){k.default(this,t);try{var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RA(Object(n),!0).forEach((function(t){D.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=IA,LA(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},PA=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=CA(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},CA=function e(t){try{var n,r,a=null==t?void 0:t.parent;if("game"===(null===(n=a.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return a;e(a)}catch(e){return t}},LA=function(e){window.__msgr.postMessage(e,"https://static.gamedistribution.com")};function MA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MA(Object(n),!0).forEach((function(t){D.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jA,BA=null,GA=null,NA=function(){function e(t){var n=this;if(T.default(this,e),BA)return BA;BA=this,this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new tb,this._location.print(),this._parentURL=this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._giftCount=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){k.default(this,n),this._sdk_ready=!0}.bind(this)).catch(function(e){k.default(this,n),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t;k.default(this,n),!0===(null===(e=this._gameData.lp)||void 0===e?void 0:e.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(t=this._gameData.evnts)&&void 0!==t&&t.enabled&&this._isLoaderGameURL()&&OA(this._gameData)}.bind(this)),this._registerSGBridge()}var t,n,r,i,s,o,d,u,c,l,h;return S.default(e,[{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(k.default(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var t=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];t&&t.setAttribute("style","display:none")}}.bind(this))}},{key:"_loadCMP",value:(h=A.default(x.default.mark((function e(){var t,n,r,a;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=8;break}if(r=new tb,a=r.get("depth"),console.log("CMP location.depth",a),0!==(null==a?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=8;break}return e.next=7,SA();case 7:console.log("CMP loaded");case 8:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"testConsent",value:function(){console.log("test-consent. Finding CMP");try{var e=_A();console.log("CMP found",e),A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wA({});case 2:t=e.sent,console.log("After lookup IAB consent",t);case 4: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;TA.on("splash-hidden",function(t){k.default(this,e),console.log("GD-SDK:pst on splash-hidden",t),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){console.log(":pst hide cmp button");var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"isLoaded",value:function(){if(void 0===this._isLoaded){var e=this._isTokenGameURL(),t=this._isExtHostedGameURL(),n=this._isMasterGameURL();this._isLoaded=(e||t&&!n)&&this._gameData.loader.enabled}return this._isLoaded}},{key:"setIsLoaded",value:function(e){this._isLoaded=e}},{key:"_sendLoadedEvent",value:function(){if(!this.isLoaded()){this.setIsLoaded(!0);try{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(console.log("in gamedock gameplay",this._gameData.loader.enabled,e),!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),console.log("gamedock gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||!this._bridge.isCoreSDKMode&&this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker()}},{key:"_initializeSDKWithGameData",value:(l=A.default(x.default.mark((function e(t,n){var r,a=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this._gameData=this._getGameData(),e.next=4,this._loadCMP();case 4:this._bridge.isCoreSDKMode=!(!0===this._gameData.enableAds||!0===(null===(r=this._gameData.enableAds)||void 0===r?void 0:r.enabled)),this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==this._gameData.diagnostic.close_ads&&!1!==this._gameData.diagnostic.close_ads||(this.videoAdReady=this._initializeVideoAd().catch(function(e){return k.default(this,a),console.error(e.message||e)}.bind(this))),t(this._gameData),e.next=19;break;case 14:e.prev=14,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),n(e.t0);case 19:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(e,t){return l.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_extendDefaultOptions",value:function(e,t){var n=L.default(e);this.options=t?a.extendDefaults(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=nb.version,t=console.log("%c %c %c GameDistribution.com HTML5 SDK | Version: "+e+" %c %c %c","background: #9854d8","background: #6c2ca7","color: #fff; background: #450f78;","background: #6c2ca7","background: #9854d8","background: #ffffff");console.log.apply(console,t)}}},{key:"_sendTunnlEvent",value:function(e){var t=this;void 0===this._topDomain&&(this._topDomain=void 0);var n={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(U.default.stringify(n))).catch(function(e){k.default(this,t)}.bind(this))}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=a.getQueryParams("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,a.dankLog("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!a.Ls.available)return;"developer.gamedistribution.com"===this._parentDomain?(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0),a.Ls.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0)),a.Ls.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new a.MessageRouter({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:a.getIframeDepth(),version:nb.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:a.getMobilePlatform(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var t=["https://cdn.gamedock.io/gamedock-web-tracker/4.4.0/script/gamedock-sdk.min.js"];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;k.default(this,e),GA=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&GA.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"}),AA.track(GA,this._gameData)}.bind(this)).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=GA)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var t=["https://ext.minijuegosgratis.com/external-host/main.js"];a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadGoogleAnalytics",value:function(){var e=this,t=["https://www.google-analytics.com/analytics.js"];a.getScript(t[0],"gdsdk_google_analytics",{alternates:t,error_prefix:"Blocked:",exists:function(){return k.default(this,e),window.ga}.bind(this)}).then(function(){k.default(this,e),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new a.EventBus,a.SDKEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(k.default(this,e),"developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasapi/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var t=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(t,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(t,"*")}catch(e){}}}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return k.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;k.default(this,e),this.msgrt.send("ad.impression"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&AA.track(GA,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){k.default(this,e),this.msgrt.send("ad.error",{message:t.message,details:t.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(t){k.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){k.default(this,e),t.message.startsWith("Blocked:")?this._bridge.noBlockerEvent||(this.msgrt.send("error",{message:t.message}),this._hasBlocker||(this._hasBlocker=!0,this._sendTunnlEvent(3))):this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){k.default(this,e),this.msgrt.send("tunnl.keys.empty",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(t){k.default(this,e),this.msgrt.send("tunnl.keys.fallback",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(t){return k.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,enableAds:!0,preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(nb.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(c=A.default(x.default.mark((function e(){var t,n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this._gameData,t=void 0===this._gameData.dmain||this._gameData.dmain,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&(this.msgrt.send("blocked"),setTimeout(function(){k.default(this,r),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(U.default.stringify({domain:this._parentDomain,id:n.gameId,img:this._get_game_thumbnail_url(),title:n.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"_checkGameDeleted",value:function(){var e=this;6===this._gameData.status&&(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){k.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&(a.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,a=this._gameData,i=a.gdpr&&!0===a.gdpr.consent,s=a.loader,o=null===(e=a.promo)||void 0===e?void 0:e[null===(t=a.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(a,i):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||i?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):!1!==s.enabled&&this._createSplash(a,i):null!=o&&o.enabled&&this._createPromo(a,i))}},{key:"_initializeVideoAd",value:(u=A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=a.extendDefaults(this.options.advertisementSettings,t.sdk)),this.macros=new a.Macros({game:t,bridge:this._bridge}),this.adInstance=new fA(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=nb,this.adInstance._send("gd.location",this._location.get()),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){a.dankLog(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:function(){var e=Ub();return this._bridge.noPreroll=(!this._getisMobile()||!1!==e.loader.mobile)&&this._bridge.noPreroll,this._bridge.noPreroll&&(this.adRequestTimer=Date.now()),this.msgrt.setGameData(e),a.setDankLog(e.diagnostic),e}},{key:"_createSplash",value:(d=A.default(x.default.mark((function e(t,n){var r,i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(t);case 2:r=e.sent,i=new r(UA(UA({},this.options),{},{isConsentDomain:n,version:nb.version}),t,this._parentDomain),s=Gb(),o=s.enabled,i.on("playClick",function(){var e=this;if(k.default(this,d),n){var t=new Date;t.setDate(t.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(t.toUTCString(),"; path=/")}this._hideCMPButton(),o?window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e),console.log("extsc: splash error",t),i.hide()}.bind(this)):this.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e)}.bind(this))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){k.default(this,d),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){k.default(this,d),i.hide()}.bind(this));case 9:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(o=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(UA(UA({},this.options),{},{isConsentDomain:n,version:nb.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return o.apply(this,arguments)})},{key:"_createPromo",value:(s=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(UA(UA({},this.options),{},{isConsentDomain:n,version:nb.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.default(this,o),s.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return s.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){k.default(this,e)}.bind(this))}},{key:"showAd",value:(i=A.default(x.default.mark((function e(t){var n,r=this,a=arguments;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},console.log("gd:adp, showAd izMaster,izToken",this._isMasterGameURL(),this._isTokenGameURL()),e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(a,i){var s,o,d,u,c,l,h,f,p,m,v,g=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,l={adType:t,params:n,adTimestamp:r.adRequestTimer},e.next=4,r.sdkReady;case 4:return h=e.sent,e.next=7,r.videoAdReady;case 7:return null!==(s=r._gameData.lp)&&void 0!==s&&s.load||r._sendLoadedEvent(),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:h,adRequest:l}),r._rejectAdIfAdDisabled({gameData:h,adRequest:l}),r._rejectAdIfUnsupportedType({adRequest:l}),r._rejectAdIfRewardedDisabled({gameData:h,adRequest:l}),(null===(o=h.gft)||void 0===o||!o.enabled||null!==(d=h.gft)&&void 0!==d&&d.enabled&&(null==h||null===(u=h.gft)||void 0===u||null===(c=u.durations[r._giftCount])||void 0===c?void 0:c.after)!==r.adInstance.adMidrollCount)&&r._rejectAdIfAdRateHits({gameData:h,adRequest:l}),r.adInstance.attachAfgPosition(l),r._attachAfgFallback({gameData:h,adRequest:l}),f="main.showad",p=function(e){var t,n,a;k.default(this,g),r.eventBus.unsubscribeScope(f),r.onResumeGame(e.message,"warning"),null!=h&&null!==(t=h.gft)&&void 0!==t&&t.enabled&&(null==h||null===(n=h.gft)||void 0===n||null===(a=n.durations[r._giftCount])||void 0===a?void 0:a.after)===r.adInstance.adMidrollCount&&r.decideToGiveAGift(),i(e.message)}.bind(this),m=function(e){var t,n,i;k.default(this,g),r.eventBus.unsubscribeScope(f),r.adRequestTimer=Date.now(),r.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),null!=h&&null!==(t=h.gft)&&void 0!==t&&t.enabled&&(null==h||null===(n=h.gft)||void 0===n||null===(i=n.durations[r._giftCount])||void 0===i?void 0:i.after)===r.adInstance.adMidrollCount&&r.decideToGiveAGift(),a(e.message)}.bind(this),v=function(e){var s=this;k.default(this,g),r.eventBus.unsubscribeScope(f),n.fallback_adsense=!1,r.showAd(t,UA(UA({},n),{},{adapter:"adsense"})).then(function(e){k.default(this,s),a(e)}.bind(this)).catch(function(e){k.default(this,s),i(e)}.bind(this))}.bind(this),r.eventBus.subscribe("AD_ERROR",null!=n&&n.fallback_adsense?v:p,f),r.eventBus.subscribe("AD_SDK_CANCELED",null!=n&&n.fallback_adsense?v:p,f),r.eventBus.subscribe("AD_SUCCESS",m,f),e.next=25,r.adInstance.startAd(l);case 25:r._post_message({topic:"adrequest.instream"}),e.next=32;break;case 28:e.prev=28,e.t0=e.catch(0),r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 32:case"end":return e.stop()}}),e,this,[[0,28]])})));return function(t,n){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){if(!e.gameData.enableAds||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==a.AdType.Interstitial&&t.adType!==a.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=a.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===a.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,s,o,d=e.gameData,u=e.adRequest,c=null;u.adType===a.AdType.Interstitial&&null!==(t=d.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=d.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=d.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=d.midroll;if(u.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(s.enableAds&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled.");case 10:if(t){e.next=14;break}t=a.AdType.Rewarded,e.next=16;break;case 14:if(t===a.AdType.Interstitial||t===a.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:if(t!==a.AdType.Rewarded||s.rewardedAds){e.next=18;break}throw new Error("Rewarded ads are disabled.");case 18:return e.next=20,n.adInstance.preloadAd(t);case 20:o=e.sent,r(o),e.next=27;break;case 24:e.prev=24,e.t0=e.catch(0),i(e.t0);case 27:case"end":return e.stop()}}),e,null,[[0,24]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"cancelAd",value:(n=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(n,r){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=A.default(x.default.mark((function n(r,a){var i;return x.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return i=n.sent,n.next=6,t.videoAdReady;case 6:if(!i.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:a("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),a(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;this._allowExternals({enabled:!1});try{this.options.resumeGame()}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||PA({event:"GameStarted",game:this._gameData})}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||PA({event:"GamePaused",game:this._gameData})}},{key:"openConsole",value:function(){try{new a.ImplementationTest(this).start(),a.Ls.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(k.default(this,e),!this._isFullScreen){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var t=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){k.default(this,t),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;k.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return k.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:v,depth:a.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new R.default(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new R.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new R.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(y.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new mA(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i,s;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(n=t.promo)||void 0===n?void 0:n[null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll],s=new pA(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(y.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new R.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(U.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new R.default(e,!0);return n.query=UA(UA({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return y.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=A.default(x.default.mark((function t(n,r){var a;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:a=e._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,t=this._gameData,n=t.assets.find(function(t){return k.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(){var e=this;try{var t,n=null===(t=this._gameData)||void 0===t?void 0:t.gft,r=setInterval(A.default(x.default.mark((function t(){var n=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.adInstance.requestRunning?console.log("Advertisement already running..."):(e.showAd(a.AdType.Interstitial,{position:"midroll"}).catch(function(e){k.default(this,n)}.bind(this)),clearInterval(r),e._giftCount++);case 1:case"end":return t.stop()}}),t,this)}))),1e3*n.durations[this._giftCount].wait)}catch(e){console.log("Advertisement Error...")}}}]),e}(),qA={},FA=function(e){try{if(qA.source){var t={type:"gd-sdk-on-event",event:e};qA.source.postMessage(t,qA.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},VA=function(){FA({name:"SDK_READY",status:"success",message:"Everything is ready."}),FA({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),FA({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},KA=function(e){console.log("gd:adp registerForForwarderPosts");window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,i=n.type,s=n.method,o=n.options;if("gd-sdk-self"===i){var d={type:"gd-sdk",method:s,options:o};return window.postMessage(d,"https://html5.gamedistribution.com"),void console.log("gd:adp after self post")}if("gd-sdk"===i){if(!qA.source&&"init"===s)return function(e){var t=e.source,n=e.origin;qA={source:t,origin:n}}({source:a,origin:r}),void VA();var u=e[s];u&&A.default(x.default.mark((function t(){var n;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(n=u.apply(e,Object.values(o)))||!n.then){t.next=5;break}return t.next=5,n;case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()}}),!1)},WA=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){FA(e),t.apply(this,arguments)}}(e);var t=new NA(e);return KA(t),t},HA={create:function(){var e=A.default(x.default.mark((function e(t){var n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,zb(t);case 3:return n=e.sent,r=n?Kb(t):WA(t),Nb(),e.abrupt("return",r);case 9:return e.prev=9,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",WA(t));case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}()};function zA(){return(zA=A.default(x.default.mark((function e(t,n){var r,a;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vb();case 2:if(r=e.sent,console.log("extsc: should wrapper be called?",r),!r){e.next=8;break}e.t0=window.gdsdk,e.next=11;break;case 8:return e.next=10,QA(t);case 10:e.t0=e.sent;case 11:return a=e.t0,e.abrupt("return",n(a));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var $A=!1;function QA(e){var t=this;return new Promise(function(n,r){var a=this;if(k.default(this,t),jA)return n(jA);if($A)var i=setInterval(function(){k.default(this,a),jA&&($A=!1,clearInterval(i),n(jA))}.bind(this),100);else $A=!0,HA.create(e).then(function(e){k.default(this,a),console.log("sdk created!"),jA=e,e._sendSDKReady(),$A=!1,n(jA)}.bind(this))}.bind(this))}var YA,JA=(QA(YA=function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":E.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===E.default(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}()),{invoke:function(e){return function(e,t){return zA.apply(this,arguments)}(YA,e)}});function XA(){var e=this;this.AdType=a.AdType,this.preloadAd=function(e){var t=this;return JA.invoke(function(n){return k.default(this,t),n.preloadAd(e)}.bind(this))},this.showAd=function(){var e=A.default(x.default.mark((function e(t,n){var r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",JA.invoke(function(e){return k.default(this,r),t===a.AdType.Display?e.showDisplayAd(n):e.showAd(t)}.bind(this)));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return JA.invoke(function(t){return k.default(this,e),t.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return JA.invoke(function(t){return k.default(this,e),t.openConsole()}.bind(this))},this.getSession=function(){var e=this;return JA.invoke(function(t){return k.default(this,e),t.session()}.bind(this))},this.leaderboard={show:function(){k.default(this,e),zm.showLeaderboard()}.bind(this),addScore:function(t){k.default(this,e),zm.addScore(t)}.bind(this)}}XA.prototype=new function(){this.showBanner=function(){var e=this;return JA.invoke(function(t){return k.default(this,e),t.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new XA,window.gdApi=window.gdsdk;