PageSourceSearch

https://flyingtiger.id/cdn/shop/t/204/assets/bundle.localization-modal.js?v=127683873997537474641788231380

js flyingtiger.id collected 2026-10-04 13:23:37 UTC 11,944 bytes, 1 lines download raw bytes

1!function(){"use strict";var e=function(){var e=".localization #modal-overlay",t=".localization",n="#default-modal-content",o="#choose-location",a="#defaultCountry",r="#changeCurrentLocation",l="#saveCurrentLocation",u="#CountryModalForm",i='[name="country_code"]',c="#cancelLocationChange",s=".modal__default--content-image",d=".localization #close-modal",m={modalWindowOverlay:document.querySelector(e),localizationModal:document.querySelector(t),defaultModalContent:document.querySelector(n),chooseLocation:document.querySelector(o),defaultCountry:document.querySelectorAll(a),changeCountryBtn:document.querySelector(r),formModal:document.querySelector(u),country_code_input:document.querySelectorAll(i),cancelLocationChange:document.querySelector(c),saveCurrentLocationBtn:document.querySelector(l),localizationModalContent:document.querySelector(s),closeModal:document.querySelector(d)},f={geoIPData:""};function y(e,t,n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);var a="expires="+o.toUTCString();document.cookie=e+"="+t+";"+a+";path=/"}function g(){m.changeCountryBtn&&m.changeCountryBtn.addEventListener("click",(function(){m.defaultModalContent.style.display="none",m.chooseLocation.style.display="block"})),m.saveCurrentLocationBtn&&m.saveCurrentLocationBtn.addEventListener("click",(function(){y("defaultLocalization","modalChanged",1),m.country_code_input.forEach((function(e){e.value=m.defaultCountry[0].getAttribute("data-locales")})),m.formModal.submit()})),m.cancelLocationChange&&m.cancelLocationChange.addEventListener("click",(function(){m.defaultModalContent.style.display="block",m.chooseLocation.style.display="none"})),m.closeModal&&m.closeModal.addEventListener("click",(function(){y("defaultLocalization","modalChanged",1),m.localizationModal.style.display="none"}))}function p(){void 0!==window.geoip2&&m.localizationModal?window.geoip2&&window.geoip2.country((function(e){f.geoIPData=e;var t=f.geoIPData.country.iso_code!=m.localizationModal.getAttribute("data-base-country");(function(e){for(var t=!1,n=0;n<window.fuse.available_countries.length;n++)window.fuse.available_countries[n]===e&&(t=!0);return t})(f.geoIPData.country.names.en)&&t&&(m.localizationModal.style.display="block",function(e){var t='<img class="image-wrapper" src="https://cdn.shopify.com/static/images/flags/'.concat(e.country.iso_code.toLowerCase(),'.svg">');m.defaultCountry.forEach((function(t){t.innerText=e.country.names.en,t.setAttribute("data-locales",e.country.iso_code)})),m.localizationModalContent.innerHTML=t,y("defaultLocalization","modalChanged",1)}(e))}),(function(e){console.log("GeoIP2 error!!!")})):console.log("A browser that blocks GeoIP2 requests")}return Object.freeze({init:function(){g(),function(e){for(var t=e+"=",n=decodeURIComponent(document.cookie).split(";"),o=0;o<n.length;o++){for(var a=n[o];" "==a.charAt(0);)a=a.substring(1);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return""}("defaultLocalization")||p()}})};function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function r(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return n(e)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function i(e,t,n){return i=u()?Reflect.construct:function(e,t,n){var a=[null];a.push.apply(a,t);var r=new(Function.bind.apply(e,a));return n&&o(r,n.prototype),r},i.apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return i(e,arguments,l(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),o(a,e)},c(e)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=l(e);if(t){var a=l(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return r(this,n)}}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(i,e);var a,r,l,u=s(i);function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=u.call(this)).elements={input:t.querySelector('.countrycurrency input[name="country_code"]'),languageInput:t.querySelector('.language input[name="locale_code"]'),button:t.querySelector(".countrycurrency button"),languageButton:t.querySelector(".language button"),panel:t.querySelector(".countrycurrency .disclosure__list-wrapper"),languagePanel:t.querySelector(".language .disclosure__list-wrapper"),selectedCountry:t.querySelector(".countrycurrency .disclosure__image-data"),selectedLanguage:t.querySelector(".language .disclosure__data"),openModalButton:document.getElementById("open-modal"),modalWindowOverlay:document.getElementById("modal-overlay"),bodyElement:document.getElementById("fuse-body"),closeModalButton:document.getElementById("close-modal"),formInputReturnTo:t.querySelector('input[name="return_to"]'),submit:t.querySelector('button[type="submit"]')},t.elements.button&&(t.elements.button.addEventListener("click",t.openSelector.bind(n(t))),t.elements.button.addEventListener("focusout",t.closeSelector.bind(n(t)))),t.elements.languageButton&&(t.elements.languageButton.addEventListener("click",t.openLanguageSelector.bind(n(t))),t.elements.languageButton.addEventListener("focusout",t.closeLanguageSelector.bind(n(t)))),null===(e=t.elements.submit)||void 0===e||e.addEventListener("click",t.submit.bind(n(t))),t.querySelectorAll(".countrycurrency a").forEach((function(e){return e.addEventListener("click",t.onItemClick.bind(n(t)))})),t.querySelectorAll(".language a").forEach((function(e){return e.addEventListener("click",t.onLanguageItemClick.bind(n(t)))}));t.elements.openModalButton&&t.elements.openModalButton.addEventListener("click",(function(){t.elements.modalWindowOverlay.style.display="flex",t.elements.bodyElement.style.overflow="hidden"}));var o=function(e){e.preventDefault(),t.elements.modalWindowOverlay.style.display="none",t.elements.bodyElement.style.overflow="scroll"};t.elements.closeModalButton&&t.elements.closeModalButton.addEventListener("click",o);return t.elements.modalWindowOverlay&&(t.elements.modalWindowOverlay.addEventListener("click",(function(e){e.target===e.currentTarget&&o()})),document.addEventListener("click",t.handleDocumentClick.bind(n(t)))),t}return a=i,(r=[{key:"hidePanel",value:function(){this.elements.button.setAttribute("aria-expanded","fal
1se"),this.elements.panel.setAttribute("hidden",!0)}},{key:"hideLanguagePanel",value:function(){this.elements.languageButton.setAttribute("aria-expanded","false"),this.elements.languagePanel.setAttribute("hidden",!0)}},{key:"onContainerKeyUp",value:function(e){"ESCAPE"===e.code.toUpperCase()&&(this.hidePanel(),this.elements.button.focus())}},{key:"onItemClick",value:function(e){e.preventDefault(),this.elements.input.value=e.currentTarget.dataset.value,this.elements.button.setAttribute("aria-expanded","false"),this.elements.panel.setAttribute("hidden",!0);var t=e.currentTarget.closest(".disclosure__item").outerText.replace(/(\r\n|\n|\r)/gm,""),n=e.currentTarget.closest(".disclosure__item").children[0].outerHTML.replace(/(\r\n|\n|\r)/gm,"");this.elements.selectedCountry&&(this.elements.selectedCountry.innerHTML=n+t)}},{key:"onLanguageItemClick",value:function(e){e.preventDefault(),this.elements.languageInput.value=e.currentTarget.dataset.value,this.elements.languageButton.setAttribute("aria-expanded","false"),this.elements.languagePanel.setAttribute("hidden",!0),this.elements.selectedLanguage.innerText=e.currentTarget.closest(".language .disclosure__item").outerText.replace(/(\r\n|\n|\r)/gm,"")}},{key:"openSelector",value:function(e){this.elements.button.focus(),this.elements.panel.toggleAttribute("hidden"),this.elements.button.setAttribute("aria-expanded",("false"===this.elements.button.getAttribute("aria-expanded")).toString())}},{key:"openLanguageSelector",value:function(e){this.elements.languageButton.focus(),this.elements.languagePanel.toggleAttribute("hidden"),this.elements.languageButton.setAttribute("aria-expanded",("false"===this.elements.button.getAttribute("aria-expanded")).toString())}},{key:"closeSelector",value:function(e){var t=e.relatedTarget&&"BUTTON"===e.relatedTarget.nodeName;(null===e.relatedTarget||t)&&this.hidePanel()}},{key:"closeLanguageSelector",value:function(e){var t=e.relatedTarget&&"BUTTON"===e.relatedTarget.nodeName;(null===e.relatedTarget||t)&&this.hideLanguagePanel()}},{key:"handleDocumentClick",value:function(e){var t=this.elements.panel.contains(e.target)||this.elements.languagePanel.contains(e.target),n=this.elements.button.contains(e.target)||this.elements.languageButton.contains(e.target),o=this.elements.modalWindowOverlay.contains(e.target);t||n||(this.hidePanel(),this.hideLanguagePanel()),o||(this.elements.modalWindowOverlay.style.display="none",this.elements.bodyElement.style.overflow="scroll")}},{key:"setCookie",value:function(e,t,n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);var a="expires="+o.toUTCString();document.cookie=e+"="+t+";"+a+";path=/"}},{key:"submit",value:function(e){if(e.preventDefault(),window.sessionStorage.removeItem("serp_offsetTop"),window.sessionStorage.removeItem("serp_cache"),window.sessionStorage.removeItem("selectedShippingCountry"),window.sessionStorage.removeItem("last_product_clicked_url"),this.setCookie("user_language",this.elements.languageInput.value,30),this.setCookie("user_country",this.elements.input.value.toLowerCase(),30),"false"==document.querySelector("body").getAttribute("ip-redirection-enabled")){var t=orbito.getCountryDomain(),n=this.querySelector("form").querySelector("input[name='return_to']"),o=this.elements.input.value,a=this.elements.languageInput.value,r="";r=n.value.includes("?")?"&mdApp_countryCodeDomain="+o:"?mdApp_countryCodeDomain="+o,n.value=n.value+r,document.cookie="mdApp_countryCodeDomain=".concat(o,"; domain=").concat(t,"; path=/; max-age=").concat(5184e3,";"),document.cookie="mdApp_showRecommendationLang=".concat(a,"; domain=").concat(t,"; path=/; max-age=").concat(5184e3,";"),this.elements.input.value=o}this.querySelector("form").submit()}}])&&t(a.prototype,r),l&&t(a,l),Object.defineProperty(a,"prototype",{writable:!1}),i}(c(HTMLElement));customElements.define("localization-modal-form",d),window.addEventListener("DOMContentLoaded",(function(){e().init()}))}();

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.