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,EAAY,OAAP,EAAAiC,SAAsB,IAAP,EAAAA,QAAgB,EAAS,EAAAA,GAAGE,kCAA+C,IAAPnC,EAAgBA,EAAK,8BAEpS9J,KAAKkL,MAAMgB,QACtB,EAEJlB,EAAcmB,YAAc,I","sources":["webpack://App/./Client/include/common.js","webpack://App/./Client/include/jquery-components/bootstrap-select/index.js","webpack://App/./Client/include/network/network.ts","webpack://App/./Client/include/react-common/theme.tsx","webpack://App/./Client/include/react-components/ErrorBoundary/ErrorBoundary.tsx"],"sourcesContent":["import moment from 'moment';\r\nimport $ from 'jquery';\r\nimport { ajaxPost } from 'network/network-old.js';\r\nimport 'jquery-components/js-offcanvas';\r\nimport 'jquery-components/bootstrap-modal';\r\nimport 'jquery-components/bootstrap-select';\r\nimport { readCsrfToken } from 'network/network';\r\nimport { formatString } from './appI18n';\r\nimport { appUrl } from './utils';\r\n\r\n// Установка локали в зависимости от выбранного языка для moment.js.\r\nmoment.locale(language);\r\n\r\n// Общие настройки\r\n$(function () {\r\n\r\n jQuery.ajaxSettings.traditional = true; // Чтобы массивы сериализовались без []\r\n rebindExpand();\r\n // Ссылки плавного перемещения\r\n $(\"a[data-smooth-scroll]\").click(function (evt) {\r\n evt.preventDefault();\r\n var hash = $(this).attr(\"href\");\r\n $(\"html, body\").animate({ scrollTop: $(hash).offset().top }, 300);\r\n });\r\n});\r\n\r\nfunction rebindExpand() {\r\n // Ссылки раскрытия области\r\n $(\".expand-link\").off(\"click\", expandLink);\r\n $(\".expand-link\").on(\"click\", expandLink);\r\n}\r\n\r\nfunction expandLink(evt) {\r\n evt.preventDefault();\r\n var link = $(this);\r\n var srcClass = link.attr(\"data-src-class\");\r\n var toggleClass = link.attr(\"data-class\");\r\n $(\".\" + srcClass).toggleClass(toggleClass);\r\n link.toggleClass(\"expanded\");\r\n\r\n}\r\n\r\n// https://stackoverflow.com/questions/563406/add-days-to-javascript-date\r\nDate.prototype.addDays = function (days) {\r\n var dat = new Date(this.valueOf());\r\n dat.setDate(dat.getDate() + days);\r\n return dat;\r\n}\r\n\r\n// Отображает значок загрузки\r\nfunction showLoader() {\r\n $(\".wait-loading\").addClass(\"loading\");\r\n}\r\n\r\n// Скрывает значок загрузки\r\nfunction hideLoader() {\r\n $(\".wait-loading\").removeClass(\"loading\");\r\n}\r\n\r\n// Преобразование числа в строку https://stackoverflow.com/questions/5314237/is-there-a-functionality-in-javascript-to-convert-values-into-specific-locale-fo\r\nfunction numberToString(number, decimalPlaces) {\r\n var decimalCharacter = (language == \"ru\" ? \",\" : \".\"), thousandsCharacter = (language == \"ru\" ? \" \" : \",\");\r\n var symbolLocation = (symbolLocation == undefined || symbolLocation < 1 || symbolLocation == \"begin\") ? \"begin\" : \"end\";\r\n var decimalPlaces = isNaN(decimalPlaces = Math.abs(decimalPlaces)) ? 2 : decimalPlaces;\r\n var thisNumber = parseFloat(number.toFixed(decimalPlaces));\r\n var decimalCharacter = decimalCharacter == undefined ? \".\" : decimalCharacter;\r\n var thousandsCharacter = thousandsCharacter == undefined ? \",\" : thousandsCharacter;\r\n var pmB = thisNumber < 0 ? \"-\" : \"\";\r\n var i = parseInt(thisNumber = Math.abs(+thisNumber || 0)) + \"\";\r\n var j = (j = i.length) > 3 ? j % 3 : 0;\r\n var retString = pmB;\r\n retString += (j ? i.substr(0, j) + thousandsCharacter : \"\")\r\n retString += i.substr(j).replace(/(\\d{3})(?=\\d)/g, \"$1\" + thousandsCharacter);\r\n retString += (decimalPlaces ? decimalCharacter + (Math.floor(parseFloat(Math.abs(thisNumber - i).toFixed(6)) * Math.pow(10, decimalPlaces)) / Math.pow(10, decimalPlaces)).toFixed(decimalPlaces).slice(decimalPlaces) : \"\");\r\n return retString;\r\n};\r\n\r\n// Настройка страницы входа\r\nfunction setupLoginPage() {\r\n setupLoginControl(function (data) {\r\n if (data.redirectTo)\r\n window.location.href = data.redirectTo;\r\n });\r\n}\r\n\r\n\r\n// Настройка страницы регистрации\r\nfunction setupRegistrationPage() {\r\n $('.registration-form .tab-switcher input[name=\"tab-chooser\"]').on('change', function () {\r\n $(this).closest('[data-active-tab]').attr('data-active-tab', $(this).val());\r\n });\r\n $(\".registration-form .reg-data\").submit(function (evt) {\r\n evt.preventDefault();\r\n $(this).validator(\"validate\");\r\n if ($(\".has-error\", this).length)\r\n return;\r\n $(\".form-error\", this).text(\"\");\r\n\r\n switch (parseInt($('input[name=\"userType\"]', this).val())) {\r\n case 0:\r\n var submitUrl = appBase + \"Home/Registration\";\r\n break;\r\n case 1:\r\n var submitUrl = appBase + \"Home/ClientRegistration\";\r\n break;\r\n default:\r\n return;\r\n }\r\n var form = this;\r\n ajaxPost(submitUrl, $(this).serialize(), function (data) {\r\n if (data.Error) {\r\n showErrorDialog(data.Error);\r\n } else {\r\n $(form).addClass(\"dont-show\");\r\n $(\".tab-switcher\").addClass(\"dont-show\");\r\n $(\"~ .register-success\", form).removeClass(\"dont-show\");\r\n }\r\n });\r\n });\r\n\r\n if ($('[name=\"countryId\"]')) {\r\n ajaxGet(appBase + \"Home/GetCountries\", {}, function (data) {\r\n if (Array.isArray(data.data)) {\r\n updateBootstrapSelect($('[name=\"countryId\"]'), undefined, data.data.map(x => ([x.id, x.name])));\r\n }\r\n });\r\n $('[name=\"countryId\"]').change(function (evt) {\r\n var value = evt.target.value;\r\n ajaxGet(appBase + \"Home/GetCities\", { countryId: value }, function (data) {\r\n if (Array.isArray(data.data)) {\r\n updateBootstrapSelect($('[name=\"cityId\"]'), undefined, data.data.map(x => ([x.id, x.name])));\r\n }\r\n });\r\n })\r\n };\r\n}\r\n\r\nfunction updateBootstrapSelect($el, value, optionList) {\r\n // Убрать все дочерние