PageSourceSearch

https://www.workday.com/etc.clientlibs/atlas/clientlibs/common/pub…/js/9173.7778d8b2efc496aa668d.bundle.js

js workday.com collected 2026-09-24 08:27:25 UTC 33,356 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkui_apps=self.webpackChunkui_apps||[]).push([[9173],{4231(__unused_webpack_module,__webpack_exports__,__webpack_require__){eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   XV: () => (/* binding */ theHeader),\n/* harmony export */   qy: () => (/* binding */ html),\n/* harmony export */   rf: () => (/* binding */ body),\n/* harmony export */   uP: () => (/* binding */ refreshNavConstants),\n/* harmony export */   yl: () => (/* binding */ modal)\n/* harmony export */ });\nvar theHeader=document.querySelector('.header-wrapper');var modal=document.querySelector('.primary-navigation-modal');var body=document.querySelector('body');var html=document.querySelector('html');function refreshNavConstants(){theHeader=document.querySelector('.header-wrapper');modal=document.querySelector('.primary-navigation-modal');}\n\n//# sourceURL=webpack://ui.apps/./src/main/content/jcr_root/apps/atlas/components/structure/NavConstants.js?\n}")},9047(__unused_webpack_module,__webpack_exports__,__webpack_require__){eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   CJ: () => (/* binding */ handleArrowNavigation),\n/* harmony export */   Cb: () => (/* binding */ rederSelectedItems),\n/* harmony export */   IH: () => (/* binding */ addLanguageNavButtonInNavGroup),\n/* harmony export */   Rk: () => (/* binding */ KEYS),\n/* harmony export */   p: () => (/* binding */ LANG_MENU_SECTION),\n/* harmony export */   rU: () => (/* binding */ getCountryAndRegionGroup),\n/* harmony export */   wI: () => (/* binding */ extractTextWithinParentheses)\n/* harmony export */ });\n/* harmony import */ var ClientLibsJS_utils_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(222);\n/* harmony import */ var _clientlibs_common_publish_src_js_navigation_navigationHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3888);\n/* harmony import */ var _NavConstants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4231);\n// Constants for key codes\nvar KEYS={ENTER:13,ESCAPE:27,SPACE:32,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,TAB:9};// Constants for menu sections\nvar LANG_MENU_SECTION={COUNTRY_SECTION:'country',LANG_SECTION:'language'};/**\n * @summary This function creates a button with the current site name and adds it to the navigation links for lower devices, which will be visible when clicking on the hamburger menu.\n * @param {string} laguageLabel - button label.\n */var addLanguageNavButtonInNavGroup=function addLanguageNavButtonInNavGroup(laguageLabel){var mobileLangItem=document.createElement('li');var mobileLangItemButton=document.createElement('button');var mobileLangItemButtonSpan=document.createElement('span');var primaryMenu=_NavConstants__WEBPACK_IMPORTED_MODULE_2__/* .theHeader */ .XV.querySelector('.cmp-navigation-v2.menu .cmp-navigation-v2__group');var signInItem=_NavConstants__WEBPACK_IMPORTED_MODULE_2__/* .theHeader */ .XV.querySelector('.cmp-sign-in.cmp-navigation-v2__item');var languageToggle=document.querySelector('.language-toggle');mobileLangItem.classList.add('cmp-language-navigation-v3','cmp-navigation-v2__item','cmp-navigation__item--level-0','mobile-only');var randomId=Math.random();// this.getRandomId();\nmobileLangItemButtonSpan.innerHTML=laguageLabel;mobileLangItemButton.classList.add('lang-nav-v3-region');mobileLangItemButton.appendChild(mobileLangItemButtonSpan);mobileLangItemButton.appendChild((0,_clientlibs_common_publish_src_js_navigation_navigationHelper__WEBPACK_IMPORTED_MODULE_1__/* .chevronForClonedItems */ .gn)());mobileLangItemButton.setAttribute('aria-controls',\"item-\".concat(randomId));mobileLangItemButton.setAttribute('aria-expanded','false');mobileLangItem.appendChild(mobileLangItemButton);mobileLangItemButton.addEventListener('click',function(){var languagesNavMenu=document.querySelector('.cmp-language-navigation-v3__wrapper');var _getStickyTopPosition=(0,ClientLibsJS_utils_helpers__WEBPACK_IMPORTED_MODULE_0__/* .getStickyTopPosition */ .Ul)(),bannerHeight=_getStickyTopPosition.bannerHeight;languageToggle.setAttribute('aria-expanded','true');languagesNavMenu.style.display='block';languagesNavMenu.style.zIndex='99999';if(window.innerWidth<1124){languagesNavMenu.style.top=\"\".concat(bannerHeight,\"px\");}_NavConstants__WEBPACK_IMPORTED_MODULE_2__/* .modal */ .yl.classList.add('showGreyBack');(0,_clientlibs_common_publish_src_js_navigation_navigationHelper__WEBPACK_IMPORTED_MODULE_1__/* .freezeBodyAndHtml */ .On)();});mobileLangItemButton.addEventListener('keydown',function(e){if(e.key==='Enter'||e.key===' '){setTimeout(function(){var closeBtn=document.querySelector('.language-menu .close-lang-nav-menu');closeBtn.focus();},100);}});if(signInItem){primaryMenu.insertBefore(mobileLangItem,signInItem);}else{primaryMenu.appendChild(mobileLangItem);}};/**\n * Extracts the text within parentheses if it exists.\n * If there are no parentheses, returns the original input string.\n *\n * @param {string} input - The input string to process.\n * @returns {string} - The extracted text within parentheses or the original input string.\n */function extractTextWithinParentheses(input){var match=input.match(/\\(([^)]+)\\)/);return match?match[1]:input;}/**\n * Retrieves the region, country, and language HTML elements based on the language ID.\n *\n * @param {string} LangItemId - The language item ID used to identify the elements (e.g., 'apj-0').\n * @param {HTMLElement} section - The section wrapper where the target elements reside.\n * @returns {Object}
1 An object containing the HTML elements: regionEl, countryEl, languageEl.\n */function getCountryAndRegionGroup(LangItemId,section){var regionId=LangItemId.split('-')[0];// ex: apj-0 --\x3e apj\nvar regionEl=section.querySelector(\"[data-region-id=\".concat(regionId,\"]\"));var countryEl=section.querySelector(\"[data-country-id=\".concat(LangItemId,\"]\"));return{regionEl:regionEl,countryEl:countryEl};}/**\n * Appends a list of elements under the target element inside the section wrapper.\n *\n * @param {HTMLElement} element - The target element to which the list will be appended.\n * @param {HTMLElement} section - The section wrapper where the target element resides.\n * @param {boolean} isEnterPress - Flag to maintian button clicked throught keyboard or not\n */function rederSelectedItems(element,section,isEnterPress){var nextSectionItems=element.nextElementSibling;var nextSectionItemsClone=nextSectionItems===null||nextSectionItems===void 0?void 0:nextSectionItems.cloneNode(true);// Check if the section has any children\nif(section&&section.children.length>0&&nextSectionItemsClone){section.replaceChild(nextSectionItemsClone,section.children[0]);}else if(section&&nextSectionItemsClone){// If no children, simply append the clone\nsection.appendChild(nextSectionItemsClone);if(isEnterPress){var firstElement=section.querySelector('.languageNav');firstElement.focus();}}// For lower-resolution devices, there's no need to expand sub-menus.\nif(window.innerWidth<992)return;var elType=element.dataset.elType;var sectionWrapper=document.querySelector(\".section-wrapper.\".concat(elType,\"-list\"));var isItemAlreadySelected=sectionWrapper.querySelector(\".\".concat(elType,\".selected\"));if(isItemAlreadySelected){isItemAlreadySelected.classList.remove('selected');isItemAlreadySelected.setAttribute('aria-expanded',false);}element.classList.add('selected');if(elType!=='language')element.setAttribute('aria-expanded',true);}/**\n * Handle arrow key navigation to loop the focus within the section.\n * @param {HTMLElement} target - The target element that triggered the event.\n * @param {number} keyCode - The key code of the arrow key pressed.\n */function handleArrowNavigation(target,keyCode){var allItems=target.closest('.section-wrapper').querySelectorAll(':scope > ul > li > .languageNav');var index=Array.prototype.indexOf.call(allItems,target);var direction=keyCode===KEYS.RIGHT_ARROW||keyCode===KEYS.DOWN_ARROW?1:-1;var newIndex=(index+allItems.length+direction)%allItems.length;allItems[newIndex].focus();}\n\n//# sourceURL=webpack://ui.apps/./src/main/content/jcr_root/apps/atlas/components/structure/languagenavigation/v3/languagenavigation/language-nav-v3-helpers.js?\n}")},9173(__unused_webpack_module,__webpack_exports__,__webpack_require__){eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3029);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2901);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4467);\n/* harmony import */ var _clientlibs_common_publish_src_js_utils_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(222);\n/* harmony import */ var _clientlibs_common_publish_src_js_navigation_navigationHelper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3888);\n/* harmony import */ var _NavConstants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4231);\n/* harmony import */ var _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9047);\n/**\n * This class handles the language navigation functionality including events, accessibility, and initialization.\n * It also sets the current site label and selects the default items based on the URL locale.\n */var Languagenavigation=/*#__PURE__*/function(){function Languagenavigation(){var _this=this;(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .A)(this,Languagenavigation);(0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__/* [\"default\"] */ .A)(this,\"init\",function(){// add event listener to globe icone and freezeBody & un-freezeBody on open modal\n(0,_clientlibs_common_publish_src_js_navigation_navigationHelper__WEBPACK_IMPORTED_MODULE_4__/* .toggleUtilityNav */ .Wy)(_this.languageToggle,_this.languagesNavMenu,_NavConstants__WEBPACK_IMPORTED_MODULE_5__/* .modal */ .yl);_this.setMenuEventListeners();// By default, select the currently opened site and set the current site name\n_this.setCurrentSiteLabelAndSelectItems();(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .addLanguageNavButtonInNavGroup */ .IH)(_this.currentSiteLabel);_this.handleAccessibility();});this.isModalInitialized=false;this.languagesNavMenu=document.querySelector('.cmp-language-navigation-v3__wrapper');this.languageToggle=document.querySelector('.language-toggle');this.regionsSection=document.querySelector('.region-list');this.countrySection=document.querySelector('.country-list');this.languageSection=document.querySelector('.language-list');this.regionsList=document.querySelectorAll('.regions');this.languageNavSections=Array.from(document.querySelectorAll('.section-wrapper'));var mobileHeader=document.querySelector('.language-menu__header-mobile');this.menuBackButtonEl=mobileHeader.querySelector('.go-back-lang-nav-menu');
1this.menuCloseButtonEl=mobileHeader.querySelector('.close-lang-nav-menu');this.activeSectionHeaderEl=mobileHeader.querySelector('.active-section');this.availableLanguagesEl=mobileHeader.querySelector('.current-site__available-links');this.mobileNavButton=_NavConstants__WEBPACK_IMPORTED_MODULE_5__/* .theHeader */ .XV.querySelector('.mobile-drawer button');// Flag to keep track of the currently active section for mobile view\nthis.activeSectionName=null;// Variable to store the name of the current site\nthis.currentSiteLabel=null;// Variable to store the currently clicked item name for mobile.\nthis.countrySectionTitle='';this.regionSectionTitle=document.querySelector('.active-section').textContent;this.isLowerDevice=window.innerWidth<992;this.currentLocale=(0,_clientlibs_common_publish_src_js_utils_helpers__WEBPACK_IMPORTED_MODULE_3__/* .getLocaleFromTargetURL */ .LJ)(window.location.pathname);}/**\n   * @summary Closes the language navigation menu. Also closes the navigation-v2 menu if it is open.\n   * @param {boolean} focusNavButton - Determines if the navigation modal will close (false) or focus the selected language button in the navigation menu (true), if it is opened.\n   */return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__/* [\"default\"] */ .A)(Languagenavigation,[{key:\"closeMenu\",value:function closeMenu(focusNavButton){this.activeSectionHeaderEl.innerHTML=this.regionSectionTitle;this.languageToggle.classList.remove('open');this.languageToggle.setAttribute('aria-expanded','false');this.languagesNavMenu.style.display='none';this.languagesNavMenu.style.zIndex='auto';_NavConstants__WEBPACK_IMPORTED_MODULE_5__/* .modal */ .yl.classList.remove('showGreyBack');(0,_clientlibs_common_publish_src_js_navigation_navigationHelper__WEBPACK_IMPORTED_MODULE_4__/* .unfreezeBodyAndHtml */ .pz)();this.languageToggle.focus();this.regionsSection.querySelectorAll('.selected').forEach(function(el){el.classList.remove('selected');});var headerContainer=_NavConstants__WEBPACK_IMPORTED_MODULE_5__/* .theHeader */ .XV.querySelector('.header-container');// close navigation menu ,if it's opened\nif(headerContainer.classList.contains('no-grow')){if(focusNavButton){var selectedLangBtn=document.querySelector('.lang-nav-v3-region');selectedLangBtn.focus();}else{var _this$mobileNavButton;(_this$mobileNavButton=this.mobileNavButton)===null||_this$mobileNavButton===void 0||_this$mobileNavButton.click();}}}/**\n   * @summary Sets up event listeners for the language navigation menu items including each section, close, and back icons.\n   */},{key:\"setupLanguageMenuEvents\",value:function setupLanguageMenuEvents(){var _this2=this;// adding event delegation to different sections (region groups, countries, and languages).The respective event handler function is called based on the type (data-el-type attribute) of the clicked item\nthis.languageNavSections.forEach(function(languageNavSection){languageNavSection.addEventListener('click',function(event){// Get the anchor element when clicking on an SVG to read its attributes\nvar target=event.target.dataset.elType?event.target:event.target.parentElement;var elType=target.dataset.elType;if(elType){_this2[\"\".concat(elType,\"EventHandler\")](target);}});});this.menuCloseButtonEl.addEventListener('click',function(){_this2.closeMenu();});this.availableLanguagesEl.addEventListener('keydown',function(event){if(event.keyCode===_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.ESCAPE)_this2.closeMenu(true);});this.menuCloseButtonEl.addEventListener('keydown',function(event){if(event.keyCode===_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.ESCAPE)_this2.closeMenu();});this.menuBackButtonEl.addEventListener('keydown',function(event){var keyCode=event.keyCode,shiftKey=event.shiftKey;// set focus to the back button when focus reached to the last item in the modal.\nif(keyCode===_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.TAB&&shiftKey){event.preventDefault();var allElements=_this2.regionsSection.querySelectorAll('.languageNav.region');if(_this2.activeSectionName===_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.COUNTRY_SECTION){allElements=_this2.countrySection.querySelectorAll('.languageNav.country');}else if(_this2.activeSectionName===_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.LANG_SECTION){allElements=_this2.languageSection.querySelectorAll('.languageNav.language');}var lastRegionEl=allElements[allElements.length-1];lastRegionEl.focus();}else if(event.keyCode===_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.ESCAPE)_this2.closeMenu(true);});this.menuBackButtonEl.addEventListener('click',function(){// based active section updating class to show only one section & setting modal header.\nvar parentRegion=_this2.regionsSection.querySelector('.selected');switch(_this2.activeSectionName){case _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.COUNTRY_SECTION:_this2.setSectionActiveStatus(null);break;case _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.LANG_SECTION:_this2.setSectionActiveStatus(_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.COUNTRY_SECTION,parentRegion);break;default:_this2.closeMenu(true);break;}});}/**\n   * @summary Clears the existing countries and languages, and renders the respective countries and languages.\n   * sets the item name as menu title for lower devices.\n   * @param {HTMLElement} target - The target element that triggered the event.\n   * @param {boolean} isEnterPress - Whether the event was triggered by an Enter key press.\n   */},{key:\"regionEventHandler\",value:function regionEventHandler(target,isEnterPress){this.setSectionActiveStatus(_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.COUNTRY_SECTION,target);this.clearCountrySection();this.clearlanguageSection();(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .rederSelectedItems */ .Cb)(target,this.countrySection,isEnterPress);}/**\n   * @summary clears the clear the existing laguages and renders the respective languages.\n   * update the active section for mobile. sets the item name as menu title for lower devices.\n   */},{key:\"countryEventHandler\",value:function countryEventHandler(target,isEnterPress){this.clearlanguageSection();this.setSectionActiveStatus(_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.LANG_SECTION,target);(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .rederSelectedItems */ .Cb)(target,this.languageSection,isEnterPress);}},{key:\"languageEventHandler\",value:function languageEventHandler(target,isEnterPress){;(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .rederSelectedItems */ .Cb)(target,null,isEnterPress);var href=target.href;var dataLangId=target.getAttribute('data-lang-id');var CountryName=this.countrySection.querySelector(\"[data-country-id=\".concat(dataLangId,\"]\")).getAttribute('data-country-name');var selectedCountryName=(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .extractTextWithinParentheses */ .wI)(CountryName);// get the pointing country name based on selected languag.\nvar targetL
1ocale=(0,_clientlibs_common_publish_src_js_utils_helpers__WEBPACK_IMPORTED_MODULE_3__/* .getLocaleFromTargetURL */ .LJ)(href);var redirectingLangId=this.regionsSection.querySelector(\"a[href*=\\\"\".concat(targetLocale,\"\\\"][isMaster=\\\"true\\\"]\")).getAttribute('data-lang-id');var redirectingCountry=this.regionsSection.querySelector(\"[data-country-id=\".concat(redirectingLangId,\"]\")).getAttribute('data-country-name');var currentSiteLabel=\"\".concat(redirectingCountry,\"/\").concat(selectedCountryName);var regionAndLanData={selectedCountryName:selectedCountryName,currentSiteLabel:currentSiteLabel};var setIntentoLanguage=function setIntentoLanguage(langCode){if(window.IWST&&typeof window.IWST.setLanguage==='function'){window.IWST.setLanguage(langCode);return true;}return false;};var dataLanguage=target.getAttribute('data-laguage');var intentoLangCode=dataLanguage==='Français'?'fr-ca':'en';if(!setIntentoLanguage(intentoLangCode)){var waitForIWST=setInterval(function(){if(setIntentoLanguage(intentoLangCode))clearInterval(waitForIWST);},100);setTimeout(function(){return clearInterval(waitForIWST);},2000);}// Save data to sessionStorage\nvar jsonString=JSON.stringify(regionAndLanData);sessionStorage.setItem('selectedRegionInfo',jsonString);// set cookie for region missmatch banner.\ndocument.cookie=\"cookie-preferred-language=\".concat(targetLocale,\"; domain=\").concat(window.location.hostname,\"; path=/\");this.closeMenu();if(isEnterPress)window.location.href=href;}/**\n   * @summary Sets the active section by updating the 'active' class to show only one section for mobile view.\n   * @param {string} currentSection - The name of the current section to be set as active.\n   */},{key:\"setSectionActiveStatus\",value:function setSectionActiveStatus(currentSection,itemEl){this.languageNavSections.forEach(function(section){section.classList.remove('active');});var menuTitle=this.regionSectionTitle;if(itemEl)menuTitle=itemEl.querySelector('.item-label').textContent;this.activeSectionHeaderEl.innerHTML=menuTitle;this.activeSectionName=currentSection;if(currentSection===_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.LANG_SECTION){this.languageSection.classList.add('active');}else if(currentSection===_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.COUNTRY_SECTION){this.countrySection.classList.add('active');}else{this.regionsSection.classList.add('active');}}/**\n   * Clears the all countries under the country section.\n   */},{key:\"clearlanguageSection\",value:function clearlanguageSection(){var childElement=this.languageSection.querySelector('.regions__countries__languages');if(childElement){this.languageSection.removeChild(childElement);}}/**\n   * Clears the all languages under the language section.\n   */},{key:\"clearCountrySection\",value:function clearCountrySection(){var childElement=this.countrySection.querySelector('.regions__countries');if(childElement){this.countrySection.removeChild(childElement);}}/**\n   * @summary Selects the default items based on the URL locale.\n   * Sets the current site label for Desktop\n   * Sets the current site label and show the available sites lists for mobile\n   */},{key:\"setCurrentSiteLabelAndSelectItems\",value:function setCurrentSiteLabelAndSelectItems(){var initialLanguageEl=this.regionsSection.querySelector(\"a[href*=\\\"\".concat(this.currentLocale,\"\\\"][isMaster=\\\"true\\\"]\"));// If the current site is not authored, clear previous selected items & skip.\nif(!initialLanguageEl){var isItemSelected=this.regionsSection.querySelector('.selected');if(isItemSelected){isItemSelected.classList.remove('selected');}this.clearCountrySection();this.clearlanguageSection();return;}// Select the Region-group and Render the counties under the selected Region-group.\ninitialLanguageEl.setAttribute('aria-current','page');var _initialLanguageEl$da=initialLanguageEl.dataset,langId=_initialLanguageEl$da.langId,laguage=_initialLanguageEl$da.laguage;var elements=(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .getCountryAndRegionGroup */ .rU)(langId,this.regionsSection);(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .rederSelectedItems */ .Cb)(elements.regionEl,this.countrySection);//  Select the country and Render the laguages under the selected country.\nvar _getCountryAndRegionG=(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .getCountryAndRegionGroup */ .rU)(langId,this.countrySection),countryEl=_getCountryAndRegionG.countryEl;(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .rederSelectedItems */ .Cb)(countryEl,this.languageSection);//  Select the language.\nvar languageEl=this.languageSection.querySelector(\"a[href*=\\\"\".concat(this.currentLocale,\"\\\"][isMaster=\\\"true\\\"]\"));(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .rederSelectedItems */ .Cb)(languageEl);if(this.isLowerDevice){elements.regionEl.classList.add('selected');elements.countryEl.classList.add('selected');initialLanguageEl.classList.add('selected');}this.updateAvailableLanguages(languageEl);this.updateCurrentWebsiteName(countryEl,laguage);}},{key:\"updateAvailableLanguages\",value:function updateAvailableLanguages(languageEl){var _this3=this;// Get the languages list from parent node to show the available links.\nvar parent=languageEl.closest('.regions__countries__languages');// Filter available languages except the current one. Create a new element for each sibling and append.\nvar children=Array.from(parent.querySelectorAll('.language'));var siblings=children.filter(function(child){return child!==languageEl;});this.availableLanguagesEl.innerHTML='';
1siblings.forEach(function(sibling){_this3.availableLanguagesEl.appendChild(sibling.cloneNode(true));});}},{key:\"updateCurrentWebsiteName\",value:function updateCurrentWebsiteName(countryEl,laguage){var _countryEl$dataset=countryEl.dataset,countryGroup=_countryEl$dataset.countryGroup,countryName=_countryEl$dataset.countryName;var currentCountryName=(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .extractTextWithinParentheses */ .wI)(countryName);var currentSiteEl=document.querySelector('.language-menu__header__current-site__language');var currentSiteForMobileEl=document.querySelector('.current-site__label__language');// Set the region-group name, if available. otherwise, set the country name.\nvar currentSite='';if(countryGroup){currentSite=\"\".concat(countryGroup,\" (\").concat(laguage,\")\");}else{var _sessionStorage$getIt;var sessionData=(_sessionStorage$getIt=sessionStorage.getItem('selectedRegionInfo'))!==null&&_sessionStorage$getIt!==void 0?_sessionStorage$getIt:'{}';var _JSON$parse=JSON.parse(sessionData),selectedCountryName=_JSON$parse.selectedCountryName,currentSiteLabel=_JSON$parse.currentSiteLabel;// If current country and selected country does not match, show both.(when pointing to different country) otherwise simply show current country.\nif(selectedCountryName&&selectedCountryName!==currentCountryName&&currentSiteLabel!==null&&currentSiteLabel!==void 0&&currentSiteLabel.includes(currentCountryName)){currentSite=\"\".concat(currentCountryName,\"/\").concat(selectedCountryName,\" (\").concat(laguage,\")\");}else{currentSite=\"\".concat(currentCountryName,\" (\").concat(laguage,\")\");}}this.currentSiteLabel=currentSite;currentSiteEl.innerHTML=currentSite;currentSiteForMobileEl.innerHTML=currentSite;}},{key:\"handleAvailableLanguagesClick\",value:function handleAvailableLanguagesClick(){var _this4=this;this.availableLanguagesEl.addEventListener('click',function(event){var target=event.target;// Get the anchor element when clicking on an SVG to read its attributes\nif(!target.dataset.elType){target=target.parentElement;}_this4.languageEventHandler(target);});}},{key:\"handleAccessibility\",value:function handleAccessibility(){var _this5=this;// Set focus to the first region element when opening the modal on desktop devices.\n// On lower resolution devices, set focus to the close button instead.\nthis.languageToggle.addEventListener('keyup',function(event){var key=event.which;if(key===_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.SPACE||key===_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.ENTER){_this5.setCurrentSiteLabelAndSelectItems();if(_this5.isLowerDevice){_this5.menuCloseButtonEl.focus();}else{var firstRegion=_this5.regionsSection.querySelector('.region');firstRegion.focus();}}});this.languageNavSections.forEach(function(languageNavSection){languageNavSection.addEventListener('keydown',function(event){var target=event.target,keyCode=event.keyCode;var elType=target.dataset.elType;if(!elType)return;event.stopPropagation();switch(keyCode){case _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.ENTER:case _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.SPACE:event.preventDefault();_this5[\"\".concat(elType,\"EventHandler\")](target,true);break;case _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.UP_ARROW:case _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.DOWN_ARROW:case _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.LEFT_ARROW:case _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.RIGHT_ARROW:(0,_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .handleArrowNavigation */ .CJ)(target,keyCode);break;case _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.TAB:_this5.handleTabNavigation(event);break;case _language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .KEYS */ .Rk.ESCAPE:_this5.handleEscape(target,true);break;default:break;}},true);});}/**\n   * This function ensures that when navigating with the keyboard, the focus moves to the next element in a tree structure-like manner even though The modal contains three different sections.\n   * @example While tabbing, focus moves in the order: region-groups -> countries -> languages and vice versa when using shift+tab.\n   * @param {Event} event - The event object.\n   */},{key:\"handleTabNavigation\",value:function handleTabNavigation(event){var target=event.target,shiftKey=event.shiftKey;var sectionItems=target.closest('ul');var lastItem=sectionItems.lastElementChild.children[0];var firstItem=sectionItems.firstElementChild.children[0];var ariaExpanded=target.getAttribute('aria-expanded')==='true';if(ariaExpanded&&!shiftKey&&!this.isLowerDevice){event.preventDefault();var nextFocusedSectionEl=null;if(target.dataset.elType==='region'){nextFocusedSectionEl=this.countrySection;this.setSectionActiveStatus(_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.COUNTRY_SECTION,target);}if(target.dataset.elType==='country'){nextFocusedSectionEl=this.languageSection;this.setSectionActiveStatus(_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.LANG_SECTION,target);}var nextFocusedEl=nextFocusedSectionEl.querySelector('.languageNav');nextFocusedEl.focus();}else if(lastItem===target&&!shiftKey){this.handleTabAtEnd(target,event);}
1else if(firstItem===target&&shiftKey&&target.dataset.elType!=='region'&&!this.isLowerDevice){event.preventDefault();this.handleEscape(target);}}},{key:\"closeExpandedSection\",value:function closeExpandedSection(sectionEl){sectionEl.setAttribute('aria-expanded',false);sectionEl.classList.remove('selected');this.clearlanguageSection();}},{key:\"handleTabAtEnd\",value:function handleTabAtEnd(target,event){var _parentRegion$closest,_parentCountry$closes;if(this.isLowerDevice){// Prevent focus from moving outside of modal for lower devices\nevent.preventDefault();this.menuBackButtonEl.focus();return;}var parentRegion=this.regionsSection.querySelector('.selected');var parentCountry=this.countrySection.querySelector('.selected');var nextParentRegion=(_parentRegion$closest=parentRegion.closest('li').nextElementSibling)===null||_parentRegion$closest===void 0?void 0:_parentRegion$closest.children[0];var nextParentCountry=parentCountry===null||parentCountry===void 0||(_parentCountry$closes=parentCountry.closest('li'))===null||_parentCountry$closes===void 0||(_parentCountry$closes=_parentCountry$closes.nextElementSibling)===null||_parentCountry$closes===void 0?void 0:_parentCountry$closes.children[0];switch(target.dataset.elType){case'region':this.closeMenu(true);break;case'country':if(nextParentRegion){event===null||event===void 0||event.preventDefault();nextParentRegion.focus();}else{this.closeMenu(true);}break;case'language':if(nextParentCountry){event.preventDefault();nextParentCountry.focus();}else if(nextParentRegion){event.preventDefault();this.handleTabAtEnd(parentCountry);}break;default:break;}}/**\n   * This function closes the respective sub-menu when the escape key is pressed.\n   * Additionally, clicking on the region or outside the sub-menu closes the entire modal.\n   * @param {HTMLElement} target - The target element that triggered the event.\n   * @param {boolean} closeMenu - true: clear the section & update aria-expanded prop.\n   *\n   */},{key:\"handleEscape\",value:function handleEscape(target,closeMenu){var parentRegion=this.regionsSection.querySelector('.selected');var parentCountry=this.countrySection.querySelector('.selected');switch(target.dataset.elType){case'region':if(closeMenu)this.closeMenu(true);else this.languageToggle.focus();break;case'country':if(closeMenu){this.clearCountrySection();this.closeExpandedSection(parentRegion);}this.setSectionActiveStatus(null);parentRegion.focus();break;case'language':if(closeMenu)this.closeExpandedSection(parentCountry);this.setSectionActiveStatus(_language_nav_v3_helpers__WEBPACK_IMPORTED_MODULE_6__/* .LANG_MENU_SECTION */ .p.COUNTRY_SECTION,parentRegion);parentCountry.focus();break;default:this.closeMenu(true);break;}}},{key:\"setMenuEventListeners\",value:function setMenuEventListeners(){var _this6=this;this.languageToggle.addEventListener('click',function(){var _getStickyTopPosition=(0,_clientlibs_common_publish_src_js_utils_helpers__WEBPACK_IMPORTED_MODULE_3__/* .getStickyTopPosition */ .Ul)(),bannerHeight=_getStickyTopPosition.bannerHeight;if(window.innerWidth<992){_this6.languagesNavMenu.style.top=\"\".concat(bannerHeight,\"px\");}});if(!this.isModalInitialized){this.isModalInitialized=true;this.setupLanguageMenuEvents();this.handleAvailableLanguagesClick();}this.setCurrentSiteLabelAndSelectItems();this.setSectionActiveStatus(null);}},{key:\"run\",value:function run(){this.init();}}]);}();/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Languagenavigation);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, [\n/* harmony export */   \"default\", 0, __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ ]);\n\n\n//# sourceURL=webpack://ui.apps/./src/main/content/jcr_root/apps/atlas/components/structure/languagenavigation/v3/languagenavigation/languagenavigation.js?\n}")}}]);

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.