(()=>{var e,t,n,i,o={583:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={ready:"pokiAppReady",adblocked:"pokiAppAdblocked",startLoading:"pokiAppStartLoading",ads:{completed:"pokiAdsCompleted",error:"pokiAdsError",impression:"pokiAdsImpression",durationChange:"pokiAdsDurationChange",limit:"pokiAdsLimit",ready:"pokiAdsReady",requested:"pokiAdsRequested",prebidRequested:"pokiAdsPrebidRequested",skipped:"pokiAdsSkipped",started:"pokiAdsStarted",stopped:"pokiAdsStopped",busy:"pokiAdsBusy",inFlight:"pokiAdsInflight",position:{preroll:"PP",midroll:"PM",rewarded:"PR",display:"DP"},video:{clicked:"pokiVideoAdsClicked",firstQuartile:"pokiVideoAdsFirstQuartile",midPoint:"pokiVideoAdsMidPoint",thirdQuartile:"pokiVideoAdsThirdQuartile",error:"pokiVideoAdsError",loaderError:"pokiVideoAdsLoaderError",paused:"pokiVideoAdsPauseTriggered",resumed:"pokiVideoAdsResumedTriggered",progress:"pokiVideoAdsProgress",buffering:"pokiVideoAdsBuffering",startHouseAdFlow:"pokiVideoAdsStartHouseAdFlow"},display:{error:"pokiDisplayAdsError"}},info:{messages:{timeLimit:"The ad-request was not processed, because of a time constraint",prerollLimit:"The ad-request was cancelled, because we're not allowed to show a preroll (PokiSDK.commercialBreak before PokiSDK.gameplayStart)",disabled:"The ad-request was cancelled, because we've disabled this format for this specific configuration"}},playtest:{startVideo:"pokiPlaytestStartVideo",stopVideo:"pokiPlaytestStopVideo"},message:{event:"pokiMessageEvent",sdkDetails:"pokiMessageSdkDetails",setPokiURLParams:"pokiMessageSetPokiURLParams",sendGameScreenshot:"pokiMessageSendScreenshot",sendGameRawScreenshot:"pokiMessageSendRawScreenshot",sendUploadScreenshot:"pokiMessageSendUploadScreenshot",sendCommand:"pokiMessageSendCommand",sendInspectorCookies:"pokiMessageSendInspectorCookies"},tracking:{custom:"pokiTrackingCustom",debugTrueInProduction:"pokiMessageDebugTrueProduction",screen:{gameplayStart:"pokiTrackingScreenGameplayStart",gameplayStop:"pokiTrackingScreenGameplayStop",gameLoadingFinished:"pokiTrackingScreenGameLoadingFinished",commercialBreak:"pokiTrackingScreenCommercialBreak",rewardedBreak:"pokiTrackingScreenRewardedBreak",firstRound:"pokiTrackingScreenFirstRound",roundStart:"pokiTrackingScreenRoundStart",roundEnd:"pokiTrackingScreenRoundEnd",displayAd:"pokiTrackingScreenDisplayAdRequest",destroyAd:"pokiTrackingScreenDisplayAdDestroy",playerActive:"pokiTrackingScreenPlayerActive"},playtest:{showModal:"pokiTrackingPlaytestShowModal",accepted:"pokiTrackingPlaytestAccepted",rejected:"pokiTrackingPlaytestRejected",noCanvas:"pokiTrackingPlaytestNoCanvas",starting:"pokiTrackingPlaytestStarting",connected:"pokiTrackingPlaytestConnected",closed:"pokiTrackingPlaytestClosed",error:"pokiTrackingPlaytestError"},sdk:{status:{initialized:"pokiTrackingSdkStatusInitialized",failed:"pokiTrackingSdkStatusFailed"}},ads:{status:{busy:"pokiTrackingAdsStatusBusy",completed:"pokiTrackingAdsStatusCompleted",error:"pokiTrackingAdsStatusError",impression:"pokiTrackingAdsStatusImpression",limit:"pokiTrackingAdsStatusLimit",ready:"pokiTrackingAdsStatusReady",requested:"pokiTrackingAdsStatusRequested",prebidRequested:"pokiTrackingAdsStatusPrebidRequested",skipped:"pokiTrackingAdsStatusSkipped",started:"pokiTrackingAdsStatusStarted",buffering:"pokiTrackingAdsStatusBuffering"},video:{clicked:"pokiTrackingAdsVideoClicked",error:"pokiTrackingAdsVideoError",loaderError:"pokiTrackingAdsVideoLoaderError",progress:"pokiTrackingAdsVideoProgress",paused:"pokiTrackingAdsVideoPaused",resumed:"pokiTrackingAdsVideoResumed"},display:{requested:"pokiTrackingScreenDisplayAdRequested",impression:"pokiTrackingScreenDisplayAdImpression"},rewardedWeb:{request:"pokiTrackingRewardedWebRequest",ready:"pokiTrackingRewardedWebReady",impression:"pokiTrackingRewardedWebImpression",closedGranted:"pokiTrackingRewardedWebClosedGranted",closedDeclined:"pokiTrackingRewardedWebclosedDeclined",empty:"pokiTrackingRewardedWebEmpty"}}}}},95:(e,t,n)=>{"use strict";n.d(t,{K:()=>y,S8:()=>g,ZP:()=>b});var i=n(583),o=n(453),r=n(715),a=n(906);var s=n(801),d=n(298),c=n(687),l=n(888),u=n(272),p=n(128);var A=n(459);function h(){var e;try{e=performance.getEntriesByType("resource").map((function(e){return e.transferSize})).reduce((function(e,t){return e+t})),e+=performance.getEntriesByType("navigation")[0].transferSize}catch(e){}return e}var f=function(){return f=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=t););requestAnimationFrame(a)}},requestAnimationFrame(a)),[2]}))}))}),!1)},this.initWithVideoHB=function(){return n.init()},this.setDebug=function(e){void 0===e&&(e=!0);var t=window.location.hostname;t.endsWith("poki-gdn.com")||"qa-files.poki.com"===t?e&&o.Z.track(i.Z.tracking.debugTrueInProduction):(d.Z.debug=e,d.Z.log=null!=e?e:d.Z.log,e?(0,s.lF)():(0,s.MT)())},this.setLogging=function(e){d.Z.log=e},this.gameLoadingFinished=function(){var e,t,n,r;clearInterval(window.pokiCancelProgressInterval),o.Z.track(i.Z.tracking.screen.gameLoadingFinished,{transferSize:h(),trackers:(n=window,r=[],"function"!=typeof n.ga&&"function"!=typeof n.gtag||r.push("ga"),n.mixpanel&&"function"==typeof n.mixpanel.track&&r.push("mixpanel"),"function"==typeof n.GameAnalytics&&r.push("gameanalytics"),(n.kongregateAPI||n.kongregate)&&r.push("kongregate"),n.FlurryAgent&&r.push("flurry"),n.Countly&&r.push("countly"),n.amplitude&&r.push("amplitude"),r).join(","),error_session_id:s.ZB,now:Math.round(null===(t=null===(e=window.performance)||void 0===e?void 0:e.now)||void 0===t?void 0:t.call(e))||void 0})},this.gameplayStart=function(e){var t;n.ignoreEvents()?d.Z.debug&&console.error("gameplayStart ignored because of too many events"):(n.duringGameplay=!0,n.gameStarted||(n.gameStarted=!0,o.Z.track(i.Z.tracking.screen.firstRound),n.monetization.startStartAdsAfterTimer()),performance.now()-n.lastInteractionTime<5e3&&(t=n.lastInteractionEvent),o.Z.track(i.Z.tracking.screen.gameplayStart,f(f({},e),{fps:n.fpsStats.stats(),badEvents:n.badEventsCounter,interaction:t})),clearTimeout(n.playerActiveTimeout),n.playerActiveTimeout=setTimeout((function(){window.addEventListener("pointermove",n.playerIsActiveEvent),document.addEventListener("keydown",n.playerIsActiveEvent)}),6e5),n.lastGamePlayStop&&(n.lastGamePlayStop>performance.now()-50&&n.badEventsCounter++,n.lastGamePlayStop=0))},this.gameplayStop=function(e){n.ignoreEvents()?d.Z.debug&&console.error("gameplayStop ignored because of too many events"):(n.duringGameplay=!1,o.Z.track(i.Z.tracking.screen.gameplayStop,f(f({},e),{fps:n.fpsStats.stats()})),clearTimeout(n.playerActiveTimeout),window.removeEventListener("pointermove",n.playerIsActiveEvent),document.removeEventListener("keydown",n.playerIsActiveEvent),n.lastGamePlayStop=performance.now())},this.roundStart=function(e){void 0===e&&(e=""),n.ignoreEvents()?d.Z.debug&&console.error("roundStart ignored because of too many events"):(e=String(e),o.Z.track(i.Z.tracking.screen.roundStart,{identifier:e}))},this.roundEnd=function(e){void 0===e&&(e=""),n.ignoreEvents()?d.Z.debug&&console.error("roundEnd ignored because of too many events"):(e=String(e),o.Z.track(i.Z.tracking.screen.roundEnd,{identifier:e}))},this.customEvent=function(e,t,r){void 0===r&&(r={}),e&&t?(e=String(e),t=String(t),r=f({},r),o.Z.track(i.Z.tracking.custom,{eventNoun:e,eventVerb:t,eventData:r})):n.error("customEvent","customEvent needs at least a noun and a verb")},this.commercialBreak=function(e){return new Promise((function(t){if(n.ignoreEvents())return d.Z.debug&&console.error("commercialBreak ignored because of too many events"),void t();var o=n.gameStarted?i.Z.ads.position.midroll:i.Z.ads.position.preroll;n.monetization.requestAd({position:o,onFinish:t,onStart:e})}))},this.rewardedBreak=function(e,t,o,r){return new Promise((function(a){var s,d={};"function"==typeof e?(s=e,void 0!==t&&(d.category=t),void 0!==o&&(d.details=o),void 0!==r&&(d.placement=r)):(void 0!==e&&(d.category=e),void 0!==t&&(d.details=t),void 0!==o&&(d.placement=o)),setTimeout((function(){d.category&&performance.now()-n.lastInteractionTime<500&&(d.from=n.lastInteractionEvent);var e=i.Z.ads.position.rewarded;n.monetization.requestAd({position:e,onFinish:function(e){a(!!(null==e?void 0:e.rewardAllowed))},onStart:s,rewardedKVs:d})}),0)}))},this.displayAd=function(e,t,r,a){var s=(0,c.Z)();o.Z.track(i.Z.tracking.screen.displayAd,{size:t,opportunityId:s,duringGameplay:n.duringGameplay});var d={container:e,opportunityId:s,size:t,duringGameplay:function(){return n.duringGameplay},onCanDestroy:r,onDisplayRendered:a};n.monetization.displayAd(d)},this.isAdBlocked=function(){return!1},this.muteAd=function(){n.monetization.muteAd()},this.logError=function(e){n.captureError(e)},this.setPlaytestCanvas=function(e){return n.playtestSetCanvas(e)},this.playtestSetCanvas=function(t){e.playtestCanvas=t?[].concat(t):[]},this.playtestCaptureHtmlOnce=function(){e.playtestCaptureUI=g},this.playtestCaptureHtmlOff=function(){e.playtestCaptureUI=y},this.getIsoLanguage=function(){return(0,a.Z)("iso_lang")},this.shareableURL=function(e){return void 0===e&&(e={}),new Promise((function(t,n){var o=new URLSearchParams,s=Object.keys(e);if(l.Z.isPokiIframe){var d=(0,a.Z)("poki_url");s.forEach((function(t){void 0!==e[t]&&null!==e[t]&&o.set("gd".concat(t),e[t])})),t("".concat(d,"?").concat(o.toString())),r.Z.sendMessage(i.Z.message.setPokiURLParams,{params:e})}else window.self===window.top?(s.forEach((function(t){void 0!==e[t]&&null!==e[t]&&o.set("".concat(t),e[t])})),t("".concat(window.location.origin).concat(window.location.pathname,"?").concat(o.toString()))):n(new Error("shareableURL only works on Poki or a top level frame"))}))},this.getURLParam=function(e){return(0,a.Z)("gd".concat(e))||(0,a.Z)(e)},this.captureError=function(e){(0,s.$r)(e)},this.getLanguage=function(){return navigator.language.toLowerCase().split("-")[0]},this.generateScreenshot=function(){return m(n,void 0,void 0,(function(){return v(this,(function(e){return[2,(0,A.iz)()]}))}))},this.enableEventTracking=function(e){window.top===window&&o.Z.setupObserverWithCMP(e||0)},this.error=function(e,t){console.error("PokiSDK.".concat(e,": ").concat(t))},this.playerIsActiveEvent=function(){window.removeEventListener("pointermove",n.playerIsActiveEvent),document.removeEventListener("keydown",n.playerIsActiveEvent),o.Z.track(i.Z.tracking.screen.playerActive),n.playerActiveTimeout=setTimeout((function(){window.addEventListener("pointermove",n.playerIsActiveEvent),document.addEventListener("keydown",n.playerIsActiveEvent)}),6e5)},this.interactionEvent=function(e){"mousedown"===e.type?n.lastInteractionEvent="mousedown":"pointerdown"===e.type?n.lastInteractionEvent="pointerdown":"keydown"===e.type&&(n.lastInteractionEvent="keydown-".concat(e.code)),n.lastInteractionTime=performance.now()},this.setDebugTouchOverlayController=function(){},this.gameInteractive=function(){},this.gameLoadingProgress=function(){},this.gameLoadingStart=function(){},this.getLeaderboard=function(){return Promise.resolve([])},this.happyTime=function(){},this.sendHighscore=function(){},this.setPlayerAge=function(){},this.monetization=t,this.SDK=this.monetization,setInterval((function(){n.badEventsCounter=Math.max(n.badEventsCounter-1,0)}),1e3)}return e.prototype.init=function(e){var t=this;return void 0===e&&(e={}),window.addEventListener("pointerdown",this.interactionEvent),document.addEventListener("keydown",this.interactionEvent),new Promise((function(n){t.monetization.init(f({onReady:function(){(0,a.Z)("preroll")&&t.monetization.forcePreroll(),n()}},e)),t.asyncScreenshotLoader(),("inspector-uploads.poki-user-content.com"===window.location.hostname||document.referrer.startsWith("https://inspector.poki.dev/"))&&t.setupInspector(),r.Z.sendMessage(i.Z.message.sdkDetails,{version:"a7c3d8457e9d001550c049f821d50d7c386f7a05"})}))},e.prototype.ignoreEvents=function(){return this.badEventsCounter>=10},e.prototype.destroyAd=function(e){this.monetization.destroyAd(e)},e.prototype.setVolume=function(e){this.monetization.setVolume(e)},e.getGameCanvasses=function(){var t=e.playtestCanvas;if(null==t?void 0:t.length)return t;var n=0,i=Array.from(document.getElementsByTagName("canvas")),o=[];return i.forEach((function(e){if("true"!==e.getAttribute("data-no-playtest")){var t=getComputedStyle(e),i=t.width,r=t.height,a=parseInt(i,10)*parseInt(r,10);a>=n&&function(e){if(!e)return!1;for(var t=e,n=!0;t&&t!==document.body;){var i=window.getComputedStyle(t);if("none"===i.display)return!1;if("hidden"===i.visibility)return!1;if(n&&(0===t.offsetWidth||0===t.offsetHeight))return!1;"absolute"===i.position&&(n=!1),t=t.parentElement}var o=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,a=window.innerWidth||document.documentElement.clientWidth;return!(o.right<0||o.bottom<0||o.left>a||o.top>r)}(e)&&(a>n&&(o=[]),o.push({canvas:e,style:t,index:o.length}),n=a)}})),o.sort((function(e,t){var n=parseInt(e.style.zIndex,10)||0,i=parseInt(t.style.zIndex,10)||0;return ni?1:e.index-t.index})),o.map((function(e){return e.canvas}))},e.playtestCaptureUI="",e}()},715:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(583),o=n(992),r=n(888);const a=function(){function e(){}return e.sendMessage=function(e,t,n){if(void 0===n&&(n=window.parent),!(0,o.Z)(e,i.Z.message)){var a=Object.keys(i.Z.message).map((function(e){return"poki.message.".concat(e)}));throw new TypeError("Argument 'type' must be one of ".concat(a.join(", ")))}var s=t||{};r.Z.gameID&&r.Z.versionID&&(s.pokifordevs={game_id:r.Z.gameID,game_version_id:r.Z.versionID}),null==n||n.postMessage({type:e,content:s},"*")},e}()},58:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(298),o=function(){return o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n{"use strict";n.d(t,{$:()=>d,Z:()=>c});var i=n(888),o=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((i=i.apply(e,t||[])).next())}))},r=function(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(d){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&s[0]?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1].01||navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<=-1||(e.collectAndLog(),setInterval(e.collectAndLog,12e4)))},e}()},459:(e,t,n)=>{"use strict";n.d(t,{dF:()=>Ie,iz:()=>ge,FR:()=>ye,Ii:()=>be,lW:()=>we});var i=n(583),o=n(715),r=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((i=i.apply(e,t||[])).next())}))},a=function(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(d){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&s[0]?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]p||e.height>p)&&(e.width>p&&e.height>p?e.width>e.height?(e.height*=p/e.width,e.width=p):(e.width*=p/e.height,e.height=p):e.width>p?(e.height*=p/e.width,e.width=p):(e.width*=p/e.height,e.height=p))}(a),a.style.width="".concat(c),a.style.height="".concat(l),t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,a.width,a.height)),s.drawImage(r,0,0,a.width,a.height),[2,a]}}))}))}function he(e,t){return void 0===t&&(t={}),le(this,void 0,void 0,(function(){return ue(this,(function(n){switch(n.label){case 0:return[4,Ae(e,t)];case 1:return[2,n.sent().toDataURL()]}}))}))}var fe=n(801),me=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((i=i.apply(e,t||[])).next())}))},ve=function(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(d){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&s[0]?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]10?e?[4,ke(t,e)]:[3,3]:[3,5];case 2:t=n.sent(),n.label=3;case 3:return[4,we({screenshot:t})];case 4:return[2,n.sent()];case 5:return[2,null]}}))}))},ye=function(e){return me(void 0,void 0,void 0,(function(){var t,n,r,a,s;return ve(this,(function(d){switch(d.label){case 0:return t=e.hasFrame,n=null,t?(r=e.title,a=e.thumbnail,[4,ge({title:r,thumbnail:a})]):[3,2];case 1:return n=d.sent(),[3,4];case 2:return[4,ge()];case 3:n=d.sent(),d.label=4;case 4:return s={screenshot:n,errors:(0,fe.FU)()},e.callback&&(s.callback=e.callback),o.Z.sendMessage(i.Z.message.sendGameScreenshot,{data:s}),[2]}}))}))},be=function(){return me(void 0,void 0,void 0,(function(){var e;return ve(this,(function(t){switch(t.label){case 0:return[4,Ee()];case 1:return e=t.sent(),o.Z.sendMessage(i.Z.message.sendGameRawScreenshot,{data:{screenshot:e}}),[2]}}))}))},we=function(e){return me(void 0,void 0,void 0,(function(){var t,n,i,o;return ve(this,(function(r){switch(r.label){case 0:return t=e.screenshot,"https://api.poki.io/screenshot",n="https://poki-user-content.com/",[4,fetch("https://api.poki.io/screenshot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:t})})];case 1:i=r.sent(),r.label=2;case 2:return r.trys.push([2,5,,6]),200!==i.status?[3,4]:[4,i.json()];case 3:return o=r.sent(),[2,n+o.source];case 4:return[3,6];case 5:return r.sent(),[3,6];case 6:return[2,null]}}))}))},ke=function(e,t){return me(void 0,void 0,void 0,(function(){var n,i,o,r,a,s,d,c,l,u,p,A,h,f,m,v,g,y,b,w,k,Z,E;return ve(this,(function(I){switch(I.label){case 0:return n=t.title,i=t.thumbnail,(o=new Image).crossOrigin="Anonymous",r=new Promise((function(e){o.onload=function(){return e(o)}})),o.src=e,(a=new Image).crossOrigin="Anonymous",s=new Promise((function(e){a.onload=function(){return e(a)}})),a.src="https://a.poki.com/images/screenshot-frame.png",(d=new Image).crossOrigin="Anonymous",c=new Promise((function(e){d.onload=function(){return e(d)}})),128,d.src="https://img.poki.com/cdn-cgi/image/quality=78,width=".concat(128,",height=").concat(128,",fit=cover,f=auto/").concat(i),l=new FontFace("TorusBold","url(https://a.poki.com/fonts/torus-bold-latin.woff2)"),u=l.load(),[4,Promise.all([r,s,c,u])];case 1:return p=I.sent(),A=p[0],h=p[1],f=p[2],m=p[3],(v=document.createElement("canvas")).width=A.width,v.height=A.height,(g=v.getContext("2d")).drawImage(A,0,0),y=v.width/h.width,b=h.height*y,w=v.height-b,g.drawImage(h,0,w,v.width,b),k=f.height*y,Ze(g,f,64*y,w+20*y,k,k,24*y),document.fonts.add(m),Z=226*y,E=w+68*y,g.textAlign="left",g.textBaseline="top",g.fillStyle="#002b50",g.font="700 ".concat(56*y,"px TorusBold,sans-serif"),g.fillText(n,Z,E),[2,v.toDataURL()]}}))}))},Ze=function(e,t,n,i,o,r,a){e.save(),e.beginPath();var s=n+o,d=i+r;e.moveTo(n+a,i),e.lineTo(s-a,i),e.quadraticCurveTo(s,i,s,i+a),e.lineTo(s,d-a),e.quadraticCurveTo(s,d,s-a,d),e.lineTo(n+a,d),e.quadraticCurveTo(n,d,n,d-a),e.lineTo(n,i+a),e.quadraticCurveTo(n,i,n+a,i),e.closePath(),e.clip(),e.drawImage(t,n,i,o,r),e.restore()},Ee=function(){return me(void 0,void 0,void 0,(function(){var e,t,n,i,o;return ve(this,(function(r){switch(r.label){case 0:return e=function(e){return!["VIDEO","TEXTAREA","NOSCRIPT","INPUT","IFRAME"].includes(e.nodeName)&&!("IMG"===e.nodeName&&!e.getAttribute("src"))},t=document.body.style.minWidth,n=document.body.style.minHeight,document.body.style.minWidth="100%",document.body.style.minHeight="100%",[4,he(document.body,{quality:.95,filter:e})];case 1:return(i=r.sent())&&i.length<10?(o=document.body.style.position,document.body.style.position="fixed",[4,he(document.body,{quality:.95,filter:e})]):[3,3];case 2:i=r.sent(),document.body.style.position=o,r.label=3;case 3:return document.body.style.minWidth=t,document.body.style.minHeight=n,[2,i]}}))}))},Ie=function(e){return me(void 0,void 0,void 0,(function(){var t,n,i,o,r;return ve(this,(function(a){switch(a.label){case 0:e=e||function(e){return!["VIDEO","TEXTAREA","NOSCRIPT","INPUT","IFRAME","CANVAS"].includes(e.nodeName)&&!("IMG"===e.nodeName&&!e.getAttribute("src"))},t=document.body.style.minWidth,n=document.body.style.minHeight,i=document.body.style.backgroundColor,document.body.style.minWidth="100%",document.body.style.minHeight="100%",document.body.style.backgroundColor="transparent",a.label=1;case 1:return a.trys.push([1,3,,4]),[4,pe(document.body,{quality:.95,filter:e})];case 2:return o=a.sent(),[3,4];case 3:return r=a.sent(),console.error(r),[3,4];case 4:return document.body.style.minWidth=t,document.body.style.minHeight=n,document.body.style.backgroundColor=i,[2,o]}}))}))}},453:(e,t,n)=>{"use strict";function i(e){var t=new RegExp("".concat(e,"=([^;]+)(?:;|$)")).exec(document.cookie);return t?t[1]:""}function o(e,t,n){document.cookie="".concat(e,"=").concat(t,"; path=/; samesite=lax; max-age=").concat(Math.min(n||15552e3,15552e3))}function r(){for(var e=Math.floor(Date.now()/1e3),t="",n=0;n<4;n++)t=String.fromCharCode(255&e)+t,e>>=8;if(window.crypto&&crypto.getRandomValues&&Uint32Array){var i=new Uint32Array(12);crypto.getRandomValues(i);for(var o=0;o<12;o++)t+=String.fromCharCode(255&i[o])}else for(var r=0;r<12;r++)t+=String.fromCharCode(Math.floor(256*Math.random()));return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}n.d(t,{Z:()=>C});function a(e,t,n){console.error(e);var i=[{k:"where",v:t},{k:"error",v:e.name&&e.message?"".concat(e.name,": ").concat(e.message):JSON.stringify(e)}];if(void 0!==n){var o=n;"string"!=typeof e&&(o=JSON.stringify(e)),i.push({k:"extra",v:o})}!function(e,t){if(navigator.sendBeacon){var n=navigator.sendBeacon.bind(navigator);try{if(n(e,t))return}catch(e){console.error(e)}}try{var i="XMLHttpRequest"in window?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");i.open("POST",e,!0),i.setRequestHeader("Content-Type","text/plain"),i.send(t)}catch(e){}}("https://t.poki.io/l",JSON.stringify({c:"observer-error",ve:7,d:i}))}window._pokiUserGlobalName=window._pokiUserGlobalName||"user";var s="poki_session";function d(e){return!(!e||!(e&&e.page&&e.landing_page&&e.previous_page)||!e.tab_id||!e.expire||Date.now()>e.expire||e.expire>Date.now()+18e5)}function c(){var e=null;d(window[window._pokiSessionGlobalName])&&(e=window[window._pokiSessionGlobalName]);try{var t=JSON.parse(sessionStorage.getItem(s));d(t)&&(!e||t.depth>e.depth)&&(e=t)}catch(e){try{a(e,"getTabSession",sessionStorage.getItem(s))}catch(t){a(e,"getTabSession",t)}}return e}function l(){var e=c();return e?e.tab_id:r()}function u(){var e=0,t=c();t&&(e=t.depth);try{var n=JSON.parse(i(s)||null);d(n)&&(e=Math.max(e,n.depth))}catch(e){var o=null;try{o=i(s)||null}catch(e){}a(e,"getSessionDepth",o)}return e}function p(){try{var e=i("ses_cnt");return e&&parseInt(e,10)||0}catch(e){return 0}}window._pokiSessionGlobalName=window._pokiSessionGlobalName||"session";var A=n(583),h=n(715),f=n(298),m=function(e){var t=new Array;return Object.keys(e).forEach((function(n){"object"==typeof e[n]?t=t.concat(m(e[n])):t.push(e[n])})),t};const v=m;var g=n(902),y=n(699),b=n(888),w=n(58),k=function(){return k=Object.assign||function(e){for(var t,n=1,i=arguments.length;n1&&function(){try{o("uid_new","0"),sessionStorage.setItem("uid_new","0")}catch(e){}window[window._pokiUserGlobalName]&&(window[window._pokiUserGlobalName].is_new=!1)}();var h=JSON.stringify(A);try{sessionStorage.setItem(s,h)}catch(e){a(e,"updateSession-1")}window[window._pokiSessionGlobalName]=A;try{o(s,h)}catch(e){a(e,"updateSession-4")}}catch(e){a(e,"updateSession-2")}}(window.location.pathname,"external",b.Z.contentGameID),function(){var e,t,n=null===(e=window[window._pokiUserGlobalName])||void 0===e?void 0:e.id,a=(null===(t=window[window._pokiUserGlobalName])||void 0===t?void 0:t.is_new)||!1;if(!n)try{n=sessionStorage.getItem("uid"),a="1"===sessionStorage.getItem("uid_new")}catch(e){}n||(n=i("uid"),a="1"===i("uid_new")),n||(n=r(),a=!0),o("uid",n),o("uid_new",a?"1":"0");try{sessionStorage.setItem("uid",n),sessionStorage.setItem("uid_new",a?"1":"0")}catch(e){}window[window._pokiUserGlobalName]={id:n,is_new:a}}(),E[E._pokiContextGlobalName]={tag:null,site:{id:null,domain:window.location.hostname,prefix:""},page:{id:b.Z.contentGameID,type:"external",path:window.location.pathname,pageview_id:r()},user:E[E._pokiUserGlobalName],session:E[E._pokiSessionGlobalName]},E.pokiGTM=E.pokiGTM||[],(0,y.Z)("https://a.poki.com/t2.js"),e.logToObserver=!0},e.logToObserver=!1,e.cmpRequired=void 0,e.cmpIndex=void 0,e.playtestMessageCallback=function(){},e}();const C=I},662:(e,t,n)=>{"use strict";n.d(t,{D:()=>o,M:()=>r});var i=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","GB","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO"],o="ZZ";function r(e){return i.includes(e)}},298:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(888);const o=function(){function e(){}return e.debug=!1,e.log=!1,e.init=function(t,n){var o,r,a=window.location.hostname;void 0===t&&("test"===(null===(r=null===(o=null===window||void 0===window?void 0:window.process)||void 0===o?void 0:o.env)||void 0===r?void 0:r.NODE_ENV)?(t=!1,void 0===n&&(n=!1)):"localhost"===a||"127.0.0.1"===a||"[::1]"===a?(t=!0,void 0===n&&(n=!1)):(t=!1,void 0===n&&(n=!1))),i.Z.isInspector||"qa-files.poki.com"===a?(t=!0,n=!0):a.endsWith(".poki-gdn.com")&&(t=!1,n=!1),i.Z.debugMode&&(t=!0),i.Z.logMode&&(n=!0),void 0===n&&(n=t),e.debug=t,e.log=n},e}()},272:(e,t,n)=>{"use strict";n.d(t,{V:()=>o});function i(e){return Math.round(100*e)/100}var o=function(){function e(e){var t=this;this.seconds=[],this.frameCounter=0,Math.random()>e||window.requestAnimationFrame&&-1!==window.requestAnimationFrame.toString().indexOf("[native code]")&&(this.nextSecond=performance.now()+1e3,window.requestAnimationFrame((function(){t.frame()})))}return e.prototype.frame=function(){for(var e=this,t=performance.now();t>=this.nextSecond;)this.seconds.unshift(this.frameCounter),this.seconds.length>10&&this.seconds.pop(),this.frameCounter=0,this.nextSecond+=1e3;this.frameCounter++,window.requestAnimationFrame((function(){e.frame()}))},e.prototype.stats=function(){var e=this;if(0!==this.seconds.length){var t=Math.min.apply(Math,this.seconds),n=Math.max.apply(Math,this.seconds),o=i(this.seconds.reduce((function(e,t){return e+t}),0)/this.seconds.length),r=i(this.seconds.slice(1).map((function(t,n){return Math.abs(t-e.seconds[n])})).reduce((function(e,t){return e+t}),0)/(this.seconds.length-1));return isNaN(r)&&(r=0),"".concat(t,"|").concat(n,"|").concat(o,"|").concat(r)}},e}()},687:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(){for(var e=Math.floor(Date.now()/1e3),t="",n=0;n<4;n++)t=String.fromCharCode(255&e)+t,e>>=8;if(window.crypto&&crypto.getRandomValues&&Uint32Array){var i=new Uint32Array(12);crypto.getRandomValues(i);for(n=0;n<12;n++)t+=String.fromCharCode(255&i[n])}else for(n=0;n<12;n++)t+=String.fromCharCode(Math.floor(256*Math.random()));return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}},906:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(e,t){var n;if("undefined"==typeof window&&!t)return"";e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("(?:[\\?&]|^)".concat(e,"=([^&#]*)")).exec(t||(null===(n=null===window||void 0===window?void 0:window.location)||void 0===n?void 0:n.search)||"");return null===i?"":decodeURIComponent(i[1].replace(/\+/g," "))}},640:()=>{var e=document.createElement("style");e.innerHTML="\n\t".concat("\n\tcanvas{\n\t\ttouch-action: none;\n\t\t-webkit-touch-callout: none;\n\t\t-webkit-user-select: none;\n\t\t-moz-user-select: none;\n\t\t-ms-user-select: none;\n\t\tuser-select: none;\n\t}\n","\n"),document.head.appendChild(e)},893:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(){return"undefined"!=typeof navigator&&/(?:phone|windows\s+phone|ipod|blackberry|(?:android|bb\d+|meego|silk|googlebot) .+? mobile|palm|windows\s+ce|opera\smini|avantgo|mobilesafari|docomo)/i.test(navigator.userAgent)}},573:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(){return"undefined"!=typeof navigator&&/(?:ipad|playbook|(?:android|bb\d+|meego|silk)(?! .+? mobile))/i.test(navigator.userAgent)}},699:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(e){return new Promise((function(t,n){var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e;var o=function(){i.readyState&&"loaded"!==i.readyState&&"complete"!==i.readyState||(t(),i.onload=null,i.onreadystatechange=null)};i.onload=o,i.onreadystatechange=o,i.onerror=n,document.head.appendChild(i)}))}},801:(e,t,n)=>{"use strict";function i(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}}n.d(t,{lF:()=>w,MT:()=>b,ZB:()=>h,FU:()=>m,$r:()=>v,eK:()=>f});var o,r,a,s,d=n(888),c=[],l=(o=100,r=!1,a=0,function(e){if(r)a++;else{r=!0,setTimeout((function(){r=!1}),o);var t=a;a=0,e(t)}}),u=console.error,p=["Audio callback had starved sending audio by"],A=!1,h=Math.random().toString(36).substr(2,9);function f(e){s=e}function m(){return c}function v(e,t){void 0===t&&(t=!0),d.Z.gameID&&!d.Z.isPlayground?l((function(t){try{var n=e.message||JSON.stringify(e);c.push({n:e.name,m:n,s:JSON.stringify(e.stack)}),s&&s({name:e.name,message:n,stack:e.stack});var i=JSON.stringify({gid:d.Z.gameID,vid:d.Z.versionID,ve:7,n:e.name,m:n+(t?" (skipped ".concat(t," errors)"):""),s:JSON.stringify(e.stack),ui:h}),o="https://t.poki.io/ge";if(navigator.sendBeacon)navigator.sendBeacon(o,i);else{var r=new XMLHttpRequest;r.open("POST",o,!0),r.send(i)}}catch(e){console.error(e)}})):t&&console.log(e)}function g(e){i(e.reason)?v(e.reason):v({name:"unhandledrejection",message:JSON.stringify(e.reason)||JSON.stringify(e)})}function y(e){i(e.error)?v(e.error):v(e)}function b(){if(!A){A=!0,window.addEventListener("unhandledrejection",g),window.addEventListener("error",y);try{console.error=function(){for(var e=[],t=0;t{"use strict";n.d(t,{Z:()=>s});var i=n(298),o=n(888),r=n(58),a=function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n{"use strict";n.d(t,{Z:()=>p,w:()=>u});var i=n(662),o=n(906),r=n(893),a=n(573);var s,d,c=(0,o.Z)("url_referrer")||"",l={bot:"1"===(0,o.Z)("bot"),categories:(0,o.Z)("categories")||"",device:(0,r.Z)()?"mobile":(0,a.Z)()?"tablet":"desktop",experiment:(0,o.Z)("experiment")||"",forceAd:(0,o.Z)("force_ad")||!1,isPokiIframe:(parseInt((0,o.Z)("site_id"),10)||0)>0,siteID:parseInt((0,o.Z)("site_id"),10)||3,tag:(0,o.Z)("tag")||"",versionID:(0,o.Z)("game_version_id"),debugMode:"true"===(0,o.Z)("pokiDebug"),logMode:""!==(0,o.Z)("pokiLogging"),playtest:(0,o.Z)("playtest"),testVideos:"true"===(0,o.Z)("testVideos"),referrer:c,isPlayground:!!window.isPokiPlayground,isInspector:"inspector-uploads.poki-user-content.com"===(null===(s=null===window||void 0===window?void 0:window.location)||void 0===s?void 0:s.host)||(null===(d=null===document||void 0===document?void 0:document.referrer)||void 0===d?void 0:d.includes("inspector.poki.dev"))||"1"===(0,o.Z)("inspector"),ccpaApplies:(0,o.Z)("ccpaApplies"),country:((0,o.Z)("country")||"").toUpperCase(),gameID:(0,o.Z)("game_id"),gdprApplies:(0,i.M)(((0,o.Z)("country")||"").toUpperCase()),contentGameID:void 0,specialCondition:(0,o.Z)("special_condition"),iabcat:void 0,nonPersonalized:"y"===(0,o.Z)("nonPersonalized"),familyFriendly:"y"===(0,o.Z)("familyFriendly")},u=function(e,t){l[e]=t};const p=l},563:()=>{Promise.allSettled=Promise.allSettled||function(e){return Promise.all(e.map((function(e){return e.then((function(e){return{status:"fulfilled",value:e}})).catch((function(e){return{status:"rejected",reason:e}}))})))}},992:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=function(e,t){var n=!1;return Object.keys(t).forEach((function(i){t[i]===e&&(n=!0)})),n}}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return o[e].call(n.exports,n,n.exports,a),n.exports}a.m=o,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var o=Object.create(null);a.r(o);var r={};e=e||[null,t({}),t([]),t(t)];for(var s=2&i&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>r[e]=()=>n[e]));return r.default=()=>n,a.d(o,r),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>e+".js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},i="@poki/poki-sdk:",a.l=(e,t,o,r)=>{if(n[e])n[e].push(t);else{var s,d;if(void 0!==o)for(var c=document.getElementsByTagName("script"),l=0;l{s.onerror=s.onload=null,clearTimeout(A);var o=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(i))),t)return t(i)},A=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),d&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&!e;)e=n[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={702:0};a.f.j=(t,n)=>{var i=a.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var o=new Promise(((n,o)=>i=e[t]=[n,o]));n.push(i[2]=o);var r=a.p+a.u(t),s=new Error;a.l(r,(n=>{if(a.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+r+")",s.name="ChunkLoadError",s.type=o,s.request=r,i[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var i,o,[r,s,d]=n,c=0;if(r.some((t=>0!==e[t]))){for(i in s)a.o(s,i)&&(a.m[i]=s[i]);if(d)d(a)}for(t&&t(n);c{"use strict";var e=a(583),t=a(453),n=(a(563),a(888)),i=a(298),o=a(128);function r(e){if(document.body&&document.body.appendChild){var t=document.createElement("iframe");t.style.display="none",document.body.appendChild(t),t.contentWindow&&(t.contentWindow.document.open(),t.contentWindow.document.write("