{"version":3,"sources":["common-post.js","checkbox-component.js","claim-component.js","consumer-loan-component.js","contact-component.js","currency-calculator-component.js","currency-select-component.js","datepicker-component.js","ethic-component.js","file-upload-component.js","form-select-component.js","loan-calculator-component.js","loan-component.js","range-slider-component.js","salary-component.js","phrase-filter.js","app.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA","file":"post.min.js","sourcesContent":["svg4everybody();\r\n\r\n$('.header__search-link').on('click', function() {\r\n $(this).toggleClass('focus');\r\n $(this).siblings('.header__search-form').toggleClass('expanded');\r\n $(this).siblings('.header__search-form').find('input').focus();\r\n return false;\r\n});\r\n\r\n$('.sidemenu__menu-link.has-child').on('click', function() {\r\n var _trigger = $(this);\r\n var _triggerParent = $(this).parents('.sidemenu__menu-item');\r\n _triggerParent.toggleClass('open');\r\n $('.sidemenu__menu-link.has-child').not(_trigger).parents('.sidemenu__menu-item').removeClass('open');\r\n return false;\r\n});\r\n\r\n$('.header__hamburger').on('click', function() {\r\n $('.sidemenu').addClass('open');\r\n $('body').addClass('sidemenu-shown sidemenu-shown compensate-for-scrollbar');\r\n return false;\r\n});\r\n\r\n$('.sidemenu__close-trigger').on('click', function() {\r\n $('.sidemenu').removeClass('open');\r\n $('body').removeClass('sidemenu-shown compensate-for-scrollbar');\r\n return false;\r\n});\r\n\r\n$('.js-application-trigger').on('click', function() {\r\n var _this = $(this);\r\n _this.toggleClass('open');\r\n _this.siblings('.js-calculator-trigger').removeClass('open');\r\n var _parent = $(this).parents('.page__app-and-calc');\r\n _parent.siblings('.js-application-widget').slideToggle();\r\n _parent.siblings('.js-calculator-widget').slideUp();\r\n return false;\r\n});\r\n\r\n$('.js-calculator-trigger').on('click', function() {\r\n var _this = $(this);\r\n _this.toggleClass('open');\r\n _this.siblings('.js-application-trigger').removeClass('open');\r\n var _parent = $(this).parents('.page__app-and-calc');\r\n _parent.siblings('.js-calculator-widget').slideToggle();\r\n _parent.siblings('.js-application-widget').slideUp();\r\n return false;\r\n});\r\n\r\n$('[data-youtube-id]').youtubeCoverPhoto({\r\n useMaxRes: true\r\n});\r\n\r\n(function(){\r\n var setupStickyHeader = function() {\r\n var _headerHeight = $('.header').height();\r\n var _checkScrollPosition = $(window).scrollTop() > _headerHeight;\r\n $('.header').toggleClass('scrolled', _checkScrollPosition);\r\n }\r\n \r\n $(window).on('scroll', function() { setupStickyHeader(); });\r\n setupStickyHeader();\r\n})();\r\n\r\n$(\".table\").wrap(\"
\");","Vue.component(\"checkbox\", {\r\n props: ['title', 'name', 'value'],\r\n data: function () {\r\n return {\r\n checked: false\r\n };\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n\r\n },\r\n methods: {\r\n\r\n },\r\n template: '
\\\r\n \\\r\n \\\r\n
\\\r\n'\r\n});","new Vue({\r\n el: '#claim',\r\n data: {\r\n firstname: null,\r\n lastname: null,\r\n personalId: null,\r\n address: null,\r\n email: null,\r\n phone: null,\r\n message: null,\r\n\r\n products: [],\r\n claimTypes: [],\r\n contactTypes: [],\r\n intro: null,\r\n terms: null,\r\n\r\n selectedProducts: [],\r\n anotherProduct: null,\r\n\r\n selectedClaimTypes: [],\r\n selectedContactType: null,\r\n anotherClaimType: null,\r\n\r\n isSubmited: false,\r\n result: false,\r\n resultMessage: null,\r\n sendingData: false,\r\n\r\n anotherProductCheckbox: false,\r\n anotherClaimTypeCheckbox: false,\r\n\r\n agreeTerms: false,\r\n reg: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,24}))$/\r\n },\r\n methods: {\r\n send: function (e) {\r\n e.preventDefault();\r\n var _this = this;\r\n if (_this.sendingData) { return; }\r\n _this.isSubmited = true;\r\n _this.resultMessage = null;\r\n valid = true;\r\n if (!_this.firstname || !_this.lastname || !_this.personalId || !_this.address || !_this.phone || !_this.email || !_this.message || !_this.agreeTerms || _this.personalId.length != 11 || !_this.reg.test(_this.email)) {\r\n valid = false;\r\n }\r\n if (valid) {\r\n _this.sendingData = true;\r\n axios.post('~/api/claim/send',\r\n {\r\n firstname: _this.firstname,\r\n lastname: _this.lastname,\r\n personalId: _this.personalId,\r\n address: _this.address,\r\n email: _this.email,\r\n phone: _this.phone,\r\n products: _this.selectedProducts,\r\n otherProduct: _this.anotherProductCheckbox ? _this.anotherProduct : '',\r\n claimTypes: _this.selectedClaimTypes,\r\n otherClaimType: _this.anotherClaimTypeCheckbox ? _this.anotherClaimType : '',\r\n contactType: _this.selectedContactType['title'],\r\n message: _this.message,\r\n captchaVal: $(\"#g-recaptcha-response\").val(),\r\n languageId: window.languageId\r\n }).then(function (response) {\r\n _this.result = response.data.success;\r\n _this.resultMessage = response.data.message;\r\n }).catch(function (e) {\r\n _this.result = false;\r\n _this.resultMessage = window.errorPhrase;\r\n }).finally(function (e) {\r\n _this.sendingData = false;\r\n });\r\n }\r\n _this.isSubmited = true;\r\n\r\n return false;\r\n }\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n if (!!window.claimFormSettings) {\r\n _this.products = window.claimFormSettings.products;\r\n _this.claimTypes = window.claimFormSettings.claimTypes;\r\n _this.contactTypes = window.claimFormSettings.contactTypes;\r\n _this.selectedContactType = _this.contactTypes[0];\r\n _this.intro = window.claimFormSettings.intro;\r\n _this.terms = window.claimFormSettings.terms;\r\n }\r\n }\r\n})","new Vue({\r\n el: '#consumer-loan',\r\n data: {\r\n fullname: null,\r\n\r\n phone: null,\r\n hasIncome: null,\r\n\r\n pins: [],\r\n\r\n intro: null,\r\n terms: null,\r\n\r\n selectedPin: null,\r\n\r\n\r\n isSubmited: false,\r\n result: false,\r\n resultMessage: null,\r\n sendingData: false,\r\n\r\n anotherProductCheckbox: false,\r\n anotherClaimTypeCheckbox: false,\r\n\r\n agreeTerms: false,\r\n reg: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,24}))$/\r\n },\r\n methods: {\r\n send: function (e) {\r\n e.preventDefault();\r\n var _this = this;\r\n if (_this.sendingData) { return; }\r\n _this.isSubmited = true;\r\n _this.resultMessage = null;\r\n valid = true;\r\n if (!_this.fullname || !_this.phone || !_this.selectedPin || !_this.agreeTerms) {\r\n valid = false;\r\n }\r\n if (valid) {\r\n _this.sendingData = true;\r\n axios.post('~/api/consumerloan/send',\r\n {\r\n fullname: _this.fullname,\r\n phone: _this.phone,\r\n branch: _this.selectedPin['title'],\r\n branchId: _this.selectedPin['id'],\r\n captchaVal: $(\"#g-recaptcha-response\").val(),\r\n languageId: window.languageId\r\n }).then(function (response) {\r\n _this.result = response.data.success;\r\n _this.resultMessage = response.data.message;\r\n }).catch(function (e) {\r\n _this.result = false;\r\n _this.resultMessage = window.errorPhrase;\r\n }).finally(function (e) {\r\n _this.sendingData = false;\r\n });\r\n }\r\n _this.isSubmited = true;\r\n\r\n return false;\r\n }\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n if (!!window.consumerLoanFormSettings) {\r\n _this.pins = window.consumerLoanFormSettings.pins;\r\n }\r\n }\r\n})","new Vue({\r\n el: '#contact',\r\n data: {\r\n firstname: null,\r\n lastname: null,\r\n phone: null,\r\n email: null,\r\n message: null,\r\n isSubmited: false,\r\n result: false,\r\n resultMessage: null,\r\n sendingData: false\r\n },\r\n methods: {\r\n send: function (e) {\r\n e.preventDefault();\r\n var _this = this;\r\n if (_this.sendingData) { return; }\r\n _this.isSubmited = true;\r\n _this.resultMessage = null;\r\n valid = true;\r\n if (!_this.firstname || !_this.lastname || !_this.phone || !_this.email || !_this.message) {\r\n valid = false;\r\n }\r\n if (valid) {\r\n _this.sendingData = true;\r\n axios.post('~/api/contact/send',\r\n {\r\n firstname: _this.firstname,\r\n lastname: _this.lastname,\r\n phone: _this.phone,\r\n email: _this.email,\r\n message: _this.message,\r\n captchaVal: $(\"#g-recaptcha-response\").val(),\r\n languageId: window.languageId\r\n }).then(function (response) {\r\n _this.result = response.data.success;\r\n _this.resultMessage = response.data.message;\r\n }).catch(function (e) {\r\n _this.result = false;\r\n _this.resultMessage = window.errorPhrase;\r\n }).finally(function (e) {\r\n _this.sendingData = false;\r\n });\r\n }\r\n //_this.isSubmited = true;\r\n \r\n return false;\r\n }\r\n }\r\n})","new Vue({\r\n el: '#currency-calculator',\r\n data: {\r\n currencies: [],\r\n\r\n selectedAmount: 0,\r\n calcualtedAmount: 0,\r\n\r\n selectedFirstCurrency: null,\r\n selectedSecondCurrency: null,\r\n\r\n multiplier: null,\r\n\r\n defaultCurrencySymbol: 'GEL',\r\n defaultCurrency: null,\r\n\r\n isSubmited: false,\r\n result: false,\r\n resultMessage: null,\r\n sendingData: false,\r\n },\r\n methods: {\r\n calculate: function (e) {\r\n var _this = this;\r\n if (!!_this.selectedFirstCurrency) {\r\n if (_this.selectedFirstCurrency.title == _this.defaultCurrencySymbol) {\r\n _this.calcualtedAmount = (_this.selectedAmount / _this.multiplier).toFixed(4);\r\n } else {\r\n _this.calcualtedAmount = (_this.selectedAmount * _this.multiplier);//.toFixed(4);\r\n }\r\n }\r\n }\r\n },\r\n watch: {\r\n 'selectedAmount': function (newVal, oldVal) {\r\n var _this = this;\r\n _this.calculate();\r\n },\r\n 'selectedFirstCurrency': function (newVal, oldVal) {\r\n var _this = this;\r\n if (oldVal == null) {\r\n return;\r\n }\r\n if (newVal.title != _this.defaultCurrencySymbol) {\r\n _this.selectedSecondCurrency = _this.currencies.find(r => r.title == _this.defaultCurrencySymbol);\r\n _this.multiplier = _this.selectedFirstCurrency.buy;\r\n }\r\n else if (newVal.title == _this.defaultCurrencySymbol && _this.selectedSecondCurrency.title == _this.defaultCurrencySymbol) {\r\n _this.selectedSecondCurrency = oldVal;\r\n _this.multiplier = _this.selectedSecondCurrency.buy;\r\n }\r\n _this.calculate();\r\n },\r\n 'selectedSecondCurrency': function (newVal, oldVal) {\r\n var _this = this;\r\n if (oldVal == null) {\r\n return;\r\n }\r\n if (newVal.title != _this.defaultCurrencySymbol) {\r\n _this.selectedFirstCurrency = _this.currencies.find(r => r.title == _this.defaultCurrencySymbol);\r\n _this.multiplier = _this.selectedSecondCurrency.sell;\r\n }\r\n else if (newVal.title == _this.defaultCurrencySymbol && _this.selectedFirstCurrency.title == _this.defaultCurrencySymbol) {\r\n _this.selectedFirstCurrency = oldVal;\r\n _this.multiplier = _this.selectedFirstCurrency.sell;\r\n }\r\n _this.calculate();\r\n }\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n if (!!window.currencies) {\r\n _this.currencies = window.currencies;\r\n _this.defaultCurrency = _this.currencies.find(r => r.title == _this.defaultCurrencySymbol);\r\n\r\n _this.selectedFirstCurrency = _this.currencies.find(r => r.title != _this.defaultCurrencySymbol);\r\n _this.selectedSecondCurrency = _this.defaultCurrency;\r\n\r\n _this.selectedAmount = 100;\r\n _this.calculate();\r\n _this.multiplier = _this.selectedFirstCurrency.buy;\r\n //_this.calcualtedAmount = _this.selectedAmount * _this.selectedFirstCurrency.sell;\r\n }\r\n }\r\n //computed: {\r\n // calcualtedAmount: function () {\r\n // var _this = this;\r\n // if (!!_this.selectedFirstCurrency) {\r\n // return _this.selectedAmount * _this.selectedFirstCurrency.buy;\r\n // }\r\n // }\r\n //}\r\n})","Vue.component(\"currency-select\", {\r\n props: ['list', 'selected', 'placeholder', 'customclass', 'showother'],\r\n data: function () {\r\n return {\r\n isOpen: false,\r\n otherSelected: false\r\n };\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n //console.log($(_this)[0].$refs.elem);\r\n //new SimpleBar($(_this)[0].$refs.elem);\r\n $(document).mouseup(function (e) {\r\n _this.processDropdownClick(false, e);\r\n });\r\n },\r\n methods: {\r\n getPhrase: function (phrase) {\r\n return this.$options.filters.phrase(phrase);\r\n },\r\n processDropdownClick: function (forceState, event) {\r\n event.preventDefault();\r\n var $elem = $(this.$refs.elem);\r\n\r\n if ($('.currencies-converter__results :visible').length > 0) {\r\n forceState = false;\r\n }\r\n this.isOpen = forceState != null ? !!forceState : !this.isOpen;\r\n var $listElem = $(this.$refs.list);\r\n var animationSpeed = 200;\r\n\r\n if (this.isOpen) {\r\n $listElem.stop().slideDown(animationSpeed);\r\n $elem.addClass('open');\r\n } else {\r\n $listElem.stop().slideUp(animationSpeed);\r\n $elem.removeClass('open');\r\n }\r\n },\r\n selectItem: function (item, event, selectOther) {\r\n this.selected = item;\r\n this.otherSelected = selectOther;\r\n this.$emit('update:selected', this.selected);\r\n this.processDropdownClick(true, event);\r\n },\r\n getTitle: function () {\r\n var _this = this;\r\n return !!_this.selected && !!_this.selected['title'] ? (_this.selected['icon'] ? '' + _this.selected['icon'] + '' + _this.selected['title'] : _this.selected['title']) : (_this.otherSelected ? 'სხვა' : _this.placeholder);\r\n }\r\n },\r\n template: '
\\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n
\\\r\n
\\\r\n {{item[\\'title\\']}}\\\r\n სხვა\\\r\n
\\\r\n
\\\r\n
\\\r\n'\r\n});\r\n\r\n","Vue.component(\"datepicker\", {\r\n props: ['selected', 'lang', 'id'],\r\n data: function () {\r\n return {\r\n };\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n $('#' + _this.id).datepicker({\r\n onSelect: function (selectedDate, datePicker) {\r\n _this.selected = selectedDate;\r\n _this.$emit('update:selected', _this.selected);\r\n },\r\n autoClose: true\r\n });\r\n },\r\n template: '
\\\r\n \\\r\n \\\r\n \\\r\n \\\r\n
\\\r\n'\r\n});","new Vue({\r\n el: '#ethic',\r\n data: {\r\n fullname: null,\r\n personalId: null,\r\n phone: null,\r\n address: null,\r\n email: null,\r\n accessToFullname: null,\r\n accessToContactInfo: null,\r\n employeeFullname: null,\r\n employeePosition: null,\r\n message: null,\r\n files: [],\r\n\r\n\r\n answers: [],\r\n\r\n\r\n intro: null,\r\n terms: null,\r\n secondBlock: null,\r\n thirdBlock: null,\r\n\r\n isSubmited: false,\r\n result: false,\r\n resultMessage: null,\r\n sendingData: false,\r\n\r\n agreeTerms: false,\r\n reg: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,24}))$/\r\n },\r\n methods: {\r\n send: function (e) {\r\n e.preventDefault();\r\n var _this = this;\r\n if (_this.sendingData) { return; }\r\n _this.isSubmited = true;\r\n _this.resultMessage = null;\r\n valid = true;\r\n\r\n var formData = new FormData();\r\n formData.append('fullname', _this.fullname);\r\n formData.append('personalId', _this.personalId);\r\n formData.append('phone', _this.phone);\r\n formData.append('address', _this.address);\r\n formData.append('email', _this.email);\r\n formData.append('accessToFullname', _this.accessToFullname['title']);\r\n formData.append('accessToContactInfo', _this.accessToContactInfo['title']);\r\n formData.append('employeeFullname', _this.employeeFullname);\r\n formData.append('employeePosition', _this.employeePosition);\r\n formData.append('message', _this.message);\r\n formData.append('captchaVal', $(\"#g-recaptcha-response\").val());\r\n \r\n for (var i = 0; i < _this.files.length; i++) {\r\n let file = _this.files[i].file;\r\n\r\n formData.append('files[' + i + ']', file);\r\n }\r\n\r\n formData.append('languageId', window.languageId);\r\n\r\n var headerData = {\r\n headers: {\r\n 'content-type':'multipart/form-data'\r\n }\r\n };\r\n\r\n if (!_this.fullname ||\r\n !_this.personalId ||\r\n !_this.phone ||\r\n !_this.address ||\r\n !_this.email ||\r\n !_this.employeeFullname ||\r\n !_this.employeePosition ||\r\n !_this.message ||\r\n !_this.agreeTerms ||\r\n _this.personalId.length != 11 ||\r\n !_this.reg.test(_this.email)) {\r\n valid = false;\r\n }\r\n if (valid) {\r\n _this.sendingData = true;\r\n axios.post('~/api/ethic/send', formData, headerData).then(function (response) {\r\n _this.result = response.data.success;\r\n _this.resultMessage = response.data.message;\r\n }).catch(function (e) {\r\n _this.result = false;\r\n _this.resultMessage = window.errorPhrase;\r\n }).finally(function (e) {\r\n _this.sendingData = false;\r\n })\r\n }\r\n _this.isSubmited = true;\r\n\r\n return false;\r\n }\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n if (!!window.ethicFormSettings) {\r\n _this.answers = window.ethicFormSettings.answers;\r\n _this.intro = window.ethicFormSettings.intro;\r\n _this.terms = window.ethicFormSettings.terms;\r\n _this.secondBlock = window.ethicFormSettings.secondBlock;\r\n _this.thirdBlock = window.ethicFormSettings.thirdBlock;\r\n _this.accessToFullname = _this.answers[0];\r\n _this.accessToContactInfo = _this.answers[0];\r\n }\r\n }\r\n})","Vue.component(\"file-upload\", {\r\n props: ['title', 'unsupportedText', 'countlimitText', 'sizelimitText', 'list'],\r\n data: function () {\r\n return {\r\n files: [],\r\n\r\n errorMessage: null,\r\n unsupportedFiles: [],\r\n\r\n errorMessage: null,\r\n sizeLimitFiles: [],\r\n };\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n\r\n },\r\n methods: {\r\n selectFile: function (event) {\r\n var _this = this;\r\n\r\n _this.errorMessage = null;\r\n _this.sizeLimitFiles = [];\r\n _this.unsupportedFiles = [];\r\n\r\n for (var i = 0; i < event.target.files.length; i++) {\r\n var file = event.target.files[i];\r\n if (_this.files.length < 10) {\r\n if (_this.isFileTypeValid(file)) {\r\n if (_this.isFileSizeValid(file)) {\r\n var fileName = file.name.replace(/^.*[\\\\\\/]/, '');\r\n var fileSize = (file.size / 1024) > 1024 ? ((file.size / 1024) / 1024).toFixed(2) + 'MB' : (file.size / 1024).toFixed(2) + 'KB';\r\n _this.files.push(\r\n {\r\n file: file,\r\n name: fileName,\r\n size: fileSize\r\n });\r\n } else {\r\n _this.sizeLimitFiles.push(file.name);\r\n }\r\n } else {\r\n _this.unsupportedFiles.push(file.name);\r\n }\r\n } else {\r\n _this.errorMessage = _this.countlimitText;\r\n }\r\n }\r\n _this.list = _this.files;\r\n _this.$emit('update:list', _this.list);\r\n },\r\n deleteFile: function (index, e) {\r\n e.preventDefault();\r\n this.files.splice(index, 1);\r\n this.errorMessage = null;\r\n },\r\n isFileTypeValid: function (file) {\r\n const validTypes = ['jpeg', 'jpg', 'png', 'pdf', 'mp4', 'doc', 'docx'];\r\n return $.inArray(file.name.split('.').pop(), validTypes) > 0;\r\n },\r\n isFileSizeValid: function (file) {\r\n return file.size <= 5120 * 1024;//5MB\r\n }\r\n },\r\n template: '
\\\r\n
\\\r\n \\\r\n \\\r\n
\\\r\n
\\\r\n

{{errorMessage}}

\\\r\n

0\" style=\"color:#ff0000\">{{unsupportedText}}

\\\r\n \\\r\n

0\" style=\"color:#ff0000\">{{sizelimitText}}

\\\r\n \\\r\n
\\\r\n {{file.name}}\\\r\n {{file.size}}\\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n
\\\r\n
\\\r\n
'\r\n});","Vue.component(\"form-select\", {\r\n props: ['list', 'selected', 'placeholder', 'customclass', 'showother'],\r\n data: function () {\r\n return {\r\n isOpen: false,\r\n otherSelected: false\r\n };\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n //console.log($(_this)[0].$refs.elem);\r\n //new SimpleBar($(_this)[0].$refs.elem);\r\n $(document).mouseup(function (e) {\r\n _this.processDropdownClick(false, e);\r\n });\r\n },\r\n methods: {\r\n getPhrase: function (phrase) {\r\n return this.$options.filters.phrase(phrase);\r\n },\r\n processDropdownClick: function (forceState, event) {\r\n event.preventDefault();\r\n var $elem = $(this.$refs.elem);\r\n\r\n if ($('.dropdown-results :visible').length > 0) {\r\n forceState = false;\r\n }\r\n this.isOpen = forceState != null ? !!forceState : !this.isOpen;\r\n var $listElem = $(this.$refs.list);\r\n var animationSpeed = 200;\r\n\r\n if (this.isOpen) {\r\n $listElem.stop().slideDown(animationSpeed);\r\n $elem.addClass('open');\r\n } else {\r\n $listElem.stop().slideUp(animationSpeed);\r\n $elem.removeClass('open');\r\n }\r\n },\r\n selectItem: function (item, event, selectOther) {\r\n this.selected = item;\r\n this.otherSelected = selectOther;\r\n this.$emit('update:selected', this.selected);\r\n this.processDropdownClick(true, event);\r\n },\r\n getTitle: function () {\r\n var _this = this;\r\n return !!_this.selected && !!_this.selected['id'] ? (_this.selected['icon'] ? '' + _this.selected['icon'] + '' + _this.selected['title'] : _this.selected['title']) : (_this.otherSelected ? 'სხვა' : _this.placeholder);\r\n }\r\n },\r\n template: '
\\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n
\\\r\n
\\\r\n {{item[\\'title\\']}}\\\r\n სხვა\\\r\n
\\\r\n
\\\r\n
\\\r\n'\r\n});\r\n //v-bind:class=\"{'dropdown--currency' : selected && customclass}\"\r\n\r\n","new Vue({\r\n el: '#loan-calculator',\r\n data: {\r\n intro: null,\r\n\r\n loanTypes: [],\r\n currencies: [],\r\n\r\n minAnnualInterestRate: null,\r\n maxAnnualInterestRate: null,\r\n\r\n minLoanAmount: null,\r\n maxLoanAmount: null,\r\n\r\n minLoanDurationInMonth: null,\r\n maxLoanDurationInMonth: null,\r\n\r\n minMonthly: null,\r\n maxMonthly: null,\r\n\r\n interestRate: null,\r\n effectiveInterestRate: null,\r\n monthlyInstallments: null,\r\n\r\n //selectedLoanType: null,\r\n //selectedLoanCurrency: null,\r\n selectedAnnualInterestRate: null,\r\n selectedLoanAmount: null,\r\n selectedLoanDurationInMonth: null,\r\n selectedMonthly: null,\r\n pickedField: 2,\r\n\r\n annualInterestId: \"1\",\r\n loanAmountId: \"2\",\r\n loanDurationInMonthId: \"3\",\r\n monthlyId: \"4\",\r\n\r\n schedule: [],\r\n },\r\n methods: {\r\n //createSchedule: function () {\r\n // var _this = this;\r\n // _this.schedule = [];\r\n // for (var i = 1; i < _this.selectedLoanDurationInMonth + 1; i++) {\r\n // _this.schedule.push({\r\n // \"month\": i,\r\n\r\n // });\r\n // }\r\n //}\r\n calculate: function (activeFieldId) {\r\n var _this = this;\r\n var x = 0;\r\n var S = parseFloat(_this.selectedLoanAmount);\r\n var r = parseInt(_this.selectedAnnualInterestRate);\r\n var N = parseInt(_this.selectedLoanDurationInMonth);\r\n var P = parseInt(_this.selectedAnnualInterestRate) / 1200;\r\n\r\n if (_this.pickedField == _this.loanAmountId) {\r\n if (activeFieldId == _this.annualInterestId) {\r\n //calculate monthly\r\n _this.selectedMonthly = _this.calculateMonthly(P);\r\n }\r\n else if (activeFieldId == _this.loanAmountId) {\r\n //calculate monthly\r\n _this.selectedMonthly = _this.calculateMonthly(P);\r\n }\r\n else if (activeFieldId == _this.loanDurationInMonthId) {\r\n //calculate monthly\r\n _this.selectedMonthly = _this.calculateMonthly(P);\r\n }\r\n else if (activeFieldId == _this.monthlyId) {\r\n //todo: calculate month\r\n _this.selectedLoanDurationInMonth = _this.calculateLoanDuration(P);\r\n }\r\n } else if (_this.pickedField == _this.loanDurationInMonthId) {\r\n if (activeFieldId == _this.annualInterestId) {\r\n //calculate monthly\r\n _this.selectedMonthly = _this.calculateMonthly(P);\r\n }\r\n else if (activeFieldId == _this.loanAmountId) {\r\n //calculate monthly\r\n _this.selectedMonthly = _this.calculateMonthly(P);\r\n }\r\n else if (activeFieldId == _this.loanDurationInMonthId) {\r\n //calculate monthly\r\n _this.selectedMonthly = _this.calculateMonthly(P);\r\n }\r\n else if (activeFieldId == _this.monthlyId) {\r\n //todo: calculate loan amount\r\n _this.selectedLoanAmount = _this.calculateLoanAmount(P);\r\n }\r\n } else if (_this.pickedField == _this.monthlyId) {\r\n if (activeFieldId == _this.annualInterestId) {\r\n //todo: calculate month\r\n _this.selectedLoanDurationInMonth = _this.calculateLoanDuration(P);\r\n }\r\n else if (activeFieldId == _this.loanAmountId) {\r\n //todo: calculate month\r\n _this.selectedLoanDurationInMonth = _this.calculateLoanDuration(P);\r\n }\r\n else if (activeFieldId == _this.loanDurationInMonthId) {\r\n //todo: calculate loan amount\r\n _this.selectedLoanAmount = _this.calculateLoanAmount(P);\r\n }\r\n else if (activeFieldId == _this.monthlyId) {\r\n //todo: calculate loan amount\r\n _this.selectedLoanAmount = _this.calculateLoanAmount(P);\r\n }\r\n }\r\n },\r\n calculateMonthly: function (P) {\r\n var _this = this;\r\n x = parseFloat(_this.selectedLoanAmount) * (P + (P / (Math.pow((1 + P), parseInt(_this.selectedLoanDurationInMonth)) - 1)));\r\n x = Math.round(parseFloat(x) * 100) / 100;\r\n //_this.updateSlider(_this.monthlyId, x);\r\n if (!isFinite(x)) {\r\n return _this.selectedMonthly;\r\n }\r\n return x;\r\n },\r\n calculateLoanDuration: function (P) {\r\n var _this = this;\r\n if (_this.selectedMonthly < 1) {\r\n _this.selectedMonthly = 1;\r\n }\r\n x = parseFloat(_this.selectedMonthly);\r\n\r\n var t = x - parseFloat(_this.selectedLoanAmount) * P;\r\n\r\n if (t < 0) {\r\n t = 0;\r\n }\r\n N = Math.log10(x / t) / Math.log10(1 + P);\r\n N = Math.round(N);\r\n if (isNaN(N)) {\r\n N = 0;\r\n }\r\n if (!isFinite(N)) {\r\n return _this.selectedLoanDurationInMonth;\r\n }\r\n if (N <= 0) {\r\n N = 1;\r\n }\r\n return N;\r\n },\r\n calculateLoanAmount: function (P) {\r\n var _this = this;\r\n x = parseFloat(_this.selectedMonthly);\r\n S = x / (P + (P / (Math.pow((1 + P), parseInt(_this.selectedLoanDurationInMonth)) - 1)));\r\n S = Math.round(parseFloat(S) * 100) / 100;\r\n if (!isFinite(S)) {\r\n return _this.selectedLoanAmount;\r\n }\r\n return S;\r\n },\r\n //updateSlider: function (id, value) {\r\n // if (!isNaN(value)) {\r\n // //setTimeout(function () {\r\n // var slider = document.getElementById(id);\r\n // slider.noUiSlider.set(value);\r\n // //}, 200);\r\n // }\r\n //}\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n if (!!window.loanCalculatorSettings) {\r\n _this.loanTypes = window.loanCalculatorSettings.loanTypes;\r\n _this.currencies = window.loanCalculatorSettings.currencies;\r\n\r\n _this.minAnnualInterestRate = window.loanCalculatorSettings.minAnnualInterestRate;\r\n _this.maxAnnualInterestRate = window.loanCalculatorSettings.maxAnnualInterestRate;\r\n\r\n _this.minLoanAmount = window.loanCalculatorSettings.minLoanAmount;\r\n _this.maxLoanAmount = window.loanCalculatorSettings.maxLoanAmount;\r\n\r\n _this.minLoanDurationInMonth = window.loanCalculatorSettings.minLoanDurationInMonth;\r\n _this.maxLoanDurationInMonth = window.loanCalculatorSettings.maxLoanDurationInMonth;\r\n\r\n _this.minMonthly = window.loanCalculatorSettings.minContribution;\r\n _this.maxMonthly = window.loanCalculatorSettings.maxContribution;\r\n\r\n _this.intro = window.loanCalculatorSettings.intro;\r\n\r\n _this.selectedAnnualInterestRate = window.loanCalculatorSettings.annualInterestRateDefaultValue;\r\n _this.selectedLoanAmount = window.loanCalculatorSettings.loanAmountDefaultValue;\r\n _this.selectedLoanDurationInMonth = window.loanCalculatorSettings.loanDurationInMonthDefaultValue;\r\n //_this.selectedMonthly = window.loanCalculatorSettings.contributionDefaultValue;\r\n\r\n //_this.selectedLoanCurrency = _this.currencies[0];\r\n\r\n //if (!!window.currentLoanId) {\r\n // //_this.selectedLoanType = _this.loanTypes.find(e => e.id == window.currentLoanId);\r\n // for (var i = 0; i < _this.loanTypes.length; i++) {\r\n // console.log(i);\r\n // if (_this.loanTypes[i].id == window.currentLoanId) {\r\n // _this.selectedLoanType = _this.loanTypes[i];\r\n // break;\r\n // }\r\n // }\r\n //}\r\n setTimeout(function () {\r\n _this.calculate(_this.loanAmountId);\r\n }, 200);\r\n }\r\n }\r\n})","new Vue({\r\n el: '#loan',\r\n data: {\r\n loanAmount: null,\r\n fullname: null,\r\n birthDate: null,\r\n personalId: null,\r\n phone: null,\r\n email: null,\r\n monthlyIncome: null,\r\n\r\n\r\n selectedLoanType: null,\r\n selectedLoanCurrency: null,\r\n selectedIncomeType: null,\r\n selectedOtherIncomeType: null,\r\n selectedIncomeTypeCurrency: null,\r\n selectedPin: null,\r\n\r\n\r\n\r\n loanTypes: [],\r\n currencies: [],\r\n incomeTypes: [],\r\n pins: [],\r\n intro: null,\r\n terms: null,\r\n\r\n isSubmited: false,\r\n result: false,\r\n resultMessage: null,\r\n sendingData: false,\r\n\r\n anotherIncomeTypeCheckbox: false,\r\n\r\n agreeTerms: false,\r\n reg: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,24}))$/\r\n },\r\n methods: {\r\n send: function (e) {\r\n e.preventDefault();\r\n var _this = this;\r\n debugger;\r\n if (_this.sendingData) { return; }\r\n _this.resultMessage = null;\r\n _this.isSubmited = true;\r\n valid = true;\r\n if (!_this.selectedLoanType ||\r\n !_this.selectedPin ||\r\n !_this.loanAmount ||\r\n !_this.fullname ||\r\n !_this.birthDate ||\r\n !_this.personalId ||\r\n !_this.phone ||\r\n !_this.email ||\r\n !_this.monthlyIncome ||\r\n !_this.agreeTerms ||\r\n _this.personalId.length != 11\r\n || !_this.reg.test(_this.email)) {\r\n valid = false;\r\n }\r\n if (valid) {\r\n _this.sendingData = true;\r\n axios.post('~/api/loan/send',\r\n {\r\n loanType: _this.selectedLoanType['title'],\r\n loanAmount: _this.loanAmount,\r\n loanCurrency: _this.selectedLoanCurrency['title'],\r\n fullname: _this.fullname,\r\n birthDate: _this.birthDate,\r\n personalId: _this.personalId,\r\n phone: _this.phone,\r\n email: _this.email,\r\n incomeType: _this.anotherIncomeTypeCheckbox ? '' : _this.selectedIncomeType['title'],\r\n otherIncomeType: _this.selectedOtherIncomeType,\r\n monthlyIncome: _this.monthlyIncome,\r\n monthlyIncomeCurrency: _this.selectedIncomeTypeCurrency['title'],\r\n branch: _this.selectedPin['title'],\r\n captchaVal: $(\"#g-recaptcha-response\").val(),\r\n languageId: window.languageId\r\n }).then(function (response) {\r\n _this.result = response.data.success;\r\n _this.resultMessage = response.data.message;\r\n }).catch(function (e) {\r\n _this.result = false;\r\n _this.resultMessage = window.errorPhrase;\r\n }).finally(function (e) {\r\n _this.sendingData = false;\r\n });\r\n }\r\n _this.isSubmited = true;\r\n\r\n return false;\r\n }\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n if (!!window.loanFormSettings) {\r\n _this.loanTypes = window.loanFormSettings.loanTypes;\r\n _this.currencies = window.loanFormSettings.currencies;\r\n _this.incomeTypes = window.loanFormSettings.incomeTypes;\r\n _this.pins = window.loanFormSettings.pins;\r\n _this.intro = window.loanFormSettings.intro;\r\n _this.terms = window.loanFormSettings.terms;\r\n _this.selectedLoanCurrency = _this.currencies[0];\r\n _this.selectedIncomeTypeCurrency = _this.currencies[0];\r\n //if (!!window.currentLoanId) {\r\n // for (var i = 0; i < _this.loanTypes.length; i++) {\r\n // console.log(i);\r\n // if (_this.loanTypes[i].id == window.currentLoanId) {\r\n // _this.selectedLoanType = _this.loanTypes[i];\r\n // break;\r\n // }\r\n // }\r\n //}\r\n }\r\n }\r\n})","Vue.component(\"range-slider\", {\r\n props: ['title', 'min', 'max', 'value', 'id', 'icon', 'int', 'checkbox', 'picked', 'isSlider', 'identifier'],\r\n data: function () {\r\n return {\r\n slider: null,\r\n active: false\r\n }\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n\r\n _this.slider = document.getElementById(_this.id);\r\n\r\n noUiSlider.create(_this.slider, {\r\n start: _this.min,\r\n\r\n connect: 'lower',\r\n format: {\r\n to: function (value) {\r\n if (!_this.int) {\r\n return parseFloat(value).toFixed(2);\r\n } else {\r\n return parseInt(value);\r\n }\r\n },\r\n from: function (value) {\r\n if (!_this.int) {\r\n return parseFloat(value).toFixed(2);\r\n } else {\r\n return parseInt(value);\r\n }\r\n }\r\n },\r\n range: {\r\n 'min': _this.min,\r\n 'max': _this.max\r\n }\r\n });\r\n\r\n _this.slider.noUiSlider.on('start', function (values, handle) {\r\n _this.active = true;\r\n });\r\n _this.slider.noUiSlider.on('end', function (values, handle) {\r\n _this.active = false;\r\n });\r\n _this.slider.noUiSlider.on('slide', function (values, handle) {\r\n _this.value = parseInt(values[handle]);\r\n _this.$emit('update:value', _this.value);\r\n _this.$parent.calculate(_this.slider.id);\r\n });\r\n\r\n\r\n _this.$emit('update:value', _this.value);\r\n },\r\n methods: {\r\n update: function (e) {\r\n var _this = this;\r\n if (e.target.value) {\r\n var newValue = parseFloat(e.target.value);\r\n if (newValue > _this.max) {\r\n newValue = _this.max;\r\n }\r\n if (newValue < _this.min) {\r\n newValue = _this.min;\r\n }\r\n _this.value = newValue;\r\n _this.$emit('update:value', _this.value);\r\n\r\n _this.slider.noUiSlider.set(_this.value);\r\n _this.$parent.calculate(e.target.id);\r\n }\r\n },\r\n pick: function (e) {\r\n var _this = this;\r\n _this.$emit('update:picked', _this.picked);\r\n _this.$parent.calculate(e.target.value);\r\n },\r\n handleInput: function () {\r\n var _this = this;\r\n _this.$emit('update:value', _this.value);\r\n _this.$parent.calculate(_this.slider.id);\r\n _this.slider.noUiSlider.set(_this.value);\r\n }\r\n },\r\n watch: {\r\n value: function (val) {\r\n var _this = this;\r\n if (!_this.active) {\r\n _this.slider.noUiSlider.set(_this.value);\r\n _this.$parent.calculate(_this.slider.id);\r\n _this.$emit('update:value', _this.value);\r\n }\r\n }\r\n },\r\n template: '
\\\r\n
\\\r\n \\\r\n
\\\r\n \\\r\n {{icon}}\\\r\n
\\\r\n
\\\r\n \\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n'\r\n});","new Vue({\r\n el: '#salary',\r\n data: {\r\n company: null,\r\n identityCode: null,\r\n contactPerson: null,\r\n phone: null,\r\n employees: null,\r\n branches: [],\r\n selectedBranch: null,\r\n\r\n intro: null,\r\n terms: null,\r\n\r\n isSubmited: false,\r\n result: false,\r\n resultMessage: null,\r\n sendingData: false,\r\n\r\n agreeTerms: false,\r\n },\r\n methods: {\r\n send: function (e) {\r\n e.preventDefault();\r\n var _this = this;\r\n if (_this.sendingData) { return; }\r\n _this.isSubmited = true;\r\n _this.resultMessage = null;\r\n valid = true;\r\n\r\n var formData = new FormData();\r\n formData.append('company', _this.company);\r\n formData.append('identityCode', _this.identityCode);\r\n formData.append('contactPerson', _this.contactPerson);\r\n formData.append('phone', _this.phone);\r\n formData.append('employees', _this.employees);\r\n formData.append('selectedBranch', _this.selectedBranch != null ? _this.selectedBranch.title : '');\r\n formData.append('captchaVal', $(\"#g-recaptcha-response\").val());\r\n\r\n formData.append('languageId', window.languageId);\r\n\r\n var headerData = {\r\n headers: {\r\n 'content-type': 'multipart/form-data'\r\n }\r\n };\r\n\r\n if (!_this.company ||\r\n !_this.identityCode ||\r\n !_this.contactPerson ||\r\n !_this.phone ||\r\n _this.selectedBranch == null ||\r\n !_this.agreeTerms ||\r\n _this.identityCode.length != 9) {\r\n valid = false;\r\n }\r\n if (valid) {\r\n _this.sendingData = true;\r\n axios.post('~/api/salary/send', formData, headerData).then(function (response) {\r\n _this.result = response.data.success;\r\n _this.resultMessage = response.data.message;\r\n }).catch(function (e) {\r\n _this.result = false;\r\n _this.resultMessage = window.errorPhrase;\r\n }).finally(function (e) {\r\n _this.sendingData = false;\r\n })\r\n }\r\n _this.isSubmited = true;\r\n\r\n return false;\r\n }\r\n },\r\n mounted: function () {\r\n var _this = this;\r\n if (!!window.branches) {\r\n _this.branches = window.branches;\r\n }\r\n }\r\n})","Vue.filter('phrase', function (phrase) {\r\n if (!phrase) return '';\r\n var filtered = window._phrases.find(function (t) { return t.title == phrase });\r\n var value = phrase;\r\n if (filtered != null) {\r\n value = filtered\r\n }\r\n return value;\r\n});\r\n","new Vue({ el: \"#vueapp\" });"]}