{"version":3,"file":"sm.portal.vm.personinformation.uk.min.js","names":["jQuery","undefined","sm","window","portal","extend","vm","ukpersoninformation","ExtractATO","personInformation","dateFormat","resources","portalResource","getValue","toUpperCase","dateOfBirth","moment","DateOfBirth","format","smapi","community","PersonModel","SalutationID","GivenName","FirstName","MiddleName","Surname","LastName","PreferredGivenName","PreferredName","GenderID","TaxID","utility","isNullOrEmpty","ID","SuffixID","CRMRankID","LeadTypeID","ExtendDOB","required","message","getResourceValue","constant","validate_FieldRequired_Key","onlyIf","self","IsDOBRequired"],"sources":["assets/js/localization/uk/helpers/viewmodels/admissions/sm.portal.vm.personinformation.uk.js"],"mappings":"CAAA,SAAWA,EAAQC,GACf,IAAIC,EAAKC,OAAOD,GAAKC,OAAOD,IAAM,CAAC,OAIV,IAAdA,EAAGE,QACVJ,EAAOK,OAAOH,EAAI,CAAEE,OAAQ,CAAC,SAEL,IAAjBF,EAAGE,OAAOE,IACjBN,EAAOK,OAAOH,EAAGE,OAAQ,CAAEE,GAAI,CAAC,SAEY,IAArCJ,EAAGE,OAAOE,GAAGC,qBACpBP,EAAOK,OAAOH,EAAGE,OAAOE,GAAI,CAAEC,oBAAqB,CAAC,IAmCxDP,EAAOK,QAAO,EAAMH,EAAGE,OAAOE,GAAGC,oBAAqB,CAClDC,WAjCJ,SAAoBC,GAChB,IAAIC,EAAaR,EAAGS,UAAUC,eAAeC,SAAS,qBAAqBC,cACvEC,EAAcC,OAAOP,EAAkBQ,cAAeP,GAAYQ,OAAO,cAE7E,OAAO,IAAIC,MAAMC,UAAUC,YAAY,CACnCC,aAAcb,EAAkBa,eAChCC,UAAWd,EAAkBe,YAC7BC,WAAYhB,EAAkBgB,aAC9BC,QAASjB,EAAkBkB,WAC3BC,mBAAoBnB,EAAkBoB,gBACtCZ,YAAaF,EACbe,SAAUrB,EAAkBqB,WAC5BC,MAAO7B,EAAGE,OAAO4B,QAAQC,cAAcxB,EAAkBsB,SAAW,KAAOtB,EAAkBsB,QAC7FG,GAAIzB,EAAkByB,KACtBC,UAAW,EACXC,WAAY,EACZC,YAAa,GAErB,EAgBIC,UAdJ,SAAmB7B,GAEfA,EAAkBQ,YAAYZ,OAAO,CACjCkC,SAAU,CACNC,QAAStC,EAAGE,OAAO4B,QAAQS,iBAAiBtB,MAAMuB,SAASC,4BAC3DC,OAAQ,WACJ,OAAOC,KAAKC,eAChB,IAGZ,GAOH,CApDD,CAoDG9C","ignoreList":[],"sourcesContent":["(function (jQuery, undefined) {\r\n var sm = window.sm = window.sm || {};\r\n var windowProxy;\r\n var actionQueue = [];\r\n\r\n if (typeof sm.portal === \"undefined\") {\r\n jQuery.extend(sm, { portal: {} });\r\n }\r\n if (typeof sm.portal.vm === \"undefined\") {\r\n jQuery.extend(sm.portal, { vm: {} });\r\n }\r\n if (typeof sm.portal.vm.ukpersoninformation === \"undefined\") {\r\n jQuery.extend(sm.portal.vm, { ukpersoninformation: {} });\r\n }\r\n\r\n function ExtractATO(personInformation){\r\n var dateFormat = sm.resources.portalResource.getValue('DateFormatExample').toUpperCase();\r\n var dateOfBirth = moment(personInformation.DateOfBirth(), dateFormat).format('YYYY-MM-DD');\r\n\r\n return new smapi.community.PersonModel({\r\n SalutationID: personInformation.SalutationID(),\r\n GivenName: personInformation.FirstName(),\r\n MiddleName: personInformation.MiddleName(),\r\n Surname: personInformation.LastName(),\r\n PreferredGivenName: personInformation.PreferredName(),\r\n DateOfBirth: dateOfBirth,\r\n GenderID: personInformation.GenderID(),\r\n TaxID: sm.portal.utility.isNullOrEmpty(personInformation.TaxID()) ? null : personInformation.TaxID(),\r\n ID: personInformation.ID(),\r\n SuffixID: -1,\r\n CRMRankID: -1,\r\n LeadTypeID: -1\r\n });\r\n }\r\n\r\n function ExtendDOB(personInformation)\r\n {\r\n personInformation.DateOfBirth.extend({\r\n required: {\r\n message: sm.portal.utility.getResourceValue(smapi.constant.validate_FieldRequired_Key),\r\n onlyIf: function () {\r\n return self.IsDOBRequired();\r\n }\r\n }\r\n })\r\n }\r\n\r\n jQuery.extend(true, sm.portal.vm.ukpersoninformation, {\r\n ExtractATO: ExtractATO,\r\n ExtendDOB : ExtendDOB\r\n });\r\n\r\n})(jQuery);"]}