if(RSWeb=function(){function n(){$(window).load(function(){$("img.lazy").lazyload()});$(document).ready($("img.plpLazy").lazyload({threshold:200}))}function t(){var r,i,t,n;if($("#hidPunchoutToken").length&&$("#hidPunchoutToken").val()!="")for(r=$("#hidPunchoutToken").val(),i=document.getElementsByTagName("a"),t=0;t<i.length;t++)n=i[t].href,n!=""&&n.indexOf("punchouttoken")==-1&&n.indexOf("javascript")==-1&&n.indexOf("logout/logout")==-1&&(i[t].href=n.indexOf("?")!=-1?n.concat("&punchouttoken="+r):n.concat("?punchouttoken="+r))}return{Init:function(){n();t()},ShowRSAjaxLoader:function(n){$(n).append($(".loading-wrapper-container"));$(".loading-wrapper-container").css("display","flex");$(".loading-wrapper-container").css("width",$(n).width());$(".loading-wrapper-container").css("position","absolute");$(".loading-wrapper-container").css("height",$(n).height());$(".loading-wrapper-container").css("top",$(n).position().top);$(".loading-wrapper-container").css("left",$(n).position().left)},HideRSAjaxLoader:function(){$(".loading-wrapper-container").css("display","none")}}}(),$(function(){window.location.href.indexOf("RSOfflinePage")>-1||window.location.href.indexOf("campaigns/services")>-1||RSWeb.Init()}),RSWeb.FooterV2=function(){function n(){t()}function t(){$.ajax({timeout:2e5,url:"/MasterServices/GetFooterTextAndLinks",async:!0,cache:!1,type:"GET",dataType:"json",success:function(n){i(n)},error:function(){}})}function i(n){$("#strServicesTitle").text(n.ServicesTitle);$("#strAboutRSTitle").text(n.AboutUsTitle);$("#strHotTopicsTitle").text(n.HotTopicsTitle);$("#strCopyright").text(n.Copyright);$("#textAddress").text(n.Address);$("#textContactUs").text(n.ContactUsButtonText);$("#textPhoneNumber").text(n.TelephoneNumbers);$("#divDisclaimer").text(n.DistributorDisclaimer);n.ThawteLink!=null&&n.ThawteLink!=""?$("#aSecuritySeal").attr("href",n.ThawteLink):$("#divSecuritySeal").hide();n.PGImage!=null&&n.PGImage!=""?$("#imgPaymentCards").attr("src",n.PGImage):$("#aPaymentCards").hide();$("#ulServicesLinks").empty();$.each(n.ServicesLinks,function(n,t){var i=$("<li><a href='"+t.Link+"'>"+t.Text+"<\/a><\/li>");$("#ulServicesLinks").append(i)});$("#ulAboutRS").empty();$.each(n.AboutUsLinks,function(n,t){var i=$("<li><a target='"+t.Target+"' href='"+t.Link+"'>"+t.Text+"<\/a><\/li>");$("#ulAboutRS").append(i)});n.HotTopicsLinks!=null&&($("footer").find(".divAboutRS").addClass("divSecondColumn"),$("#ulHotTopics").empty(),$.each(n.HotTopicsLinks,function(n,t){var i=$("<li><a target='"+t.Target+"' href='"+t.Link+"'>"+t.Text+"<\/a><\/li>");$("#ulHotTopics").append(i)}));$("#ulCorporateLinks").empty();$.each(n.CorporateLinks,function(n,t){var i=$("<li><a href='"+t.Link+"'>"+t.Text+"<\/a><\/li>");$("#ulCorporateLinks").append(i)})}return{Init:function(){n()}}}(),$(function(){RSWeb.FooterV2.Init()}),RSWeb.HeaderV2=function(){function s(){p();f();yt();k();h();g();nt()}function h(){$(".liFirstLevel a").mouseover(function(){$(this).find(".imgArrow").attr("src","/Assets/images/master/header/downRedArrow.png")});$(".liFirstLevel").mouseout(function(){$(this).find(".imgArrow").attr("src","/Assets/images/master/header/downWhiteArrow.png")});$(".liAllProducts").click(function(){if($(".liBrands .divBrand").length<=0)e(15,function(n){o(n)});$(".ulOurBrands").hide();$(".liOurBrands").removeClass("aActive");$(".ulMyAccount").hide();$(".liMyAccount").removeClass("aActive");$(".ulAllProductsNav1").length&&$(".ulAllProductsNav1").toggle();$(".ulAllProductsNav2").length&&$(".ulAllProductsNav2").toggle();$(".liAllProducts").toggleClass("aActive");$(".ulAllProductsNav1").is(":visible")||$(".ulAllProductsNav2").is(":visible")?$("#overlay").show():$("#overlay").hide()});$(".liMyAccount").click(function(){$(".ulOurBrands").hide();$(".liOurBrands").removeClass("aActive");$(".ulAllProductsNav1").hide();$(".ulAllProductsNav2").hide();$(".liAllProducts").removeClass("aActive");$(".ulMyAccount").toggle();$(".liMyAccount").toggleClass("aActive");$(".ulMyAccount").is(":visible")?$("#overlay").show():$("#overlay").hide()});$(".liOurBrands").click(function(){if($(".liBrands .divBrand").length<=0)e(15,function(n){o(n)});$(".ulMyAccount").hide();$(".liMyAccount").removeClass("aActive");$(".ulAllProductsNav1").hide();$(".ulAllProductsNav2").hide();$(".liAllProducts").removeClass("aActive");$(".ulOurBrands").toggle();$(".liOurBrands").toggleClass("aActive");$(".ulOurBrands").is(":visible")?$("#overlay").show():$("#overlay").hide()});$(".liNewProducts").click(function(){$("#overlay").hide();$(".liFirstLevel").removeClass("aActive");$(".ulMyAccount").hide();$(".ulOurBrands").hide();$(".ulAllProductsNav1").hide();$(".ulAllProductsNav2").hide();$(".liNewProducts").toggleClass("aActive")});$(".liServices").click(function(){$("#overlay").hide();$(".liFirstLevel").removeClass("aActive");$(".ulMyAccount").hide();$(".ulOurBrands").hide();$(".ulAllProductsNav1").hide();$(".ulAllProductsNav2").hide();$(".liServices").toggleClass("aActive")});$("#overlay").click(function(){$("#overlay").hide();$(".liFirstLevel").removeClass("aActive");$(".ulMyAccount").hide();$(".ulOurBrands").hide();$(".ulAllProductsNav1").hide();$(".ulAllProductsNav2").hide()});$("#overlay").mouseover(function(){$(".divThirdLevelSection").css("display","none")});$(".divHideSuggestions").click(function(){$(".divSearchSuggestions").hide()});$(".txtSearch").keyup(function(){var n=$(".txtSearch").val();w(n)});$(".txtSearch").keydown(function(n){n.keyCode===13&&$(".btnSearch").click()});$(".btnSearch").click(function(){if($(".txtSearch").val()!=""){r();i("SearchTermTyped",$(".txtSearch").val(),1);i("SearchType","typed",1);i("IsSearch","true",1);var n="/productlist/search?query="+$(".txtSearch").val();window.location.replace(n)}});$("#btnLogin").click(function(){sessionStorage.setItem("promoCode","")});$("#aLogout").click(function(){sessionStorage.setItem("promoCode","")});$("body").off("click","#ulSearchSuggestions li .primaryClickable").on("click","#ulSearchSuggestions li .primaryClickable",function(){var n=$(this);l(n);setTimeout(function(){window.location.href=n.attr("href")},500)})}function t(n){for(var t,r=n+"=",u=document.cookie.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}function c(n,t,i){var r,u;i?(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString()):u="";document.cookie=n+"="+t+u+"; path=/"}function i(n,t,i){var r=new Date,u;r.setTime(r.getTime()+i*864e5);u="expires="+r.toUTCString();document.cookie=n+"="+t+";"+u+";path=/"}function n(n,r,u){t(n)!=undefined?i(n,r,u):c(n,r,u)}function l(t){r();t.hasClass("primaryBrandClickable")?n("SearchTermTypeClicked","Brand",1):t.hasClass("primaryMPNClickable")?n("SearchTermTypeClicked","product",1):t.hasClass("primaryNavClickable")||t.hasClass("secondaryNavClickable")?n("SearchTermTypeClicked","Category",1):t.hasClass("primaryPopularClickable")&&n("SearchTermTypeClicked","popular",1);n("SearchTermClicked",$(t).attr("formfiller"),1);n("SearchType","predictive",1);n("IsSearch","true",1)}function a(t){n("SearchTermClicked",$(t).text().trim(),1);n("SearchType","history",1);n("SearchTermTypeClicked","history",1);n("IsSearch","true",1)}function v(){eventData=[];t("SearchTermClicked")!=""&&t("SearchTermClicked")!=null&&(eventData.search_result_clicked=t("SearchTermClicked"));t("SearchTermTypeClicked")!=""&&t("SearchTermTypeClicked")!=null&&(eventData.search_result_type_clicked=t("SearchTermTypeClicked"));RSWeb.Tagging.OnSearch(eventData);r()}function r(){n("IsSearchClick","false",-1);n("IsSearchEvent","false",-1);n("IsSearch","false",-1);n("SearchTermTyped","",-1);n("SearchTermClicked","",-1);n("SearchTermTypeClicked","",-1);n("SearchType","",-1);n("SearchResults","",-1);n("SearchCategories","",-1)}function y(){function h(n){var r,i,t,u=[];for(r=document.getElementsByClassName("select-items"),i=document.getElementsByClassName("select-selected"),t=0;t<i.length;t++)n==i[t]?u.push(t):i[t].classList.remove("select-arrow-active");for(t=0;t<r.length;t++)u.indexOf(t)&&r[t].classList.add("select-hide")}for(var r,n,t,e,u,o,s,f=document.getElementsByClassName("my-custom-select"),i=0;i<f.length;i++){for(n=f[i].getElementsByTagName("select")[0],t=document.createElement("DIV"),t.setAttribute("class","select-selected"),t.innerHTML=n.options[n.selectedIndex].innerHTML,t.style.backgroundImage="url('/Assets/images/master/header/"+n.options[n.selectedIndex].value+".png')",o=n.options[n.selectedIndex].value,t.setAttribute("value",o!=="en"&&o!=="hr"?o:""),f[i].appendChild(t),e=document.createElement("DIV"),e.setAttribute("class","select-items select-hide"),r=1;r<n.length;r++)u=document.createElement("DIV"),u.innerHTML=n.options[r].innerHTML,u.style.backgroundImage="url('/Assets/images/master/header/"+n.options[r].value+".png')",s=n.options[r].value,u.setAttribute("value",s!=="en"&&s!=="hr"?s:""),u.addEventListener("click",function(){var u,n,i,r,t;for(r=this.parentNode.parentNode.getElementsByTagName("select")[0],t=this.parentNode.previousSibling,n=0;n<r.length;n++)if(r.options[n].innerHTML==this.innerHTML){for(r.selectedIndex=n,t.innerHTML=this.innerHTML,t.style.backgroundImage=this.style.backgroundImage,t.setAttribute("value",this.getAttribute("value")),u=this.parentNode.getElementsByClassName("same-as-selected"),i=0;i<u.length;i++)u[i].removeAttribute("class");this.setAttribute("class","same-as-selected");break}t.click();lt(this.getAttribute("value"))}),e.appendChild(u);f[i].appendChild(e);t.addEventListener("click",function(n){n.stopPropagation();h(this);this.nextSibling.classList.toggle("select-hide");this.classList.toggle("select-arrow-active")})}document.addEventListener("click",h)}function p(){$.ajax({timeout:2e5,url:"/MasterServicesV2Session/GetLanguagesAndCurrencies",async:!0,cache:!1,type:"GET",dataType:"json",success:function(n){n.Languages.length>1&&n.Currencies.length>1?(it(n),rt(n),y()):$(".divSelectors").hide()},error:function(){}})}function w(n){var t={SearchTerm:n};$.ajax({timeout:2e5,url:"/MasterServicesV2/GetSearchSuggestions",async:!0,cache:!1,type:"GET",dataType:"json",data:t,success:function(n){tt(n)},error:function(){}})}function f(){$.ajax({timeout:2e5,url:"/MasterServicesV2/GetBasketInfo",async:!0,cache:!1,type:"GET",dataType:"json",success:function(n){ut(n)},error:function(){}})}function b(){$.ajax({timeout:2e5,url:"/CheckoutServicesV2/GetRecentlyViewedStaticText",async:!0,cache:!1,type:"GET",dataType:"json",success:function(n){ft(n)},error:function(){}})}function e(n,t){var i={NumberOfBrandsToReturn:n};return $.ajax({timeout:2e5,url:"/MasterServicesV2/GetBrandsForMenu",async:!0,cache:!1,type:"GET",dataType:"json",data:i,success:function(n){t(n)},error:function(){}})}function k(n){var t={ParentId:n};$.ajax({timeout:2e5,url:"/MasterServicesV2/GetCategoriesForMenu",async:!0,cache:!1,type:"GET",dataType:"json",data:t,success:function(n){window.location.href.indexOf("americas")>-1?st(n):et(n);$(".aSecondLevelCategory").mouseover(function(){var n=$(this).attr("catId"),t=$(".select-selected").val();d(n,this.parentElement,t)})},error:function(){}})}function d(n,t,i){var r={ParentId:n,BaseDirectory:i};$.ajax({timeout:2e5,url:"/MasterServicesV2/GetSubCategoriesForMenu",async:!0,cache:!0,type:"GET",dataType:"json",data:r,success:function(n){window.location.href.indexOf("americas")>-1?ct(n,t):ht(n,t)},error:function(){}})}function g(){$.ajax({timeout:2e5,url:"/MasterServicesV2/GetHeaderStaticText",async:!0,cache:!0,type:"GET",dataType:"json",success:function(n){pt(n)},error:function(){}})}function nt(){$.ajax({timeout:2e5,url:"/CheckoutServicesV2/GetBasketStaticText",async:!0,cache:!0,type:"GET",dataType:"json",success:function(n){wt(n)},error:function(){}})}function tt(n){var i,t;$("#ulSearchSuggestions").empty();i=!1;n.SearchSuggestionsBrand.length>0&&(t=$("<li><strong>Brands<\/strong><\/li>"),$("#ulSearchSuggestions").append(t),$.each(n.SearchSuggestionsBrand,function(n,t){var i=$("<li class='liHover'>"+t.Text+"<\/li>");$("#ulSearchSuggestions").append(i)}),$("#ulSearchSuggestions").append("<hr />"),i=!0);n.SearchSuggestionsMPN.length>0&&(t=$("<li><strong>Manufacturer Part Numbers<\/strong><\/li>"),$("#ulSearchSuggestions").append(t),$.each(n.SearchSuggestionsMPN,function(n,t){var i=$("<li class='liHover'>"+t.Text+"<\/li>");$("#ulSearchSuggestions").append(i)}),$("#ulSearchSuggestions").append("<hr />"),i=!0);n.SearchSuggestionsNavigation.length>0&&(t=$("<li><strong>Categories<\/strong><\/li>"),$("#ulSearchSuggestions").append(t),$.each(n.SearchSuggestionsNavigation,function(n,t){var i=$("<li class='liHover'>"+t.Text+"<\/li>");$("#ulSearchSuggestions").append(i)}),$("#ulSearchSuggestions").append("<hr />"),i=!0);n.SearchSuggestionsPopular.length>0&&(t=$("<li><strong>Popular<\/strong><\/li>"),$("#ulSearchSuggestions").append(t),$.each(n.SearchSuggestionsPopular,function(n,t){var i=$("<li class='liHover'>"+t.Text+"<\/li>");$("#ulSearchSuggestions").append(i)}),$("#ulSearchSuggestions").append("<hr />"),i=!0);i==!0&&$(".divSearchSuggestions").show()}function it(n){var t=$("<option value='"+n.CurrentLanguage.BaseDirectory+"'>"+n.CurrentLanguage.CountryName+"<\/option>");$("#ddlSiteLanguages").append(t);$.each(n.Languages,function(n,t){var i=$("<option value='"+t.BaseDirectory+"'>"+t.CountryName+"<\/option>");$("#ddlSiteLanguages").append(i)})}function rt(n){var t=$("<option value='"+n.CurrentCurrency.ShortName+"'>"+n.CurrentCurrency.Name+"<\/option>");$("#ddlSiteCurrencies").append(t);$.each(n.Currencies,function(n,t){var i=$("<option value='"+t.ShortName+"'>"+t.Name+"<\/option>");$("#ddlSiteCurrencies").append(i)})}function ut(n){$(".divCartNumberOfItems").text(n.BasketCount);$(".divCartTotal").text(n.BasketPrice);$("#basketSize").text=n.BasketCount;$("#basketItemCount").text=n.BasketPrice;$("#hidIsCustomerLoggedIn").val(n.IsCustomerLoggedIn);$("#hidIsGuest").val(n.IsGuest);$("#hidUseOwnProductPartNumber").val(n.UseOwnProductPartNumber)}function ft(n){$(".btnAddProduct b").text(n.Add)}function o(n){var t,i;n.Brands!=null&&n.Brands.length>0&&(t="",$.each(n.Brands,function(n,i){var r=$("<div class='divBrand'><a href='"+i.URL+"' data-test='topbrand_link'><img src='"+i.Image+"' alt='"+i.Title+"' /><\/a><\/div>");$(".liBrands").append(r);t+="<a href='"+i.URL+"' data-test='americas_topbrand_link'><img src='"+i.Image+"' alt='"+i.Title+"' /><\/a>"}),i="<li class='liBrandsSection'><div class='divBrandsHeading'>"+n.TopBrands+"<\/div><div class='divBrands'>"+t+"<\/div><a class='aViewAllBrands' href='/ourbrands' data-test='americas_allbrands_link'>"+n.AllBrands+"&nbsp;><\/a><\/li>",$(".ulAllProductsNav2").append(i))}function et(n){if(n.MenuItems.length>0){var t="";$.each(n.MenuItems,function(i,r){var u=0;switch(r.Id){case 1:t=$("<li class='liCategoryHeading liRedLeftBorder'>"+r.Name+"<\/li>");u=1;break;case 2:t=$("<li class='liCategoryHeading liBlueLeftBorder'>"+r.Name+"<\/li>");u=2;break;case 3:t=$("<li class='liCategoryHeading liGreenLeftBorder'>"+r.Name+"<\/li>");u=3;break;case 4:t=$("<li class='liCategoryHeading liYellowLeftBorder'>"+r.Name+"<\/li>");u=4}u!=0&&($(".ulAllProductsNav1").append(t),ot(n,u),u=0)})}}function ot(n,t){var i="";$.each(n.MenuItems,function(n,r){switch(r.ParentId){case 1:t==1&&(i=$("<li class='liRedLeftBorder'><a class='aSecondLevelCategory' href='"+r.Url+"' catId='"+r.Id+"' data-test='secondlevel_menu'>"+r.Name+"<\/a><\/li>"),$(".ulAllProductsNav1").append(i));break;case 2:t==2&&(i=$("<li class='liBlueLeftBorder'><a class='aSecondLevelCategory' href='"+r.Url+"' catId='"+r.Id+"' data-test='secondlevel_menu'>"+r.Name+"<\/a><\/li>"),$(".ulAllProductsNav1").append(i));break;case 3:t==3&&(i=$("<li class='liGreenLeftBorder'><a class='aSecondLevelCategory' href='"+r.Url+"' catId='"+r.Id+"' data-test='secondlevel_menu'>"+r.Name+"<\/a><\/li>"),$(".ulAllProductsNav1").append(i));break;case 4:t==4&&(i=$("<li class='liYellowLeftBorder'><a class='aSecondLevelCategory' href='"+r.Url+"' catId='"+r.Id+"' data-test='secondlevel_menu'>"+r.Name+"<\/a><\/li>"),$(".ulAllProductsNav1").append(i))}})}function st(n){var t="";$.each(n.MenuItems,function(n,i){i.ParentId!=-1&&(t=$("<li class='liGrayLeftBorder'><a class='aSecondLevelCategory' href='"+i.Url+"' catId='"+i.Id+"' data-test='secondlevel_menu'><span>"+i.Name+"<\/span><img src='/Assets/images/master/header/rightBlackArrow.png' alt='Show Sub Category' /><\/a><\/li>"),$(".ulAllProductsNav2").append(t))})}function ht(n,t){$(".divThirdLevelSection").remove();var i="<div class='divThirdLevelSection'><div class='divThirdLevelHeading'>"+t.innerText+"<\/div><div class='divThirdLevels'>";$.each(n.MenuItems,function(n,r){i+="<div class='divThirdLevel'><a href='"+r.Url+"' data-test='thirdlevel_menu'>"+r.Name+"<span>&nbsp;("+r.NoOfProducts+")<\/span><\/a><\/div>";$(t).append(i)});i+="<\/div><\/div>"}function ct(n,t){$(".divThirdLevelSection").remove();var i="<div class='divThirdLevelSection'><div class='divThirdLevelHeading'>"+t.innerText+"<\/div><div class='divThirdLevels'>";$.each(n.MenuItems,function(n,r){i+="<div class='divThirdLevel'><a href='"+r.Url+"' data-test='thirdlevel_menu'>"+r.Name+"<\/a><\/div>";$(t).append(i)});i+="<\/div><\/div>"}function lt(n){return n.length<=2?at(n):vt(n),!1}function at(n){var r=window.location.origin,t=window.location.pathname,i,u;if(t.length>3&&t[3]=="/"&&(t=t.substring(3,t.length)),n.length>0&&(r+="/"+n),window.location.href.indexOf("?")>0)for(i=window.location.href.substring(window.location.href.indexOf("?"),window.location.href.length),i.indexOf("cl=1&lang=")>0?(u=i.substring(i.indexOf("cl=1&lang="),i.indexOf("cl=1&lang=")+12),t+=i.replace(u,"")+"&cl=1&lang="+n):t+=i+"&cl=1&lang="+n;t.indexOf("&&")>0;)t=t.replace("&&","&");else t+="?cl=1&lang="+n;window.location=r+t}function vt(n){window.location=window.location.href.indexOf("?")>0?window.location.href[window.location.href.length-1]=="&"?window.location.href+"changecurrency="+n:window.location.href+"&changecurrency="+n:window.location.href+"?changecurrency="+n}function yt(){var n=u("IsCustomerLoggedIn"),t=u("IsCustomerFromPunchout"),i=u("CustomerName");n!=null&&n.length>0&&n.toLowerCase()=="true"&&($("#aLogin").hide(),$("#aRegister").hide(),$("#aLogout").show(),$("#liLogout").show(),$("#spanWelcome").html(i),$("#spanWelcome").show());t!=null&&t.length>0&&t.toLowerCase()=="true"&&$(".liRegularCustomer").hide()}function u(n){for(var r,u,i=document.cookie.split(";"),t=0;t<i.length;t++)if(r=i[t].substr(0,i[t].indexOf("=")),u=i[t].substr(i[t].indexOf("=")+1),r=r.replace(/^\s+|\s+$/g,""),r==n)return unescape(u)}function pt(n){$("#aInfoZone").text(n.InfoZoneLink);$("#aHelp").text(n.HelpLink);$(".divHideSuggestions").text(n.HideSuggestions);$("#spanLogin").text(n.Login);$("#spanLogout").text(n.Logout);$("#spanRegister").text(n.Register);$("#textAllProducts").text(n.AllProducts);$("#textOurBrands").text(n.OurBrands);$(".aTopBrands").text(n.TopBrands);$(".aAllBrands").text(n.AllBrands);$("#aNewProducts").text(n.NewProducts);$("#textMyAccount").text(n.MyAccount);$("#aMyOrders").text(n.MyAccount_MyOrders);$("#aMyPartsLists").text(n.MyAccount_MyPartsLists);$("#aMyProfile").text(n.MyAccount_MyProfile);$("#aUpdateDetails").text(n.MyAccount_UpdateDetails);$("#aYourOrderPreferences").text(n.MyAccount_YourOrderPreferences);$("#aResetPassword").text(n.MyAccount_ResetPassword);$("#aLogout").text(n.Logout);$("#aServices").text(n.Services);$(".txtSearch").attr("placeholder",n.SearchBy)}function wt(n){$("#h1BasketHeading").text(n.BasketHeading);$("#spanItems").text(n.Items);$("#divQuickOrder").text(n.QuickOrder);$("#spanSelectAll").text(n.SelectAllCheckbox);$("#spanRemoveSelected").text(n.RemoveSelected);$("#aManuallyEnterStockNumbers").text(n.ManuallyEnterStockNumbers);$("#aAddStockNumbersInBulk").text(n.AddStockNumbersInBulk);$("#lblEnterStockNumber").text(n.EnterStockNumber);$(".txtStockNumber").attr("placeholder",n.RSStockNumberPlaceholder);$(".txtMPNumber").attr("placeholder",n.MPNumberPlaceholder);$(".txtQuantity").attr("placeholder",n.QuantityPlaceholder);$("#bAddManually").text(n.Add);$("#lblAddOnlyOneProductPerLine").text(n.AddOnlyOneProductPerLine);$("#txtStockInfo").html(n.PasteOrTypeHerePlaceholder.replace(/(\\r\\n|\\n|\\r)+/gm,"<br/>"));$("#txtStockInfo").data("watermark",n.PasteOrTypeHerePlaceholder.replace(/(\\r\\n|\\n|\\r)+/gm,"<br/>"));$("#bAddInBulk").text(n.Add);$("#divPrintBasketText").text(n.PrintBasket);$("#divSaveBasketText").text(n.SaveBasket);$("#divShareBasketText").text(n.ShareBasket);$("#divShareBasketHeading").text(n.ShareBasketHeading);$("#lblEmailYourBasket").text(n.EmailYourBasket);$("#lblYourName").text(n.YourName);$("#txtYourName").attr("placeholder",n.YourName);$("#lblColleaguesName").text(n.ColleaguesName);$("#txtColleaguesName").attr("placeholder",n.ColleaguesName);$("#lblColleaguesEmail").text(n.ColleaguesEmail);$("#txtEmailAddress").attr("placeholder",n.ColleaguesEmail);$("#lblSubject").text(n.Subject);$("#txtSubject").attr("placeholder",n.Subject);$("#lblMessageToColleague").text(n.MessageToColleague);$("#bSendShareBasket").text(n.Send);$("#divRecentlyViewed").text(n.RecentlyViewedHeading);$(".divDeliveryTopTitle").text(n.SelectDeliveryDestinationHeading);$("#lblDeliveryDestination").text(n.DeliveryDestinationTab);$(".tblDeliveryDestinationAndDeliveryMethod").find("#lblDeliveryMethod").text(n.DeliveryMethodTab);$(".tblDeliveryMethodOnly").find("#lblDeliveryMethod").text(n.DeliveryMethodTab);$(".tblDeliveryDestinationAndDeliveryMethod").find(".lblSelectDeliveryDestination").html(n.SelectDeliveryDestination);$(".tblDeliveryMethodOnly").find(".lblSelectDeliveryDestination").html(n.SelectDeliveryDestination);$("#optSelectCountry").text(n.SelectCountry);$("#bContinueToDeliveryMethod").text(n.ContinueToDeliveryMethod);$(".tblDeliveryDestinationAndDeliveryMethod").find("#bCheckoutSecurely").text(n.CheckoutSecurely);$(".tblDeliveryMethodOnly").find("#bCheckoutSecurely").text(n.CheckoutSecurely);$(".tblDeliveryDestinationAndDeliveryMethod").find(".lblNextDayDeliveryText").html(n.NextDayDeliveryText);$(".tblDeliveryMethodOnly").find(".lblNextDayDeliveryText").html(n.NextDayDeliveryText);$("#lblDiscountText").text(n.YouSaved);$("#lblAddPromoCode").text(n.AddAPromoCode);$("#txtPromoCode").attr("placeholder",n.EnterPromoCode);$("#btnApplyPromoCode").text(n.ApplyPromoCode);$("#divPromoCodeWarningMsg").text(n.LogInToUsePromoCode);$("#bPlaceOrder").text(n.PlaceOrder);$("#yellowWarningMessage").text(n.EnterDetailsBeforePlacingOrder);$("#bReturnToHomePage").text(n.ReturnToHomePage);n.CorrectErrorsInCart=n.CorrectErrorsInCart.replace("|Section|","<strong>Basket<\/strong>");$("#divRedWarningMessage").html(n.CorrectErrorsInCart);$("#divWeAccept").text(n.WeAccept);$("#divRSIsSecure").text(n.RSIsSecure);$("#divNeedSomeHelp").text(n.NeedSomeHelp);$("#spanTelNo").text(n.TelephoneNumber);$("#hidInvalidQuantityErrorMessage").val(n.InvalidQuantityErrorMessage);$(".divLoginError").html(n.LoginError);$("#lblUsername").text(n.LoginUsername);$(".txtUsername").attr("placeholder",n.LoginUsername);$("#aForgotUsername").text(n.LoginForgotUsername);$("#lblPassword").text(n.LoginPassword);$(".txtPassword").attr("placeholder",n.LoginPassword);$("#aForgotPassword").text(n.LoginForgotPassword);$(".bLoginBold").html(n.LoginButton);$(".divLoginSuccess").html(n.LoginSuccess);$("#h1CheckoutGuest").text(n.LoginCheckoutGuest);$("#lblContinueWithLogin").text(n.LoginContinueWithLogin);$(".bCheckoutAsGuest").html(n.LoginCheckoutGuestButton);n.LoginButton.length>0?$("#loginTitle").attr("placeholder",n.LoginButton):$("#loginTitle").attr("placeholder","Login")}return{Init:function(){s()},GetBasketInfo:function(){f()},GetRecentlyViewedStaticText:function(){b()},ResetCookies:function(){r()},createAndSetCookie:function(t,i,r){n(t,i,r)},getCookie:function(){t()},UpdateDataTagging:function(){v()},SetSearchHistoryTempData:function(n){a(n)}}}(),$(function(){RSWeb.HeaderV2.Init()}),RSWeb.DigitalDataTagging=function(){function n(n,t){try{contextInfoTagging&&contextInfoTagging.Configuration&&contextInfoTagging.Configuration.ConfigFlags&&contextInfoTagging.Configuration.ConfigFlags.EnableDigitalDataTrackingEvents?typeof rs!="undefined"&&typeof rs.web!="undefined"&&typeof rs.web.digitalData!="undefined"?(rs.web.digitalData.events=rs.web.digitalData.events||[],rs.web.digitalData.events.push({eventKey:n,eventData:t,eventTimestamp:(new Date).toUTCString()}),Bootstrapper.ensEvent.trigger("customPageDataEvent"),console.log("Pushed event"+n+" with data "+JSON.stringify(t))):console.log("rs.web.digitalData not available"):console.log("EnableDigitalDataTrackingEvents disabled")}catch(i){console.error(i)}}function i(){contextObject=contextInfoTagging}function t(t,i,r){var u="sr_page",e,f;if(contextInfoTagging.PageType===2?(u="tn_page",contextInfoTagging.SearchKeyword&&(u="sr_page")):contextInfoTagging.PageType===3?u="product":r&&(u="basket: Recently viewed"),e=[],i!="undefined"&&i!="")e.push({cart_action_type:u,orderQuantity:parseInt(i),productId:t});else for(f=0;f<t.length;f++)e.push({cart_action_type:u,orderQuantity:parseInt(t[f].quantity),productId:t[f].stockCode});n("addToCartDataBlockEvent",{products:e})}function r(t){let i=t.map(function(n){return{articleId:n.stockCode,qty:n.quantity}});n("basketManualAddition",{articles:i})}function u(t){let i={articleId:t.stockCode,newQuantity:t.newQuantity,newUnitPrice:t.newUnitPrice,oldQuantity:t.oldQuantity,oldUnitPrice:t.oldUnitPrice};n("basketLineQuantityUpdated",i)}function f(){n("login.error","bad_credentials")}function e(){n("login.successful","")}function o(){n("loginOrContinueAsGuestEvent",null)}function s(t){n("quickOrder"+t,null)}function h(t){n("applyFilterDataBlockEvent",t)}function c(){}function l(t){n("basketLineRemoved",t)}function a(){}function v(t){n("searchresult.click",t)}return{Initialise:function(){i()},OnAddToCart:function(n,i){t(n,i)},OnAddToCart:function(n,i,r){t(n,i,r)},OnAddToCartBulk:function(n){r(n)},OnRemoveFromCart:function(n){c(n)},OnDeleteFromCart:function(n){l(n)},OnLoginError:function(){f()},OnLoginSuccessful:function(){e()},OnLoginModalShown:function(){o()},OnQuickOrderToggled:function(n){s(n)},OnApplyingFilter:function(n){h(n)},OnBasketLineQuantityUpdated:function(n){u(n)},OnProductImpression:function(n,t,i){a(n,t,i)},OnSearch:function(n){v(n)}}}(),RSWeb.GATagging=function(){function t(){var n,t,i;if(contextObject=contextInfoTagging,contextObject.PageType==1,contextObject.PageType==2){for(t=[],n=0;n<contextObject.Products.length;n++)i={id:""+contextObject.Products[n].StockCode,category:""+contextObject.Products[n].FamilyId,name:""+contextObject.Products[n].Name,brand:""+contextObject.Products[n].ManufacturerName,price:""+contextObject.Products[n].DefaultPrice,position:n+1,list:contextObject.UrlType},t.push(i);dataLayer.push({ecommerce:{currencyCode:contextObject.CommonContext.CurrencyCode,impressions:t}})}if(contextObject.PageType==3){for(t=[],n=0;n<1;n++)i={id:""+contextObject.Products[n].StockCode,category:""+contextObject.Products[n].FamilyId,name:""+contextObject.Products[n].Name,brand:""+contextObject.Products[n].ManufacturerName,price:""+contextObject.Products[n].DefaultPrice,quantity:""+contextObject.Products[n].Quantity},t.push(i);(typeof contextObject.SearchKeyword=="undefined"||contextObject.SearchKeyword==null||contextObject.SearchKeyword.length==0)&&dataLayer.push({event:"productClick",ecommerce:{currencyCode:contextObject.CommonContext.CurrencyCode,click:{actionField:{list:contextObject.ReferrerType},products:t}}});dataLayer.push({ecommerce:{detail:{actionField:{list:contextObject.ReferrerType},products:t}}})}if(contextObject.PageType==4,contextObject.PageType==7){for(t=[],n=0;n<contextObject.Products.length;n++)i={id:""+contextObject.Products[n].StockCode,category:""+contextObject.Products[n].FamilyId,name:""+contextObject.Products[n].Name,brand:""+contextObject.Products[n].ManufacturerName,price:""+contextObject.Products[n].DefaultPrice,quantity:""+contextObject.Products[n].Quantity},t.push(i);dataLayer.push({ecommerce:{currencyCode:contextObject.Order.CurrencyCode,purchase:{actionField:{id:contextObject.Order.RSId,affiliation:"RS Online",revenue:contextObject.Order.OrderTotal,shipping:contextObject.Order.OrderShipping,tax:contextObject.Order.OrderTax,coupon:contextObject.Order.PromoCode},products:t}}})}if(contextObject.PageType==5){for(t=[],n=0;n<contextObject.Products.length;n++)i={id:""+contextObject.Products[n].StockCode,category:""+contextObject.Products[n].FamilyId,name:""+contextObject.Products[n].Name,brand:""+contextObject.Products[n].ManufacturerName,price:""+contextObject.Products[n].DefaultPrice},t.push(i);dataLayer.push({event:"checkout",ecommerce:{currencyCode:contextObject.CommonContext.CurrencyCode,checkout:{actionField:{step:1,option:contextObject.Order.DeliveryMethodName},products:t}}})}if(contextObject.PageType==10){for(t=[],n=0;n<contextObject.Products.length;n++)i={id:""+contextObject.Products[n].StockCode,category:""+contextObject.Products[n].FamilyId,name:""+contextObject.Products[n].Name,brand:""+contextObject.Products[n].ManufacturerName,price:""+contextObject.Products[n].DefaultPrice},t.push(i);dataLayer.push({event:"checkout",ecommerce:{currencyCode:contextObject.CommonContext.CurrencyCode,checkout:{actionField:{step:3,option:contextObject.Order.PaymentMethodName},products:t}}})}if(contextObject.PageType==6){for(t=[],n=0;n<contextObject.Products.length;n++)i={id:""+contextObject.Products[n].StockCode,category:""+contextObject.Products[n].FamilyId,name:""+contextObject.Products[n].Name,brand:""+contextObject.Products[n].ManufacturerName,price:""+contextObject.Products[n].DefaultPrice},t.push(i);dataLayer.push({event:"checkout",ecommerce:{currencyCode:contextObject.CommonContext.CurrencyCode,checkout:{actionField:{step:2},products:t}}})}typeof contextObject.SearchKeyword!="undefined"&&contextObject.SearchKeyword!==null&&contextObject.SearchKeyword.length>0&&(typeof Storage!="undefined"?(typeof sessionStorage.lastSearchTerm=="undefined"||sessionStorage.lastSearchTerm!=contextObject.SearchKeyword)&&(sessionStorage.lastSearchTerm=contextObject.SearchKeyword,dataLayer.push({event:"searchEvent",ecommerce:{currencyCode:contextObject.CommonContext.CurrencyCode,searchTerm:contextObject.SearchKeyword+"",searchPattern:contextObject.SearchType+""}})):dataLayer.push({event:"searchEvent",ecommerce:{currencyCode:contextObject.CommonContext.CurrencyCode,searchTerm:contextObject.SearchKeyword+"",searchPattern:contextObject.SearchType+""}}));window.location.href.indexOf("orderconfirmation")>-1&&RSWeb.OrderConfirmation.GetOrderInfoForEcommerceTag()}function i(t,i){var r=n(t);r==null&&(r={Name:"",FamilyId:"",ManufacturerName:"",DefaultPrice:""});dataLayer.push({event:"addToCart",ecommerce:{currencyCode:contextObject.CommonContext.CurrencyCode,add:{products:[{id:t+"",name:r.Name+"",category:r.FamilyId+"",brand:r.ManufacturerName+"",quantity:i,price:r.DefaultPrice}]}}})}function r(t){var i=n(t);i==null&&(i={Name:"",FamilyId:"",ManufacturerName:""});dataLayer.push({event:"removeFromCart",ecommerce:{currencyCode:contextObject.CommonContext.CurrencyCode,remove:{products:[{id:t+"",name:i.Name+"",category:i.FamilyId+"",brand:i.ManufacturerName+"",price:i.DefaultPrice}]}}})}function u(){return}function n(n){return RSWeb.Tagging.FindProductFromContext(n)}return{Initialise:function(){t()},OnAddToCart:function(n,t){i(n,t)},OnRemoveFromCart:function(n){r(n)},OnProductImpression:function(n,t,i){u(n,t,i)}}}(),RSWeb.Tagging=function(){function n(){return typeof contextInfoTagging=="undefined"||contextInfoTagging==null?!1:!0}function r(){n()&&(RSWeb.GATagging.Initialise(),RSWeb.DigitalDataTagging.Initialise())}function t(t,i,r){n()&&(RSWeb.GATagging.OnAddToCart(t,i),RSWeb.DigitalDataTagging.OnAddToCart(t,i,r))}function u(t){n()&&RSWeb.DigitalDataTagging.OnAddToCartBulk(t)}function f(t){n()&&RSWeb.DigitalDataTagging.OnBasketLineQuantityUpdated(t)}function e(t,i,r){n()&&RSWeb.GATagging.OnProductImpression(t,i,r)}function o(t){n()&&RSWeb.GATagging.OnRemoveFromCart(t)}function s(t){n()&&RSWeb.DigitalDataTagging.OnDeleteFromCart(t)}function h(){n()&&RSWeb.DigitalDataTagging.OnLoginError()}function c(){n()&&RSWeb.DigitalDataTagging.OnLoginSuccessful()}function l(){n()&&RSWeb.DigitalDataTagging.OnLoginModalShown()}function a(t){n()&&RSWeb.DigitalDataTagging.OnQuickOrderToggled(t)}function v(t){n()&&RSWeb.DigitalDataTagging.OnApplyingFilter(t)}function y(n){for(i=0;i<contextInfoTagging.Products.length;i++)if(contextInfoTagging.Products[i].StockCode==n)return contextInfoTagging.Products[i];return null}function p(t){n()&&RSWeb.DigitalDataTagging.OnSearch(t)}return{Initialise:function(){r()},ContextAvailable:function(){return n()},OnAddToCart:function(n,i){t(n,i)},OnAddToCart:function(n,i,r){t(n,i,r)},OnRemoveFromCart:function(n){o(n)},OnDeleteFromCart:function(n){s(n)},OnProductImpression:function(n,t,i){e(n,t,i)},OnLoginError:function(){h()},OnLoginSuccessful:function(){c()},OnLoginModalShown:function(){l()},OnAddToCartBulk:function(n){u(n)},OnQuickOrderToggled:function(n){a(n)},OnApplyingFilter:function(n){v(n)},OnBasketLineQuantityUpdated:function(n){f(n)},FindProductFromContext:function(n){return y(n)},OnSearch:function(n){p(n)}}}(),$(function(){}),!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],t):t(n.bootstrap={},n.jQuery,n.Popper)}(this,function(n,t,i){"use strict";function of(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function g(n,t,i){return t&&of(n.prototype,t),i&&of(n,i),n}function v(n){for(var i,r,t=1;t<arguments.length;t++)i=null!=arguments[t]?arguments[t]:{},r=Object.keys(i),"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(i).filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable}))),r.forEach(function(t){var r,u,f;r=n;f=i[u=t];u in r?Object.defineProperty(r,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):r[u]=f});return n}t=t&&t.hasOwnProperty("default")?t.default:t;i=i&&i.hasOwnProperty("default")?i.default:i;var y,dt,er,or,sf,sr,hf,cf,lf,ht,l,gt,hr,cr,lr,af,ni,vf,yf,ou,pf,wf,bf,su,hu,ti,e,ct,pi,nt,cu,kf,ar,df,wi,bi,gf,ne,tt,te,ut,ie,re,ue,fe,ee,oe,vr,se,he,ce,le,ae,lt,s,at,vt,ii,ve,yr,ye,ri,ft,ki,di,pr,lu,pe,we,au,ui,o,yt,gi,it,wr,be,ke,w,vu,et,de,ge,no,yu,to,nr,io,br,ro,uo,fo,eo,oo,so,ho,co,lo,ao,rt,r,pt,tr,p,vo,kr,yo,c,po,wo,pu,wt,ir,bo,ko,go,wu,bu,fi,u,ot,dr,b,ns,ku,ts,is,rs,us,ei,gr,fs,oi,si,es,os,hi,nu,ss,hs,rr,d,bt,tu,k,cs,du,ls,as,vs,ys,ps,ws,bs,ks,ur,a,st,iu,fr,ds,gu,gs,ru,nh,kt,th,ih,nf,uu,rh,tf,uh,fh,eh,oh,rf,ci,h,fu,li,sh,ai,hh,vi,ch,lh,uf,ah,vh,ff,ef,yh,ph,wh,yi,f=function(n){function r(i){var u=this,r=!1;return n(this).one(t.TRANSITION_END,function(){r=!0}),setTimeout(function(){r||t.triggerTransitionEnd(u)},i),this}var i="transitionend",t={TRANSITION_END:"bsTransitionEnd",getUID:function(n){for(;n+=~~(1e6*Math.random()),document.getElementById(n););return n},getSelectorFromElement:function(n){var t=n.getAttribute("data-target");t&&"#"!==t||(t=n.getAttribute("href")||"");try{return document.querySelector(t)?t:null}catch(n){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var i=n(t).css("transition-duration");return parseFloat(i)?(i=i.split(",")[0],1e3*parseFloat(i)):0},reflow:function(n){return n.offsetHeight},triggerTransitionEnd:function(t){n(t).trigger(i)},supportsTransitionEnd:function(){return Boolean(i)},isElement:function(n){return(n[0]||n).nodeType},typeCheckConfig:function(n,i,r){var u,s;for(u in r)if(Object.prototype.hasOwnProperty.call(r,u)){var e=r[u],f=i[u],o=f&&t.isElement(f)?"element":(s=f,{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(e).test(o))throw new Error(n.toUpperCase()+': Option "'+u+'" provided type "'+o+'" but expected type "'+e+'".');}}};return n.fn.emulateTransitionEnd=r,n.event.special[t.TRANSITION_END]={bindType:i,delegateType:i,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}},t}(t),bh=(dt="alert",or="."+(er="bs.alert"),sf=(y=t).fn[dt],sr={CLOSE:"close"+or,CLOSED:"closed"+or,CLICK_DATA_API:"click"+or+".data-api"},hf="alert",cf="fade",lf="show",ht=function(){function n(n){this._element=n}var t=n.prototype;return t.close=function(n){var t=this._element;n&&(t=this._getRootElement(n));this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},t.dispose=function(){y.removeData(this._element,er);this._element=null},t._getRootElement=function(n){var i=f.getSelectorFromElement(n),t=!1;return i&&(t=document.querySelector(i)),t||(t=y(n).closest("."+hf)[0]),t},t._triggerCloseEvent=function(n){var t=y.Event(sr.CLOSE);return y(n).trigger(t),t},t._removeElement=function(n){var i=this,t;(y(n).removeClass(lf),y(n).hasClass(cf))?(t=f.getTransitionDurationFromElement(n),y(n).one(f.TRANSITION_END,function(t){return i._destroyElement(n,t)}).emulateTransitionEnd(t)):this._destroyElement(n)},t._destroyElement=function(n){y(n).detach().trigger(sr.CLOSED).remove()},n._jQueryInterface=function(t){return this.each(function(){var r=y(this),i=r.data(er);i||(i=new n(this),r.data(er,i));"close"===t&&i[t](this)})},n._handleDismiss=function(n){return function(t){t&&t.preventDefault();n.close(this)}},g(n,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),n}(),y(document).on(sr.CLICK_DATA_API,'[data-dismiss="alert"]',ht._handleDismiss(new ht)),y.fn[dt]=ht._jQueryInterface,y.fn[dt].Constructor=ht,y.fn[dt].noConflict=function(){return y.fn[dt]=sf,ht._jQueryInterface},ht),kh=(gt="button",cr="."+(hr="bs.button"),lr=".data-api",af=(l=t).fn[gt],ni="active",vf="btn",ou='[data-toggle^="button"]',pf='[data-toggle="buttons"]',wf="input",bf=".active",su=".btn",hu={CLICK_DATA_API:"click"+cr+lr,FOCUS_BLUR_DATA_API:(yf="focus")+cr+lr+" blur"+cr+lr},ti=function(){function n(n){this._element=n}var t=n.prototype;return t.toggle=function(){var i=!0,u=!0,t=l(this._element).closest(pf)[0],n,r;if(t&&(n=this._element.querySelector(wf),n)){if("radio"===n.type&&(n.checked&&this._element.classList.contains(ni)?i=!1:(r=t.querySelector(bf),r&&l(r).removeClass(ni))),i){if(n.hasAttribute("disabled")||t.hasAttribute("disabled")||n.classList.contains("disabled")||t.classList.contains("disabled"))return;n.checked=!this._element.classList.contains(ni);l(n).trigger("change")}n.focus();u=!1}u&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(ni));i&&l(this._element).toggleClass(ni)},t.dispose=function(){l.removeData(this._element,hr);this._element=null},n._jQueryInterface=function(t){return this.each(function(){var i=l(this).data(hr);i||(i=new n(this),l(this).data(hr,i));"toggle"===t&&i[t]()})},g(n,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),n}(),l(document).on(hu.CLICK_DATA_API,ou,function(n){n.preventDefault();var t=n.target;l(t).hasClass(vf)||(t=l(t).closest(su));ti._jQueryInterface.call(l(t),"toggle")}).on(hu.FOCUS_BLUR_DATA_API,ou,function(n){var t=l(n.target).closest(su)[0];l(t).toggleClass(yf,/^focus(in)?$/.test(n.type))}),l.fn[gt]=ti._jQueryInterface,l.fn[gt].Constructor=ti,l.fn[gt].noConflict=function(){return l.fn[gt]=af,ti._jQueryInterface},ti),dh=(ct="carousel",nt="."+(pi="bs.carousel"),cu=".data-api",kf=(e=t).fn[ct],ar={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},df={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},wi="next",bi="prev",gf="left",ne="right",tt={SLIDE:"slide"+nt,SLID:"slid"+nt,KEYDOWN:"keydown"+nt,MOUSEENTER:"mouseenter"+nt,MOUSELEAVE:"mouseleave"+nt,TOUCHEND:"touchend"+nt,LOAD_DATA_API:"load"+nt+cu,CLICK_DATA_API:"click"+nt+cu},te="carousel",ut="active",ie="slide",re="carousel-item-right",ue="carousel-item-left",fe="carousel-item-next",ee="carousel-item-prev",oe=".active",vr=".active.carousel-item",se=".carousel-item",he=".carousel-item-next, .carousel-item-prev",ce=".carousel-indicators",le="[data-slide], [data-slide-to]",ae='[data-ride="carousel"]',lt=function(){function t(n,t){this._items=null;this._interval=null;this._activeElement=null;this._isPaused=!1;this._isSliding=!1;this.touchTimeout=null;this._config=this._getConfig(t);this._element=e(n)[0];this._indicatorsElement=this._element.querySelector(ce);this._addEventListeners()}var n=t.prototype;return n.next=function(){this._isSliding||this._slide(wi)},n.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide(bi)},n.pause=function(n){n||(this._isPaused=!0);this._element.querySelector(he)&&(f.triggerTransitionEnd(this._element),this.cycle(!0));clearInterval(this._interval);this._interval=null},n.cycle=function(n){n||(this._isPaused=!1);this._interval&&(clearInterval(this._interval),this._interval=null);this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(n){var r=this,t,i;if(this._activeElement=this._element.querySelector(vr),t=this._getItemIndex(this._activeElement),!(n>this._items.length-1||n<0))if(this._isSliding)e(this._element).one(tt.SLID,function(){return r.to(n)});else{if(t===n)return this.pause(),void this.cycle();i=t<n?wi:bi;this._slide(i,this._items[n])}},n.dispose=function(){e(this._element).off(nt);e.removeData(this._element,pi);this._items=null;this._config=null;this._element=null;this._interval=null;this._isPaused=null;this._isSliding=null;this._activeElement=null;this._indicatorsElement=null},n._getConfig=function(n){return n=v({},ar,n),f.typeCheckConfig(ct,n,df),n},n._addEventListeners=function(){var n=this;this._config.keyboard&&e(this._element).on(tt.KEYDOWN,function(t){return n._keydown(t)});"hover"===this._config.pause&&(e(this._element).on(tt.MOUSEENTER,function(t){return n.pause(t)}).on(tt.MOUSELEAVE,function(t){return n.cycle(t)}),"ontouchstart"in document.documentElement&&e(this._element).on(tt.TOUCHEND,function(){n.pause();n.touchTimeout&&clearTimeout(n.touchTimeout);n.touchTimeout=setTimeout(function(t){return n.cycle(t)},500+n._config.interval)}))},n._keydown=function(n){if(!/input|textarea/i.test(n.target.tagName))switch(n.which){case 37:n.preventDefault();this.prev();break;case 39:n.preventDefault();this.next()}},n._getItemIndex=function(n){return this._items=n&&n.parentNode?[].slice.call(n.parentNode.querySelectorAll(se)):[],this._items.indexOf(n)},n._getItemByDirection=function(n,t){var u=n===wi,f=n===bi,i=this._getItemIndex(t),e=this._items.length-1,r;return(f&&0===i||u&&i===e)&&!this._config.wrap?t:(r=(i+(n===bi?-1:1))%this._items.length,-1===r?this._items[this._items.length-1]:this._items[r])},n._triggerSlideEvent=function(n,t){var r=this._getItemIndex(n),u=this._getItemIndex(this._element.querySelector(vr)),i=e.Event(tt.SLIDE,{relatedTarget:n,direction:t,from:u,to:r});return e(this._element).trigger(i),i},n._setActiveIndicatorElement=function(n){var i,t;this._indicatorsElement&&(i=[].slice.call(this._indicatorsElement.querySelectorAll(oe)),e(i).removeClass(ut),t=this._indicatorsElement.children[this._getItemIndex(n)],t&&e(t).addClass(ut))},n._slide=function(n,t){var u,o,s,c=this,r=this._element.querySelector(vr),v=this._getItemIndex(r),i=t||r&&this._getItemByDirection(n,r),y=this._getItemIndex(i),l=Boolean(this._interval),h,a;(n===wi?(u=ue,o=fe,s=gf):(u=re,o=ee,s=ne),i&&e(i).hasClass(ut))?this._isSliding=!1:!this._triggerSlideEvent(i,s).isDefaultPrevented()&&r&&i&&(this._isSliding=!0,l&&this.pause(),this._setActiveIndicatorElement(i),h=e.Event(tt.SLID,{relatedTarget:i,direction:s,from:v,to:y}),e(this._element).hasClass(ie)?(e(i).addClass(o),f.reflow(i),e(r).addClass(u),e(i).addClass(u),a=f.getTransitionDurationFromElement(r),e(r).one(f.TRANSITION_END,function(){e(i).removeClass(u+" "+o).addClass(ut);e(r).removeClass(ut+" "+o+" "+u);c._isSliding=!1;setTimeout(function(){return e(c._element).trigger(h)},0)}).emulateTransitionEnd(a)):(e(r).removeClass(ut),e(i).addClass(ut),this._isSliding=!1,e(this._element).trigger(h)),l&&this.cycle())},t._jQueryInterface=function(n){return this.each(function(){var i=e(this).data(pi),r=v({},ar,e(this).data()),u;if("object"==typeof n&&(r=v({},r,n)),u="string"==typeof n?n:r.slide,i||(i=new t(this,r),e(this).data(pi,i)),"number"==typeof n)i.to(n);else if("string"==typeof u){if("undefined"==typeof i[u])throw new TypeError('No method named "'+u+'"');i[u]()}else r.interval&&(i.pause(),i.cycle())})},t._dataApiClickHandler=function(n){var o=f.getSelectorFromElement(this),i,u,r;o&&(i=e(o)[0],i&&e(i).hasClass(te)&&(u=v({},e(i).data(),e(this).data()),r=this.getAttribute("data-slide-to"),r&&(u.interval=!1),t._jQueryInterface.call(e(i),u),r&&e(i).data(pi).to(r),n.preventDefault()))},g(t,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return ar}}]),t}(),e(document).on(tt.CLICK_DATA_API,le,lt._dataApiClickHandler),e(window).on(tt.LOAD_DATA_API,function(){for(var t,i=[].slice.call(document.querySelectorAll(ae)),n=0,r=i.length;n<r;n++)t=e(i[n]),lt._jQueryInterface.call(t,t.data())}),e.fn[ct]=lt._jQueryInterface,e.fn[ct].Constructor=lt,e.fn[ct].noConflict=function(){return e.fn[ct]=kf,lt._jQueryInterface},lt),gh=(at="collapse",ii="."+(vt="bs.collapse"),ve=(s=t).fn[at],yr={toggle:!0,parent:""},ye={toggle:"boolean",parent:"(string|element)"},ri={SHOW:"show"+ii,SHOWN:"shown"+ii,HIDE:"hide"+ii,HIDDEN:"hidden"+ii,CLICK_DATA_API:"click"+ii+".data-api"},ft="show",ki="collapse",di="collapsing",pr="collapsed",lu="width",pe="height",we=".show, .collapsing",au='[data-toggle="collapse"]',ui=function(){function t(n,t){this._isTransitioning=!1;this._element=n;this._config=this._getConfig(t);this._triggerArray=s.makeArray(document.querySelectorAll('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'));for(var u=[].slice.call(document.querySelectorAll(au)),i=0,o=u.length;i<o;i++){var e=u[i],r=f.getSelectorFromElement(e),h=[].slice.call(document.querySelectorAll(r)).filter(function(t){return t===n});null!==r&&0<h.length&&(this._selector=r,this._triggerArray.push(e))}this._parent=this._config.parent?this._getParent():null;this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray);this._config.toggle&&this.toggle()}var n=t.prototype;return n.toggle=function(){s(this._element).hasClass(ft)?this.hide():this.show()},n.show=function(){var n,u,r=this,e,i,o,h;this._isTransitioning||s(this._element).hasClass(ft)||(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(we)).filter(function(n){return n.getAttribute("data-parent")===r._config.parent})).length&&(n=null),n&&(u=s(n).not(this._selector).data(vt))&&u._isTransitioning)||(e=s.Event(ri.SHOW),(s(this._element).trigger(e),e.isDefaultPrevented())||(n&&(t._jQueryInterface.call(s(n).not(this._selector),"hide"),u||s(n).data(vt,null)),i=this._getDimension(),s(this._element).removeClass(ki).addClass(di),this._element.style[i]=0,this._triggerArray.length&&s(this._triggerArray).removeClass(pr).attr("aria-expanded",!0),this.setTransitioning(!0),o="scroll"+(i[0].toUpperCase()+i.slice(1)),h=f.getTransitionDurationFromElement(this._element),s(this._element).one(f.TRANSITION_END,function(){s(r._element).removeClass(di).addClass(ki).addClass(ft);r._element.style[i]="";r.setTransitioning(!1);s(r._element).trigger(ri.SHOWN)}).emulateTransitionEnd(h),this._element.style[i]=this._element[o]+"px"))},n.hide=function(){var o=this,i,n,r,t,u,e,h;if(!this._isTransitioning&&s(this._element).hasClass(ft)&&(i=s.Event(ri.HIDE),s(this._element).trigger(i),!i.isDefaultPrevented())){if(n=this._getDimension(),this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",f.reflow(this._element),s(this._element).addClass(di).removeClass(ki).removeClass(ft),r=this._triggerArray.length,0<r)for(t=0;t<r;t++)u=this._triggerArray[t],e=f.getSelectorFromElement(u),null!==e&&(s([].slice.call(document.querySelectorAll(e))).hasClass(ft)||s(u).addClass(pr).attr("aria-expanded",!1));this.setTransitioning(!0);this._element.style[n]="";h=f.getTransitionDurationFromElement(this._element);s(this._element).one(f.TRANSITION_END,function(){o.setTransitioning(!1);s(o._element).removeClass(di).addClass(ki).trigger(ri.HIDDEN)}).emulateTransitionEnd(h)}},n.setTransitioning=function(n){this._isTransitioning=n},n.dispose=function(){s.removeData(this._element,vt);this._config=null;this._parent=null;this._element=null;this._triggerArray=null;this._isTransitioning=null},n._getConfig=function(n){return(n=v({},yr,n)).toggle=Boolean(n.toggle),f.typeCheckConfig(at,n,ye),n},n._getDimension=function(){return s(this._element).hasClass(lu)?lu:pe},n._getParent=function(){var u=this,n=null,i,r;return f.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent),i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',r=[].slice.call(n.querySelectorAll(i)),s(r).each(function(n,i){u._addAriaAndCollapsedClass(t._getTargetFromElement(i),[i])}),n},n._addAriaAndCollapsedClass=function(n,t){if(n){var i=s(n).hasClass(ft);t.length&&s(t).toggleClass(pr,!i).attr("aria-expanded",i)}},t._getTargetFromElement=function(n){var t=f.getSelectorFromElement(n);return t?document.querySelector(t):null},t._jQueryInterface=function(n){return this.each(function(){var r=s(this),i=r.data(vt),u=v({},yr,r.data(),"object"==typeof n&&n?n:{});if(!i&&u.toggle&&/show|hide/.test(n)&&(u.toggle=!1),i||(i=new t(this,u),r.data(vt,i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},g(t,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return yr}}]),t}(),s(document).on(ri.CLICK_DATA_API,au,function(n){"A"===n.currentTarget.tagName&&n.preventDefault();var t=s(this),i=f.getSelectorFromElement(this),r=[].slice.call(document.querySelectorAll(i));s(r).each(function(){var n=s(this),i=n.data(vt)?"toggle":t.data();ui._jQueryInterface.call(n,i)})}),s.fn[at]=ui._jQueryInterface,s.fn[at].Constructor=ui,s.fn[at].noConflict=function(){return s.fn[at]=ve,ui._jQueryInterface},ui),nc=(yt="dropdown",it="."+(gi="bs.dropdown"),wr=".data-api",be=(o=t).fn[yt],ke=new RegExp("38|40|27"),w={HIDE:"hide"+it,HIDDEN:"hidden"+it,SHOW:"show"+it,SHOWN:"shown"+it,CLICK:"click"+it,CLICK_DATA_API:"click"+it+wr,KEYDOWN_DATA_API:"keydown"+it+wr,KEYUP_DATA_API:"keyup"+it+wr},vu="disabled",et="show",de="dropup",ge="dropright",no="dropleft",yu="dropdown-menu-right",to="position-static",nr='[data-toggle="dropdown"]',io=".dropdown form",br=".dropdown-menu",ro=".navbar-nav",uo=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",fo="top-start",eo="top-end",oo="bottom-start",so="bottom-end",ho="right-start",co="left-start",lo={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},ao={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},rt=function(){function n(n,t){this._element=n;this._popper=null;this._config=this._getConfig(t);this._menu=this._getMenuElement();this._inNavbar=this._detectNavbar();this._addEventListeners()}var t=n.prototype;return t.toggle=function(){var t,s,u,e,r;if(!this._element.disabled&&!o(this._element).hasClass(vu)&&(t=n._getParentFromElement(this._element),s=o(this._menu).hasClass(et),(n._clearMenus(),!s)&&(u={relatedTarget:this._element},e=o.Event(w.SHOW,u),o(t).trigger(e),!e.isDefaultPrevented()))){if(!this._inNavbar){if("undefined"==typeof i)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");r=this._element;"parent"===this._config.reference?r=t:f.isElement(this._config.reference)&&(r=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(r=this._config.reference[0]));"scrollParent"!==this._config.boundary&&o(t).addClass(to);this._popper=new i(r,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===o(t).closest(ro).length&&o(document.body).children().on("mouseover",null,o.noop);this._element.focus();this._element.setAttribute("aria-expanded",!0);o(this._menu).toggleClass(et);o(t).toggleClass(et).trigger(o.Event(w.SHOWN,u))}},t.dispose=function(){o.removeData(this._element,gi);o(this._element).off(it);this._element=null;(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function(){this._inNavbar=this._detectNavbar();null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function(){var n=this;o(this._element).on(w.CLICK,function(t){t.preventDefault();t.stopPropagation();n.toggle()})},t._getConfig=function(n){return n=v({},this.constructor.Default,o(this._element).data(),n),f.typeCheckConfig(yt,n,this.constructor.DefaultType),n},t._getMenuElement=function(){if(!this._menu){var t=n._getParentFromElement(this._element);t&&(this._menu=t.querySelector(br))}return this._menu},t._getPlacement=function(){var t=o(this._element.parentNode),n=oo;return t.hasClass(de)?(n=fo,o(this._menu).hasClass(yu)&&(n=eo)):t.hasClass(ge)?n=ho:t.hasClass(no)?n=co:o(this._menu).hasClass(yu)&&(n=so),n},t._detectNavbar=function(){return 0<o(this._element).closest(".navbar").length},t._getPopperConfig=function(){var i=this,n={},t;return"function"==typeof this._config.offset?n.fn=function(n){return n.offsets=v({},n.offsets,i._config.offset(n.offsets)||{}),n}:n.offset=this._config.offset,t={placement:this._getPlacement(),modifiers:{offset:n,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}},"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),t},n._jQueryInterface=function(t){return this.each(function(){var i=o(this).data(gi);if(i||(i=new n(this,"object"==typeof t?t:null),o(this).data(gi,i)),"string"==typeof t){if("undefined"==typeof i[t])throw new TypeError('No method named "'+t+'"');i[t]()}})},n._clearMenus=function(t){var h,e;if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var r=[].slice.call(document.querySelectorAll(nr)),i=0,c=r.length;i<c;i++){var u=n._getParentFromElement(r[i]),s=o(r[i]).data(gi),f={relatedTarget:r[i]};(t&&"click"===t.type&&(f.clickEvent=t),s)&&(h=s._menu,!o(u).hasClass(et)||t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&o.contains(u,t.target)||(e=o.Event(w.HIDE,f),o(u).trigger(e),e.isDefaultPrevented()||("ontouchstart"in document.documentElement&&o(document.body).children().off("mouseover",null,o.noop),r[i].setAttribute("aria-expanded","false"),o(h).removeClass(et),o(u).removeClass(et).trigger(o.Event(w.HIDDEN,f)))))}},n._getParentFromElement=function(n){var t,i=f.getSelectorFromElement(n);return i&&(t=document.querySelector(i)),t||n.parentNode},n._dataApiKeydownHandler=function(t){var u,f,r,i,e;(/input|textarea/i.test(t.target.tagName)?32===t.which||27!==t.which&&(40!==t.which&&38!==t.which||o(t.target).closest(br).length):!ke.test(t.which))||(t.preventDefault(),t.stopPropagation(),this.disabled||o(this).hasClass(vu))||(u=n._getParentFromElement(this),f=o(u).hasClass(et),(f||27===t.which&&32===t.which)&&(!f||27!==t.which&&32!==t.which)?(r=[].slice.call(u.querySelectorAll(uo)),0!==r.length&&(i=r.indexOf(t.target),38===t.which&&0<i&&i--,40===t.which&&i<r.length-1&&i++,i<0&&(i=0),r[i].focus())):(27===t.which&&(e=u.querySelector(nr),o(e).trigger("focus")),o(this).trigger("click")))},g(n,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return lo}},{key:"DefaultType",get:function(){return ao}}]),n}(),o(document).on(w.KEYDOWN_DATA_API,nr,rt._dataApiKeydownHandler).on(w.KEYDOWN_DATA_API,br,rt._dataApiKeydownHandler).on(w.CLICK_DATA_API+" "+w.KEYUP_DATA_API,rt._clearMenus).on(w.CLICK_DATA_API,nr,function(n){n.preventDefault();n.stopPropagation();rt._jQueryInterface.call(o(this),"toggle")}).on(w.CLICK_DATA_API,io,function(n){n.stopPropagation()}),o.fn[yt]=rt._jQueryInterface,o.fn[yt].Constructor=rt,o.fn[yt].noConflict=function(){return o.fn[yt]=be,rt._jQueryInterface},rt),tc=(pt="modal",p="."+(tr="bs.modal"),vo=(r=t).fn[pt],kr={backdrop:!0,keyboard:!0,focus:!0,show:!0},yo={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},c={HIDE:"hide"+p,HIDDEN:"hidden"+p,SHOW:"show"+p,SHOWN:"shown"+p,FOCUSIN:"focusin"+p,RESIZE:"resize"+p,CLICK_DISMISS:"click.dismiss"+p,KEYDOWN_DISMISS:"keydown.dismiss"+p,MOUSEUP_DISMISS:"mouseup.dismiss"+p,MOUSEDOWN_DISMISS:"mousedown.dismiss"+p,CLICK_DATA_API:"click"+p+".data-api"},po="modal-scrollbar-measure",wo="modal-backdrop",pu="modal-open",wt="fade",ir="show",bo=".modal-dialog",ko='[data-toggle="modal"]',go='[data-dismiss="modal"]',wu=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",bu=".sticky-top",fi=function(){function t(n,t){this._config=this._getConfig(t);this._element=n;this._dialog=n.querySelector(bo);this._backdrop=null;this._isShown=!1;this._isBodyOverflowing=!1;this._ignoreBackdropClick=!1;this._scrollbarWidth=0}var n=t.prototype;return n.toggle=function(n){return this._isShown?this.hide():this.show(n)},n.show=function(n){var t=this,i;this._isTransitioning||this._isShown||(r(this._element).hasClass(wt)&&(this._isTransitioning=!0),i=r.Event(c.SHOW,{relatedTarget:n}),r(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),r(document.body).addClass(pu),this._setEscapeEvent(),this._setResizeEvent(),r(this._element).on(c.CLICK_DISMISS,go,function(n){return t.hide(n)}),r(this._dialog).on(c.MOUSEDOWN_DISMISS,function(){r(t._element).one(c.MOUSEUP_DISMISS,function(n){r(n.target).is(t._element)&&(t._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return t._showElement(n)})))},n.hide=function(n){var e=this,t,i,u;(n&&n.preventDefault(),!this._isTransitioning&&this._isShown)&&(t=r.Event(c.HIDE),(r(this._element).trigger(t),this._isShown&&!t.isDefaultPrevented())&&(this._isShown=!1,i=r(this._element).hasClass(wt),(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),r(document).off(c.FOCUSIN),r(this._element).removeClass(ir),r(this._element).off(c.CLICK_DISMISS),r(this._dialog).off(c.MOUSEDOWN_DISMISS),i)?(u=f.getTransitionDurationFromElement(this._element),r(this._element).one(f.TRANSITION_END,function(n){return e._hideModal(n)}).emulateTransitionEnd(u)):this._hideModal()))},n.dispose=function(){r.removeData(this._element,tr);r(window,document,this._element,this._backdrop).off(p);this._config=null;this._element=null;this._dialog=null;this._backdrop=null;this._isShown=null;this._isBodyOverflowing=null;this._ignoreBackdropClick=null;this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(n){return n=v({},kr,n),f.typeCheckConfig(pt,n,yo),n},n._showElement=function(n){var t=this,u=r(this._element).hasClass(wt),e,i,o;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element);this._element.style.display="block";this._element.removeAttribute("aria-hidden");this._element.scrollTop=0;u&&f.reflow(this._element);r(this._element).addClass(ir);this._config.focus&&this._enforceFocus();e=r.Event(c.SHOWN,{relatedTarget:n});i=function(){t._config.focus&&t._element.focus();t._isTransitioning=!1;r(t._element).trigger(e)};u?(o=f.getTransitionDurationFromElement(this._element),r(this._dialog).one(f.TRANSITION_END,i).emulateTransitionEnd(o)):i()},n._enforceFocus=function(){var n=this;r(document).off(c.FOCUSIN).on(c.FOCUSIN,function(t){document!==t.target&&n._element!==t.target&&0===r(n._element).has(t.target).length&&n._element.focus()})},n._setEscapeEvent=function(){var n=this;this._isShown&&this._config.keyboard?r(this._element).on(c.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),n.hide())}):this._isShown||r(this._element).off(c.KEYDOWN_DISMISS)},n._setResizeEvent=function(){var n=this;this._isShown?r(window).on(c.RESIZE,function(t){return n.handleUpdate(t)}):r(window).off(c.RESIZE)},n._hideModal=function(){var n=this;this._element.style.display="none";this._element.setAttribute("aria-hidden",!0);this._isTransitioning=!1;this._showBackdrop(function(){r(document.body).removeClass(pu);n._resetAdjustments();n._resetScrollbar();r(n._element).trigger(c.HIDDEN)})},n._removeBackdrop=function(){this._backdrop&&(r(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(n){var t=this,i=r(this._element).hasClass(wt)?wt:"",e,u,o;if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=wo,i&&this._backdrop.classList.add(i),r(this._backdrop).appendTo(document.body),r(this._element).on(c.CLICK_DISMISS,function(n){t._ignoreBackdropClick?t._ignoreBackdropClick=!1:n.target===n.currentTarget&&("static"===t._config.backdrop?t._element.focus():t.hide())}),i&&f.reflow(this._backdrop),r(this._backdrop).addClass(ir),!n)return;if(!i)return void n();e=f.getTransitionDurationFromElement(this._backdrop);r(this._backdrop).one(f.TRANSITION_END,n).emulateTransitionEnd(e)}else!this._isShown&&this._backdrop?(r(this._backdrop).removeClass(ir),u=function(){t._removeBackdrop();n&&n()},r(this._element).hasClass(wt)?(o=f.getTransitionDurationFromElement(this._backdrop),r(this._backdrop).one(f.TRANSITION_END,u).emulateTransitionEnd(o)):u()):n&&n()},n._adjustDialog=function(){var n=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&n&&(this._element.style.paddingLeft=this._scrollbarWidth+"px");this._isBodyOverflowing&&!n&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="";this._element.style.paddingRight=""},n._checkScrollbar=function(){var n=document.body.getBoundingClientRect();this._isBodyOverflowing=n.left+n.right<window.innerWidth;this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var n=this,t,i,u,f;this._isBodyOverflowing&&(t=[].slice.call(document.querySelectorAll(wu)),i=[].slice.call(document.querySelectorAll(bu)),r(t).each(function(t,i){var u=i.style.paddingRight,f=r(i).css("padding-right");r(i).data("padding-right",u).css("padding-right",parseFloat(f)+n._scrollbarWidth+"px")}),r(i).each(function(t,i){var u=i.style.marginRight,f=r(i).css("margin-right");r(i).data("margin-right",u).css("margin-right",parseFloat(f)-n._scrollbarWidth+"px")}),u=document.body.style.paddingRight,f=r(document.body).css("padding-right"),r(document.body).data("padding-right",u).css("padding-right",parseFloat(f)+this._scrollbarWidth+"px"))},n._resetScrollbar=function(){var i=[].slice.call(document.querySelectorAll(wu)),n,t;r(i).each(function(n,t){var i=r(t).data("padding-right");r(t).removeData("padding-right");t.style.paddingRight=i||""});n=[].slice.call(document.querySelectorAll(""+bu));r(n).each(function(n,t){var i=r(t).data("margin-right");"undefined"!=typeof i&&r(t).css("margin-right",i).removeData("margin-right")});t=r(document.body).data("padding-right");r(document.body).removeData("padding-right");document.body.style.paddingRight=t||""},n._getScrollbarWidth=function(){var n=document.createElement("div"),t;return n.className=po,document.body.appendChild(n),t=n.getBoundingClientRect().width-n.clientWidth,document.body.removeChild(n),t},t._jQueryInterface=function(n,i){return this.each(function(){var u=r(this).data(tr),f=v({},kr,r(this).data(),"object"==typeof n&&n?n:{});if(u||(u=new t(this,f),r(this).data(tr,u)),"string"==typeof n){if("undefined"==typeof u[n])throw new TypeError('No method named "'+n+'"');u[n](i)}else f.show&&u.show(i)})},g(t,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return kr}}]),t}(),r(document).on(c.CLICK_DATA_API,ko,function(n){var t,i=this,u=f.getSelectorFromElement(this),e,o;u&&(t=document.querySelector(u));e=r(t).data(tr)?"toggle":v({},r(t).data(),r(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||n.preventDefault();o=r(t).one(c.SHOW,function(n){n.isDefaultPrevented()||o.one(c.HIDDEN,function(){r(i).is(":visible")&&i.focus()})});fi._jQueryInterface.call(r(t),e,this)}),r.fn[pt]=fi._jQueryInterface,r.fn[pt].Constructor=fi,r.fn[pt].noConflict=function(){return r.fn[pt]=vo,fi._jQueryInterface},fi),eu=(ot="tooltip",b="."+(dr="bs.tooltip"),ns=(u=t).fn[ot],ku="bs-tooltip",ts=new RegExp("(^|\\s)"+ku+"\\S+","g"),us={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!(rs={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"}),selector:!(is={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"}),placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},gr="out",fs={HIDE:"hide"+b,HIDDEN:"hidden"+b,SHOW:(ei="show")+b,SHOWN:"shown"+b,INSERTED:"inserted"+b,CLICK:"click"+b,FOCUSIN:"focusin"+b,FOCUSOUT:"focusout"+b,MOUSEENTER:"mouseenter"+b,MOUSELEAVE:"mouseleave"+b},oi="fade",si="show",es=".tooltip-inner",os=".arrow",hi="hover",nu="focus",ss="click",hs="manual",rr=function(){function t(n,t){if("undefined"==typeof i)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0;this._timeout=0;this._hoverState="";this._activeTrigger={};this._popper=null;this.element=n;this.config=this._getConfig(t);this.tip=null;this._setListeners()}var n=t.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(n){if(this._isEnabled)if(n){var i=this.constructor.DATA_KEY,t=u(n.currentTarget).data(i);t||(t=new this.constructor(n.currentTarget,this._getDelegateConfig()),u(n.currentTarget).data(i,t));t._activeTrigger.click=!t._activeTrigger.click;t._isWithActiveTrigger()?t._enter(null,t):t._leave(null,t)}else{if(u(this.getTipElement()).hasClass(si))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout);u.removeData(this.element,this.constructor.DATA_KEY);u(this.element).off(this.constructor.EVENT_KEY);u(this.element).closest(".modal").off("hide.bs.modal");this.tip&&u(this.tip).remove();this._isEnabled=null;this._timeout=null;this._hoverState=null;(this._activeTrigger=null)!==this._popper&&this._popper.destroy();this._popper=null;this.element=null;this.config=null;this.tip=null},n.show=function(){var n=this,r,h,t,e,c,o,l,s,a;if("none"===u(this.element).css("display"))throw new Error("Please use show on visible elements");if(r=u.Event(this.constructor.Event.SHOW),this.isWithContent()&&this._isEnabled){if(u(this.element).trigger(r),h=u.contains(this.element.ownerDocument.documentElement,this.element),r.isDefaultPrevented()||!h)return;t=this.getTipElement();e=f.getUID(this.constructor.NAME);t.setAttribute("id",e);this.element.setAttribute("aria-describedby",e);this.setContent();this.config.animation&&u(t).addClass(oi);c="function"==typeof this.config.placement?this.config.placement.call(this,t,this.element):this.config.placement;o=this._getAttachment(c);this.addAttachmentClass(o);l=!1===this.config.container?document.body:u(document).find(this.config.container);u(t).data(this.constructor.DATA_KEY,this);u.contains(this.element.ownerDocument.documentElement,this.tip)||u(t).appendTo(l);u(this.element).trigger(this.constructor.Event.INSERTED);this._popper=new i(this.element,t,{placement:o,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:os},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&n._handlePopperPlacementChange(t)},onUpdate:function(t){n._handlePopperPlacementChange(t)}});u(t).addClass(si);"ontouchstart"in document.documentElement&&u(document.body).children().on("mouseover",null,u.noop);s=function(){n.config.animation&&n._fixTransition();var t=n._hoverState;n._hoverState=null;u(n.element).trigger(n.constructor.Event.SHOWN);t===gr&&n._leave(null,n)};u(this.tip).hasClass(oi)?(a=f.getTransitionDurationFromElement(this.tip),u(this.tip).one(f.TRANSITION_END,s).emulateTransitionEnd(a)):s()}},n.hide=function(n){var t=this,i=this.getTipElement(),r=u.Event(this.constructor.Event.HIDE),e=function(){t._hoverState!==ei&&i.parentNode&&i.parentNode.removeChild(i);t._cleanTipClass();t.element.removeAttribute("aria-describedby");u(t.element).trigger(t.constructor.Event.HIDDEN);null!==t._popper&&t._popper.destroy();n&&n()},o;(u(this.element).trigger(r),r.isDefaultPrevented())||((u(i).removeClass(si),"ontouchstart"in document.documentElement&&u(document.body).children().off("mouseover",null,u.noop),this._activeTrigger[ss]=!1,this._activeTrigger[nu]=!1,this._activeTrigger[hi]=!1,u(this.tip).hasClass(oi))?(o=f.getTransitionDurationFromElement(i),u(i).one(f.TRANSITION_END,e).emulateTransitionEnd(o)):e(),this._hoverState="")},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(n){u(this.getTipElement()).addClass(ku+"-"+n)},n.getTipElement=function(){return this.tip=this.tip||u(this.config.template)[0],this.tip},n.setContent=function(){var n=this.getTipElement();this.setElementContent(u(n.querySelectorAll(es)),this.getTitle());u(n).removeClass(oi+" "+si)},n.setElementContent=function(n,t){var i=this.config.html;"object"==typeof t&&(t.nodeType||t.jquery)?i?u(t).parent().is(n)||n.empty().append(t):n.text(u(t).text()):n[i?"html":"text"](t)},n.getTitle=function(){var n=this.element.getAttribute("data-original-title");return n||(n="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),n},n._getAttachment=function(n){return rs[n.toUpperCase()]},n._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)u(n.element).on(n.constructor.Event.CLICK,n.config.selector,function(t){return n.toggle(t)});else if(t!==hs){var i=t===hi?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,r=t===hi?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT;u(n.element).on(i,n.config.selector,function(t){return n._enter(t)}).on(r,n.config.selector,function(t){return n._leave(t)})}u(n.element).closest(".modal").on("hide.bs.modal",function(){return n.hide()})});this.config.selector?this.config=v({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var n=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==n)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(n,t){var i=this.constructor.DATA_KEY;(t=t||u(n.currentTarget).data(i))||(t=new this.constructor(n.currentTarget,this._getDelegateConfig()),u(n.currentTarget).data(i,t));n&&(t._activeTrigger["focusin"===n.type?nu:hi]=!0);u(t.getTipElement()).hasClass(si)||t._hoverState===ei?t._hoverState=ei:(clearTimeout(t._timeout),t._hoverState=ei,t.config.delay&&t.config.delay.show?t._timeout=setTimeout(function(){t._hoverState===ei&&t.show()},t.config.delay.show):t.show())},n._leave=function(n,t){var i=this.constructor.DATA_KEY;(t=t||u(n.currentTarget).data(i))||(t=new this.constructor(n.currentTarget,this._getDelegateConfig()),u(n.currentTarget).data(i,t));n&&(t._activeTrigger["focusout"===n.type?nu:hi]=!1);t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=gr,t.config.delay&&t.config.delay.hide?t._timeout=setTimeout(function(){t._hoverState===gr&&t.hide()},t.config.delay.hide):t.hide())},n._isWithActiveTrigger=function(){for(var n in this._activeTrigger)if(this._activeTrigger[n])return!0;return!1},n._getConfig=function(n){return"number"==typeof(n=v({},this.constructor.Default,u(this.element).data(),"object"==typeof n&&n?n:{})).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),f.typeCheckConfig(ot,n,this.constructor.DefaultType),n},n._getDelegateConfig=function(){var t={},n;if(this.config)for(n in this.config)this.constructor.Default[n]!==this.config[n]&&(t[n]=this.config[n]);return t},n._cleanTipClass=function(){var t=u(this.getTipElement()),n=t.attr("class").match(ts);null!==n&&n.length&&t.removeClass(n.join(""))},n._handlePopperPlacementChange=function(n){var t=n.instance;this.tip=t.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(n.placement))},n._fixTransition=function(){var n=this.getTipElement(),t=this.config.animation;null===n.getAttribute("x-placement")&&(u(n).removeClass(oi),this.config.animation=!1,this.hide(),this.show(),this.config.animation=t)},t._jQueryInterface=function(n){return this.each(function(){var i=u(this).data(dr),r="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new t(this,r),u(this).data(dr,i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},g(t,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return us}},{key:"NAME",get:function(){return ot}},{key:"DATA_KEY",get:function(){return dr}},{key:"Event",get:function(){return fs}},{key:"EVENT_KEY",get:function(){return b}},{key:"DefaultType",get:function(){return is}}]),t}(),u.fn[ot]=rr._jQueryInterface,u.fn[ot].Constructor=rr,u.fn[ot].noConflict=function(){return u.fn[ot]=ns,rr._jQueryInterface},rr),ic=(bt="popover",k="."+(tu="bs.popover"),cs=(d=t).fn[bt],du="bs-popover",ls=new RegExp("(^|\\s)"+du+"\\S+","g"),as=v({},eu.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-header"><\/h3><div class="popover-body"><\/div><\/div>'}),vs=v({},eu.DefaultType,{content:"(string|element|function)"}),ys="fade",ws=".popover-header",bs=".popover-body",ks={HIDE:"hide"+k,HIDDEN:"hidden"+k,SHOW:(ps="show")+k,SHOWN:"shown"+k,INSERTED:"inserted"+k,CLICK:"click"+k,FOCUSIN:"focusin"+k,FOCUSOUT:"focusout"+k,MOUSEENTER:"mouseenter"+k,MOUSELEAVE:"mouseleave"+k},ur=function(n){function i(){return n.apply(this,arguments)||this}var r,u,t;return u=n,(r=i).prototype=Object.create(u.prototype),(r.prototype.constructor=r).__proto__=u,t=i.prototype,t.isWithContent=function(){return this.getTitle()||this._getContent()},t.addAttachmentClass=function(n){d(this.getTipElement()).addClass(du+"-"+n)},t.getTipElement=function(){return this.tip=this.tip||d(this.config.template)[0],this.tip},t.setContent=function(){var t=d(this.getTipElement()),n;this.setElementContent(t.find(ws),this.getTitle());n=this._getContent();"function"==typeof n&&(n=n.call(this.element));this.setElementContent(t.find(bs),n);t.removeClass(ys+" "+ps)},t._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},t._cleanTipClass=function(){var t=d(this.getTipElement()),n=t.attr("class").match(ls);null!==n&&0<n.length&&t.removeClass(n.join(""))},i._jQueryInterface=function(n){return this.each(function(){var t=d(this).data(tu),r="object"==typeof n?n:null;if((t||!/destroy|hide/.test(n))&&(t||(t=new i(this,r),d(this).data(tu,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},g(i,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return as}},{key:"NAME",get:function(){return bt}},{key:"DATA_KEY",get:function(){return tu}},{key:"Event",get:function(){return ks}},{key:"EVENT_KEY",get:function(){return k}},{key:"DefaultType",get:function(){return vs}}]),i}(eu),d.fn[bt]=ur._jQueryInterface,d.fn[bt].Constructor=ur,d.fn[bt].noConflict=function(){return d.fn[bt]=cs,ur._jQueryInterface},ur),rc=(st="scrollspy",fr="."+(iu="bs.scrollspy"),ds=(a=t).fn[st],gu={offset:10,method:"auto",target:""},gs={offset:"number",method:"string",target:"(string|element)"},ru={ACTIVATE:"activate"+fr,SCROLL:"scroll"+fr,LOAD_DATA_API:"load"+fr+".data-api"},nh="dropdown-item",kt="active",th='[data-spy="scroll"]',ih=".active",nf=".nav, .list-group",uu=".nav-link",rh=".nav-item",tf=".list-group-item",uh=".dropdown",fh=".dropdown-item",eh=".dropdown-toggle",oh="offset",rf="position",ci=function(){function t(n,t){var i=this;this._element=n;this._scrollElement="BODY"===n.tagName?window:n;this._config=this._getConfig(t);this._selector=this._config.target+" "+uu+","+this._config.target+" "+tf+","+this._config.target+" "+fh;this._offsets=[];this._targets=[];this._activeTarget=null;this._scrollHeight=0;a(this._scrollElement).on(ru.SCROLL,function(n){return i._process(n)});this.refresh();this._process()}var n=t.prototype;return n.refresh=function(){var n=this,i=this._scrollElement===this._scrollElement.window?oh:rf,t="auto"===this._config.method?i:this._config.method,r=t===rf?this._getScrollTop():0;this._offsets=[];this._targets=[];this._scrollHeight=this._getScrollHeight();[].slice.call(document.querySelectorAll(this._selector)).map(function(n){var i,u=f.getSelectorFromElement(n),e;return(u&&(i=document.querySelector(u)),i)&&(e=i.getBoundingClientRect(),e.width||e.height)?[a(i)[t]().top+r,u]:null}).filter(function(n){return n}).sort(function(n,t){return n[0]-t[0]}).forEach(function(t){n._offsets.push(t[0]);n._targets.push(t[1])})},n.dispose=function(){a.removeData(this._element,iu);a(this._scrollElement).off(fr);this._element=null;this._scrollElement=null;this._config=null;this._selector=null;this._offsets=null;this._targets=null;this._activeTarget=null;this._scrollHeight=null},n._getConfig=function(n){if("string"!=typeof(n=v({},gu,"object"==typeof n&&n?n:{})).target){var t=a(n.target).attr("id");t||(t=f.getUID(st),a(n.target).attr("id",t));n.target="#"+t}return f.typeCheckConfig(st,n,gs),n},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,r=this._getScrollHeight(),u=this._config.offset+r-this._getOffsetHeight(),i,n;if(this._scrollHeight!==r&&this.refresh(),u<=t)i=this._targets[this._targets.length-1],this._activeTarget!==i&&this._activate(i);else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(n=this._offsets.length;n--;)this._activeTarget!==this._targets[n]&&t>=this._offsets[n]&&("undefined"==typeof this._offsets[n+1]||t<this._offsets[n+1])&&this._activate(this._targets[n])}},n._activate=function(n){var i,t;this._activeTarget=n;this._clear();i=this._selector.split(",");i=i.map(function(t){return t+'[data-target="'+n+'"],'+t+'[href="'+n+'"]'});t=a([].slice.call(document.querySelectorAll(i.join(","))));t.hasClass(nh)?(t.closest(uh).find(eh).addClass(kt),t.addClass(kt)):(t.addClass(kt),t.parents(nf).prev(uu+", "+tf).addClass(kt),t.parents(nf).prev(rh).children(uu).addClass(kt));a(this._scrollElement).trigger(ru.ACTIVATE,{relatedTarget:n})},n._clear=function(){var n=[].slice.call(document.querySelectorAll(this._selector));a(n).filter(ih).removeClass(kt)},t._jQueryInterface=function(n){return this.each(function(){var i=a(this).data(iu);if(i||(i=new t(this,"object"==typeof n&&n),a(this).data(iu,i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},g(t,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return gu}}]),t}(),a(window).on(ru.LOAD_DATA_API,function(){for(var i,n=[].slice.call(document.querySelectorAll(th)),t=n.length;t--;)i=a(n[t]),ci._jQueryInterface.call(i,i.data())}),a.fn[st]=ci._jQueryInterface,a.fn[st].Constructor=ci,a.fn[st].noConflict=function(){return a.fn[st]=ds,ci._jQueryInterface},ci),uc=(li="."+(fu="bs.tab"),sh=(h=t).fn.tab,ai={HIDE:"hide"+li,HIDDEN:"hidden"+li,SHOW:"show"+li,SHOWN:"shown"+li,CLICK_DATA_API:"click"+li+".data-api"},hh="dropdown-menu",vi="active",ch="disabled",lh="fade",uf="show",ah=".dropdown",vh=".nav, .list-group",ff=".active",ef="> li > .active",yh='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',ph=".dropdown-toggle",wh="> .dropdown-menu .active",yi=function(){function n(n){this._element=n}var t=n.prototype;return t.show=function(){var s=this,i,n,t,r,c,u,e,o;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&h(this._element).hasClass(vi)||h(this._element).hasClass(ch)||(t=h(this._element).closest(vh)[0],r=f.getSelectorFromElement(this._element),t&&(c="UL"===t.nodeName?ef:ff,n=(n=h.makeArray(h(t).find(c)))[n.length-1]),u=h.Event(ai.HIDE,{relatedTarget:this._element}),e=h.Event(ai.SHOW,{relatedTarget:n}),(n&&h(n).trigger(u),h(this._element).trigger(e),e.isDefaultPrevented()||u.isDefaultPrevented())||(r&&(i=document.querySelector(r)),this._activate(this._element,t),o=function(){var t=h.Event(ai.HIDDEN,{relatedTarget:s._element}),i=h.Event(ai.SHOWN,{relatedTarget:n});h(n).trigger(t);h(s._element).trigger(i)},i?this._activate(i,i.parentNode,o):o()))},t.dispose=function(){h.removeData(this._element,fu);this._element=null},t._activate=function(n,t,i){var o=this,r=("UL"===t.nodeName?h(t).find(ef):h(t).children(ff))[0],s=i&&r&&h(r).hasClass(lh),u=function(){return o._transitionComplete(n,r,i)},e;r&&s?(e=f.getTransitionDurationFromElement(r),h(r).one(f.TRANSITION_END,u).emulateTransitionEnd(e)):u()},t._transitionComplete=function(n,t,i){var r,u,e;t&&(h(t).removeClass(uf+" "+vi),r=h(t.parentNode).find(wh)[0],r&&h(r).removeClass(vi),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1));(h(n).addClass(vi),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!0),f.reflow(n),h(n).addClass(uf),n.parentNode&&h(n.parentNode).hasClass(hh))&&(u=h(n).closest(ah)[0],u&&(e=[].slice.call(u.querySelectorAll(ph)),h(e).addClass(vi)),n.setAttribute("aria-expanded",!0));i&&i()},n._jQueryInterface=function(t){return this.each(function(){var r=h(this),i=r.data(fu);if(i||(i=new n(this),r.data(fu,i)),"string"==typeof t){if("undefined"==typeof i[t])throw new TypeError('No method named "'+t+'"');i[t]()}})},g(n,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),n}(),h(document).on(ai.CLICK_DATA_API,yh,function(n){n.preventDefault();yi._jQueryInterface.call(h(this),"show")}),h.fn.tab=yi._jQueryInterface,h.fn.tab.Constructor=yi,h.fn.tab.noConflict=function(){return h.fn.tab=sh,yi._jQueryInterface},yi);!function(n){if("undefined"==typeof n)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0");}(t);n.Util=f;n.Alert=bh;n.Button=kh;n.Carousel=dh;n.Collapse=gh;n.Dropdown=nc;n.Modal=tc;n.Popover=ic;n.Scrollspy=rc;n.Tab=uc;n.Tooltip=eu;Object.defineProperty(n,"__esModule",{value:!0})}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(void 0!==i.style[t])return{end:n[t]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one(n.support.transition.end,function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t()})}(jQuery);+function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.prototype.close=function(t){function f(){i.trigger("closed.bs.alert").remove()}var u=n(this),r=u.attr("data-target"),i;r||(r=u.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));i=n(r);t&&t.preventDefault();i.length||(i=u.hasClass("alert")?u:u.parent());i.trigger(t=n.Event("close.bs.alert"));t.isDefaultPrevented()||(i.removeClass("in"),n.support.transition&&i.hasClass("fade")?i.one(n.support.transition.end,f).emulateTransitionEnd(150):f())};r=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},i;t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var r="disabled",i=this.$element,u=i.is("input")?"val":"html",f=i.data();t+="Text";f.resetText||i.data("resetText",i[u]());i[u](f[t]||this.options[t]);setTimeout(n.proxy(function(){"loadingText"==t?(this.isLoading=!0,i.addClass(r).attr(r,r)):this.isLoading&&(this.isLoading=!1,i.removeClass(r).removeAttr(r))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length&&(n=this.$element.find("input"),"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:i.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change"));t&&this.$element.toggleClass("active")};i=n.fn.button;n.fn.button=function(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})};n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=i,this};n(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var i=n(t.target);i.hasClass("btn")||(i=i.closest(".btn"));i.button("toggle");t.preventDefault()})}(jQuery);+function(n){"use strict";var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=this.sliding=this.interval=this.$active=this.$items=null;"hover"==this.options.pause&&this.$element.on("mouseenter",n.proxy(this.pause,this)).on("mouseleave",n.proxy(this.cycle,this))},i;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(".item"),this.$items.index(this.$active)};t.prototype.to=function(t){var r=this,i=this.getActiveIndex();if(!(t>this.$items.length-1)&&!(0>t))return this.sliding?this.$element.one("slid.bs.carousel",function(){r.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",n(this.$items[t]))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(t,i){var u=this.$element.find(".item.active"),r=i||u[t](),s=this.interval,f="next"==t?"left":"right",h="next"==t?"first":"last",e=this,o;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[h]()}return r.hasClass("active")?this.sliding=!1:(o=n.Event("slide.bs.carousel",{relatedTarget:r[0],direction:f}),this.$element.trigger(o),o.isDefaultPrevented()?void 0:(this.sliding=!0,s&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var t=n(e.$indicators.children()[e.getActiveIndex()]);t&&t.addClass("active")})),n.support.transition&&this.$element.hasClass("slide")?(r.addClass(t),r[0].offsetWidth,u.addClass(f),r.addClass(f),u.one(n.support.transition.end,function(){r.removeClass([t,f].join(" ")).addClass("active");u.removeClass(["active",f].join(" "));e.sliding=!1;setTimeout(function(){e.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*u.css("transition-duration").slice(0,-1))):(u.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),s&&this.cycle(),this))};i=n.fn.carousel;n.fn.carousel=function(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})};n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=i,this};n(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var f,i=n(this),r=n(i.attr("data-target")||(f=i.attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")),e=n.extend({},r.data(),i.data()),u=i.attr("data-slide-to");u&&(e.interval=!1);r.carousel(e);(u=i.attr("data-slide-to"))&&r.data("bs.carousel").to(u);t.preventDefault()});n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);t.carousel(t.data())})})}(jQuery);+function(n){"use strict";var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.transitioning=null;this.options.parent&&(this.$parent=n(this.options.parent));this.options.toggle&&this.toggle()},i;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var u,t,r,i,f,e;if(!this.transitioning&&!this.$element.hasClass("in")&&(u=n.Event("show.bs.collapse"),this.$element.trigger(u),!u.isDefaultPrevented())){if(t=this.$parent&&this.$parent.find("> .panel > .in"),t&&t.length){if(r=t.data("bs.collapse"),r&&r.transitioning)return;t.collapse("hide");r||t.data("bs.collapse",null)}if(i=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[i](0),this.transitioning=1,f=function(n){n&&n.target!=this.$element[0]||(this.$element.removeClass("collapsing").addClass("collapse in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse"))},!n.support.transition)return f.call(this);e=n.camelCase(["scroll",i].join("-"));this.$element.one(n.support.transition.end,n.proxy(f,this)).emulateTransitionEnd(350)[i](this.$element[0][e])}};t.prototype.hide=function(){var i,t,r;if(!this.transitioning&&this.$element.hasClass("in")&&(i=n.Event("hide.bs.collapse"),this.$element.trigger(i),!i.isDefaultPrevented()))return t=this.dimension(),this.$element[t](this.$element[t]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1,r=function(n){n&&n.target!=this.$element[0]||(this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse"))},n.support.transition?void this.$element[t](0).one(n.support.transition.end,n.proxy(r,this)).emulateTransitionEnd(350):r.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};i=n.fn.collapse;n.fn.collapse=function(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&"show"==i&&(i=!i);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=i,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e,i=n(this),s=i.attr("data-target")||t.preventDefault()||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""),r=n(s),u=r.data("bs.collapse"),h=u?"toggle":i.data(),f=i.attr("data-parent"),o=f&&n(f);u&&u.transitioning||(o&&o.find('[data-toggle="collapse"][data-parent="'+f+'"]').not(i).addClass("collapsed"),i[r.hasClass("in")?"addClass":"removeClass"]("collapsed"));r.collapse(h)})}(jQuery);+function(n){"use strict";function r(t){n(e).remove();n(i).each(function(){var i=u(n(this)),r={relatedTarget:this};i.hasClass("open")&&(i.trigger(t=n.Event("hide.bs.dropdown",r)),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown",r))})}function u(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}var e=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=u(f),o=i.hasClass("open"),r(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n('<div class="dropdown-backdrop"/>').insertAfter(n(this)).on("click",r),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;i.toggleClass("open").trigger("shown.bs.dropdown",e);f.trigger("focus")}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,r;if(/(38|40|27)/.test(t.keyCode)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=u(e),s=o.hasClass("open"),!s||s&&27==t.keyCode)return 27==t.which&&o.find(i).trigger("focus"),e.trigger("click");h=" li:not(.divider):visible a";f=o.find('[role="menu"]'+h+', [role="listbox"]'+h);f.length&&(r=f.index(f.filter(":focus")),38==t.keyCode&&r>0&&r--,40==t.keyCode&&r<f.length-1&&r++,~r||(r=0),f.eq(r).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",r).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i+', [role="menu"], [role="listbox"]',t.prototype.keydown)}(jQuery);+function(n){"use strict";var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$backdrop=this.isShown=null;this.scrollbarWidth=0;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},i;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(t){var i=this,r=n.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.backdrop(function(){var u=n.support.transition&&i.$element.hasClass("fade"),r;i.$element.parent().length||i.$element.appendTo(i.$body);i.$element.show().scrollTop(0);u&&i.$element[0].offsetWidth;i.$element.addClass("in").attr("aria-hidden",!1);i.enforceFocus();r=n.Event("shown.bs.modal",{relatedTarget:t});u?i.$element.find(".modal-dialog").one(n.support.transition.end,function(){i.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(300):i.$element.trigger("focus").trigger(r)}))};t.prototype.hide=function(t){t&&t.preventDefault();t=n.Event("hide.bs.modal");this.$element.trigger(t);this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one(n.support.transition.end,n.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.removeBackdrop();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(t){var r=this.$element.hasClass("fade")?"fade":"",i;if(this.isShown&&this.options.backdrop){if(i=n.support.transition&&r,this.$backdrop=n('<div class="modal-backdrop '+r+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};t.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())};t.prototype.setScrollbar=function(){var n=parseInt(this.$body.css("padding-right")||0);this.scrollbarWidth&&this.$body.css("padding-right",n+this.scrollbarWidth)};t.prototype.resetScrollbar=function(){this.$body.css("padding-right","")};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};i=n.fn.modal;n.fn.modal=function(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})};n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=i,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var i=n(this),r=i.attr("href"),u=n(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),f=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(r)&&r},u.data(),i.data());i.is("a")&&t.preventDefault();u.modal(f,this).one("hide",function(){i.is(":visible")&&i.trigger("focus")})})}(jQuery);+function(n){"use strict";var t=function(n,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",n,t)},i;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;for(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(this.options.viewport.selector||this.options.viewport),f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()};t.prototype.show=function(){var h=n.Event("show.bs."+this.type),f,i,a,s;if(this.hasContent()&&this.enabled){if(this.$element.trigger(h),h.isDefaultPrevented())return;f=this;i=this.tip();this.setContent();this.options.animation&&i.addClass("fade");var t="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,c=/\s?auto?\s?/i,l=c.test(t);l&&(t=t.replace(c,"")||"top");i.detach().css({top:0,left:0,display:"block"}).addClass(t);this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var r=this.getPosition(),e=i[0].offsetWidth,o=i[0].offsetHeight;if(l){var v=t,y=this.$element.parent(),u=this.getPosition(y);t="bottom"==t&&r.top+r.height+o-u.scroll>u.height?"top":"top"==t&&r.top-u.scroll-o<0?"bottom":"right"==t&&r.right+e>u.width?"left":"left"==t&&r.left-e<u.left?"right":t;i.removeClass(v).addClass(t)}a=this.getCalculatedOffset(t,r,e,o);this.applyPlacement(a,t);this.hoverState=null;s=function(){f.$element.trigger("shown.bs."+f.type)};n.support.transition&&this.$tip.hasClass("fade")?i.one(n.support.transition.end,s).emulateTransitionEnd(150):s()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),c=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top=t.top+o;t.left=t.left+s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var l=u.left?2*u.left-c+h:2*u.top-e+f,a=u.left?"left":"top",v=u.left?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(l,r[0][v],a)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i,n?50*(1-n/t)+"%":"")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(){function r(){"in"!=t.hoverState&&i.detach();t.$element.trigger("hidden.bs."+t.type)}var t=this,i=this.tip(),u=n.Event("hide.bs."+this.type);return this.$element.trigger(u),u.isDefaultPrevented()?void 0:(i.removeClass("in"),n.support.transition&&this.$tip.hasClass("fade")?i.one(n.support.transition.end,r).emulateTransitionEnd(150):r(),this.hoverState=null,this)};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var r=t[0],i="BODY"==r.tagName;return n.extend({},"function"==typeof r.getBoundingClientRect?r.getBoundingClientRect():null,{scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop(),width:i?n(window).width():t.outerWidth(),height:i?n(window).height():t.outerHeight()},i?{top:0,left:0}:t.offset())};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.width&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.tip=function(){return this.$tip=this.$tip||n(this.options.template)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=t?n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){clearTimeout(this.timeout);this.hide().$element.off("."+this.type).removeData("bs."+this.type)};i=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;(r||"destroy"!=i)&&(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").empty()[this.options.html?"string"==typeof t?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};t.prototype.tip=function(){return this.$tip||(this.$tip=n(this.options.template)),this.$tip};i=n.fn.popover;n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;(r||"destroy"!=i)&&(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){var u,f=n.proxy(this.process,this);this.$element=n(n(i).is("body")?window:i);this.$body=n("body");this.$scrollElement=this.$element.on("scroll.bs.scrollspy",f);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||(u=n(i).attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.offsets=n([]);this.targets=n([]);this.activeTarget=null;this.refresh();this.process()}t.DEFAULTS={offset:10};t.prototype.refresh=function(){var i=this.$element[0]==window?"offset":"position",t;this.offsets=n([]);this.targets=n([]);t=this;this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),r=/^#./.test(u)&&n(u);return r&&r.length&&r.is(":visible")&&[[r[i]().top+(!n.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight),e=f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(i>=e)return u!=(n=r.last()[0])&&this.activate(n);if(u&&i<=t[0])return u!=(n=r[0])&&this.activate(n);for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(!t[n+1]||i<=t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;n(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};var i=n.fn.scrollspy;n.fn.scrollspy=function(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=i,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);t.scrollspy(t.data())})})}(jQuery);+function(n){"use strict";var t=function(t){this.element=n(t)},i;t.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),r,u,f;(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),t.parent("li").hasClass("active"))||(r=e.find(".active:last a")[0],u=n.Event("show.bs.tab",{relatedTarget:r}),(t.trigger(u),u.isDefaultPrevented())||(f=n(i),this.activate(t.parent("li"),e),this.activate(f,f.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})})))};t.prototype.activate=function(t,i,r){function f(){u.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");t.addClass("active");e?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade");t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active");r&&r()}var u=i.find("> .active"),e=r&&n.support.transition&&u.hasClass("fade");e?u.one(n.support.transition.end,f).emulateTransitionEnd(150):f();u.removeClass("in")};i=n.fn.tab;n.fn.tab=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})};n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=i,this};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault();n(this).tab("show")})}(jQuery);+function(n){"use strict";var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$window=n(window).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=this.unpin=this.pinnedOffset=null;this.checkPosition()},i;t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$window.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,s;if(this.$element.is(":visible")){var c=n(document).height(),h=this.$window.scrollTop(),o=this.$element.offset(),r=this.options.offset,u=r.top,f=r.bottom;"object"!=typeof r&&(f=u=r);"function"==typeof u&&(u=r.top(this.$element));"function"==typeof f&&(f=r.bottom(this.$element));i=null!=this.unpin&&h+this.unpin<=o.top?!1:null!=f&&o.top+this.$element.height()>=c-f?"bottom":null!=u&&u>=h?"top":!1;this.affixed!==i&&(null!=this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),s=n.Event(e+".bs.affix"),this.$element.trigger(s),s.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(e).trigger(n.Event(e.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:o.top})))}};i=n.fn.affix;n.fn.affix=function(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=i,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var i=n(this),t=i.data();t.offset=t.offset||{};t.offsetBottom&&(t.offset.bottom=t.offsetBottom);t.offsetTop&&(t.offset.top=t.offsetTop);i.affix(t)})})}(jQuery);RSWeb.IPBanner=function(){function n(){$("#IPBannerModal").modal({show:!0,keyboard:!0,backdrop:"static"});$(".openIPBannerModal").click(function(){$("#IPBannerModal").modal({show:!0,keyboard:!0,backdrop:"static"})});$(".show-countries").click(function(){$("#IPBannerModal").modal("toggle");$("#countriesModal").modal({show:!0,backdrop:"static"})});$(".close").click(function(){var n=new Date,t=$("#hdnSiteId").val();n.setTime(n.getTime()+5184e6);document.cookie="IPBanner"+t+"=false;expires="+n.toUTCString()});$(".selectNo").click(function(){var n=new Date,t=$("#hdnSiteId").val();n.setTime(n.getTime()+5184e6);document.cookie="IPBanner"+t+"=false;expires="+n.toUTCString()})}return{Init:function(){n()}}}();$(function(){RSWeb.IPBanner.Init()});RSWeb.Logging=function(){function t(){var t=n("query"),u;(t==null||t.length==0)&&(t="");totalNoOfProducts=parseInt($(".hidData #hidTotalNoOfProducts").val());isNaN(totalNoOfProducts)&&(totalNoOfProducts=0);u={url:window.location.pathname+window.location.search,referrer:document.referrer,query:t,totalNoOfProducts:totalNoOfProducts};$.ajax({timeout:2e3,url:"/loggingservices/LogCurrentPageVisit",async:!0,cache:!1,type:"POST",dataType:"html",data:u,success:function(n){n.indexOf("timezone")>=0&&i()},error:function(){}});r()}function i(){var n=new Date,t=n.getTimezoneOffset()/-60,i={offset:t};$.ajax({timeout:2e3,url:"/loggingsessionservices/SetTimeZoneOffset",async:!0,cache:!1,type:"POST",dataType:"html",data:i,success:function(){},error:function(){}})}function n(n,t){t||(t=window.location.href);t=t.toLowerCase();n=n.replace(/[\[\]]/g,"\\$&").toLowerCase();var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function r(){if(n("reportId")!=null){var t={url:window.location.pathname+window.location.search,referrer:document.referrer,reportId:n("reportId")};$.ajax({timeout:2e3,url:"/loggingservices/LogVisitForTMS",async:!0,cache:!1,type:"POST",dataType:"html",data:t,success:function(){},error:function(){}})}}return{Init:function(){t()}}}();$(window).load(function(){RSWeb.Logging.Init()});RSWeb.Header=function(){function w(n,t){var i=n.attr("class"),r=t.find("li a.menu");r.each(function(){jQuery(this).attr("class")===i?(jQuery(this).toggleClass("menu-active"),$("#txtHintBox").hide()):jQuery(this).removeClass("menu-active")})}function b(n,t){var i=n.parent().attr("class"),r=t.find("ul.verticalMenu");r.each(function(){jQuery(this).parent().hasClass(i)?n.toggleClass("hideVerticalMenu").toggleClass("showVerticalMenu"):jQuery(this).addClass("hideVerticalMenu").removeClass("showVerticalMenu")})}function k(){jQuery("#overlay").click(function(){var n,t,i;jQuery("#overlay").removeClass("menuOverlay");n=jQuery("ul.NewprimaryNavigation");t=n.find("li a.menu");t.each(function(){jQuery(this).removeClass("menu-active")});i=n.find("ul.verticalMenu");i.each(function(){jQuery(this).addClass("hideVerticalMenu").removeClass("showVerticalMenu")})});jQuery("ul.NewprimaryNavigation li a").unbind("click").bind("click",function(){var n=jQuery(this).next(),t=n.parent().parent();w(jQuery(this),t);b(n,t);u=jQuery(this);jQuery(this).hasClass("menu-active")?jQuery("#overlay").addClass("menuOverlay"):jQuery("#overlay").removeClass("menuOverlay")});jQuery("ul.NewprimaryNavigation li a").unbind("keydown").bind("keydown",function(){if(event.which==40){if(n===undefined||n===null)n=jQuery(this).next().find("li.verticalMenuOption").get(0),n=jQuery(n);else{if(n.next().attr("class")===undefined){event.preventDefault();return}n.removeClass("highlight");n=n.next();n.hasClass("verticalMenuHeader")&&(n=n.next())}n.addClass("highlight");n.find("a").focus();event.preventDefault()}else if(event.which==38){if(n===undefined||n===null)u.focus();else{if(n.removeClass("highlight"),n=n.prev(),n.hasClass("verticalMenuHeader")&&(n=n.prev()),n.attr("class")===undefined){u.focus();n=null;return}n.addClass("highlight");n.find("a").focus()}event.preventDefault()}})}function d(){$("#cookieNoticeButton").click(function(){v()})}function g(){$(".NewheaderContainer .NewprimaryNavigation li.allProducts .verticalMenuOption").mouseover(function(){$(this).find(".horizontalMenu").css("visibility","visible");var n=$(this).attr("navCatId");tt(n)});$(".NewheaderContainer .NewprimaryNavigation li.allProducts .verticalMenuOption").mouseout(function(){$(this).find(".horizontalMenu").css("visibility","hidden");var n=$(this).attr("navCatId");it(n)})}function nt(){$(".searchBox").attr("onkeydown","RSWeb.Header.DetectLongPresses(event, this.value); RSWeb.Header.PreventDefaultActionUpArrow(event)");$(".searchBox").attr("onkeyup","RSWeb.Header.ClearTimerAndVar(); RSWeb.Header.PredictiveSearch(this.value, event, 'Search by keyword, manufacturer part no. or RS part no.', 'en-GB')");$(".searchBox").attr("onfinishinput","RSWeb.Header.PredictiveSearchActualSearch(input_field.val(), 'Search by keyword, manufacturer part no. or RS part no.', 'en-GB')");$(".searchBox").attr("autocomplete","off");$(".searchBox").attr("noofresults","-1");$(".searchBox").attr("loading","true");$(".searchBox").keypress(function(n){n.which==13&&$("[id$='btnFind']").click()})}function tt(n){h=setTimeout(function(){ft(n)},150)}function it(){clearTimeout(h)}function rt(n,t){var h,i,f;$(".NewheaderContainer .divCol-"+t).empty();var s=n.sectionsHTML.split(";"),e=!1,o=!1,r=0,c=Math.ceil((s.length-1)/3),l=c*2,u="";for(h=0;h<s.length-1;h++)i=s[h].split("|"),f="",e=!1,o=!1,r==0&&(e=!0),(r+1==c||r+1==l)&&(o=!0),(r==c||r==l)&&(e=!0),r==s.length-1&&(o=!0),e&&(f='<ul class="column1">'),u=u==""?window.location.href.indexOf("americas")>-1?f+'<li class="liNewLayout" style="width:100%"> <a href='+i[0]+">"+i[1]+'<span class="labelText"><\/span><\/a><\/li>':f+"<li> <a href="+i[0]+">"+i[1]+'<span class="labelText"> ('+i[2]+")<\/span><\/a><\/li>":window.location.href.indexOf("americas")>-1?u+f+'<li class="liNewLayout" style="width:100%"> <a href='+i[0]+">"+i[1]+'<span class="labelText"><\/span><\/a><\/li>':u+f+"<li> <a href="+i[0]+">"+i[1]+'<span class="labelText"> ('+i[2]+")<\/span><\/a><\/li>",o&&(u=u+"<\/ul>",o=!1,e=!1),r++;$(".NewheaderContainer .divCol-"+t).append(u)}function ut(){$(".NewheaderContainer .divCol-"+supersectionID).html(data.sectionsHTML)}function ft(n){if($(".NewheaderContainer").find("#divCol-"+n).html().indexOf("ajax-loader.gif")!=-1){var t=s("punchouttoken"),i={supersectionId:n,PunchoutToken:t};$.ajax({url:"/headerservices/getsections",async:!0,cache:!1,type:"POST",dataType:"json",data:i,success:function(t){rt(t,n)},error:ut})}}function et(){$("#polyglotLanguageSwitcher").polyglotLanguageSwitcher({effect:"fade",testMode:!0,onChange:function(){return!1}});$("#polyglotLanguageSwitcher").find("a.current").removeAttr("href");$("#polyglotCurrencySwitcher").polyglotLanguageSwitcher({effect:"fade",testMode:!0,onChange:function(){return!1}});$("#polyglotCurrencySwitcher").find("a.current").removeAttr("href")}function r(n){for(var r,u,i=document.cookie.split(";"),t=0;t<i.length;t++)if(r=i[t].substr(0,i[t].indexOf("=")),u=i[t].substr(i[t].indexOf("=")+1),r=r.replace(/^\s+|\s+$/g,""),r==n)return unescape(u)}function f(n,t,i){var r,u;i?(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString()):u="";document.cookie=n+"="+t+u+"; path=/"}function ot(n){var t=n.keyCode?n.keyCode:n.charCode;t==38&&(n.preventDefault?n.preventDefault():n.returnValue=!1)}function st(n,i){var r,u,f;$(".searchBox").css("color","black");r=n.keyCode?n.keyCode:n.charCode;u={};for(f in n)u[f]=n[f];(r===38||r===40)&&(t||(t=setTimeout(function(){c(u,i)},170)))}function c(n,i){var r,u;clearTimeout(t);t=!1;l(i,n,"","not needed");r={};for(u in n)r[u]=n[u];t=setTimeout(function(){c(r,i)},170)}function ht(){clearTimeout(t);t=!1}function l(n,t,r,u){var s=t.keyCode?t.keyCode:t.charCode,l=$(".searchBox").attr("loading"),h,f,c;if(s==27||n.length<3)s==27&&o(),n.length<3&&($("#txtSuggestionBox").hide(),$("#txtHintBox").hide());else if(s==38||s==40||s==13){if(s==13){$("[id$='btnFind']").click();return}if(h=0,$(".searchBox").attr("noofresults")=="-1"){for(i=0;i<25;i++)c=document.getElementById("predictiveSearchResultItem"+i),c!=null&&h++;$(".searchBox").attr("noofresults",h)}else h=$(".searchBox").attr("noofresults");if(l=="false"){for(f=-1,i=0;i<h;i++)if(c=document.getElementById("predictiveSearchResultItem"+i),$("#predictiveSearchResultItem"+i).attr("switched")=="true"){f=i;break}f!=-1&&($("#predictiveSearchResultItem"+f).attr("switched","false"),$("#predictiveSearchResultItem"+f).addClass("AutoCompleteBackground"),$("#predictiveSearchResultItem"+f).removeClass("AutoCompleteHighlight"),$("#predictiveSearchResultItem"+f).removeClass("ScrollBackround"));s==40?f++:s==38&&f--;f==h&&(f=0);f==-1&&(f=h-1);$(".searchBox").val($("#predictiveSearchResultItem"+f).find(".primaryClickable").attr("formfiller"));$("#predictiveSearchResultItem"+f).attr("switched","true");$("#predictiveSearchResultItem"+f).removeClass("AutoCompleteHighlight");$("#predictiveSearchResultItem"+f).removeClass("ScrollBackround");$("#predictiveSearchResultItem"+f).addClass("txtHintBoxSelected AutoCompleteHighlight ScrollBackround")}}else s==8?n.length>2?e(n,r,u):($("#txtSuggestionBox").hide(),$("#txtHintBox").hide()):e(n,r,u)}function e(n,t){var u,f;n==t?($(".searchBox").val(""),$(".searchBox").css("color","black")):($(".searchBox").attr("loading","true"),$(".searchBox").css("color","black"),u=s("punchouttoken"),n.length>2&&(f={searchQuery:n,PunchoutToken:u},$.ajax({timeout:2e3,url:"/headerservices/getsearchsuggestions",async:!0,cache:!1,type:"POST",dataType:"html",data:f,success:function(n){var t,u;if($("#divPredSearchResults").html(n),$("#txtHintBox").show(),$("#divPredSearchResults").html().indexOf("nores")!=-1)$("#txtHintBox").hide(),$("#txtSuggestionBox").hide();else if($("#divPredSearchResults").html().indexOf("AutoCompleteBackground")==-1)$("#txtHintBox").hide(),$("#txtSuggestionBox").hide();else{for($("#txtHint").focus(),$(".searchBox").attr("noofresults","-1"),t=0,i=0;i<25;i++)u=document.getElementById("predictiveSearchResultItem"+i),u!=null&&t++;$(".searchBox").attr("noofresults",t);$(".searchBox").attr("loading","false");$(".predSearchItem").hover(function(){$(".predSearchItem").addClass("AutoCompleteBackground");$(".predSearchItem").removeClass("AutoCompleteHighlight");$(".predSearchItem").removeClass("ScrollBackround");$(".predSearchItem").attr("switched","false");$(this).addClass("AutoCompleteHighlight");$(this).removeClass("AutoCompleteBackground");$(this).attr("switched","true")},function(){$(this).removeClass("AutoCompleteHighlight");$(this).addClass("AutoCompleteBackground");$(this).attr("switched","false")});$(".predSearchItem").click(function(){window.location=$(this).find(".primaryClickable").attr("href")});r("SearchSuggestionsVisible")=="false"?o():a()}},error:function(){}})))}function o(){f("SearchSuggestionsVisible","false",365);$(".divHideSuggestions").hide();$(".divShowSuggestions").show();$("#txtHintBox").hide()}function a(){f("SearchSuggestionsVisible","true",365);$(".divHideSuggestions").show();$(".divShowSuggestions").hide();$("#txtHintBox").show()}function v(){f("HideCookiesMessage","true",365);$("#cookieNotice").hide()}function ct(){r("HideCookiesMessage")=="true"?$("#cookieNotice").hide():$("#cookieNotice").show()}function lt(){if(!(window.location.href.toLowerCase().indexOf("/shoppingcart/shoppingcart")>-1))$.ajax({timeout:2e5,url:"/headersessionservices/getshoppingcartdata",async:!0,cache:!1,type:"POST",dataType:"json",data:{},success:function(n){y(n.cartTotal,n.noOfItems)},error:function(){}})}function y(n,t){$(".NewcartContainer .amount").text(n);$(".NewcartContainer .qty").text(t);$(".NewcartContainer #ajaxLoader").hide();$(".NewcartContainer #miniBasketId").show()}function at(){var n=r("IsCustomerLoggedIn"),t=r("IsCustomerFromPunchout"),i=r("CustomerName");n!=null&&n.length>0&&n.toLowerCase()=="true"&&($(".headerloggedin").removeClass("hide"),$(".headerloggedinname").html(i),$(".headerloggedout").addClass("hide"));t!=null&&t.length>0&&t.toLowerCase()=="false"?$(".headerpunchoutloggedout").removeClass("hide"):$(".headerpunchoutloggedout").hasClass("hide")||$(".headerpunchoutloggedout").addClass("hide")}function vt(n){return n.length<=2?pt(n):yt(n.substr(4,n.length)),!1}function yt(n){window.location=window.location.href.indexOf("?")>0?window.location.href[window.location.href.length-1]=="&"?window.location.href+"changecurrency="+n:window.location.href+"&changecurrency="+n:window.location.href+"?changecurrency="+n}function pt(n){var r=window.location.origin,t=window.location.pathname,i,u;if(t.length>3&&t[3]=="/"&&(t=t.substring(3,t.length)),n.length>0&&(r+="/"+n),window.location.href.indexOf("?")>0)for(i=window.location.href.substring(window.location.href.indexOf("?"),window.location.href.length),i.indexOf("cl=1&lang=")>0?(u=i.substring(i.indexOf("cl=1&lang="),i.indexOf("cl=1&lang=")+12),t+=i.replace(u,"")+"&cl=1&lang="+n):t+=i+"&cl=1&lang="+n;t.indexOf("&&")>0;)t=t.replace("&&","&");else t+="?cl=1&lang="+n;window.location=r+t}function wt(n){var r=window.location.pathname,i=null,u,t;r.length>3&&r[3]=="/"&&(i="/"+r.substring(1,3)+"/");u=window.location.href.toLowerCase();t=s("punchouttoken");window.location=u.indexOf(i)>=0?t!=null?window.location.origin+i+"productlist/search?query="+n+"&punchouttoken="+t:window.location.origin+i+"productlist/search?query="+n:t!=null?window.location.origin+"/productlist/search?query="+n+"&punchouttoken="+t:window.location.origin+"/productlist/search?query="+n}function bt(){var n=$("#footer2 .logoIDN .thawteLink");n.length&&$("#footer2 .logoIDN .thawteLink").attr("href",$("#footer2 .logoIDN .thawteLink").attr("href").replace("İ","I"))}function s(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function kt(){var n=220,t=500;p(this,n);$(window).scroll(function(){if(typeof document.body.style.maxHeight=="undefined"){var t=$("div.backToTop").css("left");$("div.backToTop").css({position:"absolute",top:$(window).scrollTop()+$(window).height()-42})}p(this,n)});$("div.backToTop").click(function(n){return n.preventDefault(),$("html, body").animate({scrollTop:0},t),!1})}function p(n,t){$(n).scrollTop()>t?$("div.backToTop").show():$("div.backToTop").hide()}var h=-1,n,u=null,t=!1;return{Init:function(){at();g();nt();d();bt();kt()},GetSearchSuggestions:function(n){GetSuggestions(n)},DetectLongPresses:function(n,t){st(n,t)},PreventDefaultActionUpArrow:function(n){ot(n)},PredictiveSearchActualSearch:function(n,t,i){e(n,t,i)},PredictiveSearch:function(n,t,i,r){l(n,t,i,r)},HideSuggestions:function(){o()},ShowSuggestions:function(){a()},ClearTimerAndVar:function(){ht()},SetOverlay:function(){k()},CreatePolyglots:function(){et()},HideCookiesMessage:function(){v()},CheckCookiesMessage:function(){ct()},UpdateShoppingCartHeaderData:function(){lt()},UpdateShoppingCartHeaderDisplay:function(n,t){y(n,t)},ChangeHeaderDropDown:function(n){vt(n)},Search:function(n,t){wt(n,t)}}}();$(function(){RSWeb.Header.Init()});$(document).ready(function(){RSWeb.Header.CreatePolyglots();RSWeb.Header.SetOverlay();RSWeb.Header.CheckCookiesMessage()});$(window).load(function(){window.location.href.toLowerCase().indexOf("/thankyou/thankyou")===-1&&($(".navbar").length||RSWeb.Header.UpdateShoppingCartHeaderData())}),function(n){n.timer=function(t,i,r){return this.set=function(func,time,autostart){var paramList,arg;if(this.init=!0,typeof func=="object"){paramList=["autostart","time"];for(arg in paramList)func[paramList[arg]]!=undefined&&eval(paramList[arg]+" = func[paramList[arg]]");func=func.action}return typeof func=="function"&&(this.action=func),isNaN(time)||(this.intervalTime=time),autostart&&!this.active&&(this.active=!0,this.setTimer()),this},this.once=function(n){var t=this;return isNaN(n)&&(n=0),window.setTimeout(function(){t.action()},n),this},this.play=function(n){return this.active||(n?this.setTimer():this.setTimer(this.remaining),this.active=!0),this},this.pause=function(){return this.active&&(this.active=!1,this.remaining-=new Date-this.last,this.clearTimer()),this},this.stop=function(){return this.active=!1,this.remaining=this.intervalTime,this.clearTimer(),this},this.toggle=function(n){return this.active?this.pause():n?this.play(!0):this.play(),this},this.reset=function(){return this.active=!1,this.play(!0),this},this.clearTimer=function(){window.clearTimeout(this.timeoutObject)},this.setTimer=function(n){var t=this;typeof this.action=="function"&&(isNaN(n)&&(n=this.intervalTime),this.remaining=n,this.last=new Date,this.clearTimer(),this.timeoutObject=window.setTimeout(function(){t.go()},n))},this.go=function(){this.active&&(this.action(),this.setTimer())},this.init?new n.timer(t,i,r):(this.set(t,i,r),this)};n.fn.polyglotLanguageSwitcher=function(t){function s(t){i[t.name]&&i[t.name].call(n(this),t)}function v(){c||(s({name:"beforeOpen",element:e,instance:r}),u.addClass("active"),k(!0),setTimeout(function(){c=!0;s({name:"afterOpen",element:e,instance:r})},100))}function h(){c&&(s({name:"beforeClose",element:e,instance:r}),k(!1),u.removeClass("active"),c=!1,f&&f.active&&f.clearTimer(),s({name:"afterClose",element:e,instance:r}))}function w(){f&&f.active&&f.pause()}function b(){f&&f.play(!1)}function k(n){i.effect=="fade"?n?o.fadeIn(i.animSpeed):o.fadeOut(i.animSpeed):n?o.slideDown(i.animSpeed):o.slideUp(i.animSpeed)}function d(t){var i,e;h();var r=n(t).children(":first-child"),f=n(r).attr("id"),s=n(r).text();for(n(o).children().each(function(){n(this).detach()}),i=0;i<l.length;i++)n(l[i]).children(":first-child").attr("id")!=f&&o.append(l[i]);e=u.children(":first-child");u.attr("id",f);u.text(s);u.append(e)}function g(){n(document).click(function(){h()});n(document).keyup(function(n){n.which==27&&h()});i.openMode=="hover"&&(f=n.timer(function(){h()}),f.set({time:i.hoverTimeout,autostart:!0}))}function nt(){var t,r=n("#"+y+" > select > option"),f,s;a&&(s=window.location.href,r.each(function(){var t=n(this).attr("id");s.indexOf("/"+t+"/")>=0&&(f=t)}));r.each(function(){var s=n(this).attr("id"),e,r;e=a?f===s:n(this).attr("selected");r=tt(n(this));e&&(t=r);l.push(r);p>0?o.append(r):(u=n('<a data-basedir="'+n(this).attr("data-fnparam")+'" id="'+n(this).attr("id")+'" class="current" href="#">'+n(this).text()+' <span class="trigger">&raquo;<\/span><\/a>'),i.openMode=="hover"?u.hover(function(){v();w()},function(){b()}):u.click(function(){v()}));p++});n("#"+y+" :first-child").remove();e.append(u);e.append(o);t&&d(t)}function tt(t){var o=n(t).attr("id"),h=n(t).attr("value"),l=n(t).attr("data-fnparam"),v=n(t).text(),f,u,c;if(a){var y=window.location.href,p=y.substring(y.lastIndexOf("/")+1),k="http://"+document.domain+"/"+i.pagePrefix+o+"/"+p;f=n('<li><a id="'+o+'" onclick=\'RSWeb.Header.ChangeHeaderDropDown("'+l+'");\' href="'+h+'">'+v+"<\/a><\/li>")}else u=document.URL.replace("#",""),c=it(),c[i.paramName]=h,u.indexOf("?")>0&&(u=u.substring(0,u.indexOf("?"))),u+=rt(c),f=n('<li><a id="'+o+'" onclick=\'RSWeb.Header.ChangeHeaderDropDown("'+l+'");\'  href="'+h+'">'+v+"<\/a><\/li>");return f.bind("click",function(){s({name:"onChange",selectedItem:n(this).children(":first").attr("id"),selectedHref:n(this).children(":first").attr("href"),element:e,instance:r});d(n(this))}),i.openMode=="hover"&&f.hover(function(){w()},function(){b()}),f}function it(){var r={},i=window.location.search.substr(1).split("&"),n,t;if(i.length>0)for(n=0;n<i.length;++n)(t=i[n].split("="),t.length==2)&&(r[t[0]]=decodeURIComponent(t[1].replace(/\+/g," ")));return r}function rt(n){var t,r,u,f;if(i.testMode)return"#";t="?";r=0;for(u in n)f="",r>0&&(f="&"),t+=f+u+"="+n[u],r++;return t}var r=n.fn.polyglotLanguageSwitcher,e=n(this),y=n(this).attr("id"),u,o=n('<ul class="dropdown">'),p=0,c=!1,l=[],i=n.extend({},r.defaults,t),f,a=i.websiteType=="static";return nt(),g(),r.open=function(){v()},r.close=function(){h()},s({name:"afterLoad",element:e,instance:r}),r};var t=n.fn.polyglotLanguageSwitcher;t.defaults={openMode:"click",hoverTimeout:1500,animSpeed:200,effect:"slide",paramName:"lang",pagePrefix:"",websiteType:"dynamic",testMode:!1,onChange:NaN,afterLoad:NaN,beforeOpen:NaN,afterOpen:NaN,beforeClose:NaN,afterClose:NaN}}(jQuery);RSWeb.Home=function(){function n(){var n,t;$("#imgDistLogo").width()>177&&(n=$("#imgDistLogo").width()/$("#imgDistLogo").height(),t=177/n,$("#imgDistLogo").width("177px"),$("#imgDistLogo").height(t));$("#imgDistLogo").show()}return{Init:function(){if($("#imgDistLogo").prop("complete"))n();else $("#imgDistLogo").on("load",function(){n()})}}}();$(function(){RSWeb.Home.Init()})