function ResizeIFrame(){var n,t;"theme"in window&&theme!=="legacy"||(n=$("#ocSearchIFrame"),window.scrollTo(0,0),n.size()>0&&(document.body.style.maxWidth="none",document.body.style.overflow="hidden",t=$(window).height()-n.offset().top,t>0&&n.height(t)))}function PrintFrame(){$("#ocSearchIFrame")[0].contentWindow.focus();window.print()}function SetComScoreData(){var n=$("#ocSearchResults").attr("data-beaconurl"),t=occe.GetCookie("SocBeaconUrl");(t===null||typeof t=="undefined"||t!==n)&&isCookieConsentObtained()&&n!==null&&typeof n!="undefined"&&(document.cookie="SocBeaconUrl="+n,$("#ocSearchAssistance .ocBeaconUrl").attr("src",n))}function PageLoadPingUrl(){var n=$("#ocSearchResults").attr("data-pageloadpingurl");n!==null&&typeof n!="undefined"&&isCookieConsentObtained()&&$("#ocSearchAssistance .ocPageLoadPingUrl").attr("src",n)}(function(n){"use strict";n(function(){try{var t="autoSuggestApp";angular&&angular.module(t)&&(angular.bootstrap(n("[ng-controller='autoSuggestController as homepageSearch']"),[t]),n("#supHomeAndLandingPageSearchBoxForm").submit(function(){occe.AutoSuggestSearchEvent(this,null,"false")}))}catch(i){console.log("autosuggest is not available")}occe&&occe.Controls&&occe.Controls.HomePage&&!occe.Controls.Homepage.setupAwaLoggingOnModules()&&occe.Controls.Homepage.setupAwaLoggingOnModules()})})(jQuery);var SEARCHAUTOSUGGESTBEHAVIOR=60,SEARCHBEHAVIOR=61;occe.pageParam===""&&(occe.pageParam=1);isCookieConsentObtained=function(){return typeof siteConsent!="undefined"?window.siteConsent.getConsentFor(WcpConsent.consentCategories.Analytics):typeof mscc!="undefined"?window.mscc.hasConsent():!1};$(function(){var n={},w=function(t,i,r){var f={},u={},e;u["ms.searchtype"]="searchbox";u["ms.searchquery"]=i;u["ms.interactiontype"]=2;u.href=r;typeof n!="undefined"&&Object.keys(n).length>0&&(u=$.extend(u,n));f.func="ClientNavSearch";f.funcData=u;$("meta[name='ms.searchtype']").length&&occe.setMetaTag("ms.searchtype",u["ms.searchtype"]);e=t.contentWindow?t.contentWindow:t.contentDocument.defaultView;e.postMessage(f,OOGlobal.BaseDomain)},b=function(n,t){return t+"-"+n},k=function(n){var t=n.data("fixed");return t?";"+t:""},a,f,t,e,i,r,p,c,l;if(document.location.href.indexOf("/client/")>=0&&(a=$(".bodyContent"),a.css("padding","0")),window.self!==window.top&&(f=$("html").attr("dir"),t=".ocSearchNavOff",f==="rtl"?(t+=f,e="right"):e="left",$(t).is(t)&&$(t).css("margin-"+e,"0"),i=$(".main-content"),i.css({"min-height":"98%",height:"98%"}),r=occe.GetCookie("SocSearchTextSize"),r!==null&&typeof r!="undefined"?r==="Large"?i[0].style.fontSize="78%":r==="Regular"&&(i[0].style.fontSize="62.5%"):i[0].style.fontSize="62.5%"),$("meta[name='ms.pagetype']").attr("content").toLowerCase()==="serp"){if($("#ocSearchResults").children().length===0&&(occe.pageParam="NULL Results"),$(".supInstantAnswer").length){var v="ms.pagescope",y="instantanswer",u=occe.getMetaTagValue(v);u=u?u+","+y:y;occe.setMetaTag(v,u)}$("#supIASolutionVideo").length&&$("#ocWebLayout.supCont").css("min-width","675px");p=$("a.ocSearchResultTitle");p.each(function(n){var t=$(this),i=b(n+1,occe.pageParam)+k(t);t.attr("ms.serplinkpos",i);t.attr("data-bi-srchlinkpos",i)});$("a").attr("ms.searchpg",occe.pageParam).attr("ms.searchquery",occe.searchQuery);var o=$("meta[name='ms.bing.clientid']").attr("content"),s=$("meta[name='ms.bing.impguid']").attr("content"),h=$("meta[name='ms.bing.userstate']").attr("content");isCookieConsentObtained()&&(o!==null&&typeof o!="undefined"&&(document.cookie="SocClientId="+o),s!==null&&typeof s!="undefined"&&(document.cookie="SocImpGuid="+s),h!==null&&typeof h!="undefined"&&(document.cookie="SocUserState="+h))}$("#ocSearchNavTextSize").click(function(){var n=$("#ocSearchIFrame").contents().find(".main-content"),t;if(n[0]===null||typeof n[0]=="undefined")return null;t=n[0].style.fontSize;t==="62.5%"||t===""?(n[0].style.fontSize="80%",document.cookie="SocSearchTextSize=Large"):(n[0].style.fontSize="62.5%",document.cookie="SocSearchTextSize=Regular");return});$("#ocSearchNavBar a").focusout(function(n){$(n).css("background-color","#FFF")});$("div#h_bar.HeaderPopupShown").length===1&&$("div.ocSearchPane").css("margin-top","80px");$("a.popupClose").click(function(){$("div.ocSearchPane").css("margin-top","40px")});$(window).resize(function(){ResizeIFrame()});c=250;occe.Resources.getSetting("OdcSup_InAppSearchUX_LimitSearchBoxEnabled")==="False"&&(c=0);l=occe.debounce(function(t,i){var s="&IsIframe=true",h="&src=as",l=t.keyCode?t.keyCode:t.which,a=l===13?"KE":"CL",o=encodeURIComponent($("#ocSearchBox, #socNavSearchBox").val()),r=$("#ocSearchIFrame"),u=$("#ocSearchButton, #socNavSearchButton"),e,f,c;if(o&&r.length>0&&(occe.Resources.getSetting("OdcSup_InAppSearchUX_LimitSearchBoxEnabled")==="True"&&(u.length==0?document.addEventListener("DOMContentLoaded",function(){u.prop("disabled",!0)}):u.prop("disabled",!0)),e=r.attr("data-template-url")+o,i&&i.length==1&&(f=i.scope(),f&&f.main&&(n=f.main.getAutoSuggestTags(),n["ms.asgroup"]&&(h+="&asgroup="+n["ms.asgroup"]),f.main.showSuggestions=!1,f.main.selectedIndex=null)),e+=typeof n!="undefined"&&n["ms.searchtype"]!=="searchbox"?s+h:s,c=r.first().contents(),c.find(".ocpArticleContent, #ocSearchAssistance").length>0?w(r[0],o,e):r.attr("src",e)),occe.Resources.getSetting("OdcSup_InAppSearchUX_LimitSearchBoxEnabled")==="True")if(u.length==0)document.addEventListener("DOMContentLoaded",function(){r.on("load",function(){u.prop("disabled",!1)})});else r.on("load",function(){u.prop("disabled",!1)});var v=$("#ocSearchButton")[0],y=n["ms.searchtype"]=="as"?SEARCHAUTOSUGGESTBEHAVIOR:SEARCHBEHAVIOR,p={behavior:y,actionType:a};window.analytics&&window.analytics.capturePageAction(v,p,null)},c);$("div#ocSearchForm #ocSearchBox, #socNavSearchForm #socNavSearchBox, #ocSearchButton, #socNavSearchButton").keypress(function(n){var i=n.keyCode?n.keyCode:n.which,t;i===13&&(n.preventDefault(),$("#ocSearchButton, #socNavSearchButton").trigger("keypress"),t=$(this).closest("[ng-controller^='autoSuggestController']"),l(n,t))});$("#ocSearchButton, #socNavSearchButton").click(function(n){var t=$(this).closest("[ng-controller^='autoSuggestController']");l(n,t)});$(".supIAFeedbackButton").click(function(){var n=occe.Resources.getLocalizedString("L_IA_Feedback_Recorded");$(".supIAFeedback").html(n)});$(".ocSearchResultResponsive a").bind("keyup mousedown",function(n){var t,i,r,u;(n.type==="keyup"&&n.which===13||n.type==="mousedown"&&n.which===1)&&(t=$(this).closest("#ocSearchResults").attr("data-urlbase"),i=$(this).attr("data-urlsuffix"),t!==null&&typeof t!="undefined"&&i!==null&&typeof i!="undefined"&&(r=t+i,u=$(this).find(".ocGPingImg"),u.attr("src",r)))});$("#supInstantAnswerList").change(function(){var n=this.value;$("#supInstantAnswersBody").children().each(function(t){$(this).toggleClass("ocHidden",t.toString()!==n)})});SetComScoreData();PageLoadPingUrl()});$(window).ready(function(){ResizeIFrame()}),function(n){"use strict";var o=n("#meControl"),t=n("#smcSitewideSignInPopover"),s=n("#sitewideSignInDismiss"),f="signInPopupShown",r,e={SHOWN:"signInPopupShown",TIMEOUT:"signInPopupTimeout"},i={IMPRESSION:"IMPRESSION",OTHER:"OTHER"},u=function(n,t){try{var r={isManual:!0,content:{contentId:t}};window&&window.oneDS&&window.analytics&&window.analytics.captureContentUpdate&&(r.behavior=typeof window.oneDS.Behavior=="object"?n==i.IMPRESSION?window.oneDS.Behavior.IMPRESSION:window.oneDS.Behavior.OTHER:n==i.IMPRESSION?280:300,window.analytics.captureContentUpdate(r,null))}catch(u){}},h=function(n,t){if(n.length&&t.length){var i=n.offset().top;setInterval(function(){var r=t.offset().top;n.offset({top:i+r})},15)}};if(t&&t.length>0){h(t,o);s.on("click",function(n){n.preventDefault();r&&window.clearTimeout(r);t.slideUp()});n(document).on("userNotAuthenticated",function(){u(i.IMPRESSION,"silentSignInFailed");try{if(window&&window.localStorage&&window.localStorage.getItem(f)==null){t.removeClass("siteWideSignInHidden");t.attr("aria-live","assertive");u(i.IMPRESSION,e.SHOWN);window.localStorage.setItem(f,!0);var n=parseInt(t.data("timeout"),10);n&&(r=window.setTimeout(function(){u(i.OTHER,e.TIMEOUT);t.slideUp()},n*1e3))}}catch(o){}})}}(jQuery)