!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=12)}([function(e,t,n){!function(n,r){e.exports=t=r()}(0,function(){var e=e||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},o=r.lib={},i=o.Base=function(){return{extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i>>2]>>>24-i%4*8&255;t[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var i=0;i>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],o=0;o>16)&r,t=18e3*(65535&t)+(t>>16)&r;var o=(n<<16)+t&r;return o/=4294967296,(o+=.5)*(e.random()>.5?1:-1)}}(4294967296*(n||e.random()));n=987654071*i(),r.push(4294967296*i()|0)}return new a.init(r,t)}}),s=r.enc={},u=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=4*i,u=o/s;u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0);var c=u*i,l=e.min(4*c,o);if(c){for(var f=0;f4&&e}},{key:"extend",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&t[n]&&(e[n]=t[n])}},{key:"isArray",value:function(e){return"[object Array]"===Object.prototype.toString.call(arg)}},{key:"getFileType",value:function(e){return e=e.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(e)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(e)?"audio":/.bmp|.jpg|.jpeg|.png/.test(e)?"img":"other"}},{key:"isImage",value:function(e){return e=e.toLowerCase(),!!/.jpg|.jpeg|.png/.test(e)}},{key:"ISODateString",value:function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(e){return!!/^\d+$/.test(e)}}]),e}();t.default=i},function(e,t,n){!function(r,o){e.exports=t=o(n(0))}(0,function(e){return function(t){function n(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+o+a;return(s<>>32-i)+t}function r(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+o+a;return(s<>>32-i)+t}function o(e,t,n,r,o,i,a){var s=e+(t^n^r)+o+a;return(s<>>32-i)+t}function i(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+o+a;return(s<>>32-i)+t}var a=e,s=a.lib,u=s.WordArray,c=s.Hasher,l=a.algo,f=[];!function(){for(var e=0;e<64;e++)f[e]=4294967296*t.abs(t.sin(e+1))|0}();var h=l.MD5=c.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var a=0;a<16;a++){var s=t+a,u=e[s];e[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var c=this._hash.words,l=e[t+0],h=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],y=e[t+6],_=e[t+7],m=e[t+8],T=e[t+9],S=e[t+10],w=e[t+11],A=e[t+12],b=e[t+13],I=e[t+14],E=e[t+15],U=c[0],k=c[1],P=c[2],O=c[3];U=n(U,k,P,O,l,7,f[0]),O=n(O,U,k,P,h,12,f[1]),P=n(P,O,U,k,d,17,f[2]),k=n(k,P,O,U,p,22,f[3]),U=n(U,k,P,O,g,7,f[4]),O=n(O,U,k,P,v,12,f[5]),P=n(P,O,U,k,y,17,f[6]),k=n(k,P,O,U,_,22,f[7]),U=n(U,k,P,O,m,7,f[8]),O=n(O,U,k,P,T,12,f[9]),P=n(P,O,U,k,S,17,f[10]),k=n(k,P,O,U,w,22,f[11]),U=n(U,k,P,O,A,7,f[12]),O=n(O,U,k,P,b,12,f[13]),P=n(P,O,U,k,I,17,f[14]),k=n(k,P,O,U,E,22,f[15]),U=r(U,k,P,O,h,5,f[16]),O=r(O,U,k,P,y,9,f[17]),P=r(P,O,U,k,w,14,f[18]),k=r(k,P,O,U,l,20,f[19]),U=r(U,k,P,O,v,5,f[20]),O=r(O,U,k,P,S,9,f[21]),P=r(P,O,U,k,E,14,f[22]),k=r(k,P,O,U,g,20,f[23]),U=r(U,k,P,O,T,5,f[24]),O=r(O,U,k,P,I,9,f[25]),P=r(P,O,U,k,p,14,f[26]),k=r(k,P,O,U,m,20,f[27]),U=r(U,k,P,O,b,5,f[28]),O=r(O,U,k,P,d,9,f[29]),P=r(P,O,U,k,_,14,f[30]),k=r(k,P,O,U,A,20,f[31]),U=o(U,k,P,O,v,4,f[32]),O=o(O,U,k,P,m,11,f[33]),P=o(P,O,U,k,w,16,f[34]),k=o(k,P,O,U,I,23,f[35]),U=o(U,k,P,O,h,4,f[36]),O=o(O,U,k,P,g,11,f[37]),P=o(P,O,U,k,_,16,f[38]),k=o(k,P,O,U,S,23,f[39]),U=o(U,k,P,O,b,4,f[40]),O=o(O,U,k,P,l,11,f[41]),P=o(P,O,U,k,p,16,f[42]),k=o(k,P,O,U,y,23,f[43]),U=o(U,k,P,O,T,4,f[44]),O=o(O,U,k,P,A,11,f[45]),P=o(P,O,U,k,E,16,f[46]),k=o(k,P,O,U,d,23,f[47]),U=i(U,k,P,O,l,6,f[48]),O=i(O,U,k,P,_,10,f[49]),P=i(P,O,U,k,I,15,f[50]),k=i(k,P,O,U,v,21,f[51]),U=i(U,k,P,O,A,6,f[52]),O=i(O,U,k,P,p,10,f[53]),P=i(P,O,U,k,S,15,f[54]),k=i(k,P,O,U,h,21,f[55]),U=i(U,k,P,O,m,6,f[56]),O=i(O,U,k,P,E,10,f[57]),P=i(P,O,U,k,y,15,f[58]),k=i(k,P,O,U,b,21,f[59]),U=i(U,k,P,O,g,6,f[60]),O=i(O,U,k,P,w,10,f[61]),P=i(P,O,U,k,d,15,f[62]),k=i(k,P,O,U,T,21,f[63]),c[0]=c[0]+U|0,c[1]=c[1]+k|0,c[2]=c[2]+P|0,c[3]=c[3]+O|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;n[o>>>5]|=128<<24-o%32;var i=t.floor(r/4294967296),a=r;n[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[14+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}});a.MD5=c._createHelper(h),a.HmacMD5=c._createHmacHelper(h)}(Math),e.MD5})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},t.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},t.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n-1)return"Baiduspider";if(t.indexOf("PlayStation")>-1)return"PS4";var r="Win32"==navigator.platform||"Windows"==navigator.platform||t.indexOf("Windows")>-1,o="Mac68K"==navigator.platform||"MacPPC"==navigator.platform||"Macintosh"==navigator.platform||"MacIntel"==navigator.platform;return o&&(n="macOS"),"X11"==navigator.platform&&!r&&!o&&(n="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(n="Linux"),r?"windows":n},a=function(){var e=navigator.userAgent,t="";return(e.indexOf("Windows NT 5.0")>-1||e.indexOf("Windows 2000")>-1)&&(t="2000"),(e.indexOf("Windows NT 5.1")>-1||e.indexOf("Windows XP")>-1)&&(t="XP"),(e.indexOf("Windows NT 5.2")>-1||e.indexOf("Windows 2003")>-1)&&(t="2003"),(e.indexOf("Windows NT 6.0")>-1||e.indexOf("Windows Vista")>-1)&&(t="Vista"),(e.indexOf("Windows NT 6.1")>-1||e.indexOf("Windows 7")>-1)&&(t="7"),(e.indexOf("Windows NT 6.2")>-1||e.indexOf("Windows 8")>-1)&&(t="8"),(e.indexOf("Windows NT 6.3")>-1||e.indexOf("Windows 8.1")>-1)&&(t="8.1"),(e.indexOf("Windows NT 10")>-1||e.indexOf("Windows 10")>-1)&&(t="10"),t},s=function(e){var t=navigator.userAgent.toLowerCase();return e.chrome?"Chrome":e.firefox?"Firefox":e.safari?"Safari":e.webview?"webview":e.ie?/edge/.test(t)?"Edge":"IE":/baiduspider/.test(t)?"Baiduspider":/ucweb/.test(t)||/UCBrowser/.test(t)?"UC":/opera/.test(t)?"Opera":/ucweb/.test(t)?"UC":/360se/.test(t)?"360浏览器":/bidubrowser/.test(t)?"百度浏览器":/metasr/.test(t)?"搜狗浏览器":/lbbrowser/.test(t)?"猎豹浏览器":/micromessenger/.test(t)?"微信内置浏览器":/qqbrowser/.test(t)?"QQ浏览器":/playstation/.test(t)?"PS4浏览器":void 0},u=function(){var e={},t={},n=navigator.userAgent,r=navigator.platform,o=n.match(/Web[kK]it[\/]{0,1}([\d.]+)/),u=n.match(/(Android);?[\s\/]+([\d.]+)?/),c=!!n.match(/\(Macintosh\; Intel /),l=n.match(/(iPad).*OS\s([\d_]+)/),f=n.match(/(iPod)(.*OS\s([\d_]+))?/),h=!l&&n.match(/(iPhone\sOS)\s([\d_]+)/),d=n.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),p=/Win\d{2}|Windows/.test(r),g=n.match(/Windows Phone ([\d.]+)/),v=d&&n.match(/TouchPad/),y=n.match(/Kindle\/([\d.]+)/),_=n.match(/Silk\/([\d._]+)/),m=n.match(/(BlackBerry).*Version\/([\d.]+)/),T=n.match(/(BB10).*Version\/([\d.]+)/),S=n.match(/(RIM\sTablet\sOS)\s([\d.]+)/),w=n.match(/PlayBook/),A=n.match(/Chrome\/([\d.]+)/)||n.match(/CriOS\/([\d.]+)/),b=n.match(/Firefox\/([\d.]+)/),I=n.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),E=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),U=!A&&n.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),k=U||n.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((t.webkit=!!o)&&(t.version=o[1]),u&&(e.android=!0,e.version=u[2]),h&&!f&&(e.ios=e.iphone=!0,e.version=h[2].replace(/_/g,".")),l&&(e.ios=e.ipad=!0,e.version=l[2].replace(/_/g,".")),f&&(e.ios=e.ipod=!0,e.version=f[3]?f[3].replace(/_/g,"."):null),g&&(e.wp=!0,e.version=g[1]),d&&(e.webos=!0,e.version=d[2]),v&&(e.touchpad=!0),m&&(e.blackberry=!0,e.version=m[2]),T&&(e.bb10=!0,e.version=T[2]),S&&(e.rimtabletos=!0,e.version=S[2]),w&&(t.playbook=!0),y&&(e.kindle=!0,e.version=y[1]),_&&(t.silk=!0,t.version=_[1]),!_&&e.android&&n.match(/Kindle Fire/)&&(t.silk=!0),A&&(t.chrome=!0,t.version=A[1]),b&&(t.firefox=!0,t.version=b[1]),I&&(e.firefoxos=!0,e.version=I[1]),E&&(t.ie=!0,t.version=E[1]),k&&(c||e.ios||p||u)&&(t.safari=!0,e.ios||(t.version=k[1])),U&&(t.webview=!0),c){var P=n.match(/[\d]*_[\d]*_[\d]*/);P&&P.length>0&&P[0]&&(e.version=P[0].replace(/_/g,"."))}return e.tablet=!!(l||w||u&&!n.match(/Mobile/)||b&&n.match(/Tablet/)||E&&!n.match(/Phone/)&&n.match(/Touch/)),e.phone=!(e.tablet||e.ipod||!(u||h||d||m||T||A&&n.match(/Android/)||A&&n.match(/CriOS\/([\d.]+)/)||b&&n.match(/Mobile/)||E&&n.match(/Touch/))),e.pc=!e.tablet&&!e.phone,c?e.name="macOS":p?(e.name="windows",e.version=a()):e.name=i(e),t.name=s(t),{os:e,browser:t}}(),c=function(){function e(){r(this,e)}return o(e,null,[{key:"getHost",value:function(e){var t="";if(void 0===e||null==e||""==e)return"";var n=e.indexOf("//"),r=e;n>-1&&(r=e.substring(n+2));var t=r,o=r.split("/");return o&&o.length>0&&(t=o[0]),o=t.split(":"),o&&o.length>0&&(t=o[0]),t}},{key:"os",get:function(){return u.os}},{key:"browser",get:function(){var e=u.browser;return e.name||(e.name=s()),e}}]),e}();t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0){c._invalidUserId=!0;var t=e.Message+",正确账号ID(userId)请参考:https://help.aliyun.com/knowledge_detail/37196.html";console.log(t)}}catch(e){console.log(e)}})})}o&&(u.videoInfo=o?JSON.parse(o).Vod:{},u.userData=f.default.encode(o)),u.ri=m.default.create(),this._uploadList.push(u),this._reportLog("20001",u,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(u)}catch(e){console.log(e)}return!0}},{key:"deleteFile",value:function(e){return!!this.cancelFile(e)&&(this._uploadList.splice(e,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(e){this.options;if(e<0||e>=this._uploadList.length)return!1;var t=this._uploadList[e];if(e==this._curIndex&&t.state==a.UPLOADSTATE.UPLOADING){t.state=a.UPLOADSTATE.CANCELED;var n=this._getCheckoutpoint(t);n&&n.checkpoint&&(n=n.checkpoint),n&&this._ossUpload.abort(t),this._removeCheckoutpoint(t),this.nextUpload()}else t.state!=a.UPLOADSTATE.SUCCESS&&(t.state=a.UPLOADSTATE.CANCELED);return this._reportLog("20008",t),!0}},{key:"resumeFile",value:function(e){this.options;if(e<0||e>=this._uploadList.length)return!1;var t=this._uploadList[e];return t.state==a.UPLOADSTATE.CANCELED&&(t.state=a.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(e){return this._getCheckoutpoint({file:e})}},{key:"startUpload",value:function(e){this._retryCount=0;this.options;if(this._state==a.VODSTATE.START||this._state==a.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),-1==this._curIndex)return void(this._state=a.VODSTATE.END);var t=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(t),this._state=a.VODSTATE.START}},{key:"nextUpload",value:function(){var e=this.options;if(this._state==a.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),-1!=this._curIndex){var t=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(t)}else{this._state=a.VODSTATE.END;try{e.onUploadEnd&&e.onUploadEnd(t)}catch(e){console.log(e)}}}},{key:"clear",value:function(e){for(var t=this.options,n=0,r=0;rthis._curIndex&&(o=this._uploadList[this._curIndex]),o&&(this.init(e,t,n,r),this._state=a.VODSTATE.START,this._ossUpload=null,this._uploadCore(o,o.retry),o.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(e,t,n){if(-1==this._curIndex)return!1;if(this._state!=a.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var r=this._uploadList[this._curIndex];r.object?this._refreshSTSTokenUpload(r,e,t,n):this.setSTSToken(r,e,t,n)}}},{key:"setSTSTokenDirectlyUpload",value:function(e,t,n,r,o){if(!(t&&n&&r&&o))return console.log("accessKeyId、ccessKeySecret、securityToken and expiration should not be empty."),!1;this._ut="oss";var i=e;this.init(t,n,r,o),i.endpoint=i._endpoint,i.bucket=i._bucket,i.object=i._object,this._ossUpload=null,this._uploadCore(i,e.retry),e.retry=!1}},{key:"setSTSToken",value:function(e,t,n,r){if(!t||!n||!r)return console.log("accessKeyId、ccessKeySecret、securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var o=e.videoInfo,i={accessKeyId:t,securityToken:r,accessKeySecret:n,fileName:e.file.name,title:o.Title,requestId:e.ri,region:this.options.region};o.ImageType&&(i.imageType=o.ImageType),o.ImageExt&&(i.imageExt=o.ImageExt),o.FileSize&&(i.fileSize=o.FileSize),o.Description&&(i.description=o.Description),o.CateId&&(i.cateId=o.CateId),o.Tags&&(i.tags=o.Tags),o.TemplateGroupId&&(i.templateGroupId=o.TemplateGroupId),o.StorageLocation&&(i.storageLocation=o.StorageLocation),o.CoverURL&&(i.coverUrl=o.CoverURL),o.TransCodeMode&&(i.transCodeMode=o.TransCodeMode),o.UserData&&(i.userData=o.UserData);var s=this,u="getUploadAuth";e.videoId?(i.videoId=e.videoId,u="refreshUploadAuth"):e.isImage&&(u="getImageUploadAuth"),S.default[u](i,function(t){e.videoId=t.VideoId?t.VideoId:e.videoId,s.setUploadAuthAndAddress(e,t.UploadAuth,t.UploadAddress),s._state=a.VODSTATE.START},function(t){s._error(e,{name:t.Code,code:t.Code,message:t.Message,requestId:t.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(e,t,n,r){if(!e||!t||!n)return!1;var o=JSON.parse(f.default.decode(t));if(!(o.AccessKeyId&&o.AccessKeySecret&&o.SecurityToken&&o.Expiration))return console.error("uploadauth is invalid"),!1;var i={},a=e;if(n){if(i=JSON.parse(f.default.decode(n)),!i.Endpoint||!i.Bucket||!i.FileName)return console.error("uploadAddress is invalid"),!1}else i.Endpoint=a.endpoint,i.Bucket=a.bucket,i.FileName=a.object;this._ut="vod",this._uploadWay="vod",this.options.region=o.Region||this.options.region,this.init(o.AccessKeyId,o.AccessKeySecret,o.SecurityToken,o.Expiration),a.endpoint=a._endpoint?a._endpoint:i.Endpoint,a.bucket=a._bucket?a._bucket:i.Bucket,a.object=a._object?a._object:i.FileName,a.region=this.options.region,r&&(a.videoId=r),this._ossUpload=null,this._uploadCore(a,e.retry),e.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(e,t,n,r){if(!t||!n||!r)return console.log("accessKeyId、ccessKeySecret、securityToken should not be empty."),!1;var o={accessKeyId:t,securityToken:r,accessKeySecret:n,videoId:e.object,requestId:e.ri,region:this.options.region},i=this,s="refreshUploadAuth";e.isImage&&(s="getImageUploadAuth"),S.default[s](o,function(t){i.setUploadAuthAndAddress(e,t.UploadAuth,UploadAddress),i._state=a.VODSTATE.START},function(t){i._error(e,{name:t.Code,code:t.Code,message:t.Message,requestId:t.RequestId})})}},{key:"_upload",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.options;if(e.retry=t,n.onUploadstarted&&!t)try{var r=this._getCheckoutpoint(e);r&&r.state!=a.UPLOADSTATE.UPLOADING&&(e.checkpoint=r,e.videoId=r.videoId),n.onUploadstarted(e)}catch(e){console.log(e)}}},{key:"_uploadCore",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId、AccessKeySecret、securityToken should not be null");if(e.state=a.UPLOADSTATE.UPLOADING,!this._ossUpload){e.endpoint=e.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var t=this;this._ossUpload=new c.default({bucket:e.bucket,endpoint:e.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(e,n){t._error.call(t,e,n)},oncomplete:function(e,n){t._complete.call(t,e,n)},onprogress:function(e,n,r){t._progress.call(t,e,n,r)}})}var n=y.default.getFileType(e.file.name),r=this._getCheckoutpoint(e),o="",i="";r&&r.checkpoint&&(i=r.state,o=r.videoId,r=r.checkpoint),r&&o==e.videoId&&i!=a.UPLOADSTATE.UPLOADING&&(r.file=e.file,e.checkpoint=r,r.uploadId);var s=this._adjustPartSize(e);this._reportLog("20002",e,{ft:n,fs:e.file.size,bu:e.bucket,ok:e.object,vid:e.videoId||"",fn:e.file.name,fw:null,fh:null,ps:s});var u={headers:{"x-oss-notification":e.userData?e.userData:""},partSize:s,parallel:this.options.parallel};this._ossUpload.upload(e,u)}},{key:"_findUploadIndex",value:function(){for(var e=-1,t=0;t0||"SignatureDoesNotMatchError"==t.name||"SecurityTokenExpired"==t.code||"InvalidSecurityToken.Expired"==t.code||"InvalidAccessKeyId"==t.code&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=a.VODSTATE.EXPIRE,e.state=a.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(e,t)}catch(e){console.log(e)}}return}if(("RequestTimeoutError"==t.name||"ConnectionTimeout"==t.name||"ConnectionTimeoutError"==t.name)&&this._retryTotal>this._retryCount){var n=this;return setTimeout(function(){n._uploadCore(e,!0)},1e3*n._retryDuration),void this._retryCount++}"NoSuchUploadError"==t.name&&this._removeCheckoutpoint(e),this._handleError(e,t)}}},{key:"_handleError",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=a.UPLOADSTATE.FAIlURE;if(e.state!=a.UPLOADSTATE.CANCELED&&(e.state=a.UPLOADSTATE.FAIlURE,this._state=a.VODSTATE.FAILURE,this.options.onUploadFailed&&t&&t.code&&t.message))try{this.options.onUploadFailed(e,t.code,t.message)}catch(e){console.log(e)}if(n&&this._changeState(e,r),this._reportLog("20006",e,{code:t.name,message:t.message,requestId:t.requestId,fs:e.file.size,bu:e.bucket,ok:e.object,fn:e.file.name}),this._reportLog("20004",e,{requestId:t.requestId,fs:e.file.size,bu:e.bucket,ok:e.object,fn:e.file.name}),e.ri=m.default.create(),-1!=this._findUploadIndex()){var o=this;this._state=a.VODSTATE.START,setTimeout(function(){o.nextUpload()},100)}}},{key:"_complete",value:function(e,t){if(e.state=a.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(e)}catch(e){console.log(e)}var n=0;t&&t.res&&t.res.headers&&(n=t.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(e);var r=this;setTimeout(function(){r.nextUpload()},100),this._retryCount=0,this._reportLog("20003",e,{requestId:n})}},{key:"_progress",value:function(e,t,n){if(this.options.onUploadProgress)try{e.loaded=t.loaded,this.options.onUploadProgress(e,t.total,t.loaded)}catch(e){console.log(e)}var r=t.checkpoint,o=0;r&&(e.checkpoint=r,this._saveCheckoutpoint(e,r,a.UPLOADSTATE.UPLOADING),o=r.uploadId),this._retryCount=0;var i=this._getPortNumber(r),s=0;if(n&&n.headers&&(s=n.headers["x-oss-request-id"]),0!=t.loaded&&this._reportLog("20007",e,{pn:i,requestId:s}),1!=t.loaded&&this._reportLog("20005",e,{UploadId:o,pn:i+1,pr:e.retry?1:0,fs:e.file.size,bu:e.bucket,ok:e.object,fn:e.file.name}),!this._invalidUserId&&!e.isImage&&"vod"==this._ut&&this.options.enableUploadProgress){var u={file:e.file,checkpoint:t,userId:this.options.userId,videoId:e.videoId,region:this.options.region,fileHash:e.fileHash};try{var c=this;A.default.upload(u,function(){},function(e){if((e=JSON.parse(e))&&"InvalidParameter"==e.Code&&e.Message.indexOf("UserId")>0){c._invalidUserId=!0;var t=e.Message+",正确账号ID(userId)请参考:https://help.aliyun.com/knowledge_detail/37196.html";console.log(t)}})}catch(e){console.log(e)}}}},{key:"_getPortNumber",value:function(e){if(e){var t=e.doneParts;if(t&&t.length>0)return t[t.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(e){var t=this._getCheckoutpointKey(e);d.default.remove(t)}},{key:"_getCheckoutpoint",value:function(e){var t=this._getCheckoutpointKey(e),n=d.default.get(t);if(n)try{return JSON.parse(n)}catch(e){}return""}},{key:"_saveCheckoutpoint",value:function(e,t,n){if(t){var r=this._getCheckoutpointKey(e),o=e.file,i={fileName:o.name,lastModified:o.lastModified,size:o.size,object:e.object,videoId:e.videoId,bucket:e.bucket,endpoint:e.endpoint,checkpoint:t,loaded:e.loaded,state:n};d.default.set(r,JSON.stringify(i))}}},{key:"_changeState",value:function(e,t){var n=this._getCheckoutpoint(e);n&&((this._onbeforeunload=!0)&&(t=a.UPLOADSTATE.STOPED),this._saveCheckoutpoint(e,n.checkpoint,t))}},{key:"_getCheckoutpointKey",value:function(e){return"upload_"+e.file.lastModified+"_"+e.file.name+"_"+e.file.size}},{key:"_getCheckoutpointFromCloud",value:function(e,t,n){var r={userId:this.options.userId,uploadInfoList:[{FileName:e.file.name,FileSize:e.file.size,FileCreateTime:e.file.lastModified,FileHash:e.fileHash}],region:this.options.region};A.default.get(r,function(e){t(e)},n)}},{key:"_reportLog",value:function(e,t,n){n||(n={}),n.ri=t.ri,this._ut&&(n.ut=this._ut),this._log.log(e,n)}},{key:"_initEvent",value:function(){var e=this;window&&(window.onbeforeunload=function(t){if(e._onbeforeunload=!0,-1!=e._curIndex&&e._uploadList.length>e._curIndex){var n=e._uploadList[e._curIndex];e._changeState(n,a.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var e=0;e1e4?e.file.size/9999:this.options.partSize}}]),e}());t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},t.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),i.alloc(+e)}function v(e,t){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return H(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return U(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:T(e,t,n,r,o);if("number"==typeof t)return t&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):T(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function T(e,t,n,r,o){function i(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(o){var l=-1;for(c=n;cs&&(n=s-u),c=n;c>=0;c--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a239?4:i>223?3:i>191?2:1;if(o+s<=n){var u,c,l,f;switch(s){case 1:i<128&&(a=i);break;case 2:u=e[o+1],128==(192&u)&&(f=(31&i)<<6|63&u)>127&&(a=f);break;case 3:u=e[o+1],c=e[o+2],128==(192&u)&&128==(192&c)&&(f=(15&i)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=e[o+1],c=e[o+2],l=e[o+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(f=(15&i)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return P(r)}function P(e){var t=e.length;if(t<=$)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function B(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function N(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,r,o){return o||N(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,o){return o||N(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,n,r,52,8),n+8}function K(e){if(e=z(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Y(e){for(var t=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function q(e){return X.toByteArray(K(e))}function J(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function G(e){return e!==e}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var X=n(21),Z=n(22),Q=n(23);t.Buffer=i,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),i.poolSize=8192,i._augment=function(e){return e.__proto__=i.prototype,e},i.from=function(e,t,n){return a(null,e,t,n)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(e,t,n){return u(null,e,t,n)},i.allocUnsafe=function(e){return c(null,e)},i.allocUnsafeSlow=function(e){return c(null,e)},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},i.prototype.compare=function(e,t,n,r,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var a=o-r,s=n-t,u=Math.min(a,s),c=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return S(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return A(this,e,t,n);case"latin1":case"binary":return b(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)r+=this[e+--t]*o;return r},i.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],o=1,i=0;++i=o&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},i.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){x(this,e,t,n,Math.pow(2,8*n)-1,0)}var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);x(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);x(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},i.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function o(e){return 3*e.length/4-r(e)}function i(e){var t,n,o,i,a,s=e.length;i=r(e),a=new f(3*s/4-i),n=i>0?s-4:s;var u=0;for(t=0;t>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[u++]=255&o):1===i&&(o=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}function a(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function s(e,t,n){for(var r,o=[],i=t;iu?u:a+16383));return 1===r?(t=e[n-1],o+=c[t>>2],o+=c[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=c[t>>10],o+=c[t>>4&63],o+=c[t<<2&63],o+="="),i.push(o),i.join("")}t.byteLength=o,t.toByteArray=i,t.fromByteArray=u;for(var c=[],l=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=h.length;d>1,l=-7,f=n?o-1:0,h=n?-1:1,d=e[t+f];for(f+=h,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=c}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?h/u:h*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=p,s/=256,o-=8);for(a=a<0;e[n+d]=255&a,d+=p,a/=256,c-=8);e[n+d-p]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n>>31}var f=(r<<5|r>>>27)+u+a[c];f+=c<20?1518500249+(o&i|~o&s):c<40?1859775393+(o^i^s):c<60?(o&i|o&s|i&s)-1894007588:(o^i^s)-899497514,u=s,s=i,i=o<<30|o>>>2,o=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=o._createHelper(s),t.HmacSHA1=o._createHmacHelper(s)}(),e.SHA1})},function(e,t,n){!function(r,o){e.exports=t=o(n(0))}(0,function(e){!function(){var t=e,n=t.lib,r=n.Base,o=t.enc,i=o.Utf8,a=t.algo;a.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,u=a.words,c=0;c>>6-a%4*2;r[i>>>2]|=(s|u)<<24-i%4*8,i++}return o.create(r,i)}var n=e,r=n.lib,o=r.WordArray,i=n.enc;i.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var o=[],i=0;i>>2]>>>24-i%4*8&255,s=t[i+1>>>2]>>>24-(i+1)%4*8&255,u=t[i+2>>>2]>>>24-(i+2)%4*8&255,c=a<<16|s<<8|u,l=0;l<4&&i+.75*l>>6*(3-l)&63));var f=r.charAt(64);if(f)for(;o.length%4;)o.push(f);return o.join("")},parse:function(e){var n=e.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i0&&(t=e.UploadProgress.UploadProgressList[0],r=t.ClientId),f.default.setClientId(r),n&&n(t)},function(e){e&&(r(e),console.log(e))})}}]),e}();t.default=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n