text: if (self.CavalryLogger) { CavalryLogger.start_js(["oEkjv"]); }
  
  __d("PUWErrorCodes",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={BAD_JPEG:9901,WORKER_TERMINATED:9902,UNKNOWN_RESIZE_ERROR:9903,WORKER_ABORT:9904};}),null);
  __d('ProgressBarBase',['emptyFunction','requestAnimationFrame','removeFromArray','arrayContains'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=[];function i(j,k){'use strict';this._min=j||0;this._max=k||100;this._initialPosition=0;this._position=0;this._initialVelocity=0;this._velocity=0;this._acceleration=0;this.useAcceleration=true;this._targetPosition=0;this._targetTime=0;this._startTime=null;this._onComplete=c('emptyFunction');}i.prototype.setPosition=function(j){'use strict';j=this._normalizePosition(j);this._initialPosition=j;this._position=j;this.updateMeter(this._position);this.stop();return this;};i.prototype.setCompleteHandler=function(j){'use strict';this._onComplete=j||c('emptyFunction');return this;};i.prototype.setTarget=function(j,k){'use strict';this._stopAnimating();this._clearOnCompleteTimeout();this._targetPosition=j;var l=this._normalizePosition(j);this._targetTime=k;this._initialVelocity=this._velocity;this._initialPosition=this._position;if(this.useAcceleration){this._acceleration=2*(l-this._initialPosition-this._initialVelocity*k)/(k*k);}else{this._acceleration=0;this._velocity=this._initialVelocity=(l-this._initialPosition)/k;}if(this._position>=l){this._onComplete();}else this._start();return this;};i.prototype.setNoAcceleration=function(j){'use strict';this.useAcceleration=!j;return this;};i.prototype._clearOnCompleteTimeout=function(){'use strict';b.clearTimeout(this._onCompleteTimeout);};i.prototype.stop=function(){'use strict';this._clearOnCompleteTimeout();this._velocity=0;this._initialVelocity=0;this._acceleration=0;this._stopAnimating();return this;};i.prototype._start=function(){'use strict';this._startTime=Date.now();this._onCompleteTimeout=b.setTimeout(function(){this.setPosition(this._targetPosition);this._onComplete();}.bind(this),this._targetTime);this._startAnimating();return this;};i.prototype._loop=function(){'use strict';var j=Date.now()-this._startTime;this._position=.5*this._acceleration*j*j+this._initialVelocity*j+this._initialPosition;var k=this._velocity;this._velocity=this._acceleration*j+this._initialVelocity;var l=k<0!==this._velocity<0;if(this._position>this._normalizePosition(this._targetPosition)||l){this.setPosition(this._targetPosition);this._onComplete();}else this.updateMeter(this._position);};i.prototype.updateMeter=function(j){'use strict';throw "Unimplemented function: updateMeter";};i.prototype._normalizePosition=function(j){'use strict';return Math.min(Math.max((j-this._min)/(this._max-this._min),0),1);};i.prototype._startAnimating=function(){'use strict';if(!c('arrayContains')(h,this)){h.push(this);if(h.length===1)c('requestAnimationFrame')(i.prototype._requestAnimationFrameCallback);}};i.prototype._stopAnimating=function(){'use strict';c('removeFromArray')(h,this);};i.prototype._requestAnimationFrameCallback=function(){'use strict';h.forEach(function(j){j._loop();});if(h.length)c('requestAnimationFrame')(i.prototype._requestAnimationFrameCallback);};i.setPosition=function(j,k){'use strict';j.setPosition(k);};i.setTarget=function(j,k,l){'use strict';j.setTarget(k,l);};f.exports=i;}),null);
  __d('ProgressBar',['cx','csx','ProgressBarBase','CSS','Style','DOM'],(function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('ProgressBarBase'));k=j&&j.prototype;function l(m,n,o){'use strict';k.constructor.call(this,n,o);this._root=m;this._meter=c('DOM').find(m,"div._5e4k");this._meter2=c('DOM').scry(m,"div._5e2g")[0];}l.prototype.getRoot=function(){'use strict';return this._root;};l.prototype.updateMeter=function(m){'use strict';var n=Math.min(Math.max(m,0),1);c('CSS').conditionClass(this._meter,"_5e2d",n<=0);c('CSS').conditionClass(this._meter,"_5e4j",n>=1);n=n*100+'%';c('Style').set(this._meter,'width',n);if(this._meter2){c('Style').set(this._meter2,'left',n);c('Style').set(this._meter2,'width',n);}};l.prototype.changeLabel=function(m){'use strict';var n=c('DOM').scry(this._root,"span._5e2h");n.forEach(function(o){c('DOM').setContent(o,m);});return this;};f.exports=l;}),null);
  __d('Emscripten',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports={isSupported:function h(){return (typeof Int32Array!=='undefined'&&typeof Float64Array!=='undefined'&&!!new Int32Array(1).subarray&&!!new Int32Array(1).set);}};}),null);
  __d('PooledWebWorker',['WebWorker'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('WebWorker'));i=h&&h.prototype;function j(k,l,m){'use strict';i.constructor.call(this,m);this.$PooledWebWorker1=l;this.$PooledWebWorker2=k;}j.prototype.getIndex=function(){'use strict';return this.$PooledWebWorker1;};j.prototype.getPool=function(){'use strict';return this.$PooledWebWorker2;};f.exports=j;}),null);
  __d('WebWorkerPool',['PooledWebWorker','emptyFunction'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();h.isSupported=function(){'use strict';return c('PooledWebWorker').isSupported();};function h(i,j){'use strict';this.$WebWorkerPool1=[];for(var k=0;k<j;k++)this.$WebWorkerPool1.push(new (c('PooledWebWorker'))(this,k,i).setErrorHandler(this.$WebWorkerPool2).setMessageHandler(this.$WebWorkerPool3).execute());this.$WebWorkerPool4=0;}h.prototype.setMessageHandler=function(i){'use strict';this.$WebWorkerPool5=i||c('emptyFunction');return this;};h.prototype.setAllowCrossPageTransition=function(i){'use strict';this.$WebWorkerPool1.forEach(function(j){return j.setAllowCrossPageTransition(i);});return this;};h.prototype.setErrorHandler=function(i){'use strict';this.$WebWorkerPool6=i||c('emptyFunction');return this;};h.prototype.postMessage=function(){'use strict';var i=this.getWorker();for(var j=arguments.length,k=Array(j),l=0;l<j;l++)k[l]=arguments[l];i.postMessage.apply(i,k);return i;};h.prototype.$WebWorkerPool3=function(){'use strict';for(var i=arguments.length,j=Array(i),k=0;k<i;k++)j[k]=arguments[k];j.unshift(this);this.getPool().$WebWorkerPool5.apply(this.getPool(),j);};h.prototype.$WebWorkerPool2=function(){'use strict';for(var i=arguments.length,j=Array(i),k=0;k<i;k++)j[k]=arguments[k];j.unshift(this);return this.getPool().$WebWorkerPool6.apply(this.getPool(),j);};h.prototype.getWorker=function(){'use strict';var i=this.$WebWorkerPool1[this.$WebWorkerPool4];this.$WebWorkerPool4=(this.$WebWorkerPool4+1)%this.$WebWorkerPool1.length;return i;};f.exports=h;}),null);
  __d('JpegResizer',['Emscripten','JpegResizerConfig','JpegResizeWorkerResource','WebWorker','WebWorkerPool','PUWErrorCodes'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=null;i.isSupported=function(){'use strict';return c('WebWorkerPool').isSupported()&&c('Emscripten').isSupported()&&!c('JpegResizerConfig').isGKBlacklisted;};i.getSingleton=function(j){'use strict';if(!h)h=new i(j||i.DEFAULT_POOL_SIZE).setAllowCrossPageTransition(true);return h;};i.prepareResource=function(j){'use strict';c('WebWorker').prepareResource(c('JpegResizeWorkerResource'),j);};function i(j){'use strict';j=j||i.DEFAULT_POOL_SIZE;c('WebWorker').prepareResource(c('JpegResizeWorkerResource'));this.$JpegResizer1=new (c('WebWorkerPool'))(c('JpegResizeWorkerResource'),j).setErrorHandler(this.$JpegResizer2.bind(this)).setMessageHandler(this.$JpegResizer3.bind(this));this.$JpegResizer4={};this.$JpegResizer5=i.DEFAULT_RESIZE_HEIGHT;this.$JpegResizer6=i.DEFAULT_RESIZE_WIDTH;}i.prototype.setHighQuality=function(j){'use strict';if(j){this.$JpegResizer5=i.DEFAULT_RESIZE_HEIGHT;this.$JpegResizer6=i.DEFAULT_RESIZE_WIDTH;}else{this.$JpegResizer5=i.LOW_QUALITY_RESIZE_HEIGHT;this.$JpegResizer6=i.LOW_QUALITY_RESIZE_WIDTH;}return this;};i.prototype.setAllowCrossPageTransition=function(j){'use strict';this.$JpegResizer1.setAllowCrossPageTransition(j);return this;};i.prototype.resizeBlob=function(j,k,l){'use strict';return this.$JpegResizer7(j,this.$JpegResizer6,this.$JpegResizer5,k,l);};i.prototype.resize360Blob=function(j,k,l){'use strict';return this.$JpegResizer7(j,this.$JpegResizer6*3,this.$JpegResizer5*3,k,l);};i.prototype.$JpegResizer7=function(j,k,l,m,n){'use strict';var o=this.$JpegResizer1.getWorker();if(o.isCurrentState('terminated')){var p=new Error('Worker terminated');p.code=c('PUWErrorCodes').WORKER_TERMINATED;m(p);return this;}var q=o.postMessage({blob:j,height:l,width:k}).getIndex();this.$JpegResizer8(q).unshift({done:m,progress:n});return this;};i.prototype.$JpegResizer8=function(j){'use strict';if(!this.$JpegResizer4.hasOwnProperty(j))this.$JpegResizer4[j]=[];return this.$JpegResizer4[j];};i.prototype.$JpegResizer2=function(j,k){'use strict';j.terminate();var l=this.$JpegResizer8(j.getIndex());this.$JpegResizer9(k);l.forEach(function(m){return m.done(k);});l.length=0;};i.prototype.$JpegResizer3=function(j,k){'use strict';if(k.error)this.$JpegResizer9(k.error);if(k.done){this.$JpegResizer8(j.getIndex()).pop().done(k.error,k.blob,k.skipped);}else{var l=this.$JpegResizer8(j.getIndex()),m=l[l.length-1].progress;if(m)m({written:k.written,total:k.total});}};i.prototype.$JpegResizer9=function(j){'use strict';var k=j.message;if(k&&k.indexOf('Not a JPEG file')!==-1){j.code=c('PUWErrorCodes').BAD_JPEG;}else if(k&&k.indexOf('abort()')!==-1){j.code=c('PUWErrorCodes').WORKER_ABORT;}else j.code=c('PUWErrorCodes').UNKNOWN_RESIZE_ERROR;};i.DEFAULT_POOL_SIZE=3;i.DEFAULT_RESIZE_HEIGHT=2048;i.DEFAULT_RESIZE_WIDTH=2048;i.LOW_QUALITY_RESIZE_HEIGHT=960;i.LOW_QUALITY_RESIZE_WIDTH=960;f.exports=i;}),null);