!function(U){(function(e){var t=!1,n=e.Promise;if(n){var o=null,r=null;try{r=(o=n.resolve()).then}catch(e){}o instanceof n&&"function"==typeof r&&!n.cast&&(t=!0)}return t})(U)||function(){var e,t;e=this,t=function(){"use strict";function s(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,t=void 0,r=void 0,u=function(e,t){d[o]=e,d[o+1]=t,2===(o+=2)&&(r?r(h):b())},e="undefined"!=typeof window?window:void 0,a=e||{},i=a.MutationObserver||a.WebKitMutationObserver,c=void 0===U&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),l="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(h,1)}}var d=new Array(1e3);function h(){for(var e=0;e<o;e+=2)(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0;o=0}var p,m,v,g,b=void 0;function y(e,t){var n=arguments,o=this,r=new this.constructor(P);void 0===r[w]&&V(r);var a,i=o._state;return i?(a=n[i-1],u(function(){return O(i,r,a,o._result)})):M(o,r,e,t),r}function _(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(P);return E(t,e),t}c?b=function(){return process.nextTick(h)}:i?(m=0,v=new i(h),g=document.createTextNode(""),v.observe(g,{characterData:!0}),b=function(){g.data=m=++m%2}):l?((p=new MessageChannel).port1.onmessage=h,b=function(){return p.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(h)}:f()}catch(e){return f()}}():f();var w=Math.random().toString(36).substring(16);function P(){}var B=void 0,A=1,C=2,S=new R;function k(e){try{return e.then}catch(e){return S.error=e,S}}function T(e,t,n){var o,r,a,i;t.constructor===e.constructor&&n===y&&t.constructor.resolve===_?(a=e,(i=t)._state===A?I(a,i._result):i._state===C?x(a,i._result):M(i,void 0,function(e){return E(a,e)},function(e){return x(a,e)})):n===S?(x(e,S.error),S.error=null):void 0===n?I(e,t):s(n)?(o=t,r=n,u(function(t){var n=!1,e=function(e,t,n,o){try{e.call(t,n,o)}catch(e){return e}}(r,o,function(e){n||(n=!0,o!==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===B&&(e._result=t,e._state=A,0!==e._subscribers.length&&u(L,e))}function x(e,t){e._state===B&&(e._state=C,e._result=t,u(D,e))}function M(e,t,n,o){var r=e._subscribers,a=r.length;e._onerror=null,r[a]=t,r[a+A]=n,r[a+C]=o,0===a&&e._state&&u(L,e)}function L(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var o=void 0,r=void 0,a=e._result,i=0;i<t.length;i+=3)o=t[i],r=t[i+n],o?O(n,o,r,a):r(a);e._subscribers.length=0}}function R(){this.error=null}var N=new R;function O(e,t,n,o){var r=s(n),a=void 0,i=void 0,u=void 0,c=void 0;if(r){if((a=function(e,t){try{return e(t)}catch(e){return N.error=e,N}}(n,o))===N?(c=!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=o,u=!0;t._state!==B||(r&&u?E(t,a):c?x(t,i):e===A?I(t,a):e===C&&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===B&&n<e;n++)this._eachEntry(t[n],n)},j.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,o=n.resolve;if(o===_){var r=k(t);if(r===y&&t._state!==B)this._settledAt(t._state,e,t._result);else if("function"!=typeof r)this._remaining--,this._result[e]=t;else if(n===z){var a=new n(P);T(a,t,r),this._willSettleAt(a,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(o(t),e)},j.prototype._settledAt=function(e,t,n){var o=this.promise;o._state===B&&(this._remaining--,e===C?x(o,n):this._result[t]=n),0===this._remaining&&I(o,this._result)},j.prototype._willSettleAt=function(e,t){var n=this;M(e,void 0,function(e){return n._settledAt(A,t,e)},function(e){return n._settledAt(C,t,e)})},z.all=function(e){return new j(this,e).promise},z.race=function(r){var a=this;return n(r)?new a(function(e,t){for(var n=r.length,o=0;o<n;o++)a.resolve(r[o]).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){r=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(r){"use strict";var a,e,o="AlipayJSBridge",v=r[o],t=navigator.userAgent||navigator.swuserAgent,n="apm-h5",i=r.window,u=r.document,g=r.console,c=r.parseInt,s=[],l={getBAPSI:{isListening:!1,lastState:2,on:function(){l.getBAPSI.isListening||(v.call("startMonitorBackgroundAudio"),l.getBAPSI.isListening=!0,y.on("getBackgroundAudioPlayedStateInfo",l.getBAPSI.listener))},off:function(){y.off("getBackgroundAudioPlayedStateInfo",l.getBAPSI.listener),v.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={openBluetoothAdapter:{},closeBluetoothAdapter:{},getBluetoothAdapterState:{},startBluetoothDevicesDiscovery:{b:function(e){return z(e._)&&(e._=[e._]),S(e,{_:"services"}),e}},stopBluetoothDevicesDiscovery:{},getBluetoothDevices:{b:function(e){return z(e._)&&(e._=[e._]),S(e,{_:"services"}),e},a:function(e){return q(e.devices)&&L(e.devices,function(e,t){S(t,{manufacturerData:"advertisData"})}),e}},getConnectedBluetoothDevices:{a:function(e){return q(e.devices)&&L(e.devices,function(e,t){S(t,{manufacturerData:"advertisData"})}),e}},connectBLEDevice:{b:function(e){return S(e,{_:"deviceId"}),e}},disconnectBLEDevice:{},writeBLECharacteristicValue:{},readBLECharacteristicValue:{},notifyBLECharacteristicValueChange:{},getBLEDeviceServices:{b:function(e){return S(e,{_:"deviceId"}),e}},getBLEDeviceCharacteristics:{},onBLECharacteristicValueChange:{m:"BLECharacteristicValueChange"},offBLECharacteristicValueChange:{m:"BLECharacteristicValueChange"},onBluetoothAdapterStateChange:{},offBluetoothAdapterStateChange:{},onBLEConnectionStateChanged:{m:"BLEConnectionStateChanged"},offBLEConnectionStateChanged:{m:"BL