/*!CK:432818082!*//*1459218352,*/

if (self.CavalryLogger) { CavalryLogger.start_js(["xn4og"]); }

__d('AdsDispatchActionTypeUtils',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(i,j){var k={};for(var l in j)k[l]=i+l;return k;}f.exports={createActionTypeMap:h};},null);
__d('AdsGeocoderActions',['AdsCommonTargetingActionTypes','AdsDispatcher','AdsGeoTargetingUtils','AdsCommonTargetingActions'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(j,k,l,m){var n=c('AdsGeoTargetingUtils'),o=j&&j.custom_locations&&j.custom_locations[0]?j.custom_locations[0]:null;if(!o)return false;var p=n.processGeoCoordinates({address:k,isValid:true,latitude:m[0].latitude,longitude:m[0].longitude},o,null);if(p){var q=babelHelpers['extends']({},j,{custom_locations:[p]});c('AdsDispatcher').handleUpdateFromServerResponse({geoLocations:q,targetingID:l,type:c('AdsCommonTargetingActionTypes').TARGETING_CHANGE});var r=c('AdsCommonTargetingActions');r.fetchSuggestedRadius(q,p,l);}}var i={handleGeocoderSuccessResponse:function(j,k,l,m,n){c('AdsDispatcher').handleUpdateFromServerResponse({address:k,isValid:true,latitude:m[0].latitude,logData:n,longitude:m[0].longitude,type:c('AdsCommonTargetingActionTypes').GEO_COORDINATES_LOADED});h(j,k,l,m);},handleGeocoderFailureResponse:function(j,k,l,m){var n=l.rawData,o=n.error&&n.error.code;c('AdsDispatcher').handleUpdateFromServerResponse({address:j,errorCode:o,isValid:false,logData:m,targetingID:k,type:c('AdsCommonTargetingActionTypes').GEO_COORDINATES_LOADED});}};f.exports=i;},null);
__d("ManagedError",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){Error.prototype.constructor.call(this,i);this.message=i;this.innerError=j;}h.prototype=new Error();h.prototype.constructor=h;f.exports=h;},null);
__d('AssertionError',['ManagedError'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){c('ManagedError').prototype.constructor.apply(this,arguments);}h.prototype=new (c('ManagedError'))();h.prototype.constructor=h;f.exports=h;},null);
__d('Assert',['AssertionError','sprintf'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(m,n){if(typeof m!=='boolean'||!m)throw new (c('AssertionError'))(n);return m;}function i(m,n,o){var p;if(n===undefined){p='undefined';}else if(n===null){p='null';}else{var q=Object.prototype.toString.call(n);p=/\s(\w*)/.exec(q)[1].toLowerCase();}h(m.indexOf(p)!==-1,o||c('sprintf')('Expression is of type %s, not %s',p,m));return n;}function j(m,n,o){h(n instanceof m,o||'Expression not instance of type');return n;}function k(m,n){l['is'+m]=n;l['maybe'+m]=function(o,p){if(o!=null)n(o,p);};}var l={isInstanceOf:j,isTrue:h,isTruthy:function(m,n){return h(!!m,n);},type:i,define:function(m,n){m=m.substring(0,1).toUpperCase()+m.substring(1).toLowerCase();k(m,function(o,p){h(n(o),p);});}};['Array','Boolean','Date','Function','Null','Number','Object','Regexp','String','Undefined'].forEach(function(m){k(m,i.bind(null,m.toLowerCase()));});f.exports=l;},null);
__d('AdsUtils',['Assert'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(aa){return aa===Object(aa);}function i(aa,ba){if(Array.isArray(aa)||typeof aa==='string')return aa.indexOf(ba)!==-1;return ba in aa;}function j(aa){if(Array.isArray(aa)||typeof aa==='string')return aa.length;return h(aa)?Object.keys(aa).length:0;}function k(aa,ba){if(aa===undefined&&ba===undefined){return true;}else if(aa===undefined){return false;}else if(ba===undefined){return false;}else if(aa.length!=ba.length){return false;}else{for(var ca=0;ca<aa.length;ca++){var da=false;for(var ea=0;ea<ba.length;ea++){var fa=true,ga=Object.keys(aa[ca]);for(var ha=0;ha<ga.length;ha++){var ia=ga[ha];if(aa[ca][ia]!=ba[ea][ia]){fa=false;break;}}if(fa)da=true;}if(!da)return false;}return true;}}function l(aa,ba,ca){var da={};for(var ea=0;ea<aa.length;++ea)da[aa[ea][ba]]=ca===undefined?aa[ea]:aa[ea][ca];return da;}function m(aa,ba){var ca={};for(var da=0;da<aa.length;++da){if(ca[aa[da][ba]]===undefined)ca[aa[da][ba]]=[];ca[aa[da][ba]].push(aa[da]);}return ca;}function n(aa){var ba={};Object.keys(aa).forEach(function(ca){return ba[aa[ca]]=ca;});return ba;}function o(aa,ba){var ca={};Object.keys(aa).forEach(function(da){ca[da]=aa[da]?aa[da][ba]:undefined;});return ca;}function p(aa){var ba=aa;if(Array.isArray(aa)){ba=aa.map(p);}else if(h(aa)){ba={};Object.keys(aa).forEach(function(ca){return ba[ca]=p(aa[ca]);});}return ba;}function q(aa){return aa.replace(/([a-z])([A-Z])/g,'$1_$2').toLowerCase();}function r(aa){return aa.replace(/_[a-z]/g,function(ba){return ba.charAt(1).toUpperCase();});}function s(aa,ba){c('Assert').define('scalar',function(ea){return typeof ea==='number'||typeof ea==='boolean';});c('Assert').isScalar(ba);var ca={};for(var da=0;da<aa.length;++da)ca[aa[da]]=ba;return ca;}function t(aa,ba,ca){var da={},ea=Object.keys(babelHelpers['extends']({},aa,ba));for(var fa=0;fa<ea.length;fa++){var ga=ea[fa],ha=ca(aa.hasOwnProperty(ga),ba.hasOwnProperty(ga));if(ha<0){da[ga]=aa[ga];}else if(ha>0)da[ga]=ba[ga];}return da;}function u(aa,ba){return t(aa,ba,function(ca,da){return ca&&da?-1:0;});}function v(aa,ba){return t(aa,ba,function(ca,da){return ca?-1:1;});}var w=function(aa,ba,ca,da){da=da||function(ga,ha){return ga==ha;};if(aa.length===0)return ca;var ea=ba(aa[0]),fa=!aa.some(function(ga){return !da(ba(ga),ea);});if(fa){return ea;}else return ca;};function x(aa,ba){if(Array.isArray(aa)&&Array.isArray(ba)){if(aa.length!==ba.length)return false;for(var ca=0;ca<aa.length;++ca)if(!x(aa[ca],ba[ca]))return false;return true;}if(h(aa)&&h(ba)){var da=Object.keys(aa);for(var ea=0;ea<da.length;ea++){var fa=da[ea];if(!ba.hasOwnProperty(fa))return false;if(!x(aa[fa],ba[fa]))return false;}return true;}return aa==ba;}function y(aa){var ba={};Object.keys(aa).forEach(function(ca){var da=r(ca);ba[da]=aa[ca];});return ba;}function z(aa){var ba={};Object.keys(aa).forEach(function(ca){var da=q(ca);ba[da]=aa[ca];});return ba;}f.exports={arraysOfMapEquals:k,camelCaseKey:r,camelCaseToUnderscoreKeys:z,clone:p,contains:i,count:j,flip:n,getSharedValue:w,indexedMap:l,invertedMap:m,isEqualWeak:x,isObject:h,mapFill:s,mapIntersectKey:u,mapUnionKey:v,pluckPreserveKey:o,underscoreKey:q,underscoreToCamelCaseKeys:y};},null);
__d("nearlyEqualNumbers",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){if(i===j)return true;var k=Math.abs(i-j);if(k<Number.EPSILON)return true;var l=Math.abs(i),m=Math.abs(j);return k/(l+m)<Number.EPSILON;}f.exports=h;},null);
__d('GeoCoordinates',['ImmutableObject','nearlyEqualNumbers'],function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('ImmutableObject'));i=h&&h.prototype;function j(k,l){i.constructor.call(this,{latitude:k,longitude:l});}j.prototype.nearlyEquals=function(k){return (c('nearlyEqualNumbers')(this.latitude,k.latitude)&&c('nearlyEqualNumbers')(this.longitude,k.longitude));};f.exports=j;},null);
__d('FBOverlayBase.react',['React'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('React').createClass({displayName:'FBOverlayBase',render:function(){return c('React').Children.only(this.props.children);}});f.exports=h;},null);
__d('FBOverlayElement.react',['cx','React','joinClasses'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j={horizontal:{left:"_32rg",right:"_32rh",fit:c('joinClasses')("_32rg","_32rh")},vertical:{top:"_32ri",bottom:"_32rj",fit:c('joinClasses')("_32ri","_32rj")}},k=c('React').createClass({displayName:'FBOverlayElement',propTypes:{horizontal:i.oneOf(['left','right','fit']),vertical:i.oneOf(['top','bottom','fit'])},getDefaultProps:function(){return {horizontal:'fit',vertical:'fit'};},render:function(){var l=c('React').Children.only(this.props.children),m=c('joinClasses')(l.props.className,"_32rk",j.horizontal[this.props.horizontal],j.vertical[this.props.vertical]);return c('React').cloneElement(l,{className:m});}});f.exports=k;},null);
__d('FBOverlayContainer.react',['cx','invariant','FBOverlayBase.react','FBOverlayElement.react','React','joinClasses'],function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();var j=c('React').createClass({displayName:'FBOverlayContainer',propTypes:{children:function(k,l){var m=k[l],n=0;c('React').Children.forEach(m,function(o){if(o===null||o===undefined)return;switch(o.type){case c('FBOverlayBase.react'):n++;break;case c('FBOverlayElement.react'):break;default:i(0);}});!(n===1)?i(0):void 0;}},render:function(){return (c('React').createElement('div',babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,"_23n-")}),this.props.children));}});f.exports=j;},null);
__d('md5',['str2rstr'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(u,v){var w=u[0],x=u[1],y=u[2],z=u[3];w=j(w,x,y,z,v[0],7,-680876936);z=j(z,w,x,y,v[1],12,-389564586);y=j(y,z,w,x,v[2],17,606105819);x=j(x,y,z,w,v[3],22,-1044525330);w=j(w,x,y,z,v[4],7,-176418897);z=j(z,w,x,y,v[5],12,1200080426);y=j(y,z,w,x,v[6],17,-1473231341);x=j(x,y,z,w,v[7],22,-45705983);w=j(w,x,y,z,v[8],7,1770035416);z=j(z,w,x,y,v[9],12,-1958414417);y=j(y,z,w,x,v[10],17,-42063);x=j(x,y,z,w,v[11],22,-1990404162);w=j(w,x,y,z,v[12],7,1804603682);z=j(z,w,x,y,v[13],12,-40341101);y=j(y,z,w,x,v[14],17,-1502002290);x=j(x,y,z,w,v[15],22,1236535329);w=k(w,x,y,z,v[1],5,-165796510);z=k(z,w,x,y,v[6],9,-1069501632);y=k(y,z,w,x,v[11],14,643717713);x=k(x,y,z,w,v[0],20,-373897302);w=k(w,x,y,z,v[5],5,-701558691);z=k(z,w,x,y,v[10],9,38016083);y=k(y,z,w,x,v[15],14,-660478335);x=k(x,y,z,w,v[4],20,-405537848);w=k(w,x,y,z,v[9],5,568446438);z=k(z,w,x,y,v[14],9,-1019803690);y=k(y,z,w,x,v[3],14,-187363961);x=k(x,y,z,w,v[8],20,1163531501);w=k(w,x,y,z,v[13],5,-1444681467);z=k(z,w,x,y,v[2],9,-51403784);y=k(y,z,w,x,v[7],14,1735328473);x=k(x,y,z,w,v[12],20,-1926607734);w=l(w,x,y,z,v[5],4,-378558);z=l(z,w,x,y,v[8],11,-2022574463);y=l(y,z,w,x,v[11],16,1839030562);x=l(x,y,z,w,v[14],23,-35309556);w=l(w,x,y,z,v[1],4,-1530992060);z=l(z,w,x,y,v[4],11,1272893353);y=l(y,z,w,x,v[7],16,-155497632);x=l(x,y,z,w,v[10],23,-1094730640);w=l(w,x,y,z,v[13],4,681279174);z=l(z,w,x,y,v[0],11,-358537222);y=l(y,z,w,x,v[3],16,-722521979);x=l(x,y,z,w,v[6],23,76029189);w=l(w,x,y,z,v[9],4,-640364487);z=l(z,w,x,y,v[12],11,-421815835);y=l(y,z,w,x,v[15],16,530742520);x=l(x,y,z,w,v[2],23,-995338651);w=m(w,x,y,z,v[0],6,-198630844);z=m(z,w,x,y,v[7],10,1126891415);y=m(y,z,w,x,v[14],15,-1416354905);x=m(x,y,z,w,v[5],21,-57434055);w=m(w,x,y,z,v[12],6,1700485571);z=m(z,w,x,y,v[3],10,-1894986606);y=m(y,z,w,x,v[10],15,-1051523);x=m(x,y,z,w,v[1],21,-2054922799);w=m(w,x,y,z,v[8],6,1873313359);z=m(z,w,x,y,v[15],10,-30611744);y=m(y,z,w,x,v[6],15,-1560198380);x=m(x,y,z,w,v[13],21,1309151649);w=m(w,x,y,z,v[4],6,-145523070);z=m(z,w,x,y,v[11],10,-1120210379);y=m(y,z,w,x,v[2],15,718787259);x=m(x,y,z,w,v[9],21,-343485551);u[0]=s(w,u[0]);u[1]=s(x,u[1]);u[2]=s(y,u[2]);u[3]=s(z,u[3]);}function i(u,v,w,x,y,z){v=s(s(v,u),s(x,z));return s(v<<y|v>>>32-y,w);}function j(u,v,w,x,y,z,aa){return i(v&w|~v&x,u,v,y,z,aa);}function k(u,v,w,x,y,z,aa){return i(v&x|w&~x,u,v,y,z,aa);}function l(u,v,w,x,y,z,aa){return i(v^w^x,u,v,y,z,aa);}function m(u,v,w,x,y,z,aa){return i(w^(v|~x),u,v,y,z,aa);}function n(u){var v=u.length,w=[1732584193,-271733879,-1732584194,271733878],x;for(x=64;x<=u.length;x+=64)h(w,o(u.substring(x-64,x)));u=u.substring(x-64);var y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(x=0;x<u.length;x++)y[x>>2]|=u.charCodeAt(x)<<((x&3)<<3);y[x>>2]|=128<<((x&3)<<3);if(x>55){h(w,y);for(x=0;x<16;x++)y[x]=0;}y[14]=v*8;h(w,y);return w;}function o(u){var v=[],w=0;while(w<64)v[w>>2]=u.charCodeAt(w++)|u.charCodeAt(w++)<<8|u.charCodeAt(w++)<<16|u.charCodeAt(w++)<<24;return v;}var p='0123456789abcdef'.split('');function q(u){var v='',w=0;for(;w<4;w++)v+=p[u>>(w<<3)+4&15]+p[u>>(w<<3)&15];return v;}function r(u){for(var v=0;v<u.length;v++)u[v]=q(u[v]);return u.join('');}var s=function(u,v){return u+v&4294967295;};function t(u){if(null===u||undefined===u){return null;}else{for(var v=0;v<u.length;v++)if(u[v]>"\u007F"){u=c('str2rstr')(u);break;}return r(n(u));}}if(t('hello')!='5d41402abc4b2a76b9719d911017c592')s=function(u,v){var w=(u&65535)+(v&65535),x=(u>>16)+(v>>16)+(w>>16);return x<<16|w&65535;};f.exports=t;},null);
__d('Bandicoot',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=5*1000,i=10*60*1000,j=14*24*60*60*1000,k='Bandicoot:',l={ACTIVE:'ACTIVE',INACTIVE:'INACTIVE',CLOSED:'CLOSED'};function m(){try{var q=window.localStorage;if(q){var r='__test'+Date.now();q.setItem(r,'');q.removeItem(r);}return q;}catch(p){}}var n=m();function o(p){this.$Bandicoot1=k+p;this.$Bandicoot2={};this.$Bandicoot5=this.$Bandicoot6.bind(this);this.sessionID=null;this.sessionStartTime=null;this.storage=n;}o.prototype.getCrashTimeData=function(){var p=window.performance&&window.performance.memory||{},q=this.sessionStartTime;return {duration:q?Date.now()-q:0,tabs:Object.keys(this.$Bandicoot7()).length,jsHeapSizeLimit:p.jsHeapSizeLimit,totalJSHeapSize:p.totalJSHeapSize,usedJSHeapSize:p.usedJSHeapSize,elementsInDOM:document.getElementsByTagName('*').length,uri:window.location.href};};o.prototype.getLogTimeData=function(){return {userAgent:window.navigator.userAgent};};o.prototype.logCrash=function(p,q,r){var s=Object.assign({sessionID:p},q,r);};o.prototype.logBrowserUnsupported=function(){};o.prototype.logTrackingError=function(){};o.prototype.startSession=function(){if(!this.storage){this.logBrowserUnsupported();return;}if(this.$Bandicoot3)return;if(!this.sessionID)this.sessionID=Math.random().toString(36).slice(2,9);if(!this.sessionStartTime)this.sessionStartTime=Date.now();this.$Bandicoot3=setInterval(this.$Bandicoot8.bind(this),h);this.$Bandicoot8();if(document.addEventListener)document.addEventListener('visibilitychange',this.$Bandicoot5);this.$Bandicoot9();};o.prototype.endSession=function(){if(!this.storage)return;if(!this.$Bandicoot3)return;clearInterval(this.$Bandicoot3);this.$Bandicoot3=null;this.$Bandicoot10({status:l.CLOSED});this.sessionID=null;this.sessionStartTime=null;if(document.removeEventListener)document.removeEventListener('visibilitychange',this.$Bandicoot5);};o.prototype.logKnownCrashes=function(){if(!this.$Bandicoot3)this.$Bandicoot8();};o.prototype.$Bandicoot8=function(){var p=this.$Bandicoot7(),q={};if(this.$Bandicoot3){if(!p[this.sessionID])p[this.sessionID]={};Object.assign(p[this.sessionID],this.getCrashTimeData(),{lastUpdated:Date.now(),status:this.$Bandicoot11()});}Object.keys(p).forEach(function(r){var s=p[r];if(s.status===l.CLOSED)return;if(this.$Bandicoot2[r])return;if(!s.lastUpdated)return;var t=Date.now()-s.lastUpdated;if(s.status===l.INACTIVE&&t>i)return;if(s.status===l.ACTIVE&&t>i){if(!s.loggerTabForPotentialCrash&&this.$Bandicoot3){s.loggerTabForPotentialCrash=this.sessionID;q[r]=s;}else if(s.loggerTabForPotentialCrash&&s.loggerTabForPotentialCrash!==this.sessionID){if(t>j)return;q[r]=s;}else{this.logCrash(r,s,this.getLogTimeData());this.$Bandicoot2[r]=true;}}else{delete s.loggerTabForPotentialCrash;q[r]=s;}}.bind(this));this.$Bandicoot12(q);};o.prototype.$Bandicoot7=function(p){p=p||this.$Bandicoot1;var q=this.storage.getItem(p)||'{}';try{q=JSON.parse(q);}catch(r){q={};this.storage.removeItem(p);}return q;};o.prototype.$Bandicoot10=function(p){p.lastUpdated=Date.now();var q=this.$Bandicoot7();if(!q[this.sessionID])q[this.sessionID]={};Object.assign(q[this.sessionID],p);this.$Bandicoot12(q);};o.prototype.$Bandicoot12=function(p){var q=JSON.stringify(p);try{this.storage.setItem(this.$Bandicoot1,q);}catch(r){var s=this.$Bandicoot4,t=Date.now();if(!s||t>s+h){this.logTrackingError();this.$Bandicoot4=t;}this.storage.removeItem(this.$Bandicoot1);}};o.prototype.$Bandicoot9=function(){for(var p=0;p<this.storage.length;++p){var q=this.storage.key(p);if(q.indexOf(k)===0&&q!==this.$Bandicoot1){var r=this.$Bandicoot7(q),s=Object.keys(r).every(function(t){var u=r[t];return (!u.lastUpdated||Date.now()-u.lastUpdated>j);});if(s)this.storage.removeItem(q);}}};o.prototype.$Bandicoot6=function(){this.$Bandicoot10({status:this.$Bandicoot11()});};o.prototype.$Bandicoot11=function(){return document.hidden?l.INACTIVE:l.ACTIVE;};f.exports=o;},null);
__d('Network',['mixInEventEmitter'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=true,i=b.navigator.connection,j={0:'unknown',1:'ethernet',2:'wifi',3:'2g',4:'3g'};function k(){return h;}function l(q){if(q==h)return;h=q;p.emit(q?'online':'offline');}function m(){return i?i.bandwidth:h?Infinity:0;}function n(){return i?i.metered:false;}function o(){var q=i?String(i.type):'0';return j[q]||q;}var p={getBandwidth:m,getType:o,isMetered:n,isOnline:k,setOnline:l};c('mixInEventEmitter')(p,{online:true,offline:true});if(b.addEventListener){b.addEventListener('online',l.bind(null,true));b.addEventListener('offline',l.bind(null,false));}else if(b.attachEvent){b.attachEvent('online',l.bind(null,true));b.attachEvent('offline',l.bind(null,false));}f.exports=p;},null);
__d('StoreAndPropBasedStateMixin',['invariant','StoreBasedStateMixinHelper','setImmediate'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=function(){for(var j=arguments.length,k=Array(j),l=0;l<j;l++)k[l]=arguments[l];return {getInitialState:function(){return this.constructor.calculateState(this.props);},componentWillMount:function(){!this.constructor.calculateState?h(0):void 0;this._recalculateStateID=null;var m=function(){if(this.isMounted())this.setState(this.constructor.calculateState(this.props));this._recalculateStateID=null;}.bind(this);this._mixin=new (c('StoreBasedStateMixinHelper'))(k);this._mixin.subscribeCallback(function(){if(this._recalculateStateID===null)this._recalculateStateID=c('setImmediate')(m);}.bind(this));},componentWillReceiveProps:function(m){this.setState(this.constructor.calculateState(m));},componentWillUnmount:function(){this._mixin.release();this._mixin=null;}};}.bind(this);f.exports=i;},null);
__d('FileHasher',['WebWorker','fileSliceName','emptyFunction','FileHashWorkerResource'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();h.isSupported=function(){'use strict';return c('WebWorker').isSupported();};function h(){'use strict';var i=c('FileHashWorkerResource');c('WebWorker').prepareResource(i);this.$FileHasher1=new (c('WebWorker'))(i).setMessageHandler(function(j){this.$FileHasher2(j);}.bind(this)).execute();}h.prototype.hash=function(i,j){'use strict';this.$FileHasher2=j;this.$FileHasher1.postMessage({file:i,fileSliceName:c('fileSliceName')});return this;};h.prototype.destroy=function(){'use strict';this.$FileHasher2=c('emptyFunction');this.$FileHasher1.terminate();};f.exports=h;},null);
__d('LoadObjectOperations',['keyMirrorRecursive'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('keyMirrorRecursive')({CREATING:'',DELETING:'',LOADING:'',UPDATING:''});f.exports=h;},null);
__d('LoadObject',['invariant','immutable','LoadObjectOperations','Map','nullthrows'],function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=[undefined,null,false,true,0,''],l='SECRET_'+Math.random(),m=new (c('Map'))(new (c('Map'))(k.map(function(p){return [p,new (c('Map'))([[true,new (c('Map'))()],[false,new (c('Map'))()]])];}))),n=c('immutable').Record({operation:undefined,value:undefined,error:undefined,internalHasValue:false});i=babelHelpers.inherits(o,n);j=i&&i.prototype;function o(p,q,r,s,t){!(p===l)?h(0):void 0;j.constructor.call(this,{operation:q,value:r,error:s,internalHasValue:t});}o.$LoadObject1=function(p,q,r,s){var t=o.$LoadObject2(p,q,r,s);return (t||new o(l,p,q,r,s));};o.$LoadObject2=function(p,q,r,s){if(r!==undefined||!m.has(q))return null;var t=c('nullthrows')(m.get(q)),u=c('nullthrows')(t.get(s));if(!u.has(p)){var v=new o(l,p,q,r,s);u.set(p,v);}return c('nullthrows')(u.get(p));};o.prototype.getOperation=function(){return this.get('operation');};o.prototype.getValue=function(){return this.get('value');};o.prototype.getValueEnforcing=function(){!this.hasValue()?h(0):void 0;var p=this.getValue();return p;};o.prototype.getError=function(){return this.get('error');};o.prototype.hasValue=function(){return !!this.get('internalHasValue');};o.prototype.hasOperation=function(){return this.getOperation()!==undefined;};o.prototype.hasError=function(){return this.getError()!==undefined;};o.prototype.isEmpty=function(){return !this.hasValue()&&!this.hasOperation()&&!this.hasError();};o.prototype.setOperation=function(p){var q=o.$LoadObject2(p,this.getValue(),this.getError(),this.hasValue());return q||this.set('operation',p);};o.prototype.setValue=function(p){var q=o.$LoadObject2(this.getOperation(),p,this.getError(),true);return q||this.set('value',p).set('internalHasValue',true);};o.prototype.setError=function(p){var q=o.$LoadObject2(this.getOperation(),this.getValue(),p,this.hasValue());return q||this.set('error',p);};o.prototype.removeOperation=function(){var p=this.remove('operation'),q=o.$LoadObject2(p.getOperation(),p.getValue(),p.getError(),p.hasValue());return q||p;};o.prototype.removeValue=function(){var p=this.remove('value').remove('internalHasValue'),q=o.$LoadObject2(p.getOperation(),p.getValue(),p.getError(),p.hasValue());return q||p;};o.prototype.removeError=function(){var p=this.remove('error'),q=o.$LoadObject2(p.getOperation(),p.getValue(),p.getError(),p.hasValue());return q||p;};o.prototype.isCreating=function(){return this.getOperation()===c('LoadObjectOperations').CREATING;};o.prototype.isDeleting=function(){return this.getOperation()===c('LoadObjectOperations').DELETING;};o.prototype.isDone=function(){return !this.hasOperation();};o.prototype.isLoading=function(){return this.getOperation()===c('LoadObjectOperations').LOADING;};o.prototype.isUpdating=function(){return this.getOperation()===c('LoadObjectOperations').UPDATING;};o.prototype.creating=function(){return this.setOperation(c('LoadObjectOperations').CREATING);};o.prototype.deleting=function(){return this.setOperation(c('LoadObjectOperations').DELETING);};o.prototype.done=function(){return this.removeOperation();};o.prototype.loading=function(){return this.setOperation(c('LoadObjectOperations').LOADING);};o.prototype.updating=function(){return this.setOperation(c('LoadObjectOperations').UPDATING);};o.prototype.map=function(p){if(!this.hasValue())return this;var q=this.getValueEnforcing(),r=p(q),s=r instanceof o?r:this.setValue(r);return s;};o.creating=function(){return o.$LoadObject1(c('LoadObjectOperations').CREATING,undefined,undefined,false);};o.deleting=function(){return o.$LoadObject1(c('LoadObjectOperations').DELETING,undefined,undefined,false);};o.empty=function(){return o.$LoadObject1(undefined,undefined,undefined,false);};o.loading=function(){return o.$LoadObject1(c('LoadObjectOperations').LOADING,undefined,undefined,false);};o.updating=function(){return o.$LoadObject1(c('LoadObjectOperations').UPDATING,undefined,undefined,false);};o.withError=function(p){return o.$LoadObject1(undefined,undefined,p,false);};o.withValue=function(p){return o.$LoadObject1(undefined,p,undefined,true);};f.exports=o;},null);
__d('WaterfallIDGenerator',['CurrentUser','md5'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(){var k=2147483647;return Math.random()*k;}function i(){return Math.floor(Date.now()/1000);}var j={generate:function(){return c('md5')([c('CurrentUser').getID(),i(),h()].join(':'));}};f.exports=j;},null);
__d('ReactComposerStatusActionType',['keyMirror'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=c('keyMirror')({SET_EDITOR_STATE:null,SET_TEXT_LENGTH:null,SET_MENTIONS:null,SET_MENTIONS_SOURCE:null,SET_TYPEAHEAD_REPORTER:null});},null);
__d('ReactComposerStatusStore',['ReactComposerStatusActionType','ReactComposerStoreBase','getMentionsTextForContentState'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('ReactComposerStoreBase'));i=h&&h.prototype;function j(){'use strict';var k;i.constructor.call(this,function(){return {editorState:null,length:0,mentionsSource:null,typeaheadReporter:null,mentions:null};},function(l){switch(l.type){case c('ReactComposerStatusActionType').SET_MENTIONS_SOURCE:k&&k.$ReactComposerStatusStore1(l);break;case c('ReactComposerStatusActionType').SET_TYPEAHEAD_REPORTER:k&&k.$ReactComposerStatusStore2(l);break;case c('ReactComposerStatusActionType').SET_EDITOR_STATE:k&&k.$ReactComposerStatusStore3(l);break;case c('ReactComposerStatusActionType').SET_MENTIONS:k&&k.$ReactComposerStatusStore4(l);break;case c('ReactComposerStatusActionType').SET_TEXT_LENGTH:k&&k.$ReactComposerStatusStore5(l);break;}});k=this;}j.prototype.getMentionsSource=function(k){'use strict';return this.getComposerData(k).mentionsSource;};j.prototype.getTypeaheadReporter=function(k){'use strict';return this.getComposerData(k).typeaheadReporter;};j.prototype.getEditorState=function(k){'use strict';return this.getComposerData(k).editorState;};j.prototype.getMentions=function(k){'use strict';return this.getComposerData(k).mentions;};j.prototype.getMessage=function(k){'use strict';var l=this.getEditorState(k);if(!l)return '';var m=l.getCurrentContent();return c('getMentionsTextForContentState')(m);};j.prototype.getMessageText=function(k){'use strict';var l=this.getEditorState(k);if(!l)return '';var m=l.getCurrentContent();return m?m.getPlainText():'';};j.prototype.getTextLength=function(k){'use strict';return this.getComposerData(k).textLength;};j.prototype.$ReactComposerStatusStore1=function(k){'use strict';var l=this.getComposerData(k.composerID);l.mentionsSource=k.mentionsSource;this.emitChange(k.composerID);};j.prototype.$ReactComposerStatusStore2=function(k){'use strict';var l=this.getComposerData(k.composerID);l.typeaheadReporter=k.typeaheadReporter;this.emitChange(k.composerID);};j.prototype.$ReactComposerStatusStore3=function(k){'use strict';var l=this.getComposerData(k.composerID);l.editorState=k.editorState;this.emitChange(k.composerID);};j.prototype.$ReactComposerStatusStore4=function(k){'use strict';var l=this.getComposerData(k.composerID);l.mentions=k.mentions;this.emitChange(k.composerID);};j.prototype.$ReactComposerStatusStore5=function(k){'use strict';var l=this.validateAction(k,['composerID','textLength']),m=l[0],n=l[1],o=this.getComposerData(m);o.textLength=n;this.emitChange(m);};f.exports=new j();},null);
__d('VideoUploadLogger',['Banzai'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){this._source=i.source;this._waterfallID=i.waterfall_id;this._targetID=i.target_id;this._delay=i.delay;this._times=[];this._isChunkedUpload=i.is_chunked_upload;this._actorID=i.actor_id;this._composerEntryPointRef=i.composer_entry_point_ref;}Object.assign(h,{BANZAI_GK:'videos',BANZAI_ROUTE:'video_waterfall',SOURCE_SIMPLE:'simple',SOURCE_COMPOSER:'composer',EVENT_STARTED_GENERATE_THUMBNAILS:'upload.client.started_generate_thumbnails',EVENT_FINISHED_GENERATE_THUMBNAILS:'upload.client.finished_generate_thumbnails',EVENT_SELECTED_CUSTOM_THUMBNAIL:'upload.client.selected_custom_thumbnail',EVENT_VIDEO_DIMENSIONS_UNREADABLE:'upload.client.video_dimensions_unreadable',EVENT_REPLACE_VIDEO:'upload.client.replace_video',EVENT_STARTED_FLOW:'upload.client.started_flow',EVENT_FINISHED_FLOW:'upload.client.finished_flow',EVENT_FAILED_FLOW:'upload.client.failed_flow',EVENT_CANCELED_FLOW:'upload.client.canceled_flow',EVENT_RESIGNED_FLOW:'upload.client.resigned_flow',EVENT_REQUESTED_UPLOADING:'upload.client.requested_uploading',EVENT_INVALIDATED_UPLOADING:'upload.client.invalidated_uploading',EVENT_STARTED_UPLOADING:'upload.client.started_uploading',EVENT_PROGRESS_UPLOADING_START_REQUEST:'upload.client.progress_uploading_start_request',EVENT_FINISHED_UPLOADING:'upload.client.finished_uploading',EVENT_CANCELED_UPLOADING:'upload.client.canceled_uploading',EVENT_ABANDONED_UPLOADING:'upload.client.abandoned_uploading',EVENT_FAILED_UPLOADING:'upload.client.failed_uploading',EVENT_STARTED_SENDING_BYTES:'upload.client.started_sending_bytes',EVENT_FINISHED_SENDING_BYTES:'upload.client.finished_sending_bytes',EVENT_CANCELED_SENDING_BYTES:'upload.client.canceled_sending_bytes',EVENT_FAILED_SENDING_BYTES:'upload.client.failed_sending_bytes',EVENT_STARTED_START_REQUEST:'upload.client.started_sending_start_request',EVENT_FINISHED_START_REQUEST:'upload.client.finished_sending_start_request',EVENT_FAILED_START_REQUEST:'upload.client.failed_sending_start_request',EVENT_STARTED_POST_REQUEST:'upload.client.started_sending_post_request',EVENT_FINISHED_POST_REQUEST:'upload.client.finished_sending_post_request',EVENT_FAILED_POST_REQUEST:'upload.client.failed_sending_post_request',EVENT_STARTED_SENDING_CHUNK_BYTES:'upload.client.started_sending_chunk_bytes',EVENT_FINISHED_SENDING_CHUNK_BYTES:'upload.client.finished_sending_chunk_bytes',EVENT_CANCELED_SENDING_CHUNK_BYTES:'upload.client.canceled_sending_chunk_bytes',EVENT_FAILED_SENDING_CHUNK_BYTES:'upload.client.failed_sending_chunk_bytes',EVENT_TIMEOUT_SENDING_CHUNK_BYTES:'upload.client.timeout_sending_chunk_bytes',EVENT_ENCODING_START_OBSERVED:'encode.client.encoding_start_observed',EVENT_ENCODING_SUCCESS_OBSERVED:'encode.client.encoding_success_observed',EVENT_ENCODING_FAIL_OBSERVED:'encode.client.encoding_fail_observed',EVENT_RECEIVED_RESPONSE:'upload.client.received_response'});Object.assign(h.prototype,{logEvent:function(event,i){var j=babelHelpers['extends']({},i);if(j.elapsed_time==null)if(event.indexOf('started')!==-1){this._times[event]=Date.now();}else if(event.indexOf('finished')!==-1){j.elapsed_time=this._computeElapsedTime(event,'finished');}else if(event.indexOf('canceled')!==-1){j.elapsed_time=this._computeElapsedTime(event,'canceled');}else if(event.indexOf('failed')!==-1)j.elapsed_time=this._computeElapsedTime(event,'failed');j.event=event;j.source=this._source;j.waterfall_id=this._waterfallID;j.target_id=this._targetID;j.is_chunked_upload=this._isChunkedUpload;j.actor_id=this._actorID;j.composer_entry_point_ref=this._composerEntryPointRef;c('Banzai').post(h.BANZAI_ROUTE,j,{delay:this._delay});},_computeElapsedTime:function(event,i){var j=event.replace(i,'started'),k=this._times[j];return k?Date.now()-k:null;}});f.exports=h;},null);
__d('VideoUploadCrashMonitor',['Bandicoot','VideoUploadLogger'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('Bandicoot'));i=h&&h.prototype;function j(k,l,m,n,o,p,q,r){'use strict';i.constructor.call(this,'VideoUploadSession');this.$VideoUploadCrashMonitor1={waterfallID:k,actorID:l,source:m,targetID:n,loggingDelay:o,supportsChunking:p,composerEntryPointRef:q,flowStarted:r};}j.prototype.flowStarted=function(){'use strict';this.$VideoUploadCrashMonitor1.flowStarted=true;};j.prototype.getCrashTimeData=function(){'use strict';return this.$VideoUploadCrashMonitor1;};j.prototype.logCrash=function(k,l,m){'use strict';if(!l.waterfallID)return;var n=new (c('VideoUploadLogger'))({actor_id:l.actorID,source:l.source,waterfall_id:l.waterfallID,target_id:l.targetID,delay:l.loggingDelay,is_chunked_upload:l.supportsChunking,composer_entry_point_ref:l.composerEntryPointRef}),o={error:'Crash Detected',error_description:'Detected video upload did not complete due to a crash'};n.logEvent(c('VideoUploadLogger').EVENT_FAILED_UPLOADING,o);if(l.flowStarted)n.logEvent(c('VideoUploadLogger').EVENT_RESIGNED_FLOW,{});};f.exports=j;},null);
__d('VideoUploadFileValidator',['fbt','errorCode','ErrorDialog','JSXDOM'],function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();var j=[1363019,1363020,1363021,1363022,1363023,1363024,1363025,1363026,1363027,1363030,1363031,1363032,1363033,1363038,1363039,1363040,1363048];function k(l){'use strict';this.$VideoUploadFileValidator1=l;}k.prototype.validate=function(l,m){'use strict';return this.$VideoUploadFileValidator2(l)&&this.$VideoUploadFileValidator3(l)&&this.$VideoUploadFileValidator4(m);};k.prototype.getValidationErrorMessage=function(l,m){'use strict';return this.$VideoUploadFileValidator5(l)||this.$VideoUploadFileValidator6(l)||this.$VideoUploadFileValidator7(m);};k.canReplaceVideoForError=function(l){'use strict';if(!l)return true;if(j.indexOf(l)>-1)return true;return false;};k.prototype.$VideoUploadFileValidator2=function(l){'use strict';var m=this.$VideoUploadFileValidator5(l);if(m){c('ErrorDialog').show(m.summary,m.description);return false;}else return true;};k.prototype.$VideoUploadFileValidator5=function(l){'use strict';if(this.$VideoUploadFileValidator1.extensions[l.getExtension()])return;var m="http://www.facebook.com/help/"+"?faq=218673814818907#What-formats-of-video-files-can-I-upload?",n=c('JSXDOM').a({href:m},h._("recommended formats"));return {summary:h._("Unsupported File Format"),description:h._("Sorry, the file you selected is in a format that we don't support. Please use one of our {link} for video files.",[h.param('link',n)])};};k.prototype.$VideoUploadFileValidator3=function(l){'use strict';var m=this.$VideoUploadFileValidator6(l);if(m){c('ErrorDialog').show(m.summary,m.description);return false;}else return true;};k.prototype.$VideoUploadFileValidator6=function(l){'use strict';var m;if(l.getSize()===null)return;if(l.getSize()<this.$VideoUploadFileValidator1.minSize)m=this.$VideoUploadFileValidator8();if(l.getSize()>this.$VideoUploadFileValidator1.maxSize)m=this.$VideoUploadFileValidator9();return m;};k.prototype.$VideoUploadFileValidator8=function(){'use strict';var l=c('JSXDOM').strong(null,h._("{kilobytes} KB",[h.param('kilobytes',Math.round(this.$VideoUploadFileValidator1.minSize/1024))]));return {summary:h._("Video File Too Small"),description:h._("The video file you tried to upload is too small. The minimum size for a video file is {min-size}. Please try again with a larger file.",[h.param('min-size',l)])};};k.prototype.$VideoUploadFileValidator9=function(){'use strict';var l=c('JSXDOM').strong(null,h._("{max-size} MB",[h.param('max-size',Math.round(this.$VideoUploadFileValidator1.maxSize/1024/1024))]));return {summary:h._("Video File Too Large"),description:h._("The video file you tried to upload is too large. The maximum size for a video file is {max-size}. Please try again with a smaller file.",[h.param('max-size',l)])};};k.prototype.$VideoUploadFileValidator4=function(l){'use strict';var m=this.$VideoUploadFileValidator7(l);if(m){c('ErrorDialog').show(m.summary,m.description);return false;}else return true;};k.prototype.$VideoUploadFileValidator7=function(l){'use strict';var m;if(!l)return;var n=l.format.duration;if(n<this.$VideoUploadFileValidator1.minLength)m=this.$VideoUploadFileValidator10();if(!l.streams.primaryVideo&&l.streams.primaryAudio)m=this.$VideoUploadFileValidator11();if(l.streams.primaryVideo.width<this.$VideoUploadFileValidator1.minWidth)m=this.$VideoUploadFileValidator12();if(l.streams.primaryVideo.height<this.$VideoUploadFileValidator1.minHeight)m=this.$VideoUploadFileValidator13();return m;};k.prototype.$VideoUploadFileValidator14=function(){'use strict';return {summary:h._("Video Duration Too Long"),description:h._("The duration of the video you tried to upload is too long. The maximum duration for a video is {max-length} minutes. Please upload a shorter video.",[h.param('max-length',Math.round(this.$VideoUploadFileValidator1.maxLength/60))])};};k.prototype.$VideoUploadFileValidator10=function(){'use strict';return {summary:h._("Video File Too Short"),description:h._({"second":"The duration of the video you tried to upload is too short. The minimum length for a video is {min-length} second. Please upload a longer video.","seconds":"The duration of the video you tried to upload is too short. The minimum length for a video is {min-length} seconds. Please upload a longer video."},[h.param('min-length',this.$VideoUploadFileValidator1.minLength),h['enum'](this.$VideoUploadFileValidator1.minLength===1?'second':'seconds',{second:'second',seconds:'seconds'})])};};k.prototype.$VideoUploadFileValidator11=function(){'use strict';var l="http://www.facebook.com/help/"+"?faq=218673814818907#What-formats-of-video-files-can-I-upload?",m=c('JSXDOM').a({href:l},h._("supported video format"));return {summary:h._("No Video Detected"),description:h._("It looks like you're trying to upload a file that isn't a video. Please try uploading a {supported-video-format link}",[h.param('supported-video-format link',m)])};};k.prototype.$VideoUploadFileValidator12=function(){'use strict';return {summary:h._("Video Width Too Narrow"),description:h._("The width of the video you tried to upload is too short. The minimum width for a video is {min-width}. Please upload a wider video.",[h.param('min-width',this.$VideoUploadFileValidator1.minWidth)])};};k.prototype.$VideoUploadFileValidator13=function(){'use strict';return {summary:h._("Video Height Too Short"),description:h._("The height of the video you tried to upload is too short. The minimum height for a video is {min-height}. Please upload a taller video.",[h.param('min-height',this.$VideoUploadFileValidator1.minHeight)])};};f.exports=k;},null);
__d('VideoUploadProgressBar',['cx','CSS','VideoUploadFeatureDetector'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(j){'use strict';this.$VideoUploadProgressBar1=j.progress_bar;this.$VideoUploadProgressBar2=j.throbber;this.$VideoUploadProgressBar3=j.uploader;this.$VideoUploadProgressBar4=j.start_margin;this.$VideoUploadProgressBar5=j.start_delay;this.$VideoUploadProgressBar6=j.end_margin;this.$VideoUploadProgressBar7=j.end_delay;this.$VideoUploadProgressBar8=j.progress_bar_label;this.$VideoUploadProgressBar9();}i.prototype.reset=function(){'use strict';this.$VideoUploadProgressBar1.setPosition(0);};i.prototype.getRoot=function(){'use strict';return this.$VideoUploadProgressBar1.getRoot();};i.computeProgress=function(j,k,l,m,n){'use strict';var o=Math.min(j+k,l);return o/l*(100-m-n)+m;};i.prototype.$VideoUploadProgressBar9=function(){'use strict';if(c('VideoUploadFeatureDetector').supportsFileAPI()){this.$VideoUploadProgressBar3.subscribe('upload-requested',this.$VideoUploadProgressBar10.bind(this));this.$VideoUploadProgressBar3.subscribe('upload-progressed',this.$VideoUploadProgressBar11.bind(this));this.$VideoUploadProgressBar3.subscribe('online',this.$VideoUploadProgressBar12.bind(this));this.$VideoUploadProgressBar3.subscribe('offline',this.$VideoUploadProgressBar13.bind(this));}else this.$VideoUploadProgressBar3.subscribe('upload-requested',this.$VideoUploadProgressBar14.bind(this));};i.prototype.$VideoUploadProgressBar10=function(event){'use strict';c('CSS').show(this.$VideoUploadProgressBar1.getRoot());c('CSS').removeClass(this.$VideoUploadProgressBar1.getRoot(),"_5r5a");this.$VideoUploadProgressBar1.setTarget(this.$VideoUploadProgressBar4,this.$VideoUploadProgressBar5);this.$VideoUploadProgressBar15(0);};i.prototype.$VideoUploadProgressBar15=function(j){'use strict';if(this.$VideoUploadProgressBar8)this.$VideoUploadProgressBar1.changeLabel(''+j.toFixed(1)+'%');};i.prototype.$VideoUploadProgressBar11=function(event,j){'use strict';c('CSS').removeClass(this.$VideoUploadProgressBar1.getRoot(),"_5r5a");var k=i.computeProgress(j.start_offset,j.sent_bytes,j.file_size,this.$VideoUploadProgressBar4,this.$VideoUploadProgressBar6);this.$VideoUploadProgressBar1.setPosition(k);this.$VideoUploadProgressBar15(k);if(k>=100-this.$VideoUploadProgressBar6){this.$VideoUploadProgressBar1.setTarget(100,this.$VideoUploadProgressBar7);this.$VideoUploadProgressBar15(100);}};i.prototype.$VideoUploadProgressBar12=function(event){'use strict';c('CSS').removeClass(this.$VideoUploadProgressBar1.getRoot(),"_5r5a");};i.prototype.$VideoUploadProgressBar13=function(event){'use strict';c('CSS').addClass(this.$VideoUploadProgressBar1.getRoot(),"_5r5a");};i.prototype.$VideoUploadProgressBar14=function(event){'use strict';c('CSS').show(this.$VideoUploadProgressBar2);};f.exports=i;},null);
__d('VideoUploadRequest',['AsyncRequest','DOM','DTSG','FileForm','Form','PHPQuerySerializer','VideoUploadFeatureDetector','emptyFunction','flattenPHPQueryData','submitForm'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h='video';function i(j){'use strict';this.$VideoUploadRequest1=j;this.$VideoUploadRequest2=null;this.$VideoUploadRequest3=false;this.$VideoUploadRequest4=null;this.$VideoUploadRequest5=null;this.$VideoUploadRequest6=null;this.$VideoUploadRequest7=c('emptyFunction');this.$VideoUploadRequest8=c('emptyFunction');this.$VideoUploadRequest9=c('emptyFunction');this.$VideoUploadRequest10=c('emptyFunction');this.$VideoUploadRequest11=null;}i.prototype.setAllowCrossOrigin=function(j){'use strict';this.$VideoUploadRequest3=j;return this;};i.prototype.setData=function(j){'use strict';this.$VideoUploadRequest4=j;return this;};i.prototype.setWaterfallID=function(j){'use strict';this.$VideoUploadRequest5=j;return this;};i.prototype.setSuccessHandler=function(j){'use strict';this.$VideoUploadRequest7=j;return this;};i.prototype.setErrorHandler=function(j){'use strict';this.$VideoUploadRequest8=j;return this;};i.prototype.setTransportErrorHandler=function(j){'use strict';this.$VideoUploadRequest9=j;return this;};i.prototype.setUploadProgressHandler=function(j){'use strict';this.$VideoUploadRequest10=j;return this;};i.prototype.setTimeoutHandler=function(j,k){'use strict';this.$VideoUploadRequest6=j;this.$VideoUploadRequest11=k;return this;};i.prototype.setThumbnail=function(j){'use strict';this.$VideoUploadRequest12=j;return this;};i.prototype.setCaptions=function(j){'use strict';this.$VideoUploadRequest13=j;return this;};i.prototype.send=function(){'use strict';if(this.$VideoUploadRequest2)throw new Error('An upload request is already in progress.');if(c('VideoUploadFeatureDetector').supportsXHR()){this.$VideoUploadRequest2=this.$VideoUploadRequest14();if(this.$VideoUploadRequest12||this.$VideoUploadRequest13){var j=new FormData();if(this.$VideoUploadRequest12)j.append('thumb',this.$VideoUploadRequest12);if(this.$VideoUploadRequest13)this.$VideoUploadRequest13.forEach(function(l,m){var n=l.getIsDefault()?'captions_default':'captions_file'+m;j.append(n,l.getFile());});if(this.$VideoUploadRequest4){var k=c('flattenPHPQueryData')(this.$VideoUploadRequest4);Object.keys(k).forEach(function(l){j.append(l,k[l]);});}this.$VideoUploadRequest2.setRawData(j);}this.$VideoUploadRequest2.send();}else{this.$VideoUploadRequest2=this.$VideoUploadRequest15();this.$VideoUploadRequest16(this.$VideoUploadRequest2);}};i.prototype.sendChunk=function(j){'use strict';if(this.$VideoUploadRequest2)throw new Error('An upload request is already in progress.');var k=new FormData();k.append('video_file_chunk',j);this.$VideoUploadRequest2=this.$VideoUploadRequest14();this.$VideoUploadRequest2.setRawData(k);this.$VideoUploadRequest2.send();};i.prototype.sendFile=function(j){'use strict';if(this.$VideoUploadRequest2)throw new Error('An upload request is already in progress.');this.$VideoUploadRequest2=this.$VideoUploadRequest15();var k=j.cloneNode(false);j.name=h;c('DOM').replace(j,k);c('DOM').appendContent(this.$VideoUploadRequest2.getRoot(),j);this.$VideoUploadRequest16(this.$VideoUploadRequest2);j.name=k.name;c('DOM').replace(k,j);};i.prototype.abort=function(){'use strict';if(!this.$VideoUploadRequest2)throw new Error('There is no upload request in progress.');this.$VideoUploadRequest2.abort();this.$VideoUploadRequest2=null;};i.prototype.$VideoUploadRequest14=function(){'use strict';var j=this.__getAsyncRequest().setAllowCrossOrigin(this.$VideoUploadRequest3).setURI(this.$VideoUploadRequest1).setData(this.$VideoUploadRequest4).setRequestHeader('X_FB_VIDEO_WATERFALL_ID',this.$VideoUploadRequest5).setHandler(this.$VideoUploadRequest7).setErrorHandler(this.$VideoUploadRequest8).setTransportErrorHandler(this.$VideoUploadRequest9).setUploadProgressHandler(this.$VideoUploadRequest10);if(this.$VideoUploadRequest11)j.setTimeoutHandler(this.$VideoUploadRequest6,this.$VideoUploadRequest11);return j;};i.prototype.__getAsyncRequest=function(){'use strict';return new (c('AsyncRequest'))();};i.prototype.$VideoUploadRequest15=function(){'use strict';var j=c('DOM').create('form',{action:this.$VideoUploadRequest1,method:'POST'});c('Form').createHiddenInputs(babelHelpers['extends']({fb_dtsg:c('DTSG').getToken()},this.$VideoUploadRequest4),j);var k=new (c('FileForm'))(j,null,{allowCrossOrigin:this.$VideoUploadRequest3});k.subscribe('success',this.$VideoUploadRequest17.bind(this));k.subscribe('failure',this.$VideoUploadRequest18.bind(this));k.subscribe('progress',this.$VideoUploadRequest19.bind(this));return k;};i.prototype.$VideoUploadRequest16=function(j){'use strict';c('DOM').appendContent(document.body,j.getRoot());c('submitForm')(j.getRoot());};i.prototype.$VideoUploadRequest17=function(event,j){'use strict';this.$VideoUploadRequest7(j.response);};i.prototype.$VideoUploadRequest18=function(event,j){'use strict';this.$VideoUploadRequest8(j.response);};i.prototype.$VideoUploadRequest19=function(event,j){'use strict';this.$VideoUploadRequest10(j.event);};f.exports=i;},null);
__d("VideoUploadRequestContext",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(){"use strict";this.reset();}h.prototype.setFile=function(i){"use strict";this.$VideoUploadRequestContext1=i;return this;};h.prototype.getFile=function(){"use strict";return this.$VideoUploadRequestContext1;};h.prototype.setMetadata=function(i){"use strict";this.$VideoUploadRequestContext2=i;return this;};h.prototype.getMetadata=function(){"use strict";return this.$VideoUploadRequestContext2;};h.prototype.setVideoID=function(i){"use strict";this.$VideoUploadRequestContext3=i;return this;};h.prototype.getVideoID=function(){"use strict";return this.$VideoUploadRequestContext3;};h.prototype.setStartOffset=function(i){"use strict";this.$VideoUploadRequestContext4=i;return this;};h.prototype.getStartOffset=function(){"use strict";return this.$VideoUploadRequestContext4;};h.prototype.setEndOffset=function(i){"use strict";this.$VideoUploadRequestContext5=i;return this;};h.prototype.getEndOffset=function(){"use strict";return this.$VideoUploadRequestContext5;};h.prototype.setPartitionStartOffset=function(i){"use strict";this.$VideoUploadRequestContext6=i;return this;};h.prototype.getPartitionStartOffset=function(){"use strict";return this.$VideoUploadRequestContext6;};h.prototype.setPartitionEndOffset=function(i){"use strict";this.$VideoUploadRequestContext7=i;return this;};h.prototype.getPartitionEndOffset=function(){"use strict";return this.$VideoUploadRequestContext7;};h.prototype.setTargetID=function(i){"use strict";this.$VideoUploadRequestContext8=i;return this;};h.prototype.getTargetID=function(){"use strict";return this.$VideoUploadRequestContext8;};h.prototype.setSource=function(i){"use strict";this.$VideoUploadRequestContext9=i;return this;};h.prototype.getSource=function(){"use strict";return this.$VideoUploadRequestContext9;};h.prototype.setWaterfallID=function(i){"use strict";this.$VideoUploadRequestContext10=i;return this;};h.prototype.getWaterfallID=function(){"use strict";return this.$VideoUploadRequestContext10;};h.prototype.setComposerEntryPointRef=function(i){"use strict";this.$VideoUploadRequestContext11=i;};h.prototype.getComposerEntryPointRef=function(){"use strict";return this.$VideoUploadRequestContext11;};h.prototype.setSupportsChunking=function(i){"use strict";this.$VideoUploadRequestContext12=i;return this;};h.prototype.getSupportsChunking=function(){"use strict";return this.$VideoUploadRequestContext12;};h.prototype.setSupportsFileAPI=function(i){"use strict";this.$VideoUploadRequestContext13=i;return this;};h.prototype.getSupportsFileAPI=function(){"use strict";return this.$VideoUploadRequestContext13;};h.prototype.setCreatorProduct=function(i){"use strict";this.$VideoUploadRequestContext14=i;return this;};h.prototype.getCreatorProduct=function(){"use strict";return this.$VideoUploadRequestContext14;};h.prototype.reset=function(){"use strict";this.$VideoUploadRequestContext1=null;this.$VideoUploadRequestContext3=null;this.$VideoUploadRequestContext4=null;this.$VideoUploadRequestContext5=null;this.$VideoUploadRequestContext8=null;this.$VideoUploadRequestContext9=null;this.$VideoUploadRequestContext10=null;this.$VideoUploadRequestContext11=null;this.$VideoUploadRequestContext12=null;this.$VideoUploadRequestContext13=null;this.$VideoUploadRequestContext6=null;this.$VideoUploadRequestContext7=null;this.$VideoUploadRequestContext14=null;};f.exports=h;},null);
__d('VideoUploadPostRequestManager',['ArbiterMixin','VideoUploadRequest','mixin'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('mixin')(c('ArbiterMixin')));i=h&&h.prototype;function j(k,l,m,n,o){'use strict';i.constructor.call(this);this.$VideoUploadPostRequestManager1=k;this.$VideoUploadPostRequestManager2=l;this.$VideoUploadPostRequestManager3=m;this.$VideoUploadPostRequestManager4=0;this.$VideoUploadPostRequestManager5=n;this.$VideoUploadPostRequestManager6=o;this.$VideoUploadPostRequestManager7=0;}j.prototype.getRequest=function(){'use strict';return this.$VideoUploadPostRequestManager8;};j.prototype.sendRequest=function(k){'use strict';if(this.$VideoUploadPostRequestManager8)return;this.$VideoUploadPostRequestManager9=babelHelpers['extends']({},k.getMetadata(),this.__createRequestData(k));this.$VideoUploadPostRequestManager10=this.$VideoUploadPostRequestManager9.thumb;delete this.$VideoUploadPostRequestManager9.thumb;this.$VideoUploadPostRequestManager11=this.$VideoUploadPostRequestManager9.captions;delete this.$VideoUploadPostRequestManager9.captions;this.$VideoUploadPostRequestManager12=k.getWaterfallID();this.$VideoUploadPostRequestManager13();this.inform('request-started');};j.prototype.$VideoUploadPostRequestManager13=function(){'use strict';clearTimeout(this.$VideoUploadPostRequestManager14);this.$VideoUploadPostRequestManager14=null;this.$VideoUploadPostRequestManager8=this.__getVideoUploadRequest(this.$VideoUploadPostRequestManager1).setAllowCrossOrigin(true).setData(this.$VideoUploadPostRequestManager9).setThumbnail(this.$VideoUploadPostRequestManager10).setCaptions(this.$VideoUploadPostRequestManager11).setWaterfallID(this.$VideoUploadPostRequestManager12).setSuccessHandler(this.$VideoUploadPostRequestManager15.bind(this)).setErrorHandler(this.$VideoUploadPostRequestManager16.bind(this)).setTransportErrorHandler(this.$VideoUploadPostRequestManager17.bind(this));this.$VideoUploadPostRequestManager8.send();};j.prototype.__createRequestData=function(k){'use strict';return {video_id:k.getVideoID(),target_id:k.getTargetID(),source:k.getSource(),waterfall_id:k.getWaterfallID(),creator_product:k.getCreatorProduct(),composer_entry_point_ref:k.getComposerEntryPointRef&&k.getComposerEntryPointRef(),supports_chunking:k.getSupportsChunking()};};j.prototype.__getVideoUploadRequest=function(k){'use strict';return new (c('VideoUploadRequest'))(k);};j.prototype.clearRequest=function(){'use strict';this.$VideoUploadPostRequestManager8=null;this.$VideoUploadPostRequestManager7=0;this.$VideoUploadPostRequestManager4=0;};j.prototype.isInProgress=function(){'use strict';return !!this.$VideoUploadPostRequestManager8;};j.prototype.$VideoUploadPostRequestManager18=function(k){'use strict';clearTimeout(this.$VideoUploadPostRequestManager14);this.$VideoUploadPostRequestManager14=setTimeout(this.$VideoUploadPostRequestManager13.bind(this),k);};j.prototype.$VideoUploadPostRequestManager19=function(k,l){'use strict';return Math.pow(k,l)*1000;};j.prototype.$VideoUploadPostRequestManager15=function(k){'use strict';this.inform('request-finished',{video_id:k.getPayload().video_id,transport_retries:this.$VideoUploadPostRequestManager4,server_retries:this.$VideoUploadPostRequestManager7});this.clearRequest();};j.prototype.$VideoUploadPostRequestManager20=function(k){'use strict';this.inform('request-failed',{error_code:k.getError(),error_description:k.getErrorDescription(),error_summary:k.getErrorSummary(),transport_retries:this.$VideoUploadPostRequestManager4,server_retries:this.$VideoUploadPostRequestManager7,error_is_transient:k.isTransient()});this.clearRequest();};j.prototype.$VideoUploadPostRequestManager16=function(k){'use strict';this.$VideoUploadPostRequestManager8=null;this.$VideoUploadPostRequestManager4=0;if(k.isTransient()&&this.$VideoUploadPostRequestManager7<this.$VideoUploadPostRequestManager5){this.$VideoUploadPostRequestManager7++;this.$VideoUploadPostRequestManager18(this.$VideoUploadPostRequestManager19(this.$VideoUploadPostRequestManager6,this.$VideoUploadPostRequestManager7));}else this.$VideoUploadPostRequestManager20(k);};j.prototype.$VideoUploadPostRequestManager17=function(k){'use strict';if(this.$VideoUploadPostRequestManager2===0||this.$VideoUploadPostRequestManager4>=this.$VideoUploadPostRequestManager2){this.$VideoUploadPostRequestManager20(k);}else{this.$VideoUploadPostRequestManager4++;this.$VideoUploadPostRequestManager8=null;this.$VideoUploadPostRequestManager18(this.$VideoUploadPostRequestManager19(this.$VideoUploadPostRequestManager3,this.$VideoUploadPostRequestManager4));}};f.exports=j;},null);
__d('VideoUploadConnectionMonitor',['ArbiterMixin','Network','VideoUploadFeatureDetector','debounce','mixin'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('mixin')(c('ArbiterMixin')));i=h&&h.prototype;function j(){'use strict';i.constructor.call(this);this.$VideoUploadConnectionMonitor1=false;this.$VideoUploadConnectionMonitor2=[];this.$VideoUploadConnectionMonitor3=false;this.$VideoUploadConnectionMonitor4=true;this.$VideoUploadConnectionMonitor5=c('debounce')(function(){this.$VideoUploadConnectionMonitor6(false);}.bind(this),2000);}j.prototype.notifyStart=function(){'use strict';if(this.$VideoUploadConnectionMonitor3)return;if(this.$VideoUploadConnectionMonitor2.length===0){this.$VideoUploadConnectionMonitor2.push(c('Network').addListener('online',function(){this.$VideoUploadConnectionMonitor6(true);}.bind(this)));this.$VideoUploadConnectionMonitor2.push(c('Network').addListener('offline',function(){if(this.$VideoUploadConnectionMonitor1){this.$VideoUploadConnectionMonitor5();}else{this.$VideoUploadConnectionMonitor5.reset();setTimeout(this.$VideoUploadConnectionMonitor5,2000);}}.bind(this)));}this.$VideoUploadConnectionMonitor3=true;};j.prototype.notifyProgress=function(event){'use strict';if(!this.$VideoUploadConnectionMonitor3)return;if(!event)return;if(c('VideoUploadFeatureDetector').supportsFullProgress()){this.$VideoUploadConnectionMonitor1=true;if(event.total&&event.loaded===event.total){this.$VideoUploadConnectionMonitor5.reset();}else this.$VideoUploadConnectionMonitor5();}};j.prototype.notifySuccess=function(){'use strict';if(!this.$VideoUploadConnectionMonitor3)return;this.reset();this.$VideoUploadConnectionMonitor6(true);};j.prototype.notifyTransportError=function(){'use strict';if(!this.$VideoUploadConnectionMonitor3)return;this.$VideoUploadConnectionMonitor3=false;this.$VideoUploadConnectionMonitor6(false);};j.prototype.notifyError=function(){'use strict';if(!this.$VideoUploadConnectionMonitor3)return;this.reset();this.$VideoUploadConnectionMonitor6(true);};j.prototype.isOnline=function(){'use strict';return this.$VideoUploadConnectionMonitor4;};j.prototype.reset=function(){'use strict';while(this.$VideoUploadConnectionMonitor2.length)this.$VideoUploadConnectionMonitor2.pop().remove();this.$VideoUploadConnectionMonitor5.reset();this.$VideoUploadConnectionMonitor3=false;};j.prototype.$VideoUploadConnectionMonitor6=function(k){'use strict';this.$VideoUploadConnectionMonitor5.reset();if(this.$VideoUploadConnectionMonitor4!==k){this.$VideoUploadConnectionMonitor4=k;if(this.$VideoUploadConnectionMonitor4){this.inform('online');}else this.inform('offline');}};f.exports=j;},null);
__d('VideoUploadReceiveRequestManager',['fbt','ArbiterMixin','VideoUploadConnectionMonitor','VideoUploadRequest','mixin'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k=1363037;i=babelHelpers.inherits(l,c('mixin')(c('ArbiterMixin')));j=i&&i.prototype;function l(m,n,o,p,q,r,s,t,u){'use strict';j.constructor.call(this);this.$VideoUploadReceiveRequestManager1=m;this.$VideoUploadReceiveRequestManager2=n;this.$VideoUploadReceiveRequestManager3=o;this.$VideoUploadReceiveRequestManager4=p;this.$VideoUploadReceiveRequestManager5=q;this.$VideoUploadReceiveRequestManager6=r;this.$VideoUploadReceiveRequestManager7=s;this.$VideoUploadReceiveRequestManager8=t;this.$VideoUploadReceiveRequestManager9=u;this.$VideoUploadReceiveRequestManager10=0;this.$VideoUploadReceiveRequestManager11=0;this.$VideoUploadReceiveRequestManager12=0;this.$VideoUploadReceiveRequestManager13=null;this.$VideoUploadReceiveRequestManager14=null;this.$VideoUploadReceiveRequestManager15=0;this.$VideoUploadReceiveRequestManager16='constructed';this.$VideoUploadReceiveRequestManager17=new (c('VideoUploadConnectionMonitor'))();this.$VideoUploadReceiveRequestManager17.subscribe('online',this.$VideoUploadReceiveRequestManager18.bind(this));this.$VideoUploadReceiveRequestManager17.subscribe('offline',this.$VideoUploadReceiveRequestManager19.bind(this));}l.prototype.sendRequest=function(m){'use strict';this.$VideoUploadReceiveRequestManager16='sending request';if(this.$VideoUploadReceiveRequestManager20){this.$VideoUploadReceiveRequestManager16='request already in progress';return;}this.$VideoUploadReceiveRequestManager15=m.getEndOffset()-m.getStartOffset();this.$VideoUploadReceiveRequestManager21=m;this.$VideoUploadReceiveRequestManager22();};l.prototype.cancelRequest=function(){'use strict';if(!this.$VideoUploadReceiveRequestManager20)return;this.$VideoUploadReceiveRequestManager20.abort();this.$VideoUploadReceiveRequestManager23();};l.prototype.appendStateLogData=function(m,n){'use strict';m[n+'last_log_entry']=this.$VideoUploadReceiveRequestManager16;m[n+'upload_speed']=this.$VideoUploadReceiveRequestManager14;m[n+'transport_retries']=this.$VideoUploadReceiveRequestManager10;m[n+'server_retries']=this.$VideoUploadReceiveRequestManager11;m[n+'timeout_retries']=this.$VideoUploadReceiveRequestManager12;m[n+'last_timeout_value']=this.$VideoUploadReceiveRequestManager24;m[n+'last_request_start_time']=this.$VideoUploadReceiveRequestManager13;m[n+'pending_request']=this.$VideoUploadReceiveRequestManager20!=null;m[n+'pending_timer']=this.$VideoUploadReceiveRequestManager25!=null;m[n+'cached_chunk']=this.$VideoUploadReceiveRequestManager26!=null;if(this.$VideoUploadReceiveRequestManager21!=null){m[n+'start_offset']=this.$VideoUploadReceiveRequestManager21.getStartOffset();m[n+'end_offset']=this.$VideoUploadReceiveRequestManager21.getEndOffset();m[n+'partition_start_offset']=this.$VideoUploadReceiveRequestManager21.getPartitionStartOffset();m[n+'partition_end_offset']=this.$VideoUploadReceiveRequestManager21.getPartitionEndOffset();}if(this.$VideoUploadReceiveRequestManager17!=null)m[n+'connection_monitor_online']=this.$VideoUploadReceiveRequestManager17.isOnline();};l.prototype.$VideoUploadReceiveRequestManager23=function(){'use strict';this.$VideoUploadReceiveRequestManager20=null;this.$VideoUploadReceiveRequestManager26=null;this.$VideoUploadReceiveRequestManager10=0;this.$VideoUploadReceiveRequestManager11=0;this.$VideoUploadReceiveRequestManager12=0;this.$VideoUploadReceiveRequestManager13=null;this.$VideoUploadReceiveRequestManager14=null;this.$VideoUploadReceiveRequestManager15=0;this.$VideoUploadReceiveRequestManager21.reset();this.$VideoUploadReceiveRequestManager17.reset();clearTimeout(this.$VideoUploadReceiveRequestManager25);this.$VideoUploadReceiveRequestManager25=null;};l.prototype.$VideoUploadReceiveRequestManager22=function(m){'use strict';clearTimeout(this.$VideoUploadReceiveRequestManager25);this.$VideoUploadReceiveRequestManager25=null;if(this.$VideoUploadReceiveRequestManager21.getSupportsChunking()&&this.$VideoUploadReceiveRequestManager21.getStartOffset()>=this.$VideoUploadReceiveRequestManager21.getPartitionEndOffset()){if(!m){this.inform('request-finished',{start_offset:this.$VideoUploadReceiveRequestManager21.getEndOffset()-1,end_offset:this.$VideoUploadReceiveRequestManager21.getEndOffset(),transport_retries:this.$VideoUploadReceiveRequestManager10,server_retries:this.$VideoUploadReceiveRequestManager11,upload_speed:this.$VideoUploadReceiveRequestManager14});this.$VideoUploadReceiveRequestManager16='request finished - notified';}else this.$VideoUploadReceiveRequestManager16='request finished - not notified';return;}this.$VideoUploadReceiveRequestManager20=this.__getVideoUploadRequest(this.$VideoUploadReceiveRequestManager1).setAllowCrossOrigin(true).setData(this.__createRequestData(this.$VideoUploadReceiveRequestManager21)).setWaterfallID(this.$VideoUploadReceiveRequestManager21.getWaterfallID()).setSuccessHandler(this.__handleSuccessResponse.bind(this)).setErrorHandler(this.__handleServerFailureResponse.bind(this)).setTransportErrorHandler(this.$VideoUploadReceiveRequestManager27.bind(this)).setUploadProgressHandler(this.$VideoUploadReceiveRequestManager28.bind(this));this.$VideoUploadReceiveRequestManager13=Date.now();if(this.$VideoUploadReceiveRequestManager21.getSupportsChunking()){if(this.$VideoUploadReceiveRequestManager4){var n=this.$VideoUploadReceiveRequestManager29(this.$VideoUploadReceiveRequestManager21.getEndOffset()-this.$VideoUploadReceiveRequestManager21.getStartOffset(),this.$VideoUploadReceiveRequestManager14);this.$VideoUploadReceiveRequestManager20.setTimeoutHandler(n,this.__handleResponseTimeout.bind(this));this.$VideoUploadReceiveRequestManager16='sending chunk with timeout = '+n;this.$VideoUploadReceiveRequestManager24=n;}else this.$VideoUploadReceiveRequestManager16='sending chunk without timeout';this.$VideoUploadReceiveRequestManager20.sendChunk(this.$VideoUploadReceiveRequestManager30());}else{this.$VideoUploadReceiveRequestManager16='sending file';this.$VideoUploadReceiveRequestManager20.sendFile(this.$VideoUploadReceiveRequestManager21.getFile().getFileInput());}this.$VideoUploadReceiveRequestManager17.notifyStart();this.inform('request-started',{start_offset:this.$VideoUploadReceiveRequestManager21.getStartOffset(),end_offset:this.$VideoUploadReceiveRequestManager21.getEndOffset(),transport_retries:this.$VideoUploadReceiveRequestManager10,server_retries:this.$VideoUploadReceiveRequestManager11,upload_speed:this.$VideoUploadReceiveRequestManager14});};l.prototype.__getVideoUploadRequest=function(m){'use strict';return new (c('VideoUploadRequest'))(m);};l.prototype.$VideoUploadReceiveRequestManager31=function(m){'use strict';this.$VideoUploadReceiveRequestManager16='setting request to send after'+m;clearTimeout(this.$VideoUploadReceiveRequestManager25);this.$VideoUploadReceiveRequestManager25=setTimeout(this.$VideoUploadReceiveRequestManager22.bind(this),m);};l.prototype.$VideoUploadReceiveRequestManager30=function(){'use strict';if(this.$VideoUploadReceiveRequestManager26)return this.$VideoUploadReceiveRequestManager26;this.$VideoUploadReceiveRequestManager26=this.$VideoUploadReceiveRequestManager21.getFile().getChunk(this.$VideoUploadReceiveRequestManager21.getStartOffset(),this.$VideoUploadReceiveRequestManager21.getEndOffset());return this.$VideoUploadReceiveRequestManager26;};l.prototype.__createRequestData=function(m){'use strict';return {video_id:m.getVideoID(),start_offset:m.getStartOffset(),source:m.getSource(),target_id:m.getTargetID(),waterfall_id:m.getWaterfallID(),composer_entry_point_ref:m.getComposerEntryPointRef&&m.getComposerEntryPointRef(),supports_chunking:m.getSupportsChunking(),upload_speed:this.$VideoUploadReceiveRequestManager14,partition_start_offset:m.getPartitionStartOffset(),partition_end_offset:m.getPartitionEndOffset()};};l.prototype.__handleSuccessResponse=function(m){'use strict';this.$VideoUploadReceiveRequestManager16='success response received';var n=Date.now()-this.$VideoUploadReceiveRequestManager13;n=n===0?1:n;var o=m.getPayload();if(o.start_offset===this.$VideoUploadReceiveRequestManager21.getEndOffset()){var p=this.$VideoUploadReceiveRequestManager21.getEndOffset()-this.$VideoUploadReceiveRequestManager21.getStartOffset();this.$VideoUploadReceiveRequestManager14=Math.floor(p/n);}else this.$VideoUploadReceiveRequestManager14=null;this.$VideoUploadReceiveRequestManager17.notifySuccess();this.inform('request-finished',{start_offset:this.$VideoUploadReceiveRequestManager21.getStartOffset(),end_offset:this.$VideoUploadReceiveRequestManager21.getEndOffset(),transport_retries:this.$VideoUploadReceiveRequestManager10,server_retries:this.$VideoUploadReceiveRequestManager11,upload_speed:this.$VideoUploadReceiveRequestManager14});this.$VideoUploadReceiveRequestManager21.setStartOffset(o.start_offset);this.$VideoUploadReceiveRequestManager21.setEndOffset(o.end_offset);this.$VideoUploadReceiveRequestManager20=null;this.$VideoUploadReceiveRequestManager26=null;this.$VideoUploadReceiveRequestManager10=0;this.$VideoUploadReceiveRequestManager11=0;this.$VideoUploadReceiveRequestManager12=0;if(this.$VideoUploadReceiveRequestManager21.getSupportsChunking())this.$VideoUploadReceiveRequestManager22(true);};l.prototype.__handleServerFailureResponse=function(m){'use strict';this.$VideoUploadReceiveRequestManager16='failure response received';this.$VideoUploadReceiveRequestManager20=null;this.$VideoUploadReceiveRequestManager10=0;this.$VideoUploadReceiveRequestManager14=null;this.$VideoUploadReceiveRequestManager12=0;this.$VideoUploadReceiveRequestManager17.notifyError();if(this.__hasInvalidStartOffsetAndHasRetries(m.getError())){this.$VideoUploadReceiveRequestManager11++;var n=m.getPayload();this.$VideoUploadReceiveRequestManager16='invalid offset response received start='+n.start_offset+' end='+n.end_offset;if(this.$VideoUploadReceiveRequestManager21.getStartOffset()!=n.start_offset||this.$VideoUploadReceiveRequestManager21.getEndOffset()!=n.end_offset){this.$VideoUploadReceiveRequestManager21.setStartOffset(n.start_offset);this.$VideoUploadReceiveRequestManager21.setEndOffset(n.end_offset);this.$VideoUploadReceiveRequestManager26=null;}this.$VideoUploadReceiveRequestManager22();}else if((m.isTransient()||this.$VideoUploadReceiveRequestManager9)&&this.$VideoUploadReceiveRequestManager11<this.$VideoUploadReceiveRequestManager3){this.$VideoUploadReceiveRequestManager16='transient server error';this.$VideoUploadReceiveRequestManager11++;this.$VideoUploadReceiveRequestManager31(this.$VideoUploadReceiveRequestManager32(this.$VideoUploadReceiveRequestManager8,this.$VideoUploadReceiveRequestManager11));}else this.$VideoUploadReceiveRequestManager33(m);};l.prototype.__handleResponseTimeout=function(m){'use strict';this.inform('request-timeout',{start_offset:this.$VideoUploadReceiveRequestManager21.getStartOffset(),end_offset:this.$VideoUploadReceiveRequestManager21.getEndOffset(),transport_retries:this.$VideoUploadReceiveRequestManager10,server_retries:this.$VideoUploadReceiveRequestManager11,timeout_retries:this.$VideoUploadReceiveRequestManager12,upload_speed:this.$VideoUploadReceiveRequestManager14});this.$VideoUploadReceiveRequestManager20.abort();this.$VideoUploadReceiveRequestManager20=null;this.$VideoUploadReceiveRequestManager14=null;this.$VideoUploadReceiveRequestManager17.notifyTransportError();if(++this.$VideoUploadReceiveRequestManager12<=this.$VideoUploadReceiveRequestManager5){var n=this.$VideoUploadReceiveRequestManager21.getEndOffset()-this.$VideoUploadReceiveRequestManager21.getStartOffset();n=Math.floor(n/2);n=Math.max(n,this.$VideoUploadReceiveRequestManager15);var o=this.$VideoUploadReceiveRequestManager21.getEndOffset();o=Math.min(o,this.$VideoUploadReceiveRequestManager21.getStartOffset()+n);this.$VideoUploadReceiveRequestManager21.setEndOffset(o);this.$VideoUploadReceiveRequestManager26=null;this.$VideoUploadReceiveRequestManager16='resending after timeout with chunksize='+n;this.$VideoUploadReceiveRequestManager22();}else this.$VideoUploadReceiveRequestManager34({error_code:1006,error_description:h._("Your browser appears to be offline. Please check your internet connection and try again."),error_summary:h._("No Network Connection"),error_is_transient:true});};l.prototype.__hasInvalidStartOffsetAndHasRetries=function(m){'use strict';return m===k&&this.$VideoUploadReceiveRequestManager11<this.$VideoUploadReceiveRequestManager3;};l.prototype.$VideoUploadReceiveRequestManager27=function(m){'use strict';this.$VideoUploadReceiveRequestManager17.notifyTransportError();this.$VideoUploadReceiveRequestManager14=null;this.$VideoUploadReceiveRequestManager12=0;if(this.$VideoUploadReceiveRequestManager10<this.$VideoUploadReceiveRequestManager2){this.$VideoUploadReceiveRequestManager16='resending after transport failure';this.$VideoUploadReceiveRequestManager10++;this.$VideoUploadReceiveRequestManager20=null;this.$VideoUploadReceiveRequestManager31(this.$VideoUploadReceiveRequestManager32(this.$VideoUploadReceiveRequestManager7,this.$VideoUploadReceiveRequestManager10));}else this.$VideoUploadReceiveRequestManager33(m);};l.prototype.$VideoUploadReceiveRequestManager33=function(m){'use strict';this.$VideoUploadReceiveRequestManager34({error_code:m.getError(),error_description:m.getErrorDescription(),error_summary:m.getErrorSummary(),error_is_transient:m.isTransient()});};l.prototype.$VideoUploadReceiveRequestManager34=function(m){'use strict';this.$VideoUploadReceiveRequestManager16='handling failure error';this.inform('request-failed',m);this.$VideoUploadReceiveRequestManager23();};l.prototype.$VideoUploadReceiveRequestManager28=function(event){'use strict';this.$VideoUploadReceiveRequestManager17.notifyProgress(event);this.inform('request-progressed',{file_size:this.$VideoUploadReceiveRequestManager21.getFile().getSize(),start_offset:this.$VideoUploadReceiveRequestManager21.getStartOffset(),sent_bytes:event.loaded});};l.prototype.$VideoUploadReceiveRequestManager18=function(event){'use strict';this.inform('online');this.$VideoUploadReceiveRequestManager10=0;this.$VideoUploadReceiveRequestManager12=0;if(this.$VideoUploadReceiveRequestManager25)this.$VideoUploadReceiveRequestManager22();};l.prototype.$VideoUploadReceiveRequestManager19=function(event){'use strict';this.inform('offline');};l.prototype.$VideoUploadReceiveRequestManager32=function(m,n){'use strict';return Math.pow(m,n)*1000;};l.prototype.$VideoUploadReceiveRequestManager29=function(m,n){'use strict';var o;if(n>0){o=n;}else o=10;var p=Math.floor(m/o*this.$VideoUploadReceiveRequestManager6/100);return Math.max(p,30000);};f.exports=l;},null);
__d('VideoUploadStartRequestManager',['ArbiterMixin','VideoUploadRequest','FileHasher','performanceNow','mixin','Assert'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('mixin')(c('ArbiterMixin')));i=h&&h.prototype;function j(k,l,m,n,o,p,q){'use strict';i.constructor.call(this);this.$VideoUploadStartRequestManager1=k;this.$VideoUploadStartRequestManager2=l;this.$VideoUploadStartRequestManager3=m;this.$VideoUploadStartRequestManager4=0;this.$VideoUploadStartRequestManager5=n;this.$VideoUploadStartRequestManager6=o;this.$VideoUploadStartRequestManager7=p;this.$VideoUploadStartRequestManager8=q;this.$VideoUploadStartRequestManager9=0;}j.prototype.getRequest=function(){'use strict';return this.$VideoUploadStartRequestManager10;};j.prototype.sendRequest=function(k){'use strict';if(this.$VideoUploadStartRequestManager11||this.$VideoUploadStartRequestManager10)return;this.$VideoUploadStartRequestManager12=k;if(this.$VideoUploadStartRequestManager5&&this.$VideoUploadStartRequestManager12.getFile().getFile()&&this.$VideoUploadStartRequestManager12.getFile().getFile().size<this.$VideoUploadStartRequestManager6&&c('FileHasher').isSupported()){this.$VideoUploadStartRequestManager13=c('performanceNow')();this.$VideoUploadStartRequestManager11=new (c('FileHasher'))();this.$VideoUploadStartRequestManager11.hash(this.$VideoUploadStartRequestManager12.getFile().getFile(),function(l){this.$VideoUploadStartRequestManager13=c('performanceNow')()-this.$VideoUploadStartRequestManager13;this.$VideoUploadStartRequestManager14=l.hash;this.$VideoUploadStartRequestManager11.destroy();this.$VideoUploadStartRequestManager11=null;if(!l.hash)this.$VideoUploadStartRequestManager15=l.exception;this.$VideoUploadStartRequestManager16();}.bind(this));}else this.$VideoUploadStartRequestManager16();};j.prototype.$VideoUploadStartRequestManager16=function(){'use strict';this.$VideoUploadStartRequestManager17();this.inform('request-started',{hash_time:this.$VideoUploadStartRequestManager13,hash_exception:this.$VideoUploadStartRequestManager15});};j.prototype.$VideoUploadStartRequestManager17=function(){'use strict';clearTimeout(this.$VideoUploadStartRequestManager18);this.$VideoUploadStartRequestManager18=null;this.$VideoUploadStartRequestManager10=this.__getVideoUploadRequest(this.$VideoUploadStartRequestManager1).setAllowCrossOrigin(true).setData(this.__getDataToSend(this.$VideoUploadStartRequestManager12,this.$VideoUploadStartRequestManager14)).setWaterfallID(this.$VideoUploadStartRequestManager12.getWaterfallID()).setSuccessHandler(this.$VideoUploadStartRequestManager19.bind(this)).setErrorHandler(this.$VideoUploadStartRequestManager20.bind(this)).setTransportErrorHandler(this.$VideoUploadStartRequestManager21.bind(this));this.$VideoUploadStartRequestManager10.send();};j.prototype.__getVideoUploadRequest=function(k){'use strict';return new (c('VideoUploadRequest'))(k);};j.prototype.__getDataToSend=function(k,l){'use strict';return {file_size:k.getFile().getSize(),file_extension:k.getFile().getExtension(),target_id:k.getTargetID(),source:k.getSource(),waterfall_id:k.getWaterfallID(),composer_entry_point_ref:k.getComposerEntryPointRef&&k.getComposerEntryPointRef(),supports_chunking:k.getSupportsChunking(),supports_file_api:k.getSupportsFileAPI(),partition_start_offset:k.getPartitionStartOffset(),partition_end_offset:k.getPartitionEndOffset(),creator_product:k.getCreatorProduct(),original_file_hash:l};};j.prototype.cancelRequest=function(){'use strict';this.$VideoUploadStartRequestManager22();};j.prototype.$VideoUploadStartRequestManager23=function(k){'use strict';clearTimeout(this.$VideoUploadStartRequestManager18);this.$VideoUploadStartRequestManager18=setTimeout(this.$VideoUploadStartRequestManager17.bind(this),k);};j.prototype.$VideoUploadStartRequestManager22=function(){'use strict';if(this.$VideoUploadStartRequestManager11){this.$VideoUploadStartRequestManager11.destroy();this.$VideoUploadStartRequestManager11=null;}if(this.$VideoUploadStartRequestManager10){this.$VideoUploadStartRequestManager10.abort();this.$VideoUploadStartRequestManager10=null;}this.$VideoUploadStartRequestManager9=0;this.$VideoUploadStartRequestManager4=0;this.$VideoUploadStartRequestManager12=null;clearTimeout(this.$VideoUploadStartRequestManager18);this.$VideoUploadStartRequestManager18=null;};j.prototype.$VideoUploadStartRequestManager24=function(k,l){'use strict';return Math.pow(k,l)*1000;};j.prototype.$VideoUploadStartRequestManager19=function(k){'use strict';var l=k.getPayload();this.inform('request-finished',this.__getSuccessInformData(l));this.$VideoUploadStartRequestManager10=null;c('Assert').isTrue(this.$VideoUploadStartRequestManager11==null,'Unexpected: if file hasher is not null, clean up is required.');};j.prototype.__getSuccessInformData=function(k){'use strict';return {video_id:k.video_id,start_offset:k.start_offset,end_offset:k.end_offset,transport_retries:this.$VideoUploadStartRequestManager4,server_retries:this.$VideoUploadStartRequestManager9,skip_upload:k.skip_upload,hash_time:this.$VideoUploadStartRequestManager13};};j.prototype.$VideoUploadStartRequestManager25=function(k){'use strict';this.inform('request-failed',this.$VideoUploadStartRequestManager26(k));this.$VideoUploadStartRequestManager10=null;c('Assert').isTrue(this.$VideoUploadStartRequestManager11==null,'Unexpected: if file hasher is not null, clean up is required.');};j.prototype.$VideoUploadStartRequestManager20=function(k){'use strict';this.$VideoUploadStartRequestManager10=null;this.$VideoUploadStartRequestManager4=0;if(k.isTransient()&&this.$VideoUploadStartRequestManager9<this.$VideoUploadStartRequestManager7){this.$VideoUploadStartRequestManager9++;this.$VideoUploadStartRequestManager23(this.$VideoUploadStartRequestManager24(this.$VideoUploadStartRequestManager8,this.$VideoUploadStartRequestManager9));}else this.$VideoUploadStartRequestManager25(k);};j.prototype.$VideoUploadStartRequestManager21=function(k){'use strict';if(this.$VideoUploadStartRequestManager2===0||this.$VideoUploadStartRequestManager4>=this.$VideoUploadStartRequestManager2){this.$VideoUploadStartRequestManager25(k);}else{this.$VideoUploadStartRequestManager4++;this.$VideoUploadStartRequestManager10=null;this.$VideoUploadStartRequestManager23(this.$VideoUploadStartRequestManager24(this.$VideoUploadStartRequestManager3,this.$VideoUploadStartRequestManager4));}};j.prototype.$VideoUploadStartRequestManager26=function(k){'use strict';return {error_code:k.getError(),error_description:k.getErrorDescription(),error_summary:k.getErrorSummary(),transport_retries:this.$VideoUploadStartRequestManager4,server_retries:this.$VideoUploadStartRequestManager9,error_is_transient:k.isTransient()};};f.exports=j;},null);
__d('VideoUploadMetadataParser',['VideoUploadFeatureDetector','fileSlice'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=4,i=4,j=5242880,k=24,l=88,m=20,n=16,o=4,p=84,q=[255,204,130,99,248,85,74,147,136,20,88,122,2,82,31,221];function r(s,t){'use strict';this.$VideoUploadMetadataParser1=s;this.$VideoUploadMetadataParser2=t;}r.prototype.getHandler=function(){'use strict';return this.$VideoUploadMetadataParser2;};r.prototype.parse=function(){'use strict';if(!c('VideoUploadFeatureDetector').supportsFileReading()){this.$VideoUploadMetadataParser2(null);return;}switch(this.$VideoUploadMetadataParser1.getExtension()){case 'mp4':case 'mov':case 'm4v':case '3gp':case '3g2':break;default:this.$VideoUploadMetadataParser2(null);return;}this.$VideoUploadMetadataParser3(0,Math.min(j,this.$VideoUploadMetadataParser1.getSize()),null);};r.prototype.$VideoUploadMetadataParser3=function(s,t,u){'use strict';var v=new FileReader();v.onload=function(event){try{var y=this.$VideoUploadMetadataParser4(new DataView(v.result),0,t-s,s,u);if(y.completed){y=this.$VideoUploadMetadataParser5(y);this.$VideoUploadMetadataParser2(y);}else this.$VideoUploadMetadataParser3(s+y.nextOffset,Math.min(this.$VideoUploadMetadataParser1.getSize(),s+y.nextOffset+j),y);}catch(x){this.$VideoUploadMetadataParser2(null);}}.bind(this);var w=this.$VideoUploadMetadataParser1.getFile();v.readAsArrayBuffer(c('fileSlice').call(w,s,t));};r.prototype.$VideoUploadMetadataParser6=function(s,t,u){'use strict';var v=[];for(var w=0;w<u;w++)v.push(String.fromCharCode(s.getUint8(t+w)));return v.join('');};r.prototype.$VideoUploadMetadataParser7=function(s,t,u){'use strict';try{var w=i+h;if(w+q.length<u&&this.$VideoUploadMetadataParser8(s,t+w)){w+=q.length;if(w<u){var x=this.$VideoUploadMetadataParser6(s,t+w,u-w),y;if(window.DOMParser){var z=new DOMParser();y=z.parseFromString(x,'text/xml');}else{y=new window.ActiveXObject('Microsoft.XMLDOM');y.async='false';y.loadXML(x);}var aa=y.getElementsByTagNameNS('*','Spherical')[0].childNodes[0].nodeValue;return aa.toLowerCase()==='true';}}}catch(v){}return false;};r.prototype.$VideoUploadMetadataParser8=function(s,t){'use strict';for(var u=0;u<q.length;u++)if(s.getUint8(t+u)!==q[u])return false;return true;};r.prototype.$VideoUploadMetadataParser4=function(s,t,u,v,w){'use strict';if(!w)w={widths:[],heights:[],streamTypes:[],streamDurations:[],isSpherical:false};while(t<u){var x=s.getUint32(t),y=this.$VideoUploadMetadataParser6(s,t+h,i);if(t+x>u){w.completed=false;w.nextOffset=t;if(x>u)w.nextOffset+=x;return w;}if(t+v===0&&y!=='ftyp')throw new Error('No ftyp atom');if(x===0)throw new Error('len is 0');var z=function(){var da=s.getUint32(t+m),ea=s.getUint32(t+k);return ea/da;};switch(y){case 'moov':case 'trak':case 'mdia':t+=h+i;break;case 'mvhd':w.duration=z();t+=x;break;case 'tkhd':var aa=s.getUint16(t+p),ba=s.getUint16(t+l);w.widths.push(aa);w.heights.push(ba);t+=x;break;case 'hdlr':var ca=this.$VideoUploadMetadataParser6(s,t+n,o);switch(ca){case 'vide':ca='video';break;case 'soun':ca='audio';break;case 'subt':ca='subtitle';break;default:ca='data';}w.streamTypes.push(ca);t+=x;break;case 'mdhd':w.streamDurations.push(z());t+=x;break;case 'uuid':w.isSpherical=w.isSpherical||this.$VideoUploadMetadataParser7(s,t,x);t+=x;break;default:t+=x;}}w.completed=true;return w;};r.prototype.$VideoUploadMetadataParser5=function(s){'use strict';var t={streams:{},format:{}},u=s.widths.length,v=s.heights.length,w=s.streamTypes.length,x=s.streamDurations.length;if(u!==v||u!==w||u!==x)return null;for(var y=0;y<u;y++){var z={width:s.widths[y],height:s.heights[y],duration:s.streamDurations[y],type:s.streamTypes[y]};if(z.type==='video'){var aa=z.width*z.height,ba=t.streams.primaryVideo;if(!ba||ba.width*ba.height>aa)t.streams.primaryVideo=z;}else if(z.type==='audio'){var ca=t.streams.primaryAudio;if(!ca||ca.duration<z.duration)t.streams.primaryAudio=z;}}t.format.duration=s.duration;t.format.isSpherical=s.isSpherical;return t;};f.exports=r;},null);
__d('VideoUploadSession',['ArbiterMixin','AsyncRequest','VideoUploadCrashMonitor','VideoUploadFeatureDetector','VideoUploadFileValidator','VideoUploadLogger','VideoUploadMetadataParser','VideoUploadPostRequestManager','VideoUploadReceiveRequestManager','VideoUploadRequestContext','VideoUploadStartRequestManager','WaterfallIDGenerator','mixin'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('mixin')(c('ArbiterMixin')));i=h&&h.prototype;function j(k){'use strict';i.constructor.call(this);this.$VideoUploadSession1=k.source;this.$VideoUploadSession2=k.target_id;this.$VideoUploadSession3=k.logging_delay;this.$VideoUploadSession4=k.silent_file_validation;this.$VideoUploadSession5=k.background_upload;this.$VideoUploadSession6=k.actor_id;this.$VideoUploadSession7=k.composer_entry_point_ref;this.$VideoUploadSession8=k.monitor_crashes;this.$VideoUploadSession9=new (c('VideoUploadFileValidator'))({minSize:k.min_size,maxSize:k.max_size,minLength:k.min_length,maxLength:k.max_length,minWidth:k.min_width,minHeight:k.min_height,extensions:k.extensions});this.$VideoUploadSession10=c('VideoUploadFeatureDetector').supportsChunking();this.$VideoUploadSession11=c('VideoUploadFeatureDetector').supportsFileAPI();if(this.$VideoUploadSession10){this.$VideoUploadSession12=k.parallel_chunk_uploads;if(this.$VideoUploadSession12){this.$VideoUploadSession13=k.parallel_chunk_upload_filesize;this.$VideoUploadSession14=k.default_chunk_size;}}else this.$VideoUploadSession12=false;this.$VideoUploadSession15=this.$VideoUploadSession16(k);this.$VideoUploadSession17=this.$VideoUploadSession18(k);if(this.$VideoUploadSession12)this.$VideoUploadSession19=this.$VideoUploadSession18(k);this.$VideoUploadSession20=this.$VideoUploadSession21(k);}j.prototype.$VideoUploadSession22=function(){'use strict';this.$VideoUploadSession23=c('WaterfallIDGenerator').generate();this.$VideoUploadSession24=new (c('VideoUploadLogger'))({actor_id:this.$VideoUploadSession6,source:this.$VideoUploadSession1,waterfall_id:this.$VideoUploadSession23,target_id:this.$VideoUploadSession2,delay:this.$VideoUploadSession3,is_chunked_upload:this.$VideoUploadSession10,composer_entry_point_ref:this.$VideoUploadSession7});};j.prototype.getLogger=function(){'use strict';if(!this.$VideoUploadSession24)return null;return this.$VideoUploadSession24;};j.prototype.start=function(k){'use strict';this.$VideoUploadSession25=null;this.$VideoUploadSession26=false;this.$VideoUploadSession27=false;this.$VideoUploadSession28=k;this.$VideoUploadSession29=0;this.$VideoUploadSession30=false;this.$VideoUploadSession22();this.__logEvent(c('VideoUploadLogger').EVENT_REQUESTED_UPLOADING);this.inform('upload-requested');var l=new (c('VideoUploadMetadataParser'))(this.$VideoUploadSession28,this.$VideoUploadSession31.bind(this));l.parse();};j.prototype.post=function(k){'use strict';this.__logEvent(c('VideoUploadLogger').EVENT_STARTED_POST_REQUEST);this.inform('post-started',k);var l=this.__createPostRequestContext(k);this.$VideoUploadSession20.sendRequest(l);this.$VideoUploadSession32=k;};j.prototype.__createPostRequestContext=function(k){'use strict';var l=new (c('VideoUploadRequestContext'))();this.__setupPostRequestContext(l,k);return l;};j.prototype.__setupPostRequestContext=function(k,l){'use strict';k.setMetadata(l).setVideoID(this.$VideoUploadSession25).setTargetID(this.$VideoUploadSession2).setSource(this.$VideoUploadSession1).setWaterfallID(this.$VideoUploadSession23).setSupportsChunking(this.$VideoUploadSession10).setCreatorProduct(this.$VideoUploadSession28.getCreatorProduct()).setFile(this.$VideoUploadSession28);if(k.setComposerEntryPointRef)k.setComposerEntryPointRef(this.$VideoUploadSession7);};j.prototype.cancel=function(){'use strict';if(!this.$VideoUploadSession26)return;var k=this.__fetchReceiveRequestManagerStateLogData();this.$VideoUploadSession33();if(this.$VideoUploadSession5){if(!this.$VideoUploadSession27)this.__logEvent(c('VideoUploadLogger').EVENT_CANCELED_UPLOADING);if(this.$VideoUploadSession34){this.__logEvent(c('VideoUploadLogger').EVENT_CANCELED_FLOW,k);this.$VideoUploadSession34=false;}}else{this.__logEvent(c('VideoUploadLogger').EVENT_CANCELED_UPLOADING);this.__logEvent(c('VideoUploadLogger').EVENT_CANCELED_FLOW,k);}};j.prototype.abandon=function(){'use strict';if(!this.$VideoUploadSession26)return;var k=this.__fetchReceiveRequestManagerStateLogData();this.$VideoUploadSession33();if(this.$VideoUploadSession5){if(!this.$VideoUploadSession27)this.__logEvent(c('VideoUploadLogger').EVENT_ABANDONED_UPLOADING);if(this.$VideoUploadSession34){this.__logEvent(c('VideoUploadLogger').EVENT_CANCELED_FLOW,k);this.$VideoUploadSession34=false;}}else{this.__logEvent(c('VideoUploadLogger').EVENT_ABANDONED_UPLOADING);this.__logEvent(c('VideoUploadLogger').EVENT_CANCELED_FLOW,k);}};j.prototype.isPostInProgress=function(){'use strict';return this.$VideoUploadSession20.isInProgress();};j.prototype.isInProgress=function(){'use strict';return this.$VideoUploadSession26;};j.prototype.getVideoID=function(){'use strict';return this.$VideoUploadSession25;};j.prototype.getUploadTime=function(){'use strict';return this.$VideoUploadSession35;};j.prototype.startFlow=function(){'use strict';if(!this.$VideoUploadSession5||this.$VideoUploadSession34)return;this.__logEvent(c('VideoUploadLogger').EVENT_STARTED_FLOW,{is_spherical:this.$VideoUploadSession30?'true':null});this.$VideoUploadSession34=true;if(this.$VideoUploadSession36)this.$VideoUploadSession36.flowStarted();};j.prototype.$VideoUploadSession31=function(k){'use strict';var l,m;if(this.$VideoUploadSession4){var n=this.$VideoUploadSession9.getValidationErrorMessage(this.$VideoUploadSession28,k);if(n){m={error_summary:n.summary,error_description:n.description};l=false;}else l=true;}else l=this.$VideoUploadSession9.validate(this.$VideoUploadSession28,k);if(!l){this.__logEvent(c('VideoUploadLogger').EVENT_INVALIDATED_UPLOADING);this.inform('upload-failed',m);return;}if(k&&k.format)this.$VideoUploadSession30=k.format.isSpherical;if(!this.$VideoUploadSession5)this.__logEvent(c('VideoUploadLogger').EVENT_STARTED_FLOW,{is_spherical:this.$VideoUploadSession30?'true':null});this.$VideoUploadSession37=this.$VideoUploadSession12&&this.$VideoUploadSession28.getSize()>=this.$VideoUploadSession13;this.$VideoUploadSession38=false;this.$VideoUploadSession39=false;this.$VideoUploadSession40=0;this.$VideoUploadSession41=this.$VideoUploadSession40;this.$VideoUploadSession42=0;if(this.$VideoUploadSession37){this.$VideoUploadSession43=Math.floor(this.$VideoUploadSession28.getSize()/2);this.$VideoUploadSession44=this.$VideoUploadSession43;this.$VideoUploadSession45=this.$VideoUploadSession44;this.$VideoUploadSession46=0;this.$VideoUploadSession47=this.$VideoUploadSession28.getSize();}else this.$VideoUploadSession43=this.$VideoUploadSession28.getSize();var o=new (c('VideoUploadRequestContext'))().setFile(this.$VideoUploadSession28).setTargetID(this.$VideoUploadSession2).setSource(this.$VideoUploadSession1).setWaterfallID(this.$VideoUploadSession23).setSupportsChunking(this.$VideoUploadSession10).setSupportsFileAPI(this.$VideoUploadSession11).setCreatorProduct(this.$VideoUploadSession28.getCreatorProduct()).setPartitionStartOffset(this.$VideoUploadSession40).setPartitionEndOffset(this.$VideoUploadSession43);if(o.setComposerEntryPointRef)o.setComposerEntryPointRef(this.$VideoUploadSession7);this.$VideoUploadSession48();this.$VideoUploadSession15.sendRequest(o);this.inform('metadata-parsed',k);};j.prototype.$VideoUploadSession16=function(k){'use strict';var l=this.$VideoUploadSession10?k.chunk_start_uri:k.start_uri,m=this.__getVideoUploadStartRequestManager(l,k.start_max_transport_retries,k.start_transport_retry_interval_base,k.skip_upload_enabled,k.skip_upload_file_size_limit,k.start_max_server_retries,k.start_server_retry_interval_base);m.subscribe('request-started',this.$VideoUploadSession49.bind(this));m.subscribe('request-finished',this.$VideoUploadSession50.bind(this));m.subscribe('request-failed',this.$VideoUploadSession51.bind(this));return m;};j.prototype.$VideoUploadSession18=function(k){'use strict';var l=this.$VideoUploadSession10?k.chunk_receive_uri:k.receive_uri,m=this.__getVideoUploadReceiveRequestManager(l,k);m.subscribe('request-started',this.$VideoUploadSession52.bind(this));m.subscribe('request-progressed',this.$VideoUploadSession53.bind(this));m.subscribe('request-finished',this.$VideoUploadSession54.bind(this));m.subscribe('request-failed',this.$VideoUploadSession55.bind(this));m.subscribe('request-timeout',this.$VideoUploadSession56.bind(this));m.subscribe('online',this.$VideoUploadSession57.bind(this));m.subscribe('offline',this.$VideoUploadSession58.bind(this));return m;};j.prototype.$VideoUploadSession21=function(k){'use strict';var l=this.$VideoUploadSession10?k.chunk_post_uri:k.post_uri,m=this.__getVideoUploadPostRequestManager(l,k);m.subscribe('request-finished',this.__handlePostRequestFinished.bind(this));m.subscribe('request-failed',this.$VideoUploadSession59.bind(this));return m;};j.prototype.$VideoUploadSession49=function(event,k){'use strict';this.__logEvent(c('VideoUploadLogger').EVENT_STARTED_UPLOADING,{hash_time:k.hash_time,hash_exception:k.hash_exception});this.__logEvent(c('VideoUploadLogger').EVENT_STARTED_START_REQUEST);this.$VideoUploadSession60=Date.now();this.inform('upload-started');};j.prototype.$VideoUploadSession50=function(event,k){'use strict';this.__logEvent(c('VideoUploadLogger').EVENT_PROGRESS_UPLOADING_START_REQUEST,{transport_retries:k.transport_retries,hash_time:k.hash_time,skip_upload:k.skip_upload?1:null});this.__logEvent(c('VideoUploadLogger').EVENT_FINISHED_START_REQUEST);this.$VideoUploadSession25=k.video_id;this.$VideoUploadSession61=k.skip_upload;if(!k.skip_upload){var l;l=this.__createReceiveRequestContext(k,false);this.$VideoUploadSession17.sendRequest(l);if(this.$VideoUploadSession37){l=this.__createReceiveRequestContext(k,true);this.$VideoUploadSession19.sendRequest(l);}}else{this.inform('upload-progressed',{start_offset:0,end_offset:this.$VideoUploadSession28.getSize(),file_size:this.$VideoUploadSession28.getSize(),sent_bytes:this.$VideoUploadSession28.getSize(),video_id:k.video_id});if(this.$VideoUploadSession5)this.__logFinishedUploading();this.inform('upload-finished',{start_offset:0,end_offset:this.$VideoUploadSession28.getSize(),video_id:k.video_id});}};j.prototype.__fetchReceiveRequestManagerStateLogData=function(){'use strict';var k={};if(this.$VideoUploadSession17!=null)this.$VideoUploadSession17.appendStateLogData(k,'requestManager_');if(this.$VideoUploadSession19!=null)this.$VideoUploadSession19.appendStateLogData(k,'requestManagerEx_');return k;};j.prototype.__createReceiveRequestContext=function(k,l){'use strict';if(!l)l=false;var m=new (c('VideoUploadRequestContext'))();this.__setupReceiveRequestContext(m,k,l);return m;};j.prototype.__setupReceiveRequestContext=function(k,l,m){'use strict';var n,o,p,q;if(!m){n=this.$VideoUploadSession40;o=this.$VideoUploadSession43;p=l.start_offset;q=l.end_offset;}else{n=this.$VideoUploadSession44;o=this.$VideoUploadSession47;p=this.$VideoUploadSession44;q=this.$VideoUploadSession44+this.$VideoUploadSession14>=this.$VideoUploadSession47?this.$VideoUploadSession47:this.$VideoUploadSession44+this.$VideoUploadSession14;}k.setFile(this.$VideoUploadSession28).setVideoID(l.video_id).setStartOffset(p).setEndOffset(q).setPartitionStartOffset(n).setPartitionEndOffset(o).setTargetID(this.$VideoUploadSession2).setSource(this.$VideoUploadSession1).setWaterfallID(this.$VideoUploadSession23).setSupportsChunking(this.$VideoUploadSession10);if(k.setComposerEntryPointRef)k.setComposerEntryPointRef(this.$VideoUploadSession7);};j.prototype.$VideoUploadSession51=function(event,k){'use strict';var l=this.__getLogErrorData(k);this.__logEvent(c('VideoUploadLogger').EVENT_FAILED_START_REQUEST,l);this.__logEvent(c('VideoUploadLogger').EVENT_FAILED_UPLOADING,l);var m=k.error_is_transient?c('VideoUploadLogger').EVENT_RESIGNED_FLOW:c('VideoUploadLogger').EVENT_FAILED_FLOW;if(this.$VideoUploadSession5){if(this.$VideoUploadSession34){this.__logEvent(m);this.$VideoUploadSession34=false;}}else this.__logEvent(m);this.$VideoUploadSession62();this.inform('upload-failed',k);};j.prototype.$VideoUploadSession52=function(event,k){'use strict';if(!k.start_offset&&!k.transport_retries&&!k.server_retries)this.__logEvent(c('VideoUploadLogger').EVENT_STARTED_SENDING_BYTES,{total_bytes:this.$VideoUploadSession28.getSize()});if(this.$VideoUploadSession10)this.__logEvent(c('VideoUploadLogger').EVENT_STARTED_SENDING_CHUNK_BYTES,{start_offset:k.start_offset,total_bytes:k.end_offset-k.start_offset,transport_retries:k.transport_retries,server_retries:k.server_retries,upload_speed:k.upload_speed});};j.prototype.$VideoUploadSession53=function(event,k){'use strict';if(k.start_offset<this.$VideoUploadSession43){this.$VideoUploadSession41=k.start_offset;this.$VideoUploadSession42=k.sent_bytes;}else{this.$VideoUploadSession45=k.start_offset;this.$VideoUploadSession46=k.sent_bytes;}k.start_offset=this.$VideoUploadSession41;k.sent_bytes=this.$VideoUploadSession42;if(this.$VideoUploadSession37){k.start_offset+=this.$VideoUploadSession45-this.$VideoUploadSession44;k.sent_bytes+=this.$VideoUploadSession46;}var l=Math.min(k.start_offset+k.sent_bytes,k.file_size);if(l>this.$VideoUploadSession29){this.$VideoUploadSession29=l;this.inform('upload-progressed',k);}};j.prototype.$VideoUploadSession54=function(event,k){'use strict';if(this.$VideoUploadSession10)this.__logEvent(c('VideoUploadLogger').EVENT_FINISHED_SENDING_CHUNK_BYTES,{start_offset:k.start_offset,sent_bytes:k.end_offset-k.start_offset,transport_retries:k.transport_retries,server_retries:k.server_retries,upload_speed:k.upload_speed});if(k.start_offset<this.$VideoUploadSession43){this.$VideoUploadSession38=k.end_offset>=this.$VideoUploadSession43;}else this.$VideoUploadSession39=k.end_offset>=this.$VideoUploadSession47;if(!this.$VideoUploadSession11||this.$VideoUploadSession38&&(!this.$VideoUploadSession37||this.$VideoUploadSession39)){this.__logEvent(c('VideoUploadLogger').EVENT_FINISHED_SENDING_BYTES,{sent_bytes:this.$VideoUploadSession28.getSize()});this.$VideoUploadSession35=Date.now()-this.$VideoUploadSession60;if(this.$VideoUploadSession5)this.__logFinishedUploading();k.video_id=this.$VideoUploadSession25;this.inform('upload-finished',k);}};j.prototype.$VideoUploadSession55=function(event,k){'use strict';var l=this.__getLogErrorData(k);if(this.$VideoUploadSession10)this.__logEvent(c('VideoUploadLogger').EVENT_FAILED_SENDING_CHUNK_BYTES,l);this.__logEvent(c('VideoUploadLogger').EVENT_FAILED_UPLOADING,l);var m=k.error_is_transient?c('VideoUploadLogger').EVENT_RESIGNED_FLOW:c('VideoUploadLogger').EVENT_FAILED_FLOW;if(this.$VideoUploadSession5){if(this.$VideoUploadSession34){this.__logEvent(m);this.$VideoUploadSession34=false;}}else this.__logEvent(m);this.$VideoUploadSession62();this.inform('upload-failed',k);};j.prototype.$VideoUploadSession56=function(event,k){'use strict';this.__logEvent(c('VideoUploadLogger').EVENT_TIMEOUT_SENDING_CHUNK_BYTES,{start_offset:k.start_offset,sent_bytes:k.end_offset-k.start_offset,transport_retries:k.transport_retries,server_retries:k.server_retries,timeout_retries:k.timeout_retries,upload_speed:k.upload_speed});};j.prototype.$VideoUploadSession57=function(event,k){'use strict';this.inform('online',k);};j.prototype.$VideoUploadSession58=function(event,k){'use strict';this.inform('offline',k);};j.prototype.__handlePostRequestFinished=function(event,k){'use strict';this.__logEvent(c('VideoUploadLogger').EVENT_FINISHED_POST_REQUEST);if(!k.video_id)k.video_id=this.$VideoUploadSession25;if(!this.$VideoUploadSession5)this.__logFinishedUploading();this.__logEvent(c('VideoUploadLogger').EVENT_FINISHED_FLOW);this.$VideoUploadSession34=false;this.$VideoUploadSession62();var l=babelHelpers['extends']({},k,this.$VideoUploadSession32);this.inform('post-finished',l);};j.prototype.__logFinishedUploading=function(){'use strict';this.__logEvent(c('VideoUploadLogger').EVENT_FINISHED_UPLOADING,{elapsed_time:this.$VideoUploadSession35,skip_upload:this.$VideoUploadSession61?1:null});this.$VideoUploadSession27=true;};j.prototype.$VideoUploadSession59=function(event,k){'use strict';var l=this.__getLogErrorData(k);this.__logEvent(c('VideoUploadLogger').EVENT_FAILED_POST_REQUEST,l);if(this.$VideoUploadSession26){this.__logEvent(c('VideoUploadLogger').EVENT_FAILED_UPLOADING,l);var m=k.error_is_transient?c('VideoUploadLogger').EVENT_RESIGNED_FLOW:c('VideoUploadLogger').EVENT_FAILED_FLOW;this.__logEvent(m);}this.$VideoUploadSession62();this.inform('post-failed',k);};j.prototype.$VideoUploadSession33=function(){'use strict';this.$VideoUploadSession15.cancelRequest();this.$VideoUploadSession17.cancelRequest();if(this.$VideoUploadSession37)this.$VideoUploadSession19.cancelRequest();this.$VideoUploadSession62();if(this.$VideoUploadSession25){new (c('AsyncRequest'))('/ajax/video/actions/delete').setData({fbid:this.$VideoUploadSession25,redirect:false}).send();this.$VideoUploadSession25=null;}};j.prototype.$VideoUploadSession48=function(){'use strict';this.$VideoUploadSession26=true;if(this.$VideoUploadSession8){this.$VideoUploadSession36=new (c('VideoUploadCrashMonitor'))(this.$VideoUploadSession23,this.$VideoUploadSession6,this.$VideoUploadSession1,this.$VideoUploadSession2,this.$VideoUploadSession3,this.$VideoUploadSession10,this.$VideoUploadSession7,!this.$VideoUploadSession5||this.$VideoUploadSession34);this.$VideoUploadSession36.startSession();}};j.prototype.$VideoUploadSession62=function(){'use strict';this.$VideoUploadSession26=false;if(this.$VideoUploadSession36){this.$VideoUploadSession36.endSession();this.$VideoUploadSession36=null;}};j.prototype.__getLogErrorData=function(k){'use strict';return {error:k.error_summary,error_code:k.error_code,error_description:k.error_description,transport_retries:k.transport_retries,server_retries:k.server_retries};};j.prototype.__logEvent=function(event,k){'use strict';var l=this.getLogger();k=k||{};if(this.$VideoUploadSession28){k.file_size=this.$VideoUploadSession28.getSize();k.file_extension=this.$VideoUploadSession28.getExtension();k.sent_bytes=this.$VideoUploadSession29;}l.logEvent(event,k);};j.prototype.__getVideoUploadStartRequestManager=function(k,l,m,n,o,p,q){'use strict';return new (c('VideoUploadStartRequestManager'))(k,l,m,n,o,p,q);};j.prototype.__getVideoUploadReceiveRequestManager=function(k,l){'use strict';return new (c('VideoUploadReceiveRequestManager'))(k,l.max_transport_retries,l.max_server_retries,l.response_timeout_enabled,l.max_response_timeout_retries,l.response_timeout_speed_variation_factor_ppt,l.transport_retry_interval_base,l.server_retry_interval_base,l.receive_errors_force_retry);};j.prototype.__getVideoUploadPostRequestManager=function(k,l){'use strict';return new (c('VideoUploadPostRequestManager'))(k,l.post_max_transport_retries,l.post_transport_retry_interval_base,l.post_max_server_retries,l.post_server_retry_interval_base);};f.exports=j;},null);
__d('VideoUploader',['ArbiterMixin','VideoUploadCrashMonitor','VideoUploadLogger','VideoUploadSession','arrayContains','mixin'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('mixin')(c('ArbiterMixin')));i=h&&h.prototype;function j(k){'use strict';i.constructor.call(this);this.$VideoUploader1=k;this.$VideoUploader2=null;if(k.monitor_crashes){this.$VideoUploader3=new (c('VideoUploadCrashMonitor'))();this.$VideoUploader3.logKnownCrashes();}}j.prototype.getLogger=function(){'use strict';if(!this.$VideoUploader2)return;if(this.$VideoUploader2.getLogger)return this.$VideoUploader2.getLogger();};j.prototype.upload=function(k){'use strict';if(this.$VideoUploader2)return;this.$VideoUploader2=this.__getVideoUploadSession(this.$VideoUploader1);this.$VideoUploader2.subscribe(this.__getEventsWhichShouldListenFromSession(),function(event,l){return this.$VideoUploader4(event,l);}.bind(this));this.$VideoUploader2.start(k);};j.prototype.__getVideoUploadSession=function(k){'use strict';return new (c('VideoUploadSession'))(k);};j.prototype.__getEventsWhichShouldListenFromSession=function(){'use strict';return ['upload-requested','upload-started','upload-progressed','upload-finished','upload-failed','post-started','post-finished','post-failed','online','offline','metadata-parsed'];};j.prototype.postUserRequest=function(){'use strict';if(!this.$VideoUploader2)return;if(this.$VideoUploader2.startFlow)this.$VideoUploader2.startFlow();};j.prototype.post=function(k){'use strict';if(!this.$VideoUploader2)return;this.$VideoUploader2.post(k);};j.prototype.getVideoID=function(){'use strict';return this.$VideoUploader2.getVideoID();};j.prototype.cancel=function(){'use strict';if(!this.$VideoUploader2)return;this.$VideoUploader2.cancel();this.$VideoUploader2=null;};j.prototype.abandon=function(){'use strict';if(!this.$VideoUploader2)return;this.$VideoUploader2.abandon();this.$VideoUploader2=null;};j.prototype.reset=function(){'use strict';this.$VideoUploader2=null;};j.prototype.getUploadSession=function(){'use strict';return this.$VideoUploader2;};j.prototype.getLoggerData=function(){'use strict';return {waterfall_id:this.$VideoUploader2?this.$VideoUploader2.$VideoUploader5:null,actor_id:this.$VideoUploader1.actor_id,target_id:this.$VideoUploader1.target_id,target_type:this.$VideoUploader1.target_type,composer_entry_point_ref:this.$VideoUploader1.composer_entry_point_ref};};j.prototype.isPostInProgress=function(){'use strict';return !!this.$VideoUploader2&&this.$VideoUploader2.isPostInProgress();};j.prototype.isSessionInProgress=function(){'use strict';return !!this.$VideoUploader2&&this.$VideoUploader2.isInProgress();};j.prototype.getUploadParameters=function(){'use strict';return this.$VideoUploader1;};j.prototype.__getSession=function(){'use strict';return this.$VideoUploader2;};j.prototype.__getEventsForWhichSessionShouldBeSetToNull=function(){'use strict';return ['upload-failed','post-finished'];};j.prototype.$VideoUploader4=function(event,k){'use strict';if(c('arrayContains')(this.__getEventsForWhichSessionShouldBeSetToNull(),event))this.$VideoUploader2=null;this.__delegateEvent(event,k);};j.prototype.__delegateEvent=function(event,k){'use strict';this.inform(event,k);};f.exports=j;},null);