thedesk/app/node_modules/@jimp/plugin-crop/es/index.js.map

1 line
18 KiB
Plaintext
Raw Normal View History

2019-09-13 00:38:13 +10:00
{"version":3,"sources":["../src/index.js"],"names":["throwError","isNodePattern","pluginCrop","event","x","y","w","h","cb","call","Math","round","bitmap","width","start","end","data","slice","Buffer","allocUnsafe","offset","scanQuiet","idx","readUInt32BE","writeUInt32BE","height","class","autocrop","minPixelsPerSide","leaveBorder","tolerance","cropOnlyFrames","cropSymmetric","a","len","length","config","colorTarget","getPixelColor","rgba1","constructor","intToRGBA","northPixelsToCrop","eastPixelsToCrop","southPixelsToCrop","westPixelsToCrop","north","colorXY","rgba2","colorDiff","east","south","west","doCrop","horizontal","min","vertical","widthOfRemainingPixels","heightOfRemainingPixels","crop"],"mappings":";;AAAA;AAEA,SAASA,UAAT,EAAqBC,aAArB,QAA0C,aAA1C;AAEA,eAAe,SAASC,UAAT,CAAoBC,KAApB,EAA2B;AACxC;;;;;;;;;AASAA,EAAAA,KAAK,CAAC,MAAD,EAAS,UAASC,CAAT,EAAYC,CAAZ,EAAeC,CAAf,EAAkBC,CAAlB,EAAqBC,EAArB,EAAyB;AACrC,QAAI,OAAOJ,CAAP,KAAa,QAAb,IAAyB,OAAOC,CAAP,KAAa,QAA1C,EACE,OAAOL,UAAU,CAACS,IAAX,CAAgB,IAAhB,EAAsB,yBAAtB,EAAiDD,EAAjD,CAAP;AACF,QAAI,OAAOF,CAAP,KAAa,QAAb,IAAyB,OAAOC,CAAP,KAAa,QAA1C,EACE,OAAOP,UAAU,CAACS,IAAX,CAAgB,IAAhB,EAAsB,yBAAtB,EAAiDD,EAAjD,CAAP,CAJmC,CAMrC;;AACAJ,IAAAA,CAAC,GAAGM,IAAI,CAACC,KAAL,CAAWP,CAAX,CAAJ;AACAC,IAAAA,CAAC,GAAGK,IAAI,CAACC,KAAL,CAAWN,CAAX,CAAJ;AACAC,IAAAA,CAAC,GAAGI,IAAI,CAACC,KAAL,CAAWL,CAAX,CAAJ;AACAC,IA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