Commit 32b06b0d by doszhang

dos

parent fdd508f4
......@@ -120,9 +120,9 @@
src="https://api2.izhida.cn/wechat_js_config?app_id=wx4c3c856ab83a946b&v=1.2.1&api_list=all&app_stat_key=">
</script>
<script src="__CDN__/js/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="__CDN__/js/swiper.min.js"></script>
<script src="__CDN__/js/jquery-notify.min.js"></script>
<script src="__CDN__/js/hammer.min.js"></script>
<script src="__CDN__/js/lrz.mobile.min.js"></script>
<script src="__CDN__/js/common.js?version={:$version}"></script>
{:block name='js'}{:/block}
......
(function(){function e(e){return!!e.exifdata}function t(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(e),r=n.length,o=new ArrayBuffer(r),i=new Uint8Array(o),a=0;r>a;a++)i[a]=n.charCodeAt(a);return o}function r(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(e){(200==this.status||0===this.status)&&t(this.response)},n.send()}function o(e,n){function o(t){var r=i(t),o=a(t);e.exifdata=r||{},e.iptcdata=o||{},n&&n.call(e)}if(e.src)if(/^data\:/i.test(e.src)){var s=t(e.src);o(s)}else if(/^blob\:/i.test(e.src)){var l=new FileReader;l.onload=function(e){o(e.target.result)},r(e.src,function(e){l.readAsArrayBuffer(e)})}else{var u=new XMLHttpRequest;u.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";o(u.response),u=null},u.open("GET",e.src,!0),u.responseType="arraybuffer",u.send(null)}else if(window.FileReader&&(e instanceof window.Blob||e instanceof window.File)){var l=new FileReader;l.onload=function(e){f&&console.log("Got file of length "+e.target.result.byteLength),o(e.target.result)},l.readAsArrayBuffer(e)}}function i(e){var t=new DataView(e);if(f&&console.log("Got file of length "+e.byteLength),255!=t.getUint8(0)||216!=t.getUint8(1))return f&&console.log("Not a valid JPEG"),!1;for(var n,r=2,o=e.byteLength;o>r;){if(255!=t.getUint8(r))return f&&console.log("Not a valid marker at offset "+r+", found: "+t.getUint8(r)),!1;if(n=t.getUint8(r+1),f&&console.log(n),225==n)return f&&console.log("Found 0xFFE1 marker"),c(t,r+4,t.getUint16(r+2)-2);r+=2+t.getUint16(r+2)}}function a(e){var t=new DataView(e);if(f&&console.log("Got file of length "+e.byteLength),255!=t.getUint8(0)||216!=t.getUint8(1))return f&&console.log("Not a valid JPEG"),!1;for(var n=2,r=e.byteLength,o=function(e,t){return 56===e.getUint8(t)&&66===e.getUint8(t+1)&&73===e.getUint8(t+2)&&77===e.getUint8(t+3)&&4===e.getUint8(t+4)&&4===e.getUint8(t+5)};r>n;){if(o(t,n)){var i=t.getUint8(n+7);i%2!==0&&(i+=1),0===i&&(i=4);var a=n+8+i,l=t.getUint16(n+6+i);return s(e,a,l)}n++}}function s(e,t,n){for(var r,o,i,a,s,l=new DataView(e),u={},c=t;t+n>c;)28===l.getUint8(c)&&2===l.getUint8(c+1)&&(a=l.getUint8(c+2),a in F&&(i=l.getInt16(c+3),s=i+5,o=F[a],r=d(l,c+5,i),u.hasOwnProperty(o)?u[o]instanceof Array?u[o].push(r):u[o]=[u[o],r]:u[o]=r)),c++;return u}function l(e,t,n,r,o){var i,a,s,l=e.getUint16(n,!o),d={};for(s=0;l>s;s++)i=n+12*s+2,a=r[e.getUint16(i,!o)],!a&&f&&console.log("Unknown tag: "+e.getUint16(i,!o)),d[a]=u(e,i,t,n,o);return d}function u(e,t,n,r,o){var i,a,s,l,u,c,f=e.getUint16(t+2,!o),g=e.getUint32(t+4,!o),h=e.getUint32(t+8,!o)+n;switch(f){case 1:case 7:if(1==g)return e.getUint8(t+8,!o);for(i=g>4?h:t+8,a=[],l=0;g>l;l++)a[l]=e.getUint8(i+l);return a;case 2:return i=g>4?h:t+8,d(e,i,g-1);case 3:if(1==g)return e.getUint16(t+8,!o);for(i=g>2?h:t+8,a=[],l=0;g>l;l++)a[l]=e.getUint16(i+2*l,!o);return a;case 4:if(1==g)return e.getUint32(t+8,!o);for(a=[],l=0;g>l;l++)a[l]=e.getUint32(h+4*l,!o);return a;case 5:if(1==g)return u=e.getUint32(h,!o),c=e.getUint32(h+4,!o),s=new Number(u/c),s.numerator=u,s.denominator=c,s;for(a=[],l=0;g>l;l++)u=e.getUint32(h+8*l,!o),c=e.getUint32(h+4+8*l,!o),a[l]=new Number(u/c),a[l].numerator=u,a[l].denominator=c;return a;case 9:if(1==g)return e.getInt32(t+8,!o);for(a=[],l=0;g>l;l++)a[l]=e.getInt32(h+4*l,!o);return a;case 10:if(1==g)return e.getInt32(h,!o)/e.getInt32(h+4,!o);for(a=[],l=0;g>l;l++)a[l]=e.getInt32(h+8*l,!o)/e.getInt32(h+4+8*l,!o);return a}}function d(e,t,r){var o="";for(n=t;n<t+r;n++)o+=String.fromCharCode(e.getUint8(n));return o}function c(e,t){if("Exif"!=d(e,t,4))return f&&console.log("Not valid EXIF data! "+d(e,t,4)),!1;var n,r,o,i,a,s=t+6;if(18761==e.getUint16(s))n=!1;else{if(19789!=e.getUint16(s))return f&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;n=!0}if(42!=e.getUint16(s+2,!n))return f&&console.log("Not valid TIFF data! (no 0x002A)"),!1;var u=e.getUint32(s+4,!n);if(8>u)return f&&console.log("Not valid TIFF data! (First offset less than 8)",e.getUint32(s+4,!n)),!1;if(r=l(e,s,s+u,p,n),r.ExifIFDPointer){i=l(e,s,s+r.ExifIFDPointer,m,n);for(o in i){switch(o){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":i[o]=P[o][i[o]];break;case"ExifVersion":case"FlashpixVersion":i[o]=String.fromCharCode(i[o][0],i[o][1],i[o][2],i[o][3]);break;case"ComponentsConfiguration":i[o]=P.Components[i[o][0]]+P.Components[i[o][1]]+P.Components[i[o][2]]+P.Components[i[o][3]]}r[o]=i[o]}}if(r.GPSInfoIFDPointer){a=l(e,s,s+r.GPSInfoIFDPointer,S,n);for(o in a){switch(o){case"GPSVersionID":a[o]=a[o][0]+"."+a[o][1]+"."+a[o][2]+"."+a[o][3]}r[o]=a[o]}}return r}var f=!1,g=this,h=function(e){return e instanceof h?e:this instanceof h?void(this.EXIFwrapped=e):new h(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports.EXIF=h):g.EXIF=h;var m=h.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},p=h.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},S=h.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},P=h.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}},F={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};h.getData=function(t,n){return(t instanceof Image||t instanceof HTMLImageElement)&&!t.complete?!1:(e(t)?n&&n.call(t):o(t,n),!0)},h.getTag=function(t,n){return e(t)?t.exifdata[n]:void 0},h.getAllTags=function(t){if(!e(t))return{};var n,r=t.exifdata,o={};for(n in r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o},h.pretty=function(t){if(!e(t))return"";var n,r=t.exifdata,o="";for(n in r)r.hasOwnProperty(n)&&(o+="object"==typeof r[n]?r[n]instanceof Number?n+" : "+r[n]+" ["+r[n].numerator+"/"+r[n].denominator+"]\r\n":n+" : ["+r[n].length+" values]\r\n":n+" : "+r[n]+"\r\n");return o},h.readFromBinaryFile=function(e){return i(e)},"function"==typeof define&&define.amd&&define("exif-js",[],function(){return h})}).call(this);
function JPEGEncoder(e){function r(e){for(var r=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],a=0;64>a;a++){var o=S((r[a]*e+50)/100);1>o?o=1:o>255&&(o=255),k[G[a]]=o}for(var t=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],n=0;64>n;n++){var i=S((t[n]*e+50)/100);1>i?i=1:i>255&&(i=255),M[G[n]]=i}for(var c=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],l=0,d=0;8>d;d++)for(var m=0;8>m;m++)P[l]=1/(k[G[l]]*c[d]*c[m]*8),B[l]=1/(M[G[l]]*c[d]*c[m]*8),l++}function a(e,r){for(var a=0,o=0,t=new Array,n=1;16>=n;n++){for(var i=1;i<=e[n];i++)t[r[o]]=[],t[r[o]][0]=a,t[r[o]][1]=n,o++,a++;a*=2}return t}function o(){b=a(H,R),_=a(K,j),w=a(D,U),y=a(q,V)}function t(){for(var e=1,r=2,a=1;15>=a;a++){for(var o=e;r>o;o++)O[32767+o]=a,z[32767+o]=[],z[32767+o][1]=a,z[32767+o][0]=o;for(var t=-(r-1);-e>=t;t++)O[32767+t]=a,z[32767+t]=[],z[32767+t][1]=a,z[32767+t][0]=r-1+t;e<<=1,r<<=1}}function n(){for(var e=0;256>e;e++)F[e]=19595*e,F[e+256>>0]=38470*e,F[e+512>>0]=7471*e+32768,F[e+768>>0]=-11059*e,F[e+1024>>0]=-21709*e,F[e+1280>>0]=32768*e+8421375,F[e+1536>>0]=-27439*e,F[e+1792>>0]=-5329*e}function i(e){for(var r=e[0],a=e[1]-1;a>=0;)r&1<<a&&(T|=1<<I),a--,I--,0>I&&(255==T?(c(255),c(0)):c(T),I=7,T=0)}function c(e){N.push(E[e])}function l(e){c(e>>8&255),c(255&e)}function d(e,r){var a,o,t,n,i,c,l,d,m,p=0;const s=8,u=64;for(m=0;s>m;++m){a=e[p],o=e[p+1],t=e[p+2],n=e[p+3],i=e[p+4],c=e[p+5],l=e[p+6],d=e[p+7];var g=a+d,f=a-d,x=o+l,v=o-l,h=t+c,b=t-c,_=n+i,w=n-i,y=g+_,A=g-_,S=x+h,k=x-h;e[p]=y+S,e[p+4]=y-S;var M=.707106781*(k+A);e[p+2]=A+M,e[p+6]=A-M,y=w+b,S=b+v,k=v+f;var P=.382683433*(y-k),B=.5411961*y+P,z=1.306562965*k+P,O=.707106781*S,L=f+O,N=f-O;e[p+5]=N+B,e[p+3]=N-B,e[p+1]=L+z,e[p+7]=L-z,p+=8}for(p=0,m=0;s>m;++m){a=e[p],o=e[p+8],t=e[p+16],n=e[p+24],i=e[p+32],c=e[p+40],l=e[p+48],d=e[p+56];var T=a+d,I=a-d,W=o+l,Z=o-l,$=t+c,E=t-c,F=n+i,G=n-i,H=T+F,R=T-F,D=W+$,U=W-$;e[p]=H+D,e[p+32]=H-D;var K=.707106781*(U+R);e[p+16]=R+K,e[p+48]=R-K,H=G+E,D=E+Z,U=Z+I;var j=.382683433*(H-U),q=.5411961*H+j,V=1.306562965*U+j,X=.707106781*D,J=I+X,Q=I-X;e[p+40]=Q+q,e[p+24]=Q-q,e[p+8]=J+V,e[p+56]=J-V,p++}var Y;for(m=0;u>m;++m)Y=e[m]*r[m],C[m]=Y>0?Y+.5|0:Y-.5|0;return C}function m(){l(65504),l(16),c(74),c(70),c(73),c(70),c(0),c(1),c(1),c(0),l(1),l(1),c(0),c(0)}function p(e,r){l(65472),l(17),c(8),l(r),l(e),c(3),c(1),c(17),c(0),c(2),c(17),c(1),c(3),c(17),c(1)}function s(){l(65499),l(132),c(0);for(var e=0;64>e;e++)c(k[e]);c(1);for(var r=0;64>r;r++)c(M[r])}function u(){l(65476),l(418),c(0);for(var e=0;16>e;e++)c(H[e+1]);for(var r=0;11>=r;r++)c(R[r]);c(16);for(var a=0;16>a;a++)c(D[a+1]);for(var o=0;161>=o;o++)c(U[o]);c(1);for(var t=0;16>t;t++)c(K[t+1]);for(var n=0;11>=n;n++)c(j[n]);c(17);for(var i=0;16>i;i++)c(q[i+1]);for(var d=0;161>=d;d++)c(V[d])}function g(){l(65498),l(12),c(3),c(1),c(0),c(2),c(17),c(3),c(17),c(0),c(63),c(0)}function f(e,r,a,o,t){var n,c=t[0],l=t[240];const m=16,p=63,s=64;for(var u=d(e,r),g=0;s>g;++g)L[G[g]]=u[g];var f=L[0]-a;a=L[0],0==f?i(o[0]):(n=32767+f,i(o[O[n]]),i(z[n]));for(var x=63;x>0&&0==L[x];x--);if(0==x)return i(c),a;for(var v,h=1;x>=h;){for(var b=h;0==L[h]&&x>=h;++h);var _=h-b;if(_>=m){v=_>>4;for(var w=1;v>=w;++w)i(l);_=15&_}n=32767+L[h],i(t[(_<<4)+O[n]]),i(z[n]),h++}return x!=p&&i(c),a}function x(){for(var e=String.fromCharCode,r=0;256>r;r++)E[r]=e(r)}function v(e){if(0>=e&&(e=1),e>100&&(e=100),A!=e){var a=0;a=Math.floor(50>e?5e3/e:200-2*e),r(a),A=e,console.log("Quality set to: "+e+"%")}}function h(){var r=(new Date).getTime();e||(e=50),x(),o(),t(),n(),v(e);var a=(new Date).getTime()-r;console.log("Initialization "+a+"ms")}var b,_,w,y,A,S=(Math.round,Math.floor),k=new Array(64),M=new Array(64),P=new Array(64),B=new Array(64),z=new Array(65535),O=new Array(65535),C=new Array(64),L=new Array(64),N=[],T=0,I=7,W=new Array(64),Z=new Array(64),$=new Array(64),E=new Array(256),F=new Array(2048),G=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],H=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],D=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],U=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],K=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],q=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],V=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];this.encode=function(e,r,a){var o=(new Date).getTime();r&&v(r),N=new Array,T=0,I=7,l(65496),m(),s(),p(e.width,e.height),u(),g();var t=0,n=0,c=0;T=0,I=7,this.encode.displayName="_encode_";for(var d,x,h,A,S,k,M,z,O,C=e.data,L=e.width,E=e.height,G=4*L,H=0;E>H;){for(d=0;G>d;){for(S=G*H+d,k=S,M=-1,z=0,O=0;64>O;O++)z=O>>3,M=4*(7&O),k=S+z*G+M,H+z>=E&&(k-=G*(H+1+z-E)),d+M>=G&&(k-=d+M-G+4),x=C[k++],h=C[k++],A=C[k++],W[O]=(F[x]+F[h+256>>0]+F[A+512>>0]>>16)-128,Z[O]=(F[x+768>>0]+F[h+1024>>0]+F[A+1280>>0]>>16)-128,$[O]=(F[x+1280>>0]+F[h+1536>>0]+F[A+1792>>0]>>16)-128;t=f(W,P,t,b,w),n=f(Z,B,n,_,y),c=f($,B,c,_,y),d+=32}H+=8}if(I>=0){var R=[];R[1]=I+1,R[0]=(1<<I+1)-1,i(R)}if(l(65497),a){for(var D=N.length,U=new Uint8Array(D),K=0;D>K;K++)U[K]=N[K].charCodeAt();N=[];var j=(new Date).getTime()-o;return console.log("Encoding time: "+j+"ms"),U}var q="data:image/jpeg;base64,"+btoa(N.join(""));N=[];var j=(new Date).getTime()-o;return console.log("Encoding time: "+j+"ms"),q},h()}!function(e){Array.prototype.map||(Array.prototype.map=function(e,r){var a,o,t;if(null==this)throw new TypeError(" this is null or not defined");var n=Object(this),i=n.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(r&&(a=r),o=Array(i),t=0;i>t;){var c,l;t in n&&(c=n[t],l=e.call(a,c,t,n),o[t]=l),t++}return o});var r=e.detect=function(){var e=function(){},r={browser_parsers:[{regex:"^(Opera)/(\\d+)\\.(\\d+) \\(Nintendo Wii",family_replacement:"Wii",manufacturer:"Nintendo"},{regex:"(SeaMonkey|Camino)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)",family_replacement:"Camino",other:!0},{regex:"(Pale[Mm]oon)/(\\d+)\\.(\\d+)\\.?(\\d+)?",family_replacement:"Pale Moon (Firefox Variant)",other:!0},{regex:"(Fennec)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)",family_replacement:"Firefox Mobile"},{regex:"(Fennec)/(\\d+)\\.(\\d+)(pre)",family_replacment:"Firefox Mobile"},{regex:"(Fennec)/(\\d+)\\.(\\d+)",family_replacement:"Firefox Mobile"},{regex:"Mobile.*(Firefox)/(\\d+)\\.(\\d+)",family_replacement:"Firefox Mobile"},{regex:"(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?)",family_replacement:"Firefox ($1)"},{regex:"(Firefox)/(\\d+)\\.(\\d+)(a\\d+[a-z]*)",family_replacement:"Firefox Alpha"},{regex:"(Firefox)/(\\d+)\\.(\\d+)(b\\d+[a-z]*)",family_replacement:"Firefox Beta"},{regex:"(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(a\\d+[a-z]*)",family_replacement:"Firefox Alpha"},{regex:"(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(b\\d+[a-z]*)",family_replacement:"Firefox Beta"},{regex:"(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?",family_replacement:"Firefox ($1)"},{regex:"(Firefox).*Tablet browser (\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"MicroB",tablet:!0},{regex:"(MozillaDeveloperPreview)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?"},{regex:"(Flock)/(\\d+)\\.(\\d+)(b\\d+?)",family_replacement:"Flock",other:!0},{regex:"(RockMelt)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Rockmelt",other:!0},{regex:"(Navigator)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Netscape"},{regex:"(Navigator)/(\\d+)\\.(\\d+)([ab]\\d+)",family_replacement:"Netscape"},{regex:"(Netscape6)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Netscape"},{regex:"(MyIBrow)/(\\d+)\\.(\\d+)",family_replacement:"My Internet Browser",other:!0},{regex:"(Opera Tablet).*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?",family_replacement:"Opera Tablet",tablet:!0},{regex:"(Opera)/.+Opera Mobi.+Version/(\\d+)\\.(\\d+)",family_replacement:"Opera Mobile"},{regex:"Opera Mobi",family_replacement:"Opera Mobile"},{regex:"(Opera Mini)/(\\d+)\\.(\\d+)",family_replacement:"Opera Mini"},{regex:"(Opera Mini)/att/(\\d+)\\.(\\d+)",family_replacement:"Opera Mini"},{regex:"(Opera)/9.80.*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?",family_replacement:"Opera"},{regex:"(webOSBrowser)/(\\d+)\\.(\\d+)",family_replacement:"webOS"},{regex:"(webOS)/(\\d+)\\.(\\d+)",family_replacement:"webOS"},{regex:"(wOSBrowser).+TouchPad/(\\d+)\\.(\\d+)",family_replacement:"webOS TouchPad"},{regex:"(luakit)",family_replacement:"LuaKit",other:!0},{regex:"(Lightning)/(\\d+)\\.(\\d+)([ab]?\\d+[a-z]*)",family_replacement:"Lightning",other:!0},{regex:"(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?) \\(Swiftfox\\)",family_replacement:"Swiftfox",other:!0},{regex:"(Firefox)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)? \\(Swiftfox\\)",family_replacement:"Swiftfox",other:!0},{regex:"rekonq",family_replacement:"Rekonq",other:!0},{regex:"(conkeror|Conkeror)/(\\d+)\\.(\\d+)\\.?(\\d+)?",family_replacement:"Conkeror",other:!0},{regex:"(konqueror)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Konqueror",other:!0},{regex:"(WeTab)-Browser",family_replacement:"WeTab",other:!0},{regex:"(Comodo_Dragon)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Comodo Dragon",other:!0},{regex:"(YottaaMonitor)",family_replacement:"Yottaa Monitor",other:!0},{regex:"(Kindle)/(\\d+)\\.(\\d+)",family_replacement:"Kindle"},{regex:"(Symphony) (\\d+).(\\d+)",family_replacement:"Symphony",other:!0},{regex:"Minimo",family_replacement:"Minimo",other:!0},{regex:"(CrMo)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Chrome Mobile"},{regex:"(CriOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Chrome Mobile iOS"},{regex:"(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+) Mobile",family_replacement:"Chrome Mobile"},{regex:"(chromeframe)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Chrome Frame"},{regex:"(UC Browser)(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"UC Browser",other:!0},{regex:"(SLP Browser)/(\\d+)\\.(\\d+)",family_replacement:"Tizen Browser",other:!0},{regex:"(Epiphany)/(\\d+)\\.(\\d+).(\\d+)",family_replacement:"Epiphany",other:!0},{regex:"(SE 2\\.X) MetaSr (\\d+)\\.(\\d+)",family_replacement:"Sogou Explorer",other:!0},{regex:"(Pingdom.com_bot_version_)(\\d+)\\.(\\d+)",family_replacement:"PingdomBot",other:!0},{regex:"(facebookexternalhit)/(\\d+)\\.(\\d+)",family_replacement:"FacebookBot"},{regex:"(Twitterbot)/(\\d+)\\.(\\d+)",family_replacement:"TwitterBot"},{regex:"(AdobeAIR|Chromium|FireWeb|Jasmine|ANTGalio|Midori|Fresco|Lobo|PaleMoon|Maxthon|Lynx|OmniWeb|Dillo|Camino|Demeter|Fluid|Fennec|Shiira|Sunrise|Chrome|Flock|Netscape|Lunascape|WebPilot|NetFront|Netfront|Konqueror|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|Opera Mini|iCab|NetNewsWire|ThunderBrowse|Iron|Iris|UP\\.Browser|Bunjaloo|Google Earth|Raven for Mac)/(\\d+)\\.(\\d+)\\.(\\d+)"},{regex:"(Bolt|Jasmine|IceCat|Skyfire|Midori|Maxthon|Lynx|Arora|IBrowse|Dillo|Camino|Shiira|Fennec|Phoenix|Chrome|Flock|Netscape|Lunascape|Epiphany|WebPilot|Opera Mini|Opera|NetFront|Netfront|Konqueror|Googlebot|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|iCab|NetNewsWire|Iron|Space Bison|Stainless|Orca|Dolfin|BOLT|Minimo|Tizen Browser|Polaris)/(\\d+)\\.(\\d+)"},{regex:"(iRider|Crazy Browser|SkipStone|iCab|Lunascape|Sleipnir|Maemo Browser) (\\d+)\\.(\\d+)\\.(\\d+)"},{regex:"(iCab|Lunascape|Opera|Android|Jasmine|Polaris|BREW) (\\d+)\\.(\\d+)\\.?(\\d+)?"},{regex:"(Android) Donut",v2_replacement:"2",v1_replacement:"1"},{regex:"(Android) Eclair",v2_replacement:"1",v1_replacement:"2"},{regex:"(Android) Froyo",v2_replacement:"2",v1_replacement:"2"},{regex:"(Android) Gingerbread",v2_replacement:"3",v1_replacement:"2"},{regex:"(Android) Honeycomb",v1_replacement:"3"},{regex:"(IEMobile)[ /](\\d+)\\.(\\d+)",family_replacement:"IE Mobile"},{regex:"(MSIE) (\\d+)\\.(\\d+).*XBLWP7",family_replacement:"IE Large Screen"},{regex:"(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+)"},{regex:"(Firefox)/(\\d+)\\.(\\d+)(pre|[ab]\\d+[a-z]*)?"},{regex:"(Obigo)InternetBrowser",other:!0},{regex:"(Obigo)\\-Browser",other:!0},{regex:"(Obigo|OBIGO)[^\\d]*(\\d+)(?:.(\\d+))?",other:!0},{regex:"(MAXTHON|Maxthon) (\\d+)\\.(\\d+)",family_replacement:"Maxthon",other:!0},{regex:"(Maxthon|MyIE2|Uzbl|Shiira)",v1_replacement:"0",other:!0},{regex:"(PLAYSTATION) (\\d+)",family_replacement:"PlayStation",manufacturer:"Sony"},{regex:"(PlayStation Portable)[^\\d]+(\\d+).(\\d+)",manufacturer:"Sony"},{regex:"(BrowseX) \\((\\d+)\\.(\\d+)\\.(\\d+)",other:!0},{regex:"(POLARIS)/(\\d+)\\.(\\d+)",family_replacement:"Polaris",other:!0},{regex:"(Embider)/(\\d+)\\.(\\d+)",family_replacement:"Polaris",other:!0},{regex:"(BonEcho)/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Bon Echo",other:!0},{regex:"(iPod).+Version/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPod).*Version/(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPod)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPhone).*Version/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPhone).*Version/(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPhone)",family_replacement:"Mobile Safari",manufacturer:"Apple"},{regex:"(iPad).*Version/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",tablet:!0,manufacturer:"Apple"},{regex:"(iPad).*Version/(\\d+)\\.(\\d+)",family_replacement:"Mobile Safari",tablet:!0,manufacturer:"Apple"},{regex:"(iPad)",family_replacement:"Mobile Safari",tablet:!0,manufacturer:"Apple"},{regex:"(AvantGo) (\\d+).(\\d+)",other:!0},{regex:"(Avant)",v1_replacement:"1",other:!0},{regex:"^(Nokia)",family_replacement:"Nokia Services (WAP) Browser",manufacturer:"Nokia"},{regex:"(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)\\.(\\d+)",manufacturer:"Nokia"},{regex:"(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)",manufacturer:"Nokia"},{regex:"(NokiaBrowser)/(\\d+)\\.(\\d+)",manufacturer:"Nokia"},{regex:"(BrowserNG)/(\\d+)\\.(\\d+).(\\d+)",family_replacement:"NokiaBrowser",manufacturer:"Nokia"},{regex:"(Series60)/5\\.0",v2_replacement:"0",v1_replacement:"7",family_replacement:"NokiaBrowser",manufacturer:"Nokia"},{regex:"(Series60)/(\\d+)\\.(\\d+)",family_replacement:"Nokia OSS Browser",manufacturer:"Nokia"},{regex:"(S40OviBrowser)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Nokia Series 40 Ovi Browser",manufacturer:"Nokia"},{regex:"(Nokia)[EN]?(\\d+)",manufacturer:"Nokia"},{regex:"(PlayBook).+RIM Tablet OS (\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Blackberry WebKit",tablet:!0,manufacturer:"Nokia"},{regex:"(Black[bB]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)",family_replacement:"Blackberry WebKit",manufacturer:"RIM"},{regex:"(Black[bB]erry)\\s?(\\d+)",family_replacement:"Blackberry",manufacturer:"RIM"},{regex:"(OmniWeb)/v(\\d+)\\.(\\d+)",other:!0},{regex:"(Blazer)/(\\d+)\\.(\\d+)",family_replacement:"Palm Blazer",manufacturer:"Palm"},{regex:"(Pre)/(\\d+)\\.(\\d+)",family_replacement:"Palm Pre",manufacturer:"Palm"},{regex:"(Links) \\((\\d+)\\.(\\d+)",other:!0},{regex:"(QtWeb) Internet Browser/(\\d+)\\.(\\d+)",other:!0},{regex:"(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))?",other:!0,tablet:!0},{regex:"(AppleWebKit)/(\\d+)\\.?(\\d+)?\\+ .* Version/\\d+\\.\\d+.\\d+ Safari/",family_replacement:"WebKit Nightly"},{regex:"(Version)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?.*Safari/",family_replacement:"Safari"},{regex:"(Safari)/\\d+"},{regex:"(OLPC)/Update(\\d+)\\.(\\d+)",other:!0},{regex:"(OLPC)/Update()\\.(\\d+)",v1_replacement:"0",other:!0},{regex:"(SEMC\\-Browser)/(\\d+)\\.(\\d+)",other:!0},{regex:"(Teleca)",family_replacement:"Teleca Browser",other:!0},{regex:"Trident(.*)rv.(\\d+)\\.(\\d+)",family_replacement:"IE"},{regex:"(MSIE) (\\d+)\\.(\\d+)",family_replacement:"IE"}],os_parsers:[{regex:"(Android) (\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?"},{regex:"(Android)\\-(\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?"},{regex:"(Android) Donut",os_v2_replacement:"2",os_v1_replacement:"1"},{regex:"(Android) Eclair",os_v2_replacement:"1",os_v1_replacement:"2"},{regex:"(Android) Froyo",os_v2_replacement:"2",os_v1_replacement:"2"},{regex:"(Android) Gingerbread",os_v2_replacement:"3",os_v1_replacement:"2"},{regex:"(Android) Honeycomb",os_v1_replacement:"3"},{regex:"(Silk-Accelerated=[a-z]{4,5})",os_replacement:"Android"},{regex:"(Windows Phone 6\\.5)"},{regex:"(Windows (?:NT 5\\.2|NT 5\\.1))",os_replacement:"Windows XP"},{regex:"(XBLWP7)",os_replacement:"Windows Phone OS"},{regex:"(Windows NT 6\\.1)",os_replacement:"Windows 7"},{regex:"(Windows NT 6\\.0)",os_replacement:"Windows Vista"},{regex:"(Windows 98|Windows XP|Windows ME|Windows 95|Windows CE|Windows 7|Windows NT 4\\.0|Windows Vista|Windows 2000)"},{regex:"(Windows NT 6\\.2)",os_replacement:"Windows 8"},{regex:"(Windows Phone 8)",os_replacement:"Windows Phone 8"},{regex:"(Windows NT 5\\.0)",os_replacement:"Windows 2000"},{regex:"(Windows Phone OS) (\\d+)\\.(\\d+)"},{regex:"(Windows ?Mobile)",os_replacement:"Windows Mobile"},{regex:"(WinNT4.0)",os_replacement:"Windows NT 4.0"},{regex:"(Win98)",os_replacement:"Windows 98"},{regex:"(Tizen)/(\\d+)\\.(\\d+)",other:!0},{regex:"(Mac OS X) (\\d+)[_.](\\d+)(?:[_.](\\d+))?",manufacturer:"Apple"},{regex:"(?:PPC|Intel) (Mac OS X)",manufacturer:"Apple"},{regex:"(CPU OS|iPhone OS) (\\d+)_(\\d+)(?:_(\\d+))?",os_replacement:"iOS",manufacturer:"Apple"},{regex:"(iPhone|iPad|iPod); Opera",os_replacement:"iOS",manufacturer:"Apple"},{regex:"(iPad); Opera",tablet:!0,manufacturer:"Apple"},{regex:"(iPhone|iPad|iPod).*Mac OS X.*Version/(\\d+)\\.(\\d+)",os_replacement:"iOS",manufacturer:"Apple"},{regex:"(CrOS) [a-z0-9_]+ (\\d+)\\.(\\d+)(?:\\.(\\d+))?",os_replacement:"Chrome OS"},{regex:"(Debian)-(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?",other:!0},{regex:"(Linux Mint)(?:/(\\d+))?",other:!0},{regex:"(Mandriva)(?: Linux)?/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?",other:!0},{regex:"(Symbian[Oo][Ss])/(\\d+)\\.(\\d+)",os_replacement:"Symbian OS"},{regex:"(Symbian/3).+NokiaBrowser/7\\.3",os_replacement:"Symbian^3 Anna"},{regex:"(Symbian/3).+NokiaBrowser/7\\.4",os_replacement:"Symbian^3 Belle"},{regex:"(Symbian/3)",os_replacement:"Symbian^3"},{regex:"(Series 60|SymbOS|S60)",os_replacement:"Symbian OS"},{regex:"(MeeGo)",other:!0},{regex:"Symbian [Oo][Ss]",os_replacement:"Symbian OS"},{regex:"(Black[Bb]erry)[0-9a-z]+/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?",os_replacement:"BlackBerry OS",manufacturer:"RIM"},{regex:"(Black[Bb]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?",os_replacement:"BlackBerry OS",manufacturer:"RIM"},{regex:"(RIM Tablet OS) (\\d+)\\.(\\d+)\\.(\\d+)",os_replacement:"BlackBerry Tablet OS",tablet:!0,manufacturer:"RIM"},{regex:"(Play[Bb]ook)",os_replacement:"BlackBerry Tablet OS",tablet:!0,manufacturer:"RIM"},{regex:"(Black[Bb]erry)",os_replacement:"Blackberry OS",manufacturer:"RIM"},{regex:"(webOS|hpwOS)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?",os_replacement:"webOS"},{regex:"(SUSE|Fedora|Red Hat|PCLinuxOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)",other:!0},{regex:"(SUSE|Fedora|Red Hat|Puppy|PCLinuxOS|CentOS)/(\\d+)\\.(\\d+)\\.(\\d+)",other:!0},{regex:"(Ubuntu|Kindle|Bada|Lubuntu|BackTrack|Red Hat|Slackware)/(\\d+)\\.(\\d+)"},{regex:"(Windows|OpenBSD|FreeBSD|NetBSD|Ubuntu|Kubuntu|Android|Arch Linux|CentOS|WeTab|Slackware)"},{regex:"(Linux|BSD)",other:!0}],mobile_os_families:["Windows Phone 6.5","Windows CE","Symbian OS"],device_parsers:[{regex:"HTC ([A-Z][a-z0-9]+) Build",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"HTC ([A-Z][a-z0-9 ]+) \\d+\\.\\d+\\.\\d+\\.\\d+",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"HTC_Touch_([A-Za-z0-9]+)",device_replacement:"HTC Touch ($1)",manufacturer:"HTC"},{regex:"USCCHTC(\\d+)",device_replacement:"HTC $1 (US Cellular)",manufacturer:"HTC"},{regex:"Sprint APA(9292)",device_replacement:"HTC $1 (Sprint)",manufacturer:"HTC"},{regex:"HTC ([A-Za-z0-9]+ [A-Z])",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"HTC-([A-Za-z0-9]+)",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"HTC_([A-Za-z0-9]+)",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"HTC ([A-Za-z0-9]+)",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"(ADR[A-Za-z0-9]+)",device_replacement:"HTC $1",manufacturer:"HTC"},{regex:"(HTC)",manufacturer:"HTC"},{regex:"SonyEricsson([A-Za-z0-9]+)/",device_replacement:"Ericsson $1",other:!0,manufacturer:"Sony"},{regex:"Android[\\- ][\\d]+\\.[\\d]+\\; [A-Za-z]{2}\\-[A-Za-z]{2}\\; WOWMobile (.+) Build"},{regex:"Android[\\- ][\\d]+\\.[\\d]+\\.[\\d]+; [A-Za-z]{2}\\-[A-Za-z]{2}\\; (.+) Build"},{regex:"Android[\\- ][\\d]+\\.[\\d]+\\-update1\\; [A-Za-z]{2}\\-[A-Za-z]{2}\\; (.+) Build"},{regex:"Android[\\- ][\\d]+\\.[\\d]+\\; [A-Za-z]{2}\\-[A-Za-z]{2}\\; (.+) Build"},{regex:"Android[\\- ][\\d]+\\.[\\d]+\\.[\\d]+; (.+) Build"},{regex:"NokiaN([0-9]+)",device_replacement:"Nokia N$1",manufacturer:"Nokia"},{regex:"Nokia([A-Za-z0-9\\v-]+)",device_replacement:"Nokia $1",manufacturer:"Nokia"},{regex:"NOKIA ([A-Za-z0-9\\-]+)",device_replacement:"Nokia $1",manufacturer:"Nokia"},{regex:"Nokia ([A-Za-z0-9\\-]+)",device_replacement:"Nokia $1",manufacturer:"Nokia"},{regex:"Lumia ([A-Za-z0-9\\-]+)",device_replacement:"Lumia $1",manufacturer:"Nokia"},{regex:"Symbian",device_replacement:"Nokia",manufacturer:"Nokia"},{regex:"(PlayBook).+RIM Tablet OS",device_replacement:"Blackberry Playbook",tablet:!0,manufacturer:"RIM"},{regex:"(Black[Bb]erry [0-9]+);",manufacturer:"RIM"},{regex:"Black[Bb]erry([0-9]+)",device_replacement:"BlackBerry $1",manufacturer:"RIM"},{regex:"(Pre)/(\\d+)\\.(\\d+)",device_replacement:"Palm Pre",manufacturer:"Palm"},{regex:"(Pixi)/(\\d+)\\.(\\d+)",device_replacement:"Palm Pixi",manufacturer:"Palm"},{regex:"(Touchpad)/(\\d+)\\.(\\d+)",device_replacement:"HP Touchpad",manufacturer:"HP"},{regex:"HPiPAQ([A-Za-z0-9]+)/(\\d+).(\\d+)",device_replacement:"HP iPAQ $1",manufacturer:"HP"},{regex:"Palm([A-Za-z0-9]+)",device_replacement:"Palm $1",manufacturer:"Palm"},{regex:"Treo([A-Za-z0-9]+)",device_replacement:"Palm Treo $1",manufacturer:"Palm"},{regex:"webOS.*(P160UNA)/(\\d+).(\\d+)",device_replacement:"HP Veer",manufacturer:"HP"},{regex:"(Kindle Fire)",manufacturer:"Amazon"},{regex:"(Kindle)",manufacturer:"Amazon"},{regex:"(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))?",device_replacement:"Kindle Fire",tablet:!0,manufacturer:"Amazon"},{regex:"(iPad) Simulator;",manufacturer:"Apple"},{regex:"(iPad);",manufacturer:"Apple"},{regex:"(iPod);",manufacturer:"Apple"},{regex:"(iPhone) Simulator;",manufacturer:"Apple"},{regex:"(iPhone);",manufacturer:"Apple"},{regex:"Nexus\\ ([A-Za-z0-9\\-]+)",device_replacement:"Nexus $1"},{regex:"acer_([A-Za-z0-9]+)_",device_replacement:"Acer $1",manufacturer:"Acer"},{regex:"acer_([A-Za-z0-9]+)_",device_replacement:"Acer $1",manufacturer:"Acer"},{regex:"Amoi\\-([A-Za-z0-9]+)",device_replacement:"Amoi $1",other:!0,manufacturer:"Amoi"},{regex:"AMOI\\-([A-Za-z0-9]+)",device_replacement:"Amoi $1",other:!0,manufacturer:"Amoi"},{regex:"Asus\\-([A-Za-z0-9]+)",device_replacement:"Asus $1",manufacturer:"Asus"},{regex:"ASUS\\-([A-Za-z0-9]+)",device_replacement:"Asus $1",manufacturer:"Asus"},{regex:"BIRD\\-([A-Za-z0-9]+)",device_replacement:"Bird $1",other:!0},{regex:"BIRD\\.([A-Za-z0-9]+)",device_replacement:"Bird $1",other:!0},{regex:"BIRD ([A-Za-z0-9]+)",device_replacement:"Bird $1",other:!0},{regex:"Dell ([A-Za-z0-9]+)",device_replacement:"Dell $1",manufacturer:"Dell"},{regex:"DoCoMo/2\\.0 ([A-Za-z0-9]+)",device_replacement:"DoCoMo $1",other:!0},{regex:"([A-Za-z0-9]+)\\_W\\;FOMA",device_replacement:"DoCoMo $1",other:!0},{regex:"([A-Za-z0-9]+)\\;FOMA",device_replacement:"DoCoMo $1",other:!0},{regex:"vodafone([A-Za-z0-9]+)",device_replacement:"Huawei Vodafone $1",other:!0},{regex:"i\\-mate ([A-Za-z0-9]+)",device_replacement:"i-mate $1",other:!0},{regex:"Kyocera\\-([A-Za-z0-9]+)",device_replacement:"Kyocera $1",other:!0},{regex:"KWC\\-([A-Za-z0-9]+)",device_replacement:"Kyocera $1",other:!0},{regex:"Lenovo\\-([A-Za-z0-9]+)",device_replacement:"Lenovo $1",manufacturer:"Lenovo"},{regex:"Lenovo\\_([A-Za-z0-9]+)",device_replacement:"Lenovo $1",manufacturer:"Levovo"},{regex:"LG/([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LG-LG([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LGE-LG([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LGE VX([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LG ([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LGE LG\\-AX([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LG\\-([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LGE\\-([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"LG([A-Za-z0-9]+)",device_replacement:"LG $1",manufacturer:"LG"},{regex:"(KIN)\\.One (\\d+)\\.(\\d+)",device_replacement:"Microsoft $1"},{regex:"(KIN)\\.Two (\\d+)\\.(\\d+)",device_replacement:"Microsoft $1"},{regex:"(Motorola)\\-([A-Za-z0-9]+)",manufacturer:"Motorola"},{regex:"MOTO\\-([A-Za-z0-9]+)",device_replacement:"Motorola $1",manufacturer:"Motorola"},{regex:"MOT\\-([A-Za-z0-9]+)",device_replacement:"Motorola $1",manufacturer:"Motorola"},{regex:"Philips([A-Za-z0-9]+)",device_replacement:"Philips $1",manufacturer:"Philips"},{regex:"Philips ([A-Za-z0-9]+)",device_replacement:"Philips $1",manufacturer:"Philips"},{regex:"SAMSUNG-([A-Za-z0-9\\-]+)",device_replacement:"Samsung $1",manufacturer:"Samsung"},{regex:"SAMSUNG\\; ([A-Za-z0-9\\-]+)",device_replacement:"Samsung $1",manufacturer:"Samsung"},{regex:"Softbank/1\\.0/([A-Za-z0-9]+)",device_replacement:"Softbank $1",other:!0},{regex:"Softbank/2\\.0/([A-Za-z0-9]+)",device_replacement:"Softbank $1",other:!0},{regex:"(hiptop|avantgo|plucker|xiino|blazer|elaine|up.browser|up.link|mmp|smartphone|midp|wap|vodafone|o2|pocket|mobile|pda)",device_replacement:"Generic Smartphone"},{regex:"^(1207|3gso|4thp|501i|502i|503i|504i|505i|506i|6310|6590|770s|802s|a wa|acer|acs\\-|airn|alav|asus|attw|au\\-m|aur |aus |abac|acoo|aiko|alco|alca|amoi|anex|anny|anyw|aptu|arch|argo|bell|bird|bw\\-n|bw\\-u|beck|benq|bilb|blac|c55/|cdm\\-|chtm|capi|comp|cond|craw|dall|dbte|dc\\-s|dica|ds\\-d|ds12|dait|devi|dmob|doco|dopo|el49|erk0|esl8|ez40|ez60|ez70|ezos|ezze|elai|emul|eric|ezwa|fake|fly\\-|fly\\_|g\\-mo|g1 u|g560|gf\\-5|grun|gene|go.w|good|grad|hcit|hd\\-m|hd\\-p|hd\\-t|hei\\-|hp i|hpip|hs\\-c|htc |htc\\-|htca|htcg)",device_replacement:"Generic Feature Phone"},{regex:"^(htcp|htcs|htct|htc\\_|haie|hita|huaw|hutc|i\\-20|i\\-go|i\\-ma|i230|iac|iac\\-|iac/|ig01|im1k|inno|iris|jata|java|kddi|kgt|kgt/|kpt |kwc\\-|klon|lexi|lg g|lg\\-a|lg\\-b|lg\\-c|lg\\-d|lg\\-f|lg\\-g|lg\\-k|lg\\-l|lg\\-m|lg\\-o|lg\\-p|lg\\-s|lg\\-t|lg\\-u|lg\\-w|lg/k|lg/l|lg/u|lg50|lg54|lge\\-|lge/|lynx|leno|m1\\-w|m3ga|m50/|maui|mc01|mc21|mcca|medi|meri|mio8|mioa|mo01|mo02|mode|modo|mot |mot\\-|mt50|mtp1|mtv |mate|maxo|merc|mits|mobi|motv|mozz|n100|n101|n102|n202|n203|n300|n302|n500|n502|n505|n700|n701|n710|nec\\-|nem\\-|newg|neon)",device_replacement:"Generic Feature Phone"},{regex:"^(netf|noki|nzph|o2 x|o2\\-x|opwv|owg1|opti|oran|ot\\-s|p800|pand|pg\\-1|pg\\-2|pg\\-3|pg\\-6|pg\\-8|pg\\-c|pg13|phil|pn\\-2|pt\\-g|palm|pana|pire|pock|pose|psio|qa\\-a|qc\\-2|qc\\-3|qc\\-5|qc\\-7|qc07|qc12|qc21|qc32|qc60|qci\\-|qwap|qtek|r380|r600|raks|rim9|rove|s55/|sage|sams|sc01|sch\\-|scp\\-|sdk/|se47|sec\\-|sec0|sec1|semc|sgh\\-|shar|sie\\-|sk\\-0|sl45|slid|smb3|smt5|sp01|sph\\-|spv |spv\\-|sy01|samm|sany|sava|scoo|send|siem|smar|smit|soft|sony|t\\-mo|t218|t250|t600|t610|t618|tcl\\-|tdg\\-|telm|tim\\-|ts70|tsm\\-|tsm3|tsm5|tx\\-9|tagt)",device_replacement:"Generic Feature Phone"},{regex:"^(talk|teli|topl|tosh|up.b|upg1|utst|v400|v750|veri|vk\\-v|vk40|vk50|vk52|vk53|vm40|vx98|virg|vite|voda|vulc|w3c |w3c\\-|wapj|wapp|wapu|wapm|wig |wapi|wapr|wapv|wapy|wapa|waps|wapt|winc|winw|wonu|x700|xda2|xdag|yas\\-|your|zte\\-|zeto|aste|audi|avan|blaz|brew|brvw|bumb|ccwa|cell|cldc|cmd\\-|dang|eml2|fetc|hipt|http|ibro|idea|ikom|ipaq|jbro|jemu|jigs|keji|kyoc|kyok|libw|m\\-cr|midp|mmef|moto|mwbp|mywa|newt|nok6|o2im|pant|pdxg|play|pluc|port|prox|rozo|sama|seri|smal|symb|treo|upsi|vx52|vx53|vx60|vx61|vx70|vx80|vx81|vx83|vx85|wap\\-|webc|whit|wmlb|xda\\-|xda\\_)",device_replacement:"Generic Feature Phone"},{regex:"(bot|borg|google(^tv)|yahoo|slurp|msnbot|msrbot|openbot|archiver|netresearch|lycos|scooter|altavista|teoma|gigabot|baiduspider|blitzbot|oegp|charlotte|furlbot|http%20client|polybot|htdig|ichiro|mogimogi|larbin|pompos|scrubby|searchsight|seekbot|semanticdiscovery|silk|snappy|speedy|spider|voila|vortex|voyager|zao|zeal|fast\\-webcrawler|converacrawler|dataparksearch|findlinks)",device_replacement:"Spider"}],mobile_browser_families:["Firefox Mobile","Opera Mobile","Opera Mini","Mobile Safari","webOS","IE Mobile","Playstation Portable","Nokia","Blackberry","Palm","Silk","Android","Maemo","Obigo","Netfront","AvantGo","Teleca","SEMC-Browser","Bolt","Iris","UP.Browser","Symphony","Minimo","Bunjaloo","Jasmine","Dolfin","Polaris","BREW","Chrome Mobile","Chrome Mobile iOS","UC Browser","Tizen Browser"]};e.parsers=["device_parsers","browser_parsers","os_parsers","mobile_os_families","mobile_browser_families"],e.types=["browser","os","device"],e.regexes=r||function(){var r={};return e.parsers.map(function(e){r[e]=[]}),r}(),e.families=function(){var r={};return e.types.map(function(e){r[e]=[]}),r}();var a=Array.prototype,o=(Object.prototype,Function.prototype,a.forEach);a.indexOf;var t=function(e,r){for(var a={},o=0;r.length>o&&!(a=r[o](e));o++);return a},n=function(e,r){i(e,function(e){i(r,function(r){delete e[r]})})},i=forEach=function(e,r,a){if(null!=e)if(o&&e.forEach===o)e.forEach(r,a);else if(e.length===+e.length)for(var t=0,n=e.length;n>t;t++)r.call(a,e[t],t,e);else for(var i in e)_.has(e,i)&&r.call(a,e[i],i,e)},c=function(e){return!(!e||void 0===e||null==e)},l=function(e){var r="";return e=e||{},c(e)&&c(e.major)&&(r+=e.major,c(e.minor)&&(r+="."+e.minor,c(e.patch)&&(r+="."+e.patch))),r},d=function(e){e=e||{};var r=l(e);return r&&(r=" "+r),e&&c(e.family)?e.family+r:""};return e.parse=function(r){var a=function(r){return e.regexes[r+"_parsers"].map(function(e){function a(r){var a=r.match(o);if(!a)return null;var i={};return i.family=(t?t.replace("$1",a[1]):a[1])||"other",i.major=parseInt(n?n:a[2])||null,i.minor=a[3]?parseInt(a[3]):null,i.patch=a[4]?parseInt(a[4]):null,i.tablet=e.tablet,i.man=e.manufacturer||null,i}var o=RegExp(e.regex),t=e[("browser"===r?"family":r)+"_replacement"],n=e.major_version_replacement;return a})},o=function(){},i=a("browser"),m=a("os"),p=a("device"),s=new o;s.source=r,s.browser=t(r,i),c(s.browser)?(s.browser.name=d(s.browser),s.browser.version=l(s.browser)):s.browser={},s.os=t(r,m),c(s.os)?(s.os.name=d(s.os),s.os.version=l(s.os)):s.os={},s.device=t(r,p),c(s.device)?(s.device.name=d(s.device),
s.device.version=l(s.device)):s.device={tablet:!1,family:"Other"};var u={};return e.regexes.mobile_browser_families.map(function(e){u[e]=!0}),e.regexes.mobile_os_families.map(function(e){u[e]=!0}),s.device.type="Spider"===s.browser.family?"Spider":s.browser.tablet||s.os.tablet||s.device.tablet?"Tablet":u.hasOwnProperty(s.browser.family)?"Mobile":"Desktop",s.device.manufacturer=s.browser.man||s.os.man||s.device.man||null,n([s.browser,s.os,s.device],["tablet","man"]),s},e}();"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=r),exports.detect=r):e.detect=r,"function"==typeof define&&define.amd&&define(function(){return r})}(window),function(){function e(e){var r=e.naturalWidth,a=e.naturalHeight;if(r*a>1048576){var o=document.createElement("canvas");o.width=o.height=1;var t=o.getContext("2d");return t.drawImage(e,-r+1,0),0===t.getImageData(0,0,1,1).data[3]}return!1}function r(e,r,a){var o=document.createElement("canvas");o.width=1,o.height=a;var t=o.getContext("2d");t.drawImage(e,0,0);for(var n=t.getImageData(0,0,1,a).data,i=0,c=a,l=a;l>i;){var d=n[4*(l-1)+3];0===d?c=l:i=l,l=c+i>>1}var m=l/a;return 0===m?1:m}function a(e,r,a){var t=document.createElement("canvas");return o(e,t,r,a),t.toDataURL("image/jpeg",r.quality||.8)}function o(a,o,n,i){var c=a.naturalWidth,l=a.naturalHeight;if(c+l){var d=n.width,m=n.height,p=o.getContext("2d");p.save(),t(o,p,d,m,n.orientation);var s=e(a);s&&(c/=2,l/=2);var u=1024,g=document.createElement("canvas");g.width=g.height=u;for(var f=g.getContext("2d"),x=i?r(a,c,l):1,v=Math.ceil(u*d/c),h=Math.ceil(u*m/l/x),b=0,_=0;l>b;){for(var w=0,y=0;c>w;)f.clearRect(0,0,u,u),f.drawImage(a,-w,-b),p.drawImage(g,0,0,u,u,y,_,v,h),w+=u,y+=v;b+=u,_+=h}p.restore(),g=f=null}}function t(e,r,a,o,t){switch(t){case 5:case 6:case 7:case 8:e.width=o,e.height=a;break;default:e.width=a,e.height=o}switch(t){case 2:r.translate(a,0),r.scale(-1,1);break;case 3:r.translate(a,o),r.rotate(Math.PI);break;case 4:r.translate(0,o),r.scale(1,-1);break;case 5:r.rotate(.5*Math.PI),r.scale(1,-1);break;case 6:r.rotate(.5*Math.PI),r.translate(0,-o);break;case 7:r.rotate(.5*Math.PI),r.translate(a,-o),r.scale(-1,1);break;case 8:r.rotate(-.5*Math.PI),r.translate(-a,0)}}function n(e){if(window.Blob&&e instanceof Blob){if(!i)throw Error("No createObjectURL function found to create blob url");var r=new Image;r.src=i.createObjectURL(e),this.blob=e,e=r}if(!e.naturalWidth&&!e.naturalHeight){var a=this;e.onload=e.onerror=function(){var e=a.imageLoadListeners;if(e){a.imageLoadListeners=null;for(var r=0,o=e.length;o>r;r++)e[r]()}},this.imageLoadListeners=[]}this.srcImage=e}var i=window.URL&&window.URL.createObjectURL?window.URL:window.webkitURL&&window.webkitURL.createObjectURL?window.webkitURL:null;n.prototype.render=function(e,r,t){if(this.imageLoadListeners){var n=this;return void this.imageLoadListeners.push(function(){n.render(e,r,t)})}r=r||{};var c=this.srcImage.naturalWidth,l=this.srcImage.naturalHeight,d=r.width,m=r.height,p=r.maxWidth,s=r.maxHeight,u=!this.blob||"image/jpeg"===this.blob.type;d&&!m?m=l*d/c<<0:m&&!d?d=c*m/l<<0:(d=c,m=l),p&&d>p&&(d=p,m=l*d/c<<0),s&&m>s&&(m=s,d=c*m/l<<0);var g={width:d,height:m};for(var f in r)g[f]=r[f];var x=e.tagName.toLowerCase();"img"===x?e.src=a(this.srcImage,g,u):"canvas"===x&&o(this.srcImage,e,g,u),"function"==typeof this.onrender&&this.onrender(e),t&&t(),this.blob&&(this.blob=null,i.revokeObjectURL(this.srcImage.src))},"function"==typeof define&&define.amd?define([],function(){return n}):this.MegaPixImage=n}();
!function(){function t(t,e,a){if(this.file=t,this.callback=a,this.defaults={quality:.7},a){for(var i in e)this.defaults[i]=e[i];this.defaults.quality>1&&(this.defaults.quality=1)}else this.callback=e;this.results={origin:null,base64:null,base64Len:null},this.init()}window.URL=window.URL||window.webkitURL;var e=detect.parse(navigator.userAgent);t.prototype={constructor:t,init:function(){var t=this;t.create(t.file,t.callback)},create:function(t,a){var i=this,h=new Image,n=i.results,s="string"==typeof t?t:URL.createObjectURL(t);h.crossOrigin="*",h.onload=function(){function r(t){w=null,h=null,URL.revokeObjectURL(s),t.base64Len=t.base64.length,a(t)}var l,o=i.resize(this),w=document.createElement("canvas");if(w.width=o.w,w.height=o.h,l=w.getContext("2d"),l.fillStyle="#fff",l.fillRect(0,0,o.w,o.h),n.origin=t,"Android"===e.os.family){if(l.drawImage(h,0,0,o.w,o.h),+e.os.version<4.5){var u=new JPEGEncoder;n.base64=u.encode(l.getImageData(0,0,w.width,w.height),100*i.defaults.quality)}else n.base64=w.toDataURL("image/jpeg",i.defaults.quality);r(n)}else"iOS"===e.os.family&&+e.os.version<8?EXIF.getData(h,function(){var t=EXIF.getTag(this,"Orientation"),e=new MegaPixImage(h);e.render(w,{width:w.width,height:w.height,orientation:t}),n.base64=w.toDataURL("image/jpeg",i.defaults.quality),r(n)}):EXIF.getData(h,function(){var t=EXIF.getTag(this,"Orientation");switch(t){case 3:l.rotate(180*Math.PI/180),l.drawImage(h,-o.w,-o.h,o.w,o.h);break;case 6:w.width=o.h,w.height=o.w,l.rotate(90*Math.PI/180),l.drawImage(h,0,-o.h,o.w,o.h);break;case 8:w.width=o.h,w.height=o.w,l.rotate(270*Math.PI/180),l.drawImage(h,-o.w,0,o.w,o.h);break;default:l.drawImage(h,0,0,o.w,o.h)}n.base64=w.toDataURL("image/jpeg",i.defaults.quality),r(n)})},h.src=s},resize:function(t){var e=this.defaults.width,a=this.defaults.height,i=t.width/t.height,h={w:t.width,h:t.height};return e&a?(h.w=e,h.h=a):e?(h.w=e,h.h=Math.ceil(e/i)):a&&(h.w=Math.ceil(a*i),h.h=a),(h.w>=3264||h.h>=2448)&&(h.w*=.8,h.h*=.8),h}},window.lrz=function(e,a,i){return new t(e,a,i)}}();
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment