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AC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC","sources":["webpack://ICF/./TypeScript/App/CISAddressTypeAhead.ts","webpack://ICF/./TypeScript/App/Shared/Utility.ts","webpack://ICF/webpack/bootstrap","webpack://ICF/./TypeScript/App/Enrollment/Validate.ts"],"sourcesContent":["/// \r\n/// \r\n\r\nexport class AddressTypeAhead {\r\n\tprivate _url: string;\r\n\tprivate _displayingUnits: boolean;\r\n\r\n\tconstructor(url) {\r\n\t\tthis._url = url;\r\n\t\tthis._displayingUnits = false;\r\n\t}\r\n\r\n\tSetup(typeaheadId: string, melissaKeyId: string, unitNumberId: string) {\r\n\r\n\t\tvar typeaheadName = typeaheadId.split('_').join('.');\r\n\t\tvar timeout;\r\n\r\n\t\t$(\"#loadingSpinner\").hide();\r\n\r\n\t\tvar xhr;\r\n\r\n\t\t$(\"#\" + typeaheadId).on('input', function () {\r\n\t\t\tif (!$(\"#\" + typeaheadId).val() || $(\"#\" + typeaheadId).val()[0].length === 0) {\r\n\t\t\t\tclearTimeout(timeout);\r\n\t\t\t\ttimeout = null;\r\n\t\t\t\t$(\"#loadingSpinner\").hide();\r\n\t\t\t\tif (xhr) {\r\n\t\t\t\t\txhr.abort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tvar map = {};\r\n\t\tvar objects = [];\r\n\t\tvar bestPictures;\r\n\r\n\r\n\t\t$(\"#\" + typeaheadId).typeahead({\r\n\t\t\thighlight: true,\r\n\t\t},\r\n\t\t\t{\r\n\t\t\t\tlimit: 20,\r\n\t\t\t\tsource: (query, syncResults, asyncResults) => {\r\n\t\t\t\t\tif (query.length < 3) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (timeout) {\r\n\t\t\t\t\t\tclearTimeout(timeout);\r\n\t\t\t\t\t\ttimeout = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (xhr) {\r\n\t\t\t\t\t\txhr.abort();\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\ttimeout = setTimeout(() => {\r\n\t\t\t\t\t\t$(\"#loadingSpinner\").show();\r\n\r\n\t\t\t\t\t\t//not sure why this is needed either since with valid input bound model this is how it's named anyways\r\n\t\t\t\t\t\t//Handle unique typeahead field names\r\n\t\t\t\t\t\t//if ($(\".icf-typeahead-field\").length) {\r\n\t\t\t\t\t\t//\t$(\".icf-typeahead-field:not([readonly])\").attr(\"id\", typeaheadName);\r\n\t\t\t\t\t\t//\t$(\".icf-typeahead-field:not([readonly])\").attr(\"name\", typeaheadName.split('_').join('.'));\r\n\t\t\t\t\t\t//}\r\n\r\n\t\t\t\t\t\tvar datax = $(\"#validate-form\").serialize();\r\n\r\n\t\t\t\t\t\t//I'm not sure why this exists\r\n\t\t\t\t\t\t//Reset typeahead field to be unique\r\n\t\t\t\t\t\t//if ($(\".icf-typeahead-field\").length) {\r\n\t\t\t\t\t\t//\tvar uniqueFldId = Date.now();\r\n\t\t\t\t\t\t//\t$(\".icf-typeahead-field\").attr(\"id\", uniqueFldId);\r\n\t\t\t\t\t\t//\t$(\".icf-typeahead-field\").attr(\"name\", uniqueFldId);\r\n\t\t\t\t\t\t//}\r\n\r\n\t\t\t\t\t\t//var url = '@Url.Action(\"_TypeaheadAddress\", \"Eligibility\")';\r\n\r\n\t\t\t\t\t\txhr = $.ajax(\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\ttype: \"POST\",\r\n\t\t\t\t\t\t\t\turl: this._url,\r\n\t\t\t\t\t\t\t\tdata: datax,\r\n\t\t\t\t\t\t\t\tsuccess: (jsonData) => {\r\n\t\t\t\t\t\t\t\t\tconsole.log(jsonData);\r\n\t\t\t\t\t\t\t\t\tmap = {};\r\n\t\t\t\t\t\t\t\t\tobjects = [];\r\n\t\t\t\t\t\t\t\t\t//capitalization matters for .address since .Address doesn't work\r\n\t\t\t\t\t\t\t\t\t$.each(jsonData, (i, object) => {\r\n\t\t\t\t\t\t\t\t\t\tmap[object.Address] = object;\r\n\t\t\t\t\t\t\t\t\t\tobjects.push(object.Address);\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\tasyncResults(objects);\r\n\t\t\t\t\t\t\t\t\t$(\"#loadingSpinner\").hide();\r\n\r\n\t\t\t\t\t\t\t\t\tclearTimeout(timeout);\r\n\t\t\t\t\t\t\t\t\ttimeout = null;\r\n\t\t\t\t\t\t\t\t\txhr = null;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t}, 400);\r\n\t\t\t\t},\r\n\t\t\t\ttemplates: {\r\n\t\t\t\t\tnotFound: [\r\n\t\t\t\t\t\t'
',\r\n\t\t\t\t\t\t'No results found',\r\n\t\t\t\t\t\t'
'\r\n\t\t\t\t\t].join('\\n')\r\n\t\t\t\t}\r\n\t\t\t}).keyup((e) => {\r\n\t\t\t\t//Ignore tab\r\n\t\t\t\tif (e.keyCode != 9) {\r\n\t\t\t\t\t$(\"#\" + melissaKeyId).val(\"\");\r\n\t\t\t\t}\r\n\t\t\t});;\r\n\r\n\t\t$(\"#\" + typeaheadId).on('typeahead:selected', (evt, item) => {\r\n\t\t\t//Check if selected address has units.\r\n\t\t\tif (map[item].Units && map[item].Units.length > 0) {\r\n\t\t\t\tthis._displayingUnits = true;\r\n\t\t\t\t$(\"#\" + unitNumberId).empty();\r\n\t\t\t\t$(\"#\" + unitNumberId).append($('').attr('value', '').text(''));\r\n\r\n\t\t\t\t$.each(map[item].Units, (index, item) => {\r\n\t\t\t\t\t$(\"#\" + unitNumberId).append($('').attr('value', item.MelissaAddressKey).text(item.UnitName));\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$('#divUnit').show();\r\n\t\t\t\t$(\"#\" + melissaKeyId).val('');\r\n\t\t\t\tthis.SetCISTypeaheadError(typeaheadName, \"\");\r\n\r\n\t\t\t} else {\r\n\t\t\t\tthis._displayingUnits = false;\r\n\t\t\t\t$('#divUnit').hide();\r\n\t\t\t\t$(\"#\" + melissaKeyId).val(map[item].Key);\r\n\r\n\t\t\t\tvar e: Event = new Event('icf-eligibility-selected');\r\n\t\t\t\tdocument.dispatchEvent(e);\r\n\t\t\t\tthis.SetCISTypeaheadError(typeaheadName, \"\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$(\"#\" + typeaheadId).blur(() => {\r\n\t\t\t//console.log(\"blur melissa: \" + $(\"#\" + melissaKeyId).val());\r\n\t\t\t//console.log(\"blur typeaheadName: \" +$(\"#\" + typeaheadId).val());\r\n\r\n\t\t\t//if CIS is chosen instead of Melissa, it will have a -1 MAK\r\n\t\t\tvar rid = $(\"#\" + melissaKeyId).val();\r\n\t\t\tif ((rid == \"\" || rid == null) && (this._displayingUnits == false)) {\r\n\t\t\t\tthis.SetCISTypeaheadError(typeaheadName, \"Please select an address from the list.\");\r\n\t\t\t\t$(\"#\" + typeaheadId).val(\"\");\r\n\r\n\t\t\t\tvar e: Event = new Event('icf-eligibility-deselected');\r\n\t\t\t\tdocument.dispatchEvent(e);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tthis.SetCISTypeaheadError(typeaheadName, \"\");\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\r\n\t\t$(\"#\" + unitNumberId).change(() => {\r\n\t\t\t$(\"#\" + melissaKeyId).val($(\"#\" + unitNumberId).val());\r\n\r\n\t\t\tvar e: Event = new Event('icf-eligibility-selected');\r\n\t\t\tdocument.dispatchEvent(e);\r\n\t\t});\r\n\r\n\t\t$(\"#\" + typeaheadId).prop('autocomplete', 'notallowed');\r\n\t}\r\n\r\n\tSetCISTypeaheadError(name, message) {\r\n\t\tvar span = $(\"span[data-valmsg-for=\\\"\" + name + \"\\\"]\");\r\n\t\tif (span && span.length > 0) {\r\n\t\t\t$(span).html(message);\r\n\t\t\tif (message && message != \"\") {\r\n\t\t\t\t$(span).removeClass(\"field-validation-valid\");\r\n\t\t\t\t$(span).addClass(\"field-validation-no-valid\");\r\n\t\t\t} else {\r\n\t\t\t\t$(span).removeClass(\"field-validation-no-valid\");\r\n\t\t\t\t$(span).addClass(\"field-validation-valid\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n","/// \r\n\r\nexport interface SelectListItem {\r\n disabled: boolean;\r\n group: SelectListGroup;\r\n selected: boolean;\r\n value: string;\r\n text: string;\r\n}\r\n\r\nexport interface SelectListGroup {\r\n disabled: boolean;\r\n name: string;\r\n}\r\n\r\nexport class Utility {\r\n\r\n public static SendAntiForgery(): any {\r\n return { \"__RequestVerificationToken\": $('input[name=__RequestVerificationToken]').val() }\r\n }\r\n\r\n public static ShowCancelModal(): void {\r\n $('#CancelModal').data(\"kendoDialog\").open();\r\n }\r\n\r\n public static OnOpen(): void{\r\n $(\"#cancelButton\").slideUp();\r\n $(\"#submitButton\").slideUp();\r\n }\r\n\r\n public static OnClose(): void{\r\n $(\"#cancelButton\").slideDown();\r\n $(\"#submitButton\").slideDown();\r\n }\r\n\r\n public static RedirectToHomeIndex(): void{\r\n const baseUrl = window.location.origin;\r\n window.location.href = `${baseUrl}/Home/Index`;\r\n }\r\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/// \r\n/// \r\n/// \r\n/// \r\nimport { AddressTypeAhead } from \"../CISAddressTypeAhead\";\r\nimport { Utility } from \"../Shared/Utility\";\r\nexport { Utility } from \"../Shared/Utility\";\r\n\r\nexport class Validate {\r\n\r\n Initialize(): void {\r\n this.BindSubmitButtonHandler();\r\n const cisUrl: string = `${location.protocol}//${location.host}/api/Eligibility/TypeaheadAddress`;\r\n const typeAhead = new AddressTypeAhead(cisUrl);\r\n typeAhead.Setup(\"TypeaheadAddress\", \"MelissaAddressKey\", \"UnitNumber\");\r\n\r\n this.ShowHideCustomerLookupFields($(\"#CisValidationTypeCode\").val());\r\n this.BindHandlers();\r\n //getting value from hidden input with ViewBag.AccountNumberMask value\r\n $(\"#AccountNumber\").mask($(\"#accountNumberMask\").val().toString());\r\n }\r\n\r\n ShowHideCustomerLookupFields(lookupType): void {\r\n $(\"#divBillingNumber\").hide();\r\n $(\"#divTypeaheadAddress\").hide();\r\n $(\"#divZipcode\").hide();\r\n $(\"#divUnit\").hide();\r\n //console.log(lookupType);\r\n switch (lookupType) {\r\n case \"1\":\r\n $(\"#divBillingNumber\").show();\r\n $(\"#divZipcode\").show();\r\n break;\r\n case \"2\": \r\n $(\"#divTypeaheadAddress\").show();\r\n break;\r\n }\r\n } \r\n\r\n BindHandlers(): void {\r\n $(\"#CisValidationTypeCode\").change((() => {\r\n this.ShowHideCustomerLookupFields($(\"#CisValidationTypeCode\").val());\r\n this.ResetInputs();\r\n }));\r\n }\r\n\r\n ResetInputs(): void {\r\n $(\"#AccountNumber\").val('');\r\n $(\"#TypeaheadAddress\").val('');\r\n $(\"#ZipCode\").val('');\r\n $(\"#UnitNumber\").val('');\r\n }\r\n\r\n BindSubmitButtonHandler(): void {\r\n ///Continue button handles the \"submit\" on the page\r\n ///Make sure only one \"click\" event is processed.\r\n ///Note: one() will remove the click handler, so if validation fails, it needs to be reattached.\r\n $(\"#submitButton\").one('click', (evt) => {\r\n if ($(\"#validate-form\").valid()) {\r\n $(evt.target).slideUp();\r\n $(\"#cancelButton\").slideUp();\r\n $(\"#validate-form\").trigger(\"submit\");\r\n } else {\r\n this.BindSubmitButtonHandler();\r\n }\r\n });\r\n }\r\n}\r\n\r\n//DOM\r\n((window: any, document: any) => {\r\n $(() => {\r\n var validate = new Validate();\r\n validate.Initialize();\r\n\t});\r\n})(window, document);\r\n"],"names":[],"sourceRoot":""}