webpackJsonp([1],{1:function(e,t,i){"use strict";i(18),i(8)},13:function(module,exports,__webpack_require__){"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function($,window,document,undefined){function regist(e,t){void 0===window.brickjs&&(window.brickjs={}),brickjs[e]=t}function Upload(e,t){this.cfgs={url:"http://imgsys.self.com.cn/interfaces",params:{},useCanvas:!0,size:0,limit:0,width:640,quality:100,error:"",errorMsg:{overnum:"超出上传数量限制",invalidLarge:"太大了",invalidSmall:"太小了",invalidType:"是不支持的图片类型",forbidden:"图片上传中或者图片上传被禁用"},autoUpload:!1,uploadBtn:"",tpl:"",tplContainer:"",autoHide:!0,onSelect:function(e){},onUploading:function(){},onProgress:function(e,t){},onSuccess:function(e,t){},onFailure:function(e,t){},onDelete:function(e){},onComplete:function(e,t){},onError:null},$.extend(!0,this.cfgs,t),this._init(e)}var BinaryFile=function(e,t,i){var r=e,n=t||0,o=0;this.getRawData=function(){return r},"string"==typeof e?(o=i||r.length,this.getByteAt=function(e){return 255&r.charCodeAt(e+n)},this.getBytesAt=function(e,t){for(var i=[],o=0;o127?t-256:t},this.getShortAt=function(e,t){var i=t?(this.getByteAt(e)<<8)+this.getByteAt(e+1):(this.getByteAt(e+1)<<8)+this.getByteAt(e);return i<0&&(i+=65536),i},this.getSShortAt=function(e,t){var i=this.getShortAt(e,t);return i>32767?i-65536:i},this.getLongAt=function(e,t){var i=this.getByteAt(e),r=this.getByteAt(e+1),n=this.getByteAt(e+2),o=this.getByteAt(e+3),s=t?(((i<<8)+r<<8)+n<<8)+o:(((o<<8)+n<<8)+r<<8)+i;return s<0&&(s+=4294967296),s},this.getSLongAt=function(e,t){var i=this.getLongAt(e,t);return i>2147483647?i-4294967296:i},this.getStringAt=function(e,t){for(var i=[],r=this.getBytesAt(e,t),n=0;ni||r&&t>r){var s=e/t;(s>=1||0===r)&&i&&!n?(e=i,t=i/s>>0):n&&s<=i/r?(e=i,t=i/s>>0,o="w"):(e=r*s>>0,t=r)}return{width:e,height:t,cropped:o}},dataURLtoBlob:function(e){for(var t=e.split(",")[0].split(":")[1].split(";")[0],i=atob(e.split(",")[1]),r=new ArrayBuffer(i.length),n=new Uint8Array(r),o=0;o1048576){var i=document.createElement("canvas");i.width=i.height=1;var r=i.getContext("2d");return r.drawImage(e,1-t,0),0===r.getImageData(0,0,1,1).data[3]}return!1},rotate:function(e,t){var i={1:{90:6,180:3,270:8},2:{90:7,180:4,270:5},3:{90:8,180:1,270:6},4:{90:5,180:2,270:7},5:{90:2,180:7,270:4},6:{90:3,180:8,270:1},7:{90:4,180:5,270:2},8:{90:1,180:6,270:3}};return i[e][t]?i[e][t]:e},transformCoordinate:function(e,t,i,r){switch(r){case 5:case 6:case 7:case 8:e.width=i,e.height=t;break;default:e.width=t,e.height=i}var n=e.getContext("2d");switch(r){case 1:break;case 2:n.translate(t,0),n.scale(-1,1);break;case 3:n.translate(t,i),n.rotate(Math.PI);break;case 4:n.translate(0,i),n.scale(1,-1);break;case 5:n.rotate(.5*Math.PI),n.scale(1,-1);break;case 6:n.rotate(.5*Math.PI),n.translate(0,-i);break;case 7:n.rotate(.5*Math.PI),n.translate(t,-i),n.scale(-1,1);break;case 8:n.rotate(-.5*Math.PI),n.translate(-t,0)}},detectVerticalSquash:function(e,t,i){var r=document.createElement("canvas");r.width=1,r.height=i;var n=r.getContext("2d");n.drawImage(e,0,0);for(var o=n.getImageData(0,0,1,i).data,s=0,a=i,d=i;d>s;){0===o[4*(d-1)+3]?a=d:s=d,d=a+s>>1}var l=d/i;return 0===l?1:l},callback:function(e){return e},extend:function(){var e=arguments[0]||{},t=1,i=arguments.length,n=!1;e.constructor===Boolean&&(n=e,e=arguments[1]||{}),1===i&&(e=this,t=0);for(var o;t=5&&n<=8?r.newsize(d.height,d.width,e.options.width,e.options.height,e.options.crop):r.newsize(d.width,d.height,e.options.width,e.options.height,e.options.crop),s=d.width,l=d.height,c=o.width,h=o.height,u=document.createElement("canvas"),f=u.getContext("2d");f.save(),r.transformCoordinate(u,c,h,n),r.detectSubsampling(d)&&(s/=2,l/=2);var g=1024,p=document.createElement("canvas");p.width=p.height=g;for(var m=p.getContext("2d"),w=r.detectVerticalSquash(d,s,l),b=0;bl?l-b:g,S=0;Ss?s-S:g;m.clearRect(0,0,g,g),m.drawImage(d,-S,-b);var x=Math.floor(S*c/s),_=Math.ceil(v*c/s),F=Math.floor(b*h/l/w),A=Math.ceil(y*h/l/w);f.drawImage(p,0,0,v,y,x,F,_,A),S+=g}b+=g}f.restore(),p=m=null;var P=document.createElement("canvas");P.width="h"===o.cropped?h:c,P.height="w"===o.cropped?c:h;var C="h"===o.cropped?.5*(h-c):0,R="w"===o.cropped?.5*(c-h):0;if(P.getContext("2d").drawImage(u,C,R,c,h),"image/png"===t.type)var k=P.toDataURL(t.type);else var k=P.toDataURL("image/jpeg",.01*e.options.quality);e.options.callback(k,P.width,P.height)},d.src=n},i.readAsDataURL(t)}},e[i]=function(e,i){if("string"==typeof e)return r[e](i);new t(e,i)}}(window);var EXIF=function(){function e(e){return!!e.exifdata}function t(e,t){BinaryAjax(e.src,function(r){var n=i(r.binaryResponse);e.exifdata=n||{},t&&t.call(e)})}function i(e){if(255!=e.getByteAt(0)||216!=e.getByteAt(1))return!1;for(var t,i=2,r=e.getLength();i4?f:t+8,s=[],d=0;d4?f:t+8,e.getStringAt(o,u-1);case 3:if(1==u)return e.getShortAt(t+8,n);for(o=u>2?f:t+8,s=[],d=0;d0&&e.files.length>e.cfgs.limit){for(var n=0;n0&&n.size>=1048576*o?r.push(s+t.cfgs.errorMsg.invalidLarge):(n.index=e,n.aborted=!1,i.push(n)):r.push(s+t.cfgs.errorMsg.invalidType):!t.cfgs.useCanvas&&o>0&&n.size>=1048576*o?r.push(s+t.cfgs.errorMsg.invalidLarge):(n.index=e,n.aborted=!1,i.push(n))}),r.length&&t._showError(t.error,r.join("\n")),i},_createTpl:function(e){var t=this,i="",r="",n=[],o=null;if(i=t.cfgs.tpl?t.cfgs.tpl:'
  • \t\t

    \t\t

    \t

    $name

    \t

    $size

    \t

    \t

    ^

    \t

    x

    \t
  • ',brickjs.UserAgent.isiOS)return void $.each(e,function(n,o){var s=o.size/1024,a={name:o.name,size:s>=1024?(s/1024).toFixed(1)+"M":s.toFixed(1)+"KB",fileIndex:o.index};canvasResize(o,{width:t.cfgs.width,height:0,crop:!1,quality:t.cfgs.quality,callback:function(o,s,d){a.preview=o,r+=t._templ(i,a),n===e.length-1&&(t.tplContainer.html(r).show(),t._bindTpl())}})});$.each(e,function(e,o){var s=o.size/1024,a={name:o.name,size:s>=1024?(s/1024).toFixed(1)+"M":s.toFixed(1)+"KB",fileIndex:o.index};a.preview=t._dealObjectURL(o,!0),r+=t._templ(i,a),n.push(a.preview)}),o=setTimeout(function(){$.each(n,function(e,i){t._dealObjectURL(i)}),clearTimeout(o)},5e3),t.tplContainer.html(r).show(),t._bindTpl()},_bindTpl:function(){var e=this;e.tplContainer.on("click",'[node-type="close"]',function(){e._delete($(this).attr("node-data"))}),e.tplContainer.on("click",'[node-type="reupload"]',function(){var t=$(this).hide().attr("node-data"),i=[],r="";$.each(e.filesFilter,function(n,o){if(o.index==t)return r=e.tplContainer.find('[node-id="'+t+'"]'),r.find('[node-type="result"]').hide(),r.find('[node-type="progress"]').css("width",0),i.push(o),e._upload(i),!1})})},_watchTpl:function(e,t,i,r){var n=this,o="";if("string"==typeof n.cfgs.tpl&&n.tplContainer.length)switch(o=n.container.find('[node-id="'+t+'"]'),e){case"progress":o.find('[node-type="progress"]').animate({width:i/r*100+"%"});break;case"success":o.attr("node-status","success").find('[node-type="result"]').html("上传成功").show(),o.find('[node-type="progress"]').css("width","100%");break;case"failure":o.attr("node-status","failure").find('[node-type="result"]').html(i||"上传失败").show(),o.find('[node-type="reupload"]').show()}},_templ:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e=e.replace(new RegExp("\\$"+i,"ig"),t[i]));return e},_dealObjectURL:function(e,t){if(window.URL){if(t)return window.URL.createObjectURL(e);window.URL.revokeObjectURL(e)}else if(window.webkitURL){if(t)return window.webkitURL.createObjectURL(e);window.webkitURL.revokeObjectURL(e)}},_upload:function _upload(target){var self=this,filesFilter=self.filesFilter;target&&(filesFilter=target),0!==filesFilter.length&&(self.cfgs.onUploading(),self.disable(),$.each(filesFilter,function(index,file){var xhr=new XMLHttpRequest,fileIndex=file.index,fileName=file.name?file.name:"";if(xhr.upload.addEventListener("progress",function(e){self._watchTpl("progress",fileIndex,e.loaded,e.total),self.cfgs.onProgress(e.loaded,e.total,file)},!1),xhr.addEventListener("error",function(e){self._checkPogress(target,file),self._watchTpl("failure",fileIndex),self.cfgs.onFailure("上传失败",file),self.cfgs.autoUpload&&self._delete(file,target)},!1),xhr.addEventListener("load",function(e){var response=eval("("+xhr.responseText+")"),fileAborted=file.aborted;fileAborted||(response&&1==response.status?(self._watchTpl("success",fileIndex),self.cfgs.onSuccess(response,file),self._delete(file,target)):(self._checkPogress(target,file),self._watchTpl("failure",fileIndex,response?response.message:"上传失败"),self.cfgs.onFailure(response?response.message:"上传失败",file)))},!1),self.cfgs.useCanvas||brickjs.UserAgent.isiOS)brickjs.UserAgent.isiOS?self._resizeIos(file,1,1,xhr):self._resize(file,1,1,xhr);else{var formData=new FormData;formData.append("Filedata",file);for(var p in self.cfgs.params)self.cfgs.params.hasOwnProperty(p)&&formData.append(p,self.cfgs.params[p]);xhr.open("POST",self.cfgs.url,!0),xhr.send(formData)}}))},_resize:function(e,t,i,r){var n=this,o=document.createElement("canvas"),s=o.getContext("2d"),a=new FileReader,d=new Image,l=1,c=null,h=parseFloat(n.cfgs.size)||1e3;a.onload=function(a){d.onload=function(){l=this.width>n.cfgs.width?n.cfgs.width/this.width:1,o.width=this.width*l*t,o.height=this.height*l*t,s.drawImage(d,0,0,o.width,o.height),c="image/png"===e.type?o.toDataURL(e.type):o.toDataURL("image/jpeg",n.cfgs.quality/100*i),c.length<1024*h*1024?(r.open("POST",n.cfgs.url,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send("Filedata="+encodeURIComponent(c)+"&title="+n.cfgs.params.title+"&uploadtype="+n.cfgs.params.uploadtype)):(n.compress++,"image/png"===e.type||brickjs.UserAgent.isAndroid&&!brickjs.UserAgent.chrome?n._resize(e,Math.pow(.8,n.compress),1,r):n._resize(e,1,Math.pow(.8,n.compress),r))},d.src=a.target.result},a.readAsDataURL(e)},_resizeIos:function(e,t,i,r){var n=this,o=parseFloat(n.cfgs.size)||1e3;canvasResize(e,{width:n.cfgs.width*t,height:0,crop:!1,quality:n.cfgs.quality*i,callback:function(t,i,s){t.length<1024*o*1024?(r.open("POST",n.cfgs.url,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send("Filedata="+encodeURIComponent(t)+"&title="+n.cfgs.params.title+"&uploadtype="+n.cfgs.params.uploadtype)):(n.compress++,"image/png"===e.type?n._resizeIos(e,Math.pow(.8,n.compress),1,r):n._resizeIos(e,1,Math.pow(.8,n.compress),r))}})},_delete:function(e,t){var i=this,r=[];if(!i.filesFilter.length&&"string"==typeof e)return void i._hidePreview(e);$.each(i.filesFilter,function(t,n){"string"==typeof e?n.index!=e?r.push(n):(i._hidePreview(e),n.aborted=!0,i.cfgs.onDelete(n)):n!=e?r.push(n):"string"==typeof i.cfgs.tpl&&i.tplContainer.length&&i.cfgs.autoHide&&i._hidePreview(n.index)}),i.filesFilter=r,i.files=r,i._checkPogress(t)},_hidePreview:function(e){var t=this,i=0;t.container.find('[node-id="'+e+'"]').fadeOut("slow",function(){$(this).remove(),(i=t.container.find("[node-id]").length)||t.tplContainer.html("").hide()})},_checkPogress:function(e,t){var i=this;i.count--,t&&i.failFiles.push(t),i.filesFilter.length?!i.count&&i.failFiles.length?(i.cfgs.onComplete("部分图片未上传成功,请重新上传",i.failFiles),i.enable()):e&&i.enable():(i.disabled||i.cfgs.onComplete("全部图片上传成功"),i.enable())},_showError:function(e,t,i){if("function"==typeof this.cfgs.onError)return void this.cfgs.onError(t);e.length?i?e.append(t).show():e.html(t).show():setTimeout(function(){alert(t)},0)},disable:function(){this.disabled=!1},enable:function(){this.disabled=!0}},regist("Upload",Upload)}("undefined"!=typeof Zepto?Zepto:jQuery,window,document)},14:function(e,t,i){"use strict";!function(e,t,i,r){var n={isDesktop:!1,isWindows:!1,isLinux:!1,isMac:!1,isTablet:!1,isiPad:!1,isAndroidTablet:!1,isMobile:!1,isiOS:!1,isAndroid:!1,isiPhone:!1,isWindowsPhone:!1,isWeChat:!1,isWeibo:!1,ie:0,firefox:0,chrome:0,safari:0,opera:0,uc:0,mqq:0,baidu:0,androidBrowser:0,browser:"",engine:"",osVersion:0,_versions:{ie:/msie\s([\d\.]+[\d])|trident\/\d+\.\d+;\s+[rv:]+(\d+\.\d)/i,firefox:/firefox\/([\d\w\.\-]+)/i,chrome:/(chrome|crios)\/([\d\w\.\-]+)/i,safari:/version\/([\d\w\.\-]+)/i,opera:/version\/([\d\w\.\-]+)/i,uc:/ucbrowser\/([\d\w\.\-]+)/i,mqq:/mqqbrowser\/([\d\w\.\-]+)/i,baidu:/baidubrowser\/([\d\w\.\-]+)/i,androidBrowser:/version\/([\d\w\.\-]+)/i},_browsers:{ie:/msie|trident/i,firefox:/firefox/i,chrome:/chrome|crios/i,safari:/safari/i,opera:/opera/i,uc:/ucbrowser/i,mqq:/mqqbrowser/i,baidu:/baidubrowser/i,weibo:/weibo/i,wechat:/micromessenger/i},_platforms:{windows:/windows nt/i,windowsPhone:/windows phone/i,mac:/macintosh/i,linux:/linux/i,iPad:/ipad/i,iPod:/ipod/i,iPhone:/iphone/i,android:/android/i},_osVersion:{iOS:/(iphone\sos|cpu\sos)\s([\d\w\_\-]+)/i,android:/android\s([\d\w\.\-]+)/i},_engine:{trident:/trident/i,gecko:/gecko/i,applewebkit:/applewebkit/i,presto:/presto/i},_init:function(){this.ua=navigator.userAgent.toLowerCase(),this._getPlatform(),this.browser=this._getBrowser(),this._getBroserVersion(),this.isAndroidTablet=this.isAndroid&&new RegExp("tablet","i").test(this.ua),this._testMobile(),this._getOSVersion(),this._getEngine()},_toFixedVersion:function(e,t){var e=(""+e).replace(/_/g,"."),t=t||1;return e=String(e).split("."),e=e[0]+"."+(e[1]||"0"),e=Number(e).toFixed(t)},_getBrowser:function(){var e=this.ua;switch(!0){case this._browsers.ie.test(e):return this.ie=!0,"IE";case this._browsers.firefox.test(e):return this.firefox=!0,"Firefox";case this._browsers.opera.test(e):return this.opera=!0,"Opera";case this._browsers.uc.test(e):return this.uc=!0,"UC";case this._browsers.baidu.test(e):return this.baidu=!0,"Baidu";case this._browsers.weibo.test(e):return this.isWeibo=!0,"Weibo";case this._browsers.wechat.test(e):return this.isWeChat=!0,"MicroMessenger";case this._browsers.mqq.test(e):return this.mqq=!0,"MQQ";case this._browsers.chrome.test(e):return this.chrome=!0,"Chrome";case!this.isAndroid&&this._browsers.safari.test(e):return this.safari=!0,"Safari";case this.isAndroid:return this.androidBrowser=!0,"Android";default:return"unknown"}},_getBroserVersion:function(){var e=this.ua;switch(!0){case this.ie:this._versions.ie.test(e),this.ie=RegExp.$2?this._toFixedVersion(RegExp.$2,1):this._toFixedVersion(RegExp.$1,1);break;case this.firefox:this._versions.firefox.test(e),this.firefox=RegExp.$1?this._toFixedVersion(RegExp.$1,1):0;break;case this.opera:this._versions.opera.test(e),this.opera=RegExp.$1?this._toFixedVersion(RegExp.$1,1):0;break;case this.uc:this._versions.uc.test(e),this.uc=RegExp.$1?this._toFixedVersion(RegExp.$1,1):0;break;case this.baidu:this._versions.baidu.test(e),this.baidu=RegExp.$1?this._toFixedVersion(RegExp.$1,1):0;break;case this.mqq:this._versions.mqq.test(e),this.mqq=RegExp.$1?this._toFixedVersion(RegExp.$1,1):0;break;case this.chrome:this._versions.chrome.test(e),this.chrome=RegExp.$2?this._toFixedVersion(RegExp.$2,1):0;break;case this.safari:this._versions.safari.test(e),this.safari=RegExp.$1?this._toFixedVersion(RegExp.$1,1):0;break;case this.androidBrowser:this._versions.androidBrowser.test(e),this.androidBrowser=RegExp.$1?this._toFixedVersion(RegExp.$1,1):0}},_getOSVersion:function(){var e=this.ua;switch(!0){case this._osVersion.iOS.test(e):this.osVersion=RegExp.$2.replace(/_/g,"."),this.isiOS=!0;break;case this._osVersion.android.test(e):this.osVersion=RegExp.$1}},_getPlatform:function(){var e=this.ua;switch(!0){case this._platforms.windows.test(e):this.isWindows=!0;break;case this._platforms.windowsPhone.test(e):this.isWindowsPhone=!0;break;case this._platforms.mac.test(e):this.isMac=!0;break;case this._platforms.iPad.test(e):this.isiPad=!0;break;case this._platforms.iPhone.test(e)||this._platforms.iPod.test(e):this.isiPhone=!0;break;case this._platforms.android.test(e):this.isAndroid=!0;break;case this._platforms.linux.test(e):this.isLinux=!0}},_testMobile:function(){var e=this.ua;switch(!0){case this.isWindows:case this.isLinux:case this.isMac:this.isDesktop=!0;break;case this.isiPad:case this.isAndroidTablet:this.isTablet=!0;break;case this.isAndroid:case this.isiPhone:case this.isWindowsPhone:this.isMobile=!0}/mobile/i.test(e)&&!this.isTablet&&(this.isMobile=!0,this.isDesktop=!1,this.isTablet=!1)},_getEngine:function(){var e=this.ua;switch(!0){case this._engine.trident.test(e):this.engine="trident";break;case this._engine.applewebkit.test(e):this.engine="applewebkit";break;case this._engine.presto.test(e):this.engine="presto";break;case this._engine.gecko.test(e):this.engine="gecko"}},contains:function(e){return new RegExp(e,"i").test(this.ua)},getUserAgent:function(){return this.ua}};n._init(),function(e,i){void 0===t.brickjs&&(t.brickjs={}),brickjs[e]=i}("UserAgent",n)}("undefined"!=typeof Zepto?Zepto:jQuery,window,document)},18:function(e,t){},25:function(e,t,i){e.exports=i(1)},8:function(e,t,i){"use strict";i(14),i(13),$(".comment-imgs-box ul").on("click","li .close",function(){$(this).parent().remove()})}},[25]); //# sourceMappingURL=comment.js.map?v=f4729b47