1import t from"./modal-element-5YgM3OLs.js";import{d as o}from"./defineElement-Bh-rOTph.js";import"./GlobalStylesStore--z5tmrDj.js";import{U as e}from"./UserCentrics-D8W_hTLS.js";import{a as r}from"./js.cookie-BZunJvXJ.js";import"./TemplateElement-u6hNeGmQ.js";import"./StyledElement-Dmi2NcTH.js";import"./html-BmWsKWcd.js";import"./directives-geaH8KPO.js";import"./bodyScrollLock.es6-BLNflBSB.js";import"./ModalElementEvent-C2IIP3nm.js";import"./svg-icon-CGSNt3Tg.js";const i=`${window.siteConfig().siteName}_show_country_switch_modal`,n=()=>{r.set(i,!0)},s=()=>r.get(i)||!1,c=(window.siteConfig?.()?.contextPath??"").replace(/\/+$/,""),a=async()=>{try{const t=await fetch(`${c}/.rest/country/getCountry`,{});if(!t.ok)throw new Error(`HTTP error! Status Code ${t.status}!`);return await t.text()||void 0}catch(t){return console.log("Error fetching country:",t),null}};class l extends t{get siteConfigCountry(){return window.siteConfig().country}connected(){super.connected(),this.initializeCountrySelector().catch((t=>{console.error("Error initializing country selector:",t)}))}isDifferentFromSiteConfigCountry(t){return this.siteConfigCountry!==t}async initializeCountrySelector(){try{const t=await a();!s()&&this.isDifferentFromSiteConfigCountry(t)&&setTimeout((async()=>{try{await e.isConsentRequired()||(this.open(),n())}catch(t){console.error("Error in setTimeout callback:",t)}}),1e3)}catch(t){console.error("Error initializing country selector:",t)}}}o("country-selector-modal",l);export{l as default}; 2//# sourceMappingURL=country-selector-modal-DeQXnZav.js.map
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.