PageSourceSearch

https://ultra-shop.com/assets/webpack/js/siteLangPopup-DafQ8Q_E.js

js ultra-shop.com collected 2026-10-02 15:14:40 UTC 5,313 bytes, 46 lines download raw bytes

1import loadDynamicCssFiles from "./loadDynamicCssFiles.js";;
2 loadDynamicCssFiles(['style/siteLangPopup-CpJz80zF.css','style/index-EWiX1BIs.css'], '/assets/webpack/');;import{H as n}from"./runtime-B-_xttJV.js";import{PopupHtmlInit as i}from"./index-VBjwPGbY.js";import{n as s}from"./Axios-BzGTuKBH.js";import{h as a}from"./moment-C5S46NFB.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./scroll-lock-Ce17957G.js";import"./index-sEoN9veU.js";const o=n.template({compiler:[8,">= 4.3.0"],main:function(t,e,l,p,g){return`<div class="site-lang-popup">
3    <div class="site-lang-popup__content-block">
4        <div class="site-lang-inner-info">
5            <div class="site-lang-inner-info__content-block">
6                <div class="site-lang-inner-info__step site-lang-inner-info__step-1" style="display: block;"
7                     data-step-one>
8                    <div class="site-lang-inner-info__inner-wrapper">
9                        <div class="site-lang-inner-info__content-title">
10                            Встанови українську мову за замовчуванням
11                        </div>
12                        <div class="site-lang-inner-info__btns-block">
13                            <button data-trigger-ua class="site-lang-inner-info__btn site-lang-inner-info__btn-accent ">
14                                ОК
15                            </button>
16                            <button data-trigger-switch
17                                    class="site-lang-inner-info__btn site-lang-inner-info__btn-link">
18                            <span class="site-lang-inner-info__btn-link-text">
19                                Змінити
20                            </span>
21                            </button>
22                        </div>
23                    </div>
24                </div>
25                <div class="site-lang-inner-info__step site-lang-inner-info__step-2" style="display: none;"
26                     data-step-two>
27                    <div class="site-lang-inner-info__inner-wrapper">
28                        <div class="site-lang-inner-info__content-title">
29                            Будь ласка, обери мову сайту
30                        </div>
31                        <div class="site-lang-inner-info__btns-block">
32                            <button data-trigger-ua class="site-lang-inner-info__btn site-lang-inner-info__btn-accent ">
33                                Українська
34                            </button>
35                            <button data-trigger-ru class="site-lang-inner-info__btn site-lang-inner-info__btn-blank">
36                                російська
37                            </button>
38                        </div>
39                    </div>
40                </div>
41            </div>
42        </div>
43    </div>
44</div>
45`},useData:!0}),r={init(){this.initOptions(),this.checkIfLangSelected()||this.initPopup()},initPopup(){const t=[];t[0]=o(),t[2]="lang-popup-container",t[3]="lang-popup",t[4]={width:"auto",height:"auto"},t[9]=!0,t[11]=this.closePopupClb.bind(this),this.popupInstance=i(...t),this.$popupDomEl=this.popupInstance.domElems.currentElem,this.selectDomElems()},initOptions(){this._uaLangSelector="uk-UA",this._ruLangSelector="ru-RU",this._requestUrl="/site-language/default/select",this._localHostPopupSetTime="popupSetLangTime",this._localHostPopupLang="popupSetLang",this.isSendLangRequest=!1},selectDomElems(){this._triggersUa=this.$popupDomEl.querySelectorAll("[data-trigger-ua]"),this._triggersRu=this.$popupDomEl.querySelectorAll("[data-trigger-ru]"),this._triggersSwitch=this.$popupDomEl.querySelectorAll("[data-trigger-switch]"),this._triggersStep1=this.$popupDomEl.querySelector("[data-step-one]"),this._triggersStep2=this.$popupDomEl.querySelector("[data-step-two]"),this.$popupDomEl&&this._triggersSwitch.length&&this._triggersStep1&&this._triggersStep2&&this.handleEventListeners("addEventListener")},handleEventListeners(t="addEventListener"){this._triggersUa.forEach(e=>{e[t]("click",this.setSiteLang.bind(this,this._uaLangSelector))}
45),this._triggersRu.forEach(e=>{e[t]("click",this.setSiteLang.bind(this,this._ruLangSelector))}),this._triggersSwitch.forEach(e=>{e[t]("click",this.switchStep.bind(this))})},setSiteLang(t){this.sendLangRequest(t),this.popupInstance.close()},closePopupClb(){this.sendLangRequest(this.getSiteLangIdentifier()),this.handleEventListeners("removeEventListener")},sendLangRequest(t=this._uaLangSelector){this.isSendLangRequest||(this.isSendLangRequest=!0,this.setClosePopupLocalstorage(t),s.post(this._requestUrl,{language:t,locationUrl:window.location.pathname}).then(e=>{this.getSiteLangIdentifier()!==t&&e.data&&e.data.url&&(location.href=e.data.url)}))},switchStep(){this._triggersStep1.style.display="none",this._triggersStep2.style.display="block"},setClosePopupLocalstorage(t){const e=a().format("DD.MM.YYYY, HH:mm:ss");window.localStorage.setItem(this._localHostPopupSetTime,e),window.localStorage.setItem(this._localHostPopupLang,t)},getLocalstorageItemByKey(t){return window.localStorage.getItem(t)},checkIfLangSelected(){return this.getLocalstorageItemByKey(this._localHostPopupLang)},getSiteLangIdentifier(){return document.documentElement.lang==="ru"?this._ruLangSelector:this._uaLangSelector}};r.init();
46;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.