//>>built
require({cache:{"url:mill/jssupport/layout/layoutContent/registrationForm.html":'\x3cdiv\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.LastName;:\', required: true, name: \'lastname\'"\x3e\x3cdiv data-dojo-attach-point\x3d"lastNameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.FirstName;:\', required: true, name: \'firstname\'"\x3e\x3cdiv data-dojo-attach-point\x3d"firstNameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.MiddleName;:\', required: true, name: \'middlename\'"\x3e\x3cdiv data-dojo-attach-point\x3d"middleNameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.BirthDate;:\', required: true, name: \'birthdate\', invalidMessage: \'Office.InvalidDate\'"\x3e\x3cdiv data-dojo-attach-point\x3d"birthDateNameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.FilteringSelectField" data-dojo-props\x3d"icon: \'icon-set-man-woman\', text: \'Office.Gender;:\', required: true, name: \'sex\'"\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.Email;:\', required: true, name: \'email\', lowercase: true" data-dojo-attach-point\x3d"emailField"\x3e\x3cdiv data-dojo-attach-point\x3d"email1NameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.EmailConfirm;:\', required: true, name: \'emailConfirm\', lowercase: true, invalidMessage: \'Office.InvalidEmailConfirm\'"\x3e\x3cdiv data-dojo-attach-point\x3d"email2NameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.ContactPhone;:\', required: true, name: \'phone\'"\x3e\x3cdiv data-dojo-type\x3d"office.TranslatableNode" data-dojo-props\x3d"text: \'Office.RequirePhoneCode\'"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.SecondeContactPhone;:\', name: \'secondphone\'"\x3e\x3cdiv data-dojo-type\x3d"office.TranslatableNode" data-dojo-props\x3d"text: \'Office.RequirePhoneCode\'"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.HomePhone;:\', name: \'homephone\'"\x3e\x3cdiv data-dojo-type\x3d"office.TranslatableNode" data-dojo-props\x3d"text: \'Office.RequirePhoneCode\'"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.CheckBoxField" data-dojo-attach-point\x3d"personalDataConfirmWidget" data-dojo-props\x3d"text: \'Office.PersonalDataConfirm\', doubleColumn: false, required: true, name: \'confirm1\'"\x3e\x3c/div\x3e\x3cdiv data-dojo-attach-point\x3d"registrationPDAddConfirmNode"\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.CheckBoxField" data-dojo-attach-point\x3d"informationAccuracyConfirmWidget" data-dojo-props\x3d"text: \'Office.InformationAccuracyConfirm\', doubleColumn: false, required: true, name: \'confirm2\'"\x3e\x3c/div\x3e\x3c/div\x3e',
"url:mill/jssupport/layout/layoutContent/registrationPhoneCodeForm.html":'\x3cdiv\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.LastName;:\', required: true, name: \'lastname\'"\x3e\x3cdiv data-dojo-attach-point\x3d"lastNameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.FirstName;:\', required: true, name: \'firstname\'"\x3e\x3cdiv data-dojo-attach-point\x3d"firstNameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.MiddleName;:\', required: true, name: \'middlename\'"\x3e\x3cdiv data-dojo-attach-point\x3d"middleNameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.BirthDate;:\', required: true, name: \'birthdate\', invalidMessage: \'Office.InvalidDate\'"\x3e\x3cdiv data-dojo-attach-point\x3d"birthDateNameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.FilteringSelectField" data-dojo-props\x3d"icon: \'icon-set-man-woman\', text: \'Office.Gender;:\', required: true, name: \'sex\'"\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.Email;:\', required: true, name: \'email\', lowercase: true" data-dojo-attach-point\x3d"emailField"\x3e\x3cdiv data-dojo-attach-point\x3d"email1NameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.TextField" data-dojo-props\x3d"text: \'Office.EmailConfirm;:\', required: true, name: \'emailConfirm\', lowercase: true, invalidMessage: \'Office.InvalidEmailConfirm\'"\x3e\x3cdiv data-dojo-attach-point\x3d"email2NameTooltip"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.PhoneField" data-dojo-props\x3d"text: \'Office.ContactPhone;:\', required: true, name: \'phone\'"\x3e\x3cdiv data-dojo-type\x3d"office.TranslatableNode" data-dojo-props\x3d"text: \'Office.RequirePhoneCode\'"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.PhoneField" data-dojo-props\x3d"text: \'Office.SecondeContactPhone;:\', name: \'secondphone\'"\x3e\x3cdiv data-dojo-type\x3d"office.TranslatableNode" data-dojo-props\x3d"text: \'Office.RequirePhoneCode\'"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.PhoneField" data-dojo-props\x3d"text: \'Office.HomePhone;:\', name: \'homephone\'"\x3e\x3cdiv data-dojo-type\x3d"office.TranslatableNode" data-dojo-props\x3d"text: \'Office.RequirePhoneCode\'"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.CheckBoxField" data-dojo-attach-point\x3d"personalDataConfirmWidget" data-dojo-props\x3d"text: \'Office.PersonalDataConfirm\', doubleColumn: false, required: true, name: \'confirm1\'"\x3e\x3c/div\x3e\x3cdiv data-dojo-attach-point\x3d"registrationPDAddConfirmNode"\x3e\x3c/div\x3e\x3cdiv data-dojo-type\x3d"office.form.CheckBoxField" data-dojo-attach-point\x3d"informationAccuracyConfirmWidget" data-dojo-props\x3d"text: \'Office.InformationAccuracyConfirm\', doubleColumn: false, required: true, name: \'confirm2\'"\x3e\x3c/div\x3e\x3c/div\x3e'}});
define("mill/jssupport/layout/layoutContent/RegistrationForm","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-style dojo/dom-construct dojo/on dojo/cookie dojo/store/Memory dojo/text!mill/jssupport/layout/layoutContent/registrationForm.html dojo/text!mill/jssupport/layout/layoutContent/registrationPhoneCodeForm.html mill/jssupport/form/_FormContent mill/jssupport/base mill/mill".split(" "),function(u,h,p,v,q,r,w,x,t,y,z,a,A){if("acForeignAbiturient"===a.accessCategory||"acForeignMagAbiturient"===
a.accessCategory||window.app)t=y;return mill.registerAlias("office.RegistrationForm",u("mill.jssupport.layout.layoutContent.RegistrationForm",[z],{content:t,formTitle:"Office.SignUp",hideSubmitTextColumn:"false",birthDateOptionValue:null,startup:function(){this.inherited(arguments);this.formWidgets.sex.widget.set("store",new x({data:[{id:"0",ID:"0",Description:"\u0416\u0435\u043d\u0441\u043a\u0438\u0439",EngDescription:"Female"},{id:"1",ID:"1",Description:"\u041c\u0443\u0436\u0441\u043a\u043e\u0439",
EngDescription:"Male"}]}));this.formWidgets.birthdate.widget.set("validator",function(d){d=!!this.formWidgets.birthdate.widget.get("value")&&this.dateValidator()(d);this.formWidgets.birthdate.widget.set("invalidMessageIdentifier","Office.InvalidDate");if(d&&("acSchoolOlymp"===a.accessCategory||"acStudOlymp"===a.accessCategory)){var k=function(f){f=Date.now()-f.getTime();return Math.abs((new Date(f)).getUTCFullYear()-1970)};this.birthDateOptionValue||mill.executeMethodJson({handler:a.anonymousHandler,
headers:{"Disable-Basic-Auth":"yes"},sync:!0,className:"TRegistrationRequest",methodName:"GetOlympBirthDateOptionValue",load:function(f){this.birthDateOptionValue=f[0]}.bind(this)});var c=this.formWidgets.birthdate.widget.get("value");c&&(k=k(mill.parseDate(c)),c=!0,"acSchoolOlymp"===a.accessCategory?(c&&mill.fieldValue(this.birthDateOptionValue,"SchoolOlympMinAge")&&(c=k>=mill.fieldValue(this.birthDateOptionValue,"SchoolOlympMinAge")),c&&mill.fieldValue(this.birthDateOptionValue,"SchoolOlympMaxAge")&&
(c=k<=mill.fieldValue(this.birthDateOptionValue,"SchoolOlympMaxAge"))):"acStudOlymp"===a.accessCategory&&(c&&mill.fieldValue(this.birthDateOptionValue,"StudOlympMinAge")&&(c=k>=mill.fieldValue(this.birthDateOptionValue,"StudOlympMinAge")),c&&mill.fieldValue(this.birthDateOptionValue,"StudOlympMaxAge")&&(c=k<=mill.fieldValue(this.birthDateOptionValue,"StudOlympMaxAge"))),c||(this.formWidgets.birthdate.widget.set("invalidMessageIdentifier","Office.InvalidAge"),d=!1))}return d}.bind(this));this.formWidgets.email.widget.set("validator",
h.hitch(this,this.emailValidator));this.formWidgets.emailConfirm.widget.set("validator",h.hitch(this,this.emailConfirmValidator));r(this.getFormWidget("emailConfirm"),"paste",function(d){d.preventDefault()});var l=RegExp("^[\u0430-\u044f\u0410-\u042f\u0451\u0401\\s-]+$");p.forEach(["lastname","firstname","middlename"],h.hitch(this,function(d){var k=this.getFormWidget(d);"acSchoolOlymp"!==a.accessCategory&&"acStudOlymp"!==a.accessCategory||k.set("validator",function(c){return!c&&!k.get("required")||
l.test(c)});this.getFormWidget(d).set("intermediateChanges",!1);r(this.getFormWidget(d),"change",h.hitch(this,function(c){if(c===c.toUpperCase()&&mill.letterChar.test(c)){for(var f="",g=0;g<c.length;g++)f=0===g?c[g].toUpperCase():mill.letterChar.test(c[g])&&!mill.letterChar.test(c[g-1])?f+c[g].toUpperCase():f+(mill.letterChar.test(c[g])?c[g].toLowerCase():c[g]);this.getFormWidget(d).set("value",f)}}))}));a.registrationPDConfirmText&&this.personalDataConfirmWidget.set("text",a.registrationPDConfirmText+
(this.personalDataConfirmWidget.get("required")?";*":""));if(a.registrationPDAddConfirmText){var b=new office.form.CheckBoxField({name:"confirmX",text:a.registrationPDAddConfirmText,doubleColumn:!1,required:!0},this.registrationPDAddConfirmNode);this.registerWidget(b.controlNode)}a.registrationAccuracyConfirmText&&this.informationAccuracyConfirmWidget.set("text",a.registrationAccuracyConfirmText+(this.informationAccuracyConfirmWidget.get("required")?";*":""));if(a.registrationRequestTimePoint){b=
"boolean"===typeof a.registrationRequestTimePoint.startTimePoint?a.registrationRequestTimePoint.startTimePoint:!0;var m="boolean"===typeof a.registrationRequestTimePoint.endTimePoint?a.registrationRequestTimePoint.endTimePoint:!1;if(!b||m)this.hideActions(),this.toggleFormView(),this.createErrorMessage(b?"Office.RegistrationFinished":"Office.RegistrationNotStarted","blocked")}b=null;"acMagAbiturient"===a.accessCategory?b="MagAbit.":"acBachAbiturient"===a.accessCategory?b="BachAbit.":"acForeignAbiturient"===
a.accessCategory?b="ForeignAbit.":"acForeignMagAbiturient"===a.accessCategory?b="ForeignAbit.":"acLyceumAbit"===a.accessCategory?b="LyceumAbit.":"acForeignPrepStudent"===app.accessCategory?b="ForeignPrepStud.":"acBachAbiturient"===app.accessCategory?b="BachAbitur.":"acMagAbiturient"===app.accessCategory&&(b="MagAbitur.");b&&(new office.TranslatableNode({text:b+"Reg.LastNameTooltip"},this.lastNameTooltip),new office.TranslatableNode({text:b+"Reg.FirstNameTooltip"},this.firstNameTooltip),new office.TranslatableNode({text:b+
"Reg.MiddleNameTooltip"},this.middleNameTooltip),new office.TranslatableNode({text:b+"Reg.BirthDateNameTooltip"},this.birthDateNameTooltip),new office.TranslatableNode({text:b+"Reg.Email1NameTooltip"},this.email1NameTooltip),new office.TranslatableNode({text:b+"Reg.Email2NameTooltip"},this.email2NameTooltip));if("acForeignAbiturient"===a.accessCategory||"acForeignMagAbiturient"===a.accessCategory||"acLyceumAbit"===a.accessCategory||"acBachAbiturient"===a.accessCategory||"acNostrificant"===a.accessCategory||
window.app&&("acForeignPrepStudent"===window.app.accessCategory||"acBachAbiturient"===window.app.accessCategory||"acMagAbiturient"===window.app.accessCategory)){("acForeignAbiturient"===a.accessCategory||"acForeignMagAbiturient"===a.accessCategory||window.app&&"acForeignPrepStudent"===window.app.accessCategory)&&this.getField("middlename").set("required",!1);b=this.getField("confirm1").translatableNode;m=b.domNode.parentNode;var n=m.parentNode;q.place(b.domNode,n,"last");dojo.destroy(m);v.set(b.domNode,
{color:"#005fb6",borderBottom:"dashed 1px #005fb6",cursor:"pointer"});var e=new office.TranslatableNode({doProcessIR:!0,style:h.delegate(office.TranslatableNode.prototype.style,{margin:"5px 0"})},q.create("div",{},n));"acForeignAbiturient"!==a.accessCategory&&"acForeignMagAbiturient"!==a.accessCategory||b.set("onClick",function(){e.set("text",e.get("text")?"":"ForeignAbit.PDConfirmExtended")});"acLyceumAbit"===a.accessCategory&&b.set("onClick",function(){e.set("text",e.get("text")?"":"LyceumAbit.PDConfirmExtended")});
"acBachAbiturient"!==a.accessCategory&&"acBachAbiturient"!==window.app.accessCategory||b.set("onClick",function(){e.set("text",e.get("text")?"":"BachAbitur.PDConfirmExtended")});"acMagAbiturient"!==a.accessCategory&&"acMagAbiturient"!==window.app.accessCategory||b.set("onClick",function(){e.set("text",e.get("text")?"":"MagAbitur.PDConfirmExtended")});"acNostrificant"===a.accessCategory&&b.set("onClick",function(){e.set("text",e.get("text")?"":"Nostr.PDConfirmExtended")});!window.app||"acForeignPrepStudent"!==
window.app.accessCategory&&"acBachAbiturient"!==window.app.accessCategory&&"acMagAbiturient"!==window.app.accessCategory||(b.set("onClick",function(){e.set("text",e.get("text")?"":window.app.combinedTranslationIdent("RegistrationPDConfirmExtended"))}),this.getFormWidget("phone").set("store",app.createStore({data:window.app.anonymousDataByIdent("countries")})),this.getFormWidget("secondphone").set("store",app.createStore({data:window.app.anonymousDataByIdent("countries")})),this.getFormWidget("homephone").set("store",
app.createStore({data:window.app.anonymousDataByIdent("countries")})));if("acForeignAbiturient"===a.accessCategory||"acForeignMagAbiturient"===a.accessCategory)(b=this.getField("confirm1"))?(p.forEach(["phone","secondphone","homephone"],function(d){if(d=this.getField(d))d.set("required",!1),window.app.hideControlForNode(d,!0)},this),m=new office.form.PhoneField({text:"Office.MobileNumber;:",name:"mobile",required:!0}),n=m.controlNode,n.set("store",app.createStore({data:window.app.anonymousDataByIdent("countries")})),
this.registerWidget(n),m.placeAt(b.domNode,"before")):window.undefined}},getContactMessengerValues:function(){return{}},postForm:function(){this.inherited(arguments);var l=this.gatherFormValues(null);l.lastname=a.secondNameToLowerCase(l.lastname.charAt(0).toUpperCase()+l.lastname.slice(1));l.firstname=a.secondNameToLowerCase(l.firstname.charAt(0).toUpperCase()+l.firstname.slice(1));var b=this.getWidgetAttr("middlename","value")||"-";b=a.secondNameToLowerCase(b.charAt(0).toUpperCase()+b.slice(1));
this.postRequest({url:A.getRequestUrl(a.registerHandler||(window.app?app.registerHandler:""),"RegistrationRequest.xml"),data:h.mixin(l,this.getContactMessengerValues(),{className:a.registrationRequestClass||(window.app?app.registrationClass:""),refertext:mill.getReferText(),accesscategory:a.accessCategory||(window.app?app.accessCategory:""),locale:a.locale,middlename:b,roistatcounter:w("roistat_visit")})}).then(h.hitch(this,function(m){h.isFunction(window.initWebAnalyticsDataLayer)&&window.initWebAnalyticsDataLayer();
this.createSuccessMessage("Office.SignUpRequestSuccess",h.hitch(this,function(){this.toggleFormView()}),null,null,!1);this.toggleFormView();this.resetForm()}))}}))});