%PDF- %PDF-
Direktori : /var/www/html/lagjia_ime/wp-content/opus/utilized/data_files/ |
Current File : /var/www/html/lagjia_ime/wp-content/opus/utilized/data_files/HIPControl.js |
function HipChallenge(){this.LoadingTrials=3,this.CurrentLoadingAttempt=0,this.FailOverMessage='',this.ShouldShowMessageOnFailing=!0,this.IsActive=!1,this.IsUILess=!1,this.IsChallengeLoading=!1,this.ChachedLoadingParams=!1,this.CachedLoadParam1=null,this.CachedLoadParam2=null,this.CachedLoadParam3=null,this.ChallengeId='',this.Verified=!1,this.FailOverChallengeId="",this.LoadTimeOut=2e3,this.LoadTimeOutHandle=null,this.UILoaded=!1,this.PrerequisiteChallenge='',this.ConnectionFailed=!1,this.ShowValidation=!1,this.Loaded=!1,this.DependantChallengeId='',this.GradedActionChallenge='',this.ShowErrorPanel=function(){},this.Deactivate=function(){},this.Activate=function(){},this.ShowConnectivityError=function(){},this.GetVerificationData=function(){this.NotImplementedException()},this.GetUserResponse=function(){this.NotImplementedException()},this.GetChallengeType=function(){},this.Show=function(){this.UILoaded=!0},this.Hide=function(){this.UILoaded=!1},this.Verify=function(){return!0},this.VerifyCallback=function(){this.NotImplementedException()},this.LoadChallenge=function(){this.NotImplementedException()},this.ShowWrongAnswer=function(){this.NotImplementedException()},this.ShowConnectivityFailure=function(){this.NotImplementedException()},this.ResetControl=function(){this.NotImplementedException()},this.ClientValidations=function(){return!0},this.NotImplementedException=function(){throw{"Method not implemented":"This method should be overriden in inheriting classes"};},this.HideFailOverMessage=function(){},this.ShouldApplyFailOverForChallenge=function(){return!0},this.ShowDefaultUI=function(){},this.InitValidators=function(){}}var HipController={ActiveHipChallenges:[],AsyncLoadingChallenge:null,AsyncVerifyingChallenge:null,VerificationSuccessCallback:null,PrerequisiteChallengeSent:'',PendingChallengeSent:'',ScenarioId:'',OnShowingDynamicUILoadingState:null,ShowErrorPanelOnFailOverChallenge:!1,OnShowingDynamicUIVerifyingState:null,OnUserAcceptsVerificationCode:null,TimedOutErrorCode:"TimedOut",ApplyFailoverHandlerForAdmin:null,ShouldShowDefaultChallenge:!0,DefaultChallengeDisplayed:!1,IsDynamicScenario:!1,PageId:function(){return document.getElementById("BOXPageIDField").value},ShowChallenges:function(){for(var n in HipController.ActiveHipChallenges)HipController.ActiveHipChallenges[n].IsActive&&HipController.ActiveHipChallenges[n].Show();PageLayout.ResizePanels()},HideFailoverMessage:function(){for(var n in HipController.ActiveHipChallenges)HipController.ActiveHipChallenges[n].HideFailOverMessage()},HideChallenges:function(){for(var n in HipController.ActiveHipChallenges)HipController.ActiveHipChallenges[n].Hide();PageLayout.ResizePanels()},VerifyChallenges:function(n){var i,t;if(!HipController.ShouldShowDefaultChallenge)for(t in HipController.ActiveHipChallenges)if(HipController.ActiveHipChallenges[t].IsActive&&!HipController.ActiveHipChallenges[t].UILoaded)return HipController.ActiveHipChallenges[t].ShowDefaultUI(),!1;i=!0,HipController.VerificationSuccessCallback=n;for(t in HipController.ActiveHipChallenges)HipController.ActiveHipChallenges[t].IsActive&&(HipController.ActiveHipChallenges[t].Verified||(i=i&&HipController.ActiveHipChallenges[t].Verify()));return i&&n(),i},VerifyChallengesCallback:function(n){var i,t;if(n.NewHIPState&&(document.getElementById("hipState").value=n.NewHIPState),n.VerificationResult=="1"){WebTracking.TrackHipSuccess(HipController.HIPFailure+1),i=[];for(t in HipController.ActiveHipChallenges)HipController.ActiveHipChallenges[t].IsActive&&(i[t]=HipController.ActiveHipChallenges[t]);for(t in i)HipController.ActiveHipChallenges[t].ResetControl(n,!1)}else if(n.ErrorCode=="CaptchaFailure")HipController.ApplyFailOver(n.ChallengeToVerify,n.ErrorCode,!0)||HipController.ActiveHipChallenges[n.ChallengeToVerify].ShowConnectivityError();else if(n.ErrorCode=="HipControlStateNotValid"){n.NewHIPState&&(document.getElementById("hipState").value=n.NewHIPState),n.NewHipToken&&(document.getElementById("hipToken").value=n.NewHipToken),i=[];for(t in HipController.ActiveHipChallenges)HipController.ActiveHipChallenges[t].IsActive&&(i[t]=HipController.ActiveHipChallenges[t]);for(t in i)HipController.ActiveHipChallenges[t].ResetControl(n,!1),HipController.ActiveHipChallenges[t].ShowConnectivityError()}else n.ChallengeToVerify&&(HipController.HIPFailure++,setTimeout(function(n){return function(){n.ShowWrongAnswer()}}(HipController.ActiveHipChallenges[n.ChallengeToVerify]),0))},LoadChallenge:function(n,t,i,r,u){if(!this.ActiveHipChallenges[n].IsChallengeLoading){this.ActiveHipChallenges[n].IsChallengeLoading=!0;var e='',o='',f=HipController.ActiveHipChallenges[n];if(f.PrerequisiteChallenge!=''){if(HipController.AsyncVerifyingChallenge=PrerequisiteChallenge,!HipController.ActiveHipChallenges[f.PrerequisiteChallenge].ClientValidations())return!1;if(o=HipController.ActiveHipChallenges[f.PrerequisiteChallenge].GetUserResponse(),HipController.ActiveHipChallenges[f.PrerequisiteChallenge].DependantChallengeId=n,e=HipController.StringifyArray(HipController.ActiveHipChallenges[f.PrerequisiteChallenge].GetVerificationData()),!HipController.ActiveHipChallenges[f.PrerequisiteChallenge].Loaded)return}HipController.AsyncLoadingChallenge=n,HipController.ActiveHipChallenges[n].ChachedLoadingParams=u,HipController.ActiveHipChallenges[n].CachedLoadParam1=t,HipController.ActiveHipChallenges[n].CachedLoadParam2=i,HipController.ActiveHipChallenges[n].CachedLoadParam3=r,HipController.ActiveHipChallenges[n].LoadTimeOutHandle=setTimeout(function(){HipController.LoadChallengeOnTimeOut(n)},HipController.ActiveHipChallenges[n].LoadTimeOut),Microsoft.Online.BOX.Signup.UI.HIPServerCalls.LoadChallenge(HipController.ScenarioId,document.getElementById("hipToken").value,document.getElementById("hipState").value,n,t,i,r,HipController.StringifyArray(u),o,e,HipController.LoadChallengeCallback,HipController.LoadChallengeCallback)}},LoadChallengeCallback:function(n){var t=n&&n.ChallengeToLoad?n.ChallengeToLoad:HipController.AsyncLoadingChallenge,r=n&&n.ChallengeToVerify?n.ChallengeToVerify:HipController.AsyncVerifyingChallenge,f,u,i;if(HipController.ActiveHipChallenges[t].IsActive){if(HipController.AsyncLoadingChallenge=HipController.AsyncVerifyingChallenge=null,clearTimeout(HipController.ActiveHipChallenges[t].LoadTimeOutHandle),n&&n.NewHIPState&&(document.getElementById("hipState").value=n.NewHIPState),r&&HipController.ActiveHipChallenges[r].VerifyCallback(n),n.VerificationResult=="1")HipController.ActiveHipChallenges[t].ChachedLoadingParams=null,PageLayout.ResizePanels(),n.ChallengeToVerify&&HipController.ActiveHipChallenges[r].VerifyCallback(n),HipController.OnShowingDynamicUIVerifyingState!=null&&typeof HipController.OnShowingDynamicUIVerifyingState!="undefined"&&HipController.OnShowingDynamicUIVerifyingState(),HipController.ActiveHipChallenges[t].LoadCallback(n),HipController.ActiveHipChallenges[t].Loaded=!0;else if(n.ErrorCode=="PrerequisiteChallengeVerificationWrongAnswer")HipController.ActiveHipChallenges[r].ResetControl(),HipController.ActiveHipChallenges[r].ShowWrongAnswer(),HipController.ActiveHipChallenges[n.ChallengeToLoad].ResetControl();else if(n.ErrorCode=="PrerequisiteChallengeConnectionError")HipController.ActiveHipChallenges[r].ResetControl(),HipController.ActiveHipChallenges[r].ShowConnectivityError(),HipController.ActiveHipChallenges[n.ChallengeToLoad].ResetControl();else if(n.ErrorCode=="HipControlStateNotValid"){document.getElementById("hipToken").value=n.NewHipToken,f=[];for(u in HipController.ActiveHipChallenges)HipController.ActiveHipChallenges[u].IsActive&&(f[u]=HipController.ActiveHipChallenges[u]);for(u in f)HipController.ActiveHipChallenges[u].ShowConnectivityError(),HipController.ActiveHipChallenges[u].ResetControl(n,!1)}else i=HipController.ActiveHipChallenges[t],n.ErrorCode==HipController.TimedOutErrorCode&&i.CurrentLoadingAttempt<i.LoadingTrials?(i.CurrentLoadingAttempt++,setTimeout(function(){HipController.LoadChallenge(t,i.CachedLoadParam1,i.CachedLoadParam2,i.CachedLoadParam3,i.ChachedLoadingParams)},100)):HipController.ApplyFailOver(t,n.ErrorCode)||(HipController.ActiveHipChallenges[t].ChachedLoadingParams=null,HipController.ActiveHipChallenges[t].ResetControl(),HipController.ActiveHipChallenges[t].ShowLoadingError(n.ResponseCode),HipController.ActiveHipChallenges[t].PrerequisiteChallenge!=''?HipController.ActiveHipChallenges[HipController.ActiveHipChallenges[t].PrerequisiteChallenge].ResetControl():HipController.ActiveHipChallenges[t].ChachedLoadingParams=null);HipController.ActiveHipChallenges[t].IsChallengeLoading=!1}},LoadChallengeOnTimeOut:function(n){var t=HipController.ActiveHipChallenges[n];if(t.FailOverChallengeId!=''){HipController.ApplyFailOver(n,HipController.TimedOutErrorCode);return}t.CurrentLoadingAttempt<t.LoadingTrials?(this.ActiveHipChallenges[n].IsChallengeLoading=!1,t.CurrentLoadingAttempt++,HipController.LoadChallenge(n,t.CachedLoadParam1,t.CachedLoadParam2,t.CachedLoadParam3,t.ChachedLoadingParams)):(O365.Log.WriteLog(302377,O365.LogLevel.Error,O365.LogArea.Signup,String.format("Load challenge {0} timed out and no more retries available",n),HipController.PageId),HipController.LoadChallengeCallback(null))},StringifyArray:function(n){var i,t,r,f;if(JSON&&JSON.stringify){i=[];for(t in n)i.push({Key:t,Value:n[t]});return JSON.stringify(i)}var e='[',o=n.length,u=[];for(t in n)r=new RegExp('"','g'),f=n[t].toString().replace(r,"\\\""),t=t.replace(r,"\\\""),u.push('{"Key":"'+t+'","Value":"'+f+'"}');return'['+u.join(',')+']'},ChallengeVerifiedCallback:function(n){var t,i;HipController.ActiveHipChallenges[n].Verified=!0,t=!0;for(i in HipController.ActiveHipChallenges)HipController.ActiveHipChallenges[i].IsActive&&(t=t&&HipController.ActiveHipChallenges[i].Verified);HipController.PendingChallengeSent!=''&&HipController.PrerequisiteChallengeSent==n&&HipController.ActiveHipChallenges[HipController.PendingChallengeSent].LoadChallenge(),t&&WebTracking.TrackHipSuccess(HipController.HIPFailure+1)},ChallengeFailureCallback:function(){WebTracking.TrackHipFailure(),HipController.HIPFailure++},ApplyFailOver:function(n,t,i){var u=document.getElementById("hipState").value,r=HipController.ActiveHipChallenges[n];return r.FailOverChallengeId!=''&&r.ShouldApplyFailOverForChallenge(t)?(r.IsActive=!1,HipController.ActiveHipChallenges[r.FailOverChallengeId].IsActive=!0,HipController.ActiveHipChallenges[n].UILoaded&&(HipController.ActiveHipChallenges[n].Hide(),HipController.ActiveHipChallenges[n].Deactivate(),HipController.ActiveHipChallenges[r.FailOverChallengeId].Activate(),HipController.ActiveHipChallenges[r.FailOverChallengeId].Show(),HipController.OnShowingDynamicUILoadingState!=null&&setTimeout(function(){HipController.OnShowingDynamicUILoadingState()},0),HipController.ApplyFailoverHandlerForAdmin!=null&&setTimeout(function(){HipController.ApplyFailoverHandlerForAdmin()},0),HipController.ActiveHipChallenges[r.FailOverChallengeId].InitChallenge()),i||Microsoft.Online.BOX.Signup.UI.HIPServerCalls.ApplyFailOver(HipController.ScenarioId,u,n,HipController.ApplyFailOverCallback),HipController.ActiveHipChallenges[n].ShouldShowMessageOnFailing&&(HipController.ShowErrorPanelOnFailOverChallenge?HipController.ActiveHipChallenges[r.FailOverChallengeId].ShowErrorPanel():HipController.ActiveHipChallenges[n].ShowErrorPanel()),PageLayout.ResizePanels(),!0):!1},ApplyFailOverCallback:function(n){n&&(document.getElementById("hipState").value=n)},ResetControl:function(){for(var n in HipController.ActiveHipChallenges)HipController.ActiveHipChallenges[n].ResetControl()},HIPFailure:0};function InitWLSPChallenge(){HipController.ActiveHipChallenges[WLSPHIPCaptchaID]=new HipChallenge,captchaChallenge=HipController.ActiveHipChallenges[WLSPHIPCaptchaID],captchaChallenge.Hide=function(){PropertySheet.HideRow('HipProperty'),PropertySheet.HideRow('HipEntry'),PropertySheet.HideRow('WLSPCaptchaErrorPanel'),captchaChallenge.UILoaded=!1},captchaChallenge.Show=function(){PropertySheet.ShowRow('HipProperty'),PropertySheet.ShowRow('HipEntry'),captchaChallenge.UILoaded=!0},captchaChallenge.LoadChallenge=function(){captchaChallenge.LoadingHTML=document.getElementById("ispHIPHIP").innerHTML,document.getElementById('InvalidCaptchErrorText').style.display='none',document.getElementById('InvalidCaptchErrorVoice').style.display='none',captchaChallenge.LoadCallback(WLSPHIPCaptchaURL[captchaChallenge.LoadingTrials-1])},captchaChallenge.LoadCallback=function(n){if(WLSPHIPCaptchaController.done){captchaChallenge.Loaded=!0,Microsoft.Online.BOX.Signup.UI.HIPServerCalls.LogWLSPCaptchaLoaded();return}document.getElementById('WLSPCaptchaEncryptedInRealFlowID').value=WLSPHIPCaptchaEncryptedFlowID,$(captchaChallenge.GetScriptElement()).replaceWith("<script id='WLSPScript' src='"+n+"'><\/script>"),setTimeout(captchaChallenge.CheckCaptchaLoaded,captchaChallenge.LoadTimeOut)},captchaChallenge.InitChallenge=function(){},captchaChallenge.Verify=function(){captchaChallenge.ConnectionFailed=!1,ValidatorValidate(HipTextConnectivityValidator_val),WLSPHIPCaptchaController.verify(WLSPHIPCaptchaVerify,'');var n=document.getElementById('WLSPCaptchaSolution'),t=document.getElementById('WLSPCaptchaToken'),i=document.getElementById('WLSPCaptchaEncryptedInRealFlowID');return!0},captchaChallenge.VerifyCallback=function(){captchaChallenge.DependantChallengeId&&(document.getElementById("InvalidCaptchError"+HipController.ActiveHipChallenges[captchaChallenge.DependantChallengeId].GetChallengeType()).style.display="none")},captchaChallenge.Activate=function(){captchaChallenge.LoadChallenge()},captchaChallenge.ShowErrorPanel=function(){PropertySheet.ShowRow('WLSPCaptchaErrorPanel')},captchaChallenge.HideFailOverMessage=function(){PropertySheet.HideRow('WLSPCaptchaErrorPanel')},captchaChallenge.CheckCaptchaLoaded=function(){if(WLSPHIPCaptchaController.done)captchaChallenge.Loaded=!0,Microsoft.Online.BOX.Signup.UI.HIPServerCalls.LogWLSPCaptchaLoaded();else if(captchaChallenge.LoadingTrials>0)captchaChallenge.LoadingTrials--,captchaChallenge.LoadChallenge();else{captchaChallenge.GetScriptElement().src='';var n="CaptchaFailure";HipController.ApplyFailOver(WLSPHIPCaptchaID,n)||(document.getElementById("CaptchaLoadingError").style.display="",document.getElementById("loadingImage").style.display="none",Microsoft.Online.BOX.Signup.UI.HIPServerCalls.LogWLSPCaptchaLoadingFailed())}},captchaChallenge.ValidateHipAudioClient=function(n,t){if(WLSPHIPCaptchaController.type!="audio"){t.IsValid=!0;return}t.IsValid=captchaChallenge.ShowValidation&&(!captchaChallenge.Verified||document.getElementById('hipTextBox').value=='')?!1:!0},captchaChallenge.ValidateHipClient=function(n,t){if(WLSPHIPCaptchaController.type=="audio"){t.IsValid=!0;return}t.IsValid=captchaChallenge.ShowValidation&&(!captchaChallenge.Verified||document.getElementById('hipTextBox').value=='')?!1:!0},captchaChallenge.ValidateHipClientConnectivity=function(n,t){t.IsValid=!captchaChallenge.ConnectionFailed},captchaChallenge.HipChanged=function(){captchaChallenge.ConnectionFailed=!1,captchaChallenge.ShowValidation=!1,captchaChallenge.IsValid=!0,ValidatorValidate(CustomHipTextValidator_val),ValidatorValidate(CustomHipAudioValidator_val),ValidatorValidate(HipTextConnectivityValidator_val)},captchaChallenge.ShowConnectivityError=function(){captchaChallenge.ConnectionFailed=!0,ValidatorValidate(HipTextConnectivityValidator_val)},captchaChallenge.GetVerificationData=function(){WLSPHIPCaptchaController.verify(WLSPHIPCaptchaVerify,'');var t=document.getElementById('WLSPCaptchaSolution'),i=document.getElementById('WLSPCaptchaToken'),r=document.getElementById('WLSPCaptchaEncryptedInRealFlowID'),n=[];return n.WLSPCaptchaSolution=t.value,n.WLSPCaptchaToken=i.value,n.EncryptedInRealFlowID=r.value,n},captchaChallenge.GetChallengeType=function(){return WLSPHIPCaptchaController.type!="audio"?"Text":"Audio"},captchaChallenge.ClientValidations=function(){var n=document.getElementById('hipTextBox');return n.value.trim().length==0?(ValidatorValidate(document.getElementById('hipTextBox_Req_val')),!1):!0},captchaChallenge.GetUserResponse=function(){return document.getElementById('hipTextBox').value},captchaChallenge.ShowWrongAnswer=function(){captchaChallenge.ResetControl(),captchaChallenge.DependantChallengeId?document.getElementById("InvalidCaptchError"+HipController.ActiveHipChallenges[captchaChallenge.DependantChallengeId].GetChallengeType()).style.display="":(captchaChallenge.ShowValidation=!0,ValidatorValidate(CustomHipTextValidator_val),ValidatorValidate(CustomHipAudioValidator_val))},captchaChallenge.ShowConnectivityFailure=function(){captchaChallenge.ShowConnectivityError()},captchaChallenge.ResetControl=function(){captchaChallenge.ConnectionFailed=!1,ValidatorValidate(HipTextConnectivityValidator_val),captchaChallenge.DependantChallengeId&&(document.getElementById("InvalidCaptchError"+HipController.ActiveHipChallenges[captchaChallenge.DependantChallengeId].GetChallengeType()).style.display="none");var n=document.getElementById('hipTextBox');WLSPHIPCaptchaController.reloadHIP()},captchaChallenge.GetScriptElement=function(){var i=document.getElementById('ispHIPScript'),t=i.getElementsByTagName("script"),n;return t.length>0?n=t[0]:(n=document.createElement("script"),i.appendChild(n)),n}}var WLSPHIPCaptchaController={error:0,left:"0",showMenu:!0,getMenu:function(){},showError:!0,showErrorCallback:function(){return"Dd"},errorMessage:"",removeErrorCallback:function(){},instructionsInside:!1,getError:function(){},inputWidth:260,done:!1,showInstruction:!1,holder:"ispHIPHIP",scriptHolder:"ispHIPScript",count:0,type:"visual",cssSet:{},getSolution:function(){},reloadHIP:function(){},switchHIP:function(){},clientValidation:function(){},setError:function(){},reloadHIP:function(){},setFocus:function(){},postLoad:function(){WLSPHIPCaptchaController.type!="audio"?(document.getElementById("HipAudioHelp").style.display="none",typeof IsGeminiSignup!="undefined"&&IsGeminiSignup?(solutionPlaceholderElement=document.getElementById("hipTextBox_placeholder"),solutionPlaceholderElement?solutionPlaceholderElement.innerText=document.getElementById("HipTextHelp").innerText:document.getElementById("hipTextBox").placeholder=document.getElementById("HipTextHelp").innerText):document.getElementById("HipTextHelp").style.display=""):(document.getElementById("HipTextHelp").style.display="none",IsGeminiSignup||(document.getElementById("HipAudioHelp").style.display=""),solutionPlaceholderElement=document.getElementById("hipTextBox_placeholder"),solutionPlaceholderElement?solutionPlaceholderElement.innerText=document.getElementById("HipAudioHelp").innerText:document.getElementById("hipTextBox").placeholder=document.getElementById("HipAudioHelp").innerText,O365.Log.WriteLog(300873,O365.LogLevel.Info,O365.LogArea.Signup,O365.LogParameter.Empty,Signup.PageId));var n=this.setError();n!=""&&document.getElementById(n)&&(document.getElementById(n).style.display="none"),WLSPHIPCaptchaController.comeinURL==""&&(typeof WLSPHIPCaptchaController.constructURL!="undefined"?WLSPHIPCaptchaController.comeinURL=WLSPHIPCaptchaController.constructURL():captchaChallenge.LoadChallenge())},verify:function(){}},wait=function(){document.getElementById("ispHIPHIP").innerHTML=captchaChallenge.LoadingHTML},WLSPHIPCaptchaVerify=function(n,t){n=document.getElementById("hipTextBox").value,document.getElementById('WLSPCaptchaSolution').value=n,document.getElementById('WLSPCaptchaToken').value=t,document.getElementById('WLSPCaptchaType').value=WLSPHIPCaptchaController.type},WLSPHIPCaptchaID='WLSPCAPTCHA';function InitOrgIdChallenge(){HipController.ActiveHipChallenges[OrgIdCaptcha]=new HipChallenge,orgIdCaptchaChallenge=HipController.ActiveHipChallenges[OrgIdCaptcha],orgIdCaptchaChallenge.isAudio=0,orgIdCaptchaChallenge.isLoaded=!0,orgIdCaptchaChallenge.Loaded=function(){orgIdCaptchaChallenge.isLoaded=!0},orgIdCaptchaChallenge.Hide=function(){PropertySheet.HideRow('HipProperty'),PropertySheet.HideRow('HipEntry'),PropertySheet.HideRow('OrgIdCaptchaErrorPanel'),orgIdCaptchaChallenge.UILoaded=!1},orgIdCaptchaChallenge.Show=function(){PropertySheet.ShowRow('HipProperty'),PropertySheet.ShowRow('HipEntry'),orgIdCaptchaChallenge.UILoaded=!0},orgIdCaptchaChallenge.Verify=function(){return orgIdCaptchaChallenge.ConnectionFailed=!1,ValidatorValidate(HipTextConnectivityValidator_val),!0},orgIdCaptchaChallenge.GetUserResponse=function(){return document.getElementById('orgIdHipSolution').value},orgIdCaptchaChallenge.InitChallenge=function(){},orgIdCaptchaChallenge.LoadChallenge=function(){document.getElementById('hipImage').src='/HipImage.aspx?'+(new Date).valueOf(),setTimeout(orgIdCaptchaChallenge.CheckCaptchaLoaded,orgIdCaptchaChallenge.LoadTimeOut)},orgIdCaptchaChallenge.VerifyCallback=function(){orgIdCaptchaChallenge.DependantChallengeId&&(document.getElementById("InvalidCaptchError"+HipController.ActiveHipChallenges[orgIdCaptchaChallenge.DependantChallengeId].GetChallengeType()).style.display="none")},orgIdCaptchaChallenge.CheckCaptchaLoaded=function(){orgIdCaptchaChallenge.isLoaded?Microsoft.Online.BOX.Signup.UI.HIPServerCalls.LogOrgIdCaptchaLoaded():orgIdCaptchaChallenge.LoadingTrials>0?(orgIdCaptchaChallenge.LoadingTrials--,orgIdCaptchaChallenge.LoadChallenge()):!HipController.ApplyFailOver(OrgIdCaptcha)},orgIdCaptchaChallenge.ValidateHipAudioClient=function(n,t){if(orgIdCaptchaChallenge.isAudio!=1){t.IsValid=!0;return}t.IsValid=orgIdCaptchaChallenge.ShowValidation&&(!orgIdCaptchaChallenge.Verified||document.getElementById('hipTextBox').value=='')?!1:!0},orgIdCaptchaChallenge.ValidateHipClient=function(n,t){if(orgIdCaptchaChallenge.isAudio==1){t.IsValid=!0;return}t.IsValid=orgIdCaptchaChallenge.ShowValidation&&(!orgIdCaptchaChallenge.Verified||document.getElementById('hipTextBox').value=='')?!1:!0},orgIdCaptchaChallenge.ValidateHipClientConnectivity=function(n,t){t.IsValid=!orgIdCaptchaChallenge.ConnectionFailed},orgIdCaptchaChallenge.playAudio=function(){return audioUrl==null||audioUrl==""?Microsoft.Online.BOX.Signup.UI.SignupServerCalls.GetHipAudioUrl(playAudioCallback,playAudioCallback):document.getElementById('hipAudioFrame').contentWindow.location.replace(audioUrl),!1},orgIdCaptchaChallenge.HipChanged=function(){document.getElementById("hipSolution").value=document.getElementById("hipTextBox").value,orgIdCaptchaChallenge.ShowValidation=!1,hipIsValid=!0,ValidatorValidate(CustomHipTextValidator_val),ValidatorValidate(CustomHipAudioValidator_val)},orgIdCaptchaChallenge.ShowErrorPanel=function(){PropertySheet.ShowRow('OrgIdCaptchaErrorPanel')},orgIdCaptchaChallenge.GetVerificationData=function(){var t=document.getElementById('hipTextBox'),n=[];return n.orgIdHipSolution=t.value,n.isAudio=orgIdCaptchaChallenge.isAudio,n},orgIdCaptchaChallenge.GetChallengeType=function(){return orgIdCaptchaChallenge.isAudio?"Audio":"Text"},orgIdCaptchaChallenge.ShowWrongAnswer=function(){orgIdCaptchaChallenge.ResetControl(),orgIdCaptchaChallenge.DependantChallengeId?document.getElementById("InvalidCaptchError"+HipController.ActiveHipChallenges[orgIdCaptchaChallenge.DependantChallengeId].GetChallengeType()).style.display="":(orgIdCaptchaChallenge.ShowValidation=!0,ValidatorValidate(CustomHipTextValidator_val),ValidatorValidate(CustomHipAudioValidator_val))},orgIdCaptchaChallenge.ShowConnectivityFailure=function(){orgIdCaptchaChallenge.ResetControl(),orgIdCaptchaChallenge.ShowConnectivityError()},orgIdCaptchaChallenge.ResetControl=function(){var n=document.getElementById('hipTextBox');orgIdCaptchaChallenge.LoadChallenge()},orgIdCaptchaChallenge.ShowConnectivityError=function(){orgIdCaptchaChallenge.ConnectionFailed=!0,ValidatorValidate(HipTextConnectivityValidator_val)}}var OrgIdCaptcha='OrgIdCaptcha';function InitSMSChallenge(){var i,n,t;HipController.ActiveHipChallenges[SMSHIPChallengeId]=new HipChallenge,smsChallenge=HipController.ActiveHipChallenges[SMSHIPChallengeId],smsChallenge.smsIsValid=!0,smsChallenge.lastSelectedOptionIndex=0,smsChallenge.countryChanged=!1,smsChallenge.lastSelectedOtionText='',i=0,n="1",smsChallenge.Loaded=!1,smsChallenge.clickValidatorIsValid=null,smsChallenge.IsRegionListAutoSized=!0,smsChallenge.HideFailOverMessage=function(){PropertySheet.HideRow('SMSHIPControlErrorPanel'),IsGeminiSignup&&PropertySheet.HideRow('SMSHIPVerificationControlError')},smsChallenge.Hide=function(){PropertySheet.HideRow('MobileCountryPropertySheetItem'),PropertySheet.HideRow('PhoneVerificationHeaderPropertySheetItem'),PropertySheet.HideRow('MobileCountryHeaderPropertySheetItem'),PropertySheet.HideRow('SMSProperty'),PropertySheet.HideRow('CallOption'),PropertySheet.HideRow('SMSEntry'),PropertySheet.HideRow('SMSHIPControlErrorPanel'),ValidatorEnableIfExists(document.getElementById('MobileNumberTextBoxVoice_ClickValidator_val'),!1),ValidatorEnableIfExists(document.getElementById('MobileNumberTextBox_ClickValidator_val'),!1),ValidatorEnableIfExists(document.getElementById('smsTextBox_Req_val'),!1)},smsChallenge.Show=function(){PropertySheet.ShowRow('MobileCountryPropertySheetItem'),PropertySheet.ShowRow('MobileCountryHeaderPropertySheetItem'),PropertySheet.ShowRow('PhoneVerificationHeaderPropertySheetItem'),PropertySheet.ShowRow('SMSProperty'),PropertySheet.ShowRow('CallOption'),setTimeout(function(){$(".selection .contact-type li").css("min-width",$("input[type='radio'] + label span").first().width()+70)},100)},smsChallenge.GetUserResponse=function(){return document.getElementById('SMSEntry').value},smsChallenge.LoadChallenge=function(){var e,u,r,i,t,f;if(smsChallenge.clickValidatorIsValid=!0,ValidatorValidate(document.getElementById('MobileNumberTextBoxVoice_ClickValidator_val')),ValidatorValidate(document.getElementById('MobileNumberTextBox_ClickValidator_val')),ValidatorEnableIfExists(document.getElementById('MobileNumberTextBoxVoice_ClickValidator_val'),!1),ValidatorEnableIfExists(document.getElementById('MobileNumberTextBox_ClickValidator_val'),!1),ValidatorValidate(SMSMobileNumberTextBox_Req_val),mobileNumberTextBox.value.trim().length==0||!smsChallenge.CheckPhone())return ValidatorValidate(MobileCustomValidator_val),!1;if((IsGeminiSignup||typeof Page_ClientValidate!="function"||Page_ClientValidate()!=!1)&&smsChallenge.IsActive){for(e=mobileNumberTextBox.value.replace(/[^0-9]/g,""),u=!1,document.getElementById('VoiceRadioButton')!==null&&document.getElementById('VoiceRadioButton').checked&&(u=!0),u?IsGeminiSignup?IsTrialOffer?Microsoft.Online.BOX.UI.ClientLogging.ClientLogService.LogToServerWithTagId(402407,ClientLogService.LogLevel.Info,"CallMe_Gemini_Trial",null,Microsoft.Online.BOX.JS.ClientLogService.ErrorCallback):Microsoft.Online.BOX.UI.ClientLogging.ClientLogService.LogToServerWithTagId(402438,ClientLogService.LogLevel.Info,"CallMe_Gemini_Paid",null,Microsoft.Online.BOX.JS.ClientLogService.ErrorCallback):IsTrialOffer?Microsoft.Online.BOX.UI.ClientLogging.ClientLogService.LogToServerWithTagId(402439,ClientLogService.LogLevel.Info,"CallMe_Old_Trial",null,Microsoft.Online.BOX.JS.ClientLogService.ErrorCallback):Microsoft.Online.BOX.UI.ClientLogging.ClientLogService.LogToServerWithTagId(402440,ClientLogService.LogLevel.Info,"CallMe_Old_Paid",null,Microsoft.Online.BOX.JS.ClientLogService.ErrorCallback):IsGeminiSignup?IsTrialOffer?Microsoft.Online.BOX.UI.ClientLogging.ClientLogService.LogToServerWithTagId(402408,ClientLogService.LogLevel.Info,"TextMe_Gemini_Trial",null,Microsoft.Online.BOX.JS.ClientLogService.ErrorCallback):Microsoft.Online.BOX.UI.ClientLogging.ClientLogService.LogToServerWithTagId(402441,ClientLogService.LogLevel.Info,"TextMe_Gemini_Paid",null,Microsoft.Online.BOX.JS.ClientLogService.ErrorCallback):IsTrialOffer?Microsoft.Online.BOX.UI.ClientLogging.ClientLogService.LogToServerWithTagId(402442,ClientLogService.LogLevel.Info,"TextMe_Old_Trial",null,Microsoft.Online.BOX.JS.ClientLogService.ErrorCallback):Microsoft.Online.BOX.UI.ClientLogging.ClientLogService.LogToServerWithTagId(402443,ClientLogService.LogLevel.Info,"TextMe_Old_Paid",null,Microsoft.Online.BOX.JS.ClientLogService.ErrorCallback),r=[],r.PhoneNumber=e,r.phoneCountryCode=n,r.UseVoice=u,$('#MultiPageTitle').length>0?r.OfferTitle=$('#MultiPageTitle')[0].hasAttribute('title')?$('#MultiPageTitle').attr('title'):$('#MultiPageTitle').html():$('#OfferSummary_OfferRepeaterMetro_ctl00_OfferName').length>0&&(r.OfferTitle=$('#OfferSummary_OfferRepeaterMetro_ctl00_OfferName').html()),i=document.getElementsByTagName('input'),t=0;t<i.length;t++)i[t].type=="text"&&i[t].style.display!=="none"&&i[t].style.visibility!=="hidden"&&(f=i[t].id,f.toLowerCase()=="phonenumber"&&(f="UserInfoPhoneNumber"),r[f]=i[t].value);for(i=document.getElementsByTagName('select'),t=0;t<i.length;t++)i[t].style.display!=="none"&&(r[i[t].id]=i[t].value);IsGeminiSignup&&$("#SmsSpinner").css("display",""),HipController.LoadChallenge(SMSHIPChallengeId,e,n,u,r)}},smsChallenge.IsCookieEnabled=function(n,t){var i=Microsoft.Online.BOX.JS.Shared.IsCookiesEnabled();i?Button.Enable(getSmsButtonId):Button.Disable(getSmsButtonId),t.IsValid=i},smsChallenge.LoadCallback=function(n){var r,i;IsGeminiSignup&&$("#SmsSpinner").css("display","none"),n.ErrorCode=="HIPFailureLoading"?HipController.ApplyFailOver(SMSHIPChallengeId)||smsChallenge.ShowConnectivityError():(Microsoft.Online.BOX.JS.Shared.SetPersistentCookie('smschallenge',n.ExtraInfo,1,"/"),PropertySheet.ShowRow('SMSEntry'),IsGeminiSignup?SignupWizard.Next():Button.Disable('GetSmsButton'),r=document.getElementById('smsTextBox'),r.focus(),i=document.getElementById('VoiceRadioButton'),i!==null&&i.checked?document.getElementById('VoiceSentSuccessText').style.display='inline-block':document.getElementById('SmsSentSuccessText').style.display='inline-block',ValidatorValidate(document.getElementById('MobileNumberTextBoxVoice_ClickValidator_val')),ValidatorValidate(document.getElementById('MobileNumberTextBox_ClickValidator_val')),document.getElementById('SmsSentAsk').style.display='',smsChallenge.smsIsValid=!0,ValidatorValidate(CustomSmsTextValidator_val),typeof t!='undefined'&&window[t](),smsChallenge.Loaded=!0)},smsChallenge.ShowErrorPanel=function(){PropertySheet.ShowRow('SMSHIPControlErrorPanel'),IsGeminiSignup&&PropertySheet.ShowRow('SMSHIPVerificationControlError')},smsChallenge.Verify=function(){if(customModeEnabled.toLowerCase()!=="true"&&(smsChallenge.clickValidatorIsValid=!1,ValidatorEnableIfExists(document.getElementById('MobileNumberTextBoxVoice_ClickValidator_val'),!0),ValidatorEnableIfExists(document.getElementById('MobileNumberTextBox_ClickValidator_val'),!0),ValidatorValidate(document.getElementById('MobileNumberTextBoxVoice_ClickValidator_val')),ValidatorValidate(document.getElementById('MobileNumberTextBox_ClickValidator_val')),Page_ClientValidate()==!1))return!1;smsChallenge.ConnectionFailed=!1;var n=document.getElementById('smsTextBox');return document.getElementById("smsHidden").value=n.value,!0},smsChallenge.VerifyCallback=function(n,t){t=typeof t==null,n.VerificationResult=="1"?smsChallenge.ReloadChallenge():n.ErrorCode=="CaptchaFailure"?HipController.ApplyFailOver(SMSHIPChallengeId,t)||smsChallenge.ShowConnectivityError():n.VerificationResult=="0"&&(smsChallenge.smsIsValid=!1,ValidatorValidate(CustomSmsTextValidator_val))},smsChallenge.VerificationTypeClick=function(){Button.Enable(getSmsButtonId),document.getElementById('SMSRadioButton').checked?(Button.SetText('GetSmsButton',rimeChoisesSms),document.getElementById("SignupWizardStep3_NextButton")&&($("#SignupWizardStep3_NextButton_Text").text(rimeChoisesSms),$("#SignupWizardStep3_NextButton_Text").attr("title",rimeChoisesSms),$("#SignupWizardStep3_NextButton").attr("title",rimeChoisesSms),$("#SignupWizardStep3_NextButton_Text").attr("aria-label",rimeChoisesSms),$("#SignupWizardStep3_NextButton").attr("aria-label",rimeChoisesSms))):document.getElementById('VoiceRadioButton').checked&&(Button.SetText('GetSmsButton',rimeChoisesVoiceSend),document.getElementById("SignupWizardStep3_NextButton")&&($("#SignupWizardStep3_NextButton_Text").text(rimeChoisesVoiceSend),$("#SignupWizardStep3_NextButton_Text").attr("title",rimeChoisesVoiceSend),$("#SignupWizardStep3_NextButton").attr("title",rimeChoisesVoiceSend),$("#SignupWizardStep3_NextButton_Text").attr("aria-label",rimeChoisesVoiceSend),$("#SignupWizardStep3_NextButton").attr("aria-label",rimeChoisesVoiceSend))),ValidatorEnableIfExists(document.getElementById('MobileNumberTextBox_ClickValidator_val'),!1),ValidatorEnableIfExists(document.getElementById('MobileNumberTextBoxVoice_ClickValidator_val'),!1),smsChallenge.ResetControl()},smsChallenge.SmsMobileChanged=function(){Button.Enable(getSmsButtonId)},smsChallenge.SmsChanged=function(){smsChallenge.ConnectionFailed=!1,smsChallenge.smsIsValid=!0,ValidatorValidate(CustomSmsTextValidator_val)},smsChallenge.IsChallengeIssued=function(n,t){if(smsChallenge.clickValidatorIsValid==!0)return t.IsValid=!0,!0;var i=document.getElementById('SMSEntry');if(smsChallenge.GetChallengeType()=="Voice"){if(n==document.getElementById('MobileNumberTextBox_ClickValidator_val'))return t.IsValid=!0,!0}else if(n==document.getElementById('MobileNumberTextBoxVoice_ClickValidator_val'))return t.IsValid=!0,!0;i&&i.parentNode.style.display==='none'&&(t.IsValid=!1)},smsChallenge.UpdateCountry=function(){n=smsRegionList.selectedIndex,n>0?(dialingCodeBox.value="+"+n,mobileNumberTextBox.disabled=!1,Button.Enable(getSmsButtonId),smsChallenge.ResetControl()):(dialingCodeBox.value="",mobileNumberTextBox.value="",mobileNumberTextBox.disabled=!0),mobileNumberTextBox.value&&smsChallenge.CheckPhone()},smsChallenge.UpdateCountry=function(t){n=t,t>0?(dialingCodeBox.value='+'+t,mobileNumberTextBox.disabled=!1,Button.Enable(getSmsButtonId),smsChallenge.ResetControl(),smsChallenge.GetWidth(t)):(dialingCodeBox.value="",mobileNumberTextBox.value="",mobileNumberTextBox.disabled=!0),mobileNumberTextBox.value&&smsChallenge.CheckPhone()},smsChallenge.ValidateMobileNumber=function(n,t){t.IsValid=smsChallenge.CheckPhone()},smsChallenge.ValidateHipClientConnectivity=function(n,t){t.IsValid=!smsChallenge.ConnectionFailed},smsChallenge.CheckPhone=function(){var u,r,f;try{var e=document.getElementById('SMSMobileNumberTextBox'),t=e.value.trim(),i=!1,n=document.getElementById('MobileCustomValidator_val');return t.length===0?i=!0:(customModeEnabled.toLowerCase()!=="true"&&(u=smsRegionList.selectedIndex),r=n.hasOwnProperty&&n.hasOwnProperty('validationexpression')&&n.validationexpression!=''||n.validationexpression?n.validationexpression:regexList[u],t=t.replace(/[^0-9]/g,""),i=t.length===0?!1:!r||t.search(r)>-1),i||customModeEnabled.toLowerCase()!=="true"&&(f=errorList[u],n.errormessage=f==''?errorDefault:f),i}catch(o){return!0}},smsChallenge.ValidateSms=function(n,t){t.IsValid=smsChallenge.smsIsValid?!0:!1},smsChallenge.InitChallenge=function(){customModeEnabled.toLowerCase()!=="true"&&(smsChallenge.IsActive?(HipController.ActiveHipChallenges.SMSHIP.UpdateCountry(smsRegionList.value),ValidatorEnable(document.getElementById('smsTextBox_Req_val'),!1),document.getElementById('VoiceRadioButton')&&HipController.ActiveHipChallenges.SMSHIP.VerificationTypeClick()):ValidatorEnable(document.getElementById('smsTextBox_Req_val'),!1))},smsChallenge.ShowConnectivityError=function(){ValidatorEnableIfExists(document.getElementById('MobileNumberTextBoxVoice_ClickValidator_val'),!1),ValidatorEnableIfExists(document.getElementById('MobileNumberTextBox_ClickValidator_val'),!1),smsChallenge.ConnectionFailed=!0,ValidatorEnableIfExists(HipConnectivityValidator_val,!0),ValidatorValidate(HipConnectivityValidatorLoading_val)},smsChallenge.ShowLoadingError=function(n){IsGeminiSignup&&$("#SmsSpinner").css("display","none");var t=document.getElementById("HipConnectivityValidatorLoading_val");t.errormessage=submissionErrors[n]?submissionErrors[n]:defaultRimeSubmissionError,smsChallenge.ConnectionFailed=!0,ValidatorValidate(HipConnectivityValidatorLoading_val)},smsChallenge.GetVerificationData=function(){var t=document.getElementById('smsTextBox'),n=[];return n.SMSEntry=t.value,n},smsChallenge.SetPostProcessingDelegate=function(n){t=n},smsChallenge.GetChallengeType=function(){var n=!1;return document.getElementById('VoiceRadioButton')!==null&&document.getElementById('VoiceRadioButton').checked&&(n=!0),n?"Voice":"Text"},smsChallenge.ReloadChallenge=function(){IsGeminiSignup||PropertySheet.HideRow('SMSEntry'),Button.Enable('GetSmsButton')},smsChallenge.ShowWrongAnswer=function(){smsChallenge.smsIsValid=!1,ValidatorValidate(CustomSmsTextValidator_val)},smsChallenge.ResetControl=function(){var n=document.getElementById('SMSEntry');smsChallenge.smsIsValid=!0,smsChallenge.PrerequisiteChallenge&&n.parentNode.style.display!=='none'&&HipController.ActiveHipChallenges[smsChallenge.PrerequisiteChallenge].ResetControl(),n=document.getElementById('smsTextBox'),n.value='',smsChallenge.clickValidatorIsValid=!0,ValidatorEnableIfExists(document.getElementById('MobileNumberTextBoxVoice_ClickValidator_val'),!1),ValidatorEnableIfExists(document.getElementById('MobileNumberTextBox_ClickValidator_val'),!1),smsChallenge.ConnectionFailed=!1,ValidatorValidate(HipConnectivityValidatorLoading_val),ValidatorValidate(HipConnectivityValidator_val),document.getElementById('SmsUnknownErrorText').style.display='none',document.getElementById('VoiceUnknownErrorText').style.display='none',document.getElementById('SmsSentSuccessText').style.display='none',document.getElementById('VoiceSentSuccessText').style.display='none',Button.Enable('GetSmsButton'),IsGeminiSignup||PropertySheet.HideRow('SMSEntry')},smsChallenge.GetWidth=function(n){var u=new Shared.BrowserIdentifier,r,t,i;u.ie8down||(r=parseInt(smsRegionList.style.width),t=document.createElement("select"),t.options.add(document.createElement("option")),t.style.width="auto",t.options[0].style.padding="0px",t.options[0].style.margin="0px",t.options[0].text="(+"+n+")",document.body.appendChild(t),i=t.offsetWidth,smsRegionList.style.width=i+"px",IsGeminiSignup&&(smsChallenge.IsRegionListAutoSized?$("#SMSPhoneNumber").css("width",parseInt($("#SMSLoadingChallenge").prop("offsetWidth"))-parseInt($("#SMSPhoneNumber").css("margin-left"))-parseInt($("#SMSPhoneNumber").css("margin-right"))-i+"px"):$("#SMSPhoneNumber").css("width",parseInt($("#SMSPhoneNumber").css("width"))+r-parseInt($("#SMSPhoneNumber").css("margin-left"))-parseInt($("#SMSPhoneNumber").css("margin-right"))-10-i)),smsChallenge.IsRegionListAutoSized=!1,document.body.removeChild(t),ApplyPlaceHolderBehaviour())},smsChallenge.LogUserClickedSupport=function(){Microsoft.Online.BOX.Signup.UI.HIPServerCalls.LogUserClickedSupport(function(){})},smsChallenge.ShouldApplyFailOverForChallenge=function(n){return n!="Blocked"}}var SMSHIPChallengeId='SMSHIP';