chunk-d73f2284.undefined.1643358245804.js 163 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d73f2284"],{"0358":function(t,e,r){(function(e){t.exports=e()})((function(t){"use strict";var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(t,e){var r=t[0],o=t[1],n=t[2],i=t[3];r+=(o&n|~o&i)+e[0]-680876936|0,r=(r<<7|r>>>25)+o|0,i+=(r&o|~r&n)+e[1]-389564586|0,i=(i<<12|i>>>20)+r|0,n+=(i&r|~i&o)+e[2]+606105819|0,n=(n<<17|n>>>15)+i|0,o+=(n&i|~n&r)+e[3]-1044525330|0,o=(o<<22|o>>>10)+n|0,r+=(o&n|~o&i)+e[4]-176418897|0,r=(r<<7|r>>>25)+o|0,i+=(r&o|~r&n)+e[5]+1200080426|0,i=(i<<12|i>>>20)+r|0,n+=(i&r|~i&o)+e[6]-1473231341|0,n=(n<<17|n>>>15)+i|0,o+=(n&i|~n&r)+e[7]-45705983|0,o=(o<<22|o>>>10)+n|0,r+=(o&n|~o&i)+e[8]+1770035416|0,r=(r<<7|r>>>25)+o|0,i+=(r&o|~r&n)+e[9]-1958414417|0,i=(i<<12|i>>>20)+r|0,n+=(i&r|~i&o)+e[10]-42063|0,n=(n<<17|n>>>15)+i|0,o+=(n&i|~n&r)+e[11]-1990404162|0,o=(o<<22|o>>>10)+n|0,r+=(o&n|~o&i)+e[12]+1804603682|0,r=(r<<7|r>>>25)+o|0,i+=(r&o|~r&n)+e[13]-40341101|0,i=(i<<12|i>>>20)+r|0,n+=(i&r|~i&o)+e[14]-1502002290|0,n=(n<<17|n>>>15)+i|0,o+=(n&i|~n&r)+e[15]+1236535329|0,o=(o<<22|o>>>10)+n|0,r+=(o&i|n&~i)+e[1]-165796510|0,r=(r<<5|r>>>27)+o|0,i+=(r&n|o&~n)+e[6]-1069501632|0,i=(i<<9|i>>>23)+r|0,n+=(i&o|r&~o)+e[11]+643717713|0,n=(n<<14|n>>>18)+i|0,o+=(n&r|i&~r)+e[0]-373897302|0,o=(o<<20|o>>>12)+n|0,r+=(o&i|n&~i)+e[5]-701558691|0,r=(r<<5|r>>>27)+o|0,i+=(r&n|o&~n)+e[10]+38016083|0,i=(i<<9|i>>>23)+r|0,n+=(i&o|r&~o)+e[15]-660478335|0,n=(n<<14|n>>>18)+i|0,o+=(n&r|i&~r)+e[4]-405537848|0,o=(o<<20|o>>>12)+n|0,r+=(o&i|n&~i)+e[9]+568446438|0,r=(r<<5|r>>>27)+o|0,i+=(r&n|o&~n)+e[14]-1019803690|0,i=(i<<9|i>>>23)+r|0,n+=(i&o|r&~o)+e[3]-187363961|0,n=(n<<14|n>>>18)+i|0,o+=(n&r|i&~r)+e[8]+1163531501|0,o=(o<<20|o>>>12)+n|0,r+=(o&i|n&~i)+e[13]-1444681467|0,r=(r<<5|r>>>27)+o|0,i+=(r&n|o&~n)+e[2]-51403784|0,i=(i<<9|i>>>23)+r|0,n+=(i&o|r&~o)+e[7]+1735328473|0,n=(n<<14|n>>>18)+i|0,o+=(n&r|i&~r)+e[12]-1926607734|0,o=(o<<20|o>>>12)+n|0,r+=(o^n^i)+e[5]-378558|0,r=(r<<4|r>>>28)+o|0,i+=(r^o^n)+e[8]-2022574463|0,i=(i<<11|i>>>21)+r|0,n+=(i^r^o)+e[11]+1839030562|0,n=(n<<16|n>>>16)+i|0,o+=(n^i^r)+e[14]-35309556|0,o=(o<<23|o>>>9)+n|0,r+=(o^n^i)+e[1]-1530992060|0,r=(r<<4|r>>>28)+o|0,i+=(r^o^n)+e[4]+1272893353|0,i=(i<<11|i>>>21)+r|0,n+=(i^r^o)+e[7]-155497632|0,n=(n<<16|n>>>16)+i|0,o+=(n^i^r)+e[10]-1094730640|0,o=(o<<23|o>>>9)+n|0,r+=(o^n^i)+e[13]+681279174|0,r=(r<<4|r>>>28)+o|0,i+=(r^o^n)+e[0]-358537222|0,i=(i<<11|i>>>21)+r|0,n+=(i^r^o)+e[3]-722521979|0,n=(n<<16|n>>>16)+i|0,o+=(n^i^r)+e[6]+76029189|0,o=(o<<23|o>>>9)+n|0,r+=(o^n^i)+e[9]-640364487|0,r=(r<<4|r>>>28)+o|0,i+=(r^o^n)+e[12]-421815835|0,i=(i<<11|i>>>21)+r|0,n+=(i^r^o)+e[15]+530742520|0,n=(n<<16|n>>>16)+i|0,o+=(n^i^r)+e[2]-995338651|0,o=(o<<23|o>>>9)+n|0,r+=(n^(o|~i))+e[0]-198630844|0,r=(r<<6|r>>>26)+o|0,i+=(o^(r|~n))+e[7]+1126891415|0,i=(i<<10|i>>>22)+r|0,n+=(r^(i|~o))+e[14]-1416354905|0,n=(n<<15|n>>>17)+i|0,o+=(i^(n|~r))+e[5]-57434055|0,o=(o<<21|o>>>11)+n|0,r+=(n^(o|~i))+e[12]+1700485571|0,r=(r<<6|r>>>26)+o|0,i+=(o^(r|~n))+e[3]-1894986606|0,i=(i<<10|i>>>22)+r|0,n+=(r^(i|~o))+e[10]-1051523|0,n=(n<<15|n>>>17)+i|0,o+=(i^(n|~r))+e[1]-2054922799|0,o=(o<<21|o>>>11)+n|0,r+=(n^(o|~i))+e[8]+1873313359|0,r=(r<<6|r>>>26)+o|0,i+=(o^(r|~n))+e[15]-30611744|0,i=(i<<10|i>>>22)+r|0,n+=(r^(i|~o))+e[6]-1560198380|0,n=(n<<15|n>>>17)+i|0,o+=(i^(n|~r))+e[13]+1309151649|0,o=(o<<21|o>>>11)+n|0,r+=(n^(o|~i))+e[4]-145523070|0,r=(r<<6|r>>>26)+o|0,i+=(o^(r|~n))+e[11]-1120210379|0,i=(i<<10|i>>>22)+r|0,n+=(r^(i|~o))+e[2]+718787259|0,n=(n<<15|n>>>17)+i|0,o+=(i^(n|~r))+e[9]-343485551|0,o=(o<<21|o>>>11)+n|0,t[0]=r+t[0]|0,t[1]=o+t[1]|0,t[2]=n+t[2]|0,t[3]=i+t[3]|0}function o(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return r}function n(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return r}function i(t){var e,n,i,a,s,c,h=t.length,u=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=h;e+=64)r(u,o(t.substring(e-64,e)));for(t=t.substring(e-64),n=t.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<n;e+=1)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(r(u,i),e=0;e<16;e+=1)i[e]=0;return a=8*h,a=a.toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,i[14]=s,i[15]=c,r(u,i),u}function a(t){var e,o,i,a,s,c,h=t.length,u=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=h;e+=64)r(u,n(t.subarray(e-64,e)));for(t=e-64<h?t.subarray(e-64):new Uint8Array(0),o=t.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<o;e+=1)i[e>>2]|=t[e]<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(r(u,i),e=0;e<16;e+=1)i[e]=0;return a=8*h,a=a.toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,i[14]=s,i[15]=c,r(u,i),u}function s(t){var r,o="";for(r=0;r<4;r+=1)o+=e[t>>8*r+4&15]+e[t>>8*r&15];return o}function c(t){var e;for(e=0;e<t.length;e+=1)t[e]=s(t[e]);return t.join("")}function h(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function u(t,e){var r,o=t.length,n=new ArrayBuffer(o),i=new Uint8Array(n);for(r=0;r<o;r+=1)i[r]=t.charCodeAt(r);return e?i:n}function l(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function f(t,e,r){var o=new Uint8Array(t.byteLength+e.byteLength);return o.set(new Uint8Array(t)),o.set(new Uint8Array(e),t.byteLength),r?o:o.buffer}function p(t){var e,r=[],o=t.length;for(e=0;e<o-1;e+=2)r.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,r)}function d(){this.reset()}return"5d41402abc4b2a76b9719d911017c592"!==c(i("hello"))&&function(t,e){var r=(65535&t)+(65535&e),o=(t>>16)+(e>>16)+(r>>16);return o<<16|65535&r},"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return t=0|t||0,t<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(r,o){var n,i,a,s,c=this.byteLength,h=e(r,c),u=c;return o!==t&&(u=e(o,c)),h>u?new ArrayBuffer(0):(n=u-h,i=new ArrayBuffer(n),a=new Uint8Array(i),s=new Uint8Array(this,h,n),a.set(s),i)}}(),d.prototype.append=function(t){return this.appendBinary(h(t)),this},d.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,n=this._buff.length;for(e=64;e<=n;e+=64)r(this._hash,o(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},d.prototype.end=function(t){var e,r,o=this._buff,n=o.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<n;e+=1)i[e>>2]|=o.charCodeAt(e)<<(e%4<<3);return this._finish(i,n),r=c(this._hash),t&&(r=p(r)),this.reset(),r},d.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},d.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},d.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},d.prototype._finish=function(t,e){var o,n,i,a=e;if(t[a>>2]|=128<<(a%4<<3),a>55)for(r(this._hash,t),a=0;a<16;a+=1)t[a]=0;o=8*this._length,o=o.toString(16).match(/(.*?)(.{0,8})$/),n=parseInt(o[2],16),i=parseInt(o[1],16)||0,t[14]=n,t[15]=i,r(this._hash,t)},d.hash=function(t,e){return d.hashBinary(h(t),e)},d.hashBinary=function(t,e){var r=i(t),o=c(r);return e?p(o):o},d.ArrayBuffer=function(){this.reset()},d.ArrayBuffer.prototype.append=function(t){var e,o=f(this._buff.buffer,t,!0),i=o.length;for(this._length+=t.byteLength,e=64;e<=i;e+=64)r(this._hash,n(o.subarray(e-64,e)));return this._buff=e-64<i?new Uint8Array(o.buffer.slice(e-64)):new Uint8Array(0),this},d.ArrayBuffer.prototype.end=function(t){var e,r,o=this._buff,n=o.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<n;e+=1)i[e>>2]|=o[e]<<(e%4<<3);return this._finish(i,n),r=c(this._hash),t&&(r=p(r)),this.reset(),r},d.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.ArrayBuffer.prototype.getState=function(){var t=d.prototype.getState.call(this);return t.buff=l(t.buff),t},d.ArrayBuffer.prototype.setState=function(t){return t.buff=u(t.buff,!0),d.prototype.setState.call(this,t)},d.ArrayBuffer.prototype.destroy=d.prototype.destroy,d.ArrayBuffer.prototype._finish=d.prototype._finish,d.ArrayBuffer.hash=function(t,e){var r=a(new Uint8Array(t)),o=c(r);return e?p(o):o},d}))},"04d5":function(t,e,r){"use strict";var o=r("581d").forEach,n=r("dd79"),i=n("forEach");t.exports=i?[].forEach:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}},"06778":function(t,e,r){"use strict";var o=r("9740"),n=r("5dcf").includes,i=o.aTypedArray,a=o.exportTypedArrayMethod;a("includes",(function(t){return n(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"07c0":function(t,e,r){"use strict";var o=r("3fad"),n=r("1de2"),i=r("1432"),a=r("5e35"),s=r("63ec"),c=r("2295"),h=r("a787"),u=r("70d4"),l=r("336f"),f=l("slice"),p=u("species"),d=[].slice,g=Math.max;o({target:"Array",proto:!0,forced:!f},{slice:function(t,e){var r,o,u,l=c(this),f=s(l.length),v=a(t,f),m=a(void 0===e?f:e,f);if(i(l)&&(r=l.constructor,"function"!=typeof r||r!==Array&&!i(r.prototype)?n(r)&&(r=r[p],null===r&&(r=void 0)):r=void 0,r===Array||void 0===r))return d.call(l,v,m);for(o=new(void 0===r?Array:r)(g(m-v,0)),u=0;v<m;v++,u++)v in l&&h(o,u,l[v]);return o.length=u,o}})},"07c2":function(t,e,r){var o=r("2295"),n=r("6876").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return n(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?s(t):n(o(t))}},"08cb":function(t,e,r){},"0d3d":function(t,e,r){"use strict";var o,n=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();(function(t){t["InvalidFile"]="InvalidFile",t["InvalidToken"]="InvalidToken",t["InvalidMetadata"]="InvalidMetadata",t["InvalidChunkSize"]="InvalidChunkSize",t["InvalidCustomVars"]="InvalidCustomVars",t["NotAvailableUploadHost"]="NotAvailableUploadHost",t["ReadCacheFailed"]="ReadCacheFailed",t["InvalidCacheData"]="InvalidCacheData",t["WriteCacheFailed"]="WriteCacheFailed",t["RemoveCacheFailed"]="RemoveCacheFailed",t["GetCanvasContextFailed"]="GetCanvasContextFailed",t["UnsupportedFileType"]="UnsupportedFileType",t["FileReaderReadFailed"]="FileReaderReadFailed",t["NotAvailableXMLHttpRequest"]="NotAvailableXMLHttpRequest",t["InvalidProgressEventTarget"]="InvalidProgressEventTarget",t["RequestError"]="RequestError"})(o||(o={}));var i=function(){function t(t,e){this.name=t,this.message=e,this.stack=(new Error).stack}return t}(),a=function(t){function e(e,r,n,i){var a=t.call(this,o.RequestError,n)||this;return a.code=e,a.reqId=r,a.isRequestError=!0,a.data=i,a}return n(e,t),e}(i),s=function(t){function e(e,r){return void 0===r&&(r=""),t.call(this,0,r,e)||this}return n(e,t),e}(a),c=function(){function t(t,e){this.runTask=t,this.limit=e,this.queue=[],this.processing=[]}return t.prototype.enqueue=function(t){var e=this;return new Promise((function(r,o){e.queue.push({task:t,resolve:r,reject:o}),e.check()}))},t.prototype.run=function(t){var e=this;this.queue=this.queue.filter((function(e){return e!==t})),this.processing.push(t),this.runTask(t.task).then((function(){e.processing=e.processing.filter((function(e){return e!==t})),t.resolve(),e.check()}),(function(e){return t.reject(e)}))},t.prototype.check=function(){var t=this,e=this.processing.length,r=this.limit-e;this.queue.slice(0,r).forEach((function(e){t.run(e)}))},t}(),h=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),u=function(){return u=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},u.apply(this,arguments)},l=function(){function t(){this.closed=!1}return t.prototype.unsubscribe=function(){this.closed||(this.closed=!0,this._unsubscribe&&this._unsubscribe())},t.prototype.add=function(t){this._unsubscribe=t},t}(),f=function(t){function e(e,r,o){var n=t.call(this)||this;return n.isStopped=!1,n.destination=e&&"object"===typeof e?e:u(u(u({},e&&{next:e}),r&&{error:r}),o&&{complete:o}),n}return h(e,t),e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype.next=function(t){!this.isStopped&&this.destination.next&&this.destination.next(t)},e.prototype.error=function(t){!this.isStopped&&this.destination.error&&(this.isStopped=!0,this.destination.error(t))},e.prototype.complete=function(t){!this.isStopped&&this.destination.complete&&(this.isStopped=!0,this.destination.complete(t))},e}(l);(function(){function t(t){this._subscribe=t}t.prototype.subscribe=function(t,e,r){var o=new f(t,e,r);return o.add(this._subscribe(o)),o}})();function p(t){if(null===t||"undefined"===typeof t)return"";var e,r,o=t+"",n="",i=0;e=r=0,i=o.length;for(var a=0;a<i;a++){var s=o.charCodeAt(a),c=null;if(s<128)r++;else if(s>127&&s<2048)c=String.fromCharCode(s>>6|192,63&s|128);else if((63488&s^55296)>0)c=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128);else{if((64512&s^55296)>0)throw new RangeError("Unmatched trail surrogate at "+a);var h=o.charCodeAt(++a);if((64512&h^56320)>0)throw new RangeError("Unmatched lead surrogate at "+(a-1));s=((1023&s)<<10)+(1023&h)+65536,c=String.fromCharCode(s>>18|240,s>>12&63|128,s>>6&63|128,63&s|128)}null!==c&&(r>e&&(n+=o.slice(e,r)),n+=c,e=r=a+1)}return r>e&&(n+=o.slice(e,i)),n}function d(t){var e=[],r=0,o=0,n=0;t+="";while(r<t.length){o=255&t.charCodeAt(r),n=0,o<=191?(o&=127,n=1):o<=223?(o&=31,n=2):o<=239?(o&=15,n=3):(o&=7,n=4);for(var i=1;i<n;++i)o=o<<6|63&t.charCodeAt(i+r);4===n?(o-=65536,e.push(String.fromCharCode(55296|o>>10&1023)),e.push(String.fromCharCode(56320|1023&o))):e.push(String.fromCharCode(o)),r+=n}return e.join("")}function g(t){var e,r,o,n,i,a,s,c,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=0,l=0,f="",d=[];if(!t)return t;t=p(t+"");do{e=t.charCodeAt(u++),r=t.charCodeAt(u++),o=t.charCodeAt(u++),c=e<<16|r<<8|o,n=c>>18&63,i=c>>12&63,a=c>>6&63,s=63&c,d[l++]=h.charAt(n)+h.charAt(i)+h.charAt(a)+h.charAt(s)}while(u<t.length);switch(f=d.join(""),t.length%3){case 1:f=f.slice(0,-2)+"==";break;case 2:f=f.slice(0,-1)+"=";break}return f}function v(t){var e,r,o,n,i,a,s,c,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=0,l=0,f="",p=[];if(!t)return t;t+="";do{n=h.indexOf(t.charAt(u++)),i=h.indexOf(t.charAt(u++)),a=h.indexOf(t.charAt(u++)),s=h.indexOf(t.charAt(u++)),c=n<<18|i<<12|a<<6|s,e=c>>16&255,r=c>>8&255,o=255&c,p[l++]=64===a?String.fromCharCode(e):64===s?String.fromCharCode(e,r):String.fromCharCode(e,r,o)}while(u<t.length);return f=p.join(""),d(f)}function m(t){return t=g(t),t.replace(/\//g,"_").replace(/\+/g,"-")}function y(t){return t=t.replace(/_/g,"/").replace(/-/g,"+"),v(t)}var w,x=r("0358"),b=r.n(x),C=function(){return C=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},C.apply(this,arguments)},I=function(t,e,r,o){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(e){i(e)}}function s(t){try{c(o["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):n(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))},B=function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,o&&(n=2&i[0]?o["return"]:i[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},A=Math.pow(1024,2);function O(t,e){var r=e*A;if(r>t.size)r=t.size;else while(t.size>1e4*r)r*=2;for(var o=[],n=Math.ceil(t.size/r),i=0;i<n;i++){var a=t.slice(r*i,i===n-1?t.size:r*(i+1));o.push(a)}return o}function k(t){return Object.keys(t).every((function(t){return 0===t.indexOf("x-qn-meta-")}))}function T(t){return Object.keys(t).every((function(t){return 0===t.indexOf("x:")}))}function S(t){return t.reduce((function(t,e){return t+e}),0)}function _(t,e,r){try{localStorage.setItem(t,JSON.stringify(e))}catch(n){r.warn(new i(o.WriteCacheFailed,"setLocalFileInfo failed: "+t))}}function M(t,e,r){var o=null==e?"_":"_key_"+e+"_";return"qiniu_js_sdk_upload_file_name_"+t+o+"size_"+r}function E(t,e){try{localStorage.removeItem(t)}catch(r){e.warn(new i(o.RemoveCacheFailed,"removeLocalFileInfo failed. key: "+t))}}function L(t,e){var r=null;try{r=localStorage.getItem(t)}catch(a){e.warn(new i(o.ReadCacheFailed,"getLocalFileInfo failed. key: "+t))}if(null==r)return null;var n=null;try{n=JSON.parse(r)}catch(s){E(t,e),e.warn(new i(o.InvalidCacheData,"getLocalFileInfo failed to parse. key: "+t))}return n}function P(t){var e="UpToken "+t;return{Authorization:e}}function R(t){var e=P(t);return C({"content-type":"application/octet-stream"},e)}function U(t){var e=P(t);return C({"content-type":"application/json"},e)}function H(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)return new window.ActiveXObject("Microsoft.XMLHTTP");throw new i(o.NotAvailableXMLHttpRequest,"the current environment does not support.")}function j(t){return I(this,void 0,void 0,(function(){var e,r;return B(this,(function(o){switch(o.label){case 0:return[4,N(t)];case 1:return e=o.sent(),r=new b.a.ArrayBuffer,r.append(e),[2,r.end()]}}))}))}function N(t){return new Promise((function(e,r){var n=new FileReader;n.onload=function(t){if(t.target){var n=t.target.result;e(n)}else r(new i(o.InvalidProgressEventTarget,"progress event target is undefined"))},n.onerror=function(){r(new i(o.FileReaderReadFailed,"fileReader read failed"))},n.readAsArrayBuffer(t)}))}function z(t,e){return new Promise((function(r,o){var n=H();if(n.open(e.method,t),e.onCreate&&e.onCreate(n),e.headers){var i=e.headers;Object.keys(i).forEach((function(t){n.setRequestHeader(t,i[t])}))}n.upload.addEventListener("progress",(function(t){t.lengthComputable&&e.onProgress&&e.onProgress({loaded:t.loaded,total:t.total})})),n.onreadystatechange=function(){var t=n.responseText;if(4===n.readyState){var e=n.getResponseHeader("x-reqId")||"";if(0!==n.status)if(200===n.status)try{r({data:JSON.parse(t),reqId:e})}catch(h){o(h)}else{var i="xhr request failed, code: "+n.status;t&&(i+=" response: "+t);var c=void 0;try{c=JSON.parse(t)}catch(u){}o(new a(n.status,e,i,c))}else o(new s("network error.",e))}},n.send(e.body)}))}function W(t){if(t&&t.match){var e=t.match(/(^https?)/);if(!e)return"";var r=e[1];return e=t.match(/^https?:\/\/([^:^/]*):(\d*)/),e?e[2]:"http"===r?"80":"443"}return""}function F(t){if(t&&t.match){var e=t.match(/^https?:\/\/([^:^/]*)/);return e?e[1]:""}return""}function Y(t){if(!t)throw new i(o.InvalidToken,"invalid token.");var e=t.split(":");if(1===e.length)throw new i(o.InvalidToken,"invalid token segments.");var r=e.length>3?e[1]:e[0];if(!r)throw new i(o.InvalidToken,"missing assess key field.");var n=null;try{n=JSON.parse(y(e[e.length-1]))}catch(s){throw new i(o.InvalidToken,"token parse failed.")}if(null==n)throw new i(o.InvalidToken,"putPolicy is null.");if(null==n.scope)throw new i(o.InvalidToken,"scope field is null.");var a=n.scope.split(":")[0];if(!a)throw new i(o.InvalidToken,"resolve bucketName failed.");return{assessKey:r,bucketName:a,scope:n.scope}}function X(t){var e=window.URL||window.webkitURL||window.mozURL;return e.createObjectURL(t)}var D={z0:"z0",z1:"z1",z2:"z2",na0:"na0",as0:"as0",cnEast2:"cn-east-2"},q=(w={},w[D.z0]={srcUphost:["up.qiniup.com"],cdnUphost:["upload.qiniup.com"]},w[D.z1]={srcUphost:["up-z1.qiniup.com"],cdnUphost:["upload-z1.qiniup.com"]},w[D.z2]={srcUphost:["up-z2.qiniup.com"],cdnUphost:["upload-z2.qiniup.com"]},w[D.na0]={srcUphost:["up-na0.qiniup.com"],cdnUphost:["upload-na0.qiniup.com"]},w[D.as0]={srcUphost:["up-as0.qiniup.com"],cdnUphost:["upload-as0.qiniup.com"]},w[D.cnEast2]={srcUphost:["up-cn-east-2.qiniup.com"],cdnUphost:["upload-cn-east-2.qiniup.com"]},r("5ee4")),$=function(){return $=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},$.apply(this,arguments)},V=function(t,e,r,o){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(e){i(e)}}function s(t){try{c(o["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):n(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))},G=function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,o&&(n=2&i[0]?o["return"]:i[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}};function J(t,e,r){return V(this,void 0,void 0,(function(){var o,n;return G(this,(function(i){return o=Object(q["stringify"])({ak:t,bucket:e}),n=r+"://api.qiniu.com/v2/query?"+o,[2,z(n,{method:"GET"})]}))}))}function K(t,e,r){var o=r.url,n=r.id;return o+"/buckets/"+t+"/objects/"+(null!=e?m(e):"~")+"/uploads/"+n}function Q(t,e,r,o){var n=o+"/buckets/"+e+"/objects/"+(null!=r?m(r):"~")+"/uploads";return z(n,{method:"POST",headers:P(t)})}function Z(t,e,r,o,n){var i=Y(t).bucketName,a=K(i,e,o)+"/"+r;return z(a,$($({},n),{method:"PUT",headers:R(t)}))}function tt(t,e,r,o){var n=Y(t).bucketName,i=K(n,e,r);return z(i,$($({},o),{method:"POST",headers:U(t)}))}function et(t,e,r){return z(t,$({method:"POST",body:e},r))}var rt=function(){return rt=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},rt.apply(this,arguments)},ot=function(t,e,r,o){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(e){i(e)}}function s(t){try{c(o["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):n(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))},nt=function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,o&&(n=2&i[0]?o["return"]:i[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},it=function(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,n,i=r.call(t),a=[];try{while((void 0===e||e-- >0)&&!(o=i.next()).done)a.push(o.value)}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(n)throw n.error}}return a},at=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(it(arguments[e]));return t},st=[0,502,503,504,599],ct=at(st,[612]),ht=Math.pow(1024,3),ut=function(){function t(t,e,r,o){this.hostPool=r,this.logger=o,this.aborted=!1,this.retryCount=0,this.xhrList=[],this.config=t.config,o.info("config inited.",this.config),this.putExtra=rt({fname:""},t.putExtra),o.info("putExtra inited.",this.putExtra),this.key=t.key,this.file=t.file,this.token=t.token,this.onData=e.onData,this.onError=e.onError,this.onComplete=e.onComplete;try{var n=Y(this.token);this.bucketName=n.bucketName,this.assessKey=n.assessKey}catch(i){o.error("get putPolicy from token failed.",i),this.onError(i)}}return t.prototype.checkAndUpdateUploadHost=function(){return ot(this,void 0,void 0,(function(){var t;return nt(this,(function(e){switch(e.label){case 0:return this.logger.info("get available upload host."),[4,this.hostPool.getUp(this.assessKey,this.bucketName,this.config.upprotocol)];case 1:if(t=e.sent(),null==t)throw new i(o.NotAvailableUploadHost,"no available upload host.");return null!=this.uploadHost&&this.uploadHost.host!==t.host?this.logger.warn("host switches from "+this.uploadHost.host+" to "+t.host+"."):this.logger.info("use host "+t.host+"."),this.uploadHost=t,[2]}}))}))},t.prototype.checkAndUnfreezeHost=function(){this.logger.info("check unfreeze host."),null!=this.uploadHost&&this.uploadHost.isFrozen()&&(this.logger.warn(this.uploadHost.host+" will be unfrozen."),this.uploadHost.unfreeze())},t.prototype.checkAndFreezeHost=function(t){this.logger.info("check freeze host."),t instanceof a&&null!=this.uploadHost&&st.includes(t.code)&&(this.logger.warn(this.uploadHost.host+" will be temporarily frozen."),this.uploadHost.freeze())},t.prototype.handleError=function(t){this.logger.error(t.message),this.onError(t)},t.prototype.putFile=function(){return ot(this,void 0,void 0,(function(){var t,e,r,n,s,c;return nt(this,(function(h){switch(h.label){case 0:if(this.aborted=!1,this.putExtra.fname||(this.logger.info("use file.name as fname."),this.putExtra.fname=this.file.name),this.file.size>1e4*ht)return this.handleError(new i(o.InvalidFile,"file size exceed maximum value 10000G")),[2];if(this.putExtra.customVars&&!T(this.putExtra.customVars))return this.handleError(new i(o.InvalidCustomVars,"customVars key should start width x:")),[2];if(this.putExtra.metadata&&!k(this.putExtra.metadata))return this.handleError(new i(o.InvalidMetadata,"metadata key should start with x-qn-meta-")),[2];h.label=1;case 1:return h.trys.push([1,4,,5]),this.uploadAt=(new Date).getTime(),[4,this.checkAndUpdateUploadHost()];case 2:return h.sent(),[4,this.run()];case 3:return t=h.sent(),this.onComplete(t.data),this.checkAndUnfreezeHost(),this.sendLog(t.reqId,200),[2];case 4:return e=h.sent(),this.logger.error(e),this.clear(),e instanceof a&&(r=this.aborted?"":e.reqId,n=this.aborted?-2:e.code,this.sendLog(r,n),this.checkAndFreezeHost(e),s=++this.retryCount<=this.config.retryCount,c=!this.aborted&&ct.includes(e.code),c&&s)?(this.logger.warn("error auto retry: "+this.retryCount+"/"+this.config.retryCount+"."),this.putFile(),[2]):(this.onError(e),[3,5]);case 5:return[2]}}))}))},t.prototype.clear=function(){this.logger.info("start cleaning all xhr."),this.xhrList.forEach((function(t){t.onreadystatechange=null,t.abort()})),this.logger.info("cleanup completed."),this.xhrList=[]},t.prototype.stop=function(){this.logger.info("stop."),this.clear(),this.aborted=!0},t.prototype.addXhr=function(t){this.xhrList.push(t)},t.prototype.sendLog=function(t,e){var r,o;this.logger.report({code:e,reqId:t,remoteIp:"",upType:"jssdk-h5",size:this.file.size,time:Math.floor(this.uploadAt/1e3),port:W(null===(r=this.uploadHost)||void 0===r?void 0:r.getUrl()),host:F(null===(o=this.uploadHost)||void 0===o?void 0:o.getUrl()),bytesSent:this.progress?this.progress.total.loaded:0,duration:Math.floor(((new Date).getTime()-this.uploadAt)/1e3)})},t.prototype.getProgressInfoItem=function(t,e,r){return rt({size:e,loaded:t,percent:t/e*100},null==r?{}:{fromCache:r})},t}(),lt=ut,ft=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),pt=function(){return pt=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},pt.apply(this,arguments)},dt=function(t,e,r,o){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(e){i(e)}}function s(t){try{c(o["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):n(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))},gt=function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,o&&(n=2&i[0]?o["return"]:i[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}};function vt(t){var e=/^[1-9]\d*$/;return e.test(String(t))}(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ft(e,t),e.prototype.run=function(){return dt(this,void 0,void 0,(function(){var t,e,r,n,s,h=this;return gt(this,(function(u){switch(u.label){case 0:if(this.logger.info("start run Resume."),!this.config.chunkSize||!vt(this.config.chunkSize))throw new i(o.InvalidChunkSize,"chunkSize must be a positive integer");if(this.config.chunkSize>1024)throw new i(o.InvalidChunkSize,"chunkSize maximum value is 1024");return[4,this.initBeforeUploadChunks()];case 1:u.sent(),t=new c((function(t){return h.uploadChunk(t)}),this.config.concurrentRequestLimit),e=null,r=this.getLocalKey(),n=this.chunks.map((function(e,r){return t.enqueue({chunk:e,index:r})})),u.label=2;case 2:return u.trys.push([2,5,,6]),[4,Promise.all(n)];case 3:return u.sent(),[4,this.mkFileReq()];case 4:return e=u.sent(),[3,6];case 5:throw s=u.sent(),s instanceof a&&(612===s.code||400===s.code)&&E(r,this.logger),s;case 6:return E(r,this.logger),[2,e]}}))}))},e.prototype.uploadChunk=function(t){return dt(this,void 0,void 0,(function(){var e,r,o,n,i,a,s,c,h,u=this;return gt(this,(function(l){switch(l.label){case 0:return e=t.index,r=t.chunk,o=this.cachedUploadedList[e],this.logger.info("upload part "+e+", cache:",o),n=this.config.checkByMD5,i=function(){u.usedCacheList[e]=!0,u.updateChunkProgress(r.size,e),u.uploadedList[e]=o,u.updateLocalCache()},o&&!n?(i(),[2]):[4,j(r)];case 1:return a=l.sent(),this.logger.info("computed part md5.",a),o&&a===o.md5?(i(),[2]):(this.usedCacheList[e]=!1,s=function(t){u.updateChunkProgress(t.loaded,e)},c={body:r,onProgress:s,onCreate:function(t){return u.addXhr(t)}},this.logger.info("part "+e+" start uploading."),[4,Z(this.token,this.key,t.index+1,this.getUploadInfo(),c)]);case 2:return h=l.sent(),this.logger.info("part "+e+" upload completed."),s({loaded:r.size,total:r.size}),this.uploadedList[e]={etag:h.data.etag,md5:h.data.md5,size:r.size},this.updateLocalCache(),[2]}}))}))},e.prototype.mkFileReq=function(){return dt(this,void 0,void 0,(function(){var t,e,r=this;return gt(this,(function(o){switch(o.label){case 0:return t=pt(pt(pt({parts:this.uploadedList.map((function(t,e){return{etag:t.etag,partNumber:e+1}})),fname:this.putExtra.fname},this.putExtra.mimeType&&{mimeType:this.putExtra.mimeType}),this.putExtra.customVars&&{customVars:this.putExtra.customVars}),this.putExtra.metadata&&{metadata:this.putExtra.metadata}),this.logger.info("parts upload completed, make file.",t),[4,tt(this.token,this.key,this.getUploadInfo(),{onCreate:function(t){return r.addXhr(t)},body:JSON.stringify(t)})];case 1:return e=o.sent(),this.logger.info("finish Resume Progress."),this.updateMkFileProgress(1),[2,e]}}))}))},e.prototype.initBeforeUploadChunks=function(){return dt(this,void 0,void 0,(function(){var t,e,r;return gt(this,(function(o){switch(o.label){case 0:return this.uploadedList=[],this.usedCacheList=[],t=L(this.getLocalKey(),this.logger),t?[3,2]:(this.logger.info("init upload parts from api."),[4,Q(this.token,this.bucketName,this.key,this.uploadHost.getUrl())]);case 1:return e=o.sent(),this.logger.info("initd upload parts of id: "+e.data.uploadId+"."),this.uploadId=e.data.uploadId,this.cachedUploadedList=[],[3,3];case 2:r=["resume upload parts from local cache,","total "+t.data.length+" part,","id is "+t.id+"."],this.logger.info(r.join(" ")),this.cachedUploadedList=t.data,this.uploadId=t.id,o.label=3;case 3:return this.chunks=O(this.file,this.config.chunkSize),this.loaded={mkFileProgress:0,chunks:this.chunks.map((function(t){return 0}))},this.notifyResumeProgress(),[2]}}))}))},e.prototype.getUploadInfo=function(){return{id:this.uploadId,url:this.uploadHost.getUrl()}},e.prototype.getLocalKey=function(){return M(this.file.name,this.key,this.file.size)},e.prototype.updateLocalCache=function(){_(this.getLocalKey(),{id:this.uploadId,data:this.uploadedList},this.logger)},e.prototype.updateChunkProgress=function(t,e){this.loaded.chunks[e]=t,this.notifyResumeProgress()},e.prototype.updateMkFileProgress=function(t){this.loaded.mkFileProgress=t,this.notifyResumeProgress()},e.prototype.notifyResumeProgress=function(){var t=this;this.progress={total:this.getProgressInfoItem(S(this.loaded.chunks)+this.loaded.mkFileProgress,this.file.size+1),chunks:this.chunks.map((function(e,r){var o=t.usedCacheList[r];return t.getProgressInfoItem(t.loaded.chunks[r],e.size,o)})),uploadInfo:{id:this.uploadId,url:this.uploadHost.getUrl()}},this.onData(this.progress)}})(lt);var mt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),yt=function(t,e,r,o){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(e){i(e)}}function s(t){try{c(o["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):n(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))},wt=function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,o&&(n=2&i[0]?o["return"]:i[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}};(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}mt(e,t),e.prototype.run=function(){return yt(this,void 0,void 0,(function(){var t,e,r,o=this;return wt(this,(function(n){switch(n.label){case 0:return this.logger.info("start run Direct."),t=new FormData,t.append("file",this.file),t.append("token",this.token),null!=this.key&&t.append("key",this.key),t.append("fname",this.putExtra.fname),this.putExtra.customVars&&(this.logger.info("init customVars."),e=this.putExtra.customVars,Object.keys(e).forEach((function(r){return t.append(r,e[r].toString())})),this.logger.info("customVars inited.")),this.logger.info("formData inited."),[4,et(this.uploadHost.getUrl(),t,{onProgress:function(t){o.updateDirectProgress(t.loaded,t.total)},onCreate:function(t){return o.addXhr(t)}})];case 1:return r=n.sent(),this.logger.info("Direct progress finish."),this.finishDirectProgress(),[2,r]}}))}))},e.prototype.updateDirectProgress=function(t,e){this.progress={total:this.getProgressInfoItem(t,e+1)},this.onData(this.progress)},e.prototype.finishDirectProgress=function(){if(!this.progress)return this.logger.warn("progress is null."),this.progress={total:this.getProgressInfoItem(this.file.size,this.file.size)},void this.onData(this.progress);var t=this.progress.total;this.progress={total:this.getProgressInfoItem(t.loaded+1,t.size)},this.onData(this.progress)}})(lt);function xt(t,e,r){void 0===r&&(r=3);var o=H();o.open("POST","https://uplog.qbox.me/log/3"),o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.setRequestHeader("Authorization",P(t).Authorization),o.onreadystatechange=function(){4===o.readyState&&200!==o.status&&r>0&&xt(t,e,r-1)};var n=[e.code||"",e.reqId||"",e.host||"",e.remoteIp||"",e.port||"",e.duration||"",e.time||"",e.bytesSent||"",e.upType||"",e.size||""].join(",");o.send(n)}var bt=function(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,n,i=r.call(t),a=[];try{while((void 0===e||e-- >0)&&!(o=i.next()).done)a.push(o.value)}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(n)throw n.error}}return a},Ct=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(bt(arguments[e]));return t},It=(function(){function t(e,r,o,n){void 0===r&&(r=!0),void 0===o&&(o="OFF"),void 0===n&&(n="UPLOAD"),this.token=e,this.disableReport=r,this.level=o,this.prefix=n,this.id=++t.id}t.prototype.getPrintPrefix=function(t){return"Qiniu-JS-SDK ["+t+"]["+this.prefix+"#"+this.id+"]:"},t.prototype.report=function(t,e){if(!this.disableReport)try{xt(this.token,t,e)}catch(r){this.warn(r)}},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=["INFO"];r.includes(this.level)&&console.log.apply(console,Ct([this.getPrintPrefix("INFO")],t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=["INFO","WARN"];r.includes(this.level)&&console.warn.apply(console,Ct([this.getPrintPrefix("WARN")],t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=["INFO","WARN","ERROR"];r.includes(this.level)&&console.error.apply(console,Ct([this.getPrintPrefix("ERROR")],t))},t.id=0}(),function(t,e,r,o){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(e){i(e)}}function s(t){try{c(o["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):n(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))}),Bt=function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,o&&(n=2&i[0]?o["return"]:i[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},At=function(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,n,i=r.call(t),a=[];try{while((void 0===e||e-- >0)&&!(o=i.next()).done)a.push(o.value)}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(n)throw n.error}}return a},Ot=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(At(arguments[e]));return t},kt=new Map,Tt=function(){function t(t,e){this.host=t,this.protocol=e}return t.prototype.isFrozen=function(){var t=(new Date).getTime(),e=kt.get(this.host);return null!=e&&e>=t},t.prototype.freeze=function(t){void 0===t&&(t=20);var e=(new Date).getTime()+1e3*t;kt.set(this.host,e)},t.prototype.unfreeze=function(){kt["delete"](this.host)},t.prototype.getUrl=function(){return this.protocol+"://"+this.host},t.prototype.getUnfreezeTime=function(){return kt.get(this.host)},t}();(function(){function t(t){void 0===t&&(t=[]),this.initHosts=t,this.cachedHostsMap=new Map}t.prototype.register=function(t,e,r,o){this.cachedHostsMap.set(t+"@"+e,r.map((function(t){return new Tt(t,o)})))},t.prototype.refresh=function(t,e,r){var o,n,i,a;return It(this,void 0,void 0,(function(){var s,c,h;return Bt(this,(function(u){switch(u.label){case 0:return s=this.cachedHostsMap.get(t+"@"+e)||[],s.length>0?[2]:this.initHosts.length>0?(this.register(t,e,this.initHosts,r),[2]):[4,J(t,e,r)];case 1:return c=u.sent(),null!=(null===c||void 0===c?void 0:c.data)&&(h=Ot((null===(n=null===(o=c.data.up)||void 0===o?void 0:o.acc)||void 0===n?void 0:n.main)||[],(null===(a=null===(i=c.data.up)||void 0===i?void 0:i.acc)||void 0===a?void 0:a.backup)||[]),this.register(t,e,h,r)),[2]}}))}))},t.prototype.getUp=function(t,e,r){return It(this,void 0,void 0,(function(){var o,n,i;return Bt(this,(function(a){switch(a.label){case 0:return[4,this.refresh(t,e,r)];case 1:return a.sent(),o=this.cachedHostsMap.get(t+"@"+e)||[],0===o.length?[2,null]:(n=o.filter((function(t){return!t.isFrozen()})),n.length>0?[2,n[0]]:(i=o.slice().sort((function(t,e){return(t.getUnfreezeTime()||0)-(e.getUnfreezeTime()||0)})),[2,i[0]]))}}))}))}})();var St=function(){return St=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},St.apply(this,arguments)},_t=function(t,e,r,o){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(e){i(e)}}function s(t){try{c(o["throw"](t))}catch(e){i(e)}}function c(t){t.done?r(t.value):n(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))},Mt=function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return c([t,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,o&&(n=2&i[0]?o["return"]:i[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},Et={PNG:"image/png",JPEG:"image/jpeg",WEBP:"image/webp",BMP:"image/bmp"},Lt=4,Pt=Math.log(2),Rt=Object.keys(Et).map((function(t){return Et[t]})),Ut=Et.JPEG;function Ht(t){return Rt.includes(t)}(function(){function t(t,e){this.file=t,this.config=e,this.config=St({quality:.92,noCompressIfLarger:!1},this.config)}t.prototype.process=function(){return _t(this,void 0,void 0,(function(){var t,e,r,n,a,s;return Mt(this,(function(c){switch(c.label){case 0:if(this.outputType=this.file.type,t={},!Ht(this.file.type))throw new i(o.UnsupportedFileType,"unsupported file type: "+this.file.type);return[4,this.getOriginImage()];case 1:return e=c.sent(),[4,this.getCanvas(e)];case 2:return r=c.sent(),n=1,this.config.maxWidth&&(n=Math.min(1,this.config.maxWidth/r.width)),this.config.maxHeight&&(n=Math.min(1,n,this.config.maxHeight/r.height)),t.width=r.width,t.height=r.height,[4,this.doScale(r,n)];case 3:return a=c.sent(),s=this.toBlob(a),s.size>this.file.size&&this.config.noCompressIfLarger?[2,{dist:this.file,width:t.width,height:t.height}]:[2,{dist:s,width:a.width,height:a.height}]}}))}))},t.prototype.clear=function(t,e,r){this.outputType===Ut?(t.fillStyle="#fff",t.fillRect(0,0,e,r)):t.clearRect(0,0,e,r)},t.prototype.getOriginImage=function(){var t=this;return new Promise((function(e,r){var o=X(t.file),n=new Image;n.onload=function(){e(n)},n.onerror=function(){r("image load error")},n.src=o}))},t.prototype.getCanvas=function(t){var e=this;return new Promise((function(r,n){var a=document.createElement("canvas"),s=a.getContext("2d");if(s){var c=t.width,h=t.height;a.height=h,a.width=c,e.clear(s,c,h),s.drawImage(t,0,0),r(a)}else n(new i(o.GetCanvasContextFailed,"context is null"))}))},t.prototype.doScale=function(t,e){return _t(this,void 0,void 0,(function(){var r,n,a,s,c,h,u,l,f,p,d,g,v,m,y,w;return Mt(this,(function(x){if(1===e)return[2,t];if(r=t.getContext("2d"),n=Math.min(Lt,Math.ceil(1/e/Pt)),a=Math.pow(e,1/n),s=document.createElement("canvas"),c=s.getContext("2d"),h=t.width,u=t.height,l=h,f=u,s.width=h,s.height=u,!c||!r)throw new i(o.GetCanvasContextFailed,"mctx or sctx can't be null");for(g=0;g<n;g++)v=h*a|0,m=u*a|0,g===n-1&&(v=l*e,m=f*e),g%2===0?(p=t,d=c):(p=s,d=r),this.clear(d,h,u),d.drawImage(p,0,0,h,u,0,0,v,m),h=v,u=m;return y=p===t?s:t,w=d.getImageData(0,0,h,u),y.width=h,y.height=u,d.putImageData(w,0,0),[2,y]}))}))},t.prototype.toBlob=function(t){var e=t.toDataURL(this.outputType,this.config.quality),r=atob(e.split(",")[1]).split("").map((function(t){return t.charCodeAt(0)})),o=new Blob([new Uint8Array(r)],{type:this.outputType});return o}})()},"0e90":function(t,e,r){"use strict";var o=r("9740"),n=r("f00c").right,i=o.aTypedArray,a=o.exportTypedArrayMethod;a("reduceRight",(function(t){return n(i(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},"112a":function(t,e,r){var o=r("ff42"),n=r("63ec");t.exports=function(t){if(void 0===t)return 0;var e=o(t),r=n(e);if(e!==r)throw RangeError("Wrong length or index");return r}},"137f":function(t,e){t.exports="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView},"15d3":function(t,e,r){"use strict";var o=r("9740"),n=r("c5b6"),i=o.aTypedArray,a=o.exportTypedArrayMethod;a("lastIndexOf",(function(t){return n.apply(i(this),arguments)}))},"18bb":function(t,e,r){var o=r("0294");t.exports=o},1933:function(t,e,r){var o=r("51ce");t.exports=function(t,e){var r=o(t);if(r%e)throw RangeError("Wrong offset");return r}},"1be0":function(t,e,r){"use strict";var o=r("99b2"),n=r("1306"),i=r("c16d"),a=r("f501"),s=r("63ec"),c=r("a787"),h=r("553e");t.exports=function(t){var e,r,u,l,f,p,d=n(t),g="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,y=void 0!==m,w=h(d),x=0;if(y&&(m=o(m,v>2?arguments[2]:void 0,2)),void 0==w||g==Array&&a(w))for(e=s(d.length),r=new g(e);e>x;x++)p=y?m(d[x],x):d[x],c(r,x,p);else for(l=w.call(d),f=l.next,r=new g;!(u=f.call(l)).done;x++)p=y?i(l,m,[u.value,x],!0):u.value,c(r,x,p);return r.length=x,r}},"1cfb":function(t,e,r){var o=r("0294"),n=r("bde6"),i=r("73da"),a=r("9740").NATIVE_ARRAY_BUFFER_VIEWS,s=o.ArrayBuffer,c=o.Int8Array;t.exports=!a||!n((function(){c(1)}))||!n((function(){new c(-1)}))||!i((function(t){new c,new c(null),new c(1.5),new c(t)}),!0)||n((function(){return 1!==new c(new s(2),1,void 0).length}))},"1dab":function(t,e,r){var o=r("1de2"),n=r("e4e4"),i=r("70d4"),a=i("match");t.exports=function(t){var e;return o(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==n(t))}},"2aca":function(t,e,r){"use strict";var o=r("0294"),n=r("9740"),i=r("2c44"),a=r("70d4"),s=a("iterator"),c=o.Uint8Array,h=i.values,u=i.keys,l=i.entries,f=n.aTypedArray,p=n.exportTypedArrayMethod,d=c&&c.prototype[s],g=!!d&&("values"==d.name||void 0==d.name),v=function(){return h.call(f(this))};p("entries",(function(){return l.call(f(this))})),p("keys",(function(){return u.call(f(this))})),p("values",v,!g),p(s,v,!g)},"2b4f":function(t,e,r){"use strict";var o=r("9740"),n=r("c69f"),i=r("bde6"),a=o.aTypedArray,s=o.exportTypedArrayMethod,c=[].slice,h=i((function(){new Int8Array(1).slice()}));s("slice",(function(t,e){var r=c.call(a(this),t,e),o=n(this),i=0,s=r.length,h=new o(s);while(s>i)h[i]=r[i++];return h}),h)},"2bb8":function(t,e,r){"use strict";var o=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,s){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"===typeof t?i(a(t),(function(a){var s=encodeURIComponent(o(a))+r;return n(t[a])?i(t[a],(function(t){return s+encodeURIComponent(o(t))})).join(e):s+encodeURIComponent(o(t[a]))})).join(e):s?encodeURIComponent(o(s))+r+encodeURIComponent(o(t)):""};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var r=[],o=0;o<t.length;o++)r.push(e(t[o],o));return r}var a=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},"2bd2":function(t,e,r){var o=r("02ba"),n=r("40ac").f,i=Function.prototype,a=i.toString,s=/^\s*function ([^ (]*)/,c="name";o&&!(c in i)&&n(i,c,{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(t){return""}}})},"2cc9":function(t,e,r){var o=r("5e11"),n=r("0bdd"),i=r("cb76"),a="["+i+"]",s=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),h=function(t){return function(e){var r=n(o(e));return 1&t&&(r=r.replace(s,"")),2&t&&(r=r.replace(c,"")),r}};t.exports={start:h(1),end:h(2),trim:h(3)}},3209:function(t,e,r){"use strict";var o=r("9740"),n=r("581d").findIndex,i=o.aTypedArray,a=o.exportTypedArrayMethod;a("findIndex",(function(t){return n(i(this),t,arguments.length>1?arguments[1]:void 0)}))},3303:function(t,e,r){"use strict";var o=r("9740"),n=r("581d").find,i=o.aTypedArray,a=o.exportTypedArrayMethod;a("find",(function(t){return n(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"34df":function(t,e,r){"use strict";var o=r("9740"),n=r("5dcf").indexOf,i=o.aTypedArray,a=o.exportTypedArrayMethod;a("indexOf",(function(t){return n(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"357a":function(t,e,r){"use strict";function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",(function(){return o}))},3752:function(t,e,r){var o=r("3949"),n=o.match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},"438f":function(t){t.exports=JSON.parse('{"name":"vue-img-cutter","version":"2.2.4","description":"A image crop plug-in for Vue,you can use it to rotate、zoom images and cut any size","author":"acccccccb <tabzhang@foxmail.com>","private":false,"scripts":{"dev":"webpack-dev-server --inline --progress --config build/webpack.dev.conf.js","start":"npm run dev","build":"node build/build.js","lint":"eslint --ext .js --ext .vue src/","lint:fix":"eslint --fix --ext .js --ext .vue src/"},"dependencies":{"vue":"^2.5.2"},"devDependencies":{"@vue/cli-plugin-eslint":"^4.5.13","@vue/eslint-config-standard":"^6.0.0","autoprefixer":"^7.1.2","babel-core":"^6.22.1","babel-eslint":"^10.1.0","babel-helper-vue-jsx-merge-props":"^2.0.3","babel-loader":"^7.1.1","babel-plugin-syntax-jsx":"^6.18.0","babel-plugin-transform-runtime":"^6.22.0","babel-plugin-transform-vue-jsx":"^3.5.0","babel-preset-env":"^1.3.2","babel-preset-stage-2":"^6.22.0","chalk":"^2.0.1","copy-webpack-plugin":"^4.0.1","css-loader":"^0.28.0","eslint":"^7.29.0","eslint-plugin-html":"^6.1.2","eslint-plugin-vue":"^7.11.1","extract-text-webpack-plugin":"^3.0.0","file-loader":"^1.1.4","friendly-errors-webpack-plugin":"^1.6.1","html-webpack-plugin":"^2.30.1","js-yaml":"^3.13.1","lodash":"^4.17.15","mem":"^6.0.0","mixin-deep":"^2.0.1","node-notifier":"^8.0.1","optimize-css-assets-webpack-plugin":"^3.2.0","ora":"^1.2.0","portfinder":"^1.0.13","postcss-import":"^11.0.0","postcss-loader":"^2.0.8","postcss-url":"^7.2.1","rimraf":"^2.6.0","semver":"^5.3.0","set-value":"^3.0.1","shelljs":"^0.7.6","uglifyjs-webpack-plugin":"^1.1.1","url-loader":"^0.5.8","vue-loader":"^13.3.0","vue-style-loader":"^3.0.1","vue-template-compiler":"^2.5.2","webpack":"^3.12.0","webpack-bundle-analyzer":"^3.3.2","webpack-dev-server":"^2.11.5","webpack-merge":"^4.1.0"},"engines":{"node":">= 6.0.0","npm":">= 3.0.0"},"browserslist":["> 1%","last 2 versions","not ie <= 8"],"main":"./src/index.js","repository":{"type":"git","url":"git+https://github.com/acccccccb/vue-img-cutter.git"},"keywords":["image","crop","cutter","vue","裁剪"],"license":"Apache2.0","bugs":{"url":"https://github.com/acccccccb/vue-img-cutter/issues"},"homepage":"https://ihtmlcss.com/demo/dist/#/croptool","__npminstall_done":"Tue Aug 10 2021 08:57:36 GMT+0800 (China Standard Time)","_from":"vue-img-cutter@2.2.4","_resolved":"https://registry.nlark.com/vue-img-cutter/download/vue-img-cutter-2.2.4.tgz"}')},"460e":function(t,e,r){var o=r("3fad"),n=r("bde6"),i=r("2295"),a=r("5d07").f,s=r("02ba"),c=n((function(){a(1)})),h=!s||c;o({target:"Object",stat:!0,forced:h,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},"4e6b":function(t,e,r){"use strict";var o=r("1306"),n=r("5e35"),i=r("63ec");t.exports=function(t){var e=o(this),r=i(e.length),a=arguments.length,s=n(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,h=void 0===c?r:n(c,r);while(h>s)e[s++]=t;return e}},"519a":function(t,e,r){"use strict";var o=r("9740"),n=r("581d").some,i=o.aTypedArray,a=o.exportTypedArrayMethod;a("some",(function(t){return n(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"51ce":function(t,e,r){var o=r("ff42");t.exports=function(t){var e=o(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},"51fe":function(t,e,r){"use strict";var o=r("3fad"),n=r("0294"),i=r("373e"),a=r("d689"),s=r("02ba"),c=r("c8f8"),h=r("bde6"),u=r("6cc4"),l=r("1432"),f=r("1de2"),p=r("be5d"),d=r("e9fe"),g=r("1306"),v=r("2295"),m=r("0890"),y=r("0bdd"),w=r("dcbd"),x=r("d69f"),b=r("aeed"),C=r("6876"),I=r("07c2"),B=r("b4d0"),A=r("5d07"),O=r("40ac"),k=r("2732"),T=r("3f48"),S=r("d03a"),_=r("0226"),M=r("0023"),E=r("c005"),L=r("4b2a"),P=r("70d4"),R=r("c6e3"),U=r("a2ee"),H=r("86de"),j=r("38e1"),N=r("581d").forEach,z=M("hidden"),W="Symbol",F="prototype",Y=P("toPrimitive"),X=j.set,D=j.getterFor(W),q=Object[F],$=n.Symbol,V=i("JSON","stringify"),G=A.f,J=O.f,K=I.f,Q=k.f,Z=_("symbols"),tt=_("op-symbols"),et=_("string-to-symbol-registry"),rt=_("symbol-to-string-registry"),ot=_("wks"),nt=n.QObject,it=!nt||!nt[F]||!nt[F].findChild,at=s&&h((function(){return 7!=x(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(t,e,r){var o=G(q,e);o&&delete q[e],J(t,e,r),o&&t!==q&&J(q,e,o)}:J,st=function(t,e){var r=Z[t]=x($[F]);return X(r,{type:W,tag:t,description:e}),s||(r.description=e),r},ct=function(t,e,r){t===q&&ct(tt,e,r),d(t);var o=m(e);return d(r),u(Z,o)?(r.enumerable?(u(t,z)&&t[z][o]&&(t[z][o]=!1),r=x(r,{enumerable:w(0,!1)})):(u(t,z)||J(t,z,w(1,{})),t[z][o]=!0),at(t,o,r)):J(t,o,r)},ht=function(t,e){d(t);var r=v(e),o=b(r).concat(dt(r));return N(o,(function(e){s&&!lt.call(r,e)||ct(t,e,r[e])})),t},ut=function(t,e){return void 0===e?x(t):ht(x(t),e)},lt=function(t){var e=m(t),r=Q.call(this,e);return!(this===q&&u(Z,e)&&!u(tt,e))&&(!(r||!u(this,e)||!u(Z,e)||u(this,z)&&this[z][e])||r)},ft=function(t,e){var r=v(t),o=m(e);if(r!==q||!u(Z,o)||u(tt,o)){var n=G(r,o);return!n||!u(Z,o)||u(r,z)&&r[z][o]||(n.enumerable=!0),n}},pt=function(t){var e=K(v(t)),r=[];return N(e,(function(t){u(Z,t)||u(E,t)||r.push(t)})),r},dt=function(t){var e=t===q,r=K(e?tt:v(t)),o=[];return N(r,(function(t){!u(Z,t)||e&&!u(q,t)||o.push(Z[t])})),o};if(c||($=function(){if(this instanceof $)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,e=L(t),r=function(t){this===q&&r.call(tt,t),u(this,z)&&u(this[z],e)&&(this[z][e]=!1),at(this,e,w(1,t))};return s&&it&&at(q,e,{configurable:!0,set:r}),st(e,t)},S($[F],"toString",(function(){return D(this).tag})),S($,"withoutSetter",(function(t){return st(L(t),t)})),k.f=lt,O.f=ct,A.f=ft,C.f=I.f=pt,B.f=dt,R.f=function(t){return st(P(t),t)},s&&(J($[F],"description",{configurable:!0,get:function(){return D(this).description}}),a||S(q,"propertyIsEnumerable",lt,{unsafe:!0}))),o({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:$}),N(b(ot),(function(t){U(t)})),o({target:W,stat:!0,forced:!c},{for:function(t){var e=y(t);if(u(et,e))return et[e];var r=$(e);return et[e]=r,rt[r]=e,r},keyFor:function(t){if(!p(t))throw TypeError(t+" is not a symbol");if(u(rt,t))return rt[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),o({target:"Object",stat:!0,forced:!c,sham:!s},{create:ut,defineProperty:ct,defineProperties:ht,getOwnPropertyDescriptor:ft}),o({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:pt,getOwnPropertySymbols:dt}),o({target:"Object",stat:!0,forced:h((function(){B.f(1)}))},{getOwnPropertySymbols:function(t){return B.f(g(t))}}),V){var gt=!c||h((function(){var t=$();return"[null]"!=V([t])||"{}"!=V({a:t})||"{}"!=V(Object(t))}));o({target:"JSON",stat:!0,forced:gt},{stringify:function(t,e,r){var o,n=[t],i=1;while(arguments.length>i)n.push(arguments[i++]);if(o=e,(f(e)||void 0!==t)&&!p(t))return l(e)||(e=function(t,e){if("function"==typeof o&&(e=o.call(this,t,e)),!p(e))return e}),n[1]=e,V.apply(null,n)}})}$[F][Y]||T($[F],Y,$[F].valueOf),H($,W),E[z]=!0},5416:function(t,e,r){"use strict";var o=r("9740"),n=o.aTypedArray,i=o.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){var t,e=this,r=n(e).length,o=a(r/2),i=0;while(i<o)t=e[i],e[i++]=e[--r],e[r]=t;return e}))},"54a0":function(t,e,r){"use strict";var o=r("3fad"),n=r("6499"),i=r("5e11"),a=r("0bdd"),s=r("cae8a");o({target:"String",proto:!0,forced:!s("includes")},{includes:function(t){return!!~a(i(this)).indexOf(a(n(t)),arguments.length>1?arguments[1]:void 0)}})},"588d":function(t,e,r){"use strict";var o=r("9740"),n=r("0294"),i=r("bde6"),a=r("6ff8"),s=r("63ec"),c=r("f30b"),h=r("3752"),u=r("b66d"),l=r("42ad"),f=r("9e09"),p=o.aTypedArray,d=o.exportTypedArrayMethod,g=n.Uint16Array,v=g&&g.prototype.sort,m=!!v&&!i((function(){var t=new g(2);t.sort(null),t.sort({})})),y=!!v&&!i((function(){if(l)return l<74;if(h)return h<67;if(u)return!0;if(f)return f<602;var t,e,r=new g(516),o=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,o[t]=t-2*e+3;for(r.sort((function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==o[t])return!0})),w=function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!==r?-1:e!==e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}};d("sort",(function(t){var e=this;if(void 0!==t&&a(t),y)return v.call(e,t);p(e);var r,o=s(e.length),n=Array(o);for(r=0;r<o;r++)n[r]=e[r];for(n=c(e,w(t)),r=0;r<o;r++)e[r]=n[r];return e}),!y||m)},"5ee4":function(t,e,r){"use strict";e.decode=e.parse=r("a2d3"),e.encode=e.stringify=r("2bb8")},"5f2f":function(t,e,r){var o=r("0294"),n=r("db26"),i=r("04d5"),a=r("3f48");for(var s in n){var c=o[s],h=c&&c.prototype;if(h&&h.forEach!==i)try{a(h,"forEach",i)}catch(u){h.forEach=i}}},"5f80":function(t,e,r){"use strict";var o=r("9740"),n=r("581d").filter,i=r("ee28"),a=o.aTypedArray,s=o.exportTypedArrayMethod;s("filter",(function(t){var e=n(a(this),t,arguments.length>1?arguments[1]:void 0);return i(this,e)}))},6251:function(t,e,r){"use strict";var o=r("9740"),n=r("4e6b"),i=o.aTypedArray,a=o.exportTypedArrayMethod;a("fill",(function(t){return n.apply(i(this),arguments)}))},"63a9":function(t,e,r){"use strict";var o=r("da50"),n=r("1dab"),i=r("e9fe"),a=r("5e11"),s=r("5ad2"),c=r("5f69"),h=r("63ec"),u=r("0bdd"),l=r("9af7"),f=r("c01f"),p=r("7e31"),d=r("bde6"),g=p.UNSUPPORTED_Y,v=[].push,m=Math.min,y=4294967295,w=!d((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));o("split",(function(t,e,r){var o;return o="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var o=u(a(this)),i=void 0===r?y:r>>>0;if(0===i)return[];if(void 0===t)return[o];if(!n(t))return e.call(o,t,i);var s,c,h,l=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,g=new RegExp(t.source,p+"g");while(s=f.call(g,o)){if(c=g.lastIndex,c>d&&(l.push(o.slice(d,s.index)),s.length>1&&s.index<o.length&&v.apply(l,s.slice(1)),h=s[0].length,d=c,l.length>=i))break;g.lastIndex===s.index&&g.lastIndex++}return d===o.length?!h&&g.test("")||l.push(""):l.push(o.slice(d)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var n=a(this),i=void 0==e?void 0:e[t];return void 0!==i?i.call(e,n,r):o.call(u(n),e,r)},function(t,n){var a=i(this),f=u(t),p=r(o,a,f,n,o!==e);if(p.done)return p.value;var d=s(a,RegExp),v=a.unicode,w=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(g?"g":"y"),x=new d(g?"^(?:"+a.source+")":a,w),b=void 0===n?y:n>>>0;if(0===b)return[];if(0===f.length)return null===l(x,f)?[f]:[];var C=0,I=0,B=[];while(I<f.length){x.lastIndex=g?0:I;var A,O=l(x,g?f.slice(I):f);if(null===O||(A=m(h(x.lastIndex+(g?I:0)),f.length))===C)I=c(f,I,v);else{if(B.push(f.slice(C,I)),B.length===b)return B;for(var k=1;k<=O.length-1;k++)if(B.push(O[k]),B.length===b)return B;I=C=A}}return B.push(f.slice(C)),B}]}),!w,g)},6499:function(t,e,r){var o=r("1dab");t.exports=function(t){if(o(t))throw TypeError("The method doesn't accept regular expressions");return t}},"6a9b":function(t,e,r){"use strict";var o=r("3fad"),n=r("581d").filter,i=r("336f"),a=i("filter");o({target:"Array",proto:!0,forced:!a},{filter:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},"6f5b":function(t,e,r){"use strict";var o=r("9740"),n=o.aTypedArray,i=o.exportTypedArrayMethod,a=[].join;i("join",(function(t){return a.apply(n(this),arguments)}))},"72a2":function(t,e,r){"use strict";r("08cb")},7706:function(t,e,r){"use strict";var o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[!0===t.showChooseBtn&&!0===t.isModal?r("div",{on:{click:t.handleOpen}},[t._t("openImgCutter"),t._t("open")],2):t._e(),t.$slots.openImgCutter||t.$slots.open||!0!==t.isModal?t._e():r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.handleOpen}},[t._v(" "+t._s(t.label)+" ")]),r("transition",{attrs:{name:"fade"}},[t.visible?r("div",{ref:"mask",class:!0===t.isModal?"mask vue-img-cutter":""},[t.visible?r("div",{class:!0===t.isModal?"dialogBoxModal":"dialogBox"},[r("transition",{attrs:{name:"fade","enter-class":"fade-in-enter","enter-active-class":"fade-in-active","leave-class":"fade-out-enter","leave-active-class":"fade-out-active"}},[r("div",{ref:"dialogMainModalRef",class:!0===t.isModal?"dialogMainModal":"dialogMain",style:"width:"+(!0===t.isModal?t.boxWidth+32:t.boxWidth)+"px"},[r("div",{staticClass:"toolMain"},[!0===t.isModal?r("div",{staticClass:"tool-title"},[t._v(" 图片裁剪 "),r("span",{staticClass:"closeIcon",on:{click:t.handleClose}},[t._v("×")])]):t._e(),r("div",{ref:"toolBox",staticClass:"toolBox",style:"height:"+t.boxHeight+"px;width:"+t.boxWidth+"px",on:{mousemove:t.controlBtnMouseMove,mouseup:t.controlBtnMouseUp,mouseleave:t.controlBtnMouseUp}},[r("div",{directives:[{name:"show",rawName:"v-show",value:!t.drawImg.img&&!0===t.showChooseBtn,expression:"!drawImg.img && showChooseBtn === true"}],staticClass:"tips"},[r("div",{staticClass:"btn btn-warning btn-xs",on:{click:t.chooseImg}},[t._v(" "+t._s(t.label)+" ")])]),1==t.tool?r("div",{directives:[{name:"show",rawName:"v-show",value:this.drawImg.img&&!0!==t.dropImg.active&&1==t.controlBox.disable&&1==t.toolBox.disable,expression:"\n this.drawImg.img &&\n dropImg.active !== true &&\n controlBox.disable == true &&\n toolBox.disable == true\n "}],staticClass:"dockMain",style:"background:"+this.toolBgc,on:{mouseenter:t.dropImgOff}},[t.rate?r("div",{staticClass:"dockBtn"},[t._t("ratio",(function(){return[t._v(" Ratio: ")]})),t._v(" "+t._s(t.rate)+" ")],2):t._e(),r("div",{staticClass:"dockBtn",on:{click:t.scaleReset}},[t._t("scaleReset",(function(){return[t._v(" Scale: ")]})),t._v(" "+t._s(t.drawImg.swidth>0?(t.drawImg.width/t.drawImg.swidth).toFixed(2):"-")+" ")],2),!1===t.originalGraph?r("div",{staticClass:"dockBtn",on:{click:function(e){return t.turnImg(-90)}}},[t._t("turnLeft",(function(){return[t._v(" ↳ ")]}))],2):t._e(),!1===t.originalGraph?r("div",{staticClass:"dockBtn",on:{click:function(e){return t.turnImg(90)}}},[t._t("turnRight",(function(){return[t._v(" ↲ ")]}))],2):t._e(),!1===t.originalGraph?r("div",{staticClass:"dockBtn",on:{click:function(e){return t.turnReset()}}},[t._t("reset",(function(){return[t._v(" ↻ ")]}))],2):t._e(),!1===t.originalGraph?r("div",{staticClass:"dockBtnScrollBar"},[r("div",{ref:"dockBtnScrollControl",staticClass:"scrollBarControl",style:"left:"+t.rotateControl.position+"px",on:{mousemove:t.scrollBarControlMove,mousedown:t.scrollBarControlOn,mouseleave:t.scrollBarControlOff,mouseup:t.scrollBarControlOff}}),1==t.rotateControl.active?r("div",{staticClass:"scrollBarText",style:"left:"+t.rotateControl.position+"px"},[t._v(" "+t._s(t.rotateImg.angle.toFixed(0)+"°")+" ")]):t._e()]):t._e(),!1===t.originalGraph?r("div",{staticClass:"dockBtn",on:{click:t.flipHorizontal}},[t._t("flipHorizontal",(function(){return[t._v(" ⇆ ")]}))],2):t._e(),!1===t.originalGraph?r("div",{staticClass:"dockBtn",on:{click:t.flipVertically}},[t._t("turnRight",(function(){return[t._v(" ⇅ ")]}))],2):t._e()]):t._e(),r("div",{directives:[{name:"show",rawName:"v-show",value:null!=t.drawImg.img,expression:"drawImg.img != null"}],ref:"toolBoxControl",staticClass:"toolBoxControl",on:{mousedown:t.toolBoxMouseDown,mouseup:t.toolBoxMouseUp,mousemove:t.toolBoxMouseMove,mouseleave:t.toolBoxMouseLeave}},[r("div",{staticClass:"toolBoxControlBox"},[r("div",{staticClass:"controlBox"},[r("div",{staticClass:"controlBoxInnerLine controlBoxInnerLineTop"}),r("div",{staticClass:"controlBoxInnerLine controlBoxInnerLineBottom"}),r("div",{staticClass:"controlBoxInnerLine controlBoxInnerLineLeft"}),r("div",{staticClass:"controlBoxInnerLine controlBoxInnerLineRight"}),!1===t.originalGraph?r("div",{staticClass:"selectArea"},[t._v(" 宽:"+t._s(t.toolBox.width)+" 高:"+t._s(t.toolBox.height)+" (x:"+t._s(t.toolBoxPosition.x)+",y:"+t._s(t.toolBoxPosition.y)+") ")]):t._e(),!0===t.originalGraph?r("div",{staticClass:"selectArea"},[t._v(" 宽:"+t._s((t.toolBox.width/(t.drawImg.width/t.drawImg.swidth)).toFixed(0))+" 高:"+t._s((t.toolBox.height/(t.drawImg.width/t.drawImg.swidth)).toFixed(0))+" (x:"+t._s(t.toolBoxPosition.x)+",y:"+t._s(t.toolBoxPosition.y)+") ")]):t._e(),!0===t.sizeChange?r("div",{staticClass:"leftUp controlBtn",attrs:{"data-name":"leftUp"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"leftUp")}}}):t._e(),!0===t.sizeChange?r("div",{staticClass:"leftDown controlBtn",attrs:{"data-name":"leftDown"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"leftDown")}}}):t._e(),!0===t.sizeChange?r("div",{staticClass:"rightUp controlBtn",attrs:{"data-name":"rightUp"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"rightUp")}}}):t._e(),!0===t.sizeChange?r("div",{staticClass:"rightDown controlBtn",attrs:{"data-name":"rightDown"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"rightDown")}}}):t._e(),!0===t.sizeChange&&!t.rate&&this.toolBox.width>20?r("div",{staticClass:"topCenter controlBtn",attrs:{"data-name":"topCenter"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"topCenter")}}}):t._e(),!0===t.sizeChange&&!t.rate&&this.toolBox.width>20?r("div",{staticClass:"downCenter controlBtn",attrs:{"data-name":"downCenter"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"downCenter")}}}):t._e(),!0===t.sizeChange&&!t.rate&&this.toolBox.height>20?r("div",{staticClass:"leftCenter controlBtn",attrs:{"data-name":"leftCenter"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"leftCenter")}}}):t._e(),!0===t.sizeChange&&!t.rate&&this.toolBox.height>20?r("div",{staticClass:"rightCenter controlBtn",attrs:{"data-name":"rightCenter"},on:{mousedown:function(e){return t.controlBtnMouseDown(e,"rightCenter")}}}):t._e()]),r("div",{staticClass:"toolBoxControlLine toolBoxControlLineItem-1"}),r("div",{staticClass:"toolBoxControlLine toolBoxControlLineItem-2"}),r("div",{staticClass:"toolBoxControlLine toolBoxControlLineItem-3"}),r("div",{staticClass:"toolBoxControlLine toolBoxControlLineItem-4"})])]),r("div",{staticClass:"copyright"},[t.DoNotDisplayCopyright?t._e():r("a",{attrs:{target:"_blank",href:"https://github.com/acccccccb/vue-img-cutter",rel:"nofollow"}},[t._v(" vue-img-cutter "+t._s(t.version)+" ")])]),r("canvas",{ref:"canvasSelectBox",staticClass:"canvasSelectBox",attrs:{width:t.boxWidth,height:t.boxHeight},on:{mousedown:t.dropImgOn,mouseup:t.dropImgOff,mousemove:t.dropImgMove}}),r("canvas",{ref:"canvas",staticClass:"canvas",attrs:{width:t.boxWidth,height:t.boxHeight}})])]),r("div",{staticClass:"i-dialog-footer"},[r("input",{ref:"inputFile",staticStyle:{width:"1px",height:"1px",border:"none",opacity:"0"},attrs:{type:"file",accept:"image/gif, image/jpeg ,image/png"},on:{change:t.putImgToCanv}}),r("span",{on:{click:t.chooseImg}},[t._t("choose",(function(){return[!0===t.showChooseBtn?r("div",{staticClass:"btn btn-primary btn-primary-plain"},[t._v(" "+t._s(t.label)+" ")]):t._e()]}))],2),r("div",{staticClass:"btn-group fr"},[r("span",{on:{click:t.handleClose}},[t._t("cancel",(function(){return[r("button",{staticClass:"btn btn-default",attrs:{type:"button"}},[t._v(" 取消 ")])]}))],2),r("span",{on:{click:function(e){return t.cropPicture(!1)}}},[t._t("confirm",(function(){return[r("button",{staticClass:"btn btn-primary",staticStyle:{"margin-left":"15px"},attrs:{type:"button",disabled:!t.drawImg.img}},[t._v(" 确定 ")])]}))],2)])])])]),r("div",{staticStyle:{clear:"both"}})],1):t._e()]):t._e()])],1)},n=[],i=(r("8c86"),r("51fe"),r("6a9b"),r("460e"),r("5f2f"),r("ed31"),r("357a"));function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){Object(i["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}r("da3f"),r("c505"),r("967c4"),r("7099"),r("0b69");function c(t){return c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}r("884f"),r("2bd2"),r("a717"),r("63a9"),r("afce"),r("a298"),r("d46e"),r("f393"),r("6251"),r("5f80"),r("3303"),r("3209"),r("8a1b"),r("06778"),r("34df"),r("2aca"),r("6f5b"),r("15d3"),r("ae78"),r("d444"),r("0e90"),r("5416"),r("cb0d"),r("2b4f"),r("519a"),r("588d"),r("f1a0"),r("8e9d"),r("9810");var h=r("438f"),u={name:"ImgCutter",props:{crossOrigin:{type:Boolean,default:!1,required:!1},crossOriginHeader:{type:String,default:"*",required:!1},label:{type:String,default:"选择图片",required:!1},isModal:{type:Boolean,default:!0,required:!1},lockScroll:{type:Boolean,default:!0,required:!1},showChooseBtn:{type:Boolean,default:!0,required:!1},boxWidth:{type:Number,default:800,required:!1},boxHeight:{type:Number,default:400,required:!1},cutWidth:{type:Number,default:200,required:!1},cutHeight:{type:Number,default:200,required:!1},rate:{type:String,default:null,required:!1},tool:{type:Boolean,default:!0,required:!1},toolBgc:{type:String,default:"#fff",required:!1},imgMove:{type:Boolean,default:!0,required:!1},sizeChange:{type:Boolean,default:!0,required:!1},originalGraph:{type:Boolean,default:!1,required:!1},moveAble:{type:Boolean,default:!0,required:!1},previewMode:{type:Boolean,default:!0,required:!1},CuttingOriginal:{type:Boolean,default:!1,required:!1},WatermarkText:{type:String,default:"",required:!1},WatermarkTextFont:{type:String,default:"12px Sans-serif",required:!1},WatermarkTextColor:{type:String,default:"#fff",required:!1},WatermarkTextX:{type:Number,default:.95,required:!1},WatermarkTextY:{type:Number,default:.95,required:!1},smallToUpload:{type:Boolean,default:!1,required:!1},saveCutPosition:{type:Boolean,default:!1,required:!1},scaleAble:{type:Boolean,default:!0,required:!1},index:{default:null,required:!1},fileType:{default:"png",required:!1,type:String},toolBoxOverflow:{type:Boolean,default:!0,required:!1},DoNotDisplayCopyright:{type:Boolean,default:!1,required:!1}},model:["label","boxWidth","boxHeight","rate","tool","DoNotDisplayCopyright"],data:function(){var t,e;return t=this.boxWidth/2,e=this.boxHeight/2,{version:"",visible:!1,fileName:"",cutImageObj:null,onPrintImgTimmer:null,toolBoxPosition:{x:0,y:0},drawImg:{img:null,sx:0,sy:0,swidth:0,sheight:0,x:0,y:0,width:0,height:0},toolBox:{disable:!0,width:t,height:e,x:0,y:0,boxMove:{start:{x:0,y:0},moveTo:{x:0,y:0}}},dropImg:{active:!1,pageX:0,pageY:0,params:{}},rotateImg:{angle:0},rotateControl:{active:!1,start:{x:0,y:0},position:100},scaleImg:{rate:0,params:{}},controlBox:{disable:!0,btnName:"",start:{x:0,y:0,width:0,height:0}},selectBox:!1,selectBoxColor:"rgba(0,0,0,0.6)",isFlipHorizontal:!1,isFlipVertically:!1}},mounted:function(){var t=this;this.version=h.version,!1===this.isModal&&(this.visible=!0,this.$nextTick((function(){t.$refs["toolBox"]&&(t.$refs["toolBox"].onmousewheel=t.scaleImgWheel,t.$refs["toolBox"].addEventListener("DOMMouseScroll",t.scaleImgWheel))})))},methods:{handleOpen:function(t){var e=this,r=function(t){if(e.$refs["toolBox"]&&(e.$refs["toolBox"].onmousewheel=e.scaleImgWheel,e.$refs["toolBox"].addEventListener("DOMMouseScroll",e.scaleImgWheel)),!0===e.isModal){!0===e.lockScroll&&(document.body.style.overflowY="hidden");var r=e.$refs["dialogMainModalRef"].offsetHeight+200,o=window.innerHeight,n=e.$refs["mask"];n.style.overflowY=r>o?"scroll":"hidden"}t&&"function"===typeof t&&t()};if(t&&"object"==c(t)&&t.src){if(!t.name)throw new Error("传入参数必须包含:src,name");var o=new Image;!0===this.crossOrigin&&(o.crossOrigin=this.crossOriginHeader),o.name=t.name,o.style.position="fixed",o.style.top=-5e3,o.style.opacity=0,o.onerror=function(t){console.error("图片加载失败"),e.$emit("error",{index:e.index,event:t,msg:"图片加载失败"}),e.clearCutImageObj()},o.onload=function(){if(!0!==o.complete)throw new Error("图片加载失败");e.visible=!0,e.$nextTick((function(){r((function(){e.importImgToCanv(o)}))}))},o.src=t.src,this.cutImageObj=o,document.body.appendChild(o),this.$emit("onChooseImg",t,this.index)}else this.visible=!0,this.$nextTick((function(){r()}))},handleClose:function(){var t=this;this.clearAll(),!0===this.isModal&&(!0===this.lockScroll&&(document.body.style.overflowY="scroll"),this.$nextTick((function(){t.visible=!1})))},chooseImg:function(){this.$refs["inputFile"].click()},importImgToCanv:function(t){var e,r=t.height,o=t.width,n=this.boxWidth,i=this.boxHeight,a=s({},this.drawImg);this.fileName=t.name,a.img=t,this.scaleImg.rate=o/r,r<i&&o<n?(e=1,a.x=(n-o)/2,a.y=(i-r)/2):o/r<=n/i?(e=i/r,a.x=(n-o*e)/2):(e=n/o,a.y=(i-r*e)/2),a.swidth=o,a.sheight=r,a.width=o*e,a.height=r*e,a.x=(n-a.width)/2,a.y=(i-a.height)/2,this.$set(this,"drawImg",a),this.printImg(),this.putToolBox()},putImgToCanv:function(t){var e,r=this;if(!t.target.files)return console.error("IE9及以下需要自己传入image对象"),!1;if(e=t.target.files[0]||null,e){this.fileName=e.name;var o=new FileReader;o.readAsDataURL(e),o.onload=function(t){var n=t.target.result,i=document.createElement("img");i.src=n;var a=setInterval((function(){if(2===o.readyState){if(clearInterval(a),!r.sizeChange&&r.smallToUpload&&i.width<=r.cutWidth&&i.height<=r.cutHeight)return r.handleClose(),e.name=r.changeFileName(e.name,r.fileType),void r.$emit("cutDown",{filename:r.changeFileName(e.name,r.fileType),file:e,index:r.index});var t,n=i.height,c=i.width,h=r.boxWidth,u=r.boxHeight,l=s({},r.drawImg);l.img=i,r.scaleImg.rate=c/n,n<u&&c<h?(t=1,l.x=(h-c)/2,l.y=(u-n)/2):c/n<=h/u?(t=u/n,l.x=(h-c*t)/2):(t=h/c,l.y=(u-n*t)/2),l.swidth=c,l.sheight=n,l.width=c*t,l.height=n*t,l.x=(h-l.width)/2,l.y=(u-l.height)/2,r.$set(r,"drawImg",l),r.printImg(),r.putToolBox()}}),200)},this.$emit("onChooseImg",e,this.index)}},putToolBox:function(){this.toolBoxOverflow?(this.toolBox.width!==this.boxWidth/2&&this.toolBox.height!==this.boxHeight/2&&!1!==this.saveCutPosition||(this.toolBox.width=this.cutWidth>this.boxWidth?this.boxWidth:this.cutWidth,this.toolBox.height=this.cutHeight>this.boxHeight?this.boxHeight:this.cutHeight),(0===this.toolBox.x&&0===this.toolBox.y||!1===this.saveCutPosition)&&(this.toolBox.x=this.boxWidth/2-this.toolBox.width/2,this.toolBox.y=this.boxHeight/2-this.toolBox.height/2)):(this.toolBox.x=this.drawImg.x,this.toolBox.y=this.drawImg.y,this.toolBox.width=this.drawImg.width,this.toolBox.height=this.drawImg.height),this.drawControlBox(this.toolBox.width,this.toolBox.height,this.toolBox.x,this.toolBox.y)},isSupportFileApi:function(){return!!(window.File&&window.FileList&&window.FileReader&&window.Blob&&-1===navigator.userAgent.indexOf("Edge")&&-1===navigator.userAgent.indexOf("MSIE")&&-1===navigator.userAgent.indexOf("Trident"))},dataURLtoFile:function(t,e){var r=t.split(","),o=r[0].match(/:(.*?);/)[1],n=atob(r[1]),i=n.length,a=new Uint8Array(i);while(i--)a[i]=n.charCodeAt(i);if(this.isSupportFileApi()){var s=new File([a],e,{type:o});return s}return"不支持File对象"},clearAll:function(){var t=this,e=t.$refs["canvas"],r=e.getContext("2d");r.clearRect(0,0,e.width,e.height);var o=t.$refs["canvasSelectBox"],n=o.getContext("2d");n.clearRect(0,0,o.width,o.height);var i=t.drawImg.sx,a=t.drawImg.sy;this.drawImg={img:null,sx:i,sy:a,swidth:0,sheight:0,x:0,y:0,width:0,height:0},this.isFlipHorizontal=!1,this.isFlipVertically=!1,this.$refs["inputFile"].value="",this.rotateImg.angle=0,this.drawImg.img=null,this.turnReset(),this.clearCutImageObj(),this.$emit("onClearAll",this.index)},clearCutImageObj:function(){null!==this.cutImageObj&&void 0!==this.cutImageObj&&("function"===typeof this.cutImageObj.remove?this.cutImageObj.remove():this.cutImageObj.removeNode()),this.cutImageObj=null},drawControlBox:function(t,e,r,o){var n=this;this.toolBoxOverflow?(t>this.boxWidth&&(t=this.boxWidth),e>this.boxHeight&&(e=this.boxHeight),r<0&&(r=0),o<0&&(o=0)):(t>this.drawImg.width&&(t=this.drawImg.width),e>this.drawImg.height&&(e=this.drawImg.height),r<this.drawImg.x&&(r=this.drawImg.x),o<this.drawImg.y&&(o=this.drawImg.y),r>this.drawImg.x+this.drawImg.width-t&&(r=this.drawImg.x+this.drawImg.width-t),o>this.drawImg.y+this.drawImg.height-e&&(o=this.drawImg.y+this.drawImg.height-e));var i,a,s=this.$refs["toolBoxControl"],c=this.$refs["canvasSelectBox"],h=c.getContext("2d");if(h.fillStyle=this.selectBoxColor,h.clearRect(0,0,c.width,c.height),h.fillRect(0,0,c.width,c.height),this.rate&&""!==this.rate){var u=this.rate.split(":")[0]/this.rate.split(":")[1];u>=1?(i=t,a=t/u):(i=e*u,a=e)}else i=t,a=e;this.toolBox.width=i,this.toolBox.height=a,s.style.width=Math.abs(i)+"px",s.style.height=Math.abs(a)+"px",this.toolBox.boxMove.moveTo.x=r,this.toolBox.boxMove.moveTo.y=o,i<0&&(r+=i),a<0&&(o+=a),r+this.toolBox.width>this.boxWidth&&(r=this.boxWidth-this.toolBox.width),r<0&&(r=0),o+this.toolBox.height>this.boxHeight&&(o=this.boxHeight-this.toolBox.height),o<0&&(o=0),this.toolBoxPosition.x=r,this.toolBoxPosition.y=o,s.style.left=r+"px",s.style.top=o+"px",h.clearRect(r,o,Math.abs(i),Math.abs(a)),this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout((function(){n.cropPicture(!0)}),100)},resetToolBox:function(){this.toolBox.width<0&&(this.toolBox.boxMove.moveTo.x=this.toolBox.x-this.toolBox.width),this.toolBox.height<0&&(this.toolBox.boxMove.moveTo.y=this.toolBox.y-this.toolBox.height),this.toolBox.width=Math.abs(this.toolBox.width),this.toolBox.height=Math.abs(this.toolBox.height)},toolBoxMouseDown:function(t){var e=this.$refs["toolBoxControl"];this.toolBox.x=parseInt(e.style.left.split("px")[0]),this.toolBox.y=parseInt(e.style.top.split("px")[0]),this.toolBox.disable=!1,this.dropImg.active=!1,this.toolBox.boxMove.start={x:t.pageX,y:t.pageY}},toolBoxMouseMove:function(t){if(this.dropImg.active&&this.dropImgMove(t),!1===this.toolBox.disable&&!0===this.moveAble){var e=t.pageX-this.toolBox.boxMove.start.x,r=t.pageY-this.toolBox.boxMove.start.y,o=this.toolBox.x+e,n=this.toolBox.y+r;this.drawControlBox(this.toolBox.width,this.toolBox.height,o,n)}},toolBoxMouseLeave:function(){var t=this;this.toolBox.disable=!0,this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout((function(){t.cropPicture(!0)}),100),this.resetToolBox()},toolBoxMouseUp:function(){this.toolBox.x=parseInt(this.toolBoxPosition.x),this.toolBox.y=parseInt(this.toolBoxPosition.y),this.toolBox.disable=!0,this.dropImg.active=!1,this.resetToolBox()},printImg:function(){var t=this;if(this.drawImg.img){var e=this.$refs["canvas"],r=e.getContext("2d");r.font="18px bold 黑体",r.fillStyle="#ff0",r.textAlign="center",r.textBaseline="middle",r.save(),r.clearRect(0,0,e.width,e.height),r.translate(this.drawImg.x+this.drawImg.width/2,this.drawImg.y+this.drawImg.height/2),r.rotate(this.rotateImg.angle*Math.PI/180),r.translate(-(this.drawImg.x+this.drawImg.width/2),-(this.drawImg.y+this.drawImg.height/2)),r.translate(this.drawImg.x,this.drawImg.y),r.scale(this.isFlipHorizontal?-1:1,this.isFlipVertically?-1:1),r.drawImage(this.drawImg.img,this.drawImg.sx,this.drawImg.sy,this.drawImg.swidth,this.drawImg.sheight,this.isFlipHorizontal?-this.drawImg.width:0,this.isFlipVertically?-this.drawImg.height:0,this.drawImg.width,this.drawImg.height),r.translate(-this.drawImg.x,this.drawImg.y),r.restore(),this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout((function(){t.cropPicture(!0)}),100)}},dropImgOn:function(t){!0===this.imgMove&&(this.dropImg.active=!0,this.dropImg.params=s({},this.drawImg),this.dropImg.pageX=t.pageX,this.dropImg.pageY=t.pageY)},dropImgOff:function(){var t=this;this.dropImg.active=!1,this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout((function(){t.cropPicture(!0)}),100)},dropImgMove:function(t){if(this.dropImg.active&&this.drawImg.img){var e=s({},this.drawImg);e.x=this.dropImg.params.x-(this.dropImg.pageX-t.pageX),e.y=this.dropImg.params.y-(this.dropImg.pageY-t.pageY),this.toolBoxOverflow||(e.x>this.toolBox.x&&(e.x=this.toolBox.x),e.x<this.toolBox.x+this.toolBox.width-e.width&&(e.x=this.toolBox.x+this.toolBox.width-e.width),e.y>this.toolBox.y&&(e.y=this.toolBox.y),e.y<this.toolBox.y+this.toolBox.height-e.height&&(e.y=this.toolBox.y+this.toolBox.height-e.height)),this.$set(this,"drawImg",e),this.printImg(),t.stopPropagation()}},scaleReset:function(){this.drawImg.width=this.drawImg.swidth,this.drawImg.height=this.drawImg.sheight,this.printImg()},scaleImgWheel:function(t){var e=this;if(this.drawImg.img&&!0===this.scaleAble){var r,o=t||window.event;if(o.wheelDelta?r=-o.wheelDelta/40:o.detail&&(r=o.detail),this.toolBoxOverflow){var n=50;this.drawImg.x=this.drawImg.width-9*r>n?this.drawImg.x+3*r:this.drawImg.x,this.drawImg.y=this.drawImg.width-9*r>n?this.drawImg.y+3*r:this.drawImg.y,this.drawImg.width=this.drawImg.width-9*r>n?this.drawImg.width-9*r:n,this.drawImg.height=this.drawImg.width/this.scaleImg.rate}else{var i=this.toolBox.width;this.drawImg.x=this.drawImg.width-9*r>i?this.drawImg.x+3*r:this.drawImg.x,this.drawImg.y=this.drawImg.width-9*r>i?this.drawImg.y+3*r:this.drawImg.y,(this.drawImg.x>this.toolBox.x||this.drawImg.x+this.drawImg.width<this.toolBox.x+this.toolBox.width||this.drawImg.width<=this.toolBox.width)&&(this.drawImg.x=this.toolBox.x),(this.drawImg.y>this.toolBox.y||this.drawImg.y+this.drawImg.height<this.toolBox.y+this.toolBox.height)&&(this.drawImg.y=this.toolBox.y),this.drawImg.width=this.drawImg.width-9*r>i?this.drawImg.width-9*r:i,this.drawImg.height=this.drawImg.width/this.scaleImg.rate}this.printImg(),this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout((function(){e.cropPicture(!0)}),100)}return t.preventDefault(),t.returnValue=!1,!1},flipHorizontal:function(){this.drawImg.img&&(0==this.isFlipHorizontal?this.isFlipHorizontal=!0:this.isFlipHorizontal=!1,this.printImg())},flipVertically:function(){this.drawImg.img&&(0==this.isFlipVertically?this.isFlipVertically=!0:this.isFlipVertically=!1,this.printImg())},turnImg:function(t){var e=this.rotateImg.angle,r=e+t;r>=-180&&r<=180&&(this.rotateImg.angle=r,this.rotateControl.position=r/180*100+100,this.printImg("rotate"))},turnReset:function(){this.rotateImg.angle=0,this.rotateControl.position=100,this.printImg("rotate")},controlBtnMouseDown:function(t,e){this.controlBox.disable=!1,this.controlBox.btnName=e,this.controlBox.start.x=t.clientX,this.controlBox.start.y=t.clientY,this.controlBox.start.width=this.toolBox.width,this.controlBox.start.height=this.toolBox.height,t.stopPropagation()},controlBtnMouseUp:function(t){this.controlBox.disable=!0,this.dropImgOff(),this.resetToolBox(),this.toolBoxMouseUp(),t.stopPropagation()},controlBtnMouseMove:function(t){if(!1===this.controlBox.disable){var e,r,o=t.clientX-this.controlBox.start.x,n=t.clientY-this.controlBox.start.y;if("leftUp"==this.controlBox.btnName){if(this.rate){var i=this.rate.split(":")[0]/this.rate.split(":")[1];i>=1?(e=this.toolBox.x+o,r=this.toolBox.y+o/i):(e=this.toolBox.x+n*i,r=this.toolBox.y+n)}else e=this.toolBox.x+o,r=this.toolBox.y+n;this.toolBox.width=this.controlBox.start.width-o,this.toolBox.height=this.controlBox.start.height-n}if("rightUp"==this.controlBox.btnName){if(this.rate){var a=this.rate.split(":")[0]/this.rate.split(":")[1];a>=1?(e=this.toolBox.x,r=this.toolBox.y-o/a):(e=this.toolBox.x,r=this.toolBox.y+n)}else e=this.toolBox.x,r=this.toolBox.y+n;this.toolBox.width=this.controlBox.start.width+o,this.toolBox.height=this.controlBox.start.height-n}if("rightDown"==this.controlBox.btnName&&(e=this.toolBox.x,r=this.toolBox.y,this.toolBox.width=this.controlBox.start.width+o,this.toolBox.height=this.controlBox.start.height+n),"leftDown"==this.controlBox.btnName){if(this.rate){var s=this.rate.split(":")[0]/this.rate.split(":")[1];s>=1?(e=this.toolBox.x+o,r=this.toolBox.y):(e=this.toolBox.x+-n*s,r=this.toolBox.y)}else e=this.toolBox.x+o,r=this.toolBox.y;this.toolBox.width=this.controlBox.start.width-o,this.toolBox.height=this.controlBox.start.height+n}"topCenter"==this.controlBox.btnName&&(e=this.toolBox.x,r=this.toolBox.y+n,this.toolBox.width=this.controlBox.start.width,this.toolBox.height=this.controlBox.start.height-n),"downCenter"==this.controlBox.btnName&&(e=this.toolBox.x,r=this.toolBox.y,this.toolBox.width=this.controlBox.start.width,this.toolBox.height=this.controlBox.start.height+n),"leftCenter"==this.controlBox.btnName&&(e=this.toolBox.x+o,r=this.toolBox.y,this.toolBox.width=this.controlBox.start.width-o,this.toolBox.height=this.controlBox.start.height),"rightCenter"==this.controlBox.btnName&&(e=this.toolBox.x,r=this.toolBox.y,this.toolBox.width=this.controlBox.start.width+o,this.toolBox.height=this.controlBox.start.height),this.drawControlBox(this.toolBox.width,this.toolBox.height,e,r)}t.stopPropagation()},changeFileName:function(t,e){var r=t.lastIndexOf(".");return t.substr(0,r+1)+("jpeg"===e?"jpg":e)},cropPicture:function(t){var e=this;if(this.drawImg.img){var r=this.$refs["canvas"];if(this.WatermarkText&&!t){var o=r.getContext("2d");o.font=this.WatermarkTextFont,o.fillStyle=this.WatermarkTextColor,o.textAlign="right",o.textBaseline="bottom",o.fillText(this.WatermarkText,this.toolBox.x+this.toolBox.width*this.WatermarkTextX,this.toolBox.y+this.toolBox.height*this.WatermarkTextY)}var n=new Image;!0===this.crossOrigin&&(n.crossOrigin=this.crossOriginHeader),n.src=r.toDataURL("image/".concat(this.fileType)),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(t,o,n){window.atob?setTimeout((function(){for(var i,a=atob(r.toDataURL(o,n).split(",")[1]),s=a.length,c=new Uint8Array(s),h=0;h<s;h++)c[h]=a.charCodeAt(h);try{i=new Blob([c],{type:"image/".concat(e.fileType)})}catch(f){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"==f.name&&window.BlobBuilder){var u=window.BlobBuilder,l=new u;l.append(c.buffer),i=l.getBlob("image/".concat(e.fileType))}"InvalidStateError"==f.name&&(i=new Blob([c.buffer],{type:"image/".concat(e.fileType)}))}t(i)}),200):t(!1,{type:"image/".concat(e.fileType)})}}),r.toBlob((function(r){if(r){var o=new FileReader;o.readAsDataURL(r),o.onload=function(){var r=setInterval((function(){if(2==o.readyState){clearInterval(r);var i=document.createElement("canvas"),a=i.getContext("2d");if(1==e.originalGraph){var s=e.drawImg.width/e.drawImg.swidth,c=e.toolBox.width/s,h=e.toolBox.height/s;i.width=c,i.height=h;var u=(e.toolBox.x-e.drawImg.x)/s,l=(e.toolBox.y-e.drawImg.y)/s,f=e.drawImg.swidth,p=e.drawImg.sheight;a.translate(-u,-l),a.drawImage(e.drawImg.img,0,0,f,p)}else{i.width=e.toolBox.width,i.height=e.toolBox.height;var d=e.toolBox;if(e.rate){var g=e.rate.split(":")[0]/e.rate.split(":")[1],v=e.rate.split(":")[0],m=e.rate.split(":")[1];v>=m?a.drawImage(n,d.x,d.y,d.width,d.width*g,0,0,d.width,d.width*g):a.drawImage(n,d.x,d.y,d.width,d.width/g,0,0,d.width,d.width/g)}else a.drawImage(n,d.x,d.y,d.width,d.height,0,0,d.width,d.height)}i.toBlob((function(r){var o=e.changeFileName(e.fileName,e.fileType);t?e.previewMode&&e.$emit("onPrintImg",{index:e.index,fileName:o,blob:r,file:e.dataURLtoFile(i.toDataURL("image/".concat(e.fileType)),o),dataURL:i.toDataURL("image/".concat(e.fileType))}):(e.handleClose(),e.$emit("cutDown",{index:e.index,fileName:o,blob:r,file:e.dataURLtoFile(i.toDataURL("image/".concat(e.fileType)),o),dataURL:i.toDataURL("image/".concat(e.fileType))}))}),"image/".concat(e.fileType),.95)}}),200)}}else{var i=document.createElement("canvas");i.width=e.toolBox.width,i.height=e.toolBox.height;var a=i.getContext("2d"),s=e.toolBox;if(e.rate){var c=e.rate.split(":")[0]/e.rate.split(":")[1];a.drawImage(n,s.x,s.y,s.width,s.width*c,0,0,s.width,s.width*c)}else a.drawImage(n,s.x,s.y,s.width,s.height,0,0,s.width,s.height);var h=e.changeFileName(e.fileName,e.fileType);t?e.$emit("onPrintImg",{fileName:h,dataURL:i.toDataURL("image/".concat(e.fileType))}):(e.handleClose(),e.$emit("cutDown",{fileName:h,dataURL:i.toDataURL("image/".concat(e.fileType))}))}})),"image/".concat(e.fileType)}else t||(console.warn("No picture selected"),e.$emit("error",{err:1,msg:"No picture selected"}))},scrollBarControlMove:function(t){if(this.rotateControl.active){var e=t.pageX-this.rotateControl.start.x,r=this.rotateControl.start.position+e;r<=0&&(r=0),r>=200&&(r=200),this.rotateControl.position=r,this.rotateImg.angle=(r-100)/100*180,this.printImg()}},scrollBarControlOn:function(t){this.rotateControl.active=!0,this.rotateControl.start.x=t.pageX,this.rotateControl.start.y=t.pageY,this.rotateControl.start.position=this.rotateControl.position},scrollBarControlOff:function(){this.rotateControl.active=!1}}},l=u,f=(r("72a2"),r("cba8")),p=Object(f["a"])(l,o,n,!1,null,"bafa1cc0",null),d=p.exports;e["a"]=d},"79a8":function(t,e,r){"use strict";var o=r("1306"),n=r("5e35"),i=r("63ec"),a=Math.min;t.exports=[].copyWithin||function(t,e){var r=o(this),s=i(r.length),c=n(t,s),h=n(e,s),u=arguments.length>2?arguments[2]:void 0,l=a((void 0===u?s:n(u,s))-h,s-c),f=1;h<c&&c<h+l&&(f=-1,h+=l-1,c+=l-1);while(l-- >0)h in r?r[c]=r[h]:delete r[c],c+=f,h+=f;return r}},"79eb":function(t,e){var r=Math.abs,o=Math.pow,n=Math.floor,i=Math.log,a=Math.LN2,s=function(t,e,s){var c,h,u,l=new Array(s),f=8*s-e-1,p=(1<<f)-1,d=p>>1,g=23===e?o(2,-24)-o(2,-77):0,v=t<0||0===t&&1/t<0?1:0,m=0;for(t=r(t),t!=t||t===1/0?(h=t!=t?1:0,c=p):(c=n(i(t)/a),t*(u=o(2,-c))<1&&(c--,u*=2),t+=c+d>=1?g/u:g*o(2,1-d),t*u>=2&&(c++,u/=2),c+d>=p?(h=0,c=p):c+d>=1?(h=(t*u-1)*o(2,e),c+=d):(h=t*o(2,d-1)*o(2,e),c=0));e>=8;l[m++]=255&h,h/=256,e-=8);for(c=c<<e|h,f+=e;f>0;l[m++]=255&c,c/=256,f-=8);return l[--m]|=128*v,l},c=function(t,e){var r,n=t.length,i=8*n-e-1,a=(1<<i)-1,s=a>>1,c=i-7,h=n-1,u=t[h--],l=127&u;for(u>>=7;c>0;l=256*l+t[h],h--,c-=8);for(r=l&(1<<-c)-1,l>>=-c,c+=e;c>0;r=256*r+t[h],h--,c-=8);if(0===l)l=1-s;else{if(l===a)return r?NaN:u?-1/0:1/0;r+=o(2,e),l-=s}return(u?-1:1)*r*o(2,l-e)};t.exports={pack:s,unpack:c}},"870c":function(t,e,r){"use strict";var o=r("0294"),n=r("02ba"),i=r("137f"),a=r("3f48"),s=r("c3cc"),c=r("bde6"),h=r("d930"),u=r("ff42"),l=r("63ec"),f=r("112a"),p=r("79eb"),d=r("1e73"),g=r("9c8e"),v=r("6876").f,m=r("40ac").f,y=r("4e6b"),w=r("86de"),x=r("38e1"),b=x.get,C=x.set,I="ArrayBuffer",B="DataView",A="prototype",O="Wrong length",k="Wrong index",T=o[I],S=T,_=o[B],M=_&&_[A],E=Object.prototype,L=o.RangeError,P=p.pack,R=p.unpack,U=function(t){return[255&t]},H=function(t){return[255&t,t>>8&255]},j=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},N=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},z=function(t){return P(t,23,4)},W=function(t){return P(t,52,8)},F=function(t,e){m(t[A],e,{get:function(){return b(this)[e]}})},Y=function(t,e,r,o){var n=f(r),i=b(t);if(n+e>i.byteLength)throw L(k);var a=b(i.buffer).bytes,s=n+i.byteOffset,c=a.slice(s,s+e);return o?c:c.reverse()},X=function(t,e,r,o,n,i){var a=f(r),s=b(t);if(a+e>s.byteLength)throw L(k);for(var c=b(s.buffer).bytes,h=a+s.byteOffset,u=o(+n),l=0;l<e;l++)c[h+l]=u[i?l:e-l-1]};if(i){if(!c((function(){T(1)}))||!c((function(){new T(-1)}))||c((function(){return new T,new T(1.5),new T(NaN),T.name!=I}))){S=function(t){return h(this,S),new T(f(t))};for(var D,q=S[A]=T[A],$=v(T),V=0;$.length>V;)(D=$[V++])in S||a(S,D,T[D]);q.constructor=S}g&&d(M)!==E&&g(M,E);var G=new _(new S(2)),J=M.setInt8;G.setInt8(0,2147483648),G.setInt8(1,2147483649),!G.getInt8(0)&&G.getInt8(1)||s(M,{setInt8:function(t,e){J.call(this,t,e<<24>>24)},setUint8:function(t,e){J.call(this,t,e<<24>>24)}},{unsafe:!0})}else S=function(t){h(this,S,I);var e=f(t);C(this,{bytes:y.call(new Array(e),0),byteLength:e}),n||(this.byteLength=e)},_=function(t,e,r){h(this,_,B),h(t,S,B);var o=b(t).byteLength,i=u(e);if(i<0||i>o)throw L("Wrong offset");if(r=void 0===r?o-i:l(r),i+r>o)throw L(O);C(this,{buffer:t,byteLength:r,byteOffset:i}),n||(this.buffer=t,this.byteLength=r,this.byteOffset=i)},n&&(F(S,"byteLength"),F(_,"buffer"),F(_,"byteLength"),F(_,"byteOffset")),s(_[A],{getInt8:function(t){return Y(this,1,t)[0]<<24>>24},getUint8:function(t){return Y(this,1,t)[0]},getInt16:function(t){var e=Y(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Y(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return N(Y(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return N(Y(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return R(Y(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return R(Y(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){X(this,1,t,U,e)},setUint8:function(t,e){X(this,1,t,U,e)},setInt16:function(t,e){X(this,2,t,H,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){X(this,2,t,H,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){X(this,4,t,j,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){X(this,4,t,j,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){X(this,4,t,z,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){X(this,8,t,W,e,arguments.length>2?arguments[2]:void 0)}});w(S,I),w(_,B),t.exports={ArrayBuffer:S,DataView:_}},"884f":function(t,e,r){"use strict";var o=r("02ba"),n=r("0294"),i=r("82f7"),a=r("d03a"),s=r("6cc4"),c=r("e4e4"),h=r("91ad"),u=r("be5d"),l=r("3f46"),f=r("bde6"),p=r("d69f"),d=r("6876").f,g=r("5d07").f,v=r("40ac").f,m=r("2cc9").trim,y="Number",w=n[y],x=w.prototype,b=c(p(x))==y,C=function(t){if(u(t))throw TypeError("Cannot convert a Symbol value to a number");var e,r,o,n,i,a,s,c,h=l(t,"number");if("string"==typeof h&&h.length>2)if(h=m(h),e=h.charCodeAt(0),43===e||45===e){if(r=h.charCodeAt(2),88===r||120===r)return NaN}else if(48===e){switch(h.charCodeAt(1)){case 66:case 98:o=2,n=49;break;case 79:case 111:o=8,n=55;break;default:return+h}for(i=h.slice(2),a=i.length,s=0;s<a;s++)if(c=i.charCodeAt(s),c<48||c>n)return NaN;return parseInt(i,o)}return+h};if(i(y,!w(" 0o1")||!w("0b1")||w("+0x1"))){for(var I,B=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof B&&(b?f((function(){x.valueOf.call(r)})):c(r)!=y)?h(new w(C(e)),r,B):C(e)},A=o?d(w):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),O=0;A.length>O;O++)s(w,I=A[O])&&!s(B,I)&&v(B,I,g(w,I));B.prototype=x,x.constructor=B,a(n,y,B)}},"8a1b":function(t,e,r){"use strict";var o=r("9740"),n=r("581d").forEach,i=o.aTypedArray,a=o.exportTypedArrayMethod;a("forEach",(function(t){n(i(this),t,arguments.length>1?arguments[1]:void 0)}))},"8c86":function(t,e,r){var o=r("3fad"),n=r("1306"),i=r("aeed"),a=r("bde6"),s=a((function(){i(1)}));o({target:"Object",stat:!0,forced:s},{keys:function(t){return i(n(t))}})},"8d6e":function(t,e,r){"use strict";var o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"custom-upload"},[r("el-dialog",{staticClass:"cropper-dialog",attrs:{title:"图片裁剪",visible:t.showCropper,width:"50%",height:"600",center:"","append-to-body":""},on:{"update:visible":function(e){t.showCropper=e}}},[t.showCropper?r("vue-cropper",t._b({ref:"cropper",class:{"corpper-warp":t.showCropper},attrs:{id:"corpper"}},"vue-cropper",t.cropper,!1)):t._e(),t.showCropper?r("div",{staticClass:"cropper-button"},[r("el-button",{staticClass:"cancel-btn",attrs:{size:"small"},nativeOn:{click:function(e){t.showCropper=!1}}},[t._v("取消")]),r("el-button",{attrs:{size:"small",type:"primary",loading:t.loading},on:{click:t.uploadCover}},[t._v("完成")])],1):t._e()],1),r("input",{staticStyle:{display:"none"},attrs:{id:t.id,type:"file",name:"single",accept:"image/*"},on:{change:function(e){return t.onChange(e)}}}),r("el-button",{attrs:{size:"small",type:"primary",loading:t.loading},on:{click:function(e){return t.handleOpenFile()}}},[r("i",{staticClass:"fa fa-upload"}),t._v(" "+t._s(t.buttonName)+" ")]),t.tips?r("div",{staticClass:"tips clear-margin-top"},[t._v(t._s(t.tips))]):t._e()],1)},n=[];r("c505");function i(t,e,r,o,n,i,a){try{var s=t[i](a),c=s.value}catch(h){return void r(h)}s.done?e(c):Promise.resolve(c).then(o,n)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(o,n){var a=t.apply(e,r);function s(t){i(a,o,n,s,c,"next",t)}function c(t){i(a,o,n,s,c,"throw",t)}s(void 0)}))}}var s=r("357a"),c=(r("e186"),r("884f"),r("0d3d"),r("b678"));r("51fe"),r("da3f"),r("967c4"),r("7099"),r("0b69");r("07c0"),r("2bd2"),r("a28a");r("c89b"),r("54a0");var h=r("edcc"),u=function(t,e){var r=e||["image/png","image/gif","image/jpeg","image/jpg","image/bmp","image/x-icon"],o=r.includes(t.type);return!!o||(h["Message"].error("上传文件非图片格式!"),!1)},l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=t.size/1024/1024<e;return!!r||(h["Message"].error("上传头像图片大小不能超过 "+e+"MB!"),!1)},f=function(t){return new Promise((function(e,r){var o=new FileReader;o.onload=function(t){var r=t.target.result;e(r)},o.onerror=function(){var t=new Error("读取图片失败");r(t.message)},o.readAsDataURL(t)}))},p=r("7c78"),d={components:{VueCropper:c["VueCropper"]},props:{maxFileSize:{type:Number,default:50},buttonName:{type:String,default:"添加图片"},tips:{type:String},fixedNumber:{type:Array,default:function(){return[]}},width:{type:Number,default:460},height:{type:Number,default:300}},data:function(){var t;return{imageUrl:"",token:{},domain:"https://up-z1.qiniup.com",qiniuaddr:"xhead.beswell.com",id:"cropper-input-"+ +new Date,loading:!1,showCropper:!1,cropper:(t={img:"",info:!0,size:.9,outputType:"png",canScale:!0,autoCrop:!0,full:!0,autoCropWidth:this.width,autoCropHeight:this.height,fixedBox:!1,fixed:!0,fixedNumber:this.fixedNumber,canMoveBox:!0,canMove:!0,outputSize:1},Object(s["a"])(t,"outputType","png"),Object(s["a"])(t,"full",!0),Object(s["a"])(t,"info",!0),Object(s["a"])(t,"canScale",!0),Object(s["a"])(t,"autoCrop",!0),Object(s["a"])(t,"autoCropWidth",200),Object(s["a"])(t,"autoCropHeight",200),Object(s["a"])(t,"canMove",!0),Object(s["a"])(t,"fixedBox",!0),Object(s["a"])(t,"fixed",!1),Object(s["a"])(t,"canMoveBox",!0),Object(s["a"])(t,"original",!1),Object(s["a"])(t,"centerBox",!1),Object(s["a"])(t,"height",!0),Object(s["a"])(t,"infoTrue",!1),Object(s["a"])(t,"enlarge",1),Object(s["a"])(t,"mode","container"),Object(s["a"])(t,"maxImgSize",375),t)}},methods:{handleOpenFile:function(){var t=document.getElementById(this.id);t.addEventListener("click",(function(){this.value=""}),!1),t.click()},onChange:function(t){var e=this;return a(regeneratorRuntime.mark((function r(){var o,n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(o=t.target.files[0],console.log(o),o){r.next=5;break}return console.log("选择图片失败"),r.abrupt("return",!1);case 5:if(u(o)){r.next=7;break}return r.abrupt("return");case 7:return r.prev=7,r.next=10,f(o);case 10:n=r.sent,e.showCropper=!0,e.cropper.img=n,r.next=18;break;case 15:r.prev=15,r.t0=r["catch"](7),console.log(r.t0);case 18:case"end":return r.stop()}}),r,null,[[7,15]])})))()},uploadCover:function(){var t=this;this.$refs.cropper.getCropBlob(function(){var e=a(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,l(r,t.maxFileSize)){e.next=3;break}return e.abrupt("return");case 3:t.loading=!0,console.log(r),t.upqiniu(r),t.loading=!1,t.showCropper=!1,e.next=15;break;case 10:e.prev=10,e.t0=e["catch"](0),t.loading=!1,t.showCropper=!1,console.log(e.t0);case 15:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}())},upqiniu:function(t){var e=this,r={headers:{"Content-Type":"multipart/form-data"}},o="jpg",n="GoAllOut"+(new Date).valueOf()+Math.floor(100*Math.random())+"."+o,i={token:localStorage.token},a=p.stringify(i);this.axios.post(headapi+"v1/QiNiu/GetSimpleQiNiuToken",a).then((function(o){var i=new FormData;console.log(t),i.append("file",t),i.append("token",o.data.QiNinToken),i.append("key",n),e.axios.post(e.domain,i,r).then((function(t){e.imageUrl="http://"+e.qiniuaddr+"/"+t.data.key,e.$emit("subUploadSucceed",e.imageUrl)}))}))}}},g=d,v=(r("d2ac"),r("cba8")),m=Object(v["a"])(g,o,n,!1,null,"7fa6a5a8",null);e["a"]=m.exports},"8e9d":function(t,e,r){"use strict";var o=r("0294"),n=r("9740"),i=r("bde6"),a=o.Int8Array,s=n.aTypedArray,c=n.exportTypedArrayMethod,h=[].toLocaleString,u=[].slice,l=!!a&&i((function(){h.call(new a(1))})),f=i((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!i((function(){a.prototype.toLocaleString.call([1,2])}));c("toLocaleString",(function(){return h.apply(l?u.call(s(this)):s(this),arguments)}),f)},"91ad":function(t,e,r){var o=r("1de2"),n=r("9c8e");t.exports=function(t,e,r){var i,a;return n&&"function"==typeof(i=e.constructor)&&i!==r&&o(a=i.prototype)&&a!==r.prototype&&n(t,a),t}},"95b4":function(t,e,r){},"967c4":function(t,e,r){var o=r("a2ee");o("iterator")},9740:function(t,e,r){"use strict";var o,n,i,a=r("137f"),s=r("02ba"),c=r("0294"),h=r("1de2"),u=r("6cc4"),l=r("783c"),f=r("3f48"),p=r("d03a"),d=r("40ac").f,g=r("1e73"),v=r("9c8e"),m=r("70d4"),y=r("4b2a"),w=c.Int8Array,x=w&&w.prototype,b=c.Uint8ClampedArray,C=b&&b.prototype,I=w&&g(w),B=x&&g(x),A=Object.prototype,O=A.isPrototypeOf,k=m("toStringTag"),T=y("TYPED_ARRAY_TAG"),S=y("TYPED_ARRAY_CONSTRUCTOR"),_=a&&!!v&&"Opera"!==l(c.opera),M=!1,E={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},L={BigInt64Array:8,BigUint64Array:8},P=function(t){if(!h(t))return!1;var e=l(t);return"DataView"===e||u(E,e)||u(L,e)},R=function(t){if(!h(t))return!1;var e=l(t);return u(E,e)||u(L,e)},U=function(t){if(R(t))return t;throw TypeError("Target is not a typed array")},H=function(t){if(v&&!O.call(I,t))throw TypeError("Target is not a typed array constructor");return t},j=function(t,e,r){if(s){if(r)for(var o in E){var n=c[o];if(n&&u(n.prototype,t))try{delete n.prototype[t]}catch(i){}}B[t]&&!r||p(B,t,r?e:_&&x[t]||e)}},N=function(t,e,r){var o,n;if(s){if(v){if(r)for(o in E)if(n=c[o],n&&u(n,t))try{delete n[t]}catch(i){}if(I[t]&&!r)return;try{return p(I,t,r?e:_&&I[t]||e)}catch(i){}}for(o in E)n=c[o],!n||n[t]&&!r||p(n,t,e)}};for(o in E)n=c[o],i=n&&n.prototype,i?f(i,S,n):_=!1;for(o in L)n=c[o],i=n&&n.prototype,i&&f(i,S,n);if((!_||"function"!=typeof I||I===Function.prototype)&&(I=function(){throw TypeError("Incorrect invocation")},_))for(o in E)c[o]&&v(c[o],I);if((!_||!B||B===A)&&(B=I.prototype,_))for(o in E)c[o]&&v(c[o].prototype,B);if(_&&g(C)!==B&&v(C,B),s&&!u(B,k))for(o in M=!0,d(B,k,{get:function(){return h(this)?this[T]:void 0}}),E)c[o]&&f(c[o],T,o);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:_,TYPED_ARRAY_CONSTRUCTOR:S,TYPED_ARRAY_TAG:M&&T,aTypedArray:U,aTypedArrayConstructor:H,exportTypedArrayMethod:j,exportTypedArrayStaticMethod:N,isView:P,isTypedArray:R,TypedArray:I,TypedArrayPrototype:B}},9810:function(t,e,r){"use strict";var o=r("9740").exportTypedArrayMethod,n=r("bde6"),i=r("0294"),a=i.Uint8Array,s=a&&a.prototype||{},c=[].toString,h=[].join;n((function(){c.call({})}))&&(c=function(){return h.call(this)});var u=s.toString!=c;o("toString",c,u)},"9e09":function(t,e,r){var o=r("3949"),n=o.match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},a28a:function(t,e,r){var o=r("3fad"),n=r("1be0"),i=r("73da"),a=!i((function(t){Array.from(t)}));o({target:"Array",stat:!0,forced:a},{from:n})},a298:function(t,e,r){var o=r("d94d");o("Uint8",(function(t){return function(e,r,o){return t(this,e,r,o)}}))},a2d3:function(t,e,r){"use strict";function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,i){e=e||"&",r=r||"=";var a={};if("string"!==typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var c=1e3;i&&"number"===typeof i.maxKeys&&(c=i.maxKeys);var h=t.length;c>0&&h>c&&(h=c);for(var u=0;u<h;++u){var l,f,p,d,g=t[u].replace(s,"%20"),v=g.indexOf(r);v>=0?(l=g.substr(0,v),f=g.substr(v+1)):(l=g,f=""),p=decodeURIComponent(l),d=decodeURIComponent(f),o(a,p)?n(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},a2ee:function(t,e,r){var o=r("18bb"),n=r("6cc4"),i=r("c6e3"),a=r("40ac").f;t.exports=function(t){var e=o.Symbol||(o.Symbol={});n(e,t)||a(e,t,{value:i.f(t)})}},a787:function(t,e,r){"use strict";var o=r("0890"),n=r("40ac"),i=r("dcbd");t.exports=function(t,e,r){var a=o(e);a in t?n.f(t,a,i(0,r)):t[a]=r}},ae78:function(t,e,r){"use strict";var o=r("9740"),n=r("581d").map,i=r("c69f"),a=o.aTypedArray,s=o.exportTypedArrayMethod;s("map",(function(t){return n(a(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(i(t))(e)}))}))},afa3:function(t,e){t.exports=function(t,e){var r=0,o=e.length,n=new t(o);while(o>r)n[r]=e[r++];return n}},afce:function(t,e,r){"use strict";var o=r("da50"),n=r("e9fe"),i=r("63ec"),a=r("0bdd"),s=r("5e11"),c=r("5f69"),h=r("9af7");o("match",(function(t,e,r){return[function(e){var r=s(this),o=void 0==e?void 0:e[t];return void 0!==o?o.call(e,r):new RegExp(e)[t](a(r))},function(t){var o=n(this),s=a(t),u=r(e,o,s);if(u.done)return u.value;if(!o.global)return h(o,s);var l=o.unicode;o.lastIndex=0;var f,p=[],d=0;while(null!==(f=h(o,s))){var g=a(f[0]);p[d]=g,""===g&&(o.lastIndex=c(s,i(o.lastIndex),l)),d++}return 0===d?null:p}]}))},b66d:function(t,e,r){var o=r("3949");t.exports=/MSIE|Trident/.test(o)},b678:function(t,e,r){!function(e,r){t.exports=r()}(window,(function(){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){var o=r(2);"string"==typeof o&&(o=[[t.i,o,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};r(4)(o,n),o.locals&&(t.exports=o.locals)},function(t,e,r){"use strict";var o=r(0);r.n(o).a},function(t,e,r){(t.exports=r(3)(!1)).push([t.i,'\n.vue-cropper[data-v-6dae58fd] {\n position: relative;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n direction: ltr;\n touch-action: none;\n text-align: left;\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC");\n}\n.cropper-box[data-v-6dae58fd],\n.cropper-box-canvas[data-v-6dae58fd],\n.cropper-drag-box[data-v-6dae58fd],\n.cropper-crop-box[data-v-6dae58fd],\n.cropper-face[data-v-6dae58fd] {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n user-select: none;\n}\n.cropper-box-canvas img[data-v-6dae58fd] {\n position: relative;\n text-align: left;\n user-select: none;\n transform: none;\n max-width: none;\n max-height: none;\n}\n.cropper-box[data-v-6dae58fd] {\n overflow: hidden;\n}\n.cropper-move[data-v-6dae58fd] {\n cursor: move;\n}\n.cropper-crop[data-v-6dae58fd] {\n cursor: crosshair;\n}\n.cropper-modal[data-v-6dae58fd] {\n background: rgba(0, 0, 0, 0.5);\n}\n.cropper-crop-box[data-v-6dae58fd] {\n /*border: 2px solid #39f;*/\n}\n.cropper-view-box[data-v-6dae58fd] {\n display: block;\n overflow: hidden;\n width: 100%;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n user-select: none;\n}\n.cropper-view-box img[data-v-6dae58fd] {\n user-select: none;\n text-align: left;\n max-width: none;\n max-height: none;\n}\n.cropper-face[data-v-6dae58fd] {\n top: 0;\n left: 0;\n background-color: #fff;\n opacity: 0.1;\n}\n.crop-info[data-v-6dae58fd] {\n position: absolute;\n left: 0px;\n min-width: 65px;\n text-align: center;\n color: white;\n line-height: 20px;\n background-color: rgba(0, 0, 0, 0.8);\n font-size: 12px;\n}\n.crop-line[data-v-6dae58fd] {\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n opacity: 0.1;\n}\n.line-w[data-v-6dae58fd] {\n top: -3px;\n left: 0;\n height: 5px;\n cursor: n-resize;\n}\n.line-a[data-v-6dae58fd] {\n top: 0;\n left: -3px;\n width: 5px;\n cursor: w-resize;\n}\n.line-s[data-v-6dae58fd] {\n bottom: -3px;\n left: 0;\n height: 5px;\n cursor: s-resize;\n}\n.line-d[data-v-6dae58fd] {\n top: 0;\n right: -3px;\n width: 5px;\n cursor: e-resize;\n}\n.crop-point[data-v-6dae58fd] {\n position: absolute;\n width: 8px;\n height: 8px;\n opacity: 0.75;\n background-color: #39f;\n border-radius: 100%;\n}\n.point1[data-v-6dae58fd] {\n top: -4px;\n left: -4px;\n cursor: nw-resize;\n}\n.point2[data-v-6dae58fd] {\n top: -5px;\n left: 50%;\n margin-left: -3px;\n cursor: n-resize;\n}\n.point3[data-v-6dae58fd] {\n top: -4px;\n right: -4px;\n cursor: ne-resize;\n}\n.point4[data-v-6dae58fd] {\n top: 50%;\n left: -4px;\n margin-top: -3px;\n cursor: w-resize;\n}\n.point5[data-v-6dae58fd] {\n top: 50%;\n right: -4px;\n margin-top: -3px;\n cursor: e-resize;\n}\n.point6[data-v-6dae58fd] {\n bottom: -5px;\n left: -4px;\n cursor: sw-resize;\n}\n.point7[data-v-6dae58fd] {\n bottom: -5px;\n left: 50%;\n margin-left: -3px;\n cursor: s-resize;\n}\n.point8[data-v-6dae58fd] {\n bottom: -5px;\n right: -4px;\n cursor: se-resize;\n}\n@media screen and (max-width: 500px) {\n.crop-point[data-v-6dae58fd] {\n position: absolute;\n width: 20px;\n height: 20px;\n opacity: 0.45;\n background-color: #39f;\n border-radius: 100%;\n}\n.point1[data-v-6dae58fd] {\n top: -10px;\n left: -10px;\n}\n.point2[data-v-6dae58fd],\n .point4[data-v-6dae58fd],\n .point5[data-v-6dae58fd],\n .point7[data-v-6dae58fd] {\n display: none;\n}\n.point3[data-v-6dae58fd] {\n top: -10px;\n right: -10px;\n}\n.point4[data-v-6dae58fd] {\n top: 0;\n left: 0;\n}\n.point6[data-v-6dae58fd] {\n bottom: -10px;\n left: -10px;\n}\n.point8[data-v-6dae58fd] {\n bottom: -10px;\n right: -10px;\n}\n}\n',""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=function(t,e){var r=t[1]||"",o=t[3];if(!o)return r;if(e&&"function"==typeof btoa){var n=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(o),i=o.sources.map((function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"}));return[r].concat(i).concat([n]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r})).join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},n=0;n<this.length;n++){var i=this[n][0];"number"==typeof i&&(o[i]=!0)}for(n=0;n<t.length;n++){var a=t[n];"number"==typeof a[0]&&o[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),e.push(a))}},e}},function(t,e,r){var o={},n=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}((function(){return window&&document&&document.all&&!window.atob})),i=function(t){var e={};return function(t,r){if("function"==typeof t)return t();if(void 0===e[t]){var o=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,r);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}}(),a=null,s=0,c=[],h=r(5);function u(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=o[n.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](n.parts[a]);for(;a<n.parts.length;a++)i.parts.push(v(n.parts[a],e))}else{var s=[];for(a=0;a<n.parts.length;a++)s.push(v(n.parts[a],e));o[n.id]={id:n.id,refs:1,parts:s}}}}function l(t,e){for(var r=[],o={},n=0;n<t.length;n++){var i=t[n],a=e.base?i[0]+e.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};o[a]?o[a].parts.push(s):r.push(o[a]={id:a,parts:[s]})}return r}function f(t,e){var r=i(t.insertInto);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=c[c.length-1];if("top"===t.insertAt)o?o.nextSibling?r.insertBefore(e,o.nextSibling):r.appendChild(e):r.insertBefore(e,r.firstChild),c.push(e);else if("bottom"===t.insertAt)r.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var n=i(t.insertAt.before,r);r.insertBefore(e,n)}}function p(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=c.indexOf(t);e>=0&&c.splice(e,1)}function d(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var o=function(){return r.nc}();o&&(t.attrs.nonce=o)}return g(e,t.attrs),f(t,e),e}function g(t,e){Object.keys(e).forEach((function(r){t.setAttribute(r,e[r])}))}function v(t,e){var r,o,n,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var c=s++;r=a||(a=d(e)),o=y.bind(null,r,c,!1),n=y.bind(null,r,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),f(t,e),e}(e),o=function(t,e,r){var o=r.css,n=r.sourceMap,i=void 0===e.convertToAbsoluteUrls&&n;(e.convertToAbsoluteUrls||i)&&(o=h(o)),n&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var a=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,r,e),n=function(){p(r),r.href&&URL.revokeObjectURL(r.href)}):(r=d(e),o=function(t,e){var r=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}.bind(null,r),n=function(){p(r)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else n()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=n()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var r=l(t,e);return u(r,e),function(t){for(var n=[],i=0;i<r.length;i++){var a=r[i];(s=o[a.id]).refs--,n.push(s)}for(t&&u(l(t,e),e),i=0;i<n.length;i++){var s;if(0===(s=n[i]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete o[s.id]}}}};var m=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}();function y(t,e,r,o){var n=r?"":o.css;if(t.styleSheet)t.styleSheet.cssText=m(e,n);else{var i=document.createTextNode(n),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var r=e.protocol+"//"+e.host,o=r+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var n,i=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(n=0===i.indexOf("//")?i:0===i.indexOf("/")?r+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")}))}},function(t,e,r){"use strict";r.r(e);var o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{ref:"cropper",staticClass:"vue-cropper",on:{mouseover:t.scaleImg,mouseout:t.cancelScale}},[t.imgs?r("div",{staticClass:"cropper-box"},[r("div",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],staticClass:"cropper-box-canvas",style:{width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+t.x/t.scale+"px,"+t.y/t.scale+"px,0)rotateZ("+90*t.rotate+"deg)"}},[r("img",{ref:"cropperImg",attrs:{src:t.imgs,alt:"cropper-img"}})])]):t._e(),t._v(" "),r("div",{staticClass:"cropper-drag-box",class:{"cropper-move":t.move&&!t.crop,"cropper-crop":t.crop,"cropper-modal":t.cropping},on:{mousedown:t.startMove,touchstart:t.startMove}}),t._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:t.cropping,expression:"cropping"}],staticClass:"cropper-crop-box",style:{width:t.cropW+"px",height:t.cropH+"px",transform:"translate3d("+t.cropOffsertX+"px,"+t.cropOffsertY+"px,0)"}},[r("span",{staticClass:"cropper-view-box"},[r("img",{style:{width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+(t.x-t.cropOffsertX)/t.scale+"px,"+(t.y-t.cropOffsertY)/t.scale+"px,0)rotateZ("+90*t.rotate+"deg)"},attrs:{src:t.imgs,alt:"cropper-img"}})]),t._v(" "),r("span",{staticClass:"cropper-face cropper-move",on:{mousedown:t.cropMove,touchstart:t.cropMove}}),t._v(" "),t.info?r("span",{staticClass:"crop-info",style:{top:t.cropInfo.top}},[t._v(t._s(this.cropInfo.width)+" × "+t._s(this.cropInfo.height))]):t._e(),t._v(" "),t.fixedBox?t._e():r("span",[r("span",{staticClass:"crop-line line-w",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,1)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,1)}}}),t._v(" "),r("span",{staticClass:"crop-line line-a",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,1,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,1,0)}}}),t._v(" "),r("span",{staticClass:"crop-line line-s",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,2)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,2)}}}),t._v(" "),r("span",{staticClass:"crop-line line-d",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,2,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,2,0)}}}),t._v(" "),r("span",{staticClass:"crop-point point1",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,1,1)},touchstart:function(e){t.changeCropSize(e,!0,!0,1,1)}}}),t._v(" "),r("span",{staticClass:"crop-point point2",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,1)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,1)}}}),t._v(" "),r("span",{staticClass:"crop-point point3",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,2,1)},touchstart:function(e){t.changeCropSize(e,!0,!0,2,1)}}}),t._v(" "),r("span",{staticClass:"crop-point point4",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,1,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,1,0)}}}),t._v(" "),r("span",{staticClass:"crop-point point5",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,2,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,2,0)}}}),t._v(" "),r("span",{staticClass:"crop-point point6",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,1,2)},touchstart:function(e){t.changeCropSize(e,!0,!0,1,2)}}}),t._v(" "),r("span",{staticClass:"crop-point point7",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,2)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,2)}}}),t._v(" "),r("span",{staticClass:"crop-point point8",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,2,2)},touchstart:function(e){t.changeCropSize(e,!0,!0,2,2)}}})])])])};o._withStripped=!0;var n={getData:function(t){return new Promise((function(e,r){var o={};(function(t){var e=null;return new Promise((function(r,o){if(t.src)if(/^data\:/i.test(t.src))e=function(t){t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var e=atob(t),r=e.length,o=new ArrayBuffer(r),n=new Uint8Array(o),i=0;i<r;i++)n[i]=e.charCodeAt(i);return o}(t.src),r(e);else if(/^blob\:/i.test(t.src)){var n=new FileReader;n.onload=function(t){e=t.target.result,r(e)},function(t,e){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="blob",r.onload=function(t){200!=this.status&&0!==this.status||e(this.response)},r.send()}(t.src,(function(t){n.readAsArrayBuffer(t)}))}else{var i=new XMLHttpRequest;i.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";e=i.response,r(e),i=null},i.open("GET",t.src,!0),i.responseType="arraybuffer",i.send(null)}else o("img error")}))})(t).then((function(t){o.arrayBuffer=t,o.orientation=function(t){var e,r,o,n,i,a,s,c,h,u=new DataView(t),l=u.byteLength;if(255===u.getUint8(0)&&216===u.getUint8(1))for(c=2;c<l;){if(255===u.getUint8(c)&&225===u.getUint8(c+1)){a=c;break}c++}if(a&&(r=a+10,"Exif"===function(t,e,r){var o,n="";for(o=e,r+=e;o<r;o++)n+=String.fromCharCode(t.getUint8(o));return n}(u,a+4,4)&&(i=u.getUint16(r),((n=18761===i)||19789===i)&&42===u.getUint16(r+2,n)&&(o=u.getUint32(r+4,n))>=8&&(s=r+o))),s)for(l=u.getUint16(s,n),h=0;h<l;h++)if(c=s+12*h+2,274===u.getUint16(c,n)){c+=8,e=u.getUint16(c,n);break}return e}(t),e(o)})).catch((function(t){r(t)}))}))}},i=n,a={data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:function(){return[1,1]}},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:function(){return 10}}},computed:{cropInfo:function(){var t={};if(t.top=this.cropOffsertY>21?"-21px":"0px",t.width=this.cropW>0?this.cropW:0,t.height=this.cropH>0?this.cropH:0,this.infoTrue){var e=1;this.high&&!this.full&&(e=window.devicePixelRatio),1!==this.enlarge&!this.full&&(e=Math.abs(Number(this.enlarge))),t.width=t.width*e,t.height=t.height*e,this.full&&(t.width=t.width/this.scale,t.height=t.height/this.scale)}return t.width=t.width.toFixed(0),t.height=t.height.toFixed(0),t},isIE:function(){navigator.userAgent;var t=!!window.ActiveXObject||"ActiveXObject"in window;return t},passive:function(){return this.isIE?null:{passive:!1}}},watch:{img:function(){this.checkedImg()},imgs:function(t){""!==t&&this.reload()},cropW:function(){this.showPreview()},cropH:function(){this.showPreview()},cropOffsertX:function(){this.showPreview()},cropOffsertY:function(){this.showPreview()},scale:function(t,e){this.showPreview()},x:function(){this.showPreview()},y:function(){this.showPreview()},autoCrop:function(t){t&&this.goAutoCrop()},autoCropWidth:function(){this.autoCrop&&this.goAutoCrop()},autoCropHeight:function(){this.autoCrop&&this.goAutoCrop()},mode:function(){this.checkedImg()},rotate:function(){this.showPreview(),(this.autoCrop||this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion:function(t){for(var e=navigator.userAgent.split(" "),r="",o=new RegExp(t,"i"),n=0;n<e.length;n++)o.test(e[n])&&(r=e[n]);return r?r.split("/")[1].split("."):["0","0","0"]},checkOrientationImage:function(t,e,r,o){var n=this;if(this.getVersion("chrome")[0]>=81)e=-1;else if(this.getVersion("safari")[0]>=605){var i=this.getVersion("version");i[0]>13&&i[1]>1&&(e=-1)}else{var a=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(a){var s=a[1];((s=s.split("_"))[0]>13||s[0]>=13&&s[1]>=4)&&(e=-1)}}var c=document.createElement("canvas"),h=c.getContext("2d");switch(h.save(),e){case 2:c.width=r,c.height=o,h.translate(r,0),h.scale(-1,1);break;case 3:c.width=r,c.height=o,h.translate(r/2,o/2),h.rotate(180*Math.PI/180),h.translate(-r/2,-o/2);break;case 4:c.width=r,c.height=o,h.translate(0,o),h.scale(1,-1);break;case 5:c.height=r,c.width=o,h.rotate(.5*Math.PI),h.scale(1,-1);break;case 6:c.width=o,c.height=r,h.translate(o/2,r/2),h.rotate(90*Math.PI/180),h.translate(-r/2,-o/2);break;case 7:c.height=r,c.width=o,h.rotate(.5*Math.PI),h.translate(r,-o),h.scale(-1,1);break;case 8:c.height=r,c.width=o,h.translate(o/2,r/2),h.rotate(-90*Math.PI/180),h.translate(-r/2,-o/2);break;default:c.width=r,c.height=o}h.drawImage(t,0,0,r,o),h.restore(),c.toBlob((function(t){var e=URL.createObjectURL(t);URL.revokeObjectURL(n.imgs),n.imgs=e}),"image/"+this.outputType,1)},checkedImg:function(){var t=this;if(null===this.img||""===this.img)return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();var e=new Image;if(e.onload=function(){if(""===t.img)return t.$emit("imgLoad","error"),t.$emit("img-load","error"),!1;var r=e.width,o=e.height;i.getData(e).then((function(n){t.orientation=n.orientation||1;var i=Number(t.maxImgSize);!t.orientation&&r<i&o<i?t.imgs=t.img:(r>i&&(o=o/r*i,r=i),o>i&&(r=r/o*i,o=i),t.checkOrientationImage(e,t.orientation,r,o))}))},e.onerror=function(){t.$emit("imgLoad","error"),t.$emit("img-load","error")},"data"!==this.img.substr(0,4)&&(e.crossOrigin=""),this.isIE){var r=new XMLHttpRequest;r.onload=function(){var t=URL.createObjectURL(this.response);e.src=t},r.open("GET",this.img,!0),r.responseType="blob",r.send()}else e.src=this.img},startMove:function(t){if(t.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in t?t.clientX:t.touches[0].clientX)-this.x,this.moveY=("clientY"in t?t.clientY:t.touches[0].clientY)-this.y,t.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),2==t.touches.length&&(this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=t.offsetX?t.offsetX:t.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=t.offsetY?t.offsetY:t.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale:function(t){var e=this;t.preventDefault();var r=this.scale,o=this.touches[0].clientX,n=this.touches[0].clientY,i=t.touches[0].clientX,a=t.touches[0].clientY,s=this.touches[1].clientX,c=this.touches[1].clientY,h=t.touches[1].clientX,u=t.touches[1].clientY,l=Math.sqrt(Math.pow(o-s,2)+Math.pow(n-c,2)),f=Math.sqrt(Math.pow(i-h,2)+Math.pow(a-u,2))-l,p=1,d=(p=(p=p/this.trueWidth>p/this.trueHeight?p/this.trueHeight:p/this.trueWidth)>.1?.1:p)*f;if(!this.touchNow){if(this.touchNow=!0,f>0?r+=Math.abs(d):f<0&&r>Math.abs(d)&&(r-=Math.abs(d)),this.touches=t.touches,setTimeout((function(){e.touchNow=!1}),8),!this.checkoutImgAxis(this.x,this.y,r))return!1;this.scale=r}},cancelTouchScale:function(t){window.removeEventListener("touchmove",this.touchScale)},moveImg:function(t){var e=this;if(t.preventDefault(),t.touches&&2===t.touches.length)return this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;var r,o,n="clientX"in t?t.clientX:t.touches[0].clientX,i="clientY"in t?t.clientY:t.touches[0].clientY;r=n-this.moveX,o=i-this.moveY,this.$nextTick((function(){if(e.centerBox){var t,n,i,a,s=e.getImgAxis(r,o,e.scale),c=e.getCropAxis(),h=e.trueHeight*e.scale,u=e.trueWidth*e.scale;switch(e.rotate){case 1:case-1:case 3:case-3:t=e.cropOffsertX-e.trueWidth*(1-e.scale)/2+(h-u)/2,n=e.cropOffsertY-e.trueHeight*(1-e.scale)/2+(u-h)/2,i=t-h+e.cropW,a=n-u+e.cropH;break;default:t=e.cropOffsertX-e.trueWidth*(1-e.scale)/2,n=e.cropOffsertY-e.trueHeight*(1-e.scale)/2,i=t-u+e.cropW,a=n-h+e.cropH}s.x1>=c.x1&&(r=t),s.y1>=c.y1&&(o=n),s.x2<=c.x2&&(r=i),s.y2<=c.y2&&(o=a)}e.x=r,e.y=o,e.$emit("imgMoving",{moving:!0,axis:e.getImgAxis()}),e.$emit("img-moving",{moving:!0,axis:e.getImgAxis()})}))},leaveImg:function(t){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("imgMoving",{moving:!1,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg:function(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale:function(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize:function(t){var e=this;t.preventDefault();var r=this.scale,o=t.deltaY||t.wheelDelta;o=navigator.userAgent.indexOf("Firefox")>0?30*o:o,this.isIE&&(o=-o);var n=this.coe,i=(n=n/this.trueWidth>n/this.trueHeight?n/this.trueHeight:n/this.trueWidth)*o;i<0?r+=Math.abs(i):r>Math.abs(i)&&(r-=Math.abs(i));var a=i<0?"add":"reduce";if(a!==this.coeStatus&&(this.coeStatus=a,this.coe=.2),this.scaling||(this.scalingSet=setTimeout((function(){e.scaling=!1,e.coe=e.coe+=.01}),50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,r))return!1;this.scale=r},changeScale:function(t){var e=this.scale;t=t||1;var r=20;if((t*=r=r/this.trueWidth>r/this.trueHeight?r/this.trueHeight:r/this.trueWidth)>0?e+=Math.abs(t):e>Math.abs(t)&&(e-=Math.abs(t)),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},createCrop:function(t){var e=this;t.preventDefault();var r="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,o="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;this.$nextTick((function(){var t=r-e.cropX,n=o-e.cropY;if(t>0?(e.cropW=t+e.cropChangeX>e.w?e.w-e.cropChangeX:t,e.cropOffsertX=e.cropChangeX):(e.cropW=e.w-e.cropChangeX+Math.abs(t)>e.w?e.cropChangeX:Math.abs(t),e.cropOffsertX=e.cropChangeX+t>0?e.cropChangeX+t:0),e.fixed){var i=e.cropW/e.fixedNumber[0]*e.fixedNumber[1];i+e.cropOffsertY>e.h?(e.cropH=e.h-e.cropOffsertY,e.cropW=e.cropH/e.fixedNumber[1]*e.fixedNumber[0],e.cropOffsertX=t>0?e.cropChangeX:e.cropChangeX-e.cropW):e.cropH=i,e.cropOffsertY=e.cropOffsertY}else n>0?(e.cropH=n+e.cropChangeY>e.h?e.h-e.cropChangeY:n,e.cropOffsertY=e.cropChangeY):(e.cropH=e.h-e.cropChangeY+Math.abs(n)>e.h?e.cropChangeY:Math.abs(n),e.cropOffsertY=e.cropChangeY+n>0?e.cropChangeY+n:0)}))},changeCropSize:function(t,e,r,o,n){t.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=e,this.canChangeY=r,this.changeCropTypeX=o,this.changeCropTypeY=n,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow:function(t){var e=this;t.preventDefault();var r="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,o="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0,n=this.w,i=this.h,a=0,s=0;if(this.centerBox){var c=this.getImgAxis(),h=c.x2,u=c.y2;a=c.x1>0?c.x1:0,s=c.y1>0?c.y1:0,n>h&&(n=h),i>u&&(i=u)}this.$nextTick((function(){var t=r-e.cropX,c=o-e.cropY;if(e.canChangeX&&(1===e.changeCropTypeX?e.cropOldW-t>0?(e.cropW=n-e.cropChangeX-t<=n-a?e.cropOldW-t:e.cropOldW+e.cropChangeX-a,e.cropOffsertX=n-e.cropChangeX-t<=n-a?e.cropChangeX+t:a):(e.cropW=Math.abs(t)+e.cropChangeX<=n?Math.abs(t)-e.cropOldW:n-e.cropOldW-e.cropChangeX,e.cropOffsertX=e.cropChangeX+e.cropOldW):2===e.changeCropTypeX&&(e.cropOldW+t>0?(e.cropW=e.cropOldW+t+e.cropOffsertX<=n?e.cropOldW+t:n-e.cropOffsertX,e.cropOffsertX=e.cropChangeX):(e.cropW=n-e.cropChangeX+Math.abs(t+e.cropOldW)<=n-a?Math.abs(t+e.cropOldW):e.cropChangeX-a,e.cropOffsertX=n-e.cropChangeX+Math.abs(t+e.cropOldW)<=n-a?e.cropChangeX-Math.abs(t+e.cropOldW):a))),e.canChangeY&&(1===e.changeCropTypeY?e.cropOldH-c>0?(e.cropH=i-e.cropChangeY-c<=i-s?e.cropOldH-c:e.cropOldH+e.cropChangeY-s,e.cropOffsertY=i-e.cropChangeY-c<=i-s?e.cropChangeY+c:s):(e.cropH=Math.abs(c)+e.cropChangeY<=i?Math.abs(c)-e.cropOldH:i-e.cropOldH-e.cropChangeY,e.cropOffsertY=e.cropChangeY+e.cropOldH):2===e.changeCropTypeY&&(e.cropOldH+c>0?(e.cropH=e.cropOldH+c+e.cropOffsertY<=i?e.cropOldH+c:i-e.cropOffsertY,e.cropOffsertY=e.cropChangeY):(e.cropH=i-e.cropChangeY+Math.abs(c+e.cropOldH)<=i-s?Math.abs(c+e.cropOldH):e.cropChangeY-s,e.cropOffsertY=i-e.cropChangeY+Math.abs(c+e.cropOldH)<=i-s?e.cropChangeY-Math.abs(c+e.cropOldH):s))),e.canChangeX&&e.fixed){var h=e.cropW/e.fixedNumber[0]*e.fixedNumber[1];h+e.cropOffsertY>i?(e.cropH=i-e.cropOffsertY,e.cropW=e.cropH/e.fixedNumber[1]*e.fixedNumber[0]):e.cropH=h}if(e.canChangeY&&e.fixed){var u=e.cropH/e.fixedNumber[1]*e.fixedNumber[0];u+e.cropOffsertX>n?(e.cropW=n-e.cropOffsertX,e.cropH=e.cropW/e.fixedNumber[0]*e.fixedNumber[1]):e.cropW=u}}))},checkCropLimitSize:function(){this.cropW,this.cropH;var t=this.limitMinSize,e=new Array;return e=Array.isArray[t]?t:[t,t],[parseFloat(e[0]),parseFloat(e[1])]},changeCropEnd:function(t){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},endCrop:function(){0===this.cropW&&0===this.cropH&&(this.cropping=!1),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop:function(){this.crop=!0},stopCrop:function(){this.crop=!1},clearCrop:function(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove:function(t){if(t.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(t),!1;if(t.touches&&2===t.touches.length)return this.crop=!1,this.startMove(t),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);var e,r,o="clientX"in t?t.clientX:t.touches[0].clientX,n="clientY"in t?t.clientY:t.touches[0].clientY;e=o-this.cropOffsertX,r=n-this.cropOffsertY,this.cropX=e,this.cropY=r,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop:function(t,e){var r=this,o=0,n=0;t&&(t.preventDefault(),o="clientX"in t?t.clientX:t.touches[0].clientX,n="clientY"in t?t.clientY:t.touches[0].clientY),this.$nextTick((function(){var t,i,a=o-r.cropX,s=n-r.cropY;if(e&&(a=r.cropOffsertX,s=r.cropOffsertY),t=a<=0?0:a+r.cropW>r.w?r.w-r.cropW:a,i=s<=0?0:s+r.cropH>r.h?r.h-r.cropH:s,r.centerBox){var c=r.getImgAxis();t<=c.x1&&(t=c.x1),t+r.cropW>c.x2&&(t=c.x2-r.cropW),i<=c.y1&&(i=c.y1),i+r.cropH>c.y2&&(i=c.y2-r.cropH)}r.cropOffsertX=t,r.cropOffsertY=i,r.$emit("cropMoving",{moving:!0,axis:r.getCropAxis()}),r.$emit("crop-moving",{moving:!0,axis:r.getCropAxis()})}))},getImgAxis:function(t,e,r){t=t||this.x,e=e||this.y,r=r||this.scale;var o={x1:0,x2:0,y1:0,y2:0},n=this.trueWidth*r,i=this.trueHeight*r;switch(this.rotate){case 0:o.x1=t+this.trueWidth*(1-r)/2,o.x2=o.x1+this.trueWidth*r,o.y1=e+this.trueHeight*(1-r)/2,o.y2=o.y1+this.trueHeight*r;break;case 1:case-1:case 3:case-3:o.x1=t+this.trueWidth*(1-r)/2+(n-i)/2,o.x2=o.x1+this.trueHeight*r,o.y1=e+this.trueHeight*(1-r)/2+(i-n)/2,o.y2=o.y1+this.trueWidth*r;break;default:o.x1=t+this.trueWidth*(1-r)/2,o.x2=o.x1+this.trueWidth*r,o.y1=e+this.trueHeight*(1-r)/2,o.y2=o.y1+this.trueHeight*r}return o},getCropAxis:function(){var t={x1:0,x2:0,y1:0,y2:0};return t.x1=this.cropOffsertX,t.x2=t.x1+this.cropW,t.y1=this.cropOffsertY,t.y2=t.y1+this.cropH,t},leaveCrop:function(t){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("cropMoving",{moving:!1,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked:function(t){var e=this,r=document.createElement("canvas"),o=new Image,n=this.rotate,i=this.trueWidth,a=this.trueHeight,s=this.cropOffsertX,c=this.cropOffsertY;function h(t,e){r.width=Math.round(t),r.height=Math.round(e)}o.onload=function(){if(0!==e.cropW){var u=r.getContext("2d"),l=1;e.high&!e.full&&(l=window.devicePixelRatio),1!==e.enlarge&!e.full&&(l=Math.abs(Number(e.enlarge)));var f=e.cropW*l,p=e.cropH*l,d=i*e.scale*l,g=a*e.scale*l,v=(e.x-s+e.trueWidth*(1-e.scale)/2)*l,m=(e.y-c+e.trueHeight*(1-e.scale)/2)*l;switch(h(f,p),u.save(),n){case 0:e.full?(h(f/e.scale,p/e.scale),u.drawImage(o,v/e.scale,m/e.scale,d/e.scale,g/e.scale)):u.drawImage(o,v,m,d,g);break;case 1:case-3:e.full?(h(f/e.scale,p/e.scale),v=v/e.scale+(d/e.scale-g/e.scale)/2,m=m/e.scale+(g/e.scale-d/e.scale)/2,u.rotate(90*n*Math.PI/180),u.drawImage(o,m,-v-g/e.scale,d/e.scale,g/e.scale)):(v+=(d-g)/2,m+=(g-d)/2,u.rotate(90*n*Math.PI/180),u.drawImage(o,m,-v-g,d,g));break;case 2:case-2:e.full?(h(f/e.scale,p/e.scale),u.rotate(90*n*Math.PI/180),v/=e.scale,m/=e.scale,u.drawImage(o,-v-d/e.scale,-m-g/e.scale,d/e.scale,g/e.scale)):(u.rotate(90*n*Math.PI/180),u.drawImage(o,-v-d,-m-g,d,g));break;case 3:case-1:e.full?(h(f/e.scale,p/e.scale),v=v/e.scale+(d/e.scale-g/e.scale)/2,m=m/e.scale+(g/e.scale-d/e.scale)/2,u.rotate(90*n*Math.PI/180),u.drawImage(o,-m-d/e.scale,v,d/e.scale,g/e.scale)):(v+=(d-g)/2,m+=(g-d)/2,u.rotate(90*n*Math.PI/180),u.drawImage(o,-m-d,v,d,g));break;default:e.full?(h(f/e.scale,p/e.scale),u.drawImage(o,v/e.scale,m/e.scale,d/e.scale,g/e.scale)):u.drawImage(o,v,m,d,g)}u.restore()}else{var y=i*e.scale,w=a*e.scale,x=r.getContext("2d");switch(x.save(),n){case 0:h(y,w),x.drawImage(o,0,0,y,w);break;case 1:case-3:h(w,y),x.rotate(90*n*Math.PI/180),x.drawImage(o,0,-w,y,w);break;case 2:case-2:h(y,w),x.rotate(90*n*Math.PI/180),x.drawImage(o,-y,-w,y,w);break;case 3:case-1:h(w,y),x.rotate(90*n*Math.PI/180),x.drawImage(o,-y,0,y,w);break;default:h(y,w),x.drawImage(o,0,0,y,w)}x.restore()}t(r)},"data"!==this.img.substr(0,4)&&(o.crossOrigin="Anonymous"),o.src=this.imgs},getCropData:function(t){var e=this;this.getCropChecked((function(r){t(r.toDataURL("image/"+e.outputType,e.outputSize))}))},getCropBlob:function(t){var e=this;this.getCropChecked((function(r){r.toBlob((function(e){return t(e)}),"image/"+e.outputType,e.outputSize)}))},showPreview:function(){var t=this;if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout((function(){t.isCanShow=!0}),16);var e=this.cropW,r=this.cropH,o=this.scale,n={};n.div={width:"".concat(e,"px"),height:"".concat(r,"px")};var i=(this.x-this.cropOffsertX)/o,a=(this.y-this.cropOffsertY)/o;n.w=e,n.h=r,n.url=this.imgs,n.img={width:"".concat(this.trueWidth,"px"),height:"".concat(this.trueHeight,"px"),transform:"scale(".concat(o,")translate3d(").concat(i,"px, ").concat(a,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,"deg)")},n.html='\n <div class="show-preview" style="width: '.concat(n.w,"px; height: ").concat(n.h,'px,; overflow: hidden">\n <div style="width: ').concat(e,"px; height: ").concat(r,'px">\n <img src=').concat(n.url,' style="width: ').concat(this.trueWidth,"px; height: ").concat(this.trueHeight,"px; transform:\n scale(").concat(o,")translate3d(").concat(i,"px, ").concat(a,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,'deg)">\n </div>\n </div>'),this.$emit("realTime",n),this.$emit("real-time",n)},reload:function(){var t=this,e=new Image;e.onload=function(){t.w=parseFloat(window.getComputedStyle(t.$refs.cropper).width),t.h=parseFloat(window.getComputedStyle(t.$refs.cropper).height),t.trueWidth=e.width,t.trueHeight=e.height,t.original?t.scale=1:t.scale=t.checkedMode(),t.$nextTick((function(){t.x=-(t.trueWidth-t.trueWidth*t.scale)/2+(t.w-t.trueWidth*t.scale)/2,t.y=-(t.trueHeight-t.trueHeight*t.scale)/2+(t.h-t.trueHeight*t.scale)/2,t.loading=!1,t.autoCrop&&t.goAutoCrop(),t.$emit("img-load","success"),t.$emit("imgLoad","success"),setTimeout((function(){t.showPreview()}),20)}))},e.onerror=function(){t.$emit("imgLoad","error"),t.$emit("img-load","error")},e.src=this.imgs},checkedMode:function(){var t=1,e=(this.trueWidth,this.trueHeight),r=this.mode.split(" ");switch(r[0]){case"contain":this.trueWidth>this.w&&(t=this.w/this.trueWidth),this.trueHeight*t>this.h&&(t=this.h/this.trueHeight);break;case"cover":(e*=t=this.w/this.trueWidth)<this.h&&(t=(e=this.h)/this.trueHeight);break;default:try{var o=r[0];if(-1!==o.search("px")){o=o.replace("px","");var n=parseFloat(o)/this.trueWidth,i=1,a=r[1];-1!==a.search("px")&&(a=a.replace("px",""),i=(e=parseFloat(a))/this.trueHeight),t=Math.min(n,i)}if(-1!==o.search("%")&&(o=o.replace("%",""),t=parseFloat(o)/100*this.w/this.trueWidth),2===r.length&&"auto"===o){var s=r[1];-1!==s.search("px")&&(s=s.replace("px",""),t=(e=parseFloat(s))/this.trueHeight),-1!==s.search("%")&&(s=s.replace("%",""),t=(e=parseFloat(s)/100*this.h)/this.trueHeight)}}catch(e){t=1}}return t},goAutoCrop:function(t,e){if(""!==this.imgs&&null!==this.imgs){this.clearCrop(),this.cropping=!0;var r=this.w,o=this.h;if(this.centerBox){var n=Math.abs(this.rotate)%2>0,i=(n?this.trueHeight:this.trueWidth)*this.scale,a=(n?this.trueWidth:this.trueHeight)*this.scale;r=i<r?i:r,o=a<o?a:o}var s=t||parseFloat(this.autoCropWidth),c=e||parseFloat(this.autoCropHeight);0!==s&&0!==c||(s=.8*r,c=.8*o),s=s>r?r:s,c=c>o?o:c,this.fixed&&(c=s/this.fixedNumber[0]*this.fixedNumber[1]),c>this.h&&(s=(c=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(s,c)}},changeCrop:function(t,e){var r=this;if(this.centerBox){var o=this.getImgAxis();t>o.x2-o.x1&&(e=(t=o.x2-o.x1)/this.fixedNumber[0]*this.fixedNumber[1]),e>o.y2-o.y1&&(t=(e=o.y2-o.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=t,this.cropH=e,this.checkCropLimitSize(),this.$nextTick((function(){r.cropOffsertX=(r.w-r.cropW)/2,r.cropOffsertY=(r.h-r.cropH)/2,r.centerBox&&r.moveCrop(null,!0)}))},refresh:function(){var t=this;this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick((function(){t.checkedImg()}))},rotateLeft:function(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight:function(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear:function(){this.rotate=0},checkoutImgAxis:function(t,e,r){t=t||this.x,e=e||this.y,r=r||this.scale;var o=!0;if(this.centerBox){var n=this.getImgAxis(t,e,r),i=this.getCropAxis();n.x1>=i.x1&&(o=!1),n.x2<=i.x2&&(o=!1),n.y1>=i.y1&&(o=!1),n.y2<=i.y2&&(o=!1)}return o}},mounted:function(){this.support="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";var t=this,e=navigator.userAgent;this.isIOS=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,r,o){for(var n=atob(this.toDataURL(r,o).split(",")[1]),i=n.length,a=new Uint8Array(i),s=0;s<i;s++)a[s]=n.charCodeAt(s);e(new Blob([a],{type:t.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},destroyed:function(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.cancelScale()}};r(1);var s=function(t,e,r,o,n,i,a,s){var c,h="function"==typeof t?t.options:t;if(e&&(h.render=e,h.staticRenderFns=r,h._compiled=!0),o&&(h.functional=!0),i&&(h._scopeId="data-v-"+i),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},h._ssrRegister=c):n&&(c=s?function(){n.call(this,this.$root.$options.shadowRoot)}:n),c)if(h.functional){h._injectStyles=c;var u=h.render;h.render=function(t,e){return c.call(e),u(t,e)}}else{var l=h.beforeCreate;h.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:h}}(a,o,[],!1,null,"6dae58fd",null);s.options.__file="src/vue-cropper.vue";var c=s.exports;r.d(e,"VueCropper",(function(){return c}));var h=function(t){t.component("VueCropper",c)};"undefined"!=typeof window&&window.Vue&&h(window.Vue),e.default={version:"0.5.6",install:h,VueCropper:c,vueCropper:c}}])}))},c080:function(t,e,r){var o=r("1306"),n=r("63ec"),i=r("553e"),a=r("f501"),s=r("99b2"),c=r("9740").aTypedArrayConstructor;t.exports=function(t){var e,r,h,u,l,f,p=o(t),d=arguments.length,g=d>1?arguments[1]:void 0,v=void 0!==g,m=i(p);if(void 0!=m&&!a(m)){l=m.call(p),f=l.next,p=[];while(!(u=f.call(l)).done)p.push(u.value)}for(v&&d>2&&(g=s(g,arguments[2],2)),r=n(p.length),h=new(c(this))(r),e=0;r>e;e++)h[e]=v?g(p[e],e):p[e];return h}},c16d:function(t,e,r){var o=r("e9fe"),n=r("fdf1");t.exports=function(t,e,r,i){try{return i?e(o(r)[0],r[1]):e(r)}catch(a){throw n(t),a}}},c5b6:function(t,e,r){"use strict";var o=r("2295"),n=r("ff42"),i=r("63ec"),a=r("dd79"),s=Math.min,c=[].lastIndexOf,h=!!c&&1/[1].lastIndexOf(1,-0)<0,u=a("lastIndexOf"),l=h||!u;t.exports=l?function(t){if(h)return c.apply(this,arguments)||0;var e=o(this),r=i(e.length),a=r-1;for(arguments.length>1&&(a=s(a,n(arguments[1]))),a<0&&(a=r+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:c},c69f:function(t,e,r){var o=r("9740"),n=r("5ad2"),i=o.TYPED_ARRAY_CONSTRUCTOR,a=o.aTypedArrayConstructor;t.exports=function(t){return a(n(t,t[i]))}},c6e3:function(t,e,r){var o=r("70d4");e.f=o},c831:function(t,e,r){var o=r("1de2"),n=Math.floor;t.exports=function(t){return!o(t)&&isFinite(t)&&n(t)===t}},c89b:function(t,e,r){"use strict";var o=r("3fad"),n=r("5dcf").includes,i=r("546a");o({target:"Array",proto:!0},{includes:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},cae8a:function(t,e,r){var o=r("70d4"),n=o("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(o){}}return!1}},cb0d:function(t,e,r){"use strict";var o=r("9740"),n=r("63ec"),i=r("1933"),a=r("1306"),s=r("bde6"),c=o.aTypedArray,h=o.exportTypedArrayMethod,u=s((function(){new Int8Array(1).set({})}));h("set",(function(t){c(this);var e=i(arguments.length>1?arguments[1]:void 0,1),r=this.length,o=a(t),s=n(o.length),h=0;if(s+e>r)throw RangeError("Wrong length");while(h<s)this[e+h]=o[h++]}),u)},cb76:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},d2ac:function(t,e,r){"use strict";r("95b4")},d444:function(t,e,r){"use strict";var o=r("9740"),n=r("f00c").left,i=o.aTypedArray,a=o.exportTypedArrayMethod;a("reduce",(function(t){return n(i(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},d46e:function(t,e,r){"use strict";var o=r("9740"),n=r("79a8"),i=o.aTypedArray,a=o.exportTypedArrayMethod;a("copyWithin",(function(t,e){return n.call(i(this),t,e,arguments.length>2?arguments[2]:void 0)}))},d94d:function(t,e,r){"use strict";var o=r("3fad"),n=r("0294"),i=r("02ba"),a=r("1cfb"),s=r("9740"),c=r("870c"),h=r("d930"),u=r("dcbd"),l=r("3f48"),f=r("c831"),p=r("63ec"),d=r("112a"),g=r("1933"),v=r("0890"),m=r("6cc4"),y=r("783c"),w=r("1de2"),x=r("be5d"),b=r("d69f"),C=r("9c8e"),I=r("6876").f,B=r("c080"),A=r("581d").forEach,O=r("8d0d"),k=r("40ac"),T=r("5d07"),S=r("38e1"),_=r("91ad"),M=S.get,E=S.set,L=k.f,P=T.f,R=Math.round,U=n.RangeError,H=c.ArrayBuffer,j=c.DataView,N=s.NATIVE_ARRAY_BUFFER_VIEWS,z=s.TYPED_ARRAY_CONSTRUCTOR,W=s.TYPED_ARRAY_TAG,F=s.TypedArray,Y=s.TypedArrayPrototype,X=s.aTypedArrayConstructor,D=s.isTypedArray,q="BYTES_PER_ELEMENT",$="Wrong length",V=function(t,e){var r=0,o=e.length,n=new(X(t))(o);while(o>r)n[r]=e[r++];return n},G=function(t,e){L(t,e,{get:function(){return M(this)[e]}})},J=function(t){var e;return t instanceof H||"ArrayBuffer"==(e=y(t))||"SharedArrayBuffer"==e},K=function(t,e){return D(t)&&!x(e)&&e in t&&f(+e)&&e>=0},Q=function(t,e){return e=v(e),K(t,e)?u(2,t[e]):P(t,e)},Z=function(t,e,r){return e=v(e),!(K(t,e)&&w(r)&&m(r,"value"))||m(r,"get")||m(r,"set")||r.configurable||m(r,"writable")&&!r.writable||m(r,"enumerable")&&!r.enumerable?L(t,e,r):(t[e]=r.value,t)};i?(N||(T.f=Q,k.f=Z,G(Y,"buffer"),G(Y,"byteOffset"),G(Y,"byteLength"),G(Y,"length")),o({target:"Object",stat:!0,forced:!N},{getOwnPropertyDescriptor:Q,defineProperty:Z}),t.exports=function(t,e,r){var i=t.match(/\d+$/)[0]/8,s=t+(r?"Clamped":"")+"Array",c="get"+t,u="set"+t,f=n[s],v=f,m=v&&v.prototype,y={},x=function(t,e){var r=M(t);return r.view[c](e*i+r.byteOffset,!0)},k=function(t,e,o){var n=M(t);r&&(o=(o=R(o))<0?0:o>255?255:255&o),n.view[u](e*i+n.byteOffset,o,!0)},T=function(t,e){L(t,e,{get:function(){return x(this,e)},set:function(t){return k(this,e,t)},enumerable:!0})};N?a&&(v=e((function(t,e,r,o){return h(t,v,s),_(function(){return w(e)?J(e)?void 0!==o?new f(e,g(r,i),o):void 0!==r?new f(e,g(r,i)):new f(e):D(e)?V(v,e):B.call(v,e):new f(d(e))}(),t,v)})),C&&C(v,F),A(I(f),(function(t){t in v||l(v,t,f[t])})),v.prototype=m):(v=e((function(t,e,r,o){h(t,v,s);var n,a,c,u=0,l=0;if(w(e)){if(!J(e))return D(e)?V(v,e):B.call(v,e);n=e,l=g(r,i);var f=e.byteLength;if(void 0===o){if(f%i)throw U($);if(a=f-l,a<0)throw U($)}else if(a=p(o)*i,a+l>f)throw U($);c=a/i}else c=d(e),a=c*i,n=new H(a);E(t,{buffer:n,byteOffset:l,byteLength:a,length:c,view:new j(n)});while(u<c)T(t,u++)})),C&&C(v,F),m=v.prototype=b(Y)),m.constructor!==v&&l(m,"constructor",v),l(m,z,v),W&&l(m,W,s),y[s]=v,o({global:!0,forced:v!=f,sham:!N},y),q in v||l(v,q,i),q in m||l(m,q,i),O(s)}):t.exports=function(){}},da3f:function(t,e,r){"use strict";var o=r("3fad"),n=r("02ba"),i=r("0294"),a=r("6cc4"),s=r("1de2"),c=r("40ac").f,h=r("3666"),u=i.Symbol;if(n&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var l={},f=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof f?new u(t):void 0===t?u():u(t);return""===t&&(l[e]=!0),e};h(f,u);var p=f.prototype=u.prototype;p.constructor=f;var d=p.toString,g="Symbol(test)"==String(u("test")),v=/^Symbol\((.*)\)[^)]+$/;c(p,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=d.call(t);if(a(l,t))return"";var r=g?e.slice(7,-1):e.replace(v,"$1");return""===r?void 0:r}}),o({global:!0,forced:!0},{Symbol:f})}},dd79:function(t,e,r){"use strict";var o=r("bde6");t.exports=function(t,e){var r=[][t];return!!r&&o((function(){r.call(null,e||function(){throw 1},1)}))}},e186:function(t,e,r){var o=function(t){"use strict";var e,r=Object.prototype,o=r.hasOwnProperty,n="function"===typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(E){c=function(t,e,r){return t[e]=r}}function h(t,e,r,o){var n=e&&e.prototype instanceof v?e:v,i=Object.create(n.prototype),a=new S(o||[]);return i._invoke=A(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(E){return{type:"throw",arg:E}}}t.wrap=h;var l="suspendedStart",f="suspendedYield",p="executing",d="completed",g={};function v(){}function m(){}function y(){}var w={};c(w,i,(function(){return this}));var x=Object.getPrototypeOf,b=x&&x(x(_([])));b&&b!==r&&o.call(b,i)&&(w=b);var C=y.prototype=v.prototype=Object.create(w);function I(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(n,i,a,s){var c=u(t[n],t,i);if("throw"!==c.type){var h=c.arg,l=h.value;return l&&"object"===typeof l&&o.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var n;function i(t,o){function i(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(i,i):i()}this._invoke=i}function A(t,e,r){var o=l;return function(n,i){if(o===p)throw new Error("Generator is already running");if(o===d){if("throw"===n)throw i;return M()}r.method=n,r.arg=i;while(1){var a=r.delegate;if(a){var s=O(a,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===l)throw o=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var c=u(t,e,r);if("normal"===c.type){if(o=r.done?d:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=d,r.method="throw",r.arg=c.arg)}}}function O(t,r){var o=t.iterator[r.method];if(o===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var n=u(o,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,g;var i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function _(t){if(t){var r=t[i];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function r(){while(++n<t.length)if(o.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:M}}function M(){return{value:e,done:!0}}return m.prototype=y,c(C,"constructor",y),c(y,"constructor",m),m.displayName=c(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,s,"GeneratorFunction")),t.prototype=Object.create(C),t},t.awrap=function(t){return{__await:t}},I(B.prototype),c(B.prototype,a,(function(){return this})),t.AsyncIterator=B,t.async=function(e,r,o,n,i){void 0===i&&(i=Promise);var a=new B(h(e,r,o,n),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},I(C),c(C,s,"Generator"),c(C,i,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var o=e.pop();if(o in t)return r.value=o,r.done=!1,r}return r.done=!0,r}},t.values=_,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(o,n){return s.type="throw",s.arg=t,r.next=o,n&&(r.method="next",r.arg=e),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),h=o.call(a,"finallyLoc");if(c&&h){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;T(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,o){return this.delegate={iterator:_(t),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=o}catch(n){"object"===typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},ed31:function(t,e,r){var o=r("3fad"),n=r("02ba"),i=r("354a"),a=r("2295"),s=r("5d07"),c=r("a787");o({target:"Object",stat:!0,sham:!n},{getOwnPropertyDescriptors:function(t){var e,r,o=a(t),n=s.f,h=i(o),u={},l=0;while(h.length>l)r=n(o,e=h[l++]),void 0!==r&&c(u,e,r);return u}})},ee28:function(t,e,r){var o=r("afa3"),n=r("c69f");t.exports=function(t,e){return o(n(t),e)}},f00c:function(t,e,r){var o=r("6ff8"),n=r("1306"),i=r("7088"),a=r("63ec"),s=function(t){return function(e,r,s,c){o(r);var h=n(e),u=i(h),l=a(h.length),f=t?l-1:0,p=t?-1:1;if(s<2)while(1){if(f in u){c=u[f],f+=p;break}if(f+=p,t?f<0:l<=f)throw TypeError("Reduce of empty array with no initial value")}for(;t?f>=0:l>f;f+=p)f in u&&(c=r(c,u[f],f,h));return c}};t.exports={left:s(!1),right:s(!0)}},f1a0:function(t,e,r){"use strict";var o=r("9740"),n=r("63ec"),i=r("5e35"),a=r("c69f"),s=o.aTypedArray,c=o.exportTypedArrayMethod;c("subarray",(function(t,e){var r=s(this),o=r.length,c=i(t,o),h=a(r);return new h(r.buffer,r.byteOffset+c*r.BYTES_PER_ELEMENT,n((void 0===e?o:i(e,o))-c))}))},f30b:function(t,e){var r=Math.floor,o=function(t,e){var a=t.length,s=r(a/2);return a<8?n(t,e):i(o(t.slice(0,s),e),o(t.slice(s),e),e)},n=function(t,e){var r,o,n=t.length,i=1;while(i<n){o=i,r=t[i];while(o&&e(t[o-1],r)>0)t[o]=t[--o];o!==i++&&(t[o]=r)}return t},i=function(t,e,r){var o=t.length,n=e.length,i=0,a=0,s=[];while(i<o||a<n)i<o&&a<n?s.push(r(t[i],e[a])<=0?t[i++]:e[a++]):s.push(i<o?t[i++]:e[a++]);return s};t.exports=o},f393:function(t,e,r){"use strict";var o=r("9740"),n=r("581d").every,i=o.aTypedArray,a=o.exportTypedArrayMethod;a("every",(function(t){return n(i(this),t,arguments.length>1?arguments[1]:void 0)}))}}]);