179.f5b7b03d.js 70 KB

12
  1. (self["webpackChunkbaozhidao_putoutstorage"]=self["webpackChunkbaozhidao_putoutstorage"]||[]).push([[179],{8741:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,o){n=n||"&",r=r||"=";var i={};if("string"!==typeof e||0===e.length)return i;var a=/\+/g;e=e.split(n);var s=1e3;o&&"number"===typeof o.maxKeys&&(s=o.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var l=0;l<u;++l){var c,h,p,f,d=e[l].replace(a,"%20"),y=d.indexOf(r);y>=0?(c=d.substr(0,y),h=d.substr(y+1)):(c=d,h=""),p=decodeURIComponent(c),f=decodeURIComponent(h),t(i,p)?Array.isArray(i[p])?i[p].push(f):i[p]=[i[p],f]:i[p]=f}return i}},5692:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,o){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"===typeof e?Object.keys(e).map((function(o){var i=encodeURIComponent(t(o))+r;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(t(e))})).join(n):i+encodeURIComponent(t(e[o]))})).filter(Boolean).join(n):o?encodeURIComponent(t(o))+r+encodeURIComponent(t(e)):""}},1134:function(e,t,n){"use strict";n(8741),t.stringify=n(5692)},6021:function(e){(function(t){e.exports=t()})((function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],o=e[2],i=e[3];n+=(r&o|~r&i)+t[0]-680876936|0,n=(n<<7|n>>>25)+r|0,i+=(n&r|~n&o)+t[1]-389564586|0,i=(i<<12|i>>>20)+n|0,o+=(i&n|~i&r)+t[2]+606105819|0,o=(o<<17|o>>>15)+i|0,r+=(o&i|~o&n)+t[3]-1044525330|0,r=(r<<22|r>>>10)+o|0,n+=(r&o|~r&i)+t[4]-176418897|0,n=(n<<7|n>>>25)+r|0,i+=(n&r|~n&o)+t[5]+1200080426|0,i=(i<<12|i>>>20)+n|0,o+=(i&n|~i&r)+t[6]-1473231341|0,o=(o<<17|o>>>15)+i|0,r+=(o&i|~o&n)+t[7]-45705983|0,r=(r<<22|r>>>10)+o|0,n+=(r&o|~r&i)+t[8]+1770035416|0,n=(n<<7|n>>>25)+r|0,i+=(n&r|~n&o)+t[9]-1958414417|0,i=(i<<12|i>>>20)+n|0,o+=(i&n|~i&r)+t[10]-42063|0,o=(o<<17|o>>>15)+i|0,r+=(o&i|~o&n)+t[11]-1990404162|0,r=(r<<22|r>>>10)+o|0,n+=(r&o|~r&i)+t[12]+1804603682|0,n=(n<<7|n>>>25)+r|0,i+=(n&r|~n&o)+t[13]-40341101|0,i=(i<<12|i>>>20)+n|0,o+=(i&n|~i&r)+t[14]-1502002290|0,o=(o<<17|o>>>15)+i|0,r+=(o&i|~o&n)+t[15]+1236535329|0,r=(r<<22|r>>>10)+o|0,n+=(r&i|o&~i)+t[1]-165796510|0,n=(n<<5|n>>>27)+r|0,i+=(n&o|r&~o)+t[6]-1069501632|0,i=(i<<9|i>>>23)+n|0,o+=(i&r|n&~r)+t[11]+643717713|0,o=(o<<14|o>>>18)+i|0,r+=(o&n|i&~n)+t[0]-373897302|0,r=(r<<20|r>>>12)+o|0,n+=(r&i|o&~i)+t[5]-701558691|0,n=(n<<5|n>>>27)+r|0,i+=(n&o|r&~o)+t[10]+38016083|0,i=(i<<9|i>>>23)+n|0,o+=(i&r|n&~r)+t[15]-660478335|0,o=(o<<14|o>>>18)+i|0,r+=(o&n|i&~n)+t[4]-405537848|0,r=(r<<20|r>>>12)+o|0,n+=(r&i|o&~i)+t[9]+568446438|0,n=(n<<5|n>>>27)+r|0,i+=(n&o|r&~o)+t[14]-1019803690|0,i=(i<<9|i>>>23)+n|0,o+=(i&r|n&~r)+t[3]-187363961|0,o=(o<<14|o>>>18)+i|0,r+=(o&n|i&~n)+t[8]+1163531501|0,r=(r<<20|r>>>12)+o|0,n+=(r&i|o&~i)+t[13]-1444681467|0,n=(n<<5|n>>>27)+r|0,i+=(n&o|r&~o)+t[2]-51403784|0,i=(i<<9|i>>>23)+n|0,o+=(i&r|n&~r)+t[7]+1735328473|0,o=(o<<14|o>>>18)+i|0,r+=(o&n|i&~n)+t[12]-1926607734|0,r=(r<<20|r>>>12)+o|0,n+=(r^o^i)+t[5]-378558|0,n=(n<<4|n>>>28)+r|0,i+=(n^r^o)+t[8]-2022574463|0,i=(i<<11|i>>>21)+n|0,o+=(i^n^r)+t[11]+1839030562|0,o=(o<<16|o>>>16)+i|0,r+=(o^i^n)+t[14]-35309556|0,r=(r<<23|r>>>9)+o|0,n+=(r^o^i)+t[1]-1530992060|0,n=(n<<4|n>>>28)+r|0,i+=(n^r^o)+t[4]+1272893353|0,i=(i<<11|i>>>21)+n|0,o+=(i^n^r)+t[7]-155497632|0,o=(o<<16|o>>>16)+i|0,r+=(o^i^n)+t[10]-1094730640|0,r=(r<<23|r>>>9)+o|0,n+=(r^o^i)+t[13]+681279174|0,n=(n<<4|n>>>28)+r|0,i+=(n^r^o)+t[0]-358537222|0,i=(i<<11|i>>>21)+n|0,o+=(i^n^r)+t[3]-722521979|0,o=(o<<16|o>>>16)+i|0,r+=(o^i^n)+t[6]+76029189|0,r=(r<<23|r>>>9)+o|0,n+=(r^o^i)+t[9]-640364487|0,n=(n<<4|n>>>28)+r|0,i+=(n^r^o)+t[12]-421815835|0,i=(i<<11|i>>>21)+n|0,o+=(i^n^r)+t[15]+530742520|0,o=(o<<16|o>>>16)+i|0,r+=(o^i^n)+t[2]-995338651|0,r=(r<<23|r>>>9)+o|0,n+=(o^(r|~i))+t[0]-198630844|0,n=(n<<6|n>>>26)+r|0,i+=(r^(n|~o))+t[7]+1126891415|0,i=(i<<10|i>>>22)+n|0,o+=(n^(i|~r))+t[14]-1416354905|0,o=(o<<15|o>>>17)+i|0,r+=(i^(o|~n))+t[5]-57434055|0,r=(r<<21|r>>>11)+o|0,n+=(o^(r|~i))+t[12]+1700485571|0,n=(n<<6|n>>>26)+r|0,i+=(r^(n|~o))+t[3]-1894986606|0,i=(i<<10|i>>>22)+n|0,o+=(n^(i|~r))+t[10]-1051523|0,o=(o<<15|o>>>17)+i|0,r+=(i^(o|~n))+t[1]-2054922799|0,r=(r<<21|r>>>11)+o|0,n+=(o^(r|~i))+t[8]+1873313359|0,n=(n<<6|n>>>26)+r|0,i+=(r^(n|~o))+t[15]-30611744|0,i=(i<<10|i>>>22)+n|0,o+=(n^(i|~r))+t[6]-1560198380|0,o=(o<<15|o>>>17)+i|0,r+=(i^(o|~n))+t[13]+1309151649|0,r=(r<<21|r>>>11)+o|0,n+=(o^(r|~i))+t[4]-145523070|0,n=(n<<6|n>>>26)+r|0,i+=(r^(n|~o))+t[11]-1120210379|0,i=(i<<10|i>>>22)+n|0,o+=(n^(i|~r))+t[2]+718787259|0,o=(o<<15|o>>>17)+i|0,r+=(i^(o|~n))+t[9]-343485551|0,r=(r<<21|r>>>11)+o|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=o+e[2]|0,e[3]=i+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function o(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function i(e){var t,o,i,a,s,u,l=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(c,r(e.substring(t-64,t)));for(e=e.substring(t-64),o=e.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<o;t+=1)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(n(c,i),t=0;t<16;t+=1)i[t]=0;return a=8*l,a=a.toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,i[14]=s,i[15]=u,n(c,i),c}function a(e){var t,r,i,a,s,u,l=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(c,o(e.subarray(t-64,t)));for(e=t-64<l?e.subarray(t-64):new Uint8Array(0),r=e.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)i[t>>2]|=e[t]<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(n(c,i),t=0;t<16;t+=1)i[t]=0;return a=8*l,a=a.toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,i[14]=s,i[15]=u,n(c,i),c}function s(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e,t){var n,r=e.length,o=new ArrayBuffer(r),i=new Uint8Array(o);for(n=0;n<r;n+=1)i[n]=e.charCodeAt(n);return t?i:o}function h(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function p(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function f(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function d(){this.reset()}return"5d41402abc4b2a76b9719d911017c592"!==u(i("hello"))&&function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n},"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return e=0|e||0,e<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var o,i,a,s,u=this.byteLength,l=t(n,u),c=u;return r!==e&&(c=t(r,u)),l>c?new ArrayBuffer(0):(o=c-l,i=new ArrayBuffer(o),a=new Uint8Array(i),s=new Uint8Array(this,l,o),a.set(s),i)}}(),d.prototype.append=function(e){return this.appendBinary(l(e)),this},d.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,o=this._buff.length;for(t=64;t<=o;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},d.prototype.end=function(e){var t,n,r=this._buff,o=r.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<o;t+=1)i[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(i,o),n=u(this._hash),e&&(n=f(n)),this.reset(),n},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(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},d.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},d.prototype._finish=function(e,t){var r,o,i,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,e),a=0;a<16;a+=1)e[a]=0;r=8*this._length,r=r.toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(r[2],16),i=parseInt(r[1],16)||0,e[14]=o,e[15]=i,n(this._hash,e)},d.hash=function(e,t){return d.hashBinary(l(e),t)},d.hashBinary=function(e,t){var n=i(e),r=u(n);return t?f(r):r},d.ArrayBuffer=function(){this.reset()},d.ArrayBuffer.prototype.append=function(e){var t,r=p(this._buff.buffer,e,!0),i=r.length;for(this._length+=e.byteLength,t=64;t<=i;t+=64)n(this._hash,o(r.subarray(t-64,t)));return this._buff=t-64<i?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},d.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,o=r.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<o;t+=1)i[t>>2]|=r[t]<<(t%4<<3);return this._finish(i,o),n=u(this._hash),e&&(n=f(n)),this.reset(),n},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 e=d.prototype.getState.call(this);return e.buff=h(e.buff),e},d.ArrayBuffer.prototype.setState=function(e){return e.buff=c(e.buff,!0),d.prototype.setState.call(this,e)},d.ArrayBuffer.prototype.destroy=d.prototype.destroy,d.ArrayBuffer.prototype._finish=d.prototype._finish,d.ArrayBuffer.hash=function(e,t){var n=a(new Uint8Array(e)),r=u(n);return t?f(r):r},d}))},4257:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(6252),o=n(3577);const i={class:"mark-green1"},a=(0,r._)("div",{class:"mark-green2"},[(0,r._)("div",{class:"mark-green3"})],-1),s=[a];function u(e,t){return(0,r.wg)(),(0,r.iD)("div",i,s)}var l=n(3744);const c={},h=(0,l.Z)(c,[["render",u]]);var p=h;const f={class:"bg"},d={class:"bg-tit"},y={style:{display:"flex","align-items":"center",flex:"1","flex-shrink":"0","min-width":"200px"}};var g=(0,r.aZ)({__name:"bg",props:{istitle:{type:String,default:()=>""}},setup(e){const t=e;return(e,n)=>{const i=(0,r.up)("el-text");return(0,r.wg)(),(0,r.iD)("div",f,[(0,r._)("div",d,[(0,r._)("div",y,[(0,r.Wm)(p),(0,r.Wm)(i,{style:{"margin-left":"20px"},tag:"b"},{default:(0,r.w5)((()=>[(0,r.WI)(e.$slots,"tit",{},(()=>[(0,r.Uk)((0,o.zw)(t.istitle),1)]))])),_:3})]),(0,r.WI)(e.$slots,"btn")]),(0,r.WI)(e.$slots,"bg")])}}});const v=g;var m=v},1271:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(6252),o=n(3577),i=n(2262);const a={class:"searchAdd"},s={class:"searchAdd-left"},u={class:"searchAdd-right"};var l=(0,r.aZ)({__name:"searchAdd",props:{isButtom:{type:String,default:()=>""},labelWidth:{type:String,default:()=>"100"},inline:{type:Boolean,default:()=>!0}},emits:["event"],setup(e,{emit:t}){const n=e,l=(0,i.qj)({input:""}),c=t,h=()=>{c("event",l.input)};return(e,t)=>{const i=(0,r.up)("el-button"),l=(0,r.up)("el-form-item"),c=(0,r.up)("el-form");return(0,r.wg)(),(0,r.iD)("div",a,[(0,r._)("div",s,[(0,r.Wm)(c,{inline:n.inline},{default:(0,r.w5)((()=>[(0,r.WI)(e.$slots,"searchConter"),(0,r.Wm)(l,null,{default:(0,r.w5)((()=>[(0,r.Wm)(i,{type:"primary",onClick:h},{default:(0,r.w5)((()=>[(0,r.Uk)((0,o.zw)(n.isButtom),1)])),_:1})])),_:1})])),_:3},8,["inline"])]),(0,r._)("div",u,[(0,r.WI)(e.$slots,"searchBtn")])])}}});const c=l;var h=c},6115:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(6252),o=n(2262),i=n(3577);const a=(e,t={},n=!0,r)=>{const i=(0,o.qj)({tableData:[],loading:!0,pageable:{pageNum:1,pageSize:8,total:0,RemainingTime:0,small:!0,disabled:!1},searchParam:{},searchInitParam:{},totalParam:{}}),a=async()=>{const n={page:i.pageable.pageNum,pageSize:i.pageable.pageSize,...t};e(n).then((e=>{i.tableData=e.data?.list||[],i.pageable.total=parseInt(e.data?.count),e.Data?.RemainingTime&&(i.pageable.RemainingTime=e.Data.RemainingTime),i.loading=!1}))},s=e=>{i.pageable.pageSize=e,a()},u=e=>{i.pageable.pageNum=e,a()},l=()=>{i.pageable.pageNum=1,a()};return{...(0,o.BK)(i),getTableList:a,searchTable:l,handleSizeChange:s,handleCurrentChange:u}},s={class:"y-tabs"},u={key:0,style:{color:"red"}},l={style:{"margin-top":"20px"}};var c=(0,r.aZ)({__name:"table",props:{columns:{default:()=>[]},requestApi:{},dataCallback:{},title:{},pagination:{type:Boolean,default:!0},layout:{default:"total, sizes, prev, pager, next, jumper"},initParam:{default:{}},border:{type:Boolean,default:!0},toolButton:{type:Boolean,default:!0},selectId:{default:"id"},displayHeader:{type:Boolean},rowClick:{},selectionChange:{},getRowKey:{},tableRowClassName:{},size:{},width:{},height:{},maxHeight:{},fit:{type:Boolean},stripe:{type:Boolean},rowKey:{},context:{},showHeader:{type:Boolean},showSummary:{type:Boolean},sumText:{},summaryMethod:{},rowClassName:{},rowStyle:{},cellClassName:{},cellStyle:{},headerRowClassName:{},headerRowStyle:{},headerCellClassName:{},headerCellStyle:{},highlightCurrentRow:{type:Boolean},currentRowKey:{},emptyText:{},expandRowKeys:{},defaultExpandAll:{type:Boolean},defaultSort:{},tooltipEffect:{},tooltipOptions:{},spanMethod:{},selectOnIndeterminate:{type:Boolean},indent:{},treeProps:{},lazy:{type:Boolean},load:{},className:{},style:{},tableLayout:{},scrollbarAlwaysOn:{type:Boolean},flexible:{type:Boolean},showOverflowTooltip:{type:[Boolean,Object]}},setup(e,{expose:t}){const n=e,{tableData:c,getTableList:h,pageable:p,loading:f,handleSizeChange:d,handleCurrentChange:y}=a(n.requestApi,n.initParam,n.pagination,n.dataCallback);h();const g=(0,o.iH)(n.columns);return t({getTableList:h,tableColumns:g,props:n}),(e,t)=>{const a=(0,r.up)("el-table-column"),h=(0,r.up)("el-tooltip"),v=(0,r.up)("el-empty"),m=(0,r.up)("el-table"),w=(0,r.up)("el-pagination"),b=(0,r.Q2)("loading");return(0,r.wg)(),(0,r.iD)("div",s,[(0,r.wy)(((0,r.wg)(),(0,r.j4)(m,{data:(0,o.SU)(c),onRowClick:n.rowClick,onSelectionChange:n.selectionChange,"row-key":n.getRowKey,border:n.border,"max-height":"450","row-style":e.tableRowClassName,"table-layout":"auto"},{append:(0,r.w5)((()=>[(0,r.WI)(e.$slots,"append")])),empty:(0,r.w5)((()=>[(0,r.Wm)(v)])),default:(0,r.w5)((()=>[(0,r.WI)(e.$slots,"default"),((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(g.value,(t=>((0,r.wg)(),(0,r.iD)(r.HY,{key:t},["selection"==t.type||"index"==t.type?((0,r.wg)(),(0,r.j4)(a,(0,r.dG)({key:0},t,{align:t.align??"center","reserve-selection":"selection"==t.type,"show-overflow-tooltip":!0}),null,16,["align","reserve-selection"])):(0,r.kq)("",!0),"expand"===t.type?((0,r.wg)(),(0,r.j4)(a,(0,r.dG)({key:1},t,{align:t.align??"center","show-overflow-tooltip":!0}),{default:(0,r.w5)((n=>[t.render?((0,r.wg)(),(0,r.j4)((0,r.LL)(t.render),{key:0,row:n.row},null,8,["row"])):(0,r.WI)(e.$slots,t.type,{key:1,row:n.row})])),_:2},1040,["align"])):(0,r.kq)("",!0),!t.type&&t.prop&&t.name!==t.prop?((0,r.wg)(),(0,r.j4)(a,(0,r.dG)({key:2},t,{align:t.align??"center","show-overflow-tooltip":!0}),{default:(0,r.w5)((n=>["T_wait_audit"==t.prop?((0,r.wg)(),(0,r.iD)("div",u,(0,i.zw)(1==n.row[t.prop]?"待审核":""),1)):(0,r.kq)("",!0),t.ellipsis?((0,r.wg)(),(0,r.j4)(h,{key:1,effect:"dark",content:n.row[t.prop],placement:"bottom"},{default:(0,r.w5)((()=>[(0,r.Uk)((0,i.zw)(n.row[t.prop]),1)])),_:2},1032,["content"])):(0,r.kq)("",!0),t.fixed?(0,r.WI)(e.$slots,t.fixed,{key:2,row:n.row}):(0,r.kq)("",!0)])),_:2},1040,["align"])):(0,r.kq)("",!0),!t.type&&t.prop&&t.name===t.prop?((0,r.wg)(),(0,r.j4)(a,(0,r.dG)({key:3},t,{align:t.align??"center","show-overflow-tooltip":!0}),{default:(0,r.w5)((n=>[(0,r.WI)(e.$slots,t.prop,{row:n.row})])),_:2},1040,["align"])):(0,r.kq)("",!0)],64)))),128))])),_:3},8,["data","onRowClick","onSelectionChange","row-key","border","row-style"])),[[b,(0,o.SU)(f)]]),(0,r._)("div",l,[e.pagination?((0,r.wg)(),(0,r.j4)(w,{key:0,"current-page":(0,o.SU)(p).pageNum,"onUpdate:currentPage":t[0]||(t[0]=e=>(0,o.SU)(p).pageNum=e),"page-size":(0,o.SU)(p).pageSize,"onUpdate:pageSize":t[1]||(t[1]=e=>(0,o.SU)(p).pageSize=e),layout:n.layout,total:(0,o.SU)(p).total,"page-sizes":[8,10,20,50],onSizeChange:(0,o.SU)(d),onCurrentChange:(0,o.SU)(y)},null,8,["current-page","page-size","layout","total","onSizeChange","onCurrentChange"])):(0,r.kq)("",!0)])])}}});const h=c;var p=h},7179:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Bt}});var r,o=n(6252),i=n(2262),a=n(2531),s=n(6115),u=(n(560),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());(function(e){e["InvalidFile"]="InvalidFile",e["InvalidToken"]="InvalidToken",e["InvalidMetadata"]="InvalidMetadata",e["InvalidChunkSize"]="InvalidChunkSize",e["InvalidCustomVars"]="InvalidCustomVars",e["NotAvailableUploadHost"]="NotAvailableUploadHost",e["ReadCacheFailed"]="ReadCacheFailed",e["InvalidCacheData"]="InvalidCacheData",e["WriteCacheFailed"]="WriteCacheFailed",e["RemoveCacheFailed"]="RemoveCacheFailed",e["GetCanvasContextFailed"]="GetCanvasContextFailed",e["UnsupportedFileType"]="UnsupportedFileType",e["FileReaderReadFailed"]="FileReaderReadFailed",e["NotAvailableXMLHttpRequest"]="NotAvailableXMLHttpRequest",e["InvalidProgressEventTarget"]="InvalidProgressEventTarget",e["RequestError"]="RequestError"})(r||(r={}));var l=function(){function e(e,t){this.name=e,this.message=t,this.stack=(new Error).stack}return e}(),c=function(e){function t(t,n,o,i){var a=e.call(this,r.RequestError,o)||this;return a.code=t,a.reqId=n,a.isRequestError=!0,a.data=i,a}return u(t,e),t}(l),h=function(e){function t(t,n){return void 0===n&&(n=""),e.call(this,0,n,t)||this}return u(t,e),t}(c),p=function(){function e(e,t){this.runTask=e,this.limit=t,this.aborted=!1,this.queue=[],this.processing=[]}return e.prototype.enqueue=function(e){var t=this;return new Promise((function(n,r){t.queue.push({task:e,resolve:n,reject:r}),t.check()}))},e.prototype.run=function(e){var t=this;this.queue=this.queue.filter((function(t){return t!==e})),this.processing.push(e),this.runTask(e.task).then((function(){t.processing=t.processing.filter((function(t){return t!==e})),e.resolve(),t.check()}),(function(t){return e.reject(t)}))},e.prototype.check=function(){var e=this;if(!this.aborted){var t=this.processing.length,n=this.limit-t;this.queue.slice(0,n).forEach((function(t){e.run(t)}))}},e.prototype.abort=function(){this.queue=[],this.aborted=!0},e}(),f=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},y=function(){function e(){this.closed=!1}return e.prototype.unsubscribe=function(){this.closed||(this.closed=!0,this._unsubscribe&&this._unsubscribe())},e.prototype.add=function(e){this._unsubscribe=e},e}(),g=function(e){function t(t,n,r){var o=e.call(this)||this;return o.isStopped=!1,o.destination=t&&"object"===typeof t?t:d(d(d({},t&&{next:t}),n&&{error:n}),r&&{complete:r}),o}return f(t,e),t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype.next=function(e){!this.isStopped&&this.destination.next&&this.destination.next(e)},t.prototype.error=function(e){!this.isStopped&&this.destination.error&&(this.isStopped=!0,this.destination.error(e))},t.prototype.complete=function(e){!this.isStopped&&this.destination.complete&&(this.isStopped=!0,this.destination.complete(e))},t}(y),v=function(){function e(e){this._subscribe=e}return e.prototype.subscribe=function(e,t,n){var r=new g(e,t,n);return r.add(this._subscribe(r)),r},e}();function m(e){if(null===e||"undefined"===typeof e)return"";var t,n,r=e+"",o="",i=0;t=n=0,i=r.length;for(var a=0;a<i;a++){var s=r.charCodeAt(a),u=null;if(s<128)n++;else if(s>127&&s<2048)u=String.fromCharCode(s>>6|192,63&s|128);else if((63488&s^55296)>0)u=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 l=r.charCodeAt(++a);if((64512&l^56320)>0)throw new RangeError("Unmatched lead surrogate at "+(a-1));s=((1023&s)<<10)+(1023&l)+65536,u=String.fromCharCode(s>>18|240,s>>12&63|128,s>>6&63|128,63&s|128)}null!==u&&(n>t&&(o+=r.slice(t,n)),o+=u,t=n=a+1)}return n>t&&(o+=r.slice(t,i)),o}function w(e){var t=[],n=0,r=0,o=0;e+="";while(n<e.length){r=255&e.charCodeAt(n),o=0,r<=191?(r&=127,o=1):r<=223?(r&=31,o=2):r<=239?(r&=15,o=3):(r&=7,o=4);for(var i=1;i<o;++i)r=r<<6|63&e.charCodeAt(i+n);4===o?(r-=65536,t.push(String.fromCharCode(55296|r>>10&1023)),t.push(String.fromCharCode(56320|1023&r))):t.push(String.fromCharCode(r)),n+=o}return t.join("")}function b(e){var t,n,r,o,i,a,s,u,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=0,h=0,p="",f=[];if(!e)return e;e=m(e+"");do{t=e.charCodeAt(c++),n=e.charCodeAt(c++),r=e.charCodeAt(c++),u=t<<16|n<<8|r,o=u>>18&63,i=u>>12&63,a=u>>6&63,s=63&u,f[h++]=l.charAt(o)+l.charAt(i)+l.charAt(a)+l.charAt(s)}while(c<e.length);switch(p=f.join(""),e.length%3){case 1:p=p.slice(0,-2)+"==";break;case 2:p=p.slice(0,-1)+"=";break}return p}function k(e){var t,n,r,o,i,a,s,u,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=0,h=0,p="",f=[];if(!e)return e;e+="";do{o=l.indexOf(e.charAt(c++)),i=l.indexOf(e.charAt(c++)),a=l.indexOf(e.charAt(c++)),s=l.indexOf(e.charAt(c++)),u=o<<18|i<<12|a<<6|s,t=u>>16&255,n=u>>8&255,r=255&u,f[h++]=64===a?String.fromCharCode(t):64===s?String.fromCharCode(t,n):String.fromCharCode(t,n,r)}while(c<e.length);return p=f.join(""),w(p)}function C(e){return e=b(e),e.replace(/\//g,"_").replace(/\+/g,"-")}function x(e){return e=e.replace(/_/g,"/").replace(/-/g,"+"),k(e)}var _,S=n(6021),U=n.n(S),P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},P.apply(this,arguments)},I=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r["throw"](e))}catch(t){i(t)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))},A=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(e){return function(t){return u([e,t])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},z=Math.pow(1024,2);function O(e,t){var n=t*z;if(n>e.size)n=e.size;else while(e.size>1e4*n)n*=2;for(var r=[],o=Math.ceil(e.size/n),i=0;i<o;i++){var a=e.slice(n*i,i===o-1?e.size:n*(i+1));r.push(a)}return r}function R(e){return Object.keys(e).every((function(e){return 0===e.indexOf("x-qn-meta-")}))}function j(e){return Object.keys(e).every((function(e){return 0===e.indexOf("x:")}))}function T(e){return e.reduce((function(e,t){return e+t}),0)}function E(e,t,n){try{localStorage.setItem(e,JSON.stringify(t))}catch(o){n.warn(new l(r.WriteCacheFailed,"setLocalFileInfo failed: "+e))}}function L(e,t,n){var r=null==t?"_":"_key_"+t+"_";return"qiniu_js_sdk_upload_file_name_"+e+r+"size_"+n}function q(e,t){try{localStorage.removeItem(e)}catch(n){t.warn(new l(r.RemoveCacheFailed,"removeLocalFileInfo failed. key: "+e))}}function D(e,t){var n=null;try{n=localStorage.getItem(e)}catch(_){t.warn(new l(r.ReadCacheFailed,"getLocalFileInfo failed. key: "+e))}if(null==n)return null;var o=null;try{o=JSON.parse(n)}catch(i){q(e,t),t.warn(new l(r.InvalidCacheData,"getLocalFileInfo failed to parse. key: "+e))}return o}function F(e){var t="UpToken "+e;return{Authorization:t}}function H(e){var t=F(e);return P({"content-type":"application/octet-stream"},t)}function B(e){var t=F(e);return P({"content-type":"application/json"},t)}function W(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)return new window.ActiveXObject("Microsoft.XMLHTTP");throw new l(r.NotAvailableXMLHttpRequest,"the current environment does not support.")}function N(e){return I(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:return[4,M(e)];case 1:return t=r.sent(),n=new(U().ArrayBuffer),n.append(t),[2,n.end()]}}))}))}function M(e){return new Promise((function(t,n){var o=new FileReader;o.onload=function(e){if(e.target){var o=e.target.result;t(o)}else n(new l(r.InvalidProgressEventTarget,"progress event target is undefined"))},o.onerror=function(){n(new l(r.FileReaderReadFailed,"fileReader read failed"))},o.readAsArrayBuffer(e)}))}function V(e,t){return new Promise((function(n,r){var o=W();if(o.open(t.method,e),t.onCreate&&t.onCreate(o),t.headers){var i=t.headers;Object.keys(i).forEach((function(e){o.setRequestHeader(e,i[e])}))}o.upload.addEventListener("progress",(function(e){e.lengthComputable&&t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})})),o.onreadystatechange=function(){var e=o.responseText;if(4===o.readyState){var t=o.getResponseHeader("x-reqId")||"";if(0!==o.status)if(200===o.status)try{n({data:JSON.parse(e),reqId:t})}catch(s){r(s)}else{var i="xhr request failed, code: "+o.status;e&&(i+=" response: "+e);var a=void 0;try{a=JSON.parse(e)}catch(_){}r(new c(o.status,t,i,a))}else r(new h("network error.",t))}},o.send(t.body)}))}function G(e){if(e&&e.match){var t=e.match(/(^https?)/);if(!t)return"";var n=t[1];return t=e.match(/^https?:\/\/([^:^/]*):(\d*)/),t?t[2]:"http"===n?"80":"443"}return""}function K(e){if(e&&e.match){var t=e.match(/^https?:\/\/([^:^/]*)/);return t?t[1]:""}return""}function Z(e){if(!e)throw new l(r.InvalidToken,"invalid token.");var t=e.split(":");if(1===t.length)throw new l(r.InvalidToken,"invalid token segments.");var n=t.length>3?t[1]:t[0];if(!n)throw new l(r.InvalidToken,"missing assess key field.");var o=null;try{o=JSON.parse(x(t[t.length-1]))}catch(a){throw new l(r.InvalidToken,"token parse failed.")}if(null==o)throw new l(r.InvalidToken,"putPolicy is null.");if(null==o.scope)throw new l(r.InvalidToken,"scope field is null.");var i=o.scope.split(":")[0];if(!i)throw new l(r.InvalidToken,"resolve bucketName failed.");return{assessKey:n,bucketName:i,scope:o.scope}}function $(e){var t=window.URL||window.webkitURL||window.mozURL;return t.createObjectURL(e)}var X={z0:"z0",z1:"z1",z2:"z2",na0:"na0",as0:"as0",cnEast2:"cn-east-2"},Q=(_={},_[X.z0]={srcUphost:["up.qiniup.com"],cdnUphost:["upload.qiniup.com"]},_[X.z1]={srcUphost:["up-z1.qiniup.com"],cdnUphost:["upload-z1.qiniup.com"]},_[X.z2]={srcUphost:["up-z2.qiniup.com"],cdnUphost:["upload-z2.qiniup.com"]},_[X.na0]={srcUphost:["up-na0.qiniup.com"],cdnUphost:["upload-na0.qiniup.com"]},_[X.as0]={srcUphost:["up-as0.qiniup.com"],cdnUphost:["upload-as0.qiniup.com"]},_[X.cnEast2]={srcUphost:["up-cn-east-2.qiniup.com"],cdnUphost:["upload-cn-east-2.qiniup.com"]},_),J=n(1134),Y=function(){return Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Y.apply(this,arguments)},ee=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r["throw"](e))}catch(t){i(t)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))},te=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(e){return function(t){return u([e,t])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}};function ne(e,t,n){return ee(this,void 0,void 0,(function(){var r,o;return te(this,(function(i){return r=(0,J.stringify)({ak:e,bucket:t}),o=n+"://api.qiniu.com/v2/query?"+r,[2,V(o,{method:"GET"})]}))}))}function re(e,t,n){var r=n.url,o=n.id;return r+"/buckets/"+e+"/objects/"+(null!=t?C(t):"~")+"/uploads/"+o}function oe(e,t,n,r){var o=r+"/buckets/"+t+"/objects/"+(null!=n?C(n):"~")+"/uploads";return V(o,{method:"POST",headers:F(e)})}function ie(e,t,n,r,o){var i=Z(e).bucketName,a=re(i,t,r)+"/"+n,s=H(e);return o.md5&&(s["Content-MD5"]=o.md5),V(a,Y(Y({},o),{method:"PUT",headers:s}))}function ae(e,t,n,r){var o=Z(e).bucketName,i=re(o,t,n);return V(i,Y(Y({},r),{method:"POST",headers:B(e)}))}function se(e,t,n){return V(e,Y({method:"POST",body:t},n))}var ue=function(){return ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ue.apply(this,arguments)},le=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r["throw"](e))}catch(t){i(t)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ce=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(e){return function(t){return u([e,t])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},he=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{while((void 0===t||t-- >0)&&!(r=i.next()).done)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return a},pe=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(he(arguments[t]));return e},fe=4,de=[0,502,503,504,599],ye=pe(de,[612]),ge=Math.pow(1024,3),ve=function(){function e(e,t,n,r){this.hostPool=n,this.logger=r,this.aborted=!1,this.retryCount=0,this.xhrList=[],this.config=e.config,r.info("config inited.",this.config),this.putExtra=ue({fname:""},e.putExtra),r.info("putExtra inited.",this.putExtra),this.key=e.key,this.file=e.file,this.token=e.token,this.onData=t.onData,this.onError=t.onError,this.onComplete=t.onComplete;try{var o=Z(this.token);this.bucketName=o.bucketName,this.assessKey=o.assessKey}catch(i){r.error("get putPolicy from token failed.",i),this.onError(i)}}return e.prototype.checkAndUpdateUploadHost=function(){return le(this,void 0,void 0,(function(){var e;return ce(this,(function(t){switch(t.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(e=t.sent(),null==e)throw new l(r.NotAvailableUploadHost,"no available upload host.");return null!=this.uploadHost&&this.uploadHost.host!==e.host?this.logger.warn("host switches from "+this.uploadHost.host+" to "+e.host+"."):this.logger.info("use host "+e.host+"."),this.uploadHost=e,[2]}}))}))},e.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())},e.prototype.checkAndFreezeHost=function(e){this.logger.info("check freeze host."),e instanceof c&&null!=this.uploadHost&&de.includes(e.code)&&(this.logger.warn(this.uploadHost.host+" will be temporarily frozen."),this.uploadHost.freeze())},e.prototype.handleError=function(e){this.logger.error(e.message),this.onError(e)},e.prototype.putFile=function(){return le(this,void 0,void 0,(function(){var e,t,n,o;return ce(this,(function(i){switch(i.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*ge)return this.handleError(new l(r.InvalidFile,"file size exceed maximum value 10000G")),[2];if(this.putExtra.customVars&&!j(this.putExtra.customVars))return this.handleError(new l(r.InvalidCustomVars,"customVars key should start width x:")),[2];if(this.putExtra.metadata&&!R(this.putExtra.metadata))return this.handleError(new l(r.InvalidMetadata,"metadata key should start with x-qn-meta-")),[2];i.label=1;case 1:return i.trys.push([1,4,,5]),this.uploadAt=(new Date).getTime(),[4,this.checkAndUpdateUploadHost()];case 2:return i.sent(),[4,this.run()];case 3:return e=i.sent(),this.onComplete(e.data),this.checkAndUnfreezeHost(),this.sendLog(e.reqId,200),[2];case 4:return t=i.sent(),this.aborted?(this.logger.warn("upload is aborted."),this.sendLog("",-2),[2]):(this.clear(),this.logger.error(t),t instanceof c&&(this.sendLog(t.reqId,t.code),this.checkAndFreezeHost(t),n=++this.retryCount<=this.config.retryCount,o=ye.includes(t.code),o&&n)?(this.logger.warn("error auto retry: "+this.retryCount+"/"+this.config.retryCount+"."),this.putFile(),[2]):(this.onError(t),[3,5]));case 5:return[2]}}))}))},e.prototype.clear=function(){this.xhrList.forEach((function(e){e.onreadystatechange=null,e.abort()})),this.xhrList=[],this.logger.info("cleanup uploading xhr.")},e.prototype.stop=function(){this.logger.info("aborted."),this.clear(),this.aborted=!0},e.prototype.addXhr=function(e){this.xhrList.push(e)},e.prototype.sendLog=function(e,t){var n,r;this.logger.report({code:t,reqId:e,remoteIp:"",upType:"jssdk-h5",size:this.file.size,time:Math.floor(this.uploadAt/1e3),port:G(null===(n=this.uploadHost)||void 0===n?void 0:n.getUrl()),host:K(null===(r=this.uploadHost)||void 0===r?void 0:r.getUrl()),bytesSent:this.progress?this.progress.total.loaded:0,duration:Math.floor(((new Date).getTime()-this.uploadAt)/1e3)})},e.prototype.getProgressInfoItem=function(e,t,n){return ue({size:t,loaded:e,percent:e/t*100},null==n?{}:{fromCache:n})},e}(),me=ve,we=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),be=function(){return be=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},be.apply(this,arguments)},ke=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r["throw"](e))}catch(t){i(t)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ce=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(e){return function(t){return u([e,t])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}};function xe(e){var t=/^[1-9]\d*$/;return t.test(String(e))}var _e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return we(t,e),t.prototype.run=function(){return ke(this,void 0,void 0,(function(){var e,t,n,o,i,a=this;return Ce(this,(function(s){switch(s.label){case 0:if(this.logger.info("start run Resume."),!this.config.chunkSize||!xe(this.config.chunkSize))throw new l(r.InvalidChunkSize,"chunkSize must be a positive integer");if(this.config.chunkSize>1024)throw new l(r.InvalidChunkSize,"chunkSize maximum value is 1024");return[4,this.initBeforeUploadChunks()];case 1:s.sent(),e=new p((function(t){return ke(a,void 0,void 0,(function(){return Ce(this,(function(n){switch(n.label){case 0:if(this.aborted)throw e.abort(),new Error("pool is aborted");return[4,this.uploadChunk(t)];case 1:return n.sent(),[2]}}))}))}),this.config.concurrentRequestLimit),t=null,n=this.getLocalKey(),o=this.chunks.map((function(t,n){return e.enqueue({chunk:t,index:n})})),s.label=2;case 2:return s.trys.push([2,5,,6]),[4,Promise.all(o)];case 3:return s.sent(),[4,this.mkFileReq()];case 4:return t=s.sent(),[3,6];case 5:throw i=s.sent(),i instanceof c&&(612===i.code||400===i.code)&&q(n,this.logger),i;case 6:return q(n,this.logger),[2,t]}}))}))},t.prototype.uploadChunk=function(e){return ke(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,l,c=this;return Ce(this,(function(h){switch(h.label){case 0:return t=e.index,n=e.chunk,r=this.cachedUploadedList[t],this.logger.info("upload part "+t+", cache:",r),o=this.config.checkByMD5,i=function(){c.usedCacheList[t]=!0,c.updateChunkProgress(n.size,t),c.uploadedList[t]=r,c.updateLocalCache()},r&&!o?(i(),[2]):[4,N(n)];case 1:return a=h.sent(),this.logger.info("computed part md5.",a),r&&a===r.md5?(i(),[2]):(this.usedCacheList[t]=!1,s=function(e){c.updateChunkProgress(e.loaded,t)},u={body:n,md5:this.config.checkByServer?a:void 0,onProgress:s,onCreate:function(e){return c.addXhr(e)}},this.logger.info("part "+t+" start uploading."),[4,ie(this.token,this.key,e.index+1,this.getUploadInfo(),u)]);case 2:return l=h.sent(),this.logger.info("part "+t+" upload completed."),s({loaded:n.size,total:n.size}),this.uploadedList[t]={etag:l.data.etag,md5:l.data.md5,size:n.size},this.updateLocalCache(),[2]}}))}))},t.prototype.mkFileReq=function(){return ke(this,void 0,void 0,(function(){var e,t,n=this;return Ce(this,(function(r){switch(r.label){case 0:return e=be(be(be({parts:this.uploadedList.map((function(e,t){return{etag:e.etag,partNumber:t+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.",e),[4,ae(this.token,this.key,this.getUploadInfo(),{onCreate:function(e){return n.addXhr(e)},body:JSON.stringify(e)})];case 1:return t=r.sent(),this.logger.info("finish Resume Progress."),this.updateMkFileProgress(1),[2,t]}}))}))},t.prototype.initBeforeUploadChunks=function(){return ke(this,void 0,void 0,(function(){var e,t,n;return Ce(this,(function(r){switch(r.label){case 0:return this.uploadedList=[],this.usedCacheList=[],e=D(this.getLocalKey(),this.logger),e?[3,2]:(this.logger.info("init upload parts from api."),[4,oe(this.token,this.bucketName,this.key,this.uploadHost.getUrl())]);case 1:return t=r.sent(),this.logger.info("initd upload parts of id: "+t.data.uploadId+"."),this.uploadId=t.data.uploadId,this.cachedUploadedList=[],[3,3];case 2:n=["resume upload parts from local cache,","total "+e.data.length+" part,","id is "+e.id+"."],this.logger.info(n.join(" ")),this.cachedUploadedList=e.data,this.uploadId=e.id,r.label=3;case 3:return this.chunks=O(this.file,this.config.chunkSize),this.loaded={mkFileProgress:0,chunks:this.chunks.map((function(e){return 0}))},this.notifyResumeProgress(),[2]}}))}))},t.prototype.getUploadInfo=function(){return{id:this.uploadId,url:this.uploadHost.getUrl()}},t.prototype.getLocalKey=function(){return L(this.file.name,this.key,this.file.size)},t.prototype.updateLocalCache=function(){E(this.getLocalKey(),{id:this.uploadId,data:this.uploadedList},this.logger)},t.prototype.updateChunkProgress=function(e,t){this.loaded.chunks[t]=e,this.notifyResumeProgress()},t.prototype.updateMkFileProgress=function(e){this.loaded.mkFileProgress=e,this.notifyResumeProgress()},t.prototype.notifyResumeProgress=function(){var e=this;this.progress={total:this.getProgressInfoItem(T(this.loaded.chunks)+this.loaded.mkFileProgress,this.file.size+1),chunks:this.chunks.map((function(t,n){var r=e.usedCacheList[n];return e.getProgressInfoItem(e.loaded.chunks[n],t.size,r)})),uploadInfo:{id:this.uploadId,url:this.uploadHost.getUrl()}},this.onData(this.progress)},t}(me),Se=_e,Ue=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r["throw"](e))}catch(t){i(t)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Pe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(e){return function(t){return u([e,t])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},Ie=function(){function e(){this.crc=-1,this.table=this.makeTable()}return e.prototype.makeTable=function(){for(var e=new Array,t=0;t<256;t++){for(var n=t,r=0;r<8;r++)1&n?n=n>>>1^3988292384:n>>>=1;e[t]=n}return e},e.prototype.append=function(e){for(var t=this.crc,n=0;n<e.byteLength;n++)t=t>>>8^this.table[255&(t^e[n])];this.crc=t},e.prototype.compute=function(){return(-1^this.crc)>>>0},e.prototype.readAsUint8Array=function(e){return Ue(this,void 0,void 0,(function(){var t;return Pe(this,(function(n){switch(n.label){case 0:return"function"!==typeof e.arrayBuffer?[3,2]:(t=Uint8Array.bind,[4,e.arrayBuffer()]);case 1:return[2,new(t.apply(Uint8Array,[void 0,n.sent()]))];case 2:return[2,new Promise((function(t,n){var r=new FileReader;r.onload=function(){null!=r.result&&"string"!==typeof r.result?t(new Uint8Array(r.result)):n()},r.readAsArrayBuffer(e)}))]}}))}))},e.prototype.file=function(e){return Ue(this,void 0,void 0,(function(){var t,n,r,o,i,a;return Pe(this,(function(s){switch(s.label){case 0:return e.size<=z?(t=this.append,[4,this.readAsUint8Array(e)]):[3,2];case 1:return t.apply(this,[s.sent()]),[2,this.compute()];case 2:n=Math.ceil(e.size/z),r=0,s.label=3;case 3:return r<n?(o=r*z,i=r===n-1?e.size:o+z,[4,this.readAsUint8Array(e.slice(o,i))]):[3,6];case 4:a=s.sent(),this.append(new Uint8Array(a)),s.label=5;case 5:return r++,[3,3];case 6:return[2,this.compute()]}}))}))},e.file=function(t){var n=new e;return n.file(t)},e}(),Ae=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ze=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r["throw"](e))}catch(t){i(t)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Oe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(e){return function(t){return u([e,t])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ae(t,e),t.prototype.run=function(){return ze(this,void 0,void 0,(function(){var e,t,n,r,o,i=this;return Oe(this,(function(a){switch(a.label){case 0:return this.logger.info("start run Direct."),e=new FormData,e.append("file",this.file),e.append("token",this.token),null!=this.key&&e.append("key",this.key),e.append("fname",this.putExtra.fname),this.config.checkByServer?[4,Ie.file(this.file)]:[3,2];case 1:t=a.sent(),e.append("crc32",t.toString()),a.label=2;case 2:return this.putExtra.customVars&&(this.logger.info("init customVars."),n=this.putExtra.customVars,Object.keys(n).forEach((function(t){return e.append(t,n[t].toString())})),this.logger.info("customVars inited.")),this.putExtra.metadata&&(this.logger.info("init metadata."),r=this.putExtra.metadata,Object.keys(r).forEach((function(t){return e.append(t,r[t].toString())}))),this.logger.info("formData inited."),[4,se(this.uploadHost.getUrl(),e,{onProgress:function(e){i.updateDirectProgress(e.loaded,e.total)},onCreate:function(e){return i.addXhr(e)}})];case 3:return o=a.sent(),this.logger.info("Direct progress finish."),this.finishDirectProgress(),[2,o]}}))}))},t.prototype.updateDirectProgress=function(e,t){this.progress={total:this.getProgressInfoItem(e,t+1)},this.onData(this.progress)},t.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 e=this.progress.total;this.progress={total:this.getProgressInfoItem(e.loaded+1,e.size)},this.onData(this.progress)},t}(me),je=Re;function Te(e,t,n){void 0===n&&(n=3);var r=W();r.open("POST","https://uplog.qbox.me/log/3"),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.setRequestHeader("Authorization",F(e).Authorization),r.onreadystatechange=function(){4===r.readyState&&200!==r.status&&n>0&&Te(e,t,n-1)};var o=[t.code||"",t.reqId||"",t.host||"",t.remoteIp||"",t.port||"",t.duration||"",t.time||"",t.bytesSent||"",t.upType||"",t.size||""].join(",");r.send(o)}var Ee=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{while((void 0===t||t-- >0)&&!(r=i.next()).done)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return a},Le=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ee(arguments[t]));return e},qe=function(){function e(t,n,r,o){void 0===n&&(n=!0),void 0===r&&(r="OFF"),void 0===o&&(o="UPLOAD"),this.token=t,this.disableReport=n,this.level=r,this.prefix=o,this.id=++e.id}return e.prototype.getPrintPrefix=function(e){return"Qiniu-JS-SDK ["+e+"]["+this.prefix+"#"+this.id+"]:"},e.prototype.report=function(e,t){if(!this.disableReport)try{Te(this.token,e,t)}catch(n){this.warn(n)}},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["INFO"];n.includes(this.level)&&console.log.apply(console,Le([this.getPrintPrefix("INFO")],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["INFO","WARN"];n.includes(this.level)&&console.warn.apply(console,Le([this.getPrintPrefix("WARN")],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["INFO","WARN","ERROR"];n.includes(this.level)&&console.error.apply(console,Le([this.getPrintPrefix("ERROR")],e))},e.id=0,e}(),De=qe,Fe=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r["throw"](e))}catch(t){i(t)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))},He=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(e){return function(t){return u([e,t])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},Be=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{while((void 0===t||t-- >0)&&!(r=i.next()).done)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return a},We=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Be(arguments[t]));return e},Ne=new Map,Me=function(){function e(e,t){this.host=e,this.protocol=t}return e.prototype.isFrozen=function(){var e=(new Date).getTime(),t=Ne.get(this.host);return null!=t&&t>=e},e.prototype.freeze=function(e){void 0===e&&(e=20);var t=(new Date).getTime()+1e3*e;Ne.set(this.host,t)},e.prototype.unfreeze=function(){Ne["delete"](this.host)},e.prototype.getUrl=function(){return this.protocol+"://"+this.host},e.prototype.getUnfreezeTime=function(){return Ne.get(this.host)},e}(),Ve=function(){function e(e){void 0===e&&(e=[]),this.initHosts=e,this.cachedHostsMap=new Map}return e.prototype.register=function(e,t,n,r){this.cachedHostsMap.set(e+"@"+t,n.map((function(e){return new Me(e,r)})))},e.prototype.refresh=function(e,t,n){var r,o,i,a;return Fe(this,void 0,void 0,(function(){var s,u,l;return He(this,(function(c){switch(c.label){case 0:return s=this.cachedHostsMap.get(e+"@"+t)||[],s.length>0?[2]:this.initHosts.length>0?(this.register(e,t,this.initHosts,n),[2]):[4,ne(e,t,n)];case 1:return u=c.sent(),null!=(null===u||void 0===u?void 0:u.data)&&(l=We((null===(o=null===(r=u.data.up)||void 0===r?void 0:r.acc)||void 0===o?void 0:o.main)||[],(null===(a=null===(i=u.data.up)||void 0===i?void 0:i.acc)||void 0===a?void 0:a.backup)||[]),this.register(e,t,l,n)),[2]}}))}))},e.prototype.getUp=function(e,t,n){return Fe(this,void 0,void 0,(function(){var r,o,i;return He(this,(function(a){switch(a.label){case 0:return[4,this.refresh(e,t,n)];case 1:return a.sent(),r=this.cachedHostsMap.get(e+"@"+t)||[],0===r.length?[2,null]:(o=r.filter((function(e){return!e.isFrozen()})),o.length>0?[2,o[0]]:(i=r.slice().sort((function(e,t){return(e.getUnfreezeTime()||0)-(t.getUnfreezeTime()||0)})),[2,i[0]]))}}))}))},e}();function Ge(e,t,n,r){return e.config&&e.config.forceDirect?(r.info("ues forceDirect mode."),new je(e,t,n,r)):e.file.size>4*z?(r.info("file size over 4M, use Resume."),new Se(e,t,n,r)):(r.info("file size less or equal than 4M, use Direct."),new je(e,t,n,r))}function Ke(e,t,n,r,o){var i=new De(n,null===o||void 0===o?void 0:o.disableStatisticsReport,null===o||void 0===o?void 0:o.debugLogLevel,e.name),a={file:e,key:t,token:n,putExtra:r,config:Je(o,i)},s=new Ve(a.config.uphost);return new v((function(e){var t=Ge(a,{onData:function(t){return e.next(t)},onError:function(t){return e.error(t)},onComplete:function(t){return e.complete(t)}},s,i);return t.putFile(),t.stop.bind(t)}))}var Ze=function(){return Ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ze.apply(this,arguments)},$e=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Xe=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{while((void 0===t||t-- >0)&&!(r=i.next()).done)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return a},Qe=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Xe(arguments[t]));return e};function Je(e,t){var n=Ze({},e),r=n.upprotocol,o=n.uphost,i=$e(n,["upprotocol","uphost"]),a=Ze({uphost:[],retryCount:3,checkByMD5:!1,forceDirect:!1,useCdnDomain:!0,checkByServer:!1,concurrentRequestLimit:3,chunkSize:fe,upprotocol:"https",debugLogLevel:"OFF",disableStatisticsReport:!1},i);r&&(a.upprotocol=r.replace(/:$/,""));var s=[];if(t&&null!=(null===e||void 0===e?void 0:e.uphost)&&null!=(null===e||void 0===e?void 0:e.region)&&t.warn("do not use both the uphost and region config."),o)Array.isArray(o)?s.push.apply(s,Qe(o)):s.push(o);else if(null===a||void 0===a?void 0:a.region){var u=Q[null===a||void 0===a?void 0:a.region];a.useCdnDomain?s.push.apply(s,Qe(u.cdnUphost)):s.push.apply(s,Qe(u.srcUphost))}return Ze(Ze({},a),{uphost:s.filter(Boolean)})}var Ye=function(){return Ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ye.apply(this,arguments)},et=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r["throw"](e))}catch(t){i(t)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))},tt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(e){return function(t){return u([e,t])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}},nt={PNG:"image/png",JPEG:"image/jpeg",WEBP:"image/webp",BMP:"image/bmp"},rt=4,ot=Math.log(2),it=Object.keys(nt).map((function(e){return nt[e]})),at=nt.JPEG;function st(e){return it.includes(e)}(function(){function e(e,t){this.file=e,this.config=t,this.config=Ye({quality:.92,noCompressIfLarger:!1},this.config)}e.prototype.process=function(){return et(this,void 0,void 0,(function(){var e,t,n,o,i,a;return tt(this,(function(s){switch(s.label){case 0:if(this.outputType=this.file.type,e={},!st(this.file.type))throw new l(r.UnsupportedFileType,"unsupported file type: "+this.file.type);return[4,this.getOriginImage()];case 1:return t=s.sent(),[4,this.getCanvas(t)];case 2:return n=s.sent(),o=1,this.config.maxWidth&&(o=Math.min(1,this.config.maxWidth/n.width)),this.config.maxHeight&&(o=Math.min(1,o,this.config.maxHeight/n.height)),e.width=n.width,e.height=n.height,[4,this.doScale(n,o)];case 3:return i=s.sent(),a=this.toBlob(i),a.size>this.file.size&&this.config.noCompressIfLarger?[2,{dist:this.file,width:e.width,height:e.height}]:[2,{dist:a,width:i.width,height:i.height}]}}))}))},e.prototype.clear=function(e,t,n){this.outputType===at?(e.fillStyle="#fff",e.fillRect(0,0,t,n)):e.clearRect(0,0,t,n)},e.prototype.getOriginImage=function(){var e=this;return new Promise((function(t,n){var r=$(e.file),o=new Image;o.onload=function(){t(o)},o.onerror=function(){n("image load error")},o.src=r}))},e.prototype.getCanvas=function(e){var t=this;return new Promise((function(n,o){var i=document.createElement("canvas"),a=i.getContext("2d");if(a){var s=e.width,u=e.height;i.height=u,i.width=s,t.clear(a,s,u),a.drawImage(e,0,0),n(i)}else o(new l(r.GetCanvasContextFailed,"context is null"))}))},e.prototype.doScale=function(e,t){return et(this,void 0,void 0,(function(){var n,o,i,a,s,u,c,h,p,f,d,y,g,v,m,w;return tt(this,(function(b){if(1===t)return[2,e];if(n=e.getContext("2d"),o=Math.min(rt,Math.ceil(1/t/ot)),i=Math.pow(t,1/o),a=document.createElement("canvas"),s=a.getContext("2d"),u=e.width,c=e.height,h=u,p=c,a.width=u,a.height=c,!s||!n)throw new l(r.GetCanvasContextFailed,"mctx or sctx can't be null");for(y=0;y<o;y++)g=u*i|0,v=c*i|0,y===o-1&&(g=h*t,v=p*t),y%2===0?(f=e,d=s):(f=a,d=n),this.clear(d,u,c),d.drawImage(f,0,0,u,c,0,0,g,v),u=g,c=v;return m=f===e?a:e,w=d.getImageData(0,0,u,c),m.width=u,m.height=c,d.putImageData(w,0,0),[2,m]}))}))},e.prototype.toBlob=function(e){var t=e.toDataURL(this.outputType,this.config.quality),n=atob(t.split(",")[1]).split("").map((function(e){return e.charCodeAt(0)})),r=new Blob([new Uint8Array(n)],{type:this.outputType});return r}})();var ut=n(5781);const lt={class:"files"},ct=(0,o._)("h4",null,"上传图片",-1),ht={style:{display:"flex","flex-wrap":"wrap","grid-gap":"20px"}},pt=["src"],ft={class:"file-imgs-showDel"},dt={class:"file-imgs-showDel-item"},yt={class:"file-mais"},gt=["src"],vt={style:{flex:"auto"}};var mt=(0,o.aZ)({__name:"files",emits:["upTable"],setup(e,{expose:t,emit:n}){const r=(0,i.iH)(""),s=(0,i.iH)(!1),u=(0,i.iH)([]),l=async e=>{let t=e.target.files;for(let r=0;r<t.length;r++){const e=t[r];var n=e.name.substring(e.name.lastIndexOf(".")+1);const o=await c(n);h(e,o.data)}},c=async e=>await(0,a.dS)({T_suffix:e}),h=(e,t)=>{X.z2;var n=e.name||null;const r=Ke(e,n,t);r.subscribe({next(e){console.log(e)},error(e){console.log(`上传错误信息: ${e}`)},complete(e){u.value.push(e.key),console.log("上传完成信息"),console.log(u.value)}})},p=e=>{r.value=e,s.value=!0},f=e=>{u.value?.splice(e,1)},d=(0,i.iH)(!1),y=(0,i.qj)({id:"",img:""}),g=()=>{let e=[...u.value],t=[];e.forEach((e=>{t.push(e)})),y.img=t.join(","),m()},v=n,m=async()=>{const e=await(0,a.Fy)(y);200==e.code&&(v("upTable",""),d.value=!1)},w=()=>{d.value=!0,u.value=[]};return t({showDrawer:w,initParam:y,fileList:u}),(e,t)=>{const n=(0,o.up)("el-icon"),a=(0,o.up)("el-dialog"),c=(0,o.up)("el-button"),h=(0,o.up)("el-drawer");return(0,o.wg)(),(0,o.iD)("div",lt,[(0,o.Wm)(h,{modelValue:d.value,"onUpdate:modelValue":t[2]||(t[2]=e=>d.value=e),direction:"rtl","append-to-body":""},{header:(0,o.w5)((()=>[ct])),default:(0,o.w5)((()=>[(0,o._)("div",ht,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(u.value,((e,t)=>((0,o.wg)(),(0,o.iD)("div",{class:"file-imgs",key:t},[(0,o._)("img",{class:"file-imgs-item",src:e},null,8,pt),(0,o._)("div",ft,[(0,o._)("div",dt,[(0,o.Wm)(n,{class:"file-imgs-showDel-item-icons",onClick:t=>p(e)},{default:(0,o.w5)((()=>[(0,o.Wm)((0,i.SU)(ut.View))])),_:2},1032,["onClick"]),(0,o.Wm)(n,{class:"file-imgs-showDel-item-icons",onClick:e=>f(t)},{default:(0,o.w5)((()=>[(0,o.Wm)((0,i.SU)(ut.Delete))])),_:2},1032,["onClick"])])])])))),128)),(0,o._)("div",yt,[(0,o.Wm)(n,{class:"file-mais-icons"},{default:(0,o.w5)((()=>[(0,o.Wm)((0,i.SU)(ut.Plus))])),_:1}),(0,o._)("input",{type:"file",multiple:"",class:"file-mais-files",onChange:l},null,32)]),(0,o.Wm)(a,{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=e=>s.value=e),draggable:""},{default:(0,o.w5)((()=>[(0,o._)("img",{"w-full":"",src:r.value,style:{width:"100%",height:"auto"}},null,8,gt)])),_:1},8,["modelValue"])])])),footer:(0,o.w5)((()=>[(0,o._)("div",vt,[(0,o.Wm)(c,{onClick:t[1]||(t[1]=e=>d.value=!1)},{default:(0,o.w5)((()=>[(0,o.Uk)("取消")])),_:1}),(0,o.Wm)(c,{type:"primary",onClick:g},{default:(0,o.w5)((()=>[(0,o.Uk)("立即提交")])),_:1})])])),_:1},8,["modelValue"])])}}});const wt=mt;var bt=wt,kt=n(9963),Ct=n(1770),xt=n(1348);const _t={class:"Qr"},St=(0,o._)("div",{class:"Qr-img"},[(0,o._)("img",{src:Ct,style:{width:"80%",height:"80%"}})],-1),Ut={class:"Qr-input"},Pt=["placeholder"],It={class:"Qr-isButton"};var At=(0,o.aZ)({__name:"inputSearch",props:{placeholderData:{type:String,default:()=>"请扫描追溯码"}},emits:["inputSearchData"],setup(e,{expose:t,emit:n}){const r=(0,i.iH)(),a=(0,i.qj)({value:"",num:0}),s=e,u=n,l=async()=>{setTimeout((()=>{null!=r.value&&r.value.focus()}),1e3)},c=async()=>{h(),setTimeout((()=>{null!=r.value&&r.value.focus()}),1e3)},h=async()=>{a.value=""};document.addEventListener("keydown",(e=>{a.num+=1,1==a.num&&(a.value=""),"Enter"===e.code&&(a.value=e.target.value,p())}));const p=async()=>{if(!a.value)return xt.z8.error("点击输入框在使用扫码枪扫码"),void l();u("inputSearchData",a.value),a.num=0};return t({inputFocus:l,data:a,ClearFn:h}),(e,t)=>{const n=(0,o.up)("Search"),i=(0,o.up)("el-icon"),u=(0,o.up)("Close");return(0,o.wg)(),(0,o.iD)("div",_t,[St,(0,o._)("div",Ut,[(0,o.wy)((0,o._)("input",{class:"Qr-input-type",ref_key:"myInput",ref:r,"onUpdate:modelValue":t[0]||(t[0]=e=>a.value=e),type:"text",placeholder:s.placeholderData,style:{background:"#f7f7f7"}},null,8,Pt),[[kt.nr,a.value]])]),(0,o._)("div",It,[(0,o._)("div",{class:"Qr-isButton-icons",onClick:p},[(0,o.Wm)(i,null,{default:(0,o.w5)((()=>[(0,o.Wm)(n)])),_:1})]),(0,o._)("div",{class:"Qr-isButton-icons",onClick:c},[(0,o.Wm)(i,null,{default:(0,o.w5)((()=>[(0,o.Wm)(u)])),_:1})])])])}}});const zt=At;var Ot=zt;const Rt={class:"Scaninquire"};var jt=(0,o.aZ)({__name:"Scaninquire",emits:["scanFun"],setup(e,{emit:t}){const n=(0,i.iH)(!1),r=(0,i.iH)(null),s=()=>{n.value=!0,(0,o.Y3)((()=>{r.value?.ClearFn(),r.value?.inputFocus()}))},u=t,l=async e=>{const t=await(0,a.m8)({code:e});200==t.code&&u("scanFun",t.data[0])};return(e,t)=>{const a=(0,o.up)("el-button"),u=(0,o.up)("el-drawer");return(0,o.wg)(),(0,o.iD)("div",Rt,[(0,o.Wm)(a,{round:"",type:"primary",icon:(0,i.SU)(ut.Camera),onClick:s},{default:(0,o.w5)((()=>[(0,o.Uk)("扫码查询")])),_:1},8,["icon"]),(0,o.Wm)(u,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=e=>n.value=e),direction:"ttb","append-to-body":"","destroy-on-close":""},{default:(0,o.w5)((()=>[(0,o.Wm)(Ot,{ref_key:"inputSearchRef",ref:r,onInputSearchData:l},null,512)])),_:1},8,["modelValue"])])}}});const Tt=jt;var Et=Tt,Lt=n(1271),qt=n(4257);const Dt={class:"medicineManage"};var Ft=(0,o.aZ)({__name:"index",setup(e){const t=(0,i.iH)(),n=(0,i.iH)(),r=async e=>{n.value.showDrawer(),n.value.initParam.id=e.id;let t=[...e.crcList];const r=t.filter((e=>""!=e));n.value.fileList=r},u=async()=>{t.value?.getTableList()},l=(0,i.iH)(!1);(0,o.bv)((async()=>{const e=await(0,a.s3)({age:1,pageSize:999});h.value=c(e.data?.list||[],"obj");const t=await(0,a.oX)({age:1,pageSize:999});p.value=c(t.data?.list||[],"obj")}));const c=(e,t)=>e.map((e=>({value:"obj"==t?e.id:e,label:"obj"==t?e.name:e}))),h=(0,i.iH)([]),p=(0,i.iH)([]),f=(0,i.iH)([]),d=(0,i.iH)([]),y=async()=>{f.value=h.value},g=async()=>{d.value=p.value},v=async e=>{e?(l.value=!0,setTimeout((()=>{l.value=!1,f.value=h.value.filter((t=>t.label.toLowerCase().includes(e.toLowerCase())))}),200)):f.value=[]},m=async e=>{e?(l.value=!0,setTimeout((()=>{l.value=!1,d.value=p.value.filter((t=>t.label.toLowerCase().includes(e.toLowerCase())))}),200)):d.value=[]},w=[{prop:"product",label:"名称",width:150},{prop:"batchNumber",label:"批号",width:120},{prop:"expiryDate",label:"失效日期",width:120},{prop:"productionDate",label:"生产日期",width:120},{prop:"approvalNumber",label:"批准文号",width:150},{prop:"enterprise",label:"生产企业",width:150},{prop:"spec",label:"规格(剂/粒/支)",width:150},{prop:"unit",label:"单位",width:120},{prop:"dosageForm",label:"剂型",width:120},{prop:"qualificationNumber",label:"批签发合格编号",width:150},{prop:"imgUrl",label:"预览",width:150,name:"imgUrl"},{prop:"operation",label:"操作",fixed:"right","min-width":150}],b=(0,i.qj)({initParam:{enterprise:"",product:"",spec:"",batchNumber:""}}),k=async e=>{b.initParam.enterprise=e.enterprise_name,b.initParam.product=e.product_name,b.initParam.spec=e.spec_name,b.initParam.batchNumber=e.batch_number,C()},C=async()=>{(0,o.Y3)((()=>{t.value?.getTableList()}))};return(e,c)=>{const h=(0,o.up)("el-option"),p=(0,o.up)("el-select"),x=(0,o.up)("el-form-item"),_=(0,o.up)("el-input"),S=(0,o.up)("el-image"),U=(0,o.up)("el-button");return(0,o.wg)(),(0,o.iD)("div",Dt,[(0,o.Wm)(Lt.Z,{isButtom:"查询",inline:!0,onEvent:C},{searchConter:(0,o.w5)((()=>[(0,o.Wm)(x,{label:"生产企业"},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{modelValue:b.initParam.enterprise,"onUpdate:modelValue":c[0]||(c[0]=e=>b.initParam.enterprise=e),modelModifiers:{number:!0},filterable:"",remote:"","reserve-keyword":"",placeholder:"生产企业","remote-method":v,loading:l.value,clearable:"",onClear:c[1]||(c[1]=e=>b.initParam.enterprise=null),onClick:y,style:{width:"200px"}},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(f.value,(e=>((0,o.wg)(),(0,o.j4)(h,{key:e.value,label:e.label,value:e.label},null,8,["label","value"])))),128))])),_:1},8,["modelValue","loading"])])),_:1}),(0,o.Wm)(x,{label:"品名"},{default:(0,o.w5)((()=>[(0,o.Wm)(p,{modelValue:b.initParam.product,"onUpdate:modelValue":c[2]||(c[2]=e=>b.initParam.product=e),modelModifiers:{number:!0},filterable:"",remote:"","reserve-keyword":"",placeholder:"品名","remote-method":m,loading:l.value,clearable:"",onClear:c[3]||(c[3]=e=>b.initParam.product=null),onClick:g,style:{width:"200px"}},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(d.value,(e=>((0,o.wg)(),(0,o.j4)(h,{key:e.value,label:e.label,value:e.label},null,8,["label","value"])))),128))])),_:1},8,["modelValue","loading"])])),_:1}),(0,o.Wm)(x,{label:"规格"},{default:(0,o.w5)((()=>[(0,o.Wm)(_,{modelValue:b.initParam.spec,"onUpdate:modelValue":c[4]||(c[4]=e=>b.initParam.spec=e),placeholder:"规格",clearable:"",style:{width:"200px"}},null,8,["modelValue"])])),_:1}),(0,o.Wm)(x,{label:"批号"},{default:(0,o.w5)((()=>[(0,o.Wm)(_,{modelValue:b.initParam.batchNumber,"onUpdate:modelValue":c[5]||(c[5]=e=>b.initParam.batchNumber=e),placeholder:"批号",clearable:"",style:{width:"200px"}},null,8,["modelValue"])])),_:1})])),_:1}),(0,o.Wm)(qt.Z,{istitle:"基本信息"},{btn:(0,o.w5)((()=>[(0,o.Wm)(Et,{ref:"scanRef",onScanFun:k},null,512)])),bg:(0,o.w5)((()=>[(0,o.Wm)(s.Z,{ref_key:"TableRef",ref:t,requestApi:(0,i.SU)(a.zd),columns:w,initParam:b.initParam},{imgUrl:(0,o.w5)((({row:e})=>[e.img?((0,o.wg)(),(0,o.j4)(S,{key:0,style:{width:"30px",height:"30px"},src:e.imgUrl,"zoom-rate":1.2,"max-scale":7,"min-scale":.2,"preview-src-list":e.crcList,"initial-index":4,"preview-teleported":"",infinite:!1,fit:"cover"},null,8,["src","preview-src-list"])):(0,o.kq)("",!0)])),right:(0,o.w5)((({row:e})=>[(0,o.Wm)(U,{link:"",type:"primary",size:"small",onClick:t=>r(e)},{default:(0,o.w5)((()=>[(0,o.Uk)("上传")])),_:2},1032,["onClick"])])),_:1},8,["requestApi","initParam"])])),_:1}),(0,o.Wm)(bt,{ref_key:"FilesRef",ref:n,onUpTable:u},null,512)])}}});const Ht=Ft;var Bt=Ht},1770:function(e,t,n){"use strict";e.exports=n.p+"img/BarCodeQR.69f4fb5e.svg"}}]);
  2. //# sourceMappingURL=179.f5b7b03d.js.map