(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-484a20ba"],{"2ba8":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"msgbox-fade"}},[t.visible?i("div",{ref:"wrap",staticClass:"preview-wrap"},[i("div",{ref:"mask",staticClass:"preview-mask",on:{click:function(e){t.visible=!1}}}),i("i",{staticClass:"el-icon-close",on:{click:function(e){e.stopPropagation(),t.visible=!1}}}),i("img",{ref:"image",staticClass:"img",style:{transform:"translate("+t.picLeft+"px,"+t.picTop+"px) scale("+t.picScale+")"},attrs:{src:t.imgUrl,alt:""},on:{click:t.handleClickPC}}),i("a",{staticClass:"icon-download",attrs:{href:t.base64Url,download:t.base64Stamp}},[i("i",{staticClass:"el-icon-download"})])]):t._e()])},s=[],r=i("33f8"),o=i("8536"),a=i.n(o),c={name:"imgPreview",data:function(){return{isPcClick:!1,isMobile:Object(r["u"])(),picW:0,picH:0,curPicW:0,curPicH:0,picScale:1,picScaleMid:1,picInitTop:0,picInitLeft:0,picTop:0,picLeft:0,image:null,disX:0,disY:0,base64Url:"",base64Stamp:"meechat_"+(new Date).getTime()}},methods:{initEvent:function(){this.isMobile?this.handleH5():(this.handleDragPC(),this.handleScalePC(),this.$refs.mask.addEventListener("contextmenu",function(t){return t.preventDefault()}))},handleClickPC:function(){!this.isMobile&&this.isPcClick&&(this.visible=!1)},handleDragPC:function(){var t=this;this.image.onmousedown=function(e){return t.isPcClick=!0,t.dragStart(e),t.image.setCapture&&t.image.setCapture(),document.addEventListener("mousemove",t.drag),document.addEventListener("mouseup",t.dragAfter),!1}},handleScalePC:function(){document.body.addEventListener("mousewheel",this.scale)},handleH5:function(){var t=this,e=new a.a.Manager(this.$refs.wrap),i=new a.a.Manager(this.image),n=new a.a.Tap({pointers:1}),s=new a.a.Pan({pointers:1}),r=new a.a.Pinch({pointers:2});i.add([n,s]),e.add([r]),i.on("tap",function(e){t.visible=!1}),i.on("panstart panmove panend tap, multitap",function(e){"panstart"==e.type?t.dragStart(e):"panmove"==e.type?t.drag(e):"panend"==e.type&&t.dragAfter(e)}),e.on("pinchmove pinchin pinchout pinchend",function(e){t.picScale=(t.picScaleMid*e.scale).toFixed(2),"pinchend"==e.type&&(t.picScale<1&&(t.picScale=1),t.picScaleMid=t.picScale)})},dragStart:function(t){var e=this.isMobile?"delta":"client";this.disY=t["".concat(e,"Y")]-this.picTop,this.disX=t["".concat(e,"X")]-this.picLeft,this.curPicW=this.picW*this.picScale,this.curPicH=this.picH*this.picScale},drag:function(t){var e=this.isMobile?"delta":"client";this.isPcClick=!1,this.picTop=t["".concat(e,"Y")]-this.disY,this.picLeft=t["".concat(e,"X")]-this.disX},dragAfter:function(){if(document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.dragAfter),this.image.releaseCapture&&this.image.releaseCapture(),this.picScale<=1||this.curPicW<=this.winW)this.picTop=this.picInitTop,this.picLeft=this.picInitLeft;else if(this.picScale>1){var t=window.innerWidth,e=window.innerHeight,i=(this.curPicW-t)/2,n=(this.curPicH-e)/2;this.picLeft<-i&&(this.picLeft=-i),this.picLeft>i&&(this.picLeft=i),this.picTop<-n&&(this.picTop=-n),this.picTop>n&&(this.picTop=n),i<0&&(this.picLeft=0),n<0&&(this.picTop=0)}},scale:function(t){var e=this.picScale;t=t||window.event,t.deltaY>0?this.picScale=e>.2?e-.1:e:this.picScale+=.1,this.picW*this.picScale-window.innerWidth<0&&(this.picLeft=0),this.picH*this.picScale-window.innerHeight<0&&(this.picTop=0)}},mounted:function(){var t=this;this.image=this.$refs.image;var e=new Image;e.src=this.imgUrl,e.onload=function(){var i=window.innerWidth,n=e.width,s=e.height;t.picW=n>i?i:n,t.picH=n>i?i*s/n:n,t.initEvent()},Object(r["m"])(this.imgUrl,function(e){t.base64Url=e})},destroyed:function(){}},h=c,u=(i("5cfd"),i("17cc")),l=Object(u["a"])(h,n,s,!1,null,"0e94af84",null);e["default"]=l.exports},"49c5":function(t,e,i){},"5cfd":function(t,e,i){"use strict";var n=i("49c5"),s=i.n(n);s.a},8536:function(t,e,i){var n; /*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * * Copyright (c) 2016 Jorik Tangelder; * Licensed under the MIT license */ /*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * * Copyright (c) 2016 Jorik Tangelder; * Licensed under the MIT license */ (function(s,r,o,a){"use strict";var c,h=["","webkit","Moz","MS","ms","o"],u=r.createElement("div"),l="function",p=Math.round,f=Math.abs,d=Date.now;function v(t,e,i){return setTimeout(S(t,i),e)}function m(t,e,i){return!!Array.isArray(t)&&(g(t,i[e],i),!0)}function g(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a){n=0;while(n\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=s.console&&(s.console.warn||s.console.log);return r&&r.call(s.console,n,i),t.apply(this,arguments)}}c="function"!==typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i-1}function D(t){return t.trim().split(/\s+/g)}function x(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);var n=0;while(ni[e]}):n.sort()),n}function O(t,e){var i,n,s=e[0].toUpperCase()+e.slice(1),r=0;while(r1&&!i.firstMultiple?i.firstMultiple=pt(e):1===s&&(i.firstMultiple=!1);var r=i.firstInput,o=i.firstMultiple,a=o?o.center:r.center,c=e.center=ft(n);e.timeStamp=d(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=gt(a,c),e.distance=mt(a,c),ut(i,e),e.offsetDirection=vt(e.deltaX,e.deltaY);var h=dt(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=f(h.x)>f(h.y)?h.x:h.y,e.scale=o?yt(o.pointers,n):1,e.rotation=o?Tt(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,lt(i,e);var u=t.element;A(e.srcEvent.target,u)&&(u=e.srcEvent.target),e.target=u}function ut(t,e){var i=e.center,n=t.offsetDelta||{},s=t.prevDelta||{},r=t.prevInput||{};e.eventType!==V&&r.eventType!==G||(s=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=s.x+(i.x-n.x),e.deltaY=s.y+(i.y-n.y)}function lt(t,e){var i,n,s,r,o=t.lastInterval||e,c=e.timeStamp-o.timeStamp;if(e.eventType!=Z&&(c>j||o.velocity===a)){var h=e.deltaX-o.deltaX,u=e.deltaY-o.deltaY,l=dt(c,h,u);n=l.x,s=l.y,i=f(l.x)>f(l.y)?l.x:l.y,r=vt(h,u),t.lastInterval=e}else i=o.velocity,n=o.velocityX,s=o.velocityY,r=o.direction;e.velocity=i,e.velocityX=n,e.velocityY=s,e.direction=r}function pt(t){var e=[],i=0;while(i=f(e)?t<0?J:K:e<0?Q:tt}function mt(t,e,i){i||(i=st);var n=e[i[0]]-t[i[0]],s=e[i[1]]-t[i[1]];return Math.sqrt(n*n+s*s)}function gt(t,e,i){i||(i=st);var n=e[i[0]]-t[i[0]],s=e[i[1]]-t[i[1]];return 180*Math.atan2(s,n)/Math.PI}function Tt(t,e){return gt(e[1],e[0],rt)+gt(t[1],t[0],rt)}function yt(t,e){return mt(e[0],e[1],rt)/mt(t[0],t[1],rt)}ot.prototype={handler:function(){},init:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(k(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&I(this.element,this.evEl,this.domHandler),this.evTarget&&I(this.target,this.evTarget,this.domHandler),this.evWin&&I(k(this.element),this.evWin,this.domHandler)}};var Et={mousedown:V,mousemove:$,mouseup:G},wt="mousedown",St="mousemove mouseup";function bt(){this.evEl=wt,this.evWin=St,this.pressed=!1,ot.apply(this,arguments)}w(bt,ot,{handler:function(t){var e=Et[t.type];e&V&&0===t.button&&(this.pressed=!0),e&$&&1!==t.which&&(e=G),this.pressed&&(e&G&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:q,srcEvent:t}))}});var Ct={pointerdown:V,pointermove:$,pointerup:G,pointercancel:Z,pointerout:Z},Pt={2:H,3:F,4:q,5:U},It="pointerdown",At="pointermove pointerup pointercancel";function _t(){this.evEl=It,this.evWin=At,ot.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}s.MSPointerEvent&&!s.PointerEvent&&(It="MSPointerDown",At="MSPointerMove MSPointerUp MSPointerCancel"),w(_t,ot,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),s=Ct[n],r=Pt[t.pointerType]||t.pointerType,o=r==H,a=x(e,t.pointerId,"pointerId");s&V&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):s&(G|Z)&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,s,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(a,1))}});var Dt={touchstart:V,touchmove:$,touchend:G,touchcancel:Z},xt="touchstart",Mt="touchstart touchmove touchend touchcancel";function Lt(){this.evTarget=xt,this.evWin=Mt,this.started=!1,ot.apply(this,arguments)}function Ot(t,e){var i=M(t.touches),n=M(t.changedTouches);return e&(G|Z)&&(i=L(i.concat(n),"identifier",!0)),[i,n]}w(Lt,ot,{handler:function(t){var e=Dt[t.type];if(e===V&&(this.started=!0),this.started){var i=Ot.call(this,t,e);e&(G|Z)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:H,srcEvent:t})}}});var Yt={touchstart:V,touchmove:$,touchend:G,touchcancel:Z},Xt="touchstart touchmove touchend touchcancel";function kt(){this.evTarget=Xt,this.targetIds={},ot.apply(this,arguments)}function Rt(t,e){var i=M(t.touches),n=this.targetIds;if(e&(V|$)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var s,r,o=M(t.changedTouches),a=[],c=this.target;if(r=i.filter(function(t){return A(t.target,c)}),e===V){s=0;while(s-1&&n.splice(t,1)};setTimeout(s,Wt)}}function qt(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i=re&&n(e.options.event+ue(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=ce},canEmit:function(){var t=0;while(te.threshold&&s&e.direction},attrTest:function(t){return fe.prototype.attrTest.call(this,t)&&(this.state&ne||!(this.state&ne)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=le(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),w(ve,fe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Zt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ne)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),w(me,he,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[$t]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(G|Z)&&!s)this.reset();else if(t.eventType&V)this.reset(),this._timer=v(function(){this.state=oe,this.tryEmit()},e.time,this);else if(t.eventType&G)return oe;return ce},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===oe&&(t&&t.eventType&G?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),w(ge,fe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Zt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ne)}}),w(Te,fe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:et|it,pointers:1},getTouchAction:function(){return de.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(et|it)?e=t.overallVelocity:i&et?e=t.overallVelocityX:i&it&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&t.eventType&G},emit:function(t){var e=le(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),w(ye,he,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Gt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance