You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
2.2 MiB
20 lines
2.2 MiB
4 years ago
|
!function(A,M){"object"==typeof exports&&"object"==typeof module?module.exports=M():"function"==typeof define&&define.amd?define([],M):"object"==typeof exports?exports.WasmPlayer=M():A.WasmPlayer=M()}(this,(function(){return function(A){var M={};function t(g){if(M[g])return M[g].exports;var I=M[g]={i:g,l:!1,exports:{}};return A[g].call(I.exports,I,I.exports,t),I.l=!0,I.exports}return t.m=A,t.c=M,t.d=function(A,M,g){t.o(A,M)||Object.defineProperty(A,M,{enumerable:!0,get:g})},t.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},t.t=function(A,M){if(1&M&&(A=t(A)),8&M)return A;if(4&M&&"object"==typeof A&&A&&A.__esModule)return A;var g=Object.create(null);if(t.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:A}),2&M&&"string"!=typeof A)for(var I in A)t.d(g,I,function(M){return A[M]}.bind(null,I));return g},t.n=function(A){var M=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(M,"a",M),M},t.o=function(A,M){return Object.prototype.hasOwnProperty.call(A,M)},t.p="",t(t.s=222)}([function(A,M,t){"use strict";t.d(M,"D",(function(){return g})),t.d(M,"B",(function(){return I})),t.d(M,"C",(function(){return e})),t.d(M,"u",(function(){return i})),t.d(M,"k",(function(){return T})),t.d(M,"o",(function(){return E})),t.d(M,"w",(function(){return N})),t.d(M,"t",(function(){return n})),t.d(M,"j",(function(){return D})),t.d(M,"q",(function(){return C})),t.d(M,"r",(function(){return r})),t.d(M,"l",(function(){return c})),t.d(M,"A",(function(){return o})),t.d(M,"v",(function(){return B})),t.d(M,"y",(function(){return Q})),t.d(M,"z",(function(){return a})),t.d(M,"s",(function(){return h})),t.d(M,"p",(function(){return s})),t.d(M,"n",(function(){return y})),t.d(M,"x",(function(){return w})),t.d(M,"m",(function(){return j})),t.d(M,"b",(function(){return L})),t.d(M,"a",(function(){return d})),t.d(M,"e",(function(){return x})),t.d(M,"h",(function(){return u})),t.d(M,"c",(function(){return S})),t.d(M,"g",(function(){return l})),t.d(M,"i",(function(){return z})),t.d(M,"d",(function(){return U})),t.d(M,"f",(function(){return f}));var g=1,I=2,e=3,i=1,T=2,E=3,N=4,n=6,D=7,C=10,r=11,c=12,o=13,B=14,Q=15,a=16,h=20,s=21,y=102,w=103,j=200,L=1,d=2,x=3,Y=!0;function u(A){Y=A}function S(){return Y}function l(A){A}function z(A){return new Promise((function(M){return setTimeout(M,A)}))}function U(A){var M,t=new Date,g=t.getFullYear(),I=t.getMonth()+1,e=t.getDate();t.getDay();M=g+"-"+I+"-"+e+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds(),console.log("["+M+"]: "+A)}function f(){for(var A=window.location.href.split("/"),M="",t=0;t<3;t++)M+=A[t],M+="/";return M}},function(A,M,t){"use strict";var g=t(7),I=t.n(g),e=function(){function A(){}return A.e=function(M,t){M&&!A.FORCE_GLOBAL_TAG||(M=A.GLOBAL_TAG);var g="["+M+"] > "+t;A.ENABLE_CALLBACK&&A.emitter.emit("log","error",g),A.ENABLE_ERROR&&(console.error?console.error(g):console.warn?console.warn(g):console.log(g))},A.i=function(M,t){M&&!A.FORCE_GLOBAL_TAG||(M=A.GLOBAL_TAG);var g="["+M+"] > "+t;A.ENABLE_CALLBACK&&A.emitter.emit("log","info",g),A.ENABLE_INFO&&(console.info?console.info(g):console.log(g))},A.w=function(M,t){M&&!A.FORCE_GLOBAL_TAG||(M=A.GLOBAL_TAG);var g="["+M+"] > "+t;A.ENABLE_CALLBACK&&A.emitter.emit("log","warn",g),A.ENABLE_WARN&&(console.warn?console.warn(g):console.log(g))},A.d=function(M,t){M&&!A.FORCE_GLOBAL_TAG||(M=A.GLOBAL_TAG);var g="["+M+"] > "+t;A.ENABLE_CALLBACK&&A.emitter.emit("log","debug",g),A.ENABLE_DEBUG&&(console.debug?console.debug(g):console.log(g))},A.v=function(M,t){M&&!A.FORCE_GLOBAL_TAG||(M=A.GLOBAL_TAG);var g="["+M+"] > "+t;A.ENABLE_CALLBACK&&A.emitter.emit("log","verbose",g),A.ENABLE_VERBOSE&&console.log(g)},A}();e.GLOBAL_TAG="EasyPlayer.js",e.FORCE_GLOBAL_TAG=!1,e.ENABLE_ERROR=!0,e.ENABLE_INFO=!0,e.ENABLE_WARN=!0,e.ENABLE_DEBUG=!0,e.ENABLE_VERBOSE=!0,e.ENABLE_CALLBACK=!1,e.emitter=new I.a,M.a=e},function(A,M,t){"use strict";function g(A,M){A.prototype=Object.create(M.prototype),A.prototype.constructor=A,A.__prot
|
||
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
|
var g=t(9),I=g.Buffer;function e(A,M){for(var t in A)M[t]=A[t]}function i(A,M,t){return I(A,M,t)}I.from&&I.alloc&&I.allocUnsafe&&I.allocUnsafeSlow?A.exports=g:(e(g,M),M.Buffer=i),i.prototype=Object.create(I.prototype),e(I,i),i.from=function(A,M,t){if("number"==typeof A)throw new TypeError("Argument must not be a number");return I(A,M,t)},i.alloc=function(A,M,t){if("number"!=typeof A)throw new TypeError("Argument must be a number");var g=I(A);return void 0!==M?"string"==typeof t?g.fill(M,t):g.fill(M):g.fill(0),g},i.allocUnsafe=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return I(A)},i.allocUnsafeSlow=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return g.SlowBuffer(A)}},function(A,M,t){"use strict";M.a={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},function(A,M,t){(function(A){!function(A,M){"use strict";function g(A,M){if(!A)throw new Error(M||"Assertion failed")}function I(A,M){A.super_=M;var t=function(){};t.prototype=M.prototype,A.prototype=new t,A.prototype.constructor=A}function e(A,M,t){if(e.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,null!==A&&("le"!==M&&"be"!==M||(t=M,M=10),this._init(A||0,M||10,t||"be"))}var i;"object"==typeof A?A.exports=e:M.BN=e,e.BN=e,e.wordSize=26;try{i=t(165).Buffer}catch(A){}function T(A,M,t){for(var g=0,I=Math.min(A.length,t),e=M;e<I;e++){var i=A.charCodeAt(e)-48;g<<=4,g|=i>=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return g}function E(A,M,t,g){for(var I=0,e=Math.min(A.length,t),i=M;i<e;i++){var T=A.charCodeAt(i)-48;I*=g,I+=T>=49?T-49+10:T>=17?T-17+10:T}return I}e.isBN=function(A){return A instanceof e||null!==A&&"object"==typeof A&&A.constructor.wordSize===e.wordSize&&Array.isArray(A.words)},e.max=function(A,M){return A.cmp(M)>0?A:M},e.min=function(A,M){return A.cmp(M)<0?A:M},e.prototype._init=function(A,M,t){if("number"==typeof A)return this._initNumber(A,M,t);if("object"==typeof A)return this._initArray(A,M,t);"hex"===M&&(M=16),g(M===(0|M)&&M>=2&&M<=36);var I=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&I++,16===M?this._parseHex(A,I):this._parseBase(A,M,I),"-"===A[0]&&(this.negative=1),this.strip(),"le"===t&&this._initArray(this.toArray(),M,t)},e.prototype._initNumber=function(A,M,t){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[67108863&A],this.length=1):A<4503599627370496?(this.words=[67108863&A,A/67108864&67108863],this.length=2):(g(A<9007199254740992),this.words=[67108863&A,A/67108864&67108863,1],this.length=3),"le"===t&&this._initArray(this.toArray(),M,t)},e.prototype._initArray=function(A,M,t){if(g("number"==typeof A.length),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var e,i,T=0;if("be"===t)for(I=A.length-1,e=0;I>=0;I-=3)i=A[I]|A[I-1]<<8|A[I-2]<<16,this.words[e]|=i<<T&67108863,this.words[e+1]=i>>>26-T&67108863,(T+=24)>=26&&(T-=26,e++);else if("le"===t)for(I=0,e=0;I<A.length;I+=3)i=A[I]|A[I+1]<<8|A[I+2]<<16,this.words[e]|=i<<T&67108863,this.words[e+1]=i>>>26-T&67108863,(T+=24)>=26&&(T-=26,e++);return this.strip()},e.prototype._parseHex=function(A,M){this.length=Math.ceil((A.length-M)/6),this.words=new Array(this.length);for(var t=0;t<this.length;t++)this.words[t]=0;var g,I,e=0;for(t=A.length-6,g=0;t>=M;t-=6)I=T(A,t,t+6),this.words[g]|=I<<e&67108863,this.words[g+1]|=I>>>26-e&4194303,(e+=24)>=26&&(e-=26,g++);t+6!==M&&(I=T(A,M,t+6),this.words[g]|=I<<e&67108863,this.words[g+1]|=I>>>26-e&4194303),this.strip()},e.prototype._parseBase=function(A,M,t){this.words=[0],this.length=1;for(var g=0,I=1;I<=67108863;I*=M)g++;g--,I=I/M|0;for(var e=A.length-t,i=e%g,T=Math.min(e,e-i)+t,N=0,n=t;n<T;n+=g)N=E(A,n,n+g,M),this.imuln(I),this.words[0]+N<67108864?this.words[0]+=N:this._iaddn(N);if(0!==i){var D=1;for(N=E(A,n,A.length,M),n=0;n<i;n++)D*=M;this.imuln(D),this.words[0]+N<67108864?this.words[0]+=N:this._iaddn(N)}},e.prototype.copy=function(A){A.words=new Array(this.length);for(var M=0;M<this.
|
||
|
/*!
|
||
|
* The buffer module from node.js, for the browser.
|
||
|
*
|
||
|
* @author Feross Aboukhadijeh <http://feross.org>
|
||
|
* @license MIT
|
||
|
*/
|
||
|
var g=t(111),I=t(112),e=t(59);function i(){return E.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function T(A,M){if(i()<M)throw new RangeError("Invalid typed array length");return E.TYPED_ARRAY_SUPPORT?(A=new Uint8Array(M)).__proto__=E.prototype:(null===A&&(A=new E(M)),A.length=M),A}function E(A,M,t){if(!(E.TYPED_ARRAY_SUPPORT||this instanceof E))return new E(A,M,t);if("number"==typeof A){if("string"==typeof M)throw new Error("If encoding is specified then the first argument must be a string");return D(this,A)}return N(this,A,M,t)}function N(A,M,t,g){if("number"==typeof M)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&M instanceof ArrayBuffer?function(A,M,t,g){if(M.byteLength,t<0||M.byteLength<t)throw new RangeError("'offset' is out of bounds");if(M.byteLength<t+(g||0))throw new RangeError("'length' is out of bounds");M=void 0===t&&void 0===g?new Uint8Array(M):void 0===g?new Uint8Array(M,t):new Uint8Array(M,t,g);E.TYPED_ARRAY_SUPPORT?(A=M).__proto__=E.prototype:A=C(A,M);return A}(A,M,t,g):"string"==typeof M?function(A,M,t){"string"==typeof t&&""!==t||(t="utf8");if(!E.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var g=0|c(M,t),I=(A=T(A,g)).write(M,t);I!==g&&(A=A.slice(0,I));return A}(A,M,t):function(A,M){if(E.isBuffer(M)){var t=0|r(M.length);return 0===(A=T(A,t)).length||M.copy(A,0,0,t),A}if(M){if("undefined"!=typeof ArrayBuffer&&M.buffer instanceof ArrayBuffer||"length"in M)return"number"!=typeof M.length||(g=M.length)!=g?T(A,0):C(A,M);if("Buffer"===M.type&&e(M.data))return C(A,M.data)}var g;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(A,M)}function n(A){if("number"!=typeof A)throw new TypeError('"size" argument must be a number');if(A<0)throw new RangeError('"size" argument must not be negative')}function D(A,M){if(n(M),A=T(A,M<0?0:0|r(M)),!E.TYPED_ARRAY_SUPPORT)for(var t=0;t<M;++t)A[t]=0;return A}function C(A,M){var t=M.length<0?0:0|r(M.length);A=T(A,t);for(var g=0;g<t;g+=1)A[g]=255&M[g];return A}function r(A){if(A>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|A}function c(A,M){if(E.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var t=A.length;if(0===t)return 0;for(var g=!1;;)switch(M){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return b(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return G(A).length;default:if(g)return b(A).length;M=(""+M).toLowerCase(),g=!0}}function o(A,M,t){var g=!1;if((void 0===M||M<0)&&(M=0),M>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(M>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return S(this,M,t);case"utf8":case"utf-8":return x(this,M,t);case"ascii":return Y(this,M,t);case"latin1":case"binary":return u(this,M,t);case"base64":return d(this,M,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l(this,M,t);default:if(g)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),g=!0}}function B(A,M,t){var g=A[M];A[M]=A[t],A[t]=g}function Q(A,M,t,g,I){if(0===A.length)return-1;if("string"==typeof t?(g=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=I?0:A.length-1),t<0&&(t=A.length+t),t>=A.length){if(I)return-1;t=A.length-1}else if(t<0){if(!I)return-1;t=0}if("string"==typeof M&&(M=E.from(M,g)),E.isBuffer(M))return 0===M.length?-1:a(A,M,t,g,I);if("number"==typeof M)return M&=255,E.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?I?Uint8Array.prototype.indexOf.call(A,M,t):Uint8Array.prototype.lastIndexOf.call(A,M,t):a(A,[M],t,g,I);throw new TypeError("val must be string, number or Buffer")}function a(A,M,t,g,I){var e,i=1,T=A.length,E=M.length;if(void 0!==g&&("ucs2"===(g=String(g).toLowerCase())||"u
|
||
|
/*! @name @videojs/vhs-utils @version 1.3.0 @license MIT */var g=function(){function A(){this.listeners={}}var M=A.prototype;return M.on=function(A,M){this.listeners[A]||(this.listeners[A]=[]),this.listeners[A].push(M)},M.off=function(A,M){if(!this.listeners[A])return!1;var t=this.listeners[A].indexOf(M);return this.listeners[A]=this.listeners[A].slice(0),this.listeners[A].splice(t,1),t>-1},M.trigger=function(A){var M=this.listeners[A];if(M)if(2===arguments.length)for(var t=M.length,g=0;g<t;++g)M[g].call(this,arguments[1]);else for(var I=Array.prototype.slice.call(arguments,1),e=M.length,i=0;i<e;++i)M[i].apply(this,I)},M.dispose=function(){this.listeners={}},M.pipe=function(A){this.on("data",(function(M){A.push(M)}))},A}();A.exports=g},function(A,M,t){"use strict";var g=t(3),I=t(37),e=t(39),i=t(40),T=t(15);function E(A){T.call(this,"digest"),this._hash=A}g(E,T),E.prototype._update=function(A){this._hash.update(A)},E.prototype._final=function(){return this._hash.digest()},A.exports=function(A){return"md5"===(A=A.toLowerCase())?new I:"rmd160"===A||"ripemd160"===A?new e:new E(i(A))}},function(A,M,t){"use strict";var g=t(4).Buffer,I=g.isEncoding||function(A){switch((A=""+A)&&A.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function e(A){var M;switch(this.encoding=function(A){var M=function(A){if(!A)return"utf8";for(var M;;)switch(A){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return A;default:if(M)return;A=(""+A).toLowerCase(),M=!0}}(A);if("string"!=typeof M&&(g.isEncoding===I||!I(A)))throw new Error("Unknown encoding: "+A);return M||A}(A),this.encoding){case"utf16le":this.text=E,this.end=N,M=4;break;case"utf8":this.fillLast=T,M=4;break;case"base64":this.text=n,this.end=D,M=3;break;default:return this.write=C,void(this.end=r)}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(M)}function i(A){return A<=127?0:A>>5==6?2:A>>4==14?3:A>>3==30?4:A>>6==2?-1:-2}function T(A){var M=this.lastTotal-this.lastNeed,t=function(A,M,t){if(128!=(192&M[0]))return A.lastNeed=0,"�";if(A.lastNeed>1&&M.length>1){if(128!=(192&M[1]))return A.lastNeed=1,"�";if(A.lastNeed>2&&M.length>2&&128!=(192&M[2]))return A.lastNeed=2,"�"}}(this,A);return void 0!==t?t:this.lastNeed<=A.length?(A.copy(this.lastChar,M,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(A.copy(this.lastChar,M,0,A.length),void(this.lastNeed-=A.length))}function E(A,M){if((A.length-M)%2==0){var t=A.toString("utf16le",M);if(t){var g=t.charCodeAt(t.length-1);if(g>=55296&&g<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",M,A.length-1)}function N(A){var M=A&&A.length?this.write(A):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return M+this.lastChar.toString("utf16le",0,t)}return M}function n(A,M){var t=(A.length-M)%3;return 0===t?A.toString("base64",M):(this.lastNeed=3-t,this.lastTotal=3,1===t?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",M,A.length-t))}function D(A){var M=A&&A.length?this.write(A):"";return this.lastNeed?M+this.lastChar.toString("base64",0,3-this.lastNeed):M}function C(A){return A.toString(this.encoding)}function r(A){return A&&A.length?this.write(A):""}M.StringDecoder=e,e.prototype.write=function(A){if(0===A.length)return"";var M,t;if(this.lastNeed){if(void 0===(M=this.fillLast(A)))return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<A.length?M?M+this.text(A,t):this.text(A,t):M||""},e.prototype.end=function(A){var M=A&&A.length?this.write(A):"";return this.lastNeed?M+"�":M},e.prototype.text=function(A,M){var t=function(A,M,t){var g=M.length-1;if(g<t)return 0;var I=i(M[g]);if(I>=0)return I>0&&(A.lastNeed=I-1),I;if(--
|
||
|
/*!
|
||
|
* @overview es6-promise - a tiny implementation of Promises/A+.
|
||
|
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
||
|
* @license Licensed under MIT license
|
||
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
||
|
* @version v4.2.8+1e68dce6
|
||
|
*/
|
||
|
var g;g=function(){"use strict";function A(A){return"function"==typeof A}var g=Array.isArray?Array.isArray:function(A){return"[object Array]"===Object.prototype.toString.call(A)},I=0,e=void 0,i=void 0,T=function(A,M){c[I]=A,c[I+1]=M,2===(I+=2)&&(i?i(o):Q())},E="undefined"!=typeof window?window:void 0,N=E||{},n=N.MutationObserver||N.WebKitMutationObserver,D="undefined"==typeof self&&void 0!==M&&"[object process]"==={}.toString.call(M),C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function r(){var A=setTimeout;return function(){return A(o,1)}}var c=new Array(1e3);function o(){for(var A=0;A<I;A+=2)(0,c[A])(c[A+1]),c[A]=void 0,c[A+1]=void 0;I=0}var B,Q=void 0;function a(A,M){var t=this,g=new this.constructor(y);void 0===g[s]&&z(g);var I=t._state;if(I){var e=arguments[I-1];T((function(){return S(I,g,e,t._result)}))}else Y(t,g,A,M);return g}function h(A){if(A&&"object"==typeof A&&A.constructor===this)return A;var M=new this(y);return j(M,A),M}D?Q=function(){return M.nextTick(o)}:n?Q=function(){var A=0,M=new n(o),t=document.createTextNode("");return M.observe(t,{characterData:!0}),function(){t.data=A=++A%2}}():C?((B=new MessageChannel).port1.onmessage=o,Q=function(){return B.port2.postMessage(0)}):Q=void 0===E?function(){try{var A=Function("return this")().require("vertx");return void 0!==(e=A.runOnLoop||A.runOnContext)?function(){e(o)}:r()}catch(A){return r()}}():r();var s=Math.random().toString(36).substring(2);function y(){}function w(M,t,g){t.constructor===M.constructor&&g===a&&t.constructor.resolve===h?function(A,M){1===M._state?d(A,M._result):2===M._state?x(A,M._result):Y(M,void 0,(function(M){return j(A,M)}),(function(M){return x(A,M)}))}(M,t):void 0===g?d(M,t):A(g)?function(A,M,t){T((function(A){var g=!1,I=function(A,M,t,g){try{A.call(M,t,g)}catch(A){return A}}(t,M,(function(t){g||(g=!0,M!==t?j(A,t):d(A,t))}),(function(M){g||(g=!0,x(A,M))}),A._label);!g&&I&&(g=!0,x(A,I))}),A)}(M,t,g):d(M,t)}function j(A,M){if(A===M)x(A,new TypeError("You cannot resolve a promise with itself"));else if(I=typeof(g=M),null===g||"object"!==I&&"function"!==I)d(A,M);else{var t=void 0;try{t=M.then}catch(M){return void x(A,M)}w(A,M,t)}var g,I}function L(A){A._onerror&&A._onerror(A._result),u(A)}function d(A,M){void 0===A._state&&(A._result=M,A._state=1,0!==A._subscribers.length&&T(u,A))}function x(A,M){void 0===A._state&&(A._state=2,A._result=M,T(L,A))}function Y(A,M,t,g){var I=A._subscribers,e=I.length;A._onerror=null,I[e]=M,I[e+1]=t,I[e+2]=g,0===e&&A._state&&T(u,A)}function u(A){var M=A._subscribers,t=A._state;if(0!==M.length){for(var g=void 0,I=void 0,e=A._result,i=0;i<M.length;i+=3)g=M[i],I=M[i+t],g?S(t,g,I,e):I(e);A._subscribers.length=0}}function S(M,t,g,I){var e=A(g),i=void 0,T=void 0,E=!0;if(e){try{i=g(I)}catch(A){E=!1,T=A}if(t===i)return void x(t,new TypeError("A promises callback cannot return that same promise."))}else i=I;void 0!==t._state||(e&&E?j(t,i):!1===E?x(t,T):1===M?d(t,i):2===M&&x(t,i))}var l=0;function z(A){A[s]=l++,A._state=void 0,A._result=void 0,A._subscribers=[]}var U=function(){function A(A,M){this._instanceConstructor=A,this.promise=new A(y),this.promise[s]||z(this.promise),g(M)?(this.length=M.length,this._remaining=M.length,this._result=new Array(this.length),0===this.length?d(this.promise,this._result):(this.length=this.length||0,this._enumerate(M),0===this._remaining&&d(this.promise,this._result))):x(this.promise,new Error("Array Methods must be provided an Array"))}return A.prototype._enumerate=function(A){for(var M=0;void 0===this._state&&M<A.length;M++)this._eachEntry(A[M],M)},A.prototype._eachEntry=function(A,M){var t=this._instanceConstructor,g=t.resolve;if(g===h){var I=void 0,e=void 0,i=!1;try{I=A.then}catch(A){i=!0,e=A}if(I===a&&void 0!==A._state)this._settledAt(A._state,M,A._result);else if("function"!=typeof I)this._remaining--,this._result[M]=A;else if(t===f){var T=new t(y);i?x(T,e):w(T,A,I),this._willSettleAt(T,M)}else this._willSettleAt(new t((function(M){return M(A)})),M)}else this._willSettleAt(g(A),M)},A.prototype._settledAt=function(A
|