!function(){"use strict";function e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function n(e,n){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:"App";e(this,o),this.os=n,this.bridge=t,this.windowAsAny=window}var t,r,i;return t=o,r=[{key:"resolveMethod",value:function(e){var n,o,t,r,i=this;if("android"===this.os){if(void 0===(null===(n=this.windowAsAny[this.bridge])||void 0===n?void 0:n[e]))throw new Error("window[".concat(this.bridge,"][").concat(e,"] does not exist"));return function(n,o){var t=JSON.stringify({callback:n,parameter:o[0]});i.windowAsAny[i.bridge][e](t)}}if(void 0===(null===(r=null===(t=null===(o=this.windowAsAny.webkit)||void 0===o?void 0:o.messageHandlers)||void 0===t?void 0:t[e])||void 0===r?void 0:r.postMessage))throw new Error("window.webkit.messageHandlers[".concat(e,"].postMessage does not exist"));return function(n,o){var t=JSON.stringify({callback:n,parameter:o[0]});i.windowAsAny.webkit.messageHandlers[e].postMessage(t)}}},{key:"invoke",value:function(e){for(var n=this,t=arguments.length,r=new Array(t>1?t-1:0),i=1;i