File Manager
Viewing File: otj1HB9MJcl.js
if (self.CavalryLogger) { CavalryLogger.start_js(["mKk4I"]); }
__d('Recaptcha',['fbt','AsyncRequest','Bootloader','CaptchaClientConfig','CSS','CurrentLocale','DOM','Event','Keys','ge'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i,j={tabindex:0,callback:null},k={en_US:'en',en_GB:'en',en_PI:'en',nl_NL:'nl',nl_BE:'nl',fr_FR:'fr',fr_CA:'fr',de_DE:'de',es_LA:'es',es_ES:'es',es_CL:'es',es_CO:'es',es_MX:'es',es_VE:'es',ru_RU:'ru',tr_TR:'tr'},l=false,m={widget:null,timer_id:-1,fail_timer_id:-1,type:'image',ajax_verify_cb:null,audio_only:false,$:function n(o){if(typeof o=="string"){return document.getElementById(o);}else return o;},setFocusOnLoad:function n(o){l=o;},create:function n(o,p){m.destroy();if(o)m.widget=m.$(o);m._init_options(p);m._call_challenge(c('CaptchaClientConfig').recaptchaPublicKey);},destroy:function n(){var o=m.$('recaptcha_challenge_field');if(o)o.parentNode.removeChild(o);if(m.timer_id!=-1)clearInterval(m.timer_id);m.timer_id=-1;var p=m.$('recaptcha_image');if(p)p.innerHTML="";if(m.widget){m.widget.style.display="none";m.widget=null;}},focus_response_field:function n(){var o=m.$,p=o('captcha_response');try{p.focus();}catch(q){}},get_challenge:function n(){if(typeof b.RecaptchaState=="undefined")return null;return b.RecaptchaState.challenge;},get_response:function n(){var o=m.$,p=o('captcha_response');if(!p)return null;return p.value;},ajax_verify:function n(o){m.ajax_verify_cb=o;var p=m._get_api_server()+"/ajaxverify"+"?c="+encodeURIComponent(m.get_challenge())+"&response="+encodeURIComponent(m.get_response());m._add_script(p);},_ajax_verify_callback:function n(o){m.ajax_verify_cb(o);},_get_api_server:function n(){var o=window.location.protocol,p;if(typeof b._RecaptchaOverrideApiServer!="undefined"){p=b._RecaptchaOverrideApiServer;}else p="www.google.com";return o+"//"+p;},_call_challenge:function n(o){if(!m.audio_only)m.fail_timer_id=setTimeout(function(){if(m.fail_timer_id==-1)m.logAction('timeout');m.createCaptcha();},15000);var p=m._get_api_server()+"/recaptcha/api/challenge?k="+o+"&ajax=1&xcachestop="+Math.random();if(c('ge')('extra_challenge_params')!=null)p+="&"+c('ge')('extra_challenge_params').value;m._add_script(p);},_add_script:function n(o){c('Bootloader').requestJSResource(o);},_init_options:function n(o){var p=j,q=o||{};for(var r in q)p[r]=q[r];i=p;},challenge_callback:function n(){if(!m.audio_only){clearTimeout(m.fail_timer_id);m._reset_timer();}if(window.addEventListener)window.addEventListener('unload',function(q){m.destroy();},false);if(m._is_ie()&&window.attachEvent)window.attachEvent('onbeforeunload',function(){});if(navigator.userAgent.indexOf("KHTML")>0){var o=document.createElement('iframe');o.src="about:blank";o.style.height="0px";o.style.width="0px";o.style.visibility="hidden";o.style.border="none";var p=document.createTextNode("This frame prevents back/forward cache problems in Safari.");o.appendChild(p);document.body.appendChild(o);}m._finish_widget();if(m.audio_only)m.switch_type('audio');m.logAction('shown');},_finish_widget:function n(){var o=m.$,p=b.RecaptchaState,q=i,r=document.createElement("input");r.type="password";r.setAttribute("autocomplete","off");r.style.display="none";r.name="recaptcha_challenge_field";r.id="recaptcha_challenge_field";o('captcha_response').parentNode.insertBefore(r,o('captcha_response'));o('captcha_response').setAttribute("autocomplete","off");o('recaptcha_image').style.width='300px';o('recaptcha_image').style.height='57px';m.should_focus=false;if(!m.audio_only){m._set_challenge(p.challenge,'image');}else m._set_challenge(p.challenge,'audio');if(q.tabindex)o('captcha_response').tabIndex=q.tabindex;if(m.widget)m.widget.style.display='';if(q.callback)q.callback();o('recaptcha_loading').style.display="none";},switch_type:function n(o){var p=m;p.type=o;p.$('recaptcha_type').value=o;p.reload(p.type=='audio'?'a':'v');},reload:function n(o){var p=m,q=p.$,r=b.RecaptchaState;if(typeof o=="undefined")o='r';var s=r.server+"reload?c="+r.challenge+"&k="+r.site+"&reason="+o+"&type="+p.type+"&lang="+m.getLang();if(c('ge')('extra_challenge_params')!=null)s+="&"+c('ge')('extra_challenge_params').value;p.should_focus=o!='t';p._add_script(s);},finish_reload:function n(o,p){b.RecaptchaState.is_incorrect=false;m._set_challenge(o,p);},_set_challenge:function n(o,p){var q=m,r=b.RecaptchaState,s=q.$;r.challenge=o;q.type=p;s('recaptcha_challenge_field').value=r.challenge;s('recaptcha_challenge_field').defaultValue=r.challenge;s('recaptcha_image').innerHtml="";if(p=='audio'){c('DOM').setContent(document.getElementById('recaptcha_image'),m.setAudioCaptchaControls());c('DOM').setAttributes(document.getElementById('captcha_response'),{'aria-label':h._("Audio Captcha input. Press the play audio captcha button above to start the audio. Enter the numbers you hear into this input and then submit the form to proceed.")});}else if(p=='image'){var t=r.server+'image?c='+r.challenge;s('recaptcha_image').innerHTML="<img style='display:block;' height='57' width='300' src='"+t+"'/>";c('DOM').setAttributes(document.getElementById('captcha_response'),{'aria-label':h._("Captcha input. Type the words listed above to continue. Additionally you may also try the audio captcha by clicking the link above.")});}m._css_toggle("recaptcha_had_incorrect_sol","recaptcha_nothad_incorrect_sol",r.is_incorrect);m._css_toggle("recaptcha_is_showing_audio","recaptcha_isnot_showing_audio",p=='audio');if(q.should_focus)q.focus_response_field();q._reset_timer();},_reset_timer:function n(){var o=b.RecaptchaState;clearInterval(m.timer_id);m.timer_id=setInterval(function(){return m.reload('t');},(o.timeout-60*5)*1000);},_clear_input:function n(){var o=m.$('captcha_response');o.value="";},_displayerror:function n(o){var p=m.$;c('DOM').empty('recaptcha_image');p('recaptcha_image').appendChild(document.createTextNode(o));},reloaderror:function n(o){m._displayerror(o);},_is_ie:function n(){return navigator.userAgent.indexOf("MSIE")>0&&!window.opera;},_css_toggle:function n(o,p,q){var r=m.widget;if(!r)r=document.body;var s=r.className;s=s.replace(new RegExp("(^|\\s+)"+o+"(\\s+|$)"),' ');s=s.replace(new RegExp("(^|\\s+)"+p+"(\\s+|$)"),' ');s+=" "+(q?o:p);c('CSS').setClass(r,s);},handlePlayPress:function n(event){var o=c('Event').getKeyCode(event);if(o===c('Keys').RETURN||o===c('Keys').SPACE){c('Event').prevent(event);this.playAgain();}},handlePlayClick:function n(event){c('Event').prevent(event);this.playAgain();},playAgain:function n(){c('DOM').setContent(document.getElementById('recaptcha_audio_container'),m.getAudioCaptchaHtml());},setAudioCaptchaControls:function n(){var o=b.RecaptchaState,p=o.server+'image?c='+o.challenge;if(p.indexOf('https://')==0)p='http://'+p.substring(8);var q=c('DOM').create('div'),r=c('DOM').create('a',{href:'#','class':'recaptcha_audio_cant_hear_link recaptcha_text',role:'button',tabindex:'0',onclick:this.handlePlayClick.bind(this),onkeyup:this.handlePlayPress.bind(this)},h._("Play Audio Captcha")),s=c('DOM').create('a',{'class':'recaptcha_audio_cant_hear_link recaptcha_text',target:'_blank',href:p},h._("Open the audio file in a new window")),t=c('DOM').create('div',{id:'recaptcha_audio_container'});c('DOM').appendContent(q,s);if(m.checkFlashVer())c('DOM').appendContent(q,r);c('DOM').appendContent(q,t);return q;},getAudioCaptchaHtml:function n(){var o=m,p=b.RecaptchaState,q=p.server+'image?c='+p.challenge;if(q.indexOf('https://')==0)q='http://'+q.substring(8);var r=p.server+'/img/audiocaptcha.swf?v2',s;if(o._is_ie()){s=c('DOM').create('object',{classid:'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',id:'audiocaptcha',width:'0',height:'0',codebase:'https://fpdownload.macromedia.com/get/flashplayer/current/'+'swflash.cab'});var t=[{name:'movie',value:r},{name:'quality',value:'high'},{name:'bgcolor',value:'869ca7'},{name:'allowScriptAccess',value:'always'}];t.forEach(function(u){c('DOM').appendContent(c('DOM').create('param',u));});}else s=c('DOM').create('embed',{src:r,url:r,quality:'high',bgcolor:'#869ca7',width:'0',height:'0',name:'audiocaptcha',align:'middle',play:'true',loop:'false',allowScriptAccess:'always',type:'application/x-shockwave-flash',pluginspage:'http://get.adobe.com/flashplayer'});return s;},gethttpwavurl:function n(){var o=b.RecaptchaState;if(m.type=='audio'){var p=o.server+"image?c="+o.challenge;if(p.indexOf("https://")==0)p="http://"+p.substring(8);return p;}return "";},checkFlashVer:function n(){var o=navigator.appVersion.indexOf("MSIE")!=-1?true:false,p=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false,q=navigator.userAgent.indexOf("Opera")!=-1?true:false,r=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var s=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"",t=navigator.plugins["Shockwave Flash"+s].description,u=t.split(" "),v=u[2].split(".");r=v[0];}}else if(o&&p&&!q)try{var x=new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash.7'),y=x.GetVariable("$version");r=y.split(" ")[1].split(",")[0];}catch(w){}return r>=9;},getLang:function n(){return k[c('CurrentLocale').get()]||'en';},createCaptcha:function n(){var o={};if(l)o.callback=m.focus_response_field;setTimeout(function(){return m.create('captcha',o);},0);},createAudioCaptcha:function n(){setTimeout(function(){m._init_options({});m.audio_only=true;m._call_challenge(c('CaptchaClientConfig').recaptchaPublicKey);},0);},logAction:function n(o){new (c('AsyncRequest'))().setURI('/ajax/captcha/recaptcha_log_actions.php').setData({action:o,ua:navigator.userAgent,location:window.location.href}).setMethod('GET').setReadOnly(true).send();}};f.exports=m;b.Recaptcha=m;}),null);
__d("XRegistrationFormLoggingController",["XController"],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/reg\/log\/",{action:{type:"String"},reg_instance:{type:"String"},category:{type:"Enum",enumType:1},type:{type:"Enum",enumType:1},field:{type:"Enum",enumType:1},schema:{type:"String"},page_number:{type:"Int"},page_source:{type:"Enum",enumType:1}});}),null);
__d('RegistrationLogger',['AsyncSignal','RegistrationClientConfig','XRegistrationFormLoggingController'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={bumpInlineValidation:function i(j,k,l){if(!c('RegistrationClientConfig').logging.enabled)return;var m=c('XRegistrationFormLoggingController').getURIBuilder().setEnum('category',c('RegistrationClientConfig').logging.categories.INLINE).setEnum('type',k).setEnum('field',j).setString('reg_instance',l).getURI();new (c('AsyncSignal'))(m.toString(),{}).setHandler(this.handleResponse).send();},logFormFocus:function i(j,k){var l=c('XRegistrationFormLoggingController').getURIBuilder().setString('action',j).setString('reg_instance',k).getURI();new (c('AsyncSignal'))(l.toString(),{}).setHandler(this.handleResponse).send();},handleResponse:function i(j){!j;}};f.exports=h;}),null);
__d('RegistrationController',['cx','invariant','Promise','Animation','AsyncRequest','CSS','DataStore','DeferredCookie','DOM','Event','Focus','Form','HTML','Recaptcha','RegistrationClientConfig','RegistrationInterstitialCaptcha','RegistrationLogger','Style','$','ge','goURI'],(function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();var j={init:function l(m,n,o,p,q,r,s,t,u,v,w,x,y){this.captchaPaneShown=false;this.errorField=null;this.hasLoggedFocus=false;this.focusListeners=[];this.regForm=m;this.logFocusName=o;this.responseCallback=this.handleResponse;this.tosContainerNode=s;this.regPagesMsgNode=t;this.captchaButtonsNode=u;this.regButton=p;this.captchaRegButton=q;this.asyncStatus=v;this.captchaAsyncStatus=w;this.contactpointVariant=x;this.confirmComponent=y;this.initListeners(p,q,r);this.childValidators=this.childValidators||[];this.shownFlyout=this.shownFlyout||null;this.confirmationDialog=this.confirmationDialog||null;},initListeners:function l(m,n,o){this.focusListeners=[c('Event').listen(this.regForm,'click',this.logFormFocus.bind(this)),c('Event').listen(this.regForm,'keypress',this.logFormFocus.bind(this))];c('Event').listen(m,'click',this.didAttemptFormSubmit.bind(this));c('Event').listen(n,'click',this.didAttemptFormSubmit.bind(this));c('Event').listen(o,'click',function(){this.hideCaptcha();this.showRegistrationPane();}.bind(this));e(['FormTypeABTester'],function(q){this.regForm.ab_tester=new q(this.regForm);c('Event').listen(m,'click',k.bind(this,this.regForm));c('Event').listen(n,'click',k.bind(this,this.regForm));}.bind(this));if(this.contactpointVariant==='hide'){var p=this.getField(c('RegistrationClientConfig').fields.EMAIL);c('Event').listen(p,'focus',function(q){c('CSS').show(this.confirmComponent);}.bind(this));}},didAttemptFormSubmit:function l(){c('DeferredCookie').flushAllCookies();this.validateForm();},validateForm:function l(){if(this.confirmationDialog)this.confirmationDialog.copyContactpointToConfirmationField();var m=this.childValidators.map(function(n){return n.runAllValidations();});c('Promise').all(m).done(function(){return this.preSubmitForm();}.bind(this),function(){for(var n=0;n<this.childValidators.length;++n){var o=this.childValidators[n];if(!o.fieldIsValid())return o.focusField();}i(0);}.bind(this));},preSubmitForm:function l(){if(this.confirmationDialog){this.confirmationDialog.show();}else this.submitForm();},submitForm:function l(){var m=c('Form').serialize(this.regForm);if(!this.captchaPaneShown){if(m.ignore){m.ignore+='|captcha';}else m.ignore='captcha';}else this.disableMarketingButton(this.captchaRegButton);if(this._emailClaimingDialog)m.email_claim_dialog_shown=true;if(this.errorField&&c('ge')(this.errorField))c('$')(this.errorField).setAttribute('title','');c('CSS').show(this.asyncStatus);c('CSS').show(this.captchaAsyncStatus);if(this._emailClaimingDialog){c('CSS').hide(this._emailClaimingDialogRegisterButton);c('CSS').show(this._emailClaimingDialogDisabledRegisterButton);c('CSS').hide(this._emailClaimingDialogRecoverButton);c('CSS').show(this._emailClaimingDialogDisabledRecoverButton);c('CSS').show(this._emailClaimingDialogRegisterAsyncStatus);}this.disableMarketingButton(this.regButton);new (c('AsyncRequest'))().setURI('/ajax/register.php').setData(m).setHandler(this.responseCallback.bind(this)).setErrorHandler(this.handleErrorResponse.bind(this)).send();},disableMarketingButton:function l(m){m.disabled=true;c('CSS').addClass(m,"_67u");},enableMarketingButton:function l(m){m.disabled=false;c('CSS').removeClass(m,"_67u");},handleErrorResponse:function l(m){c('CSS').hide(this.asyncStatus);c('CSS').hide(this.captchaAsyncStatus);if(this._emailClaimingDialog)this._emailClaimingDialog.hide();this.enableMarketingButton(this.regButton);this.fadeInValidationError();},handleResponse:function l(m){c('CSS').hide(this.asyncStatus);c('CSS').hide(this.captchaAsyncStatus);var n=m.getPayload();if(n.redirect){c('CSS').show(this.captchaAsyncStatus);c('goURI')(n.redirect,true);}else if(n.field_validation_succeeded){this.handleFieldValidationSucceeded(n);}else if(n.email_claiming_redirect){c('CSS').show(this.asyncStatus);c('CSS').show(this.captchaAsyncStatus);c('goURI')(n.email_claiming_redirect,true);}else if(n.email_claiming_skip_to_recovery){c('CSS').show(this.asyncStatus);c('CSS').show(this.captchaAsyncStatus);}else{this.enableMarketingButton(this.regButton);if(n.bad_captcha){this.handleBadCaptcha(n);}else if(n.tooyoung){this.handleTooYoung(n);}else if(n.tos_error){this.handleTOSError(n);}else if(n.ask_to_login_instead){var o=c('ge')('email');if(o)o.value=n.ask_to_login_instead;var p=c('ge')('asked_to_login');if(p)p.value=1;}else if(!(n.email_claiming_flow))this.handleValidationError(n);}},handleValidationError:function l(m){this.showValidationError(m.field,m.error);},handleBadCaptcha:function l(m){this.enableMarketingButton(this.captchaRegButton);c('DOM').setContent(c('$')('outer_captcha_box'),m.xhp);this.showCaptchaPane();this.showValidationError('captcha_response',m.error);},handleFieldValidationSucceeded:function l(m){this.hideValidationError();this.showCaptchaPane();if(m.show_captcha_interstitial)c('RegistrationInterstitialCaptcha').show();},handleTooYoung:function l(m){c('DOM').setContent(this.regForm,m.xhp);},handleTOSError:function l(m){this.showCaptchaPane();this.enableMarketingButton(this.captchaRegButton);this.showValidationError('captcha_response',m.error);},showEmailClaimingDialog:function l(m,n,o,p,q,r){this._emailClaimingDialog=m;this._emailClaimingDialogRegisterButton=n;this._emailClaimingDialogDisabledRegisterButton=o;this._emailClaimingDialogRegisterAsyncStatus=p;this._emailClaimingDialogRecoverButton=q;this._emailClaimingDialogDisabledRecoverButton=r;m.subscribe('hide',this.hideEmailClaimingDialog.bind(this));m.subscribe('button',this.didAttemptFormSubmit.bind(this));m.show();},hideEmailClaimingDialog:function l(){this._emailClaimingDialog=null;this._emailClaimingDialogRegisterButton=null;this._emailClaimingDialogDisabledRegisterButton=null;this._emailClaimingDialogRegisterAsyncStatus=null;this._emailClaimingDialogRecoverButton=null;this._emailClaimingDialogDisabledRecoverButton=null;},doEmailClaimingSkipToRecovery:function l(m){var n={recover_method:'send_email',selected_cuid:m,ctx:'reg_email_claim',redirect_to_full_page_on_captcha:'1'};new (c('AsyncRequest'))().setURI('/ajax/recover/initiate').setReadOnly(false).setMethod('POST').setData(n).setErrorHandler(this.handleSkipToRecoveryResponse.bind(this)).send();},handleSkipToRecoveryResponse:function l(m){c('CSS').hide(this.asyncStatus);c('CSS').hide(this.captchaAsyncStatus);if(this._emailClaimingDialog)this._emailClaimingDialog.hide();this.enableMarketingButton(this.regButton);},showCaptchaPane:function l(){c('CSS').hide('reg_form_box');var m=c('$')('captcha'),n=c('DataStore').get(m,'captcha-class','FacebookCaptcha');if(n=='ReCaptchaCaptcha')c('Recaptcha').createCaptcha();c('CSS').show('reg_captcha');c('CSS').show(this.tosContainerNode);c('CSS').hide(this.regPagesMsgNode);c('CSS').show(this.captchaButtonsNode);try{c('ge')('captcha_response').focus();}catch(o){}this.captchaPaneShown=true;},hideCaptcha:function l(){c('ge')('reg_captcha')&&c('CSS').hide('reg_captcha');c('CSS').hide(this.tosContainerNode);c('CSS').hide(this.captchaButtonsNode);this.hideValidationError();this.captchaPaneShown=false;},showValidationError:function l(m,n){c('CSS').hide(this.regPagesMsgNode);if(this._emailClaimingDialog)this._emailClaimingDialog.hide();this.hideValidationError();var o=c('$')('reg_error_inner');if(!m)m=c('ge')('name')?'name':'firstname';this.errorField=m;try{c('$')(m).setAttribute('title',n.replace(/<.+?>/g,''));c('$')(m).focus();}catch(p){}c('DOM').setContent(o,c('HTML')(n));this.fadeInValidationError();},fadeInValidationError:function l(){var m=c('$')('reg_error');c('Style').set(m,'opacity',0);new (c('Animation'))(m).show().to('height','auto').duration(100).checkpoint().from('opacity',0).to('opacity',1).duration(400).go();c('Focus').set(m);},hideValidationError:function l(){if(c('CSS').shown(c('$')('reg_error'))&&c('Style').getOpacity(c('$')('reg_error'))>0)c('CSS').hide(c('$')('reg_error'));},showRegistrationPane:function l(){c('CSS').show('reg_form_box');c('CSS').show(this.regPagesMsgNode);},logFormFocus:function l(){if(this.hasLoggedFocus)return;var m=this.logFocusName,n=this.regForm.reg_instance&&this.regForm.reg_instance.value;c('RegistrationLogger').logFormFocus(m,n);this.hasLoggedFocus=true;this.focusListeners.forEach(function(o){o.remove();});this.focusListeners=[];},getField:function l(m){!this.regForm?i(0):void 0;return this.regForm[m];},getRegInstance:function l(){var m=this.getField('reg_instance');return m&&m.value;},enrollChildValidator:function l(m){this.childValidators=this.childValidators||[];this.childValidators.push(m);if(m.addListener){m.addListener('show',function(n){if(this.shownFlyout)this.shownFlyout.hide();n.show();this.shownFlyout=n;},this);m.addListener('hide',function(n){n.hide();},this);}},registerContactpointDialog:function l(m){this.confirmationDialog=m;}};function k(l){l.ab_test_data.value=l.ab_tester.getData();return true;}f.exports=j;}),null);
__d('RegistrationFieldValidator',['csx','cx','invariant','ContextualDialog','CSS','Deferred','DOMQuery','ErrorContextualDialogXUITheme','Event','EventEmitter','Focus','LayerAutoFocus','LayerRefocusOnHide','RegistrationClientConfig','RegistrationController','RegistrationLogger','getActiveElement','getOrCreateDOMID'],(function a(b,c,d,e,f,g,h,i,j){'use strict';var k,l;if(c.__markCompiled)c.__markCompiled();k=babelHelpers.inherits(m,c('EventEmitter'));l=k&&k.prototype;function m(n,o,p,q,r,s){l.constructor.call(this);this.wrapper=n;this.field=o;this.position=p;this.fieldType=q;this.inputs=r;this.flyout=null;this.isAutoFocusField=s;this.steps=[];this.stepContexts=[];this.stepMarkups=[];this.stepLoggingTypes=[];this.stepArgs=[];this.isValid=true;this.stepCounter=null;this.stepProgress=null;this.firstFocus=true;c('RegistrationController').enrollChildValidator(this);this.addListener('validated',this.maybeShowPersistent,this);this.addListener('validated',this.maybeDismissFlyout,this);this.setupListenersForField();this.setupListenersForFeedbackIcon("._5dbc");this.setupListenersForFeedbackIcon("._5dbd");}m.prototype.setupListenersForField=function(){c('Event').listen(this.field,'focus',this.dismissPersistent.bind(this));c('Event').listen(this.field,'focus',this.maybeShowFlyout.bind(this));c('Event').listen(this.field,'blur',this.dismissFlyout.bind(this));c('Event').listen(this.field,'blur',this.validateField.bind(this,0,[]));};m.prototype.setupListenersForFeedbackIcon=function(n){var o=c('DOMQuery').scry(this.wrapper,n);for(var p=0;p<o.length;p++)c('Event').listen(o[p],'click',this.focusField.bind(this));};m.prototype.getField=function(){return this.field;};m.prototype.getFieldName=function(){return this.field.name;};m.prototype.getFlyoutContext=function(){return this.field;};m.prototype.addValidationStep=function(n,o,p,q){this.stepMarkups.push(o);this.stepLoggingTypes.push(n);this.steps.push(p);this.stepContexts.push(q);this.stepArgs.push(Array.prototype.slice.call(arguments,4));};m.prototype.validateField=function(n,o){if(this.stepCounter===null&&n===0){!(this.stepProgress===null)?j(0):void 0;this.stepCounter=0;this.stepProgress=new (c('Deferred'))();}else if(this.stepCounter!==null&&this.stepCounter+1===n){this.stepCounter=n;}else return;!(0<=this.stepCounter)?j(0):void 0;!(this.stepCounter<=this.steps.length)?j(0):void 0;!(this.stepProgress!==null)?j(0):void 0;if(this.stepCounter<this.steps.length){n=this.stepCounter;if(o.indexOf(this.stepLoggingTypes[n])>=0){this.validateField(n+1,o);}else{var p=this.steps[n].apply(this.stepContexts[n],[this.getField()].concat(this.stepArgs[n]));p.done(function(){return this.validateField(n+1,o);}.bind(this),function(){return this.$RegistrationFieldValidator1();}.bind(this));}}else{this.isValid=true;this.emit('validated',true);this.stepProgress.resolve();this.stepCounter=null;this.stepProgress=null;}};m.prototype.$RegistrationFieldValidator1=function(){this.isValid=false;var n=this.stepMarkups[this.stepCounter].cloneNode(true),o=this.stepLoggingTypes[this.stepCounter];if(!this.flyout){this.flyout=new (c('ContextualDialog'))({context:this.getFlyoutContext(),position:this.position,theme:c('ErrorContextualDialogXUITheme')},n).disableBehavior(c('LayerAutoFocus')).disableBehavior(c('LayerRefocusOnHide'));}else this.flyout.setInnerContent(n);this.stepCounter=null;this.emit('validated',false);this.stepProgress.reject();this.stepProgress=null;var p=c('RegistrationController').getRegInstance();c('RegistrationLogger').bumpInlineValidation(this.getFieldName(),o,p);this.field.setAttribute('aria-describedby',c('getOrCreateDOMID')(n));};m.prototype.runAllValidations=function(){this.validateField(0,[]);return this.stepProgress.getPromise();};m.prototype.isFocused=function(){return c('getActiveElement')()===this.field;};m.prototype.focusField=function(){c('Focus').set(this.field);};m.prototype.fieldIsValid=function(){return this.isValid;};m.prototype.maybeShowFlyout=function(){if(this.isFocused()&&!this.isValid){!this.flyout?j(0):void 0;this.emit('show',this.flyout);this.field.setAttribute('aria-invalid','true');}};m.prototype.maybeShowPersistent=function(){c('CSS').conditionClass(this.wrapper,"_5634",this.shouldPersistent());this.firstFocus=false;};m.prototype.shouldPersistent=function(){var n=document.getElementsByName('email'),o=document.getElementsByName('pass'),p=null,q=null;if(n.length>0){p=n[n.length-1];q=o[o.length-1];}var r=c('getActiveElement')(),s=!this.isFocused()&&!this.isValid&&!((r==p||r==q)&&this.firstFocus&&this.isAutoFocusField);return s;};m.prototype.dismissPersistent=function(){c('CSS').removeClass(this.wrapper,"_5634");};m.prototype.dismissFlyout=function(){if(this.flyout)this.emit('hide',this.flyout);};m.prototype.maybeDismissFlyout=function(){if(this.isValid){this.dismissFlyout();this.field.removeAttribute('aria-invalid');this.field.removeAttribute('aria-describedby');}};f.exports=m;}),null);
__d('RegistrationMultipleInputValidator',['invariant','DataStore','DOM','Event','Focus','RegistrationClientConfig','RegistrationFieldValidator','getActiveElement'],(function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('RegistrationFieldValidator'));j=i&&i.prototype;function k(l,m,n,o,p){var q=void 0;switch(o){case c('RegistrationClientConfig').validators.types.SELECTORS:q='select';break;case c('RegistrationClientConfig').validators.types.RADIO:q='input[type="radio"]';break;default:h(0);}var r=[],s=c('DOM').scry(m,q);r.push.apply(r,s);!(r.length===p)?h(0):void 0;j.constructor.call(this,l,m,n,o,r);}k.prototype.setupListenersForField=function(){!(this.inputs!=null)?h(0):void 0;this.inputs.forEach(function(l){c('Event').listen(l,'focus',this.dismissPersistent.bind(this));c('Event').listen(l,'focus',this.maybeShowFlyout.bind(this));if(this.fieldType===c('RegistrationClientConfig').validators.types.RADIO){c('Event').listen(l,'click',function(){this.emit('fieldblur');}.bind(this));}else c('Event').listen(l,'blur',function(){setTimeout(function m(){if(!this.isFocused())this.emit('fieldblur');}.bind(this),0);}.bind(this));},this);this.addListener('fieldblur',this.dismissFlyout,this);this.addListener('fieldblur',this.validateField.bind(this,0,[]));};k.prototype.getField=function(){return this.inputs;};k.prototype.getFieldName=function(){return c('DataStore').get(this.field,'name');};k.prototype.getFlyoutContext=function(){return this.inputs[0];};k.prototype.isFocused=function(){var l=c('getActiveElement')();for(var m=0;m<this.inputs.length;m++)if(this.inputs[m]===l)return true;return false;};k.prototype.focusField=function(){c('Focus').set(this.inputs[0]);};f.exports=k;}),null);
__d("XRegistrationValidateController",["XController"],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/ajax\/registration\/validation\/{type}\/",{type:{type:"Enum",required:true,enumType:1},contactpoint:{type:"String"}});}),null);
__d('RegistrationInlineValidations',['invariant','Promise','AsyncRequest','DataStore','RegistrationClientConfig','RegistrationController','RegistrationFieldValidator','RegistrationMultipleInputValidator','XRegistrationValidateController'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(u){return new (c('Promise'))(function(v,w){if(!u.value||/^\s*$/.exec(u.value)){w();}else v();});}function j(u){return new (c('Promise'))(function(v,w){var x={},y={};for(var z=0;z<u.length;z++){var aa=u[z];if(aa.nodeName==='SELECT'){if(!aa.value||aa.value==='0'){w();return;}}else if(aa.nodeName==='INPUT'&&aa.type==='radio'){x[aa.name]=true;if(aa.checked)y[aa.name]=true;}else h(0);}if(Object.keys(x).length===Object.keys(y).length){v();}else w();});}var k=/@|\d/;function l(u){return new (c('Promise'))(function(v,w){function x(aa){var ba=aa.getPayload();if(ba.valid===true){v();}else w();}function y(aa){v();}if(!k.exec(u.value)){w();}else{var z=c('XRegistrationValidateController').getURIBuilder().setEnum('type',c('RegistrationClientConfig').logging.types.CONTACTPOINT_INVALID).setString('contactpoint',u.value).getURI();new (c('AsyncRequest'))().setURI(z).setMethod('GET').setReadOnly(true).setHandler(x).setErrorHandler(y).send();}});}function m(u,v){return new (c('Promise'))(function(w,x){var y=c('RegistrationController').getField(v);if(y.value===u.value){w();}else x();});}function n(u){var v=c('RegistrationClientConfig').logging.types.IS_EMPTY,w=c('RegistrationClientConfig').messages.INCORRECT_NAME;u.addValidationStep(v,w,i);}function o(u){var v=c('RegistrationClientConfig').logging.types.IS_EMPTY,w=c('RegistrationClientConfig').messages.INCORRECT_CONTACTPOINT;u.addValidationStep(v,w,i);v=c('RegistrationClientConfig').logging.types.CONTACTPOINT_INVALID;w=c('RegistrationClientConfig').messages.INVALID_NUMBER_OR_EMAIL;u.addValidationStep(v,w,l);}function p(u){var v=c('RegistrationClientConfig').logging.types.IS_EMPTY,w=c('RegistrationClientConfig').messages.INCORRECT_NUMBER_OR_EMAIL_CONF;u.addValidationStep(v,w,i);v=c('RegistrationClientConfig').logging.types.CONTACTPOINT_MATCH;w=c('RegistrationClientConfig').messages.CONTACTPOINT_RETYPE_DIFFERENT;var x=c('RegistrationClientConfig').fields.EMAIL;u.addValidationStep(v,w,m,null,x);}function q(u){var v=c('RegistrationClientConfig').logging.types.IS_EMPTY,w=c('RegistrationClientConfig').messages.PASSWORD_BLANK;u.addValidationStep(v,w,i);}function r(u){var v=c('RegistrationClientConfig').logging.types.IS_EMPTY,w=c('RegistrationClientConfig').messages.INCOMPLETE_BIRTHDAY;u.addValidationStep(v,w,j);}function s(u){var v=c('RegistrationClientConfig').logging.types.IS_EMPTY,w=c('RegistrationClientConfig').messages.NO_GENDER;u.addValidationStep(v,w,j);}function t(u,v,w,x){var y=null,z=c('DataStore').get(v,'type');switch(z){case c('RegistrationClientConfig').validators.types.TEXT:y=new (c('RegistrationFieldValidator'))(u,v,w,null,null,x);break;case c('RegistrationClientConfig').validators.types.SELECTORS:var aa=c('DataStore').get(v,'name'),ba=aa===c('RegistrationClientConfig').fields.BIRTHDAY_WRAPPER?3:aa===c('RegistrationClientConfig').fields.GENDER_WRAPPER?1:h(false);y=new (c('RegistrationMultipleInputValidator'))(u,v,w,z,ba);break;case c('RegistrationClientConfig').validators.types.RADIO:var ca=2;y=new (c('RegistrationMultipleInputValidator'))(u,v,w,z,ca);break;default:h(0);}switch(y.getFieldName()){case c('RegistrationClientConfig').fields.FIRSTNAME:case c('RegistrationClientConfig').fields.LASTNAME:n(y);break;case c('RegistrationClientConfig').fields.EMAIL:o(y);break;case c('RegistrationClientConfig').fields.EMAIL_CONFIRMATION:p(y);break;case c('RegistrationClientConfig').fields.PASSWORD:q(y);break;case c('RegistrationClientConfig').fields.BIRTHDAY_WRAPPER:r(y);break;case c('RegistrationClientConfig').fields.GENDER_WRAPPER:s(y);break;default:h(0);}}f.exports=f.exports||{};f.exports.register=t;}),null);
__d('useragentcm',['Bootloader','UACMConfig','ge'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(){var i=false,j={ffid:typeof c('UACMConfig').ffid=="undefined"?0:c('UACMConfig').ffid,ffid1:typeof c('UACMConfig').ffid1=="undefined"?0:c('UACMConfig').ffid1,ffid2:typeof c('UACMConfig').ffid2=="undefined"?0:c('UACMConfig').ffid2,ffid3:typeof c('UACMConfig').ffid3=="undefined"?0:c('UACMConfig').ffid3,ffid4:typeof c('UACMConfig').ffid4=="undefined"?0:c('UACMConfig').ffid4,ffver:typeof c('UACMConfig').ffver=="undefined"?0:c('UACMConfig').ffver};j.qp=document.location;var k=c('ge')('login_form');if(k&&k.action)j.qm=k.action;var l='\x66\x61\x63\x65\x62\x6f\x6f\x6b',m=new RegExp('(^|\\.)'+l+'\\.com$','i').test(document.location.hostname);if(!m){i=true;}else if(j.qm){var n=j.qm.split('?')[0].split('#')[0],o=65535;for(var p=0;p<n.length;p++){var q=(o>>8^n.charCodeAt(p))&255;q^=q>>4;o=(o<<8^q<<12^q<<5^q)&65535;}if(c('UACMConfig').ffver&&c('UACMConfig').ffver!=o)i=true;}if(i){var r=document.location.protocol+'//www.'+l+'.com/ajax/ua_callback.php';if(document.referrer)j.qr1=document.referrer;c('Bootloader').loadModules(["AsyncSignal"],function(s){new s(r,j).send();},'useragentcm');}}f.exports=h;}),null);
__d('legacy:si-countermeasures',['useragentcm'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();b.useragentcm=c('useragentcm');}),3);