(function(b){functiona(b,d){if({}.hasOwnProperty.call(a.cache,b))returna.cache[b];vare=a.resolve(b);if(!e)thrownewError('Failed to resolve module '+b);varc={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);varf=b.slice(0,b.lastIndexOf('/')+1);returna.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void0},a.define=function(b,c){a.modules[b]=c},a.define('/gif.worker.coffee',function(d,e,f,g){varb,c;b=a('/GIFEncoder.js',d),c=function(a){varc,e,d,f;returnc=newb(a.width,a.height),a.index===0?c.writeHeader():c.firstFrame=!1,c.setTransparent(a.transparent),c.setRepeat(a.repeat),c.setDelay(a.delay),c.setQuality(a.quality),c.setPreserveColors(a.preserveColors),c.addFrame(a.data),a.last&&c.finish(),d=c.stream(),a.data=d.pages,a.cursor=d.cursor,a.pageSize=d.constructor.pageSize,a.canTransfer?(f=function(c){for(varb=0,d=a.data.length;b<d;++b)e=a.data[b],c.push(e.buffer);returnc}.call(this,[]),self.postMessage(a,f)):self.postMessage(a)},self.onmessage=function(a){returnc(a.data)}}),a.define('/GIFEncoder.js',function(e,k,i,j){functionc(){this.page=-1,this.pages=[],this.newPage()}functionb(a,b){this.width=~~a,this.height=~~b,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.image=null,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.usedEntry=newArray,this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10,this.out=newc}varf=a('/TypedNeuQuant.js',e),g=a('/SimpleQuant.js',e),h=a('/LZWEncoder.js',e);c.pageSize=4096,c.charMap={};for(vard=0;d<256;d++)c.charMap[d]=String.fromCharCode(d);c.prototype.newPage=function(){this.pages[++this.page]=newUint8Array(c.pageSize),this.cursor=0},c.prototype.getData=function(){vard='';for(vara=0;a<this.pages.length;a++)for(varb=0;b<c.pageSize;b++)d+=c.charMap[this.pages[a][b]];returnd},c.prototype.writeByte=function(a){this.cursor>=c.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=a},c.prototype.writeUTFBytes=function(b){for(varc=b.length,a=0;a<c;a++)this.writeByte(b.charCodeAt(a))},c.prototype.writeBytes=function(b,d,e){for(varc=e||b.length,a=d||0;a<c;a++)this.writeByte(b[a])},b.prototype.setDelay=function(a){this.delay=Math.round(a/10)},b.prototype.setFrameRate=function(a){this.delay=Math.round(100/a)},b.prototype.setDispose=function(a){a>=0&&(this.dispose=a)},b.prototype.setRepeat=function(a){this.repeat=a},b.prototype.setTransparent=function(a){this.transparent=a},b.prototype.setPreserveColors=function(a){this.preserveColors=a},b.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},b.prototype.finish=function(){this.out.writeByte(59)},b.prototype.setQuality=function(a){a<1&&(a=1),this.sample=a},b.prototype.writeHeader=function(){this.out.writeUTFBytes('GIF89a')},b.prototype.analyzePixels=function(){varh=this.pixels.length,d=h/3;this.indexedPixels=newUint8Array(d);vara;if(this.preserveColors){vari=this.toRGBComponents(this.transparent);a=newg(this.pixels,this.sample,i)}elsea=newf(this.pixels,this.sample);a.buildColormap(),this.colorTab=a.getColormap();varb=0;for(varc=0;c<d;c++){vare=a.lookupRGB(this.pixels[b++]&255,this.pixels[b++]&255,this.pixels[b++]&255);this.usedEntry[e]=!0,this.indexedPixels[c]=e}this.pixels=null,this.colorDepth=8,this.palSize=7,this.transparent!==null&&(this.transIndex=this.findClosest(this.transparent))},b.prototype.toRGBComponents=function(a){varb=null;returna&&(b={r:(a&16711680)>>16,g:(a&65280)>>8,b:a&255}),b},b.prototype.findClosest=function(e){if(this.colorTab===null)return-1;vark=(e&16711680)>>16,l=(e&65280)>>8,m=e&255,c=0,d=16777216,j=this.colorTab.length;for(vara=0;a<j;){varf=k-(this.colorTab[a++]&255),g=l-(this.colorTab