|
|
|
|
! function(U) {
|
|
|
|
|
(function(e) {
|
|
|
|
|
var t = !1,
|
|
|
|
|
n = e.Promise;
|
|
|
|
|
if (n) {
|
|
|
|
|
var r = null,
|
|
|
|
|
o = null;
|
|
|
|
|
try {
|
|
|
|
|
o = (r = n.resolve()).then
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
r instanceof n && "function" == typeof o && !n.cast && (t = !0)
|
|
|
|
|
}
|
|
|
|
|
return t
|
|
|
|
|
})(U) || function() {
|
|
|
|
|
var e, t;
|
|
|
|
|
e = this, t = function() {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
function c(e) {
|
|
|
|
|
return "function" == typeof e
|
|
|
|
|
}
|
|
|
|
|
var n = Array.isArray ? Array.isArray : function(e) {
|
|
|
|
|
return "[object Array]" === Object.prototype.toString.call(e)
|
|
|
|
|
},
|
|
|
|
|
r = 0,
|
|
|
|
|
t = void 0,
|
|
|
|
|
o = void 0,
|
|
|
|
|
u = function(e, t) {
|
|
|
|
|
f[r] = e, f[r + 1] = t, 2 === (r += 2) && (o ? o(p) : b())
|
|
|
|
|
},
|
|
|
|
|
e = "undefined" != typeof window ? window : void 0,
|
|
|
|
|
a = e || {},
|
|
|
|
|
i = a.MutationObserver || a.WebKitMutationObserver,
|
|
|
|
|
s = void 0 === U && "undefined" != typeof process && "[object process]" === {}.toString.call(
|
|
|
|
|
process),
|
|
|
|
|
l = "undefined" != typeof Uint8ClampedArray && "undefined" != typeof importScripts && "undefined" !=
|
|
|
|
|
typeof MessageChannel;
|
|
|
|
|
|
|
|
|
|
function d() {
|
|
|
|
|
var e = setTimeout;
|
|
|
|
|
return function() {
|
|
|
|
|
return e(p, 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var f = new Array(1e3);
|
|
|
|
|
|
|
|
|
|
function p() {
|
|
|
|
|
for (var e = 0; e < r; e += 2)(0, f[e])(f[e + 1]), f[e] = void 0, f[e + 1] = void 0;
|
|
|
|
|
r = 0
|
|
|
|
|
}
|
|
|
|
|
var h, m, g, v, b = void 0;
|
|
|
|
|
|
|
|
|
|
function y(e, t) {
|
|
|
|
|
var n = arguments,
|
|
|
|
|
r = this,
|
|
|
|
|
o = new this.constructor(P);
|
|
|
|
|
void 0 === o[w] && V(o);
|
|
|
|
|
var a, i = r._state;
|
|
|
|
|
return i ? (a = n[i - 1], u(function() {
|
|
|
|
|
return O(i, o, a, r._result)
|
|
|
|
|
})) : M(r, o, e, t), o
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function _(e) {
|
|
|
|
|
if (e && "object" == typeof e && e.constructor === this) return e;
|
|
|
|
|
var t = new this(P);
|
|
|
|
|
return E(t, e), t
|
|
|
|
|
}
|
|
|
|
|
s ? b = function() {
|
|
|
|
|
return process.nextTick(p)
|
|
|
|
|
} : i ? (m = 0, g = new i(p), v = document.createTextNode(""), g.observe(v, {
|
|
|
|
|
characterData: !0
|
|
|
|
|
}), b = function() {
|
|
|
|
|
v.data = m = ++m % 2
|
|
|
|
|
}) : l ? ((h = new MessageChannel).port1.onmessage = p, b = function() {
|
|
|
|
|
return h.port2.postMessage(0)
|
|
|
|
|
}) : b = void 0 === e && "function" == typeof require ? function() {
|
|
|
|
|
try {
|
|
|
|
|
var e = require("vertx");
|
|
|
|
|
return void 0 !== (t = e.runOnLoop || e.runOnContext) ? function() {
|
|
|
|
|
t(p)
|
|
|
|
|
} : d()
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return d()
|
|
|
|
|
}
|
|
|
|
|
}() : d();
|
|
|
|
|
var w = Math.random().toString(36).substring(16);
|
|
|
|
|
|
|
|
|
|
function P() {}
|
|
|
|
|
var S = void 0,
|
|
|
|
|
C = 1,
|
|
|
|
|
A = 2,
|
|
|
|
|
B = new R;
|
|
|
|
|
|
|
|
|
|
function k(e) {
|
|
|
|
|
try {
|
|
|
|
|
return e.then
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return B.error = e, B
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function T(e, t, n) {
|
|
|
|
|
var r, o, a, i;
|
|
|
|
|
t.constructor === e.constructor && n === y && t.constructor.resolve === _ ? (a = e, (i = t)
|
|
|
|
|
._state === C ? I(a, i._result) : i._state === A ? x(a, i._result) : M(i, void 0, function(
|
|
|
|
|
e) {
|
|
|
|
|
return E(a, e)
|
|
|
|
|
}, function(e) {
|
|
|
|
|
return x(a, e)
|
|
|
|
|
})) : n === B ? (x(e, B.error), B.error = null) : void 0 === n ? I(e, t) : c(n) ? (r = t,
|
|
|
|
|
o = n, u(function(t) {
|
|
|
|
|
var n = !1,
|
|
|
|
|
e = function(e, t, n, r) {
|
|
|
|
|
try {
|
|
|
|
|
e.call(t, n, r)
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
}(o, r, function(e) {
|
|
|
|
|
n || (n = !0, r !== e ? E(t, e) : I(t, e))
|
|
|
|
|
}, function(e) {
|
|
|
|
|
n || (n = !0, x(t, e))
|
|
|
|
|
}, t._label);
|
|
|
|
|
!n && e && (n = !0, x(t, e))
|
|
|
|
|
}, e)) : I(e, t)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function E(e, t) {
|
|
|
|
|
var n;
|
|
|
|
|
e === t ? x(e, new TypeError("You cannot resolve a promise with itself")) : "function" == typeof(n =
|
|
|
|
|
t) || "object" == typeof n && null !== n ? T(e, t, k(t)) : I(e, t)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function D(e) {
|
|
|
|
|
e._onerror && e._onerror(e._result), L(e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function I(e, t) {
|
|
|
|
|
e._state === S && (e._result = t, e._state = C, 0 !== e._subscribers.length && u(L, e))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function x(e, t) {
|
|
|
|
|
e._state === S && (e._state = A, e._result = t, u(D, e))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function M(e, t, n, r) {
|
|
|
|
|
var o = e._subscribers,
|
|
|
|
|
a = o.length;
|
|
|
|
|
e._onerror = null, o[a] = t, o[a + C] = n, o[a + A] = r, 0 === a && e._state && u(L, e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function L(e) {
|
|
|
|
|
var t = e._subscribers,
|
|
|
|
|
n = e._state;
|
|
|
|
|
if (0 !== t.length) {
|
|
|
|
|
for (var r = void 0, o = void 0, a = e._result, i = 0; i < t.length; i += 3) r = t[i], o = t[i +
|
|
|
|
|
n], r ? O(n, r, o, a) : o(a);
|
|
|
|
|
e._subscribers.length = 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function R() {
|
|
|
|
|
this.error = null
|
|
|
|
|
}
|
|
|
|
|
var N = new R;
|
|
|
|
|
|
|
|
|
|
function O(e, t, n, r) {
|
|
|
|
|
var o = c(n),
|
|
|
|
|
a = void 0,
|
|
|
|
|
i = void 0,
|
|
|
|
|
u = void 0,
|
|
|
|
|
s = void 0;
|
|
|
|
|
if (o) {
|
|
|
|
|
if ((a = function(e, t) {
|
|
|
|
|
try {
|
|
|
|
|
return e(t)
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return N.error = e, N
|
|
|
|
|
}
|
|
|
|
|
}(n, r)) === N ? (s = !0, i = a.error, a.error = null) : u = !0, t === a) return void x(t,
|
|
|
|
|
new TypeError("A promises callback cannot return that same promise."))
|
|
|
|
|
} else a = r, u = !0;
|
|
|
|
|
t._state !== S || (o && u ? E(t, a) : s ? x(t, i) : e === C ? I(t, a) : e === A && x(t, a))
|
|
|
|
|
}
|
|
|
|
|
var F = 0;
|
|
|
|
|
|
|
|
|
|
function V(e) {
|
|
|
|
|
e[w] = F++, e._state = void 0, e._result = void 0, e._subscribers = []
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function j(e, t) {
|
|
|
|
|
this._instanceConstructor = e, this.promise = new e(P), this.promise[w] || V(this.promise), n(t) ? (
|
|
|
|
|
this._input = t, this.length = t.length, this._remaining = t.length, this._result =
|
|
|
|
|
new Array(this.length), 0 === this.length ? I(this.promise, this._result) : (this.length =
|
|
|
|
|
this.length || 0, this._enumerate(), 0 === this._remaining && I(this.promise, this
|
|
|
|
|
._result))) : x(this.promise, new Error("Array Methods must be provided an Array"))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function z(e) {
|
|
|
|
|
this[w] = F++, this._result = this._state = void 0, this._subscribers = [], P !== e && (
|
|
|
|
|
"function" != typeof e && function() {
|
|
|
|
|
throw new TypeError(
|
|
|
|
|
"You must pass a resolver function as the first argument to the promise constructor"
|
|
|
|
|
)
|
|
|
|
|
}(), this instanceof z ? function(t, e) {
|
|
|
|
|
try {
|
|
|
|
|
e(function(e) {
|
|
|
|
|
E(t, e)
|
|
|
|
|
}, function(e) {
|
|
|
|
|
x(t, e)
|
|
|
|
|
})
|
|
|
|
|
} catch (e) {
|
|
|
|
|
x(t, e)
|
|
|
|
|
}
|
|
|
|
|
}(this, e) : function() {
|
|
|
|
|
throw new TypeError(
|
|
|
|
|
"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."
|
|
|
|
|
)
|
|
|
|
|
}())
|
|
|
|
|
}
|
|
|
|
|
return j.prototype._enumerate = function() {
|
|
|
|
|
for (var e = this.length, t = this._input, n = 0; this._state === S && n < e; n++) this
|
|
|
|
|
._eachEntry(t[n], n)
|
|
|
|
|
}, j.prototype._eachEntry = function(t, e) {
|
|
|
|
|
var n = this._instanceConstructor,
|
|
|
|
|
r = n.resolve;
|
|
|
|
|
if (r === _) {
|
|
|
|
|
var o = k(t);
|
|
|
|
|
if (o === y && t._state !== S) this._settledAt(t._state, e, t._result);
|
|
|
|
|
else if ("function" != typeof o) this._remaining--, this._result[e] = t;
|
|
|
|
|
else if (n === z) {
|
|
|
|
|
var a = new n(P);
|
|
|
|
|
T(a, t, o), this._willSettleAt(a, e)
|
|
|
|
|
} else this._willSettleAt(new n(function(e) {
|
|
|
|
|
return e(t)
|
|
|
|
|
}), e)
|
|
|
|
|
} else this._willSettleAt(r(t), e)
|
|
|
|
|
}, j.prototype._settledAt = function(e, t, n) {
|
|
|
|
|
var r = this.promise;
|
|
|
|
|
r._state === S && (this._remaining--, e === A ? x(r, n) : this._result[t] = n), 0 === this
|
|
|
|
|
._remaining && I(r, this._result)
|
|
|
|
|
}, j.prototype._willSettleAt = function(e, t) {
|
|
|
|
|
var n = this;
|
|
|
|
|
M(e, void 0, function(e) {
|
|
|
|
|
return n._settledAt(C, t, e)
|
|
|
|
|
}, function(e) {
|
|
|
|
|
return n._settledAt(A, t, e)
|
|
|
|
|
})
|
|
|
|
|
}, z.all = function(e) {
|
|
|
|
|
return new j(this, e).promise
|
|
|
|
|
}, z.race = function(o) {
|
|
|
|
|
var a = this;
|
|
|
|
|
return n(o) ? new a(function(e, t) {
|
|
|
|
|
for (var n = o.length, r = 0; r < n; r++) a.resolve(o[r]).then(e, t)
|
|
|
|
|
}) : new a(function(e, t) {
|
|
|
|
|
return t(new TypeError("You must pass an array to race."))
|
|
|
|
|
})
|
|
|
|
|
}, z.resolve = _, z.reject = function(e) {
|
|
|
|
|
var t = new this(P);
|
|
|
|
|
return x(t, e), t
|
|
|
|
|
}, z._setScheduler = function(e) {
|
|
|
|
|
o = e
|
|
|
|
|
}, z._setAsap = function(e) {
|
|
|
|
|
u = e
|
|
|
|
|
}, z._asap = u, z.prototype = {
|
|
|
|
|
constructor: z,
|
|
|
|
|
then: y,
|
|
|
|
|
catch: function(e) {
|
|
|
|
|
return this.then(null, e)
|
|
|
|
|
}
|
|
|
|
|
}, z.polyfill = function() {
|
|
|
|
|
var e = void 0;
|
|
|
|
|
if ("undefined" != typeof global) e = global;
|
|
|
|
|
else if (void 0 !== U) e = U;
|
|
|
|
|
else try {
|
|
|
|
|
e = Function("return this")()
|
|
|
|
|
} catch (e) {
|
|
|
|
|
throw new Error(
|
|
|
|
|
"polyfill failed because global object is unavailable in this environment")
|
|
|
|
|
}
|
|
|
|
|
var t = e.Promise;
|
|
|
|
|
if (t) {
|
|
|
|
|
var n = null;
|
|
|
|
|
try {
|
|
|
|
|
n = Object.prototype.toString.call(t.resolve())
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
if ("[object Promise]" === n && !t.cast) return
|
|
|
|
|
}
|
|
|
|
|
e.Promise = z
|
|
|
|
|
}, (z.Promise = z).polyfill(), z
|
|
|
|
|
}, "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" ==
|
|
|
|
|
typeof define && define.amd ? define(t) : e.ES6Promise = t()
|
|
|
|
|
}()
|
|
|
|
|
}(self),
|
|
|
|
|
function(o) {
|
|
|
|
|
"use strict";
|
|
|
|
|
var a, e, r = "AlipayJSBridge",
|
|
|
|
|
g = o[r],
|
|
|
|
|
t = navigator.userAgent || navigator.swuserAgent,
|
|
|
|
|
n = "apm-h5",
|
|
|
|
|
i = o.window,
|
|
|
|
|
u = o.document,
|
|
|
|
|
v = o.console,
|
|
|
|
|
s = o.parseInt,
|
|
|
|
|
c = [],
|
|
|
|
|
l = {
|
|
|
|
|
getBAPSI: {
|
|
|
|
|
isListening: !1,
|
|
|
|
|
lastState: 2,
|
|
|
|
|
on: function() {
|
|
|
|
|
l.getBAPSI.isListening || (g.call("startMonitorBackgroundAudio"), l.getBAPSI.isListening = !0, y
|
|
|
|
|
.on("getBackgroundAudioPlayedStateInfo", l.getBAPSI.listener))
|
|
|
|
|
},
|
|
|
|
|
off: function() {
|
|
|
|
|
y.off("getBackgroundAudioPlayedStateInfo", l.getBAPSI.listener), g.call(
|
|
|
|
|
"stopMonitorBackgroundAudio"), l.getBAPSI.isListening = !1
|
|
|
|
|
},
|
|
|
|
|
listener: function(e) {
|
|
|
|
|
var t = (e.data || {}).status,
|
|
|
|
|
n = ["backgroundAudioPause", "backgroundAudioPlay", "backgroundAudioStop"][t];
|
|
|
|
|
n && t !== l.getBAPSI.lastState && (y.trigger(n), l.getBAPSI.lastState = t)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
b = {
|
|
|
|
|
fetchCDP: {
|
|
|
|
|
m: "getCdpSpaceInfo"
|
|
|
|
|
},
|
|
|
|
|
feedbackCDP: {
|
|
|
|
|
m: "cdpFeedback"
|
|
|
|
|
},
|
|
|
|
|
snapshot: {},
|
|
|
|
|
saveBizServiceResult: {},
|
|
|
|
|
setStorage: {
|
|
|
|
|
m: "setAPDataStorage",
|
|
|
|
|
b: function(e) {
|
|
|
|
|
var t = f();
|
|
|
|
|
return k(e, {
|
|
|
|
|
data: "value",
|
|
|
|
|
bizType: "business"
|
|
|
|
|
}), e.value = M({
|
|
|
|
|
APDataStorage: e.value
|
|
|
|
|
}), e.key = M(e.key), e.type = q(e.type) ? "user" : e.type, q(e.business) && t && (e
|
|
|
|
|
.business = t), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getStorage: {
|
|
|
|
|
m: "getAPDataStorage",
|
|
|
|
|
b: function(e) {
|
|
|
|
|
var t = f();
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "key",
|
|
|
|
|
bizType: "business"
|
|
|
|
|
}), e.key = M(e.key), e.type = q(e.type) ? "user" : e.type, q(e.business) && t && (e
|
|
|
|
|
.business = t), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
if (11 === e.error && (e.data = null, delete e.error, delete e.errorMessage, delete e.success),
|
|
|
|
|
N(e, "data")) {
|
|
|
|
|
var t = F(e.data);
|
|
|
|
|
e.data = W(t) ? t.APDataStorage : t
|
|
|
|
|
}
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
removeStorage: {
|
|
|
|
|
m: "removeAPDataStorage",
|
|
|
|
|
b: function(e) {
|
|
|
|
|
var t = f();
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "key",
|
|
|
|
|
bizType: "business"
|
|
|
|
|
}), e.key = M(e.key), e.type = q(e.type) ? "user" : e.type, q(e.business) && t && (e
|
|
|
|
|
.business = t), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
clearStorage: {
|
|
|
|
|
m: "clearAPDataStorage",
|
|
|
|
|
b: function(e) {
|
|
|
|
|
var t = f();
|
|
|
|
|
return k(e, {
|
|
|
|
|
bizType: "business"
|
|
|
|
|
}), e.type = q(e.type) ? "user" : e.type, q(e.business) && t && (e.business = t), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
httpRequest: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
if (e.method = j(e.method) || "GET", e.dataType = V(e.dataType) || "json", k(e, {
|
|
|
|
|
_: "url",
|
|
|
|
|
dataType: "responseType"
|
|
|
|
|
}), W(e.data) && (e.data = L(e.data)), "GET" === e.method && K(e.data) && (e.url = R(e.url,
|
|
|
|
|
e.data)), e.responseType = "base64" !== V(e.responseType) ? "text" : "base64", e
|
|
|
|
|
.headers = e.headers || {}, z()) {
|
|
|
|
|
var t = [],
|
|
|
|
|
n = void 0;
|
|
|
|
|
for (var r in e.headers) N(e.headers, r) && ((n = {})[r] = e.headers[r], t.push(n));
|
|
|
|
|
e.headers = t
|
|
|
|
|
}
|
|
|
|
|
return e
|
|
|
|
|
},
|
|
|
|
|
a: function(e, t, n) {
|
|
|
|
|
if (n.dataType = V(n.dataType) || "json", "json" === n.dataType && e.data && (e.data = F(e
|
|
|
|
|
.data)), "base64" === n.dataType && e.data && e.headers && (e.data = function(e, t) {
|
|
|
|
|
e && t && (e = "data:" + t + ";base64," + e);
|
|
|
|
|
return e
|
|
|
|
|
}(e.data, e.headers["Content-Type"])), !q(e.status)) {
|
|
|
|
|
var r = e.status + "";
|
|
|
|
|
/^[45]/.test(r) && (e.error = 19, e.errorMessage = "http status error")
|
|
|
|
|
}
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
startApp: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "appId",
|
|
|
|
|
params: "param"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
setClipboard: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "content",
|
|
|
|
|
content: "text"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getClipboard: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
text: "content"
|
|
|
|
|
}), delete e.text, e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getUserInfo: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
iconUrl: "avatar"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getConfig: {
|
|
|
|
|
b: function(n) {
|
|
|
|
|
return k(n, {
|
|
|
|
|
_: "configKeys",
|
|
|
|
|
keys: "configKeys"
|
|
|
|
|
}), K(n.configKeys) && (n.configKeys = [n.configKeys]), O(n.configKeys, function(e, t) {
|
|
|
|
|
"mgw" === t && (n.configKeys[e] = "rpcUrl")
|
|
|
|
|
}), n
|
|
|
|
|
},
|
|
|
|
|
a: function(n) {
|
|
|
|
|
return n.data && (N(n.data, "rpcUrl") && (n.data.mgw = n.data.rpcUrl, delete n.data.rpcUrl), O(n
|
|
|
|
|
.data,
|
|
|
|
|
function(e, t) {
|
|
|
|
|
n[e] = t
|
|
|
|
|
}), delete n.data), n
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
remoteLog: {},
|
|
|
|
|
isSupportShortCut: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
result: "isSupport"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
setShortCut: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
title: "appName",
|
|
|
|
|
icon: "iconBitmap"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
removeShortCut: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
title: "appName",
|
|
|
|
|
icon: "iconBitmap"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
exitApp: {},
|
|
|
|
|
login: {},
|
|
|
|
|
sendSMS: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
if (e.status) {
|
|
|
|
|
switch (e.status) {
|
|
|
|
|
case "Success":
|
|
|
|
|
e = {};
|
|
|
|
|
break;
|
|
|
|
|
case "Failed":
|
|
|
|
|
e.error = 21, e.errorMessage = "鍙戦€佸け璐<EFBFBD>";
|
|
|
|
|
break;
|
|
|
|
|
case "Canceled":
|
|
|
|
|
e.error = 22, e.errorMessage = "鐢ㄦ埛鍙栨秷鍙戦€<EFBFBD>"
|
|
|
|
|
}
|
|
|
|
|
delete e.status
|
|
|
|
|
}
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getAllContacts: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
var n = [];
|
|
|
|
|
return e && !N(e, "error") && (O(e, function(e, t) {
|
|
|
|
|
n.push({
|
|
|
|
|
mobile: e,
|
|
|
|
|
name: t
|
|
|
|
|
})
|
|
|
|
|
}), e = {
|
|
|
|
|
contacts: n
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
setScreenBrightness: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "brightness"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getScreenBrightness: {},
|
|
|
|
|
isInstalledApp: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
packageName: "packagename"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
installed: "isInstalled"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
preRender: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "url"
|
|
|
|
|
}), W(e.windowParams) || (e.windowParams = {}), e.url && q(e.windowParams.url) && (e
|
|
|
|
|
.windowParams.url = e.url), delete e.url, e.params && q(e.windowParams.param) && (e
|
|
|
|
|
.windowParams.param = e.params), delete e.params, -1 < e.windowParams.url.indexOf(
|
|
|
|
|
"?") && v.warn("try opt.data instead of querystring"), -1 < e.windowParams.url.indexOf(
|
|
|
|
|
"__webview_options__") && v.warn("try opt.params instead of __webview_options__"), W(e
|
|
|
|
|
.data) && (e.windowParams.url = R(e.windowParams.url, e.data), delete e.data), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
clearRender: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return W(e.range) || (e.range = {}), e.start && q(e.range.location) && (e.range.location = e
|
|
|
|
|
.start), delete e.start, e.length && q(e.range.length) && (e.range.length = e.length),
|
|
|
|
|
delete e.length, e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
finishRender: {},
|
|
|
|
|
rpc: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "operationType"
|
|
|
|
|
}), e.requestData && !Q(e.requestData) && W(e.requestData) && !N(e, "type") && (e
|
|
|
|
|
.requestData = [e.requestData]), e
|
|
|
|
|
},
|
|
|
|
|
e: {
|
|
|
|
|
handleResultSuccess: !1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
openBluetoothAdapter: {},
|
|
|
|
|
closeBluetoothAdapter: {},
|
|
|
|
|
getBluetoothAdapterState: {},
|
|
|
|
|
startBluetoothDevicesDiscovery: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return K(e._) && (e._ = [e._]), k(e, {
|
|
|
|
|
_: "services"
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
stopBluetoothDevicesDiscovery: {},
|
|
|
|
|
getBluetoothDevices: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return K(e._) && (e._ = [e._]), k(e, {
|
|
|
|
|
_: "services"
|
|
|
|
|
}), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return Q(e.devices) && O(e.devices, function(e, t) {
|
|
|
|
|
k(t, {
|
|
|
|
|
manufacturerData: "advertisData"
|
|
|
|
|
})
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getConnectedBluetoothDevices: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return Q(e.devices) && O(e.devices, function(e, t) {
|
|
|
|
|
k(t, {
|
|
|
|
|
manufacturerData: "advertisData"
|
|
|
|
|
})
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
connectBLEDevice: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "deviceId"
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
disconnectBLEDevice: {},
|
|
|
|
|
writeBLECharacteristicValue: {},
|
|
|
|
|
readBLECharacteristicValue: {},
|
|
|
|
|
notifyBLECharacteristicValueChange: {},
|
|
|
|
|
getBLEDeviceServices: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "deviceId"
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getBLEDeviceCharacteristics: {},
|
|
|
|
|
onBLECharacteristicValueChange: {
|
|
|
|
|
m: "BLECharacteristicValueChange"
|
|
|
|
|
},
|
|
|
|
|
offBLECharacteristicValueChange: {
|
|
|
|
|
m: "BLECharacteristicValueChange"
|
|
|
|
|
},
|
|
|
|
|
onBluetoothAdapterStateChange: {},
|
|
|
|
|
offBluetoothAdapterStateChange: {},
|
|
|
|
|
onBLEConnectionStateChanged: {
|
|
|
|
|
m: "BLEConnectionStateChanged"
|
|
|
|
|
},
|
|
|
|
|
offBLEConnectionStateChanged: {
|
|
|
|
|
m: "BLEConnectionStateChanged"
|
|
|
|
|
},
|
|
|
|
|
onBluetoothDeviceFound: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
manufacturerData: "advertisData"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offBluetoothDeviceFound: {},
|
|
|
|
|
pushBizWindow: {},
|
|
|
|
|
compressImage: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return e.level = q(e.level) ? 4 : e.level, k(e, {
|
|
|
|
|
_: "apFilePaths",
|
|
|
|
|
level: "compressLevel%d"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
d: function(e, t) {
|
|
|
|
|
z() ? g.call("compressImage", e, t) : p(t, {
|
|
|
|
|
apFilePaths: e.apFilePaths || []
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getLaunchParams: {
|
|
|
|
|
d: function(e, t) {
|
|
|
|
|
y.launchParams = i.ALIPAYH5STARTUPPARAMS || g.startupParams || {}, J(t) && t(y.launchParams)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onTabClick: {},
|
|
|
|
|
offTabClick: {},
|
|
|
|
|
onShare: {
|
|
|
|
|
m: "onShare"
|
|
|
|
|
},
|
|
|
|
|
offShare: {
|
|
|
|
|
m: "onShare"
|
|
|
|
|
},
|
|
|
|
|
connectSocket: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
headers: "header"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
sendSocketMessage: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "data"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
closeSocket: {},
|
|
|
|
|
onSocketOpen: {},
|
|
|
|
|
offSocketOpen: {},
|
|
|
|
|
onSocketMessage: {},
|
|
|
|
|
offSocketMessage: {},
|
|
|
|
|
onSocketError: {},
|
|
|
|
|
offSocketError: {},
|
|
|
|
|
onSocketClose: {},
|
|
|
|
|
offSocketClose: {},
|
|
|
|
|
alert: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return q((e = k(e, {
|
|
|
|
|
_: "content",
|
|
|
|
|
content: "message%s",
|
|
|
|
|
buttonText: "button%s"
|
|
|
|
|
})).title) || (e.title = B("%s", e.title)), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
confirm: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return q((e = k(e, {
|
|
|
|
|
_: "content%s",
|
|
|
|
|
content: "message%s",
|
|
|
|
|
confirmButtonText: "okButton%s",
|
|
|
|
|
cancelButtonText: "cancelButton%s"
|
|
|
|
|
})).title) || (e.title = B("%s", e.title)), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
ok: "confirm"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
showToast: {
|
|
|
|
|
m: "toast",
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "content%s"
|
|
|
|
|
}), K(e.content) || (e.content = B("%s", e.content)), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
hideToast: {},
|
|
|
|
|
showLoading: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "content",
|
|
|
|
|
content: "text%s"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
hideLoading: {},
|
|
|
|
|
showNavigationBarLoading: {
|
|
|
|
|
m: "showTitleLoading"
|
|
|
|
|
},
|
|
|
|
|
hideNavigationBarLoading: {
|
|
|
|
|
m: "hideTitleLoading"
|
|
|
|
|
},
|
|
|
|
|
setNavigationBar: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
var t = "setTitle",
|
|
|
|
|
n = "setTitleColor",
|
|
|
|
|
r = "setBarBottomLineColor",
|
|
|
|
|
o = {
|
|
|
|
|
setTitle: {},
|
|
|
|
|
setTitleColor: {},
|
|
|
|
|
setBarBottomLineColor: {}
|
|
|
|
|
};
|
|
|
|
|
return o[t] = k(o[t], {
|
|
|
|
|
_: "title",
|
|
|
|
|
title: "title%s",
|
|
|
|
|
image: "image%b"
|
|
|
|
|
}, e), o[n] = k(o[n], {
|
|
|
|
|
backgroundColor: "color%c",
|
|
|
|
|
reset: "reset"
|
|
|
|
|
}, e), o[r] = k(o[r], {
|
|
|
|
|
borderBottomColor: "color%c"
|
|
|
|
|
}, e), o
|
|
|
|
|
},
|
|
|
|
|
d: function(e, t) {
|
|
|
|
|
var n = "setTitle",
|
|
|
|
|
r = "setTitleColor",
|
|
|
|
|
o = "setBarBottomLineColor",
|
|
|
|
|
a = {};
|
|
|
|
|
Y(e[n]) || g.call(n, e[n]), Y(e[o]) || (g.call(o, e[o]), H(e[o].color) && (a.error = 2, a
|
|
|
|
|
.errorMessage = "棰滆壊鍊间笉鍚堟硶")), Y(e[r]) ? p(t, a) : g.call(r, e[r], function(e) {
|
|
|
|
|
a = X(e, a), t(a)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
showTabBar: {
|
|
|
|
|
b: function(n) {
|
|
|
|
|
if (n.action = "create", n.activeIndex = n.activeIndex || 0, k(n, {
|
|
|
|
|
color: "textColor%c",
|
|
|
|
|
activeColor: "selectedColor%c",
|
|
|
|
|
activeIndex: "selectedIndex%d"
|
|
|
|
|
}), Q(n.items)) {
|
|
|
|
|
var e = n.items;
|
|
|
|
|
n.items = [], e.forEach(function(e, t) {
|
|
|
|
|
(e = k(X({}, e), {
|
|
|
|
|
title: "name%s",
|
|
|
|
|
tag: "tag%s",
|
|
|
|
|
icon: "icon%b",
|
|
|
|
|
activeIcon: "activeIcon%b",
|
|
|
|
|
badge: "redDot%s"
|
|
|
|
|
}, {
|
|
|
|
|
tag: t,
|
|
|
|
|
badge: q(e.badge) ? "-1" : e.badge
|
|
|
|
|
})).icon = B("%b", e.icon), e.activeIcon = B("%b", e.activeIcon), n.items.push(
|
|
|
|
|
e)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return n
|
|
|
|
|
},
|
|
|
|
|
d: function(e, n, t) {
|
|
|
|
|
var r = "showTabBar";
|
|
|
|
|
q(l.showTabBar) ? l.showTabBar = {
|
|
|
|
|
opt: t
|
|
|
|
|
} : v.error(r + " must be called at most once"), y.on("tabClick", function(e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
k(t, {
|
|
|
|
|
tag: "index%d"
|
|
|
|
|
}, {
|
|
|
|
|
tag: W(e.data) && e.data.tag ? e.data.tag : "0"
|
|
|
|
|
}), n(t)
|
|
|
|
|
}), g.call("tabBar", e, function(e) {
|
|
|
|
|
C(r, e)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
setTabBarBadge: {
|
|
|
|
|
m: "tabBar",
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return e.action = "redDot", k(e, {
|
|
|
|
|
index: "tag%s",
|
|
|
|
|
badge: "redDot%s"
|
|
|
|
|
}, {
|
|
|
|
|
index: e.index
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
showActionSheet: {
|
|
|
|
|
m: "actionSheet",
|
|
|
|
|
b: function(t) {
|
|
|
|
|
if (k(t, {
|
|
|
|
|
items: "btns",
|
|
|
|
|
cancelButtonText: "cancelBtn%s"
|
|
|
|
|
}), Q(t.btns)) {
|
|
|
|
|
var e = t.btns;
|
|
|
|
|
t.btns = [], e.forEach(function(e) {
|
|
|
|
|
return t.btns.push(e + "")
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return q(t.cancelBtn) && (t.cancelBtn = "鍙栨秷"), t
|
|
|
|
|
},
|
|
|
|
|
a: function(e, t) {
|
|
|
|
|
return Q(t.btns) && e.index === t.btns.length && (e.index = -1), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
redirectTo: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "url"
|
|
|
|
|
}), W(e.data) && (e.url = R(e.url, e.data)), e
|
|
|
|
|
},
|
|
|
|
|
d: function(e) {
|
|
|
|
|
e.url && i.location.replace(e.url)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
pushWindow: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "url",
|
|
|
|
|
params: "param"
|
|
|
|
|
}), -1 < e.url.indexOf("?") && v.warn("try opt.data instead of querystring"), -1 < e.url
|
|
|
|
|
.indexOf("__webview_options__") && v.warn("try opt.params instead of __webview_options__"),
|
|
|
|
|
W(e.data) && (e.url = R(e.url, e.data), delete e.data), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
popWindow: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return W((e = h(e)).data) || (e.data = {
|
|
|
|
|
___forResume___: e.data
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
popTo: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
var t;
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: (t = void 0, $(e._) && (t = "index"), K(e._) && (t = "urlPattern"), t)
|
|
|
|
|
}), W(e.data) || (e.data = {
|
|
|
|
|
___forResume___: e.data
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
allowPullDownRefresh: {
|
|
|
|
|
d: function(e) {
|
|
|
|
|
var t = "onPullDownRefresh";
|
|
|
|
|
k(e, {
|
|
|
|
|
_: "allow"
|
|
|
|
|
}), e.allow = !!q(e.allow) || !!e.allow, W(l[t]) ? l[t].allow = e.allow : (l[t] = {
|
|
|
|
|
allow: e.allow
|
|
|
|
|
}, y.onPullDownRefresh()), l[t].allow ? g.call("restorePullToRefresh") : l[t].event && l[t]
|
|
|
|
|
.event.preventDefault()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
choosePhoneContact: {
|
|
|
|
|
m: "contact"
|
|
|
|
|
},
|
|
|
|
|
chooseAlipayContact: {
|
|
|
|
|
m: "chooseContact",
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "count"
|
|
|
|
|
}), q(e.count) && (e.count = 1), 1 === e.count ? e.type = "single" : (e.type = "multi", e
|
|
|
|
|
.count <= 0 || 10 < e.count ? e.multiMax = 10 : e.multiMax = e.count), delete e.count, e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return Q(e.contacts) && e.contacts.forEach(function(e) {
|
|
|
|
|
k(e, {
|
|
|
|
|
headImageUrl: "avatar",
|
|
|
|
|
name: "realName"
|
|
|
|
|
}), delete e.from
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
share: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
var t = {},
|
|
|
|
|
n = {};
|
|
|
|
|
return t.onlySelectChannel = ["ALPContact", "ALPTimeLine", "ALPCommunity", "Weibo",
|
|
|
|
|
"DingTalkSession", "SMS", "Weixin", "WeixinTimeLine", "QQ", "QQZone"
|
|
|
|
|
], N(e, "bizType") && (t.bizType = e.bizType), delete(n = X({}, e)).bizType, delete n
|
|
|
|
|
.onlySelectChannel, k(n, {
|
|
|
|
|
image: "imageUrl"
|
|
|
|
|
}), l.share = {
|
|
|
|
|
startShare: t,
|
|
|
|
|
shareToChannel: n
|
|
|
|
|
}, e
|
|
|
|
|
},
|
|
|
|
|
d: function(e, n) {
|
|
|
|
|
!1 === e.showToolBar && g.call("setToolbarMenu", {
|
|
|
|
|
menus: [],
|
|
|
|
|
override: !0
|
|
|
|
|
}), g.call("startShare", l.share.startShare, function(e) {
|
|
|
|
|
var t = l.share.shareToChannel;
|
|
|
|
|
e.channelName ? g.call("shareToChannel", {
|
|
|
|
|
name: e.channelName,
|
|
|
|
|
param: t
|
|
|
|
|
}, n) : n(e)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
datePicker: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
switch (k(e, {
|
|
|
|
|
_: "formate",
|
|
|
|
|
formate: "mode",
|
|
|
|
|
currentDate: "beginDate",
|
|
|
|
|
startDate: "minDate",
|
|
|
|
|
endDate: "maxDate"
|
|
|
|
|
}), e.mode) {
|
|
|
|
|
case "HH:mm:ss":
|
|
|
|
|
e.mode = 0;
|
|
|
|
|
break;
|
|
|
|
|
case "yyyy-MM-dd":
|
|
|
|
|
e.mode = 1;
|
|
|
|
|
break;
|
|
|
|
|
case "yyyy-MM-dd HH:mm:ss":
|
|
|
|
|
e.mode = 2;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
e.mode = 1
|
|
|
|
|
}
|
|
|
|
|
return e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return K(e.date) && (e.date = e.date.replace(/\//g, "-").trim()), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
chooseCity: {
|
|
|
|
|
m: "getCities",
|
|
|
|
|
b: function(e) {
|
|
|
|
|
var t, n;
|
|
|
|
|
|
|
|
|
|
function r(e) {
|
|
|
|
|
var t;
|
|
|
|
|
return Q(e) && (t = [], e.forEach(function(e) {
|
|
|
|
|
t.push(k({}, {
|
|
|
|
|
city: "name",
|
|
|
|
|
adCode: "adcode%s",
|
|
|
|
|
spell: "pinyin"
|
|
|
|
|
}, e))
|
|
|
|
|
}), e = t), e
|
|
|
|
|
}
|
|
|
|
|
return k(e, {
|
|
|
|
|
showHotCities: "needHotCity",
|
|
|
|
|
cities: "customCities",
|
|
|
|
|
hotCities: "customHotCities"
|
|
|
|
|
}), !0 === e.showLocatedCity ? (e.currentCity = "", e.adcode = "") : (delete e.currentCity,
|
|
|
|
|
delete e.adcode), delete e.showLocatedCity, t = e.customCities, q(e.customCities) || (e
|
|
|
|
|
.customCities = r(t)), n = e.customHotCities, q(e.customHotCities) || (e
|
|
|
|
|
.customHotCities = r(n)), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
adcode: "adCode"
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onBack: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
var t = {},
|
|
|
|
|
n = "onBack";
|
|
|
|
|
return W(l[n]) ? l[n].event = e : l[n] = {
|
|
|
|
|
event: e,
|
|
|
|
|
allowButton: !0
|
|
|
|
|
}, !1 === l[n].allowButton && e.preventDefault(), t.backAvailable = l[n].allowButton, t
|
|
|
|
|
},
|
|
|
|
|
e: {
|
|
|
|
|
handleEventData: !1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offBack: {},
|
|
|
|
|
onResume: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
return q(e.data) || (t.data = e.data), N(e.data, "___forResume___") && (t.data = e.data
|
|
|
|
|
.___forResume___), t
|
|
|
|
|
},
|
|
|
|
|
e: {
|
|
|
|
|
handleEventData: !1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offResume: {},
|
|
|
|
|
onPause: {},
|
|
|
|
|
offPause: {},
|
|
|
|
|
onPageResume: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
return q(e.data) || (t.data = e.data), N(e.data, "___forResume___") && (t.data = e.data
|
|
|
|
|
.___forResume___), t
|
|
|
|
|
},
|
|
|
|
|
e: {
|
|
|
|
|
handleEventData: !1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offPageResume: {},
|
|
|
|
|
onPagePause: {},
|
|
|
|
|
offPagePause: {},
|
|
|
|
|
onTitleClick: {},
|
|
|
|
|
offTitleClick: {},
|
|
|
|
|
onPullDownRefresh: {
|
|
|
|
|
m: "firePullToRefresh",
|
|
|
|
|
a: function(e) {
|
|
|
|
|
var t = {},
|
|
|
|
|
n = "onPullDownRefresh";
|
|
|
|
|
return W(l[n]) ? l[n].event = e : l[n] = {
|
|
|
|
|
event: e,
|
|
|
|
|
allow: !0
|
|
|
|
|
}, !1 === l[n].allow && l[n].event.preventDefault(), t.refreshAvailable = l[n].allow, t
|
|
|
|
|
},
|
|
|
|
|
e: {
|
|
|
|
|
handleEventData: !1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offPullDownRefresh: {
|
|
|
|
|
m: "firePullToRefresh"
|
|
|
|
|
},
|
|
|
|
|
onNetworkChange: {
|
|
|
|
|
d: function(e, t, n, r) {
|
|
|
|
|
var o = function() {
|
|
|
|
|
return y.getNetworkType(t)
|
|
|
|
|
};
|
|
|
|
|
_("h5NetworkChange", r, o), y.on("h5NetworkChange", o)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offNetworkChange: {
|
|
|
|
|
d: function(e, t, n, r) {
|
|
|
|
|
w("h5NetworkChange", r)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onAccelerometerChange: {
|
|
|
|
|
b: function() {
|
|
|
|
|
g.call("watchShake", {
|
|
|
|
|
monitorAccelerometer: !0
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
return k(t, {
|
|
|
|
|
x: "x",
|
|
|
|
|
y: "y",
|
|
|
|
|
z: "z"
|
|
|
|
|
}, W(e.data) ? e.data : e), t
|
|
|
|
|
},
|
|
|
|
|
e: {
|
|
|
|
|
handleEventData: !1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offAccelerometerChange: {
|
|
|
|
|
b: function() {
|
|
|
|
|
g.call("watchShake", {
|
|
|
|
|
monitorAccelerometer: !1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onCompassChange: {
|
|
|
|
|
b: function() {
|
|
|
|
|
g.call("watchShake", {
|
|
|
|
|
monitorCompass: !0
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
return k(t, {
|
|
|
|
|
direction: "direction"
|
|
|
|
|
}, W(e.data) ? e.data : e), t
|
|
|
|
|
},
|
|
|
|
|
e: {
|
|
|
|
|
handleEventData: !1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offCompassChange: {
|
|
|
|
|
b: function() {
|
|
|
|
|
g.call("watchShake", {
|
|
|
|
|
monitorCompass: !1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onBackgroundAudioPlay: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return l.getBAPSI.on(), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offBackgroundAudioPlay: {},
|
|
|
|
|
onBackgroundAudioPause: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return l.getBAPSI.on(), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offBackgroundAudioPause: {},
|
|
|
|
|
onBackgroundAudioStop: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return l.getBAPSI.on(), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
offBackgroundAudioStop: {},
|
|
|
|
|
onAppResume: {},
|
|
|
|
|
offAppResume: {},
|
|
|
|
|
onAppPause: {},
|
|
|
|
|
offAppPause: {},
|
|
|
|
|
getNetworkType: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return q(e.networkInfo) || (e.networkType = j(e.networkInfo)), delete e.err_msg, delete e
|
|
|
|
|
.networkInfo, e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scan: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "type"
|
|
|
|
|
}), e.type = e.type || "qr", e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return (e.qrCode || e.barCode) && (e.code = e.qrCode || e.barCode, delete e.qrCode, delete e
|
|
|
|
|
.barCode), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watchShake: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return Y(e) && (e = null), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getLocation: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
accuracy: "horizontalAccuracy",
|
|
|
|
|
type: "requestType%d"
|
|
|
|
|
}), q(e.requestType) && (e.requestType = 2), z() && (q(e.isHighAccuracy) && (e
|
|
|
|
|
.isHighAccuracy = !0), q(e.isNeedSpeed) && (e.isNeedSpeed = !0)), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
citycode: "cityCode",
|
|
|
|
|
adcode: "adCode"
|
|
|
|
|
}), q(e.city) && e.province && (e.city = e.province), e.latitude && (e.latitude = B("%s", e
|
|
|
|
|
.latitude)), e.longitude && (e.longitude = B("%s", e.longitude)), e.accuracy && (e
|
|
|
|
|
.accuracy = B("%f", e.accuracy)), e.speed && (e.speed = B("%f", e.speed)), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getSystemInfo: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
var t = "pixelRatio",
|
|
|
|
|
n = "windowWidth",
|
|
|
|
|
r = "windowHeight",
|
|
|
|
|
o = "language";
|
|
|
|
|
if (!N(e, "error")) {
|
|
|
|
|
e[t] = B("%f", e[t]), e[n] = B("%d", e[n]), e[o] = (e[o] || "").replace(
|
|
|
|
|
/\s?\w+\/((?:\w|-)+)$/, "$1"), e[r] = B("%d", e[r]);
|
|
|
|
|
try {
|
|
|
|
|
U() && y.compareVersion("10.0.12") < 0 && (e[r] = i.screen.height - 64)
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
}
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
vibrate: {},
|
|
|
|
|
getServerTime: {},
|
|
|
|
|
previewImage: {
|
|
|
|
|
m: "imageViewer",
|
|
|
|
|
b: function(t) {
|
|
|
|
|
return k(t, {
|
|
|
|
|
_: "urls",
|
|
|
|
|
current: "init%d"
|
|
|
|
|
}), q(t.init) && (t.init = 0), t.images = [], (t.urls || []).forEach(function(e) {
|
|
|
|
|
t.images.push({
|
|
|
|
|
u: e
|
|
|
|
|
})
|
|
|
|
|
}), delete t.urls, t
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
chooseImage: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "count%d"
|
|
|
|
|
}), q(e.count) && (e.count = 1), K(e.sourceType) && (e.sourceType = [e.sourceType]), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
errorCode: "error",
|
|
|
|
|
errorDesc: "errorMessage",
|
|
|
|
|
localIds: "apFilePaths",
|
|
|
|
|
tempFilePaths: "apFilePaths"
|
|
|
|
|
}), delete e.scene, delete e.localIds, delete e.tempFilePaths, K(e.apFilePaths) && (e
|
|
|
|
|
.apFilePaths = F(e.apFilePaths)), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
chooseVideo: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "maxDuration%d"
|
|
|
|
|
}), K(e.sourceType) && (e.sourceType = [e.sourceType]), K(e.camera) && (e.camera = [e
|
|
|
|
|
.camera
|
|
|
|
|
]), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
switch (k(e, {
|
|
|
|
|
errorCode: "error",
|
|
|
|
|
errorDesc: "errorMessage",
|
|
|
|
|
msg: "errorMessage",
|
|
|
|
|
localId: "apFilePath",
|
|
|
|
|
tempFilePath: "apFilePath",
|
|
|
|
|
tempFile: "apFilePath"
|
|
|
|
|
}), delete e.localId, delete e.tempFilePath, delete e.tempFile, e.error) {
|
|
|
|
|
case 0:
|
|
|
|
|
delete e.error;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
e.error = 2;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
e.error = 10;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
e.error = 11;
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
e.error = 12
|
|
|
|
|
}
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
uploadFile: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
var t;
|
|
|
|
|
return k(e, {
|
|
|
|
|
headers: "header",
|
|
|
|
|
fileName: "name",
|
|
|
|
|
fileType: "type"
|
|
|
|
|
}), t = e.filePath, /^[a-z0-9|]+$/i.test(t) && (e.localId = e.filePath, delete e.filePath),
|
|
|
|
|
e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return 2 === e.error && (e.error = 11), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
saveImage: {
|
|
|
|
|
b: function(e, t) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "url",
|
|
|
|
|
url: "src"
|
|
|
|
|
}), J(t) && (e.cusHandleResult = !0), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
downloadFile: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
headers: "header"
|
|
|
|
|
}), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
tempFilePath: "apFilePath",
|
|
|
|
|
errorCode: "error"
|
|
|
|
|
}), delete e.tempFilePath, e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
setSessionData: {
|
|
|
|
|
b: function(n) {
|
|
|
|
|
return W((n = h(n)).data) || (n.data = {
|
|
|
|
|
data: n.data
|
|
|
|
|
}), O(n.data, function(e, t) {
|
|
|
|
|
n.data[e] = JSON.stringify(t)
|
|
|
|
|
}), n
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getSessionData: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return K(e._) && (e.keys = [e._]), Q(e._) && (e.keys = e._), delete e._, e
|
|
|
|
|
},
|
|
|
|
|
a: function(n) {
|
|
|
|
|
return O(n.data, function(e, t) {
|
|
|
|
|
n.data[e] = F(t)
|
|
|
|
|
}), n
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
startBizService: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "name",
|
|
|
|
|
params: "param%s"
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
tradePay: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "orderStr"
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getAuthCode: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "scopes"
|
|
|
|
|
}), K(e.scopes) ? e.scopeNicks = [e.scopes] : Q(e.scopes) ? e.scopeNicks = e.scopes : e
|
|
|
|
|
.scopeNicks = ["auth_base"], delete e.scopes, e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
authcode: "authCode"
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getAuthUserInfo: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
nick: "nickName",
|
|
|
|
|
userAvatar: "avatar"
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
openInBrowser: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "url"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
openLocation: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return q(e.scale) && (e.scale = 15), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
showPopMenu: {
|
|
|
|
|
b: function(n) {
|
|
|
|
|
if (k(n, {
|
|
|
|
|
_: "items",
|
|
|
|
|
items: "menus"
|
|
|
|
|
}), W(l.showPopMenu) ? l.showPopMenu.menus = {} : l.showPopMenu = {
|
|
|
|
|
menus: {}
|
|
|
|
|
}, Q(n.menus)) {
|
|
|
|
|
var e = n.menus;
|
|
|
|
|
n.menus = [], e.forEach(function(e, t) {
|
|
|
|
|
K(e) && (e = {
|
|
|
|
|
title: e
|
|
|
|
|
}), q((e = k(X({}, e), {
|
|
|
|
|
title: "name%s",
|
|
|
|
|
tag: "tag%s",
|
|
|
|
|
badge: "redDot%s"
|
|
|
|
|
}, {
|
|
|
|
|
tag: t,
|
|
|
|
|
title: e.title,
|
|
|
|
|
badge: q(e.badge) ? "-1" : e.badge
|
|
|
|
|
})).icon) || (e.icon = B("%b", e.icon)), n.menus.push(e), l.showPopMenu
|
|
|
|
|
.menus[e.name] = t
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return n
|
|
|
|
|
},
|
|
|
|
|
d: function(e, n) {
|
|
|
|
|
var t = "showPopMenu";
|
|
|
|
|
!0 !== l.showPopMenu.onEvent && (l.showPopMenu.onEvent = !0, y.on("popMenuClick", function(e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
k(t, {
|
|
|
|
|
title: "index%d"
|
|
|
|
|
}, {
|
|
|
|
|
title: W(e.data) && e.data.title ? l.showPopMenu.menus[e.data
|
|
|
|
|
.title] : "-1"
|
|
|
|
|
}), n(t)
|
|
|
|
|
})), g.call(t, e, function(e) {
|
|
|
|
|
C(t, e)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
setOptionButton: {
|
|
|
|
|
m: "setOptionMenu",
|
|
|
|
|
b: function(n) {
|
|
|
|
|
if (K(n._) && (n.title = n._, delete n._), Q(n._) && (n.items = n._, delete n._), k(n, {
|
|
|
|
|
items: "menus",
|
|
|
|
|
type: "iconType",
|
|
|
|
|
badge: "redDot%s"
|
|
|
|
|
}), q(n.icon) || (n.icon = B("%b", n.icon)), W(l.setOptionButton) ? l.setOptionButton
|
|
|
|
|
.menus = [] : l.setOptionButton = {
|
|
|
|
|
menus: []
|
|
|
|
|
}, Q(n.menus)) {
|
|
|
|
|
var r = n.menus;
|
|
|
|
|
n.menus = [], r.forEach(function(e, t) {
|
|
|
|
|
q((e = k(X({}, e), {
|
|
|
|
|
type: "icontype",
|
|
|
|
|
badge: "redDot%s"
|
|
|
|
|
}, {
|
|
|
|
|
badge: q(e.badge) ? "-1" : e.badge
|
|
|
|
|
})).icon) || (e.icon = B("%b", e.icon)), n.menus.unshift(e), l
|
|
|
|
|
.setOptionButton.menus[r.length - 1 - t] = t
|
|
|
|
|
}), 0 < n.menus.length && q(n.override) && (n.override = !0)
|
|
|
|
|
}
|
|
|
|
|
if (J(l.setOptionButton.onEvent) && y.off("optionMenu", l.setOptionButton.onEvent), J(n
|
|
|
|
|
.onClick)) {
|
|
|
|
|
var o = n.onClick,
|
|
|
|
|
e = function(e) {
|
|
|
|
|
var t = 0,
|
|
|
|
|
n = {};
|
|
|
|
|
W(e.data) && $(e.data.index) && 0 < l.setOptionButton.menus.length && (t = l
|
|
|
|
|
.setOptionButton.menus[e.data.index]), n.index = B("%d", t), o(n)
|
|
|
|
|
};
|
|
|
|
|
l.setOptionButton.onEvent = e, !0 !== n.reset && y.on("optionMenu", e), delete n.onClick
|
|
|
|
|
}
|
|
|
|
|
return n
|
|
|
|
|
},
|
|
|
|
|
d: function(e, t) {
|
|
|
|
|
g.call("setOptionMenu", e, t), U() && p(t, {}), y.showOptionButton()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
showOptionButton: {
|
|
|
|
|
m: "showOptionMenu"
|
|
|
|
|
},
|
|
|
|
|
hideOptionButton: {
|
|
|
|
|
m: "hideOptionMenu"
|
|
|
|
|
},
|
|
|
|
|
showBackButton: {},
|
|
|
|
|
hideBackButton: {},
|
|
|
|
|
allowBack: {
|
|
|
|
|
d: function(e) {
|
|
|
|
|
var t = "onBack";
|
|
|
|
|
k(e, {
|
|
|
|
|
_: "allowButton"
|
|
|
|
|
}), e.allowButton = !!q(e.allowButton) || !!e.allowButton, "boolean" == typeof e
|
|
|
|
|
.allowGesture && g.call("setGestureBack", {
|
|
|
|
|
val: e.allowGesture
|
|
|
|
|
}), W(l[t]) ? l[t].allowButton = e.allowButton : (l[t] = {
|
|
|
|
|
allowButton: e.allowButton
|
|
|
|
|
}, y.onBack()), !1 === e.allowButton && l[t].event && l[t].event.preventDefault()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
startRecord: {
|
|
|
|
|
m: "startAudioRecord",
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
maxDuration: "maxRecordTime%f",
|
|
|
|
|
minDuration: "minRecordTime%f",
|
|
|
|
|
bizType: "business"
|
|
|
|
|
}, {
|
|
|
|
|
maxDuration: e.maxDuration || 60,
|
|
|
|
|
minDuration: e.minDuration || 1
|
|
|
|
|
}), q(e.business) && (e.business = n), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
tempFilePath: "apFilePath",
|
|
|
|
|
identifier: "apFilePath"
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
stopRecord: {
|
|
|
|
|
m: "stopAudioRecord"
|
|
|
|
|
},
|
|
|
|
|
cancelRecord: {
|
|
|
|
|
m: "cancelAudioRecord"
|
|
|
|
|
},
|
|
|
|
|
playVoice: {
|
|
|
|
|
m: "startPlayAudio",
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "filePath",
|
|
|
|
|
filePath: "identifier",
|
|
|
|
|
bizType: "business"
|
|
|
|
|
}), q(e.business) && (e.business = n), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
identifier: "filePath"
|
|
|
|
|
}), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
pauseVoice: {
|
|
|
|
|
m: "pauseAudioPlay"
|
|
|
|
|
},
|
|
|
|
|
resumeVoice: {
|
|
|
|
|
m: "resumeAudioPlay"
|
|
|
|
|
},
|
|
|
|
|
stopVoice: {
|
|
|
|
|
m: "stopAudioPlay"
|
|
|
|
|
},
|
|
|
|
|
makePhoneCall: {
|
|
|
|
|
d: function(e, t) {
|
|
|
|
|
var n = "tel:";
|
|
|
|
|
k(e, {
|
|
|
|
|
_: "number"
|
|
|
|
|
}), n += e.number, g.call("openInBrowser", {
|
|
|
|
|
url: n
|
|
|
|
|
}, t)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
playBackgroundAudio: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "url",
|
|
|
|
|
url: "audioDataUrl%s",
|
|
|
|
|
title: "audioName%s",
|
|
|
|
|
singer: "singerName%s",
|
|
|
|
|
describe: "audioDescribe%s",
|
|
|
|
|
logo: "audioLogoUrl%s",
|
|
|
|
|
cover: "coverImgUrl%s",
|
|
|
|
|
bizType: "business"
|
|
|
|
|
}, {
|
|
|
|
|
bizType: e.bizType || n
|
|
|
|
|
}), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
describe: "errorMessage"
|
|
|
|
|
}), A(e, 12, 0), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
pauseBackgroundAudio: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
describe: "errorMessage"
|
|
|
|
|
}), A(e, 12, 0), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
stopBackgroundAudio: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
describe: "errorMessage"
|
|
|
|
|
}), A(e, 12, 0), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
seekBackgroundAudio: {
|
|
|
|
|
b: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
_: "position",
|
|
|
|
|
bizType: "business"
|
|
|
|
|
}, {
|
|
|
|
|
bizType: e.bizType || n
|
|
|
|
|
}), e.position = B("%f", e.position), e
|
|
|
|
|
},
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
describe: "errorMessage"
|
|
|
|
|
}), A(e, 12, 0), e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getBackgroundAudioPlayerState: {
|
|
|
|
|
a: function(e) {
|
|
|
|
|
return k(e, {
|
|
|
|
|
audioDataUrl: "url",
|
|
|
|
|
describe: "errorMessage"
|
|
|
|
|
}), A(e, 12, 0), e
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
y = {
|
|
|
|
|
version: "3.1.1",
|
|
|
|
|
ua: t,
|
|
|
|
|
isAlipay: D(/AlipayClient/),
|
|
|
|
|
alipayVersion: (e = t.match(/AlipayClient[a-zA-Z]*\/(\d+(?:\.\d+)+)/), e && e.length ? e[1] : ""),
|
|
|
|
|
compareVersion: function(e) {
|
|
|
|
|
var t = y.alipayVersion.split(".");
|
|
|
|
|
e = e.split(".");
|
|
|
|
|
for (var n, r, o = 0; o < t.length; o++) {
|
|
|
|
|
if (n = s(e[o], 10) || 0, (r = s(t[o], 10) || 0) < n) return -1;
|
|
|
|
|
if (n < r) return 1
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
},
|
|
|
|
|
parseQueryString: function(e) {
|
|
|
|
|
var t, n = {},
|
|
|
|
|
r = e || i.location.search,
|
|
|
|
|
o = {
|
|
|
|
|
true: !0,
|
|
|
|
|
false: !1
|
|
|
|
|
};
|
|
|
|
|
r = (r = 0 === r.indexOf("?") ? r.substr(1) : r) ? r.split("&") : "";
|
|
|
|
|
for (var a = 0; a < r.length; a++)(t = r[a].split("="))[1] = decodeURIComponent(t[1]), t[1] = q(o[t[
|
|
|
|
|
1]]) ? t[1] : o[t[1]], n[t[0]] = t[1];
|
|
|
|
|
return T("parseQueryString"), n
|
|
|
|
|
},
|
|
|
|
|
enableDebug: function() {
|
|
|
|
|
y.debug = !0
|
|
|
|
|
},
|
|
|
|
|
on: function(e, t) {
|
|
|
|
|
var n = "ready" === e;
|
|
|
|
|
n || "back" === e ? u.addEventListener(n ? r + "Ready" : e, t, !1) : (e = e.replace(/ready/, r +
|
|
|
|
|
"Ready")).split(/\s+/g).forEach(function(e) {
|
|
|
|
|
u.addEventListener(e, t, !1)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
off: function(e, t) {
|
|
|
|
|
u.removeEventListener(e, t, !1)
|
|
|
|
|
},
|
|
|
|
|
trigger: function(e, t) {
|
|
|
|
|
var n = u.createEvent("Events");
|
|
|
|
|
return n.initEvent(e, !1, !0), n.data = t || {}, u.dispatchEvent(n), n
|
|
|
|
|
},
|
|
|
|
|
ready: function(t) {
|
|
|
|
|
if (x()) return new Promise(e);
|
|
|
|
|
|
|
|
|
|
function e(e) {
|
|
|
|
|
d() ? (J(t) && t(), J(e) && e()) : y.on("ready", function() {
|
|
|
|
|
d(), J(t) && t(), J(e) && e()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
e()
|
|
|
|
|
},
|
|
|
|
|
localLog: function() {
|
|
|
|
|
var n = Z(arguments);
|
|
|
|
|
n.forEach(function(e, t) {
|
|
|
|
|
n[t] = M(e)
|
|
|
|
|
}), U() && y.ready(function() {
|
|
|
|
|
g.call("H5APLog", {
|
|
|
|
|
content: n.join(" ")
|
|
|
|
|
})
|
|
|
|
|
}), v.log.apply(v, n), T("localLog")
|
|
|
|
|
},
|
|
|
|
|
call: function() {
|
|
|
|
|
var m = Z(arguments);
|
|
|
|
|
if (x()) return y.ready().then(function() {
|
|
|
|
|
return new Promise(e)
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function e(n, r) {
|
|
|
|
|
var o, a, i, u, s, e, c, t, l, d, f, p, h;
|
|
|
|
|
o = m[0] + "", a = m[1], q(i = m[2]) && J(a) && (i = a, a = {}), !W(a) && 2 <= m.length && (
|
|
|
|
|
a = {
|
|
|
|
|
_: a
|
|
|
|
|
}), q(a) && (a = {}), u = function(e, t, n) {
|
|
|
|
|
var r = b[e],
|
|
|
|
|
o = r && r.b ? r.b(X({}, t), n) : t,
|
|
|
|
|
a = S(e, "optionModifier");
|
|
|
|
|
if (J(a)) {
|
|
|
|
|
var i = a(o, n);
|
|
|
|
|
W(i) && (o = i)
|
|
|
|
|
}
|
|
|
|
|
return o
|
|
|
|
|
}(o, a, i), s = function(e, t) {
|
|
|
|
|
var n = {};
|
|
|
|
|
J((t = t || {}).success) && (n.success = t.success, delete t.success);
|
|
|
|
|
J(t.fail) && (n.fail = t.fail, delete t.fail);
|
|
|
|
|
J(t.complete) && (n.complete = t.complete, delete t.complete);
|
|
|
|
|
return n
|
|
|
|
|
}(0, u), q(u) && v.error("please confirm " + o + ".before() returns the options."), l = !(!(
|
|
|
|
|
f = b[o]) || !f.d) && f.d, d = N(a, "_") ? a._ : a, E(o, d, u), c = P("on", o), t = P(
|
|
|
|
|
"off", o), e = function(e) {
|
|
|
|
|
var t = void 0;
|
|
|
|
|
e = e || {}, c && !1 !== S(o, "handleEventData") && (t = function(e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
q(e.data) || (t = W(t = e.data) ? t : {
|
|
|
|
|
data: t
|
|
|
|
|
});
|
|
|
|
|
return t
|
|
|
|
|
}(e)), q(t = function(e, t, n, r, o) {
|
|
|
|
|
var a = b[e],
|
|
|
|
|
i = a && a.a ? a.a((s = t, "[object Event]" === G(s) ? t : X({}, t)), n,
|
|
|
|
|
r, o) : X({}, t),
|
|
|
|
|
u = S(e, "resultModifier");
|
|
|
|
|
var s;
|
|
|
|
|
if (J(u)) {
|
|
|
|
|
var c = u(i, n, r, o);
|
|
|
|
|
W(c) && (i = c)
|
|
|
|
|
}
|
|
|
|
|
return i
|
|
|
|
|
}(o, t || e, u, a, i)) && v.error("please confirm " + o +
|
|
|
|
|
".after() returns the result."), t = C(o, t), E(o, d, u, e, t), N(t, "error") ||
|
|
|
|
|
N(t, "errorMessage") ? (J(r) && r(t), J(s.fail) && s.fail(t)) : (J(n) && n(t), J(s
|
|
|
|
|
.success) && s.success(t)), J(s.complete) && s.complete(t), J(i) && i(t)
|
|
|
|
|
}, J(l) ? l(u, e, a, i) : c ? (_(c, i, e, s), y.on(c, e)) : t ? w(t, i) : g.call((h = b[p =
|
|
|
|
|
o]) && h.m ? h.m : p, u, e), T(o)
|
|
|
|
|
}
|
|
|
|
|
d() ? e() : c.push(m)
|
|
|
|
|
},
|
|
|
|
|
extendJSAPI: function(r, o) {
|
|
|
|
|
!o && K(r) && (r = [r]), O(r, function(e) {
|
|
|
|
|
var t = e;
|
|
|
|
|
if (!0 !== o) {
|
|
|
|
|
var n = r[t];
|
|
|
|
|
J(n) && (n = {
|
|
|
|
|
doing: n
|
|
|
|
|
}), K(n) && (t = n, (n = {})[t] = {}), b[t] = k(b[t] || {}, {
|
|
|
|
|
mapping: "m",
|
|
|
|
|
before: "b",
|
|
|
|
|
doing: "d",
|
|
|
|
|
after: "a"
|
|
|
|
|
}, n), W(n.extra) && (b[t].e = b[t].e || {}, b[t].e = X(b[t].e, n.extra))
|
|
|
|
|
}
|
|
|
|
|
y[t] = function() {
|
|
|
|
|
return y.call.apply(null, [t].concat(Z(arguments)))
|
|
|
|
|
}
|
|
|
|
|
}, !0)
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function d() {
|
|
|
|
|
return (g = g || o[r]) && g.call
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function f() {
|
|
|
|
|
return (o && o.location && o.location.href ? o.location.href : "").replace(/^(http|https):\/\//i, "").split(
|
|
|
|
|
"/")[0]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function p(e, t) {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
e(t)
|
|
|
|
|
}, 1)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function h(e, t) {
|
|
|
|
|
var n = !1;
|
|
|
|
|
return t = t || "data", N(e, "_") ? (e[t] = e._, delete e._) : (O(e, function(e) {
|
|
|
|
|
e !== t && (n = !0)
|
|
|
|
|
}), n && (n = e, (e = {})[t] = n)), e
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function m(e, n, t) {
|
|
|
|
|
var r, o = !1;
|
|
|
|
|
return q(e) || (l.EVENTS || (l.EVENTS = {}), l.EVENTS[e] || (l.EVENTS[e] = {
|
|
|
|
|
callbacks: []
|
|
|
|
|
}), l.EVENTS[e].callbacks || (l.EVENTS[e].callbacks = []), l.EVENTS[e].callbacks.forEach(function(e,
|
|
|
|
|
t) {
|
|
|
|
|
e.cb === n && (o = e, r = t)
|
|
|
|
|
}), t && $(r) && l.EVENTS[e].callbacks.splice(r, 1)), o
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function _(e, t, n, r) {
|
|
|
|
|
m(e, t) || l.EVENTS[e].callbacks.push({
|
|
|
|
|
cb: t,
|
|
|
|
|
_cb: n,
|
|
|
|
|
_cbSFC: r
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function w(t, e) {
|
|
|
|
|
var n = m(t, e, !0);
|
|
|
|
|
J(e) ? n && y.off(t, n._cb) : (l.EVENTS[t].callbacks.forEach(function(e) {
|
|
|
|
|
y.off(t, e._cb)
|
|
|
|
|
}), l.EVENTS[t].callbacks = [])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function P(e, t) {
|
|
|
|
|
var n = b[t],
|
|
|
|
|
r = !1,
|
|
|
|
|
o = "off" === e ? /^off([A-Z])(\w+)/ : /^on([A-Z])(\w+)/;
|
|
|
|
|
return n && o.test(t) && (t = t.match(o), !(r = n.m) && t[1] && t[2] && (r = V(t[1]) + t[2])), r
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function S(e, t) {
|
|
|
|
|
var n = b[e] || {};
|
|
|
|
|
return (n.e || n.extra || {})[t]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function C(e, t) {
|
|
|
|
|
return N(t, "error") && (t.error = s(t.error, 10)), !1 !== S(e, "handleResultSuccess") && A(t), 0 === t.error &&
|
|
|
|
|
(delete t.error, delete t.errorMessage), 0 < t.error && t.error < 10 && v.error(e, t), t
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function A(e, t, n) {
|
|
|
|
|
return n = !q(n) && n, N(e, "error") || e.success !== n || (e.error = $(t) ? t : 2), delete e.success, e
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function B(e, t) {
|
|
|
|
|
return "%s" === e && (t = M(t)), "%c" === e && (t = function(e) {
|
|
|
|
|
var t = "" + e;
|
|
|
|
|
0 === t.indexOf("#") && (t = t.substr(1));
|
|
|
|
|
3 === t.length && (t = t.replace(/(.)/g, "$1$1"));
|
|
|
|
|
H(t = s(t, 16)) && v.error(e + " is invalid hex color.");
|
|
|
|
|
return t
|
|
|
|
|
}(t)), "%b" === e && (t = function(e) {
|
|
|
|
|
K(e) && (e = e.replace(/^data:(\/|\w|\-|\.)+;base64,/i, ""));
|
|
|
|
|
return e
|
|
|
|
|
}(t)), "%d" === e && (t = s(t, 10)), "%f" === e && (t = parseFloat(t)), t
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function k(a, i, u) {
|
|
|
|
|
var s;
|
|
|
|
|
return u = u || {}, O(i, function(e, t) {
|
|
|
|
|
var n, r, o;
|
|
|
|
|
n = i[e], r = (n || "").match(/(\w+)(%\w)$/i), o = {
|
|
|
|
|
k: n
|
|
|
|
|
}, r && (o.k = r[1], o.t = r[2]), !q(t = (s = o).k) && (N(a, e) || N(u, e)) && q(a[t]) && (a[
|
|
|
|
|
t] = B(s.t, q(u[e]) ? a[e] : u[e]), t !== e && delete a[e])
|
|
|
|
|
}), a
|
|
|
|
|
}
|
|
|
|
|
y.extendJSAPI.mapping = k, y.extendJSAPI.toType = B, y.isAlipay || v.warn("Run alipayjsapi.js in Alipay please!"), y
|
|
|
|
|
.extendJSAPI(b, !0), y.on("ready", function() {
|
|
|
|
|
c.length && function t() {
|
|
|
|
|
I(function() {
|
|
|
|
|
var e = c.shift();
|
|
|
|
|
y.call.apply(null, e), c.length && t()
|
|
|
|
|
})
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
var T = function() {
|
|
|
|
|
var t = [],
|
|
|
|
|
n = void 0,
|
|
|
|
|
r = !1;
|
|
|
|
|
|
|
|
|
|
function o() {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
if (0 < t.length) {
|
|
|
|
|
var e = t.join("|");
|
|
|
|
|
y.ready(function() {
|
|
|
|
|
g.call("remoteLog", {
|
|
|
|
|
type: "monitor",
|
|
|
|
|
bizType: "ALIPAYJSAPI",
|
|
|
|
|
logLevel: 1,
|
|
|
|
|
actionId: "MonitorReport",
|
|
|
|
|
seedId: "ALIPAYJSAPI_INVOKE_COUNTER",
|
|
|
|
|
param1: e
|
|
|
|
|
})
|
|
|
|
|
}), y.debug && v.info("REMOTE_LOG_QUEUE>", t), t = []
|
|
|
|
|
}!q(n) && clearTimeout(n), r = !1
|
|
|
|
|
}, 0)
|
|
|
|
|
}
|
|
|
|
|
return y.on("back", function() {
|
|
|
|
|
o()
|
|
|
|
|
}),
|
|
|
|
|
function(e) {
|
|
|
|
|
t.push(e), 6 <= t.length ? o() : r || (r = !0, n = setTimeout(function() {
|
|
|
|
|
o()
|
|
|
|
|
}, 5e3))
|
|
|
|
|
}
|
|
|
|
|
}();
|
|
|
|
|
|
|
|
|
|
function E() {
|
|
|
|
|
var e, t, n, r, o, a, i = Z(arguments);
|
|
|
|
|
y.debug && (e = i[0], t = i[1], n = i[2], r = i[3], o = i[4], a = [3 < i.length ? "RETURN>" : "INVOKE>", e, N(t,
|
|
|
|
|
"_") ? t._ : t, n], 3 < i.length && a.push(r), 4 < i.length && a.push(o), v.info(a))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function D(e) {
|
|
|
|
|
return e.test(t)
|
|
|
|
|
}
|
|
|
|
|
var I = i.requestAnimationFrame || i.webkitRequestAnimationFrame || i.mozRequestAnimationFrame || i
|
|
|
|
|
.msRequestAnimationFrame || function(e, t) {
|
|
|
|
|
i.setTimeout(function() {
|
|
|
|
|
e(+new Date, t)
|
|
|
|
|
}, 1e3 / 60)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function x() {
|
|
|
|
|
if (void 0 === a) {
|
|
|
|
|
var e = !1,
|
|
|
|
|
t = o.Promise;
|
|
|
|
|
if (t) {
|
|
|
|
|
var n = null,
|
|
|
|
|
r = null;
|
|
|
|
|
try {
|
|
|
|
|
r = (n = t.resolve()).then
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
n instanceof t && J(r) && !t.cast && (e = !0)
|
|
|
|
|
}
|
|
|
|
|
e || v.warn("try callback since no Promise detected"), a = e
|
|
|
|
|
}
|
|
|
|
|
return a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function M(e) {
|
|
|
|
|
var t = e;
|
|
|
|
|
if (W(e) || Q(e)) try {
|
|
|
|
|
t = JSON.stringify(e)
|
|
|
|
|
} catch (e) {} else t = e + "";
|
|
|
|
|
return t
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function L(e) {
|
|
|
|
|
var n = [];
|
|
|
|
|
return O(e, function(e, t) {
|
|
|
|
|
n.push(e + "=" + encodeURIComponent(q(t) ? "" : t))
|
|
|
|
|
}), n = n.join("&")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function R(e, t) {
|
|
|
|
|
var n = t;
|
|
|
|
|
return W(t) && (n = L(t)), /\?/.test(e) ? /&$/.test(e) || /\?$/.test(e) || (n = "&" + n) : n = "?" + n, e + n
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function N(e, t) {
|
|
|
|
|
return !(!W(e) && !Q(e)) && e.hasOwnProperty(t)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function O(e, t, n) {
|
|
|
|
|
var r, o, a;
|
|
|
|
|
if (n || (!(a = e) || J(a) || !Q(a) && !$(a.length))) {
|
|
|
|
|
for (o in e)
|
|
|
|
|
if (!1 === t(o, e[o])) return e
|
|
|
|
|
} else
|
|
|
|
|
for (r = 0; r < e.length; r++)
|
|
|
|
|
if (!1 === t(r, e[r])) return e;
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function F(t) {
|
|
|
|
|
try {
|
|
|
|
|
t = JSON.parse(t)
|
|
|
|
|
} catch (e) {
|
|
|
|
|
v.warn(e, t)
|
|
|
|
|
}
|
|
|
|
|
return t
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function V(e) {
|
|
|
|
|
return K(e) && (e = e.toLowerCase()), e
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function j(e) {
|
|
|
|
|
return K(e) && (e = e.toUpperCase()), e
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function z() {
|
|
|
|
|
return D(/android/i)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function U() {
|
|
|
|
|
return D(/iPad|iPod|iPhone|iOS/i)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function q(e) {
|
|
|
|
|
return "[object Undefined]" === G(e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function H(e) {
|
|
|
|
|
return "NaN" === s(e, 10).toString()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function J(e) {
|
|
|
|
|
return "[object Function]" === G(e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function K(e) {
|
|
|
|
|
return "string" == typeof e
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function W(e) {
|
|
|
|
|
return "[object Object]" === G(e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function $(e) {
|
|
|
|
|
return "[object Number]" === G(e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function Q(e) {
|
|
|
|
|
return "[object Array]" === G(e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function G(e) {
|
|
|
|
|
return Object.prototype.toString.call(e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function Y(e) {
|
|
|
|
|
for (var t in e) return !1;
|
|
|
|
|
return !0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function Z(e) {
|
|
|
|
|
for (var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0, n = e.length - t, r =
|
|
|
|
|
new Array(n), o = 0; o < n; o++) r[o] = e[o + t];
|
|
|
|
|
return r
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function X(e) {
|
|
|
|
|
var t, n, r = Z(arguments, 1);
|
|
|
|
|
if (!W(e)) return e;
|
|
|
|
|
for (var o = 0, a = r.length; o < a; o++)
|
|
|
|
|
for (n in t = r[o]) hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
o._AP = y, "undefined" != typeof module && module.exports ? module.exports = y : "function" == typeof define && (
|
|
|
|
|
define.amd || define.cmd) ? define(function() {
|
|
|
|
|
return y
|
|
|
|
|
}) : o.ap = o.AP = y
|
|
|
|
|
}(self);
|