/*! Static Override Utilities */ (()=>{window.SOUtil=window.SOUtil||{addStylesheet:(cssStyles,overrideId)=>{const style=document.createElement("style");if(overrideId){style.id="static-override-"+overrideId}style.appendChild(document.createTextNode(cssStyles));document.head.appendChild(style)},pageIsInScope:pageScope=>{const host=location.hostname.toLowerCase();const path=location.pathname.toLowerCase();const locale=document.documentElement.lang.toLowerCase();const getMarket=marketAware=>{const locale=document.documentElement.lang.toLowerCase();const langCode=locale.split("-")[0];const market=new URLSearchParams(location.search).get("market")?.toLowerCase();if(market&&marketAware!==false){return`${langCode}-${market}`}return locale};const langLocs={"sr-rs":["sr-rs","sr-latn-rs","sr-cyrl-rs"],default:[locale]};const possibleLangLocs=langLocs[locale]||langLocs.default;const pathLocale=possibleLangLocs.find(loc=>path.indexOf(loc)!==-1);const pathNoLocale=path.replace(`/${pathLocale}`,"").replace(/\/$/,"");const previewHosts=["sites-author.adobeprod.microsoft.com","sites-author.adobeppe.microsoft.com","sites-author.adobestg.microsoft.com","sites-author.adobedev.microsoft.com","author-p147723-e1510601.adobeaemcloud.com","golf-author.adobeprod.microsoft.com","author-p147723-e1510635.adobeaemcloud.com","golf-author.adobestg.microsoft.com","author-p147723-e1520828.adobeaemcloud.com","golf-author.adobeppe.microsoft.com","author-p147723-e1510634.adobeaemcloud.com","golf-author.adobedev.microsoft.com","echo-author.adobeprod.microsoft.com","echo-author.adobeppe.microsoft.com","echo-author.adobestg.microsoft.com"];const isPreview=pageScope.previews&&previewHosts.includes(host);const previewPathStarts={"/content/microsoft/bade":"www.microsoft.com","/content/azure/acom":"azure.microsoft.com"};const nonprodHost={"wwwppe.microsoft.com":"www.microsoft.com","wwwqa.microsoft.com":"www.microsoft.com","origin.azureppe.microsoft.com":"azure.microsoft.com","origin.azureprod.microsoft.com":"azure.microsoft.com"};if(pageScope.editorOnly&&!window.frameElement?.baseURI.includes("/editor.html")){return false}let checkHost=host;let checkMarket=getMarket(pageScope.marketAware);let checkPath=pathNoLocale;if(pageScope.editorOnly||isPreview){const pathWithoutLaunch=path.replace(/\/content\/launches(\/[^\/]+){4}/g,"");const previewPathStart=Object.keys(previewPathStarts).find(key=>pathWithoutLaunch.startsWith(key));checkHost=previewPathStarts[previewPathStart];if(!previewPathStart||!checkHost){return false}checkPath=pathWithoutLaunch.replace(previewPathStart,"").replace(`/${pathLocale}`,"").replace(".html","")}if(nonprodHost[host]){checkHost=nonprodHost[host]}const hostScope=pageScope[checkHost];if(!hostScope){return false}if(hostScope.markets&&!hostScope.markets.includes(checkMarket)){return false}if(hostScope.paths&&!hostScope.paths.includes(checkPath)&&!(hostScope.allSubpaths&&startsWithPath())){return false}function startsWithPath(){return hostScope.paths.some(path=>checkPath.startsWith(path))}return true},runOnPageLoad:callback=>{if(document.readyState!=="loading"){callback()}else{document.addEventListener("DOMContentLoaded",callback)}},elementPromise:function(props){function addElementMarking(el,attr,value){if(hasElementMarking(el,attr,value))return;const markings=getElementMarkings(el,attr);markings.push(value);el.setAttribute(attr,markings)}function hasElementMarking(el,attr,value){return getElementMarkings(el,attr).includes(value)}function getElementMarkings(el,attr){let ret=el.getAttribute(attr);return ret?ret.split(","):[]}const querySelector=props.selector;const callbackName=props.callback.name;const rejectTime=props.rejectTime?props.rejectTime:0;const foundForDataAttr="data-so-found-for";return new Promise((resolve,reject)=>{if(!querySelector){return reject("No element or no query selector provided")}let wasFound=false;if(document.querySelector(querySelector)){wasFound=true;if(props.multiple){document.querySelectorAll(querySelector).forEach(e=>addElementMarking(e,foundForDataAttr,callbackName))}}if(!wasFound||props.multiple){const observerConfig={attributes:true,childList:true,characterData:true,subtree:true};const observer=new MutationObserver(mutations=>{const instancesFound=document.querySelectorAll(querySelector);const newInstancesFound=[...instancesFound].filter(e=>{if(hasElementMarking(e,foundForDataAttr,callbackName)){return false}addElementMarking(e,foundForDataAttr,callbackName);return true});if(newInstancesFound.length>0){wasFound=true;if(!props.multiple){observer.disconnect()}props.callback(props)}});if(rejectTime>0){window.setTimeout(()=>{observer.disconnect();if(!wasFound){reject(querySelector)}},rejectTime*100)}observer.observe(document,observerConfig)}if(wasFound){return resolve(document.querySelector(querySelector))}})},getElements:function(props){function getElement(props){const selector=props.selector;const baseElement=props.selectElement??document;if(!selector){return null}const element=baseElement.querySelector(selector);return element}function getElementMarkings(el,attr){let ret=el.getAttribute(attr);return ret?ret.split(","):[]}function addElementMarking(el,attr,value){if(hasElementMarking(el,attr,value))return;const markings=getElementMarkings(el,attr);markings.push(value);el.setAttribute(attr,markings)}function hasElementMarking(el,attr,value){return getElementMarkings(el,attr).includes(value)}const modifiedForDataAttr="data-so-modified-for";const callbackName=props.callback.name;if(props.multiple!==true){const el=getElement(props);return el?[el]:[]}const baseElement=props.selectElement??document;var elements=Array.from(baseElement.querySelectorAll(props.selector));if(props.selectorFilter&&typeof props.selectorFilter==="function"){elements=elements.filter(props.selectorFilter)}elements=elements.filter(e=>{if(hasElementMarking(e,modifiedForDataAttr,callbackName)){return false}addElementMarking(e,modifiedForDataAttr,callbackName);return true});return elements}}})(); /*! 1079427, 1081549 - Store Homepage style issues */ (()=>{function storeUpdates(){let overrideId="1079427";const styleText=` reimagine-logo-footer reimagine-badge { padding-inline: 8px; padding-block: 8px; width: 48px; max-width: 48px; height: 48px; max-height: 48px; cursor: pointer !important; } reimagine-featured reimagine-card-feature::part(card-feature__content-body) { margin-block-end: var( --ds-card-feature-content-body-margin-block-end, var(--ds-spacing-2xl) ); } reimagine-carousel reimagine-card-banner { margin-block-end: 0; } reimagine-secondary-nav-item { --ds-secondary-nav-quicklinks-link-font-size: var(--ds-label-l-font-size); } `;window.SOUtil.addStylesheet(styleText,overrideId);const announcementBanner=document.querySelector("reimagine-announcement");if(announcementBanner){announcementBanner.setAttribute("role","alert");announcementBanner.setAttribute("aria-label","Announcement banner")}const featured=document.querySelectorAll('reimagine-featured[configuration="4-col-even-1"]');if(featured.length>0){featured.forEach(el=>el.setAttribute("configuration","4-col-even-2"))}const logoFooter=document.querySelector("reimagine-logo-footer");if(logoFooter){logoFooter.setAttribute("role","navigation");logoFooter.setAttribute("aria-label","Follow Microsoft")} /*! 1080608 - Accessibility fix for autoplay carousel */ /*! 1081550 - Pause autoplay when user interacts */const carousels=document.querySelectorAll("reimagine-carousel[autoplay]");carousels.forEach(carousel=>{const srStatus=carousel.shadowRoot.querySelector(".carousel__screen-reader-status");const autoplayBtn=carousel.querySelector('reimagine-button[slot="play-button"]');const prevBtn=carousel.shadowRoot?.querySelector(".carousel__controls .scrollslider__prev-control-default");const nextBtn=carousel.shadowRoot?.querySelector(".carousel__controls .scrollslider__next-control-default");if(srStatus&&autoplayBtn){srStatus.removeAttribute("role");const srOnlySpan=srStatus.querySelector("span.sr-only");if(srOnlySpan){srOnlySpan.removeAttribute("aria-live")}autoplayBtn.addEventListener("click",()=>{setTimeout(()=>{if(autoplayBtn.getAttribute("aria-pressed")==="true"){srStatus.removeAttribute("role");if(srOnlySpan){srOnlySpan.removeAttribute("aria-live")}}else{srStatus.setAttribute("role","status");if(srOnlySpan){srOnlySpan.setAttribute("aria-live","polite")}}},0)})}function pauseAutoplay(){const controller=carousel._autoplayController;if(controller&&typeof controller["_pause"]==="function"&&controller["_active"]){controller["_pause"]()}}if(nextBtn)nextBtn.addEventListener("click",pauseAutoplay);if(prevBtn)prevBtn.addEventListener("click",pauseAutoplay)})}window.SOUtil.runOnPageLoad(storeUpdates)})(); /*! 1080684 - Update the back to top button position based on the chatbot position */ /*! 14294097 - Adjust the back-to-top position based on the any type of flyout position */ (()=>{if(typeof window!=="undefined"&&"MutationObserver"in window&&window.SOUtil){window.SOUtil.runOnPageLoad(()=>{const observer=new MutationObserver(()=>{const chatbot=document.querySelector(".sa-default-entry-container");const chatbotFlyout=document.querySelector(".sa-highlight-entry-container");const backToTop=document.querySelector("reimagine-back-to-top");if(backToTop){if(chatbotFlyout&&!chatbotFlyout.classList.contains("is-hidden")){const chatBotFlyoutContent=chatbotFlyout.querySelector(".sa-highlight-entry-content");if(chatBotFlyoutContent){const withFlyoutSpacing=window.innerHeight-chatBotFlyoutContent.getBoundingClientRect().top;backToTop.style.setProperty("--ds-back-to-top-bottom",`${withFlyoutSpacing+12}px`)}return}if(chatbot){requestAnimationFrame(()=>{const chatBotHeight=chatbot.getBoundingClientRect().height;backToTop.style.setProperty("--ds-back-to-top-bottom",`${chatBotHeight+24}px`)})}}});observer.observe(document.body,{childList:true,subtree:true,attributes:true,attributeFilter:["class"]})})}})(); /*! 1082330 - Multiple overrides for consumer/stores deals page */ (async()=>{let overrideId="1082330";const styleText=` reimagine-tabs[alignment="center"] { --ds-scrollslider-justify-content: center; } @media (max-width: 859.98px) { reimagine-card-banner.so-1082330 { height: 100%; --ds-card-banner-top-flex: 0; } reimagine-card-banner::part(card-banner__content-footer) { margin-top: auto; } } `;window.SOUtil.addStylesheet(styleText,overrideId);await customElements.whenDefined("reimagine-media");const mediaSources=document.querySelectorAll('reimagine-media [media="(min-width: 860px)"]');if(mediaSources!==undefined&&mediaSources.length>0){mediaSources.forEach(source=>{const srcset=source.getAttribute("srcset");if(srcset&&srcset.includes("VP5-800x450")){source.setAttribute("srcset",srcset.replace(/VP5-800x450/g,"VP4-1260x795"))}})}const cardPromosMedias=document.querySelectorAll("reimagine-card-promo reimagine-media");cardPromosMedias.forEach(media=>{media.setAttribute("object-fit","cover");media.style.setProperty("--ds-media-height","100%")});await customElements.whenDefined("reimagine-featured");const featured=document.querySelectorAll("reimagine-featured");if(featured){featured.forEach(item=>{if(!item)return;const cardFeature=item.querySelectorAll("reimagine-card-feature");if(cardFeature){cardFeature.forEach(card=>{const videoMedia=card.querySelector("reimagine-media[video]");if(videoMedia){videoMedia.style.setProperty("--ds-media-border-end-end-radius","var(--ds-radii-m)");videoMedia.style.setProperty("--ds-media-border-start-end-radius","var(--ds-radii-m)");videoMedia.style.setProperty("--ds-media-border-start-start-radius","var(--ds-radii-m)");videoMedia.style.setProperty("--ds-media-border-end-start-radius","var(--ds-radii-m)")}})}})}await customElements.whenDefined("reimagine-tabs");const tabs=document.querySelectorAll("reimagine-tabs");if(tabs){tabs.forEach(item=>{if(!item)return;function hideDropdownLabel(dropdown){if(!dropdown)return;const dropdownLabel=dropdown.querySelector('span[slot="dropdown-trigger__input-label"]');if(dropdownLabel){dropdownLabel.style.setProperty("display","none")}}const initialDropdown=item.shadowRoot?.querySelector("reimagine-dropdown");hideDropdownLabel(initialDropdown);if(item.shadowRoot){const observer=new MutationObserver(()=>{const dropdown=item.shadowRoot.querySelector("reimagine-dropdown");hideDropdownLabel(dropdown)});observer.observe(item.shadowRoot,{childList:true,subtree:true})}})} /*! 1092267 - Fix placeholder text issue for pill tabs dropdown */const pillTabs=document.querySelectorAll('reimagine-tabs[configuration="pill"], reimagine-tabs[configuration="selector"]');pillTabs.forEach(pillTab=>{const tabItems=pillTab.querySelectorAll("reimagine-tab");tabItems.forEach(tabItem=>{const correspondingMenuItem=tabItem.parentElement.parentElement.parentElement;if(correspondingMenuItem&&correspondingMenuItem.tagName==="REIMAGINE-MENU-LIST-ITEM"){correspondingMenuItem.appendChild(tabItem)}});const activePillTab=pillTab.querySelector("reimagine-menu-list-item[active]")?.querySelector("reimagine-pill");const dropdownTrigger=pillTab.shadowRoot?.querySelector("reimagine-dropdown-trigger");if(!dropdownTrigger)return;if(activePillTab){const pillTabText=activePillTab.textContent.trim();dropdownTrigger.textContent=pillTabText}const dropdownItems=pillTab.querySelectorAll("reimagine-tab");dropdownItems.forEach(dropdownItem=>{dropdownItem.addEventListener("click",function(e){const pillTabText=dropdownItem.textContent.trim();dropdownTrigger.textContent=pillTabText})})});await customElements.whenDefined("reimagine-carousel-card-grid");const carouselCardGrid=document.querySelectorAll("reimagine-carousel-card-grid");if(carouselCardGrid){carouselCardGrid.forEach(item=>{if(!item)return;const cardBanner=item.querySelectorAll("reimagine-card-banner");if(cardBanner){cardBanner.forEach(card=>{card.classList.add("so-1082330")})}})}})(); /*! 1086001 - Hero featured slider carousel autoplay fix */ /*! 1086001 - [Updated on 11/17/25] Adding a z-index to the container caused a regression where the play/pause button became unclickable. */window.SOUtil.runOnPageLoad(async()=>{await customElements.whenDefined("reimagine-hero-featured-slider");await customElements.whenDefined("reimagine-carousel");const featuredSliders=document.querySelectorAll("reimagine-hero-featured-slider");featuredSliders.forEach(featuredSlider=>{const carousels=featuredSlider.querySelectorAll("reimagine-carousel");carousels.forEach(carousel=>{const carouselIndicatorContainer=carousel.shadowRoot?.querySelector(".carousel__indicators-container");if(carouselIndicatorContainer){carouselIndicatorContainer.style.setProperty("width","fit-content");carouselIndicatorContainer.style.setProperty("max-width","1000px");if(window.innerWidth<860){carouselIndicatorContainer.style.setProperty("z-index","3")}}})})}); /*! 1101133 - Block CoralUI3 script and stylesheet and remove inline pricing markup */ (()=>{const BLOCKED_PATTERN=/\/etc\.clientlibs\/clientlibs\/granite\/coralui3/;const isBlockedScript=node=>node.nodeName==="SCRIPT"&&node.src&&BLOCKED_PATTERN.test(node.src);const isBlockedStylesheet=node=>node.nodeName==="LINK"&&node.rel==="stylesheet"&&node.href&&BLOCKED_PATTERN.test(node.href);document.querySelectorAll('script[src], link[rel="stylesheet"]').forEach(el=>{if(isBlockedScript(el)||isBlockedStylesheet(el)){el.disabled=true;el.remove()}});const observer=new MutationObserver(mutations=>{for(const mutation of mutations){for(const node of mutation.addedNodes){if(isBlockedScript(node)){node.type="javascript/blocked";node.remove()}else if(isBlockedStylesheet(node)){node.disabled=true;node.remove()}}}});observer.observe(document.documentElement,{childList:true,subtree:true});window.SOUtil.runOnPageLoad(()=>{observer.disconnect();const inlinePriceDialogElement=document.querySelector("#reimagineInlinePriceDialog");if(inlinePriceDialogElement){inlinePriceDialogElement.remove()}})})();