Advertisement
Guest User

Untitled

a guest
Feb 13th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. __d(function(e, l, t, u, s) {
  2.     'use strict';
  3.     var a = l(s[0]),
  4.         i = l(s[1]),
  5.         n = (l(s[2]), l(s[3])),
  6.         h = (l(s[4]), null),
  7.         r = (function() {
  8.             function t() {
  9.                 var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
  10.                 babelHelpers.classCallCheck(this, t), this._lazyCallableModules = {}, this._queue = [
  11.                     [],
  12.                     [],
  13.                     [], 0
  14.                 ], this._successCallbacks = [], this._failureCallbacks = [], this._callID = 0, this._lastFlush = 0, this._eventLoopStartTime = (new Date).getTime(), e ? this.uninstallGlobalErrorHandler() : this.installGlobalErrorHandler(), this.callFunctionReturnFlushedQueue = this.callFunctionReturnFlushedQueue.bind(this), this.callFunctionReturnResultAndFlushedQueue = this.callFunctionReturnResultAndFlushedQueue.bind(this), this.flushedQueue = this.flushedQueue.bind(this), this.invokeCallbackAndReturnFlushedQueue = this.invokeCallbackAndReturnFlushedQueue.bind(this)
  15.             }
  16.             return babelHelpers.createClass(t, [{
  17.                 key: "callFunctionReturnFlushedQueue",
  18.                 value: function(e, l, t) {
  19.                     var u = this;
  20.                     return this.__guard(function() {
  21.                         u.__callFunction(e, l, t)
  22.                     }), this.flushedQueue()
  23.                 }
  24.             }, {
  25.                 key: "callFunctionReturnResultAndFlushedQueue",
  26.                 value: function(e, l, t) {
  27.                     var u = this,
  28.                         s = void 0;
  29.                     return this.__guard(function() {
  30.                         s = u.__callFunction(e, l, t)
  31.                     }), [s, this.flushedQueue()]
  32.                 }
  33.             }, {
  34.                 key: "invokeCallbackAndReturnFlushedQueue",
  35.                 value: function(e, l) {
  36.                     var t = this;
  37.                     return this.__guard(function() {
  38.                         t.__invokeCallback(e, l)
  39.                     }), this.flushedQueue()
  40.                 }
  41.             }, {
  42.                 key: "flushedQueue",
  43.                 value: function() {
  44.                     var e = this;
  45.                     this.__guard(function() {
  46.                         e.__callImmediates()
  47.                     });
  48.                     var l = this._queue;
  49.                     return this._queue = [
  50.                         [],
  51.                         [],
  52.                         [], this._callID
  53.                     ], l[0].length ? l : null
  54.                 }
  55.             }, {
  56.                 key: "getEventLoopRunningTime",
  57.                 value: function() {
  58.                     return (new Date).getTime() - this._eventLoopStartTime
  59.                 }
  60.             }, {
  61.                 key: "registerCallableModule",
  62.                 value: function(e, l) {
  63.                     this._lazyCallableModules[e] = function() {
  64.                         return l
  65.                     }
  66.                 }
  67.             }, {
  68.                 key: "registerLazyCallableModule",
  69.                 value: function(e, l) {
  70.                     var t = void 0,
  71.                         u = l;
  72.                     this._lazyCallableModules[e] = function() {
  73.                         return u && (t = u(), u = null), t
  74.                     }
  75.                 }
  76.             }, {
  77.                 key: "getCallableModule",
  78.                 value: function(e) {
  79.                     var l = this._lazyCallableModules[e];
  80.                     return l ? l() : null
  81.                 }
  82.             }, {
  83.                 key: "enqueueNativeCall",
  84.                 value: function(l, t, u, s, a) {
  85.                     (s || a) && (s && u.push(this._callID << 1), a && u.push(this._callID << 1 | 1), this._successCallbacks[this._callID] = a, this._failureCallbacks[this._callID] = s), this._callID++, this._queue[0].push(l), this._queue[1].push(t), this._queue[2].push(u);
  86.                     var n = (new Date).getTime();
  87.                     if (e.nativeFlushQueueImmediate && (n - this._lastFlush >= 5 || 0 === this._inCall)) {
  88.                         var h = this._queue;
  89.                         this._queue = [
  90.                             [],
  91.                             [],
  92.                             [], this._callID
  93.                         ], this._lastFlush = n, e.nativeFlushQueueImmediate(h)
  94.                     }
  95.                     i.counterEvent('pending_js_to_native_queue', this._queue[0].length), this.__spy && this.__spy({
  96.                         type: 1,
  97.                         module: l + '',
  98.                         method: t,
  99.                         args: u
  100.                     })
  101.                 }
  102.             }, {
  103.                 key: "createDebugLookup",
  104.                 value: function(e, l, t) {}
  105.             }, {
  106.                 key: "uninstallGlobalErrorHandler",
  107.                 value: function() {
  108.                     this.__guard = this.__guardUnsafe
  109.                 }
  110.             }, {
  111.                 key: "installGlobalErrorHandler",
  112.                 value: function() {
  113.                     this.__guard = this.__guardSafe
  114.                 }
  115.             }, {
  116.                 key: "__guardUnsafe",
  117.                 value: function(e) {
  118.                     this._inCall++, e(), this._inCall--
  119.                 }
  120.             }, {
  121.                 key: "__guardSafe",
  122.                 value: function(e) {
  123.                     this._inCall++;
  124.                     try {
  125.                         e()
  126.                     } catch (e) {
  127.                         alert("4");
  128.                         a.reportFatalError(e)
  129.                     } finally {
  130.                         this._inCall--
  131.                     }
  132.                 }
  133.             }, {
  134.                 key: "__callImmediates",
  135.                 value: function() {
  136.                     i.beginEvent('JSTimers.callImmediates()'), h || (h = l(s[5])), h.callImmediates(), i.endEvent()
  137.                 }
  138.             }, {
  139.                 key: "__callFunction",
  140.                 value: function(e, l, t) {
  141.                     this._lastFlush = (new Date).getTime(), this._eventLoopStartTime = this._lastFlush, i.beginEvent(e + "." + l + "()"), this.__spy && this.__spy({
  142.                         type: 0,
  143.                         module: e,
  144.                         method: l,
  145.                         args: t
  146.                     });
  147.                     var u = this.getCallableModule(e);
  148.                     n(!!u, 'Module %s is not a registered callable module (calling %s)', e, l), n(!!u[l], 'Method %s does not exist on module %s', l, e);
  149.                     var s = u[l].apply(u, t);
  150.                     return i.endEvent(), s
  151.                 }
  152.             }, {
  153.                 key: "__invokeCallback",
  154.                 value: function(e, l) {
  155.                     this._lastFlush = (new Date).getTime(), this._eventLoopStartTime = this._lastFlush;
  156.                     var t = e >>> 1,
  157.                         u = 1 & e ? this._successCallbacks[t] : this._failureCallbacks[t];
  158.                     u && (this._successCallbacks[t] = this._failureCallbacks[t] = null, u.apply(void 0, babelHelpers.toConsumableArray(l)))
  159.                 }
  160.             }], [{
  161.                 key: "spy",
  162.                 value: function(e) {
  163.                     t.prototype.__spy = !0 === e ? function(e) {
  164.                         console.log((0 === e.type ? 'N->JS' : 'JS->N') + " : " + (e.module ? e.module + '.' : '') + e.method + "(" + JSON.stringify(e.args) + ")")
  165.                     } : !1 === e ? null : e
  166.                 }
  167.             }]), t
  168.         })();
  169.     t.exports = r
  170. }, 17, [18, 19, 20, 13, 21, 22]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement