"use strict";(self["webpackChunkexchange"]=self["webpackChunkexchange"]||[]).push([[1705],{83560:function(){},19523:function(){},96002:function(){},84698:function(){},85432:function(t,i,e){e.d(i,{A:function(){return A}});var s=e(51137),n=e(66848),o=e(47456),a=(0,o.Y)("image-preview"),r=a[0],h=a[1],l=e(56215),c=e(28722),u=e(2879),d=e(96874),f=e(77235),v=e(21465),m=e(48499),g=e(76060),p=e(90689),w=e(36749);function y(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))}var S,b={mixins:[c.B],props:{src:String,show:Boolean,active:Number,minZoom:[Number,String],maxZoom:[Number,String],rootWidth:Number,rootHeight:Number},data:function(){return{scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,imageRatio:0,displayWidth:0,displayHeight:0}},computed:{vertical:function(){var t=this.rootWidth,i=this.rootHeight,e=i/t;return this.imageRatio>e},imageStyle:function(){var t=this.scale,i={transitionDuration:this.zooming||this.moving?"0s":".3s"};if(1!==t){var e=this.moveX/t,s=this.moveY/t;i.transform="scale("+t+", "+t+") translate("+e+"px, "+s+"px)"}return i},maxMoveX:function(){if(this.imageRatio){var t=this.vertical?this.rootHeight/this.imageRatio:this.rootWidth;return Math.max(0,(this.scale*t-this.rootWidth)/2)}return 0},maxMoveY:function(){if(this.imageRatio){var t=this.vertical?this.rootHeight:this.rootWidth*this.imageRatio;return Math.max(0,(this.scale*t-this.rootHeight)/2)}return 0}},watch:{active:"resetScale",show:function(t){t||this.resetScale()}},mounted:function(){this.bindTouchEvent(this.$el)},methods:{resetScale:function(){this.setScale(1),this.moveX=0,this.moveY=0},setScale:function(t){t=(0,v.y1)(t,+this.minZoom,+this.maxZoom),t!==this.scale&&(this.scale=t,this.$emit("scale",{scale:this.scale,index:this.active}))},toggleScale:function(){var t=this.scale>1?1:2;this.setScale(t),this.moveX=0,this.moveY=0},onTouchStart:function(t){var i=t.touches,e=this.offsetX,s=void 0===e?0:e;this.touchStart(t),this.touchStartTime=new Date,this.fingerNum=i.length,this.startMoveX=this.moveX,this.startMoveY=this.moveY,this.moving=1===this.fingerNum&&1!==this.scale,this.zooming=2===this.fingerNum&&!s,this.zooming&&(this.startScale=this.scale,this.startDistance=y(t.touches))},onTouchMove:function(t){var i=t.touches;if(this.touchMove(t),(this.moving||this.zooming)&&(0,m.wo)(t,!0),this.moving){var e=this.deltaX+this.startMoveX,s=this.deltaY+this.startMoveY;this.moveX=(0,v.y1)(e,-this.maxMoveX,this.maxMoveX),this.moveY=(0,v.y1)(s,-this.maxMoveY,this.maxMoveY)}if(this.zooming&&2===i.length){var n=y(i),o=this.startScale*n/this.startDistance;this.setScale(o)}},onTouchEnd:function(t){var i=!1;(this.moving||this.zooming)&&(i=!0,this.moving&&this.startMoveX===this.moveX&&this.startMoveY===this.moveY&&(i=!1),t.touches.length||(this.zooming&&(this.moveX=(0,v.y1)(this.moveX,-this.maxMoveX,this.maxMoveX),this.moveY=(0,v.y1)(this.moveY,-this.maxMoveY,this.maxMoveY),this.zooming=!1),this.moving=!1,this.startMoveX=0,this.startMoveY=0,this.startScale=1,this.scale<1&&this.resetScale())),(0,m.wo)(t,i),this.checkTap(),this.resetTouchStatus()},checkTap:function(){var t=this;if(!(this.fingerNum>1)){var i=this.offsetX,e=void 0===i?0:i,s=this.offsetY,n=void 0===s?0:s,o=new Date-this.touchStartTime,a=250,r=5;e<r&&n<r&&o<a&&(this.doubleTapTimer?(clearTimeout(this.doubleTapTimer),this.doubleTapTimer=null,this.toggleScale()):this.doubleTapTimer=setTimeout((function(){t.$emit("close"),t.doubleTapTimer=null}),a))}},onLoad:function(t){var i=t.target,e=i.naturalWidth,s=i.naturalHeight;this.imageRatio=s/e}},render:function(){var t=arguments[0],i={loading:function(){return t(p.A,{attrs:{type:"spinner"}})}};return t(w.A,{class:h("swipe-item")},[t(g.A,{attrs:{src:this.src,fit:"contain"},class:h("image",{vertical:this.vertical}),style:this.imageStyle,scopedSlots:i,on:{load:this.onLoad}})])}},x=r({mixins:[c.B,(0,l.i)({skipToggleEvent:!0}),(0,u.x)((function(t){t(window,"resize",this.resize,!0),t(window,"orientationchange",this.resize,!0)}))],props:{className:null,closeable:Boolean,asyncClose:Boolean,overlayStyle:Object,showIndicators:Boolean,images:{type:Array,default:function(){return[]}},loop:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},minZoom:{type:[Number,String],default:1/3},maxZoom:{type:[Number,String],default:3},transition:{type:String,default:"van-fade"},showIndex:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:300},startPosition:{type:[Number,String],default:0},overlayClass:{type:String,default:h("overlay")},closeIcon:{type:String,default:"clear"},closeOnPopstate:{type:Boolean,default:!0},closeIconPosition:{type:String,default:"top-right"}},data:function(){return{active:0,rootWidth:0,rootHeight:0,doubleClickTimer:null}},mounted:function(){this.resize()},watch:{startPosition:"setActive",value:function(t){var i=this;t?(this.setActive(+this.startPosition),this.$nextTick((function(){i.resize(),i.$refs.swipe.swipeTo(+i.startPosition,{immediate:!0})}))):this.$emit("close",{index:this.active,url:this.images[this.active]})}},methods:{resize:function(){if(this.$el&&this.$el.getBoundingClientRect){var t=this.$el.getBoundingClientRect();this.rootWidth=t.width,this.rootHeight=t.height}},emitClose:function(){this.asyncClose||this.$emit("input",!1)},emitScale:function(t){this.$emit("scale",t)},setActive:function(t){t!==this.active&&(this.active=t,this.$emit("change",t))},genIndex:function(){var t=this.$createElement;if(this.showIndex)return t("div",{class:h("index")},[this.slots("index",{index:this.active})||this.active+1+" / "+this.images.length])},genCover:function(){var t=this.$createElement,i=this.slots("cover");if(i)return t("div",{class:h("cover")},[i])},genImages:function(){var t=this,i=this.$createElement;return i(f.A,{ref:"swipe",attrs:{lazyRender:!0,loop:this.loop,duration:this.swipeDuration,initialSwipe:this.startPosition,showIndicators:this.showIndicators,indicatorColor:"white"},class:h("swipe"),on:{change:this.setActive}},[this.images.map((function(e){return i(b,{attrs:{src:e,show:t.value,active:t.active,maxZoom:t.maxZoom,minZoom:t.minZoom,rootWidth:t.rootWidth,rootHeight:t.rootHeight},on:{scale:t.emitScale,close:t.emitClose}})}))])},genClose:function(){var t=this.$createElement;if(this.closeable)return t(d.A,{attrs:{role:"button",name:this.closeIcon},class:h("close-icon",this.closeIconPosition),on:{click:this.emitClose}})},onClosed:function(){this.$emit("closed")},swipeTo:function(t,i){this.$refs.swipe&&this.$refs.swipe.swipeTo(t,i)}},render:function(){var t=arguments[0];return t("transition",{attrs:{name:this.transition},on:{afterLeave:this.onClosed}},[this.shouldRender?t("div",{directives:[{name:"show",value:this.value}],class:[h(),this.className]},[this.genClose(),this.genImages(),this.genIndex(),this.genCover()]):null])}}),z=e(33448),$={loop:!0,value:!0,images:[],maxZoom:3,minZoom:1/3,onClose:null,onChange:null,className:"",showIndex:!0,closeable:!1,closeIcon:"clear",asyncClose:!1,transition:"van-fade",getContainer:"body",overlayStyle:null,startPosition:0,swipeDuration:300,showIndicators:!1,closeOnPopstate:!0,closeIconPosition:"top-right"},C=function(){S=new(n["default"].extend(x))({el:document.createElement("div")}),document.body.appendChild(S.$el),S.$on("change",(function(t){S.onChange&&S.onChange(t)})),S.$on("scale",(function(t){S.onScale&&S.onScale(t)}))},T=function(t,i){if(void 0===i&&(i=0),!z.S$){S||C();var e=Array.isArray(t)?{images:t,startPosition:i}:t;return(0,s.A)(S,$,e),S.$once("input",(function(t){S.value=t})),S.$once("closed",(function(){S.images=[]})),e.onClose&&(S.$off("close"),S.$once("close",e.onClose)),S}};T.Component=x,T.install=function(){n["default"].use(x)};var A=T},76060:function(t,i,e){var s=e(4250),n=e.n(s),o=e(47456),a=e(33448),r=e(83462),h=e(96874),l=(0,o.Y)("image"),c=l[0],u=l[1];i.A=c({props:{src:String,fit:String,alt:String,round:Boolean,width:[Number,String],height:[Number,String],radius:[Number,String],lazyLoad:Boolean,iconPrefix:String,showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},errorIcon:{type:String,default:"photo-fail"},loadingIcon:{type:String,default:"photo"}},data:function(){return{loading:!0,error:!1}},watch:{src:function(){this.loading=!0,this.error=!1}},computed:{style:function(){var t={};return(0,a.C8)(this.width)&&(t.width=(0,r._)(this.width)),(0,a.C8)(this.height)&&(t.height=(0,r._)(this.height)),(0,a.C8)(this.radius)&&(t.overflow="hidden",t.borderRadius=(0,r._)(this.radius)),t}},created:function(){var t=this.$Lazyload;t&&a.M&&(t.$on("loaded",this.onLazyLoaded),t.$on("error",this.onLazyLoadError))},beforeDestroy:function(){var t=this.$Lazyload;t&&(t.$off("loaded",this.onLazyLoaded),t.$off("error",this.onLazyLoadError))},methods:{onLoad:function(t){this.loading=!1,this.$emit("load",t)},onLazyLoaded:function(t){var i=t.el;i===this.$refs.image&&this.loading&&this.onLoad()},onLazyLoadError:function(t){var i=t.el;i!==this.$refs.image||this.error||this.onError()},onError:function(t){this.error=!0,this.loading=!1,this.$emit("error",t)},onClick:function(t){this.$emit("click",t)},genPlaceholder:function(){var t=this.$createElement;return this.loading&&this.showLoading?t("div",{class:u("loading")},[this.slots("loading")||t(h.A,{attrs:{name:this.loadingIcon,classPrefix:this.iconPrefix},class:u("loading-icon")})]):this.error&&this.showError?t("div",{class:u("error")},[this.slots("error")||t(h.A,{attrs:{name:this.errorIcon,classPrefix:this.iconPrefix},class:u("error-icon")})]):void 0},genImage:function(){var t=this.$createElement,i={class:u("img"),attrs:{alt:this.alt},style:{objectFit:this.fit}};if(!this.error)return this.lazyLoad?t("img",n()([{ref:"image",directives:[{name:"lazy",value:this.src}]},i])):t("img",n()([{attrs:{src:this.src},on:{load:this.onLoad,error:this.onError}},i]))}},render:function(){var t=arguments[0];return t("div",{class:u({round:this.round}),style:this.style,on:{click:this.onClick}},[this.genImage(),this.genPlaceholder(),this.slots()])}})},77965:function(t,i,e){e.d(i,{Y:function(){return s}});var s={inject:{vanField:{default:null}},watch:{value:function(){var t=this.vanField;t&&(t.resetValidation(),t.validateWithTrigger("onChange"))}},created:function(){var t=this.vanField;t&&!t.children&&(t.children=this)}}},36749:function(t,i,e){var s=e(51137),n=e(47456),o=e(99297),a=(0,n.Y)("swipe-item"),r=a[0],h=a[1];i.A=r({mixins:[(0,o.b)("vanSwipe")],data:function(){return{offset:0,inited:!1,mounted:!1}},mounted:function(){var t=this;this.$nextTick((function(){t.mounted=!0}))},computed:{style:function(){var t={},i=this.parent,e=i.size,s=i.vertical;return e&&(t[s?"height":"width"]=e+"px"),this.offset&&(t.transform="translate"+(s?"Y":"X")+"("+this.offset+"px)"),t},shouldRender:function(){var t=this.index,i=this.inited,e=this.parent,s=this.mounted;if(!e.lazyRender||i)return!0;if(!s)return!1;var n=e.activeIndicator,o=e.count-1,a=0===n&&e.loop?o:n-1,r=n===o&&e.loop?0:n+1,h=t===n||t===a||t===r;return h&&(this.inited=!0),h}},render:function(){var t=arguments[0];return t("div",{class:h(),style:this.style,on:(0,s.A)({},this.$listeners)},[this.shouldRender&&this.slots()])}})},77235:function(t,i,e){var s=e(47456),n=e(73474),o=e(48499),a=e(23102),r=e(21465),h=e(28722),l=e(99297),c=e(2879),u=(0,s.Y)("swipe"),d=u[0],f=u[1];i.A=d({mixins:[h.B,(0,l.G)("vanSwipe"),(0,c.x)((function(t,i){t(window,"resize",this.resize,!0),t(window,"orientationchange",this.resize,!0),t(window,"visibilitychange",this.onVisibilityChange),i?this.initialize():this.clear()}))],props:{width:[Number,String],height:[Number,String],autoplay:[Number,String],vertical:Boolean,lazyRender:Boolean,indicatorColor:String,loop:{type:Boolean,default:!0},duration:{type:[Number,String],default:500},touchable:{type:Boolean,default:!0},initialSwipe:{type:[Number,String],default:0},showIndicators:{type:Boolean,default:!0},stopPropagation:{type:Boolean,default:!0}},data:function(){return{rect:null,offset:0,active:0,deltaX:0,deltaY:0,swiping:!1,computedWidth:0,computedHeight:0}},watch:{children:function(){this.initialize()},initialSwipe:function(){this.initialize()},autoplay:function(t){t>0?this.autoPlay():this.clear()}},computed:{count:function(){return this.children.length},maxCount:function(){return Math.ceil(Math.abs(this.minOffset)/this.size)},delta:function(){return this.vertical?this.deltaY:this.deltaX},size:function(){return this[this.vertical?"computedHeight":"computedWidth"]},trackSize:function(){return this.count*this.size},activeIndicator:function(){return(this.active+this.count)%this.count},isCorrectDirection:function(){var t=this.vertical?"vertical":"horizontal";return this.direction===t},trackStyle:function(){var t={transitionDuration:(this.swiping?0:this.duration)+"ms",transform:"translate"+(this.vertical?"Y":"X")+"("+this.offset+"px)"};if(this.size){var i=this.vertical?"height":"width",e=this.vertical?"width":"height";t[i]=this.trackSize+"px",t[e]=this[e]?this[e]+"px":""}return t},indicatorStyle:function(){return{backgroundColor:this.indicatorColor}},minOffset:function(){return(this.vertical?this.rect.height:this.rect.width)-this.size*this.count}},mounted:function(){this.bindTouchEvent(this.$refs.track)},methods:{initialize:function(t){if(void 0===t&&(t=+this.initialSwipe),this.$el&&!(0,n.d)(this.$el)){clearTimeout(this.timer);var i={width:this.$el.offsetWidth,height:this.$el.offsetHeight};this.rect=i,this.swiping=!0,this.active=t,this.computedWidth=+this.width||i.width,this.computedHeight=+this.height||i.height,this.offset=this.getTargetOffset(t),this.children.forEach((function(t){t.offset=0})),this.autoPlay()}},resize:function(){this.initialize(this.activeIndicator)},onVisibilityChange:function(){document.hidden?this.clear():this.autoPlay()},onTouchStart:function(t){this.touchable&&(this.clear(),this.touchStartTime=Date.now(),this.touchStart(t),this.correctPosition())},onTouchMove:function(t){this.touchable&&this.swiping&&(this.touchMove(t),this.isCorrectDirection&&((0,o.wo)(t,this.stopPropagation),this.move({offset:this.delta})))},onTouchEnd:function(){if(this.touchable&&this.swiping){var t=this.size,i=this.delta,e=Date.now()-this.touchStartTime,s=i/e,n=Math.abs(s)>.25||Math.abs(i)>t/2;if(n&&this.isCorrectDirection){var o=this.vertical?this.offsetY:this.offsetX,a=0;a=this.loop?o>0?i>0?-1:1:0:-Math[i>0?"ceil":"floor"](i/t),this.move({pace:a,emitChange:!0})}else i&&this.move({pace:0});this.swiping=!1,this.autoPlay()}},getTargetActive:function(t){var i=this.active,e=this.count,s=this.maxCount;return t?this.loop?(0,r.y1)(i+t,-1,e):(0,r.y1)(i+t,0,s):i},getTargetOffset:function(t,i){void 0===i&&(i=0);var e=t*this.size;this.loop||(e=Math.min(e,-this.minOffset));var s=i-e;return this.loop||(s=(0,r.y1)(s,this.minOffset,0)),s},move:function(t){var i=t.pace,e=void 0===i?0:i,s=t.offset,n=void 0===s?0:s,o=t.emitChange,a=this.loop,r=this.count,h=this.active,l=this.children,c=this.trackSize,u=this.minOffset;if(!(r<=1)){var d=this.getTargetActive(e),f=this.getTargetOffset(d,n);if(a){if(l[0]&&f!==u){var v=f<u;l[0].offset=v?c:0}if(l[r-1]&&0!==f){var m=f>0;l[r-1].offset=m?-c:0}}this.active=d,this.offset=f,o&&d!==h&&this.$emit("change",this.activeIndicator)}},prev:function(){var t=this;this.correctPosition(),this.resetTouchStatus(),(0,a.r7)((function(){t.swiping=!1,t.move({pace:-1,emitChange:!0})}))},next:function(){var t=this;this.correctPosition(),this.resetTouchStatus(),(0,a.r7)((function(){t.swiping=!1,t.move({pace:1,emitChange:!0})}))},swipeTo:function(t,i){var e=this;void 0===i&&(i={}),this.correctPosition(),this.resetTouchStatus(),(0,a.r7)((function(){var s;s=e.loop&&t===e.count?0===e.active?0:t:t%e.count,i.immediate?(0,a.r7)((function(){e.swiping=!1})):e.swiping=!1,e.move({pace:s-e.active,emitChange:!0})}))},correctPosition:function(){this.swiping=!0,this.active<=-1&&this.move({pace:this.count}),this.active>=this.count&&this.move({pace:-this.count})},clear:function(){clearTimeout(this.timer)},autoPlay:function(){var t=this,i=this.autoplay;i>0&&this.count>1&&(this.clear(),this.timer=setTimeout((function(){t.next(),t.autoPlay()}),i))},genIndicator:function(){var t=this,i=this.$createElement,e=this.count,s=this.activeIndicator,n=this.slots("indicator");return n||(this.showIndicators&&e>1?i("div",{class:f("indicators",{vertical:this.vertical})},[Array.apply(void 0,Array(e)).map((function(e,n){return i("i",{class:f("indicator",{active:n===s}),style:n===s?t.indicatorStyle:null})}))]):void 0)}},render:function(){var t=arguments[0];return t("div",{class:f()},[t("div",{ref:"track",style:this.trackStyle,class:f("track",{vertical:this.vertical})},[this.slots()]),this.genIndicator()])}})},51785:function(t,i,e){e.d(i,{A:function(){return b}});e(44114),e(14603),e(47566),e(98721);var s=e(51137),n=e(47456),o=e(83462),a=e(33448);function r(t){return Array.isArray(t)?t:[t]}function h(t,i){return new Promise((function(e){if("file"!==i){var s=new FileReader;s.onload=function(t){e(t.target.result)},"dataUrl"===i?s.readAsDataURL(t):"text"===i&&s.readAsText(t)}else e(null)}))}function l(t,i){return r(t).some((function(t){return!!t&&((0,a.Tn)(i)?i(t):t.size>i)}))}var c=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;function u(t){return c.test(t)}function d(t){return!!t.isImage||(t.file&&t.file.type?0===t.file.type.indexOf("image"):t.url?u(t.url):!!t.content&&0===t.content.indexOf("data:image"))}var f=e(77965),v=e(96874),m=e(76060),g=e(90689),p=e(85432),w=(0,n.Y)("uploader"),y=w[0],S=w[1],b=y({inheritAttrs:!1,mixins:[f.Y],model:{prop:"fileList"},props:{disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,uploadText:String,afterRead:Function,beforeRead:Function,beforeDelete:Function,previewSize:[Number,String],previewOptions:Object,name:{type:[Number,String],default:""},accept:{type:String,default:"image/*"},fileList:{type:Array,default:function(){return[]}},maxSize:{type:[Number,String,Function],default:Number.MAX_VALUE},maxCount:{type:[Number,String],default:Number.MAX_VALUE},deletable:{type:Boolean,default:!0},showUpload:{type:Boolean,default:!0},previewImage:{type:Boolean,default:!0},previewFullImage:{type:Boolean,default:!0},imageFit:{type:String,default:"cover"},resultType:{type:String,default:"dataUrl"},uploadIcon:{type:String,default:"photograph"}},computed:{previewSizeWithUnit:function(){return(0,o._)(this.previewSize)},value:function(){return this.fileList}},created:function(){this.urls=[]},beforeDestroy:function(){this.urls.forEach((function(t){return URL.revokeObjectURL(t)}))},methods:{getDetail:function(t){return void 0===t&&(t=this.fileList.length),{name:this.name,index:t}},onChange:function(t){var i=this,e=t.target.files;if(!this.disabled&&e.length){if(e=1===e.length?e[0]:[].slice.call(e),this.beforeRead){var s=this.beforeRead(e,this.getDetail());if(!s)return void this.resetInput();if((0,a.yL)(s))return void s.then((function(t){t?i.readFile(t):i.readFile(e)})).catch(this.resetInput)}this.readFile(e)}},readFile:function(t){var i=this,e=l(t,this.maxSize);if(Array.isArray(t)){var s=this.maxCount-this.fileList.length;t.length>s&&(t=t.slice(0,s)),Promise.all(t.map((function(t){return h(t,i.resultType)}))).then((function(s){var n=t.map((function(t,i){var e={file:t,status:"",message:""};return s[i]&&(e.content=s[i]),e}));i.onAfterRead(n,e)}))}else h(t,this.resultType).then((function(s){var n={file:t,status:"",message:""};s&&(n.content=s),i.onAfterRead(n,e)}))},onAfterRead:function(t,i){var e=this;this.resetInput();var s=t;if(i){var n=t;Array.isArray(t)?(n=[],s=[],t.forEach((function(t){t.file&&(l(t.file,e.maxSize)?n.push(t):s.push(t))}))):s=null,this.$emit("oversize",n,this.getDetail())}var o=Array.isArray(s)?Boolean(s.length):Boolean(s);o&&(this.$emit("input",[].concat(this.fileList,r(s))),this.afterRead&&this.afterRead(s,this.getDetail()))},onDelete:function(t,i){var e,s=this,n=null!=(e=t.beforeDelete)?e:this.beforeDelete;if(n){var o=n(t,this.getDetail(i));if(!o)return;if((0,a.yL)(o))return void o.then((function(){s.deleteFile(t,i)})).catch(a.lQ)}this.deleteFile(t,i)},deleteFile:function(t,i){var e=this.fileList.slice(0);e.splice(i,1),this.$emit("input",e),this.$emit("delete",t,this.getDetail(i))},resetInput:function(){this.$refs.input&&(this.$refs.input.value="")},onClickUpload:function(t){this.$emit("click-upload",t)},onPreviewImage:function(t){var i=this;if(this.previewFullImage){var e=this.fileList.filter((function(t){return d(t)})),n=e.map((function(t){return t.file&&!t.url&&"failed"!==t.status&&(t.url=URL.createObjectURL(t.file),i.urls.push(t.url)),t.url}));this.imagePreview=(0,p.A)((0,s.A)({images:n,startPosition:e.indexOf(t),onClose:function(){i.$emit("close-preview")}},this.previewOptions))}},closeImagePreview:function(){this.imagePreview&&this.imagePreview.close()},chooseFile:function(){this.disabled||this.$refs.input&&this.$refs.input.click()},genPreviewMask:function(t){var i=this.$createElement,e=t.status,s=t.message;if("uploading"===e||"failed"===e){var n="failed"===e?i(v.A,{attrs:{name:"close"},class:S("mask-icon")}):i(g.A,{class:S("loading")}),o=(0,a.C8)(s)&&""!==s;return i("div",{class:S("mask")},[n,o&&i("div",{class:S("mask-message")},[s])])}},genPreviewItem:function(t,i){var e,n,o,a=this,r=this.$createElement,h=null!=(e=t.deletable)?e:this.deletable,l="uploading"!==t.status&&h,c=l&&r("div",{class:S("preview-delete"),on:{click:function(e){e.stopPropagation(),a.onDelete(t,i)}}},[r(v.A,{attrs:{name:"cross"},class:S("preview-delete-icon")})]),u=this.slots("preview-cover",(0,s.A)({index:i},t)),f=u&&r("div",{class:S("preview-cover")},[u]),g=null!=(n=t.previewSize)?n:this.previewSize,p=null!=(o=t.imageFit)?o:this.imageFit,w=d(t)?r(m.A,{attrs:{fit:p,src:t.content||t.url,width:g,height:g,lazyLoad:this.lazyLoad},class:S("preview-image"),on:{click:function(){a.onPreviewImage(t)}}},[f]):r("div",{class:S("file"),style:{width:this.previewSizeWithUnit,height:this.previewSizeWithUnit}},[r(v.A,{class:S("file-icon"),attrs:{name:"description"}}),r("div",{class:[S("file-name"),"van-ellipsis"]},[t.file?t.file.name:t.url]),f]);return r("div",{class:S("preview"),on:{click:function(){a.$emit("click-preview",t,a.getDetail(i))}}},[w,this.genPreviewMask(t),c])},genPreviewList:function(){if(this.previewImage)return this.fileList.map(this.genPreviewItem)},genUpload:function(){var t=this.$createElement;if(!(this.fileList.length>=this.maxCount)){var i,e=this.slots(),n=this.readonly?null:t("input",{attrs:(0,s.A)({},this.$attrs,{type:"file",accept:this.accept,disabled:this.disabled}),ref:"input",class:S("input"),on:{change:this.onChange}});if(e)return t("div",{class:S("input-wrapper"),key:"input-wrapper",on:{click:this.onClickUpload}},[e,n]);if(this.previewSize){var o=this.previewSizeWithUnit;i={width:o,height:o}}return t("div",{directives:[{name:"show",value:this.showUpload}],class:S("upload",{readonly:this.readonly}),style:i,on:{click:this.onClickUpload}},[t(v.A,{attrs:{name:this.uploadIcon},class:S("upload-icon")}),this.uploadText&&t("span",{class:S("upload-text")},[this.uploadText]),n])}}},render:function(){var t=arguments[0];return t("div",{class:S()},[t("div",{class:S("wrapper",{disabled:this.disabled})},[this.genPreviewList(),this.genUpload()])])}})},99809:function(t,i,e){e(76952),e(69176),e(98992),e(22795),e(19523),e(65270),e(45396),e(84698),e(96002),e(83560)}}]);
|