webviewjsbridge.min.js 1.3 KB

1
  1. !function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=3)}([function(e,n,t){"use strict";e.exports=function(e){var n=e.headers||{},t=(n["content-type"]||n["Content-Type"]||"").toString().toLowerCase();-1!==t.indexOf("image")&&-1===e.responseText.indexOf("base64")&&(e.responseText="data:"+t+";base64,"+e.responseText)}},,,function(e,n,t){function r(e){if(window.WebViewJavascriptBridge)return e(WebViewJavascriptBridge);if(window.WVJBCallbacks)return window.WVJBCallbacks.push(e);window.WVJBCallbacks=[e];var n=document.createElement("iframe");n.style.display="none",n.src="https://__bridge_loaded__",document.documentElement.appendChild(n),setTimeout(function(){document.documentElement.removeChild(n)},0)}function o(e,n){r(function(t){t.callHandler("onAjaxRequest",e,function(t){t=JSON.parse(t),"stream"===e.responseType&&i(t),n(t)})})}var i=t(0);!function(e,n){n()}(0,function(){window.wjsbAdapter=o}),e.exports=o}]);