!function(t){function e(i){if(o[i])return o[i].exports;var n=o[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var o={};e.m=t,e.c=o,e.d=function(t,o,i){e.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,o){if(1&o&&(t=e(t)),8&o)return t;if(4&o&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var n in t)e.d(i,n,function(e){return t[e]}.bind(null,n));return i},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,o){"use strict";o.r(e);class i{constructor(t,e){this._logging=t,this._window=e,this._isViewReady=!1,this._isAdReady=!1,this._window.KidozAndroid=this}forwardToGooglePlay(){this.Log("forwardToGooglePlay")}getLocalParameter(){this.Log("getLocalParameter")}getParams(){return this.Log("getParams"),JSON.stringify({})}getParentalLockStatus(){this.Log("getParentalLockStatus")}invokeJavaBannerLoad(){this.Log("invokeJavaBannerLoad")}invokeJavaBannerShow(){this.Log("invokeJavaBannerShow")}notifyIsVastAdReady(t,e){this.Log("notifyIsVastAdReady",{isVastReady:t,vastSettings:e}),this._isAdReady||(this._isAdReady=!0,!0===t&&setTimeout(()=>{this._window.startVastAd(),this._window.resumeVastAd()},0))}notifyIsAdReady(t,e){return this.Log("notifyIsAdReady",{isAdReady:t,adSettings:e}),this._isAdReady?void this.Log("ad already notified ready state"):(this._isAdReady=!0,void(!0===t&&setTimeout(()=>{this._window.startAd(),this._window.resumeAd()},0)))}onAdStateChanged(){this.Log("onAdStateChanged")}onDone(){this.Log("onDone")}onInitWebViewWithProperties(){this.Log("onInitWebViewWithProperties")}onInvokeAboutClick(){this.Log("onInvokeAboutClick")}onInvokeCloseClick(){this.Log("onInvokeCloseClick"),this._window.close()}onInvokeMaximize(){this.Log("onInvokeMaximize")}onInvokeParentalClick(){this.Log("onInvokeParentalClick")}onInvokeUrlResponse(){this.Log("onInvokeUrlResponse")}onRewarded(){this.Log("onRewarded")}onRewardedVideoStarted(){this.Log("onRewardedVideoStarted")}onSendConversionEvent(){this.Log("onSendConversionEvent")}onSendImpressionEvent(t,e,o,i){this.Log("onSendImpressionEvent",{item_id:t,item_name:e,ad_id:o,view_index:i})}onStoreLocalParameter(){this.Log("onStoreLocalParameter")}onViewReady(){return this.Log("onViewReady"),this._isViewReady?void this.Log("ad already notified ready state"):(this._isViewReady=!0,this.Log("calling loadContent"),void setTimeout(()=>this._window.loadContent("{}","[]"),0))}playVideo(){this.Log("playVideo")}resize(t,e){this.Log("resize"),this._window.resizeTo(t,e)}sendEvent(t,e,o,i,n){this.Log("sendEvent",{type:t,category:e,action:o,label:i,jsonData:n})}sendURLEvent(){this.Log("sendURLEvent")}setDeviceOrientation(t){this.Log("setDeviceOrientation",{orientation:t})}simulateClick(t,e){this.Log("simulateClick",{contentItemJson:t,positionIndex:e});const o=JSON.parse(t),i=o[0],n=o[1],s={};for(let t=0;tthis.Load()}Load(){const t=(t=>{const e=new Map;if(0>=(t=0===t.indexOf("?")?t.slice(1,t.length):t).length)return e;const o=t.split("&");for(const t of o){const o=t.indexOf("=");if(-1===o)continue;const i=t.slice(0,o);if(0>=i.length)continue;const n=t.slice(o+1,t.length);0>=n.length||e.set(i,n)}return e})(location.search);if(!t.has("ad"))return void alert("No Ad Selected in Query");const e=document.getElementById("log"),o=new s(e),n=t.get("ad").split(","),a=n[0],r=this.ParseAspectRatio(n[1]),d=this.GetPortalDimensions(800,800,r),h=window.open(a,"_blank",`directories=0,toolbar=0,menubar=0,resizable=0,scrollbars=0,location=0,status=0,height=${d.height},width=${d.width}`,!0);null!==h&&new i(o,h.window)}GetPortalDimensions(t,e,o){var i=Math.floor;const n=e*o;return n<=t?{height:e,width:i(n)}:{height:i(t*(1/o)),width:t}}ParseAspectRatio(t){const e=t.split(":");return parseInt(e[0],10)/parseInt(e[1],10)}}}]);