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EAAE,MAAM,QAAQ,QACjB,GAEF,IAGA,OAAO,SAAW,KACjB,YAAW,WACN,SAAS,gBAAgB,UAAU,SAAS,uBAC/C,SAAS,gBAAgB,UAAU,OAAO,qBAC1C,SAAS,gBAAgB,UAAU,IAAI,qBAEzC,GAAG,IAAI,EAGR,EAAE,UAAU,GAAG,UAAW,YAAY,SAAU,GAC/C,MAAM,EAAe,EAAE,+BAEtB,GADgB,EAAa,KAAK,cAClB,EAAa,KAAK,WAElC,GADe,EAAa,QAAQ,sBACnB,EAAa,KAAK,8BACnC,EAAc,EAAa,KAAK,QAChC,EAAuB,EAAa,KAAK,sBAGtC,EAAqB,QAAU,kBAClC,EAAqB,YAAY,YACjC,YAAW,WACV,gBAAgB,WACjB,GAAG,MAGA,EAAY,SACf,EAAY,KAAK,mBAAmB,IAAI,UACxC,EAAE,gBAAgB,OAClB,EAAE,gBAAgB,OAClB,EAAY,GAAG,QACf,EAAY,OACZ,EAAY,KAAK,cAAc,MAAK,WACnC,EAAE,MAAM,YAAY,YACrB,KAGG,EAAc,QACb,EAAc,KAAK,QACtB,EAAc,KAAK,MAAO,IAGxB,EAAE,sBAAsB,QAC3B,EAAE,sBAAsB,YAAY,YAGjC,EAAe,QAClB,EAAe,MAAK,WACnB,EAAE,MAAM,QAAQ,QACjB,GAEF,IAEA,EAAE,UAAU,GAAG,SAAU,YAAY,SAAU,GAC9C,mBAAmB,QACpB","file":"/gh/monterarty/spexi@master/spexigeo/main.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /gh/monterarty/spexi@master/spexigeo/main.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","var Webflow = Webflow || [];\nWebflow.push(function () {\n\tvar detect = new MobileDetect(window.navigator.userAgent);\n\n\tconst getOS = () => {\n\t\t\"use strict\";\n\t\tvar userAgent = window.navigator.userAgent,\n\t\t\tplatform = window.navigator.userAgentData ? window.navigator.userAgentData : window.navigator.platform || window.navigator.platform,\n\t\t\tmacosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K', 'macOS'],\n\t\t\twindowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'],\n\t\t\tiosPlatforms = ['iPhone', 'iPad', 'iPod'],\n\t\t\tos = null;\n\t\tif (macosPlatforms.indexOf(platform) !== -1) {\n\t\t\tos = 'macOS';\n\t\t} else if (iosPlatforms.indexOf(platform) !== -1) {\n\t\t\tos = 'iOS';\n\t\t} else if (windowsPlatforms.indexOf(platform) !== -1) {\n\t\t\tos = 'Windows';\n\t\t} else if (/Huawei/.test(userAgent)) {\n\t\t\tos = 'Huawei';\n\t\t} else if (/Android/.test(userAgent)) {\n\t\t\tos = 'AndroidOS';\n\t\t} else if (/Linux/.test(platform)) {\n\t\t\tos = 'Linux';\n\t\t}\n\t\treturn os;\n\t}\n\n\tconst iOS = () => {\n\t\t\"use strict\";\n\t\treturn ['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(navigator.platform) ||\n\t\t\t(navigator.userAgent.includes(\"Mac\") && \"ontouchend\" in document)\n\t}\n\n\tvar os = detect.os();\n\tif (os === null || os == 'AndroidOS') {\n\t\tos = getOS();\n\t\tif (os == 'macOS') {\n\t\t\tif (iOS()) {\n\t\t\t\tos = 'iOS';\n\t\t\t}\n\t\t}\n\t}\n\n\tconst isTouchDevice = () => {\n\t\treturn (('ontouchstart' in window) ||\n\t\t\t(navigator.maxTouchPoints > 0) ||\n\t\t\t(navigator.msMaxTouchPoints > 0));\n\t}\n\n\tif (isTouchDevice()) {\n\t\tdocument.documentElement.classList.add('is--touch-device', 'is--mobile');\n\t}\n\n\tif (['iOS', 'AndroidOS', 'Huawei'].indexOf(os) + 1) {\n\t\tdocument.documentElement.classList.add('is--touch-device', 'is--mobile');\n\t\tswitch (os) {\n\t\t\tcase 'iOS':\n\t\t\t\tdocument.documentElement.classList.add('is--ios');\n\t\t\t\tbreak;\n\t\t\tcase 'AndroidOS':\n\t\t\t\tdocument.documentElement.classList.add('is--android');\n\t\t\t\tbreak;\n\t\t\tcase 'Huawei':\n\t\t\t\tdocument.documentElement.classList.add('is--android');\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\n\tconst heroSection = gsap.utils.toArray(\".hero__section\");\n\tconst heroSlider = new Swiper('.swiper', {\n\t\tspeed: 1000,\n\t\teffect: 'fade',\n\t\tautoplay: {\n\t\t\tdelay: 4000,\n\t\t}\n\t});\n\n\theroSlider.on('slideChange', function (swiper, event) {\n\t\theroSection[0].setAttribute('data-hgs', swiper.activeIndex + 1);\n\t})\n\n\tScrollTrigger.create({\n\t\ttrigger: heroSection,\n\t\tstart: \"top 80px\",\n\t\tend: \"bottom 80px\",\n\t\tonEnter: function () {\n\t\t\theroSlider.autoplay.start();\n\t\t},\n\t\tonEnterBack: function () {\n\t\t\theroSlider.autoplay.start();\n\t\t},\n\t\tonLeave: function () {\n\t\t\theroSlider.autoplay.stop();\n\t\t}\n\t});\n\n\tconst changeNavColor = (section) => {\n\t\tconst body = document.querySelector('body');\n\n\t\tif (section.getAttribute('data-black-nav')) {\n\t\t\tif (!body.classList.contains('is--black-nav'))\n\t\t\t\tbody.classList.add('is--black-nav');\n\t\t} else {\n\t\t\tbody.classList.remove('is--black-nav');\n\t\t}\n\t};\n\tconst sections = gsap.utils.toArray(\".section\");\n\n\tsections.forEach(function (section, index) {\n\t\tScrollTrigger.create({\n\t\t\ttrigger: section,\n\t\t\tstart: \"top 80px\",\n\t\t\tend: \"bottom 80px\",\n\t\t\tonEnter: function () {\n\t\t\t\tchangeNavColor(section);\n\t\t\t},\n\t\t\tonEnterBack: function () {\n\t\t\t\tchangeNavColor(section);\n\t\t\t}\n\t\t});\n\t});\n\n\n\tconst features = gsap.utils.toArray(\".features__content-item\");\n\tconst featuresGrid = document.querySelector('.features__grid-wrapper');\n\n\tconst changeFeatureGrid = (feature, index) => {\n\t\tfeaturesGrid.setAttribute('data-fgs', index + 1);\n\t}\n\n\n\tfeatures.forEach(function (feature, index) {\n\n\t\tlet end = '';\n\t\tlet start = '';\n\n\t\tfunction createScrollTriggers() {\n\t\t\tgsap.to(feature, {\n\t\t\t\tscrollTrigger: {\n\t\t\t\t\ttrigger: feature,\n\t\t\t\t\tstart: start,\n\t\t\t\t\tend: end,\n\t\t\t\t\t//markers:true,\n\t\t\t\t\tonEnter: function () {\n\t\t\t\t\t\tfeature.style.opacity = 1;\n\t\t\t\t\t\tchangeFeatureGrid(feature, index);\n\t\t\t\t\t},\n\t\t\t\t\tonLeave: function () {\n\t\t\t\t\t\tif (window.innerWidth < 468 && index < features.length - 1) {\n\t\t\t\t\t\t\tfeature.style.opacity = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonEnterBack: function () {\n\t\t\t\t\t\tfeature.style.opacity = 1;\n\t\t\t\t\t\tchangeFeatureGrid(feature, index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tScrollTrigger.matchMedia({\n\t\t\t'(min-width:468px)': function () {\n\t\t\t\tstart = \"top+=10% center\";\n\t\t\t\tend = \"bottom+=10% center\";\n\n\t\t\t\tcreateScrollTriggers();\n\t\t\t},\n\t\t\t'(max-width:467px)': function () {\n\t\t\t\tstart = \"top-=30% center\";\n\t\t\t\tend = \"bottom-=30% center\";\n\n\t\t\t\tcreateScrollTriggers();\n\t\t\t}\n\t\t})\n\t})\n});\nwindow.onscroll = function () {\n\tif ($('.w-nav-button').hasClass('w--open'))\n\t\t$('.w-nav-button').trigger('click');\n}\n\nconst transitionEndEventName = getTransitionEndEventName();\n\nfunction Dropdowns(options) {\n\tthis.dropdownsDOM = document.querySelectorAll(options.selector);\n\tthis.openFirst = options.openFirst;\n\tthis.scrollToOpen = options.scrollToOpen;\n\tthis.onlyOneOpened = options.onlyOneOpened;\n\tthis.dropdowns = [];\n\n\tthis.prepareDropdowns();\n\tthis.attachEventHandlers();\n}\n\nDropdowns.prototype.attachEventHandlers = function () {\n\tconst self = this;\n\n\tthis.dropdowns.forEach((dropdown) => {\n\t\tdropdown.toggle.addEventListener(\"click\", (event) => {\n\t\t\tif (dropdown.opened) {\n\t\t\t\tdropdown.closeDropdown();\n\t\t\t} else {\n\t\t\t\tdropdown.openDropdown();\n\t\t\t}\n\t\t\tif (self.onlyOneOpened) {\n\t\t\t\tthis.dropdowns.forEach((siblingDropdown) => {\n\t\t\t\t\tif (dropdown != siblingDropdown && siblingDropdown.opened)\n\t\t\t\t\t\tsiblingDropdown.closeDropdown();\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (self.scrollToOpen && dropdown.opened) {\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tdropdown.scrollToOpenDropdown();\n\t\t\t\t}, 550)\n\n\t\t\t}\n\t\t});\n\n\t\tdropdown.dropdownList.addEventListener(\"transitionend\", () => {\n\t\t\tScrollTrigger.refresh();\n\t\t});\n\t})\n}\n\n\nDropdowns.prototype.prepareDropdowns = function () {\n\tthis.dropdownsDOM.forEach((dropdown, index) => {\n\t\tif (this.openFirst && index == 0) {\n\t\t\tthis.dropdowns.push(new Dropdown({\n\t\t\t\telement: dropdown,\n\t\t\t\topened: true\n\t\t\t}));\n\t\t} else {\n\t\t\tthis.dropdowns.push(new Dropdown({\n\t\t\t\telement: dropdown,\n\t\t\t\topened: false\n\t\t\t}));\n\t\t}\n\t})\n}\n\nfunction Dropdown(options) {\n\tthis.dropdown = options.element;\n\tthis.opened = options.opened;\n\tthis.toggle = this.dropdown.querySelector('.cases__dropdown-toggle');\n\tthis.dropdownList = this.dropdown.querySelector('.cases__dropdown-list');\n\tthis.dropdownContent = this.dropdown.querySelector('.cases__dropdown-content');\n\n\tthis.setInitialPosition();\n\treturn this;\n}\n\nDropdown.prototype.setInitialPosition = function () {\n\tif (this.opened) {\n\t\tthis.openDropdown();\n\t} else {\n\t\tthis.closeDropdown();\n\t}\n}\n\nDropdown.prototype.scrollToOpenDropdown = function () {\n\tconst topPos = this.dropdown.getBoundingClientRect().top + window.pageYOffset - 20\n\twindow.scrollTo({\n\t\ttop: topPos, // scroll so that the element is at the top of the view\n\t\tbehavior: 'smooth' // smooth scroll\n\t})\n}\n\nDropdown.prototype.closeDropdown = function () {\n\tthis.dropdownList.style.height = 0;\n\tthis.dropdownContent.style.opacity = 0;\n\tthis.opened = 0;\n\tthis.dropdown.classList.remove('is--open');\n}\n\nDropdown.prototype.openDropdown = function () {\n\tthis.dropdownList.style.height = this.dropdownContent.offsetHeight + 'px';\n\tthis.dropdownContent.style.opacity = 1;\n\tthis.opened = 1;\n\tthis.dropdown.classList.add('is--open');\n}\n\nfunction getTransitionEndEventName() {\n\tvar transitions = {\n\t\t\"transition\": \"transitionend\",\n\t\t\"OTransition\": \"oTransitionEnd\",\n\t\t\"MozTransition\": \"transitionend\",\n\t\t\"WebkitTransition\": \"webkitTransitionEnd\"\n\t}\n\tlet bodyStyle = document.body.style;\n\tfor (let transition in transitions) {\n\t\tif (bodyStyle[transition] != undefined) {\n\t\t\treturn transitions[transition];\n\t\t}\n\t}\n}\n\nconst dropdowns = new Dropdowns({\n\tselector: '.cases__section .cases__dropdown',\n\topenFirst: 1,\n\tscrollToOpen: 1,\n\tonlyOneOpened: 1\n});\n\nconst faqDropdowns = new Dropdowns({\n\tselector: '.faq__dropdown',\n\topenFirst: 1,\n\tscrollToOpen: 0,\n\tonlyOneOpened: 1\n});\n\n//Phone Input mask \nconst resizePhoneSelectList = (input) => {\n\tconsole.log(input);\n\tconst formPhoneField = input.closest('.form__phone-wrap');\n\tconst currentModal = input.closest('.remodal');\n\tconst formCountryList = currentModal.querySelector('.iti__country-list');\n\n\tif (formCountryList) {\n\t\tformCountryList.style.width = formPhoneField.clientWidth + 'px';\n\t}\n}\n\nconst phoneFields = document.querySelectorAll(\"[data-phone-input]\");\nconst phoneIntelObjectArray = []\nif (phoneFields) {\n\tphoneFields.forEach((input) => {\n\t\tconst intlObject = window.intlTelInput(input, {\n\t\t\tinitialCountry: \"auto\",\n\t\t\tpreferredCountries: [\"us\", \"ca\"],\n\t\t\tdropdownContainer: input.closest('.form__phone-wrap'),\n\t\t\tgeoIpLookup: callback => {\n\t\t\t\tfetch(\"https://ipapi.co/json\")\n\t\t\t\t\t.then(res => res.json())\n\t\t\t\t\t.then(data => callback(data.country_code))\n\t\t\t\t\t.catch(() => callback(\"us\"));\n\t\t\t}\n\t\t});\n\t\tintlObject.promise.then(() => {\n\t\t\tconsole.log(\"Initialised!\");\n\t\t});\n\t\tphoneIntelObjectArray.push(intlObject);\n\t\twindow.onresize = (e) => {\n\t\t\tif (document.documentElement.classList.contains('remodal-is-locked'))\n\t\t\t\tresizePhoneSelectList(input);\n\t\t}\n\n\t})\n}\n\n//Form Validation \nconst nameInputs = document.querySelectorAll('input[data-name-input]');\nconst emailInputs = document.querySelectorAll('input[data-email-input]');\nconst phoneInputs = document.querySelectorAll('input[data-phone-input]');\n\n//Запрет ввода цифр в поле имени \nif (nameInputs) {\n\tnameInputs.forEach((input) => {\n\t\tinput.addEventListener('keypress', function (e) {\n\t\t\tconsole.log(e);\n\t\t\t//console.log(e.keyCode);\n\t\t\tif (e.keyCode != 8 && e.keyCode != 46 && (input.value.length > 49 || e.key && e.key.match(/[^а-яА-ЯЁёІіЇїҐґЄєa-zA-ZẞßÄäÜüÖöÀàÈèÉéÌìÍíÎîÒòÓóÙùÚúÂâÊêÔôÛûËëÏïŸÿÇçÑñœ’`'.-\\s]/)))\n\t\t\t\treturn e.preventDefault();\n\t\t});\n\t\tinput.addEventListener('input', function (e) {\n\t\t\tconsole.log(e);\n\t\t\tif (e.inputType == \"insertFromPaste\") {\n\t\t\t\t// На случай, если умудрились ввести через копипаст или авто-дополнение.\n\t\t\t\tinput.value = input.value.replace(/[^а-яА-ЯЁёІіЇїҐґЄєa-zA-ZẞßÄäÜüÖöÀàÈèÉéÌìÍíÎîÒòÓóÙùÚúÂâÊêÔôÛûËëÏïŸÿÇçÑñœ’`'.-\\s]/g, \"\").slice(0, 50);\n\t\t\t}\n\t\t});\n\t});\n}\n// Запрет ввода спецсимволов и букв в поле ввода телефона\nif (phoneInputs) {\n\tphoneInputs.forEach((input) => {\n\t\tinput.addEventListener('keypress', function (e) {\n\t\t\tconsole.log(e);\n\t\t\tif (input.value.length > 16 || e.key && e.key.match(/[^0-9\\+]/))\n\t\t\t\treturn e.preventDefault();\n\t\t});\n\t\tinput.addEventListener('input', function (e) {\n\t\t\tconsole.log(e);\n\t\t\tif (e.inputType == \"insertFromPaste\") {\n\t\t\t\t// На случай, если умудрились ввести через копипаст или авто-дополнение.\n\t\t\t\tinput.value = input.value.replace(/[^0-9\\+]/g, \"\").slice(0, 50);\n\t\t\t}\n\t\t});\n\t});\n}\n\n//Запрет ввода спецсимволов в поле email\nif (emailInputs) {\n\temailInputs.forEach((input) => {\n\t\tinput.addEventListener('keypress', function (e) {\n\t\t\tif (e.keyCode != 8 && e.keyCode != 46 && (input.value.length > 49 || e.key && e.key.match(/[^0-9a-zA-Z-_@.-\\s]/)))\n\t\t\t\treturn e.preventDefault();\n\t\t});\n\t\tinput.addEventListener('input', function (e) {\n\t\t\tconsole.log(e);\n\t\t\tif (e.inputType == \"insertFromPaste\") {\n\t\t\t\t// На случай, если умудрились ввести через копипаст или авто-дополнение.\n\t\t\t\tinput.value = input.value.replace(/[^0-9a-zA-Z-_@.-\\s]/g, \"\").slice(0, 50);\n\t\t\t}\n\t\t});\n\t});\n}\n\n// Валидация форм\nfunction removeErrorClassOnInput(input) {\n\tinput.addEventListener('input', () => {\n\t\tinput.classList.remove('is--error');\n\t});\n\tif (input.type == 'radio') {\n\t\tinput.addEventListener('click', () => {\n\t\t\tif (document.querySelectorAll(`[name=${input.dataset.name}]`).length) {\n\t\t\t\tdocument.querySelectorAll(`[name=${input.dataset.name}]`).forEach((radio) => {\n\t\t\t\t\tradio.classList.remove('is--error');\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\tinput.addEventListener('focus', () => {});\n\n}\n\nfunction formValidation(form) {\n\tlet isValid = true;\n\tconst inputs = form.querySelectorAll('input, select, textarea, [type=\"radio\"]');\n\n\tinputs.forEach((input) => {\n\t\tconst {\n\t\t\tvalue,\n\t\t\tdataset\n\t\t} = input;\n\t\tinput.classList.remove('is--error');\n\n\t\tif (dataset.required === 'true') {\n\t\t\tif (!value) {\n\t\t\t\tinput.classList.add('is--error');\n\t\t\t\tisValid = false;\n\t\t\t}\n\t\t\tif (input.type == 'radio') {\n\t\t\t\tif (!document.querySelector(`[name=${input.dataset.name}]:checked`)) {\n\t\t\t\t\tdocument.querySelectorAll(`[name=${input.dataset.name}]`).forEach((radio) => {\n\t\t\t\t\t\tradio.classList.add('is--error');\n\t\t\t\t\t});\n\t\t\t\t\tif (selectToggle) {\n\t\t\t\t\t\tselectToggle.classList.add('is--error');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn isValid;\n}\n\nfunction checkValidationFormOnSubmit(formClassName) {\n\tconst form = document.querySelector(formClassName);\n\tconst inputs = form.querySelectorAll('input, select, [type=\"radio\"]');\n\tconst onSubmitHandler = (event) => {\n\t\tif (formValidation(form)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//form.querySelector('.submit-button').value = \"Kirim permintaan\";\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tinputs.forEach((input) => {\n\t\tconst isRequiredInput = input.getAttribute('data-required');\n\t\tif (isRequiredInput) {\n\t\t\tremoveErrorClassOnInput(input);\n\t\t}\n\t});\n\n\t$(formClassName).submit(onSubmitHandler);\n}\n\nvar forms = document.querySelectorAll('form[data-validation]');\nif (forms.length) {\n\tforms.forEach((form) => {\n\t\tcheckValidationFormOnSubmit(`#${form.getAttribute('id')}`);\n\t\tform.setAttribute('novalidate', '');\n\t})\n}\n\n//Open form inside modal\nconst insideModalTrigger = document.querySelectorAll('[data-modal-form-trigger]');\n\nif (insideModalTrigger) {\n\tinsideModalTrigger.forEach((trigger) => {\n\t\ttrigger.addEventListener('click', () => {\n\t\t\tconst scrollWrapper = trigger.closest('.sm__scroll-wrapper');\n\t\t\tconst insideModalFormWrap = scrollWrapper.querySelector('.sm__inside-modal-form-wrapper');\n\n\t\t\tif (!trigger.classList.contains('is--open')) {\n\t\t\t\ttrigger.classList.add('is--open');\n\t\t\t\tinsideModalFormWrap.style.height = insideModalFormWrap.scrollHeight + 'px';\n\t\t\t\tinsideModalFormWrap.style.opacity = 1;\n\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tconst topPos = insideModalFormWrap.getBoundingClientRect().top + scrollWrapper.scrollTop\n\t\t\t\t\tscrollWrapper.scrollTo({\n\t\t\t\t\t\ttop: topPos, // scroll so that the element is at the top of the view\n\t\t\t\t\t\tbehavior: 'smooth' // smooth scroll\n\t\t\t\t\t})\n\t\t\t\t}, 550)\n\t\t\t} else {\n\t\t\t\ttrigger.classList.remove('is--open');\n\t\t\t\tinsideModalFormWrap.style.height = 0;\n\t\t\t\tinsideModalFormWrap.style.opacity = 0;\n\t\t\t}\n\t\t})\n\t})\n}\n\n\n//Fix scrollbar width remodal open/close\nconst bodyScrollControls = {\n\tscrollBarWidth: window.innerWidth - document.body.clientWidth,\n\n\tdisable() {\n\t\tdocument.body.style.marginRight = `${this.scrollBarWidth}px`;\n\t\tdocument.querySelector('.w-nav').style.right = `${this.scrollBarWidth}px`;\n\t\t//if (document.querySelector('.cookie'))\n\t\t//document.querySelector('.cookie').style.marhinRight = `${this.scrollBarWidth}px`;\n\t\tdocument.body.style.paddingRight = null;\n\t\tdocument.body.style.overflowY = 'hidden';\n\t},\n\tenable() {\n\t\tdocument.body.style.marginRight = null;\n\t\tdocument.body.style.paddingRight = null;\n\t\t//if (document.querySelector('.cookie'))\n\t\t//document.querySelector('.cookie').style.marhinRight = 0;\n\t\tdocument.querySelector('.w-nav').style.right = 0;\n\t\tdocument.body.style.overflowY = null;\n\t},\n};\n\n//Загружаем Youtube Iframe API\nvar tag = document.createElement('script');\n\ntag.src = \"https://www.youtube.com/iframe_api\";\nvar firstScriptTag = document.getElementsByTagName('script')[0];\nfirstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n\n//Инициализируем плеер\nvar smYoutubePlayer;\n\nfunction onYouTubeIframeAPIReady() {\n\tsmYoutubePlayer = new YT.Player('sm__video-player', {\n\t\theight: '390',\n\t\twidth: '640',\n\t\tvideoId: 'u4QvQKWAVBQ',\n\t\tplayerVars: {\n\t\t\t'playsinline': 1,\n\t\t\t'origin': window.location.host\n\t\t}\n\t});\n\n\t$('.sm__video-text-wrapper').on('click', function () {\n\t\t$(this).parent('.sm__video-wrapper').addClass('is--play');\n\t\tsmYoutubePlayer.playVideo();\n\t})\n}\n\n$(document).on('opening', '.remodal', function (e) {\n\tbodyScrollControls.disable();\n\tconst currentModal = $('.remodal.remodal-is-opening'),\n\t\tmodalID = '#' + currentModal.data('remodal-id'),\n\t\tiframeInModal = currentModal.find('iframe'),\n\t\tmodalWrapper = currentModal.closest('.remodal-is-opened'),\n\t\tscrollWrapper = currentModal.find('.sm__scroll-wrapper');\n\tlottieTriggers = currentModal.find('.sm__lottie-start-trigger'),\n\t\tphoneField = currentModal.find('.phone-input');\n\n\tscrollWrapper.animate({\n\t\tscrollTop: 0\n\t}, 0);\n\n\tif (phoneField.length) {\n\t\tresizePhoneSelectList(phoneField.get(0));\n\t}\n\n\tif (iframeInModal.length) {\n\t\tif (iframeInModal.data('src'))\n\t\t\tiframeInModal.attr('src', iframeInModal.data('src'));\n\t}\n\n\tif (lottieTriggers.length) {\n\t\tlottieTriggers.each(function () {\n\t\t\t$(this).trigger('click');\n\t\t})\n\t}\n});\n\n//Fix resize inSafari iOS\nwindow.onresize = () => {\n\tsetTimeout(function () {\n\t\tif (document.documentElement.classList.contains('remodal-is-locked')) {\n\t\t\tdocument.documentElement.classList.remove('remodal-is-locked');\n\t\t\tdocument.documentElement.classList.add('remodal-is-locked');\n\t\t}\n\t}, 300);\n}\n\n$(document).on('closing', '.remodal', function (e) {\n\tconst currentModal = $('.remodal.remodal-is-closing'),\n\t\tmodalID = '#' + currentModal.data('remodal-id'),\n\t\tiframeInModal = currentModal.find('iframe'),\n\t\tmodalWrapper = currentModal.closest('.remodal-is-opened'),\n\t\tlottieTriggers = currentModal.find('.sm__lottie-start-trigger'),\n\t\tformInModal = currentModal.find('form'),\n\t\tyoutubePlayerWrapper = currentModal.find('.sm__video-wrapper');\n\n\n\tif (youtubePlayerWrapper.length && smYoutubePlayer) {\n\t\tyoutubePlayerWrapper.removeClass('is--play');\n\t\tsetTimeout(function () {\n\t\t\tsmYoutubePlayer.stopVideo();\n\t\t}, 500)\n\t}\n\n\tif (formInModal.length) {\n\t\tformInModal.find('[type=\"submit\"]').val('Submit');\n\t\t$('.w-form-fail').hide();\n\t\t$('.w-form-done').hide();\n\t\tformInModal[0].reset();\n\t\tformInModal.show();\n\t\tformInModal.find('.is--error').each(function () {\n\t\t\t$(this).removeClass('is--error');\n\t\t});\n\t}\n\n\tif (iframeInModal.length) {\n\t\tif (iframeInModal.data('src'))\n\t\t\tiframeInModal.attr('src', '');\n\t}\n\n\tif ($('.sm__video-wrapper').length) {\n\t\t$('.sm__video-wrapper').removeClass('is--play');\n\t}\n\n\tif (lottieTriggers.length) {\n\t\tlottieTriggers.each(function () {\n\t\t\t$(this).trigger('click');\n\t\t})\n\t}\n});\n\n$(document).on('closed', '.remodal', function (e) {\n\tbodyScrollControls.enable();\n});\n"]}