1var isCustomPopupOpen=!1;function CustomPopup(e){this.selector=e,this.popupModalEl=document.querySelector(e),this.popupModal=new bootstrap.Modal(this.popupModalEl),this.showPopupFlag=!0,this.popupDetailObj={},this.idleTimer={},this.popupWindowClosed={},this.hasLengthierString=function(e,t){for(var o=e[0],i=1;i<e.length;i++)e[i].length>o.length&&(o=e[i]);for(var a=0;a<t.length;a++)if(t[a].length>o.length)return!1;return!0}}CustomPopup.prototype.displayPopup=function(e){if(!window.suppressPopups)for(var t=0;t<e.length;t++){var o=e[t];if((this.popupDetailObj=o).isEnabled&&!this.hasPopupAlreadyShown(o.id)&&this.canDisplayedOnThisPage(o)){"scroll"==o.showAfter?this.displayPopUpAfterScroll(o.scrollPercentage):"delay"==o.showAfter?this.displayPopUpAfterTime(o.delayTime):this.displayPopupAfterIdleTime(o.idleTime);break}}},CustomPopup.prototype.displayPopUpAfterTime=function(e){var t=this;setTimeout(function(){t.showPopupModal()},1e3*e)},CustomPopup.prototype.displayPopUpAfterScroll=function(t){var o=this,i=window.innerHeight,a=document.body.clientHeight;window.addEventListener("scroll",function(){var e=window.scrollY/(a-i)*100;t<=e&&o.showPopupModal()})},CustomPopup.prototype.displayPopupAfterIdleTime=function(e){var t=this;this.resetIdleTimer(e),document.addEventListener("mousemove",function(){t.resetIdleTimer(e)}),document.addEventListener("keydown",function(){t.resetIdleTimer(e)}),document.addEventListener("scroll",function(){t.resetIdleTimer(e)})},CustomPopup.prototype.resetIdleTimer=function(e){var t=this;clearTimeout(this.idleTimer),this.idleTimer=setTimeout(function(){t.showPopupModal(),document.removeEventListener("mousemove",function(){t.resetIdleTimer()}),document.removeEventListener("keydown",function(){t.resetIdleTimer()}),document.removeEventListener("scroll",function(){t.resetIdleTimer()})},1e3*e)},CustomPopup.prototype.hasPopupAlreadyShown=function(e){var t=!1;return t=getCookie("survey_"+e+"_completed")?!0:t},CustomPopup.prototype.canDisplayedOnThisPage=function(e){var t,o,i=this,a=window.location.pathname;return 0===e.pagesToBeAvoided.length&&0===e.pagesToBeDisplayed.length||!e.pagesToBeAvoided.includes(a)&&(!!e.pagesToBeDisplayed.includes(a)||(t=[],e.pagesToBeAvoided.map(function(e){i.matchWildcardPath(e,a)&&(t[t.length]=e)}),o=[],e.pagesToBeDisplayed.map(function(e){i.matchWildcardPath(e,a)&&(o[o.length]=e)}),!(0<t.length&&0==o.length)&&(0==t.length&&0<o.length||0==t.length&&0==o.length||0==t.length||0==o.length||hasLengthierString(o,t))))},CustomPopup.prototype.showPopupModal=function(){!this.showPopupFlag||void 0===isVideoPopupOpened&&isVideoPopupOpened||isCustomPopupOpen||window.isAnyPopupOpen||(bootstrap.Modal.getInstance(this.selector).show(),this.showPopupFlag=!1,isCustomPopupOpen=!0,window.isAnyPopupOpen=!0)},CustomPopup.prototype.hidePopupModal=function(){bootstrap.Modal.getInstance(this.selector).hide(),isCustomPopupOpen=!1,window.isAnyPopupOpen=!1},CustomPopup.prototype.matchWildcardPath=function(e,t){e="^"+e.replace(/\*/g,".*")+"$";return new RegExp(e).test(t)};var isCustomChatbotPopulated=!(CustomPopup.prototype.setPopupCookie=function(e){var t=1;"cancel"==e?t=this.popupDetailObj.showAfterNDaysOfCancel:"submission"==e&&(t=this.popupDetailObj.showAfterNDaysOfSubmission),document.cookie="survey_"+this.popupDetailObj.id+"_completed="+(new Date).toUTCString()+"; path=/; SameSite=Strict; Secure; expires="+new Date(Date.now()+24*t*60*60*1e3).toUTCString()+";"});function loadEmbeddedMessagingScript(e){var t,o=window.salesforceChatConfig;o&&o.bootstrapScriptUrl&&(document.querySelector('script[src="'+o.bootstrapScriptUrl+'"]')?"function"==typeof e&&e():((t=document.createElement("script")).src=o.bootstrapScriptUrl,t.onload=e,document.head.appendChild(t)))}function initEmbeddedMessaging(e){try{var t=window.salesforceChatConfig;t&&(embeddedservice_bootstrap.settings.language=t.language,embeddedservice_bootstrap.init(t.orgId,t.deploymentName,t.baseUrl,{scrt2URL:t.scrt2Url}),window.addEventListener("onEmbeddedMessagingReady",function(){"function"==typeof e&&e()}))}catch(e){console.error("Error loading Embedded Messaging: ",e)}}function CustomChatbot(){this.populateInitialChatbot=!0,this.chatbotDetailObj={},this.idleTimer={},this.hasLengthierString=function(e,t){for(var o=e[0],i=1;i<e.length;i++)e[i].length>o.length&&(o=e[i]);for(var a=0;a<t.length;a++)if(t[a].length>o.length)return!1;return!0}}CustomChatbot.prototype.displayChatbot=function(e){for(var t=0;t<e.length;t++){var o=e[t];if((this.chatbotDetailObj=o).isEnabled&&this.canDisplayedOnThisPage(o)&&
1(void 0===o.isABTestVisible||o.isABTestVisible)){loadEmbeddedMessagingScript(function(){initEmbeddedMessaging(function(){"scroll"==o.showAfter?this.displayChatbotAfterScroll(o.scrollPercentage):"delay"==o.showAfter?this.displayChatbotAfterTime(o.delayTime):this.displayChatbotAfterIdleTime(o.idleTime)}.bind(this))}.bind(this));break}}},CustomChatbot.prototype.displayChatbotAfterTime=function(e){var t=this;setTimeout(function(){t.populateChatbot()},1e3*e)},CustomChatbot.prototype.displayChatbotAfterScroll=function(t){var o=this,i=window.innerHeight,a=document.body.clientHeight;window.addEventListener("scroll",function(){var e=window.scrollY/(a-i)*100;t<=e&&o.populateChatbot()})},CustomChatbot.prototype.displayChatbotAfterIdleTime=function(e){var t=this;this.resetIdleTimer(e),document.addEventListener("mousemove",function(){t.resetIdleTimer(e)}),document.addEventListener("keydown",function(){t.resetIdleTimer(e)}),document.addEventListener("scroll",function(){t.resetIdleTimer(e)})},CustomChatbot.prototype.resetIdleTimer=function(e){var t=this;clearTimeout(this.idleTimer),this.idleTimer=setTimeout(function(){t.populateChatbot(),document.removeEventListener("mousemove",function(){t.resetIdleTimer()}),document.removeEventListener("keydown",function(){t.resetIdleTimer()}),document.removeEventListener("scroll",function(){t.resetIdleTimer()})},1e3*e)},CustomChatbot.prototype.canDisplayedOnThisPage=function(e){var t,o,i=this,a=window.location.pathname;return 0===e.pagesToBeAvoided.length&&0===e.pagesToBeDisplayed.length||!e.pagesToBeAvoided.includes(a)&&(!!e.pagesToBeDisplayed.includes(a)||(t=[],e.pagesToBeAvoided.map(function(e){i.matchWildcardPath(e,a)&&(t[t.length]=e)}),o=[],e.pagesToBeDisplayed.map(function(e){i.matchWildcardPath(e,a)&&(o[o.length]=e)}),!(0<t.length&&0==o.length)&&(0==t.length&&0<o.length||0==t.length&&0==o.length||0==t.length||0==o.length||hasLengthierString(o,t))))},CustomChatbot.prototype.populateChatbot=function(){this.populateInitialChatbot&&!isCustomChatbotPopulated&&(embeddedservice_bootstrap.utilAPI.launchChat().then(()=>{}).catch(()=>{}).finally(()=>{}),this.populateInitialChatbot=!1,isCustomChatbotPopulated=!0)},CustomChatbot.prototype.matchWildcardPath=function(e,t){e="^"+e.replace(/\*/g,".*")+"$";return new RegExp(e).test(t)};let EXIT_INTENT_SUCCESS_MESSAGE="Thanks for signing up! Keep an eye out for our latest updates.",EXIT_INTENT_ERROR_MESSAGE="Something went wrong. Please try again.",EXIT_INTENT_VALIDATION_ERROR_CLASS="exit-intent-email-error-msg",EXIT_INTENT_EMAIL_INPUT_ID="subscribe-exit-intent-email";var isExitIntentPopupOpen=!1;function ExitIntentPopup(e){this.selector=e,this.popupModalEl=document.querySelector(e),this.popupModal=new bootstrap.Modal(this.popupModalEl),this.showPopupFlag=!0,this.popupDetailObj={},this.idleTimer=null,this.lastScrollY=window.scrollY,this.lastScrollTime=
1Date.now()}ExitIntentPopup.prototype.isUserLoggedIn=function(){return!!window.isUserLoggedIn},ExitIntentPopup.prototype.getExitIntentCookie=function(e){e=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return e?e[2]:null},ExitIntentPopup.prototype.hasPopupAlreadyShown=function(e){return!!this.getExitIntentCookie("exitintent_"+e+"_completed")},ExitIntentPopup.prototype.setPopupCookie=function(e){var t=1;"cancel"===e?t=this.popupDetailObj.showAfterNDaysOfCancel||1:"submission"===e&&(t=this.popupDetailObj.showAfterNDaysOfSubmission||1),document.cookie="exitintent_"+this.popupDetailObj.id+"_completed="+(new Date).toUTCString()+"; path=/; SameSite=Strict; Secure; expires="+new Date(Date.now()+24*t*60*60*1e3).toUTCString()+";"},ExitIntentPopup.prototype.matchWildcardPath=function(e,t){e="^"+e.replace(/\*/g,".*")+"$";return new RegExp(e).test(t)},ExitIntentPopup.prototype.hasLengthierString=function(e,t){if(e.length){for(var o=e[0],i=1;i<e.length;i++)e[i].length>o.length&&(o=e[i]);for(var a=0;a<t.length;a++)if(t[a].length>o.length)return!1}return!0},ExitIntentPopup.prototype.canDisplayedOnThisPage=function(e){var t,o,i=this,a=window.location.pathname;return!(e.pagesToBeAvoided&&0!==e.pagesToBeAvoided.length||e.pagesToBeDisplayed&&0!==e.pagesToBeDisplayed.length)||(!e.pagesToBeAvoided||!e.pagesToBeAvoided.includes(a))&&(!(!e.pagesToBeDisplayed||!e.pagesToBeDisplayed.includes(a))||(t=[],(e.pagesToBeAvoided||[]).forEach(function(e){i.matchWildcardPath(e,a)&&t.push(e)}),o=[],(e.pagesToBeDisplayed||[]).forEach(function(e){i.matchWildcardPath(e,a)&&o.push(e)}),!(0<t.length&&0===o.length)&&(0===t.length&&0<o.length||0===t.length&&0===o.length||0===t.length||0===o.length||i.hasLengthierString(o,t))))},ExitIntentPopup.prototype.displayPopup=function(e){if(!window.suppressPopups)for(var t=0;t<e.length;t++){var o=e[t];if(o.isEnabled&&!this.hasPopupAlreadyShown(o.id)&&this.canDisplayedOnThisPage(o)){this.popupDetailObj=o,this.initExitIntentTriggers(o);break}}},ExitIntentPopup.prototype.showPopupModal=function(){var e;!this.showPopupFlag||isExitIntentPopupOpen||window.isAnyPopupOpen||(this.popupDetailObj&&this.popupDetailObj.popupTitle&&this.popupDetailObj.popupDescription&&(document.getElementById("exitIntentModalTitle").innerHTML=this.popupDetailObj.popupTitle,document.getElementById("exitIntentModalDescription").innerHTML=this.popupDetailObj.popupDescription),this.popupDetailObj&&this.popupDetailObj.buttonText&&((e=document.getElementById("exitIntentModalCTA"))&&(e.textContent=this.popupDetailObj.buttonText),e=document.getElementById("accept-exit-intent"))&&(e.textContent=this.popupDetailObj.buttonText),bootstrap.Modal.getInstance(this.selector).show(),this.showPopupFlag=!1,isExitIntentPopupOpen=!0,window.isAnyPopupOpen=!0)},ExitIntentPopup.prototype.hidePopupModal=function(){bootstrap.Modal.getInstance(this.selector).hide(),isExitIntentPopupOpen=!1,window.isAnyPopupOpen=!1},ExitIntentPopup.prototype.initExitIntentTriggers=function(e){e.enableIdle&&e.idleTime&&0<e.idleTime&&this.displayPopupAfterIdleTime(e.idleTime),e.enableMouseIntent&&this.trackMouseExitIntent(),e.enableRapidScrollUp&&this.trackRapidScrollUp()},ExitIntentPopup.prototype.displayPopupAfterIdleTime=function(e){var t=this;t.resetIdleTimer(e),document.addEventListener("mousemove",function(){t.resetIdleTimer(e)}),document.addEventListener("keydown",function(){t.resetIdleTimer(e)}),document.addEventListener("scroll",function(){t.resetIdleTimer(e)})},ExitIntentPopup.prototype.resetIdleTimer=function(e){var t=this;clearTimeout(t.idleTimer),t.idleTimer=setTimeout(function(){t.showPopupModal()},1e3*e)},ExitIntentPopup.prototype.trackMouseExitIntent=function(){var t=this;document.addEventListener("mouseout",function(e){e.clientY<=0&&t.showPopupModal()})},ExitIntentPopup.prototype.trackRapidScrollUp=function(){var a=this;window.addEventListener("scroll",function(){var e=window.scrollY,t=Date.now(),o=a.popupDetailObj.rapidScrollUpDistance||200,i=a.popupDetailObj.rapidScrollUpTimeWindow||350;a.lastScrollY-e>o&&t-a.lastScrollTime<i&&a.showPopupModal(),a.lastScrollY=e,a.lastScrollTime=t})},ExitIntentPopup.prototype.handleExitIntentEnterKeyPress=function(e){"Enter"===e.key&&e.target.id===EXIT_INTENT_EMAIL_INPUT_ID&&this.onExitIntentSignUp()},ExitIntentPopup.prototype.onExitIntentSignUp=function(){var t=this;
1this.subscribeToExitIntent("#"+EXIT_INTENT_EMAIL_INPUT_ID,".exit-intent-email-validation").then(function(e){t.handleExitIntentSuccess(e)}).catch(function(e){t.handleExitIntentError(e,".exit-intent-email-validation")})},ExitIntentPopup.prototype.handleExitIntentSuccess=function(e){this.setPopupCookie("submission"),this.hidePopupModal(),showToast(this.popupDetailObj&&this.popupDetailObj.successMessage?this.popupDetailObj.successMessage:EXIT_INTENT_SUCCESS_MESSAGE,4e3,"success")},ExitIntentPopup.prototype.handleExitIntentError=function(e,t){t&&0<$(t).find("."+EXIT_INTENT_VALIDATION_ERROR_CLASS).length||(showToast(EXIT_INTENT_ERROR_MESSAGE,5e3,"fail"),console.error("Sign-up failed:",e))},ExitIntentPopup.prototype.subscribeToExitIntent=function(e,t=null){let o,i=!1;var a=this.popupDetailObj?this.popupDetailObj.id:null;if(!a)return showToast(EXIT_INTENT_ERROR_MESSAGE,5e3,"fail"),Promise.reject("Exit intent item id missing.");if("string"==typeof e&&e.startsWith("#")?o=$(e).val():(o=e,i=!0),!i){e=validateSubscriptionEmail(o);if(!e.valid)return t&&($(t).html(`<p><span class="${EXIT_INTENT_VALIDATION_ERROR_CLASS}">${e.error}</span></p>`),$("#"+EXIT_INTENT_EMAIL_INPUT_ID).addClass("has-error")),Promise.reject(e.error);t&&($(t).empty(),$("#"+EXIT_INTENT_EMAIL_INPUT_ID).hasClass("has-error"))&&$("#"+EXIT_INTENT_EMAIL_INPUT_ID).removeClass("has-error")}var n={email:o,exitIntentItemId:a};return new Promise((t,o)=>{$(".loading-overflow-add-cart").show().css("z-index",getMaxZIndex()+1),$.ajax({url:"/subscribe/exit-intent",method:"POST",contentType:"application/json",data:JSON.stringify(n),headers:{RequestVerificationToken:$('input:hidden[name="__RequestVerificationToken"]').val()},success:function(e){$(".loading-overflow-add-cart").hide(),!0===e?t(e):o(EXIT_INTENT_ERROR_MESSAGE)},error:function(e){$(".loading-overflow-add-cart").hide(),console.log(e),o(e)}})})},$(document).on("click","#accept-exit-intent",function(){var e;window.exitIntentPopupInstance&&(e="undefined"!=typeof loggedInUserEmail?loggedInUserEmail:"",window.exitIntentPopupInstance.subscribeToExitIntent(e).then(function(e){window.exitIntentPopupInstance.handleExitIntentSuccess(e)}).catch(function(e){window.exitIntentPopupInstance.handleExitIntentError(e)}))}),$(document).on("click",'[data-click-fn="onExitIntentSignUp"]',function(e){window.exitIntentPopupInstance&&"function"==typeof window.exitIntentPopupInstance.onExitIntentSignUp&&window.exitIntentPopupInstance.onExitIntentSignUp()}),$(document).on("click",'[data-click-fn="closeExitIntentPopup"]',function(e){window.exitIntentPopupInstance&&"function"==typeof window.exitIntentPopupInstance.hidePopupModal&&(window.exitIntentPopupInstance.hidePopupModal(),window.exitIntentPopupInstance.setPopupCookie("cancel"))}),$(document).on("keypress",'[data-keypress-fn="handleExitIntentEnterKeyPress"]',function(e){window.exitIntentPopupInstance&&"function"==typeof window.exitIntentPopupInstance.handleExitIntentEnterKeyPress&&window.exitIntentPopupInstance.handleExitIntentEnterKeyPress(e)}),(Ecommerce="undefined"!=typeof Ecommerce&&Ecommerce||{}).isReady=!1,Ecommerce.init=function(e){Ecommerce.isReady=!0},Ecommerce.actions=["click","detail","add","remove","checkout","checkout_option","purchase","refund","promo_click"],Ecommerce.productList=function(e){try{gtag("event","view_item_list",{item_list_id:e.listId,item_list_name:e.listName,items:[{item_id:e.sku,item_name:e.name,item_category:e.category,item_list_id:e.listId,item_list_name:e.listName,price:e.price}]}),window.appInsights.trackEvent({name:"productImpression",properties:{Product:impressionObject,EmailId:window.wawUserEmail,PersonId:window.wawUserPersonId}}),window.appInsights.flush()}catch(e){}},Ecommerce.productClick=function(e){try{gtag("event","select_item",{item_list_id:e.listId,item_list_name:e.listName,items:[{item_id:e.sku,item_name:e.name,item_category:e.category,item_list_id:e.listId,item_list_name:e.listName,price:e.price}]})}catch(e){}},Ecommerce.productDetail=function(e){try{gtag("event","view_item",{currency:currencyText,value:e.price,items:[{item_id:e.sku,item_name:e.name,item_category:e.category,item_list_id:e.listId,item_list_name:e.listName,price:e.price}]})}catch(e){}},Ecommerce.findProductAndSend=function(e,t,o,i,a){try{var n,r,s,d,c,l,u=e.find(e=>e.id==t||e.product_id==t);u&&(c=d=s=r=n="",a&&(n=a.name,r=a.id),u.categories&&0<u.categories.length&&(s=window.allCategories.filter(e=>u.categories.includes(e.id))[0].name),u.price?d=u.price:u.list_price&&(d=u.list_price),u.description&&(c=u.description),l={id:u.id,name:u.name,sku:u.sku,description:c,price:d,category:s,quantity:i,listName:n,listId:r},"productClick"==o?Ecommerce.productClick(l):"productDetail"==o?Ecommerce.productDetail(l):"productAddToCart"==o?Ecommerce.cartAdd(l):"productRemoveFromCart"==o&&Ecommerce.cartRemove(l),window.appInsights.trackEvent({name:o,properties:{Product:l,EmailId:window.wawUserEmail,PersonId:window.wawUserPersonId}}),window.appInsights.flush())}catch(e){}},Ecommerce.cartAdd=function(e){try{gtag("event","add_to_cart",{currency:currencyText,value:e.price,items:[{item_id:e.sku,item_name:e.name,item_category:e.category,item_list_id:e.listId,item_list_name:e.listName,price:e.price,quantity:e.quantity}]})}catch(e){}},Ecommerce.cartRemove=function(e){try{gtag("event","remove_from_cart",{currency:currencyText,value:e.price,items:[{item_id:e.sku,item_name:e.name,item_category:e.category,item_list_id:e.listId,item_list_name:e.listName,price:e.price,quantity:e.quantity}]})}catch(e){}};var isMarketoPopupTriggered=!(Ecommerce.cartView=function(e,t){try{gtag("event","view_cart",{currency:currencyText,value:e,items:t})}catch(e){}}),urlRegex=new RegExp("^(?:[a-z]+:)?//","i"),isFirstBrowserScroll=!0,makeFooterSubscriptionStatic=!0,isVideoPopupOpened=!1;window.isAnyPopupOpen=!1;
1let TimeZoneMap={IST:"Asia/Calcutta",EST:"America/New_York",ET:"America/New_York",MST:"America/Boise",UTC:"Etc/UTC"},WaWApp={IDP:0,WWW:1,INDIA:2,MENA:3,All:4},CertificationStatus={None:0,Active:1,InGracePeriod:2,Expired:3},ContentType={None:0,Article:1,Tool:2,Book:3,Certification:4,Course:5,Event:6,Research:7,Webinar:8},affiliateLocationData=(()=>{try{var e=window.affiliateLocationData;if((e="string"==typeof e?JSON.parse(e):e)&&Array.isArray(e.countries)&&e.states&&"object"==typeof e.states)return e}catch(e){}return{countries:[],states:{}}})(),countryDataset=affiliateLocationData.countries,stateDataset=affiliateLocationData.states;function isFile(e){var t=e;return!!(t=urlRegex.test(e)?new URL(e).pathname:t)&&0<t.split("/").pop().indexOf(".")}function getOrchardImageMediaText(e){return null!=e&&null!=e.MediaTexts&&0!=e.MediaTexts.Count?e.MediaTexts[0]:""}function formatMediaUrl(e,t){return!e||"string"==typeof e&&""===e.trim()?"":"CantoCDN"===t?e:"/media/"+(e.startsWith("/")?e.substring(1):e)}function getMediaUrl(t,o=0){try{if(!t)return"";if(!t.Paths||!Array.isArray(t.Paths)||o>=t.Paths.length)return"";var i=t.Paths[o];let e="AzureBlob";return formatMediaUrl(i,e=t.StorageTypes&&Array.isArray(t.StorageTypes)&&o<t.StorageTypes.length&&t.StorageTypes[o]?t.StorageTypes[o]:e)}catch(e){console.error("getMediaUrl error:",e);try{if(t&&t.Paths&&t.Paths[o])return formatMediaUrl(t.Paths[o],"AzureBlob")}catch(e){console.error("getMediaUrl fallback error:",e)}return""}}function getMediaUrlFromPath(t,e){try{return!t||"string"==typeof t&&""===t.trim()?"":formatMediaUrl(t,e&&""!==e.trim()?e:"AzureBlob")}catch(e){console.error("getMediaUrlFromPath error:",e);try{if(t)return formatMediaUrl(t,"AzureBlob")}catch(e){console.error("getMediaUrlFromPath fallback error:",e)}return""}}function openMemberOnlyAccessDenied(e,t){var o="",o=e?$(e.target).attr("data-href"):t,t=!1,i="/wawlogin?returnTo="+encodeURIComponent(o);urlRegex.test(o)?new URL(o)!=new URL(window.location.href)&&(t=!0):isFile(o)&&(t=!0),t&&(o=window.location.pathname+window.location.search,i="/wawlogin?returnTo="+encodeURIComponent(o)),$(".memberonlyAccessDeniedLoginButton").attr("href",i),$("#MemberOnlyAccessDenied").modal("show"),e&&e.preventDefault()}function openLoginAccessDenied(e,t,o,i){var a="",n=!1,r=0,s=!1,d=(e?(a=$(e.target).attr("data-href"),n=$(e.target).attr("data-isDonationProduct"),r=$(e.target).attr("quantity")):a=t,"/wawlogin?returnTo="+encodeURIComponent(a));urlRegex.test(a)?new URL(a)!=new URL(window.location.href)&&(s=!0):isFile(a)&&(s=!0),s&&(a=window.location.pathname+window.location.search,d="/wawlogin?returnTo="+encodeURIComponent(a)),n?($(".loginAccessDeniedLoginButton").attr("href",d+(1<(decodeURIComponent(d).match(/\?/g)||[]).length?"%26quantity%3D":"%3Fquantity%3D")+r),$("#loginAccessDeniedDesc").html("Please log into your account to continue making your donation.")):($(".loginAccessDeniedLoginButton").attr("href",d),$("#loginAccessDeniedDesc").html(isNullOrWhitespace(i)?"Please log into your account now to access this content.":i)),o&&(s=AppConfig_AppPaths_IDPURL.value+"/auth/register?ReturnURL="+encodeURIComponent(t),$(".create-acnt-link").show(),$(".create-acnt-link a").attr("href",s)),$("#loginAccessDenied").modal("show"),e&&e.preventDefault()}function getMaxZIndex(){return Math.max.apply(null,$.map($("body *"),function(e,t){if("static"!=$(e).css("position"))return 2147483600<(e=parseInt($(e).css("z-index")))?2147483600:e||1}))}function setMaxZindexForModal(){var e=getMaxZIndex();$(".modal-backdrop").css("z-index",e+1),$(".modal").css("z-index",e+2)}function blurBackground(){$("div.body-content > div:not(#profile-pic-modal, #MemberOnlyAccessDenied), div.body-content > section, div.wawbreadcrumb, div#footer, header").css({filter:"blur(20px)","-webkit-filter":"blur(20px)"})}function unBlurBackground(){$("div.body-content > div, div.body-content > section, div.wawbreadcrumb, div#footer, header").css({filter:"none","-webkit-filter":"none"})}function parseMaketoPopupUrl(e,t){e=e.split("#").filter(Boolean);let i={};return e.forEach(e=>{var t=e.indexOf("_"),o=e.substring(0,t),e=e.substring(t+1);i[o]=e}),i[t]}function getMarketoFormId(e){var o={formName:e};return new Promise(t=>{$.ajax({url:"/get-marketo-id",type:"POST",data:o,success:function(e){t(e)},error:function(e){t(e)}})})}
1function openMarketoModalForm(a,n,r){var e=MktoForms2.getForm(a),t=($("#marketo-popup .modal-body .mkto-form-container").hide(),$("#marketo-popup .modal-body #mktoForm_"+a+"_container").length);e||0!=t?($("#marketo-popup .modal-body #mktoForm_"+a+"_container").show(),onMarketoFormReady(e)):(jQuery("<div>",{id:"mktoForm_"+a+"_container",class:"mkto-form-container"}).appendTo("#marketo-popup .modal-body"),jQuery("<form>",{id:"mktoForm_"+a}).appendTo("#marketo-popup .modal-body #mktoForm_"+a+"_container"),jQuery("<div>",{class:"marketo-response-message"}).appendTo("#marketo-popup .modal-body #mktoForm_"+a+"_container"),MktoForms2.loadForm(marketoBaseUrl,marketoSubscriptionId,a,function(i){i.onSuccess(function(e,t){var o;return isMarketoPopupTriggered=!1,i.getFormElem().hide(),$("#mktoForm_"+a+"_container").find(".marketo-response-message").html(n),r&&(o="mktoForm_success_"+a,r.startsWith("_video_")?($("<a/>",{id:o,href:r,target:"_blank"}).appendTo("#mktoForm_"+a+"_container"),$("#"+o).click(),$("#video_videoModal").modal("show"),o=document.getElementById("marketo-popup"),bootstrap.Modal.getInstance(o).hide()):window.open(r,"_blank")),!1})}))}function onMarketoFormReady(e){var t;isMarketoPopupTriggered&&(e="#"+e.getFormElem()[0]?.closest(".modal")?.id,(t=bootstrap.Modal.getInstance(e))||(e=document.querySelector(e),t=new bootstrap.Modal(e)),t.show())}function getHubSpotFormId(e){return new Promise(t=>{$.ajax({url:"/get-hubspot-id",type:"POST",data:{formName:e},success:function(e){t(e)},error:function(){t("")}})})}function waitForHubSpotForms(e,t=20,o=250){"undefined"!=typeof hbspt&&hbspt.forms?e():0<t&&setTimeout(()=>waitForHubSpotForms(e,t-1,o),o)}function showHubSpotPopupModal(){var e=document.getElementById("hubspot-popup");(bootstrap.Modal.getInstance(e)||new bootstrap.Modal(e)).show()}function openHubSpotModalForm(t,o,i){var a="hsForm_"+t+"_container",n="hsForm_"+t;$("#hubspot-popup .modal-body .hs-form-container").hide(),0===$("#hubspot-popup .modal-body #"+a).length?(jQuery("<div>",{id:a,class:"hs-form-container"}).appendTo("#hubspot-popup .modal-body"),jQuery("<div>",{id:n,class:"hbspt-form-target"}).appendTo("#hubspot-popup .modal-body #"+a),jQuery("<div>",{class:"hubspot-response-message"}).appendTo("#hubspot-popup .modal-body #"+a),waitForHubSpotForms(function(){hbspt.forms.create({portalId:hubSpotPortalId,formId:t,region:hubSpotRegion,target:"#"+n,formInstanceId:n,onFormSubmitted:function(){var e;$("#"+n).hide(),$("#"+a).find(".hubspot-response-message").html(o),i&&(i.startsWith("_video_")?(e="hsForm_success_"+t,$("<a/>",{id:e,href:i,target:"_blank"}).appendTo("#"+a),$("#"+e).click(),$("#video_videoModal").modal("show"),e=document.getElementById("hubspot-popup"),(e=bootstrap.Modal.getInstance(e))&&e.hide()):window.open(i,"_blank"))}}),showHubSpotPopupModal()})):($("#hubspot-popup .modal-body #"+a).show(),showHubSpotPopupModal())}function showToast(e,t,o){$("#waw-toast .toast-body").html(e),void 0!==o&&"success"==o?$("#waw-toast").addClass("toast-success").removeClass("toast-fail"):void 0!==o&&"fail"==o?$("#waw-toast").addClass("toast-fail").removeClass("toast-success"):$("#waw-toast").removeClass("toast-success").removeClass("toast-fail"),$("#waw-toast").css("z-index",getMaxZIndex()+1);e=document.getElementById("waw-toast"),o=bootstrap.Toast.getOrCreateInstance(e);isNaN(t)?o._config.delay=7e3:o._config.delay=t,o.show()}function updateCartLinkInMenu(){null==cookieMap().get("isDonationProductinCart")?$(".cart-link-update").each((e,t)=>{var o=localStorage.getItem("bcCartId"),i=localStorage.getItem("hasMembershipInCart"),a=localStorage.getItem("cartLength"),n=window.location.origin+"/cart?cartId=";o&&(n+=o),"true"===i&&(n+="&membership=true"),o?($(t).attr("href",n),$(t).addClass("cart-link-update-contents"),$(t).attr("data-after",0==a?" ":a)):$(t).removeClass("cart-link-update-contents")}):(document.cookie="isDonationProductinCart=; SameSite=Strict; path=/; Secure; Expires=Thu, 01 Jan 1970 00:00:01 GMT;",localStorage.removeItem("bcCartId"),localStorage.removeItem("hasMembershipInCart"),localStorage.removeItem("cartLength"))}function getSiteMetaData(){return new Promise((t,o)=>{$.ajax({url:AppConfig_AppPaths_WebURL.value+"/site/meta-data?alias="+SiteMetaDataAlias.value,type:"GET",success:function(e){t(e)},error:function(e){o(e)}})})}function getBCAccessToken(){return getAccessToken($("#IDPClients_BC_ClientId").val(),$("#IDPClients_BC_Scope").val())}function getSFAccessToken(){return getAccessToken($("#IDPClients_SF_ClientId").val(),$("#IDPClients_SF_Scope").val())}function getAccessToken(e,t){var i={clientId:e,clientScope:t};return new Promise((t,o)=>{$.ajax({url:"/account/accesstoken",type:"POST",data:i,success:function(e){t(e)},error:function(e){o(e)}})})}function getPageRange(o,e){return Array(e-o+1).fill().map((e,t)=>t+o)}function pagination(e,o,t=2){if(o<=0)return[];var i={start:Math.round(e-t/2),end:Math.round(e+t/2)};i.start-1!=1&&i.end+1!==o||(i.start+=1,i.end+=1);let a=t<e?getPageRange(Math.min(i.start,o-t),Math.min(i.end,o)):getPageRange(1,Math.min(o,t+1));e=(e,t)=>
1a.length+1!==o?t:[e];return a=(a=1!==a[0]?e(1,[1,"..."]).concat(a):a)[a.length-1]<o?a.concat(e(o,["...",o])):a}async function scrollOnPagination(t,o=0){if(document.getElementById(t)){var i=document.querySelector("header"),i=i?i.offsetHeight:0;let e=$("#"+t).offset().top-(i+o);await scrollToPosition(e),80<i&&setTimeout(async()=>{await scrollToPosition(e)},100)}}function scrollToPosition(o,i="smooth"){return new Promise(e=>{let t=()=>{window.removeEventListener("scrollend",t),e()};window.addEventListener("scrollend",t),window.scrollTo({top:Math.max(0,o),behavior:i})})}function loadVideoPlayButtons(e=!1){var o=0;let i=e?"_onboardingvideo_":"_video_",a=e?"#onboarding_video_videoModal":"#video_videoModal",n=e?"popOnboardingVideoID":"popVideoID";$("a").each(function(){var e,t=$(this).attr("href");null!=t&&t.startsWith(i)&&($(this).attr("data-bs-toggle","modal"),$(this).attr("data-bs-target",a),$(this).html().toLowerCase().includes("<img"))&&(o+=1,0<(t=$(this).children()).length)&&0!=t[0].naturalHeight&&(t=t.innerHeight(),e=$("#"+n+o),0<t)&&!e.length&&$(this).append('<a href="#" class="ColFixedWidthIcon" id="'+n+o+'" style="height:'+t+'px;"><img src="/img/icons/video-play.svg" alt="play"/></a>')})}function isValidUrl(e){let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol}function checkFlexGap(){var e=document.createElement("div"),t=(e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),1===e.scrollHeight);return e.parentNode.removeChild(e),t}function triggerURLScroll(){window.location.hash&&setTimeout(function(){isFirstBrowserScroll&&window.scrollTo(0,1<window.pageYOffset?window.pageYOffset-1:window.pageYOffset+1)},1500)}function widgetConsentsAppSetup(e){var t=Vue.createApp({data(){return{item:e,id:e.id,itemId:e.itemId,isLoading:!0,isLoading:!0,isGivenConsent:e.isGivenConsent,consent:e.consent,apiUrl:window.location.origin+"/WaW.Cms.Modules/CommonApi/AddWidgetInsights",canShowConsentForm:e.canShowConsentForm}},methods:{async logConsent(o){return new Promise(t=>{var e={insightsItemId:this.itemId,consent:o,pageUrl:window.location.pathname};$.ajax({url:this.apiUrl,type:"POST",dataType:"json",headers:{RequestVerificationToken:$('input:hidden[name="__RequestVerificationToken"]').val()},data:e,success:function(e){t(e)},error:function(e){t(e)},complete:e=>{this.consent=o,this.closeConsent(),t(e)}})})},setConsentCookie(){var e;null==cookieMap().get("widgetConsent")?document.cookie="widgetConsent="+this.itemId+">"+this.consent+"; SameSite=Strict; path=/; Secure;":(e=(e=cookieMap().get("widgetConsent"))+"||"+this.itemId+">"+this.consent,document.cookie="widgetConsent="+e+"; SameSite=Strict; path=/; Secure;")},closeConsent(){this.setConsentCookie(),this.canShowConsentForm=!1}},computed:{},watch:{},created(){var e;this.isGivenConsent?this.canShowConsentForm="no"==this.consent:(e=cookieMap().get("widgetConsent"))&&-1<e.indexOf(this.itemId)&&(this.canShowConsentForm="no"==e.split("||")[e.split("||").length-1].split(">")[1]),this.isLoading=!1},mounted(){}});widgetConsentsMountedApp["id_"+e.itemId]=t.mount("#"+e.id+"_"+e.itemId)}function hidePopoverOnScroll(){try{[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map(function(e){null!=e.attributes["data-bs-content"]&&bootstrap.Popover.getInstance(e).hide()})}catch(e){console.log(e)}}function onFooterSubClose(){var e="hideFooterSubscription=true;",t=($("#footerSub").hasClass("sticky-bottom")&&(e="makeFooterSubscriptionStatic=true;",$("#footerSub").removeClass("sticky-bottom")),new Date);t.setTime(t.getTime()+864e5),document.cookie=e+" SameSite=Strict; path=/; Secure; expires="+t.toUTCString(),$("#footerSub").remove()}function subscribeToNewsletter(a,n=null){return new Promise((t,o)=>{var e=$(a).val(),i=validateSubscriptionEmail(e);i.valid?(n&&$(n).addClass("d-none").empty(),e={email:e},$(".loading-overflow-add-cart").show().css("z-index",getMaxZIndex()),$.ajax({url:"/subscribe/news-letter",method:"POST",data:e,headers:{RequestVerificationToken:$('input:hidden[name="__RequestVerificationToken"]').val()},success:function(e){$(".loading-overflow-add-cart").hide(),t(e)},error:function(e){$(".loading-overflow-add-cart").hide(),console.log(e),o(e)}})):(n?($(".subscription-signup-fail").addClass("d-none"),$(n).removeClass("d-none").html(`<p><span class="newsletter-email-error-msg">${i.error}</span></p>`)):showToast(i.error,5e3,"fail"),o(i.error))})}function onNewsLetterSubscribe(){subscribeToNewsletter("#subscribe-email").then(e=>{$(".subscription-cta, .subscription-content, .footer-sub-close").addClass("d-none"),e?($(".subscription-success").removeClass("d-none"),(e=new Date).setTime(e.getTime()+864e5),document.cookie="makeFooterSubscriptionStatic=true; SameSite=Strict; path=/; Secure; expires="+e.toUTCString(),setTimeout(()=>{$("#footerSub").fadeOut(1e3,()=>$("#footerSub").remove())},5e3)):$(".subscription-fail").removeClass("d-none")}).catch(e=>{console.error("Subscription failed:",e)})}function onNewsLetterWidgetSignUp(){subscribeToNewsletter("#email-subscribe",".newsletter-email-validation").then(e=>{e?($(".newsletter-input-container").addClass("d-none"),$(".newsletter-signup-desc").addClass("d-none"),$(".subscription-signup-success").removeClass("d-none"),$(".subscription-signup-fail").addClass("d-none")):$(".subscription-signup-fail").removeClass("d-none")}).catch(e=>{console.error("Sign-up failed:",e)})}function handleNewsLetterEnterKeyPress(e){"Enter"===e.key&&("subscribe-email"===(e=e.target.id)?onNewsLetterSubscribe():"email-subscribe"===e&&onNewsLetterWidgetSignUp())}(()=>{var e=!1;try{e="true"===new URLSearchParams(window.location.search).get("ismobileapp")}catch(e){}var t=!1;try{e&&sessionStorage.setItem("waw_ismobileapp","true"),t="true"===sessionStorage.getItem("waw_ismobileapp")}catch(e){}window.isMobileAppRequest=e||t;try{-1!==document.cookie.indexOf("IsMobileApp=")&&(document.cookie="IsMobileApp=; path=/; max-age=0","localhost"!==location.hostname)&&(document.cookie="IsMobileApp=; path=/; domain=worldatwork.org; max-age=0")}catch(e){}})(),$(document).ready(function(){function e(){$("#navbarNav").toggleClass("menuHideAndDisplay"),$(".header-container").toggleClass("menuFixed"),$(".header-container").hasClass("menuFixed")?$(".header-container").css("z-index",getMaxZIndex()+1):$(".header-container").css("z-index",1),$("body").toggleClass("ScrollOff")}window.suppressPopups&&$(".feedback-button").addClass("d-none"),$("button.main-nav-bar-toggler").click(function(){e()}),$(".navbar-collapse #menu .nav-item .nav-link").click(function(){$(".navbar-collapse").hasClass("menuHideAndDisplay")||($(".navbar-collapse").collapse("hide"),e())});var t=document.getElementById("scroll-nav-add-rem"),o=($(window).scroll(function(){50<$(this).scrollTop()?(t&&t.classList.add("scroll-nav"),"undefined"!=typeof isBannerEnabled&&isBannerEnabled&&hideBanner()):(t&&t.classList.remove("scroll-nav"),"undefined"!=typeof isBannerEnabled&&isBannerEnabled&&showBanner()),function(){{var t,e;0<scrollItems.length&&(t=$(this).scrollTop()+s,e=scrollItems.map(function(e){if($(e)?.offset()?.top<t)return e}).filter(e=>null!=e),e=e[e.length-1],n!==e)&&(n=e,d.removeClass("active").filter("[href='"+e+"']").addClass("active"))}}()}),document.querySelector(".scrollToTopBtn")),i=document.querySelector("#footerSub"),a=document.documentElement;o.addEventListener("click",function(){a.scrollTo({top:0,behavior:"smooth"})}),document.addEventListener("scroll",function(){var e=a.scrollHeight-a.clientHeight;.4<a.scrollTop/e?o.classList.add("showscrollToTopBtn"):o.classList.remove("showscrollToTopBtn"),null!=i&&(.2<a.scrollTop/e&&!window.wawUser.hasWorkspanWeeklySubscription&&!makeFooterSubscriptionStatic?i.classList.add("sticky-bottom"):i.classList.remove("sticky-bottom"))});var n,r=$("#scroll-nav-add-rem"),s=r.outerHeight()+10,d=r.find(".customMenu a"),r=[...d].map(function(e){return $(e).attr("href")}).filter(e=>e.startsWith("#")),c=[...$(".renderWidgetBlock")].map(function(e){return"#"+$(e).attr("id")});scrollItems=r.sort(function(e,t){return c.indexOf(e)-c.indexOf(t)});for(var l=location.host,l=new RegExp(l,"i"),u=document.getElementsByTagName("a"),p=0;p<u.length;p++)try{var h,m,g=u[p].host,f=u[p].href,w="%7Burl.global%7D",y="%7Burl.india%7D",b="%7Burl.mena%7D",v="%7Burl.member%7D";!isNullOrWhitespace(f)&&new URL(f).origin!=AppConfig_AppPaths_IDPURL.value&&f.indexOf("javascript:void(0)")<0&&((!l.test(g)||["/lms-sso","/engage-sso","/career-sso","/psi-sso","/canvas-sso","/squirrel-sso","/wagescape-sso"].includes(new URL(f).pathname)||["/foundation/scholarship-application/"].some(function(e){return new URL(f).pathname.startsWith(e)})||isFile(f)||-1<g.indexOf("."+location.host))&&(u[p].setAttribute("target","_blank"),u[p].innerHTML+="<span class='sr-only' aria-hidden='true'>Open in a new tab</span>",-1<u[p].href.indexOf("mailto:"))&&(u[p].innerHTML+="<span class='sr-only' aria-hidden='true'>Email</span>"),f.includes(w)&&(f=(h=u[p].pathname.substring(u[p].pathname.indexOf("%7B"),u[p].pathname.length)).replace(w,AppConfig_AppPaths_WebURL.value),u[p].setAttribute("href",f+u[p].search+u[p].hash),u[p].setAttribute("target","_blank")),f.includes(y)&&(h=u[p].pathname.substring(u[p].pathname.indexOf("%7B"),u[p].pathname.length),f=h.replace(y,Ap
1pConfig_AppPaths_INDIAURL.value),u[p].setAttribute("href",f+u[p].search+u[p].hash),u[p].setAttribute("target","_blank")),f.includes(b)&&(h=u[p].pathname.substring(u[p].pathname.indexOf("%7B"),u[p].pathname.length),f=h.replace(b,AppConfig_AppPaths_MENAURL.value),u[p].setAttribute("href",f+u[p].search+u[p].hash),u[p].setAttribute("target","_blank")),"Learn More"===u[p].textContent&&(u[p].innerHTML+="<span class='sr-only' aria-hidden='true'>Learn More</span>"),f.includes(v))&&(m=(h=u[p].pathname.substring(u[p].pathname.indexOf("%7B"),u[p].pathname.length)).replace(v,""),null!=window.wawUser.id&&window.wawUser.hasAccessToMemberBenefits?(u[p].setAttribute("href",m),m.startsWith("/")||l.test(m)||u[p].setAttribute("target","_blank")):(u[p].setAttribute("href","#memberOnlyAccessDenied"),u[p].setAttribute("data-href",m),u[p].setAttribute("target","")))}catch(e){console.log(e)}$("a[href^='#']").on("click",function(e){var t=$(this).attr("href"),o="#"!=t;"#main"==t||t.startsWith("#mktoForm")||$(e.currentTarget).hasClass("glosseriesAlphabetBox")||("#memberOnlyAccessDenied"==t?openMemberOnlyAccessDenied(e):"#print_page"==t?window.print():o&&scrollOnPagination(t.substring(1)),e.preventDefault())});var r="/"+window.location.pathname.split("/")[1],P=($("ul.navbar-nav > li.nav-item > a.nav-link[href='"+r+"']").addClass("active"),$(".waw_searchBox input").keydown(function(e){var t;13===e.which&&(e.preventDefault(),e=$(this).val(),t=window.location.origin,""!=e.trim()&&(t+="/search/Init?q="+e),window.location.replace(t))}),0<$(".subNavGradientBlockMultipleItems").length&&($(".subNavGradientBlockMultipleItems").slick({infinite:!1,dots:!1,accessibility:!0,slidesToShow:7,slidesToScroll:1,prevArrow:'<div class="slick-prev slick-arrow" role="button" tabindex="0"><img loading="lazy" src="/img/icons/arrow-left.svg" /><span class="sr-only" aria-hidden="true">Previous</span></div>',nextArrow:'<div class="slick-next slick-arrow" role="button" tabindex="0"><img loading="lazy" src="/img/icons/arrow-right.svg" /><span class="sr-only" aria-hidden="true">Next</span></div>',responsive:[{breakpoint:1024,settings:{slidesToShow:5,slidesToScroll:5,dots:!1}},{breakpoint:768,settings:{slidesToShow:4,slidesToScroll:4,dots:!1}},{breakpoint:576,settings:{slidesToShow:3,slidesToScroll:3}}]}),setTimeout(function(){var t=$(".subNavGradientBlockMultipleItems").slick("getSlick");t.$slides.toArray().forEach(function(e){e.classList.contains("active")&&t.slickGoTo(e.dataset.slickIndex)})},1e3),$(".subNavGradientBlockMultipleItems > .slick-arrow").off("click")),0<$(".SubMenu-Area").length&&($(".SubMenu-Area").slick({infinite:!1,dots:!1,accessibility:!0,slidesToShow:5,slidesToScroll:1,prevArrow:'<div class="slick-prev slick-arrow" role="button" tabindex="0"><img loading="lazy" src="/img/icons/arrow-left.svg" /><span class="sr-only" aria-hidden="true">Previous</span></div>',nextArrow:'<div class="slick-next slick-arrow" role="button" tabindex="0"><img loading="lazy" src="/img/icons/arrow-right.svg" /><span class="sr-only" aria-hidden="true">Next</span></div>',variableWidth:!0,responsive:[{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:3,infinite:!1,dots:!1}},{breakpoint:768,settings:{slidesToShow:2,slidesToScroll:2,infinite:!1,dots:!1}},{breakpoint:480,settings:{slidesToShow:2,slidesToScroll:2,infinite:!1}}]}),setTimeout(function(){var t=$(".SubMenu-Area").slick("getSlick");t.$slides.toArray().forEach(function(e){e.children[0].classList.contains("active")&&t.slickGoTo(e.dataset.slickIndex)})},1e3),$(".SubMenu-Area > .slick-arrow").off("click")),0);var C;function T(e=!1){let t=e?"_onboardingvideo_":"_video_",o=e?"#popOnboardingVideoID":"#popVideoID";var e=e?$("#onboardingVideoEmbed"):$("#videoEmbed"),i=window.innerHeight-49,a=(i<896?e.css("height",i):e.css("height",896),0);
1$("a").each(function(){var e=$(this).attr("href");null!=e&&e.startsWith(t)&&$(this).html().toLowerCase().includes("<img")&&(e=$(this).children().innerHeight(),a+=1,$(o+a).css({height:e}))})}$(window).resize(function(){T(),T(!0)}),$(".renderWidgetBlock").each(function(){$(this).attr("id")&&$(this).append($("<a/>",{href:"#"+$(this).attr("id"),text:"¶",class:"widget-permalink"}))}),$(document).on("click",".permalink",function(){var e,t;e=$(this),t=$("<input>"),$("body").append(t),t.val(window.location.origin+window.location.pathname+window.location.search+e.attr("href")).select(),document.execCommand("copy"),t.remove(),showToast("Link copied to clipboard.",4e3,"success")}),$(".waw-show-tooltip").on("mouseover",function(){$(this).removeAttr("title"),(this.offsetWidth<this.scrollWidth||this.offsetHeight<this.scrollHeight)&&$(this).tooltip({title:$(this).text(),placement:"right",delay:{show:1e3,hide:100},html:!0,template:"<div class='tooltip' role='tooltip'><div class='tooltip-arrow'></div><div class='tooltip-inner'>"+$(this).text()+"</div></div>"})}),updateCartLinkInMenu();var I,_=document.getElementsByTagName("img");for(let e=0;e<_.length;e++)try{_[e].alt||(I=$("title").text(),_[e].alt=I)}catch(e){}!function e(){"function"==typeof ga&&ga.loaded||20<P++?Ecommerce.init():setTimeout(e,500)}(),setMaxZindexForModal(),r=localStorage.getItem("lastVisitedPage"),C=location.href,"/volunteer/volunteer-application"==location.pathname?localStorage.getItem("lastVisitedVolunteerPage")?r=localStorage.getItem("lastVisitedVolunteerPage"):localStorage.setItem("lastVisitedVolunteerPage",r):localStorage.removeItem("lastVisitedVolunteerPage"),r&&C&&r!=C&&$(".header_close").attr("href",r),localStorage.setItem("lastVisitedPage",C),waitForMktoForms2(()=>{MktoForms2.whenReady(onMarketoFormReady)}),(r=new URLSearchParams(window.location.search).get("returnToMemberPage"))&&(urlRegex.test(C=r)?new URL(r)==new URL(window.location.href)&&(C=window.location.origin+C):isFile(r)&&(C=window.location.origin+C),isMember&&"true"==isMember.toLocaleString()&&hasAccessToMemberBenefits?(window.open(C,"_blank").focus(),window.location=window.location.pathname):openMemberOnlyAccessDenied(null,r)),triggerURLScroll();var S=document.getElementsByTagName("a");for(let e=0;e<S.length;e++){var A=S[e].href.indexOf("#");S[e].attributes.role&&S[e].attributes.role.value||-1!==A||(S[e].setAttribute("role","button"),S[e].setAttribute("tabindex","0")),-1<A&&S[e].setAttribute("role","button")}makeFooterSubscriptionStatic=getCookie("makeFooterSubscriptionStatic"),checkFlexGap()||$("body").addClass("no-flexbox-gap"),setTimeout(function(){[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map(function(e){if(null!=e.attributes["data-bs-content"])return new bootstrap.Popover(e)})},1e3);try{var E=$("table.waw-table");if(0<E.length){let e=0<$(".article-content-section").find("table.waw-table").length;E.each(function(){$(this).parent().hasClass("waw-table-wrapper")||$(this).wrap('<div class="waw-table-wrapper"></div>'),e||$(this).parent().parent().css({"min-width":"0"})})}}catch(e){}loadProfileDataCollectionPopup()}),window.onload=function(){var e=new URLSearchParams(window.location.search),e=(e.get("vdcategory")&&setTimeout(window.scrollTo({top:$("#vendorList").position().top-200,behavior:"smooth"}),3e3),setTimeout(function(){loadVideoPlayButtons(),loadVideoPlayButtons(!0)},1e3),e.get("section"));e&&scrollOnPagination(e)},document.addEventListener("hide.bs.modal",function(e){void 0!==e.target.id&&"MemberOnlyAccessDenied"==e.target.id&&unBlurBackground()}),document.addEventListener("show.bs.modal",function(e){var t,o,i;e&&e.relatedTarget&&(o=$(e.relatedTarget).attr("data-href"),t=!1,i="/wawlogin?returnTo="+encodeURIComponent(o),urlRegex.test(o)?new URL(o)!=new URL(window.location.href)&&(t=!0):isFile(o)&&(t=!0),t&&(o=window.location.pathname+window.location.search,i="/wawlogin?returnTo="+encodeURIComponent(o)),$(".memberonlyAccessDeniedLoginButton").attr("href",i),void 0!==e.target.id)&&"MemberOnlyAccessDenied"==e.target.id&&blurBackground()}),document.addEventListener("shown.bs.modal",function(e){setMaxZindexF
1orModal()}),$(document).on("click","[href^='#mktoForm_']",function(e){e.preventDefault(),isMarketoPopupTriggered=!0;var e=$(this).attr("href"),t="The form has been submitted successfully.";let o=parseMaketoPopupUrl(e,"successLink");parseMaketoPopupUrl(e,"message")&&(t=parseMaketoPopupUrl(e,"message")),getMarketoFormId(parseMaketoPopupUrl(e,"mktoForm")).then(function(e){openMarketoModalForm(e,t,o)},function(e){console.error(e)})}),$(document).on("click","[href^='#hsForm_']",function(e){e.preventDefault();var e=$(this).attr("href"),t="The form has been submitted successfully.";let o=parseMaketoPopupUrl(e,"successLink");parseMaketoPopupUrl(e,"message")&&(t=parseMaketoPopupUrl(e,"message")),getHubSpotFormId(parseMaketoPopupUrl(e,"hsForm")).then(function(e){e&&openHubSpotModalForm(e,t,o)},function(e){console.error(e)})}),$(document).on("click","[href^='_video_']",function(e){e.preventDefault();var e=window.innerHeight-49,t=(t=$(this).attr("href")).replace("_video_",""),o=$("#videoEmbed");if(o.length)return o.attr("src",t),e<896?$("#videoEmbed").css("height",e):$("#videoEmbed").css("height",896),!(isVideoPopupOpened=!0)}),$(document).on("click","[data-click-fn]",function(e){var t=$(this).data("click-fn");window[t]&&"function"==typeof window[t]&&window[t](e)}),$(document).on("keypress","[data-keypress-fn]",function(e){var t=$(this).data("keypress-fn");window[t]&&"function"==typeof window[t]&&window[t](e)}),$("#video_videoModal").find(".btn-close").on("click",function(e){var t=$("#videoEmbed");t.length&&t.attr("src",""),isVideoPopupOpened=!1}),$("img").on("load",function(){loadVideoPlayButtons(),loadVideoPlayButtons(!0)}),window.onscroll=function(e){var t;isFirstBrowserScroll&&window.location.hash&&(e.preventDefault(),t=0,(e=$(window.location.hash).parents("#payEquityList").first())&&(t+=e.find(".payEquityAlphabet").outerHeight()??0),setTimeout(function(){scrollOnPagination(window.location.hash.replace("#",""),t)},50),isFirstBrowserScroll=!1),isFirstBrowserScroll=!1,hidePopoverOnScroll()},caseInsensitiveIndexOf=(e,t)=>e.findIndex(e=>t.toLowerCase()===e.toLowerCase()),isNullOrWhitespace=e=>!e||!e.trim(),$(document).ready(function(){"undefined"!=typeof widgetConsentsTobeSetup&&0<widgetConsentsTobeSetup.length&&widgetConsentsTobeSetup.forEach(widgetConsentsAppSetup)}),cookieMap=()=>new Map(document.cookie.split("; ").map(e=>e.split(/=(.*)/s).map(decodeURIComponent)));let validateSubscriptionEmail=e=>String(e).toLowerCase().match(/^(?!.*[\\/])(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)?{valid:!0,error:null}:{valid:!1,error:"Please enter a valid email"};function getCookie(t){var o=document.cookie.split("; ");for(let e=0;e<o.length;e++){var i=o[e].split("=");if(i[0]===t)return i[1]}return null}let oldXHROpen=XMLHttpRequest.prototype.open;function cartUpdated(e,t,o){o={cartOutput:o.target.responseText,method:t,url:e,pageUrl:window.location.href};$.ajax({url:"/shopping/track-cart-update",type:"POST",data:o,dataType:"json",headers:{RequestVerificationToken:$('input:hidden[name="__RequestVerificationToken"]').val()}})}XMLHttpRequest.prototype.open=function(t,o,e){return o.includes("api/carts")&&this.addEventListener("loadend",e=>{cartUpdated(o,t,e)}),oldXHROpen.apply(this,arguments)};let debounce=(t,o)=>{let i;return function(...e){clearTimeout(i),i=setTimeout(()=>{t(...e)},o)}};function sortArrayWithArray(e,o){return e.sort((e,t)=>o.indexOf(e)-o.indexOf(t)),e}function convertTimeZone(e,t){return new Date(("string"==typeof e?new Date(e):e).toLocaleString("en-US",{timeZone:t}))}function getCompanies(e){return new Promise(t=>{$.ajax({url:AppConfig_AppPaths_WebURL.value+"/profile/company",type:"GET",data:{search:e},headers:{"X-Requested-With":"XMLHttpRequest",RequestVerificationToken:$('input:hidden[name="__RequestVerificationToken"]').val()},success:function(e){t(e.data)},error:function(e){t(e)}})})}function openFeedbackPopup(e){return window.open(e.currentTarget.dataset.feedbackurl,"Site Feedback","width=1000,height=700"),!1}function shareArticleOnSocialMedia(e){e.preventDefault();var e=e.currentTarget,t=e.href,o=e.getAttribute("data-popup-title")||"Share",i=e.getAttribute("data-popup-width")||400,e=e.getAttribute("data-popup-height")||350,a=window.screenX+(window.innerWidth-i)/2;window.open(t,o,`width=${i},height=${e},top=${window.screenY+(window.innerHeight-e)/2},left=${a},resizable,scrollbars`)}
1function waitForMktoForms2(e,t=20,o=250){"undefined"!=typeof MktoForms2&&MktoForms2.whenReady?e():0<t&&setTimeout(()=>waitForMktoForms2(e,t-1,o),o)}function aosInit(){"undefined"!=typeof AOS&&AOS.init({disable:!window.enableScrollAnimation,duration:600,easing:"ease-in-out",once:!0,mirror:!1,offset:60})}function wrapNumbersInElement(e){e.childNodes.forEach(e=>{var t,o;e.nodeType===Node.TEXT_NODE?(t=(o=e.textContent).replace(/([0-9]{1,3}(?:,[0-9]{3})*(?:\.[0-9]+)?)/g,e=>{var t=e.includes(",")?'data-purecounter-formater="en-US" data-purecounter-separator="true"':"";let o="";var i=e.replace(/,/g,""),a=i.match(/\.(\d+)/);return a&&(a=a[1].length,o=`data-purecounter-separator="true" data-purecounter-decimals="${a}"`),`<span data-purecounter-start="0" data-purecounter-end="${i}" ${t} ${o} class="purecounter">${e}</span>`}))!==o&&((o=document.createElement("span")).innerHTML=t,e.replaceWith(...o.childNodes)):e.nodeType===Node.ELEMENT_NODE&&wrapNumbersInElement(e)})}function openAffiliateFilters(){try{function a(e){return e&&e.country&&0<String(e.country).trim().length}var n="undefined"!=typeof window&&window.accountProfileInfo?window.accountProfileInfo:null,r=n?.homeMailingAddress||null,s=n?.businessAddress||null;let e=null;var d=(e=a(r)?r:a(s)?s:null)?.country?String(e.country).trim():"",c=e?.state?String(e.state).trim():"";let o=countryDataset,i=stateDataset;function l(e){return String(e||"").normalize("NFKC").replace(/\s+/g," ").trim().replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}var u,p=(e=>{let t=l(e);return(e=o.find(e=>l(e.text)===t))?e.id:null})(d),h=p?((e,t)=>{if(!e)return null;e=i[e]||[];let o=l(t);return(t=e.find(e=>l(e.text)===o))?t.id:null})(p,c):null;let t="/affiliates";p&&h?((u=new URLSearchParams).set("country",p.toLowerCase()),u.set("state",h.toLowerCase()),t+="?"+u.toString()):t+="#affiliate-form",window.open(t,"_blank")}catch(e){window.open("/affiliates","_blank")}}function loadProfileDataCollectionPopup(){window.suppressPopups||!window.wawUserPersonId||"function"!=typeof window.pdcSkipCookieExists||window.pdcSkipCookieExists()||$.ajax({url:"/profile/next-popup-field",method:"GET",data:{path:window.location.pathname},success:function(e,t,o){e&&(-1!==(o.getResponseHeader("Content-Type")||"").indexOf("application/json")?0<e.cookieExpirationMinutes&&"function"==typeof window.setPdcSkipCookie&&window.setPdcSkipCookie(e.cookieExpirationMinutes):e.trim()&&($("body").append(e),window.initPdcPopup)&&window.initPdcPopup())}})}Number.prototype.localizeCurrency=function(){try{var t=currencyPattern.match(/{(\d+):?C(\d*)}/);let e=2;t&&(e=t[2]);var o=Intl.NumberFormat(currentCulture,{style:"currency",currency:currencyText,minimumFractionDigits:e??2}),i=currencyPattern.trim().indexOf("{1}");return 0==i?currencyText+" "+o.format(this):-1==i?""+o.format(this):o.format(this)+" "+currencyText}catch(e){console.log(e)}return""},window.addEventListener("DOMContentLoaded",aosInit),window.enableScrollAnimation&&(document.querySelectorAll(".animate-number").forEach(e=>{wrapNumbersInElement(e)}),new PureCounter);var chatbotInstance,documentClick=!0;function setSubMenuPosition(e){var e=$(e).parent(".dropdown"),t=e.find("ul"),e=e[0].getBoundingClientRect(),o=$(window).width(),i=$(window).height();let a="";var n=e.top,i=i-e.bottom,r=e.left,o=o-e.right;a=o>=t.outerWidth()?!(i>=t.outerHeight())&&n>=t.outerHeight()?"top-right":"bottom-right":r>=t.outerWidth()?!(i>=t.outerHeight())&&n>=t.outerHeight()?"top-left":"bottom-left":"bottom-right",t.removeClass("top-left top-right bottom-left bottom-right"),t.addClass(a)}function toggleMenuDropdown(e){var t=$(e).parent().siblings(".dropdown.active");t?.length&&(t.removeClass("active"),t.find(".dropdown").removeClass("active"),t.find("ul").removeClass("dropdown-active")),$(e).parent().hasClass("active")&&((t=$(e).siblings(".dropdown-active")).find(".dropdown").removeClass("active"),t.find("ul").removeClass("dropdown-active")),$(e).parent().toggleClass("active"),$(e).next().toggleClass("dropdown-active")}function toggleScrolled(){var e=document.querySelector("body"),t=$(e).hasClass("scrolled");window.scrollY>$("#header").height()&&!t||70<=window.scrollY&&t?e.classList.add("scrolled"):e.classList.remove("scrolled")}function getSFChatbotDetails(i){return new Promise((t,o)=>{var e=i.map(e=>"contentItemIds="+encodeURIComponent(e)).join("&");e+="¤tPage="+encodeURIComponent(window.location.pathname),$.ajax({url:"/chatbot?"+e,type:"GET",success:function(e){e.forEach(function(e){e.abTestingEventName&&window.clarity("set","chatbotABEventName",e.abTestingEventName)}),t(e)},error:function(e){o(e)}})})}function initializeProductDetailsPopup(o){var e=Vue.createApp({data(){return{mainProductId:o,productDetail:[],productCfs:null,isContactSponsorPopup:!1,isLoading:!1,showPopup:!1}},methods:{getProductDetailsByBcId(e){getBCAccessToken().then(t=>{$.ajax({url:API+"/api/products/course-details/"+e,method:"GET",dataType:"json",beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t)},success:function(e){productDetailsMountedApp["id_"+o].productDetail.push(e),productDetailsMountedApp["id_"+o].isLoading=!1}})})}
1,getWebsiteUrl(e){let t=e.customer_Contact_URL__c?.trim();return t=t&&!isValidUrl(t)?"https://"+t:t},getSessionDate(e,t){let o="";return 0<e?.trim().length?(o=e,0<t?.trim().length&&e!==t&&(o+=" - "+t)):0<t?.trim().length&&(o=t),o},closeProductDetails(){$("#productDetails_"+this.mainProductId+" #product-details-popup").modal("hide")}},computed:{},created(){}});productDetailsMountedApp["id_"+o]=e.mount("#productDetails_"+o)}$(document).ready(function(){$(document).on("touchstart",function(){documentClick=!0}),$(document).on("touchmove",function(){documentClick=!1}),$("#searchButton").on("click",function(){var e=$("#searchInput").val();e&&(window.location.href="/search/init?q="+encodeURIComponent(e))}),$("#waw-navbar").on("show.bs.collapse",function(){$("body").addClass("mobile-nav-active")}),$("#waw-navbar").on("hidden.bs.collapse",function(){$("body").removeClass("mobile-nav-active")}),$("#header .topbar").addClass("topbar-transition"),$("#banner-notification").height($("#banner-notification").height())}),$(document).on("mouseenter",".nav-item .dropdown-btn",function(e){setSubMenuPosition(this)}),$(document).on("touchend",".nav-item .dropdown-btn",function(e){documentClick&&(e.preventDefault(),setSubMenuPosition(this),toggleMenuDropdown(this),e.stopImmediatePropagation())}),$(document).on("click",".mobile-nav-active .nav-item .dropdown-btn",function(e){e.preventDefault(),toggleMenuDropdown(this),e.stopImmediatePropagation()}),document.addEventListener("scroll",toggleScrolled),window.addEventListener("load",toggleScrolled),$(document).on("click","#waw-navbar .nav-item a:not(.dropdown-btn)",function(){$(".mobile-nav-active").length&&$("#navbar-toggler").trigger("click")}),$(document).on("click",function(e){$(e.target).closest("#waw-navbar").length||($(".nav-item .dropdown-btn").next().removeClass("dropdown-active"),$(".nav-item.dropdown").removeClass("active"))}),$(document).ready(function(){0<siteMetaData.chatbotContentItemIds.length&&getSFChatbotDetails(siteMetaData.chatbotContentItemIds).then(function(e){(chatbotInstance=new CustomChatbot).displayChatbot(e)},function(e){console.error(e)})});let API=$("#AppConfig_WaWInfraPaths_BCService").val(),BCAPI=$("#AppConfig_WaWInfraPaths_BCService").val(),COMMON_PRODUCT="COMMON",COURSE_PRODUCT="COURSE",COURSE_WITH_OPTIONS="PARENT",NONMEMBER_CUSTOMER_GROUP_ID=1;var hideImageOnMobile=!1;window.certificationIds=[],window.curriculumCategoryId=0,window.allCategories=[],window.mainProductIds=[],window.productsAddedToCart=[],window.productsNotAddedToCart=[];let addToCartCommonApp=null,removeMembershipEvent=($(document).ready(function(){"undefined"!=typeof productsTobeSetup&&0<productsTobeSetup.length&&(productsTobeSetup.forEach(productsModuleSetup),addToCartCommonApp=addToCartApp().mount("#dynamicAddToCart")),"undefined"!=typeof upsellProductContainersTobeSetup&&0<upsellProductContainersTobeSetup.length&&upsellProductContainersTobeSetup.forEach(upsellProductContainersSetup),$(document).on("click",".upsellProductCard",function(t){var e,o,i;["add-to-cart","details","quantitySelect","quantityTextbox","quantitySelectOption"].some(e=>$(t.target).hasClass(e))||(e=$(this).attr("data-productid"),o=$(this).attr("data-bundleMainProductId"),(i=$(this).find(".checkbox").hasClass("selected"))?$(this).find(".checkbox").removeClass("selected"):$(this).find(".checkbox").addClass("selected"),upsellProductContainersMountedApp["id_"+o].changeBundle(e,!i),changeGroupedAddOnProduct(e,i,o))}),$("#proceed-btn").click(e=>{removeMembershipEvent(e)})}),async e=>{var t=window.getCartId();0!=(null!=t&&""!=t)&&(t=document.getElementById("BuyMembershipWarning"),bootstrap.Modal.getInstance(t).hide(),(null==(t=await deleteCartMembership(e.target.dataset.removeId))||null==t.data||t.length<=0||t.data.length<=0)&&clearCartData(),$(".loading-overflow-add-cart").hide(),$("#buyMembership_"+e.target.dataset.productId+" .add-to-cart").click(),t=$("#buyMembership_"+e.target.dataset.productId+" .add-to-cart")[0].attributes,addToCartMountedApp["id_"+e.target.dataset.productId].openAddtoCartPopup(t,e.target.dataset.productId))}
1),deleteCartMembership=async r=>($(".loading-overflow-add-cart").show(),getCartData().then(async e=>{var t,o,i,a=e.some(e=>e.id===r),n=localStorage.getItem("pid")||0;a&&localStorage.removeItem("hasMembershipInCart"),a&&0<Number(n)&&customerIsProvisionalMember&&await removeCustomerMembership();try{Ecommerce.isReady&&(i="",t=$("div[data-id='"+r+"']"),i=t[0].dataset.productid)&&""!=i&&(o=e.find(e=>e.product_id==i),Ecommerce.findProductAndSend(e,i,"productRemoveFromCart",o.quantity))}catch(e){}return await new Promise(o=>{getBCAccessToken().then(t=>{var e=window.getCartId();$.ajax({url:API+`/api/carts/${e}/items/`+r,type:"DELETE",beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t)},complete:e=>{o(e)}})})})})),clearCartData=()=>{localStorage.removeItem("bcCartId"),localStorage.removeItem("parentThatHaveExam"),localStorage.removeItem("examsInCart"),mainProductIds.forEach(e=>{addToCartMountedApp["id_"+e].cartId=""})},getCartData=()=>new Promise(o=>{getBCAccessToken().then(t=>{var e=window.getCartId();$.ajax({url:API+"/api/carts/"+e,type:"GET",dataType:"json",beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t)},complete:e=>{let t=[];e.data&&(t=[...e.data.line_items.custom_items,...e.data.line_items.digital_items,...e.data.line_items.physical_items]),o(t)}})})}),deliveryText=e=>!e||e.trim().length<=0?(hideImageOnMobile=!0,""):"Virtual Course"===e?"Virtual Classroom":"E-Learning"===e?"eLearning / LMS":"CBT Exam"===e?"Exam":"Class"===e?"Classroom":e.toLowerCase()==="Live Digital Event".toLowerCase()?"Live Digital Event":"Webinar Live"===e?"Webinar":"Download only"===e?(hideImageOnMobile=!0,"Download only"):"Hardcopy & Download"===e?(hideImageOnMobile=!0,"Hardcopy & Download"):"Hardcopy only"===e?(hideImageOnMobile=!0,"Hardcopy only"):"General";function addToCartApp(e){return Vue.createApp({data(){return{cartId:"",isUserLoggedIn:null!=window.wawUser.id,isLoading:!0,productApp:null,hidePopup:!1,bundleMainProductId:"",mainProductId:"",isCommonApp:!1,wawUser:window.wawUser,isDonationProduct:e?.isDonationProduct??!1,isBundleProduct:e?.isBundleProduct??!1,isDynamicBundleProduct:e?.isDynamicBundleProduct??!1,hasAccessToMemberBenefits:window.wawUser.hasAccessToMemberBenefits}},methods:{openLoginAccessDenied(e){openLoginAccessDenied(e)},clearCartData(){localStorage.removeItem("bcCartId")},async openAddtoCartPopup(S,A){return this.isDonationProduct&&this.clearCartData(),$(".loading-overflow-add-cart").show(),new Promise((_,e)=>{(async()=>{this.cartId=window.getCartId();var e=await this.verifyCartRequest();this.mainProductId=A,this.productApp=productsMountedApp["id_"+A],this.hidePopup="true"==S["data-hidePopup"]?.value,this.bundleMainProductId=S["data-bundleMainProductId"]?.value,this.hidePopup||$("body").addClass("cart-modal-opened");let t={},o=!1,i="COMMON",a=Number(S.productId?.value),n=Number(S.childrenId?.value),r=Number(S.examId?.value);S.variantId?.value;var s=S.productName?.value,d=(S.parentProductName?.value,S.examProductName?.value),c=S.quantity?.value||1;let l=deliveryText(S.delivery?.value);var u=S.date?.value,p=S.place?.value,h=S.isCourse?.value;let m=!1,g=!1,f={};var w=[],y={name:s};if((localStorage.setItem("lastShoppingPage",window.location.href),s.startsWith("Professional Membership"))&&("undefined"!=typeof membershipProducts&&(b=membershipProducts.filter(e=>e.productCode.includes(this.productApp.productData.sku))[0],g=1<b?.years),e&&0<e.length)){var b=e.filter(e=>e.product_id!=a&&e.name.startsWith("Professional Membership"));if(0<b.length)return $("#BuyMembershipWarning #proceed-btn").attr("data-product-id",a),$("#BuyMembershipWarning #proceed-btn").attr("data-remove-id",b[0].id),b=$("#buyMembership_"+b[0].product_id+" .plan-name").attr("data-year"),$("#BuyMembershipWarning .modal-body .desc").html("A <span class='highlight-name'>"+b+"-Year Membership</span> product already exists in the cart. Adding this will replace the existing membership product in the cart."),new bootstrap.Modal(document.getElementById("BuyMembershipWarning")).show(),$("body").removeClass("cart-modal-opened"),!$(".loading-overflow-add-cart").hide()}"General"!=l&&w.push(l),"Classroom"===l&&(w.push(p),w.push(u),m=!0),"Virtual Classroom"===l&&(w.push(u),m=!0),"eLearning / LMS"===l&&(w.push("120-Day Access"),m=!0),"Webinar"!==l&&"Live Digital Event"!==l||w.push(u),"General"===l&&0<u.trim().length&&(w.push(p),w.push(u)),n?(r&&(window.addExamInCart(this.productApp.examProduct,this.productApp.productData),window.restrictTabs)&&(b={id:n},window.addExamInCart(b,this.productApp.productData)),t={line_items:[{quantity:c,product_id:n}]},r&&t.line_items.push({quantity:c,product_id:r}),p=["Classroom","Virtual Classroom","eLearning / LMS","Exam"],l.includes("Exam")&&(t={line_items:[{quantity:c,product_id:n}]}),i=r&&"true"===h&&e&&e.some(e=>e.product_id===Number(r))?(l.includes("Exam")||w.push("<i>Exam is already in the cart.</i>"),t={line_items:[{quantity:c,product_id:n}]}
1,COURSE_PRODUCT):(r&&p.forEach(e=>{l&&l===e&&(o=!0)}),COURSE_WITH_OPTIONS),f={name:s,details:w},r&&(f.examName=d)):(t={line_items:[{quantity:c,product_id:a}]},f={name:s,details:w},i=COMMON_PRODUCT);u=localStorage.getItem("pid")||0;t.customer_id=u,t.is_course=m;let v=0,P=0,C=0,T=!1;var I,b=await this.addToCartRequest(t,y);if(void 0!==b){productsAddedToCart.push(this.mainProductId);try{Ecommerce.isReady&&(I=this.productApp,$.each(t.line_items,function(e,t){var o=t.product_id,t=t.quantity,i=[];I.childProducts&&0<I.childProducts.length?i=I.childProducts:i.push(I.productData),Ecommerce.findProductAndSend(i,o,"productAddToCart",t,I.productData)}))}catch(e){}h=f.name.startsWith("Professional Membership");$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .membership-message").addClass("hide"),$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .affiliate-msg").addClass("hide"),h&&($("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .membership-message").removeClass("hide"),this.isUserLoggedIn&&this.wawUser.isLocalNetworkMember&&(g?this.wawUser.isMember?$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .affiliate-msg-multi-year-renewal"):$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .affiliate-msg-multi-year"):this.wawUser.isMember?$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .affiliate-msg-renewal"):$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .affiliate-msg-user")).removeClass("hide"),localStorage.setItem("hasMembershipInCart","true"),0<Number(u))&&this.isMemberRequest
1().then(e=>{(T=e?.customer_group_id===NONMEMBER_CUSTOMER_GROUP_ID?!0:T)||$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .membership-message").addClass("hide")});[...b.line_items.custom_items,...b.line_items.digital_items,...b.line_items.physical_items].forEach(e=>{let t=[];i===COMMON_PRODUCT?t=[a]:(t=[n],i===COURSE_WITH_OPTIONS&&r&&(t=[n,r])),t.includes(e.product_id)&&(v+=e.sale_price,P+=e.list_price,C+=e.sale_price)}),v>P&&(P="");e=e=>e?` 2 <div class="product-name"> 3 ${e.name} 4 </div> 5 ${e=e.details,e?`<div class="product-type"> 6 ${e.map(e=>""+e).join("<br/>")} 7 </div> 8 `:""} 9 10 `:"";$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .products-list").html(""),$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .qty").html(""),o&&!f.details.includes("Exam")&&(p={name:f.examName,details:["Exam"]},$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .products-list").append(e(p))),$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .products-list").append(e(f)),$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .qty").html("x "+c),$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .list-price").html(""),v!=P&&($("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .list-price").addClass("list-price-strikethrough"),$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .list-price").html(P.localizeCurrency())),$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .total-price").html(C.localizeCurrency()),this.productApp.mainProductImage?($("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .product-image").show(),hideImageOnMobile&&$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .product-image").addClass("d-none d-md-block"),$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .addcart_modal_img").attr("src",this.productApp.mainProductImage)):$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart .product-image").hide()}$(".loading-overflow-add-cart").hide(),_(this.cartId)})()})},async verifyCartRequest(){return new Promise(o=>{0<this.cartId.length?getBCAccessToken().then(t=>{$.ajax({url:BCAPI+"/api/carts/"+this.cartId,type:"GET",dataType:"json",beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t)},success:e=>{let t=[];e.data?(window.addParentToStorage(e.data),(t=[...e.data.line_items.custom_items,...e.data.line_items.digital_items,...e.data.line_items.physical_items]).some(e=>e.name.startsWith("Professional Membership"))||localStorage.removeItem("hasMembershipInCart")):(localStorage.removeItem("bcCartId"),localStorage.removeItem("examsInCart"),localStorage.removeItem("hasMembershipInCart")),o(t)},error:e=>{localStorage.removeItem("bcCartId"),localStorage.removeItem("examsInCart"),localStorage.removeItem("hasMembershipInCart"),o()}})}):(localStorage.removeItem("hasMembershipInCart"),o())})}
10,async isMemberRequest(){let e=localStorage.getItem("pid")||0;return new Promise(o=>{getBCAccessToken().then(t=>{$.ajax({url:BCAPI+"/api/customers/"+e,type:"GET",dataType:"json",beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t)},success:e=>{o(e.data[0])},error:e=>{o()}})})})},async addToCartRequest(i,a){return new Promise((e,o)=>{i.customer_id&&0!=i.customer_id&&$.ajax({url:"/profile/bc-update-membership",type:"POST",dataType:"json",async:!1,data:{personId:i.customer_id}}),getBCAccessToken().then(t=>{$.ajax({url:BCAPI+"/api/carts"+(0<this.cartId.length?"/"+this.cartId+"/additem":""),type:"POST",dataType:"json",async:!1,data:JSON.stringify(i),beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t)},contentType:"application/json; charset=utf-8",success:t=>{if(t&&t.data&&t.data.id){this.hidePopup||$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart").show(),localStorage.setItem("bcCartId",t.data.id),this.cartId=t.data.id;try{document.cookie="cartid="+t.data.id+"; SameSite=Strict; path=/; Secure;"}catch(e){}window.addParentToStorage(t.data),this.isDonationProduct||this.updateLoginLinks(t)}else if(!t.error_code||"DuplicateProductPurchase"!=t.error_code&&"CourseAlreadyExistInCart"!=t.error_code&&"ParentDependencyRequired"!=t.error_code)$("[data-product-id="+this.mainProductId+"]").find(".cart-full").show(),$("body").removeClass("cart-modal-opened"),this.productApp.productData.name.startsWith("Professional Membership")&&document.getElementById("BuyMembershipError")&&new bootstrap.Modal(document.getElementById("BuyMembershipError")).show();else{$("body").removeClass("cart-modal-opened");let e="";switch(t.error_code){case"DuplicateProductPurchase":e=`You have already purchased <b>${a.name}</b>. Please note that registration is limited to one per person. For more information on additional registrations, please contact: <a class='text-break' href='mailto:[email protected]'>[email protected]</a>.`;break;case"CourseAlreadyExistInCart":e=`You have already added <b>${a.name}</b> to your cart. Registration is limited to one session per person for this product. To change sessions, please remove the existing one from your cart before adding a new session.`;break;case"ParentDependencyRequired":return showParentDependencyPopup(a),void $(".loading-overflow-add-cart").hide();default:return}var o="";i&&i.line_items&&0<i.line_items.length&&(o=i.line_items[0].product_id),"undefined"!=typeof productsTobeSetup&&0<productsTobeSetup.length&&productsTobeSetup.some(e=>e.productId==o&&"upsellcollectionproduct"===e.id?.toLowerCase())?productsNotAddedToCart.push({productInfo:a,description:e}):showDuplicateProductPurchasePopup(a,e)}e(t.data)},error:e=>{o(e)}})})})},async showAddToCart(o){return new Promise((e,t)=>{o&&(0<productsAddedToCart.length?(this.isCommonApp=o,$("#dynamicAddToCart #add-to-cart").show(),$("#dynamicAddToCart #add-to-cart .modal-body-content .product-row").remove(),$("#dynamicAddToCart #add-to-cart .modal-body-content .products-not-added").remove(),productsAddedToCart.forEach(e=>{$("#dynamicAddToCart_"+e+" #add-to-cart .modal-body-content .product-row").clone().insertBefore($("#dynamicAddToCart #add-to-cart .modal-body-content .member-msg"))}),0<productsNotAddedToCart.length&&productsNotAddedToCart.forEach(({description:e})=>{$("<div>",{class:"products-not-added",html:e}).insertBefore($("#dynamicAddToCart #add-to-cart .modal-body-content .member-msg"))})):0<productsNotAddedToCart.length&&productsNotAddedToCart.forEach(({productInfo:e,description:t})=>{showDuplicateProductPurchasePopup(e,t)}),productsAddedToCart=[],productsNotAddedToCart=[]),e()})},updateLoginLinks(o){if(o.data.id){let t=[];o.data.line_items&&Object.keys(o.data.line_items).forEach(e=>{0<o.data.line_items[e].length&&o.data.line_items[e].filter(e=>0<=e.sale_price&&!e.hide).forEach(e=>{t.push(e)})}),localStorage.setItem("cartLength",t.length),$(".login-link").each((e,t)=>{let o=$(t).attr("href").split("&")[0];var i=localStorage.getItem("bcCartId"),i=(i&&(o=o+"?cartId="+i),localStorage.getItem("hasMembershipInCart"));"true"===i&&(o.includes("?")?o+="&membership=true":o+="?membership=true"),$(t).attr("href",o)}),updateCartLinkInMenu()}},closeAddToCart(){$("#dynamicAddToCart_"+this.mainProductId+" #add-to-cart").hide(),$("body").removeClass("cart-modal-opened"),$("body").removeClass("learning-methods-modal-opened"),$("body").removeClass("details-modal-opened"),$("body").removeClass("contact-sponsor-modal-opened"),this.isCommonApp&&$("#dynamicAddToCart #add-to-cart").hide()}},created(){}})}function productsModuleSetup(e){e.isProductDetailAvailable&&initializeProductDetailsPopup(e.productId);var t=Vue.createApp({data(){return{item:e,mainProductId:e.productId,mainProductType:e.type,mainProductImage:e.productImage,isPilot:e.isPilot??!1,includeExam:void 0===e.includeExam||e.includeExam,inputExamProductId:void 0!==e.includeExam&&(e.includeExam??!0)&&e.inputExamProductId?e.inputExamProductId:"",productData:null,childProducts:[],showQuantity:!1,productTypes:{isCourse:!1,addExamBundled:!1,hasVirtualClassRoom:!1,hasELearning:!1,hasClassroom:!1,hasExam:!1,hasPracticeExam:!1},displayProducts:[],chosenProductId:null,chosenProduct:null,chosenProductQuantity:e.chosenProductQuantity??1,examProduct:null,memberPriceList:[],nonMemberPriceList:[],memberPriceHtml:null,nonMemberPriceHtml:null,buyButtonHtml:null,registerButtonHtml:null,Months:[],States:[],Countries:[],selectedTab:e.selectedTab,selectedMonth:"",selectedState:"",selectedCountry:"",currentProductDetailsApp:productDetailsMountedApp["id_"+e.productId],currentPageUrl:window.location.href.split("?")[0],devEnv:["qa.","dev.","localhost"].some(e=>window.location.hostname.includes(e)),isLoading:!0,filtersApplied:!1,bundleMainProductId:e.bundleMainProductId,isDonationProduct:e.isDonationProduct,isBundleProduct:e.isBundleProduct,isDynamicBundleProduct:e.isDynamicBundleProduct,isUserLoggedIn:null!=window.wawUser.id,domId:e.id,restrictTabs:void 0!==window.restrictTabs&&window.restrictTabs,dummyTypesList:void 0===window.dummyTypesList?[]:window.dummyTypesList,hideBCProducts:void 0===window.hideBCProducts?[]:window.hideBCProducts,AllMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],filtersAvailable:!1,filterPivot:"",isWebinarConsented:null}},methods:{async addToCart(e){e.preventDefault(),this.isDonationProduct&&!this.isUserLoggedIn?this.openLoginAccessDenied(e):(e=await addToCartMountedApp["id_"+this.mainProductId].openAddtoCartPopup(e.target.attributes,this.mainProductId),this.isDonationProduct&&this.setCookieandRedirectToCartForDonationProduct(e))}
10,setCookieandRedirectToCartForDonationProduct(e){e=window.location.origin+"/cart?cartId="+e+"&redirectToCheckout=1";try{document.cookie="isDonationProductinCart=true; SameSite=Strict; path=/; Secure;"}catch(e){}$(".loading-overflow-add-cart").show(),window.location.replace(e)},openLoginAccessDenied(e){openLoginAccessDenied(e)},addToCartClickMethod(){return"productsMountedApp['id_"+this.mainProductId+"'].addToCart(event)"},isNullOrWhitespace(e){return isNullOrWhitespace(e)},async getProductInfoBC(e,a,n){return new Promise((o,i)=>{getBCAccessToken().then(t=>{$.ajax({url:API+`/api/products/${e}?includeChild=${a}&isPilot=`+n,type:"GET",dataType:"json",beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t)},success:e=>{o(e)},error:e=>{i(e)}})})})},async getCategories(){return new Promise(o=>{getBCAccessToken().then(t=>{$.ajax({url:API+"/api/categories",type:"GET",dataType:"json",beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t)},success:e=>{var t,o;e.data&&(t=e.data.filter(e=>["Curriculum","Learning"].includes(e.name)),o=e.data.find(e=>"Curriculum"===e.name),window.curriculumCategoryId=o?.id,window.certificationIds=t.map(e=>e.id),window.allCategories=e.data)},error:e=>{console.log(e)},complete:e=>{o(e)}})})})},priceListRequest(e){let a=e.map(e=>e.id);return a.push(this.productData.id),new Promise((o,i)=>{getBCAccessToken().then(t=>{$.ajax({url:API+"/api/pricelists/records/Member%20Price",type:"GET",dataType:"json",headers:{product_id:a.join(",")},beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t)},success:e=>{this.memberPriceList=[...e.data,...this.memberPriceList],o()},error:e=>{i()}})})})},nonMemberPriceListRequest(e){let a=e.map(e=>e.id);return a.push(this.productData.id),new Promise((o,i)=>{getBCAccessToken().then(t=>{$.ajax({url:API+"/api/pricelists/records/Non-Member",type:"GET",dataType:"json",headers:{product_id:a.join(",")},beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t)},success:e=>{this.nonMemberPriceList=[...e.data,...this.nonMemberPriceList],o()},error:e=>{i()}})})})},getTabName(e){let t="";return"Virtual Course"==e||"1310 - Virtual Classroom"==e?t="virtual":"E-Learning"==e||"1210 - E-Learning"==e?t="elearning":"CBT Exam"==e||"1340 - Examination Only"==e?t="exam":"Practice Exam"==e||"1350 - Other Self Study"==e?t="practice-exam":"Class"!==e&&"1000 - Onsite Course"!=e||(t="classroom"),t},getBCTabName(e){let t="";return"virtual"==e?t="1310 - Virtual Classroom":"elearning"==e?t="1210 - E-Learning":"exam"==e?t="1340 - Examination Only":"practice-exam"==e?t="1350 - Other Self Study":"classroom"==e&&(t="1000 - Onsite Course"),t},isTabAvailable(e){let t=!1;return"virtual"==e?t=this.productTypes.hasVirtualClassRoom:"elearning"==e?t=this.productTypes.hasELearning:"exam"==e?t=this.productTypes.hasExam:"practice-exam"==e?t=this.productTypes.hasPracticeExam:"classroom"==e&&(t=this.productTypes.hasClassroom),t},getInitialTab(){let e="";return this.productTypes.hasVirtualClassRoom?e="1310 - Virtual Classroom":this.productTypes.hasClassroom?e="1000 - Onsite Course":this.productTypes.hasELearning?e="1210 - E-Learning":this.productTypes.hasExam?e="1340 - Examination Only":this.productTypes.hasPracticeExam&&(e="1350 - Other Self Study"),e},hasDate(e,t){return null!=e&&0<e.trim().length&&null!=t&&0<t.trim().length},getDate(e,t){let o="";return 0<e?.trim().length?(o=`${this.getMonth(e)} ${this.getDay(e)}, `+this.getYear(e),0<t?.trim().length&&e!==t&&(o+=` - ${this.getMonth(t)} ${this.getDay(t)}, `+this.getYear(t))):0<t?.trim().length&&(o=`${this.getMonth(t)} ${this.getDay(t)}, `+this.getYear(t)),o},getNADate(e){var t,o;return e?(t=(e=e).slice(0,2),o=e.slice(2,4),e=e.slice(4,8),t-=1,new Date(e,t,o)):new Date("01-01-1900")},getMonth(e){return 0<e.trim().length?(e=e.slice(0,2),["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(e)-1]):""},getWeekday(e){return e&&0!==e.trim().length?(e=[(e=[e.slice(0,2),"-",e.slice(2)].join("")).slice(0,5),"-",e.slice(5)].join(""),new Date(e).toLocaleTimeString("en-us",{weekday:"long",hour:"2-digit",minute:"2-digit"}).split(" ")[0]):""},getHour(e){return e&&0!==e.trim().length?(e=[(e=[e.slice(0,2),"-",e.slice(2)].join("")).slice(0,5),"-",e.slice(5)].join(""),(e=new Date(e).toLocaleTimeString("en-us",{weekday:"long",hour:"2-digit",minute:"2-digit"}).split(" "))[1]+" "+e[2]):""},getDay(e){return 0<e.trim().length?e.slice(2,4):""},getYear(e){return 0<e.trim().length?e.slice(4,8):""},hasPlace(e){return null!=e.City_C&&0<e.City_C.trim().length&&null!=e.State_C&&0<e.State_C.trim().length&&null!=e.Country_C&&0<e.Country_C.trim().length},getPlace(e){return this.hasPlace(e)?e.City_C+`, ${e.State_C} `+e.Country_C:""},getDelivery(e){return e.Delivery&&0<e.Delivery.trim().length?""+e.Delivery:this.devEnv?"{{ Delivery }}":""},getDeliveryText(e){return deliveryText(e)},getSponsor(e){return e.Sponsor_C&&0<e.Sponsor_C.trim().length?""+e.Sponsor_C:""},getFilterMonth(e){e=e.slice(0,2);return this.AllMonths[Number(e)-1]},verifyCustomField(e,t){return e&&0<e.trim().length?""+e:devEnv?`{{ ${t} }}`:""},getPageTitle(e){return 0<e.page_title.trim().length?""+e.page_title:devEnv?"{{ product.page_title }}":""},openProductDetails(e,t){this.currentProductDetailsApp.isContactSponsorPopup=t;try{var o;Ecommerce.isReady&&e&&(o=[],this.childProducts&&0<this.childProducts.length?o=this.childProducts:o.push(this.productData),Ecommerce.findProductAndSend(o,e,"productClick",void 0,this.productData),Ecommerce.findProductAndSend(o,e,"productDetail",void 0,this.productData))}catch(e){}$("#productDetails_"+this.mainProductId+" #product-details-popup").modal("show"),this.currentProductDetailsApp.isLoading=!0,this.currentProductDetailsApp.productDetail=[],this.currentProductDetailsApp.getProductDetailsByBcId(e)},isContactSponsor(e){var t=e.cfs.Course_Type_C?.trim()||"";return"WorldatWork"==t||""==t?this.addToCartButton(e):"WorldatWork India"==t?"":`<div class="d-flex open-details mt-3"> 11 <a tabindex="0" class="waw-btn ghost primary contact-sponsor open-contact-sponsor" v-on:click="openProductDetails(`+e.id+`, true)">Sponsor Pricing & Registration</a> 12 </div> 13 `},isSponsoredWebinar(e){return isSponsoredWebinar(e)},onWebinarConsentChecked(){$(".webinar-consent-validation-msg").text("")},addToCartButton(t){return"none"!=t.inventory_tracking&&t.inventory_level<=0?` 14 <a class="waw-btn disabled" tabindex="0"> 15 Unavailable 16 </a> 17 <a href="https://worldatwork.org/support/contact-us" class="waiting" tabindex="0"> 18 To be placed on the waiting list or inquire about other sessions or products, please contact our Customer Experience Team. 19 </a> 20 `:"true"==t.cfs.Max_Registrants_Reached__c?`<div class="d-flex"> 21 <a class="waw-btn primary sold-out mt-3" 22 tabindex="0" 23 href="javascript:void(0)"> 24 Sold Out 25 </a> 26 </div> 27 `:this.productTypes.addExamBundled?`<div class="d-flex"> 28 <a class="waw-btn primary add-to-cart mt-3" 29 tabindex="0" 30 href="#" 31 data-click-fn="addToCartfn" 32 data-action="addToCart" 33 data-mainproductId="${this.mainProductId}" 34 productId="${this.productData.id}" 35 childrenId="${t.id}" 36 examId="${this.examProduct?.id?this.examProduct.id:""}" 37 variantId="${this.productData.variants[0].id}" 38 productName="${t.page_title}" 39 examProductName="${this.examProduct?.page_title}" 40 parentProductName="${this.productData.name}" 41 delivery="${this.getDelivery(t.cfs)}" 42 date="${this.getDate(t.cfs.Product_Start_Date_C,t.cfs.Product_End_Date_C)}" 43 place="${this.getPlace(t.cfs)}" 44 isCourse="${this.productTypes.addExamBundled}"> 45 Add to Cart 46 </a> 47 </div> 48 <div class="d-flex"> 49 <div class="cart-full" class="mt-3" style="display:none;"> 50 <div class="error_msg">Sorry, you can't add this item to the cart.</div> 51 <div class="error_msg">You have reached the maximum allowed quantity for purchase in your cart or the item isn't available anymore.</div> 52 </div> 53 </div> 54 `:`<div class="d-flex"> 55 <a class="waw-btn primary add-to-cart mt-3" 56 tabindex="0" 57 href="#" 58 data-click-fn="addToCartfn" 59 data-action="addToCart" 60 data-mainproductId="${this.mainProductId}" 61 productId="${t.id}" 62 variantId="${t.variants[0].id}" 63 productName="${t.page_title}" 64 examProductName="${this.examProduct?.page_title}" 65 parentProductName="${this.productData.name}"
66 productPrice="${t.price}" 67 productMemberPrice="${this.memberPriceList.find(e=>e.product_id===t.id)?.price}" 68 quantity="1" 69 delivery="${this.getDelivery(t.cfs)}" 70 date="${this.getDate(t.cfs.Product_Start_Date_C,t.cfs.Product_End_Date_C)}" 71 place="${this.getPlace(t.cfs)}"> 72 Add to Cart 73 </a> 74 </div> 75 <div class="d-flex"> 76 <div class="cart-full" class="mt-3" style="display:none;"> 77 <div class="error_msg">Sorry, you can't add this item to the cart.</div> 78 <div class="error_msg">You have reached the maximum allowed quantity for purchase in your cart or the item isn't available anymore.</div> 79 </div> 80 </div> 81 `},registerButton(e,t){var o,i;return"none"!=e.inventory_tracking&&e.inventory_level<=0?` 82 <a class="waw-btn disabled" tabindex="0"> 83 Unavailable 84 </a> 85 <a href="https://qa.worldatwork.org/contact-us" tabindex="0" class="waiting"> 86 To be placed on the waiting list or inquire about other sessions or products, please contact our Customer Experience Team. 87 </a> 88 `:"webinar"==this.mainProductType?(o=new URL(window.location.href),(i=this.isSponsoredWebinar(e))||o.searchParams.append("register",!0),!webinar.member_Only__c&&!webinar.affiliate_Only__c||webinar.member_Only__c&&isMember&&hasAccessToMemberBenefits||webinar.affiliate_Only__c&&isLocalNetworkMember?isUserAuthenticated?` 89 <div class="RegisterButton"> 90 <div class="cta"> 91 <a class="register-webinar" tabindex="0" 92 data-click-fn="addToCartfn" 93 data-action="registerWebinar" 94 data-productname="${e.page_title}" 95 data-mainproductid="${this.mainProductId}" 96 data-productid="${e.id}" 97 data-issponsoredwebinar="${i}" 98 productid="${e.id}" 99 aria-label="Register webinar">Register</a> 100 </div> 101 </div>`:` 102 <div class="RegisterButton"> 103 <div class="cta"> 104 <button class="register-webinar" 105 data-click-fn="addToCartfn" 106 data-action="openWebinarLoginAccessDenied" 107 data-mainproductId="${this.mainProductId}" 108 data-href="${o.pathname+o.search}" aria-label="Log in to Register">Register</button> 109 </div> 110 </div>`:` 111 <div class="RegisterButton"> 112 <div class="cta"> 113 <a class="" 114 tabindex="0" 115 href="#memberOnlyAccessDenied" 116 data-click-fn="addToCartfn" 117 data-action="openMemberOnlyWebinarAccessDenied" 118 data-mainproductId="${this.mainProductId}" 119 data-href="${o.pathname+o.search}" 120 >Member Only Access</a> 121 </div> 122 </div>`):` 123 <div class="RegisterButton"> 124 <div class="cta"> 125 <a class="add-to-cart" 126 tabindex="0" 127 data-click-fn="addToCartfn" 128 data-action="addToCart" 129 data-mainproductId="${this.mainProductId}"
130 productId="${e.id}" 131 childrenId="${e.id}" 132 examId="${this.examProduct?.id?this.examProduct.id:""}" 133 variantId="${e.variants[0].id}" 134 productName="${e.page_title}" 135 examProductName="${this.examProduct?.page_title}" 136 delivery="${this.getDelivery(e.cfs)}" 137 date="${this.getDate(e.cfs.Product_Start_Date_C,e.cfs.Product_End_Date_C)}" 138 place="${this.getPlace(e.cfs)}" 139 isCourse="${this.productTypes.addExamBundled??!1}" 140 >${t}</a> 141 </div> 142 </div> 143 <div class="d-flex"> 144 <div class="cart-full" class="mt-3" style="display:none;"> 145 <div class="error_msg">Sorry, you can't add this item to the cart.</div> 146 <div class="error_msg">You have reached the maximum allowed quantity for purchase in your cart or the item isn't available anymore.</div> 147 </div> 148 </div> 149 `},openMemberOnlyWebinarAccessDenied(e){openMemberOnlyAccessDenied(null,e)},openWebinarLoginAccessDenied(e){openLoginAccessDenied(null,e,!0)},registerWebinar(e,t,o){registerWebinar(e,t,this.isWebinarConsented,o)},getNonMemberPrice(t){if("courses"!=this.mainProductType&&"webinar"!=this.mainProductType&&"event"!=this.mainProductType)return o=0,o=this.nonMemberPriceList.find(e=>e.product_id===this.productData.id)?.price||0,(t?this.nonMemberPriceList.find(e=>e.product_id===t.id)?.price||0||0:o).localizeCurrency();var o=0,o=this.nonMemberPriceList.find(e=>e.product_id===t.id)?.price||0;if(!this.examProduct)return o.localizeCurrency();var i;if(i=this.nonMemberPriceList.find(e=>e.product_id===this.examProduct.id)?.price){let e=o?o+i:i;return(e="CBT Exam"===t.cfs.Delivery?o:e).localizeCurrency()}return""},getMemberPrice(t){if("courses"!=this.mainProductType&&"webinar"!=this.mainProductType&&"event"!=this.mainProductType)return o=0,o=this.memberPriceList.find(e=>e.product_id===this.productData.id)?.price||0,(t?this.memberPriceList.find(e=>e.product_id===t.id)?.price||0||0:o).localizeCurrency();var o=0,o=this.memberPriceList.find(e=>e.product_id===t.id)?.price||0;if(!this.examProduct)return o.localizeCurrency();var i;if(i=this.memberPriceList.find(e=>e.product_id===this.examProduct.id)?.price){let e=o?o+i:i;return(e="CBT Exam"===t.cfs.Delivery?o:e).localizeCurrency()}return""},async renderApp(){return new Promise(o=>{this.getCategories().then(e=>{this.getProductInfoBC(this.mainProductId,!0,this.isPilot).then(async e=>{if(null!=e&&null!=e.data){this.productData=e.data;let t={};if(this.productData.custom_fields.forEach(e=>{t[e.name]=e.value}),this.productData.cfs=t,1!=this.productData.order_quantity_maximum&&(this.showQuantity=!0),this.productTypes.isCourse=this.productData.categories.some(e=>window.certificationIds.includes(e)),this.productTypes.addExamBundled=this.productData.categories.some(e=>e===window.curriculumCategoryId),e?.childProducts?.data)e.childProducts.data.forEach(e=>{let t={};e.custom_fields.forEach(e=>{t[e.name]=e.value}),e.cfs=t;var o=!0;if("courses"==this.mainProductType&&("Virtual Course"===e.cfs.Delivery||"Class"===e.cfs.Delivery||"1000 - Onsite Course"===e.cfs.Delivery_Channel_C||"classroom"===e.cfs.Delivery_Channel_C||"1310 - Virtual Classroom"===e.cfs.Delivery_Channel_C||"virtual"===e.cfs.Delivery_Channel_C))try{var i;(""==(i=e.cfs.Course_Type_C?.trim())||"WorldatWork"!=i&&"WorldatWork India"!=i)&&(o=!1)}catch(e){}window.isCertificationCourse?this.restrictTabs?(this.dummyTypesList.includes("Virtual Course")&&(this.productTypes.hasVirtualClassRoom=!0),this.dummyTypesList.includes("E-Learning")&&(this.productTypes.hasELearning=!0),this.dummyTypesList.includes("Exam")&&(this.productTypes.hasExam=!0),this.restrictTabs&&!this.dummyTypesList.includes("Class")||(this.productTypes.hasClassroom=!0)):(this.productTypes.hasVirtualClassRoom=!0,this.productTypes.hasELearning=!0,this.productTypes.hasExam=!0,this.productTypes.hasClassroom=!0):"Virtual Course"!==e.cfs.Delivery||this.restrictTabs&&!this.dummyTypesList.includes("Virtual Course")?"E-Learning"!==e.cfs.Delivery||this.restrictTabs&&!this.dummyTypesList.includes("E-Learning")?"CBT Exam"!==e.cfs.Delivery||this.restrictTabs&&!this.dummyTypesList.includes("Exam")?"Class"!==e.cfs.Delivery||this.restrictTabs&&!this.dummyTypesList.includes("Class")||(this.productTypes.hasClassroom=!0):this.productTypes.hasExam=!0:this.productTypes.hasELearning=!0:this.productTypes.hasVirtualClassRoom=!0,"CBT Exam"===e.cfs.Delivery&&(this.examProduct=e),"1350 - Other Self Study"!==e.cfs.Delivery_Channel_C||this.restrictTabs&&!this.dummyTypesList.includes("1350 - Other Self Study")||(this.productTypes.hasPracticeExam=!0),this.isPilot&&"Class"===e.cfs.Delivery&&(this.productTypes.hasClassroom=!0),o&&this.childProducts.push(e)}),this.productTypes.hasVirtualClassRoom||this.productTypes.hasELearning||this.productTypes.hasExam||this.productTypes.hasClassroom||this.productTypes.hasPracticeExam||(this.productTypes.hasVirtualClassRoom=!0);else{let t={};
149e.data.custom_fields.forEach(e=>{t[e.name]=e.value}),e.data.cfs=t,"1350 - Other Self Study"!==e.data.cfs.Delivery_Channel_C||this.restrictTabs&&!this.dummyTypesList.includes("1350 - Other Self Study")||(window.practiceExamSKUs?.includes(e.data.sku)?this.productTypes.hasPracticeExam=!0:this.productTypes.hasExam=!0)}Promise.allSettled([this.priceListRequest(this.childProducts),this.nonMemberPriceListRequest(this.childProducts)]).then(e=>{this.renderProducts().then(e=>{o(!0)})}),this.includeExam?this.inputExamProductId&&this.getProductInfoBC(this.inputExamProductId,!1,this.isPilot).then(e=>{this.examProduct=e.data}):this.examProduct=null}})})})},async renderProducts(e){return e&&(this.filterPivot=e.target.dataset.filtertype),new Promise(e=>{if(this.isLoading=!0,this.displayProducts=[],"courses"==this.mainProductType||"webinar"==this.mainProductType||"event"==this.mainProductType||"bundle"==this.mainProductType){this.productTypes.isCourse||0<this.productData.options?.length?(this.displayProducts=this.filterProducts(),this.setupFilters(this.displayProducts)):this.displayProducts.push(this.productData),this.displayProducts=this.displayProducts.sort((e,t)=>this.getNADate(e.cfs.Product_Start_Date_C)-this.getNADate(t.cfs.Product_Start_Date_C));let o=!1,i=1==this.displayProducts.length||this.displayProducts.every(e=>"WorldatWork India"==e.cfs.Course_Type_C?.trim());this.displayProducts.forEach((e,t)=>{o||!i&&"WorldatWork India"==e.cfs.Course_Type_C?.trim()||(this.memberPriceHtml=this.getMemberPrice(e),this.nonMemberPriceHtml=this.getNonMemberPrice(e),this.buyButtonHtml=this.addToCartButton(e),o=!0);e=e.cfs.Customer_contact_url_C?.trim()??"";e&&isValidUrl(e)})}else 0<this.childProducts.length?this.displayProducts=this.childProducts:this.displayProducts.push(this.productData),this.displayProducts.sort((e,t)=>e.type>t.type?-1:t.type>e.type?1:0),this.chosenProductId=this.chosenProductId??this.displayProducts[0].id,this.chosenProduct=this.displayProducts.find(e=>e.id==this.chosenProductId),"Book"===this.chosenProduct.cfs.Delivery?"physical"===this.chosenProduct.type?this.chosenProduct.delivery=1<this.displayProducts.length?"Hardcopy & Download":"Hardcopy only":"digital"===this.chosenProduct.type&&(this.chosenProduct.delivery="Download only"):this.chosenProduct.delivery="Download only",this.chosenProduct.disabled="none"!=this.chosenProduct.inventory_tracking&&this.chosenProduct.inventory_level<=0,this.memberPriceHtml=this.getMemberPrice(this.chosenProduct),this.nonMemberPriceHtml=this.getNonMemberPrice(this.chosenProduct);try{(1<this.displayProducts.length||"courses"==this.mainProductType&&""!=this.bundleMainProductId)&&Ecommerce.productList({id:this.productData.id,name:this.productData.name,sku:this.productData.sku,description:this.productData.description,price:this.productData.price,category:window.allCategories.filter(e=>this.productData.categories.includes(e.id))[0].name,listName:this.productData.name,listId:this.mainProductId}),this.displayProducts.forEach(t=>{t.is_visible&&"available"===t.availability&&Ecommerce.productDetail({id:t.id,name:t.name,sku:t.sku,description:t.description,price:t.price,category:window.allCategories.filter(e=>t.categories.includes(e.id))[0].name,listName:this.productData.name,listId:this.mainProductId})})}catch(e){}"undefined"!=typeof feather&&feather.replace(),e(!(this.isLoading=!1))})},filterProductsByKeyValue(e,t,i){let a=this.childProducts;if(e&&null!=e&&0<e.length&&(a=e),t&&""!=t){let o={};return o[t]=i,a.filter(e=>{if(e.is_visible&&"available"===e.availability)return e.custom_fields.filter(e=>{if(void 0!==o[e.name]&&null!=o[e.name]&&0<e.value.trim().length&&0<o[e.name].length&&o[e.name].includes(e.value))return!0;if("Product_Start_Date_C"===e.name){var t=this.getFilterMonth(e.value);if(o[e.name]===t)return!0}return!1}).length===Object.entries(o).filter(([,e])=>0<e.length).length})}return a},filterProducts(){this.setupProductSupersetWithFilters();let o={};o.Country_C=this.selectedCountry??"",o.Product_Start_Date_C=this.selectedMonth??"",o.State_C=this.selectedState??"",o.Delivery_Channel_C=this.selectedTab??"",this.filtersApplied=""!=o.Country_C||""!=o.Product_Start_Date_C||""!=o.State_C;var e,t=this.getTabName(o.Delivery_Channel_C);
149return t&&((e=new URL(window.location)).searchParams.set("tab",t),e.searchParams.delete("id"),window.history.replaceState({},"",e)),""==o.Country_C&&""==o.Product_Start_Date_C&&""==o.State_C&&""==o.Delivery_Channel_C?this.childProducts:this.childProducts.filter(e=>{if(e.is_visible&&"available"===e.availability)return e.custom_fields.filter(e=>{if(void 0!==o[e.name]&&null!=o[e.name]&&0<e.value.trim().length&&0<o[e.name].length&&o[e.name].includes(e.value))return!0;if("Product_Start_Date_C"===e.name){var t=this.getFilterMonth(e.value);if(o[e.name]===t)return!0}return!1}).length===Object.entries(o).filter(([,e])=>0<e.length).length})},changeQuantity(e,t){"increase"==t?0<e.order_quantity_maximum&&!(this.chosenProductQuantity<e.order_quantity_maximum)||this.chosenProductQuantity++:1<this.chosenProductQuantity&&(!(0<e.order_quantity_minimum)||this.chosenProductQuantity>e.order_quantity_minimum)&&this.chosenProductQuantity--},setFilterSetForProduct(e,o){e.custom_fields.forEach(e=>{var t;"Product_Start_Date_C"===e.name&&0<(t=e.value.trim()).length&&(t=this.getFilterMonth(t),(o?this.MonthsSuperset:this.Months).push(t)),"Country_C"===e.name&&0<(t=e.value.trim()).length&&(o?this.CountriesSuperset:this.Countries).push(t),"State_C"===e.name&&0<(t=e.value.trim()).length&&(o?this.StatesSuperset:this.States).push(t)})},getFilterValueByPivot(){return"Product_Start_Date_C"==this.filterPivot?this.selectedMonth:"Country_C"==this.filterPivot?this.selectedCountry:"State_C"==this.filterPivot?this.selectedState:void 0},setupFilters(e){this.Months=[],this.Countries=[],this.States=[],e.forEach(e=>{this.setFilterSetForProduct(e,!1)}),this.Months=sortArrayWithArray([...new Set(this.Months)],this.AllMonths),this.States=[...new Set(this.States)].sort(),this.Countries=[...new Set(this.Countries)].sort(),this.setupProductSupersetWithFilters()},setupProductSupersetWithFilters(){var e=this.filterProductsByKeyValue(null,"Delivery_Channel_C",this.selectedTab);this.MonthsSuperset=[],this.StatesSuperset=[],this.CountriesSuperset=[],e.forEach(e=>{this.setFilterSetForProduct(e,!0)}),this.MonthsSuperset=sortArrayWithArray([...new Set(this.MonthsSuperset)],this.AllMonths).filter(e=>null!=e&&""!=e.trim()),this.StatesSuperset=[...new Set(this.StatesSuperset)].sort().filter(e=>null!=e&&""!=e.trim()),this.CountriesSuperset=[...new Set(this.CountriesSuperset)].sort().filter(e=>null!=e&&""!=e.trim()),this.filtersAvailable=0!=this.MonthsSuperset.length||0!=this.StatesSuperset.length||0!=this.CountriesSuperset.length},clearFilters(){this.selectedCountry="",this.selectedMonth="",this.selectedState=""},resetFilters(){this.clearFilters(),this.renderProducts()},copyLinkToClipboard(e){var t=$("<input>");$("body").append(t),t.val(e.currentTarget.attributes["data-link"].value).select(),document.execCommand("copy"),t.remove(),$(e.currentTarget.parentElement).prepend("<div class='copy-success hide'>Link copied to clipboard.</div>"),$(e.currentTarget.parentElement).find(".copy-success").fadeIn(500),window.setTimeout(function(e){$(e.target).parent().find(".copy-success").fadeOut(500,"swing",function(){$(this).remove()})},4e3,e)},changeDonationAmount(e){var t=e.target.attributes["data-predefined-denomination"]?.value;t?this.chosenProductQuantity=Number(t):e.target.value&&"0"!=e.target.value&&(this.chosenProductQuantity=Number(e.target.value.replace(/[^0-9\.]+/g,""))),$(".predefinedDenomination").removeClass("selected"),e.target.classList.add("selected"),$(".predefinedDenomination[data-predefined-denomination="+(""!=this.chosenProductQuantity?this.chosenProductQuantity:0)+"]").addClass("selected")},changeUpsellQuantity(e){var t=e.target.attributes["data-productId"]?.value;let o=e.target.value;updateUpsellQuantityDOM(t,o),getGroupedUpsellProductIds(t).forEach(e=>{updateUpsellQuantityDOM(e,o)})},canShowBCProducts(){return null==this.hideBCProducts||0==this.hideBCProducts.includes(this.selectedTab)},digitsOnly(e){var t=e.charCode||e.keyCode;return!(t<48||57<t)||(e.preventDefault(),!1)}},computed:{},watch:{},created(){void 0!==window.scrollToElement&&""!=window.scrollToElement&&scrollOnPagination(window.scrollToElement),this.renderApp().then(e=>{var t;this.selectedTab=this.getInitialTab(),"undefined"!=typeof feather&&feather.replace(),void 0!==window.selectedCourseTab&&""!=window.selectedCourseTab&&this.isTabAvailable(window.selectedCourseTab)&&(this.selectedTab=this.getBCTabName(window.selectedCourseTab)),this.renderProducts(),window.setTimeout(function(){void 0!==window.isProductHighlighted&&!window.isProductHighlighted&&0<$("#product-"+selectedProductId).length&&(scrollOnPagination("product-"+window.selectedProductId),$("#product-"+window.selectedProductId).addClass("highlight-course"),window.isProductHighlighted=!0)},500),window.redirectToCheckout&&window.isDonationProduct&&this.isUserLoggedIn&&(t=$("#"+this.domId+"_"+this.mainProductId).find(".add-to-cart")[0].attributes,addToCartMountedApp["id_"+this.mainProductId].openAddtoCartPopup(t,this.mainProductId).then(e=>{this.setCookieandRedirectToCartForDonationProduct(e)}))})},mounted(){},filters:{}}),t=(mainProductIds.push(e.productId),productsMountedApp["id_"+e.productId]=t.mount("#"+e.id+"_"+e.productId),"dynamicAddToCart_"+e.productId);$("#dynamicAddToCart").clone().prop({id:t}).insertAfter("#dynamicAddToCart"),addToCartMountedApp["id_"+e.productId]=addToCartApp(e).mount("#"+t)}function upsellProductContainersSetup(e){var t=Vue.createApp({data(){return{bundleMainProductId:e.bundleMainProductId,bundleMainElementId:e.bundleMainElementId,bundleAloneButtonText:"",mainAndBundleButtonText:"",currentSelectedProducts:e.currentSelectedProducts,bundlesCount:e.currentSelectedProducts.length,mainAndBundlesCount:e.currentSelectedProducts.length+1,isAddonsSoldSeparately:e.isAddonsSoldSeparately,showButtonMessage:!1}},methods:{changeBundle(t,e){this.currentSelectedProducts=this.currentSelectedProducts.filter(e=>e!=t),e&&this.currentSelectedProducts.push(t),this.bundlesCount=this.currentSelectedProducts.length,this.mainAndBundlesCount=this.bundlesCount+1,1<this.bundlesCount?this.bundleAloneButtonText="Add selected items to Cart":this.bundleAloneButtonText="Add selected item to Cart",2<this.mainAndBundlesCount?this.mainAndBundleButtonText="Add selected items to Cart":this.mainAndBundleButtonText="Add selected item to Cart",this.isAddonsSoldSeparately&&0==this.bundlesCount||this.mainAndBundlesCount<=1?this.showButtonMessage=!0:this.showButtonMessage=!1},async addMainToCart(e){var t=$("#"+this.bundleMainElementId+"_"+this.bundleMainProductId).find(".add-to-cart")[0].attributes;await addToCartMountedApp["id_"+this.bundleMainProductId].openAddtoCartPopup(t,this.bundleMainProductId),productsAddedToCart=[]},async addBundleAloneToCart(e){let t=[];var o=this.currentSelectedProducts[0];await addToCartMountedApp["id_"+o].openAddtoCartPopup($("#upsellCollectionProduct_"+o).find(".add-to-cart")[0].attributes,o),1<this.currentSelectedProducts.length&&this.currentSelectedProducts.filter(e=>
149e!=o).forEach(async function(e){t.push(addToCartMountedApp["id_"+e].openAddtoCartPopup($("#upsellCollectionProduct_"+e).find(".add-to-cart")[0].attributes,e))}),Promise.all(t).then(async e=>{await addToCartCommonApp.showAddToCart(!0)})},async addMainAndBundlesToCart(e){let t=[];var o=$("#"+this.bundleMainElementId+"_"+this.bundleMainProductId).find(".add-to-cart")[0].attributes,i=document.createAttribute("data-hidePopup");i.value="true",o.setNamedItem(i),await addToCartMountedApp["id_"+this.bundleMainProductId].openAddtoCartPopup(o,this.bundleMainProductId),this.currentSelectedProducts.forEach(async function(e){t.push(addToCartMountedApp["id_"+e].openAddtoCartPopup($("#upsellCollectionProduct_"+e).find(".add-to-cart")[0].attributes,e))}),Promise.all(t).then(async e=>{await addToCartCommonApp.showAddToCart(!0)}),o.removeNamedItem("data-hidePopup")}},watch:{currentSelectedProducts:{handler(e,t){},immediate:!0}},created(){this.bundleAloneButtonText="",this.mainAndBundleButtonText=""}});upsellProductContainersMountedApp["id_"+e.bundleMainProductId]=t.mount("#"+e.id+"_"+e.bundleMainProductId)}function registerWebinar(e,t,o,i){t&&null==o?$(".webinar-consent-validation-msg").text("Please select 'Yes' or 'No' to continue."):($(".loading-overflow-add-cart").show(),$.ajax({url:"/webinar/registration",method:"POST",headers:{RequestVerificationToken:$('input:hidden[name="__RequestVerificationToken"]').val()},data:{webinarId:e,isWebinarConsented:o},success:function(e){e.status?onAfterWebinarRegistration(!0,"on demand"==e.type.toLowerCase(),e.isSpotMeWebinar):onAfterWebinarRegistration(!1,!1,!1,e.isDuplicatePurchase,i)},error:e=>{onAfterWebinarRegistration(!1,!1,!1)}}))}function isSponsoredWebinar(e){return!isNullOrWhitespace(webinar.pbL_TYPE)&&sponsoredPblTypes.includes(webinar.pbL_TYPE.trim().toLowerCase())}function onAfterWebinarRegistration(e,t,o,i,a){$(".loading-overflow-add-cart").hide();var n="/webinars";try{""!=document.referrer&&null!=document.referrer&&window.location.host==new URL(document.referrer).host&&(n=document.referrer)}catch{}e?($("#webinar-registration-modal .modal-title").text("Webinar Registration Successful!"),t?o?$("#webinar-registration-modal .reg-message").html("Thank you for registering the On-demand Webinar. Details and access information will be sent to your email shortly."):$("#webinar-registration-modal .reg-message").html("Thank you for registering for the On-demand Webinar. You can access the webinar from your <a tabindex='0' href='/profile#webinar'>Profile Page</a>."):$("#webinar-registration-modal .reg-message").text("Thank you for registering for our upcoming webinar! We're excited to have you join us. Details and access information will be sent to your email shortly. Get ready for an insightful session!"),$("#webinar-registration-modal .close-btn button, #webinar-registration-modal .btn-close-popup").attr("data-href",n)):(i?($("#webinar-registration-modal .modal-title").html(`You have already registered for "${a}".`),$("#webinar-registration-modal .reg-message").html("You can access it from the <a tabindex='0' href='/profile#webinar'>Profile Page</a>. If you have any questions please contact the <a class='text-break' href='mailto:[email protected]'>Customer Experience Team</a>.")):($("#webinar-registration-modal .modal-title").text("Unable to Complete Your Webinar Registration"),$("#webinar-registration-modal .reg-message").text("Something went wrong with your registration. Please try again later. Apologies for any inconvenience. Thank you for your understanding.")),$("#webinar-registration-modal .close-btn a").attr("data-bs-dismiss","modal")),new bootstrap.Modal(document.getElementById("webinar-registration-modal")).show()}function onCloseWebinarRegPopup(e){bootstrap.Modal.getInstance(document.getElementById("webinar-registration-modal")).hide(),e.currentTarget.dataset.href&&($(".loading-overflow-add-cart").show(),window.location.href=e.currentTarget.dataset.href)}function showDuplicateProductPurchasePopup(e,t){var o;$("body").append(` 150 <div class="modal fade duplicate-product-purchase waw-popup-modal popup-modal" id="duplicate-product-purchase" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="DuplicateProductPurchaseLabel" aria-hidden="true"> 151 <div class="modal-dialog modal-dialog-centered"> 152 <div class="modal-content"> 153 <div class="modal-header"> 154 <button type="button" class="btn btn-close-popup" data-bs-dismiss="modal" aria-label="Close"> 155 <img loading="lazy" src="/img/icons/cross.svg" /> 156 </button> 157 </div> 158 <div class="modal-body"> 159 <img loading="lazy" src="/img/NoResultFound.svg" alt="" /> 160 <div class="desc"> 161 ${t} 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 `),document.getElementById("duplicate-product-purchase")&&(t=document.getElementById("duplicate-product-purchase"),o=new bootstrap.Modal(t),t.addEventListener("hidden.bs.modal",e=>{$("#duplicate-product-purchase").remove()}),o.show())}function showParentDependencyPopup(e){var t,o=window.wawUser&&null!=window.wawUser.id;$("body").append(` 168 <div class="modal fade parent-dependency-modal waw-popup-modal popup-modal" id="parent-dependency-modal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="ParentDependencyLabel" aria-hidden="true"> 169 <div class="modal-dialog modal-dialog-centered"> 170 <div class="modal-content"> 171 <div class="modal-header"> 172 <button type="button" class="btn btn-close-popup" data-bs-dismiss="modal" aria-label="Close"> 173 <img loading="lazy" src="/img/icons/cross.svg" /> 174 </button> 175 </div> 176 <div class="modal-body text-center"> 177 <img loading="lazy" src="/img/NoResultFound.svg" alt="" style="max-width: 120px; margin-bottom: 20px;" /> 178 <h3 class="heading mb-3"> 179 Event Add-on products are only available to Event Attendees. 180 </h3> 181 <div class="desc mb-4"> 182 To purchase this add-on, please add the event product to your cart or log in if you have already purchased. 183 </div> 184 </div> 185 <div class="modal-footer d-flex justify-content-center gap-3 border-0"> 186 <button type="button" class="btn cta-join" data-bs-dismiss="modal" style="min-width: 140px;"> 187 <a class="nav-link" aria-label="I Understand" role="button" tabindex="0"> 188 I Understand 189 </a> 190 </button> 191 192 ${o?"":`<button type="button" class="btn cta" data-action="login-redirect"> 193 <a class="nav-link" aria-label="Log in" role="button" tabindex="0"> 194 Log in 195 </a> 196 </button> `} 197 198 </div> 199 </div> 200 </div> 201 </div> 202 `),document.getElementById("parent-dependency-modal")&&(o=document.getElementById("parent-dependency-modal"),t=new bootstrap.Modal(o),$(o).find('[data-action="login-redirect"]').on("click",function(){t.hide();var e=window.location.pathname+window.location.search;window.location.href="/wawlogin?returnTo="+e}),o.addEventListener("hidden.bs.modal",e=>{$("#parent-dependency-modal").remove()}),t.show())}function addToCartfn(e){e.preventDefault();var t=e.target.closest("[data-action]");if(t){var o=t.dataset.action,i=t.dataset.mainproductid,a=t.dataset.productid;switch(o){case"registerWebinar":var n=JSON.parse(t.dataset.issponsoredwebinar.toLowerCase()),r=t.dataset.productname;productsMountedApp["id_"+i].registerWebinar(a,n,r);break;case"addToCart":productsMountedApp["id_"+i].addToCart(e);break;case"openMemberOnlyWebinarAccessDenied":var s=t.dataset.href;productsMountedApp["id_"+i].openMemberOnlyWebinarAccessDenied(s);break;case"openWebinarLoginAccessDenied":s=t.dataset.href;productsMountedApp["id_"+i].openWebinarLoginAccessDenied(s)}}}
202function getGroupedUpsellProductIds(o){if("undefined"!=typeof productsTobeSetup&&0<productsTobeSetup.length&&productsTobeSetup.some(e=>"conferenceproduct"===e.id?.toLowerCase())&&productsTobeSetup.some(e=>"upsellcollectionproduct"===e.id?.toLowerCase())){var e=(productsMountedApp["id_"+o]?.productData)?.cfs?.Add_on_Product_Grouping__c;if(!e||!Array.isArray(productsTobeSetup))return[];let t=e.split(",");return productsTobeSetup.filter(e=>"upsellCollectionProduct"===e.id&&e.productId!==o).filter(e=>{e=productsMountedApp["id_"+e.productId]?.productData;return e?.sku&&t.includes(e.sku)}).map(e=>e.productId)}return[]}function updateUpsellQuantityDOM(e,t){"10+"==(t=0==t?1:t)?(t=10,$("#upsellCollectionProduct_"+e).find(".quantitySelect").hide(),$("#upsellCollectionProduct_"+e).find(".quantityTextbox").show()):t<10&&($("#upsellCollectionProduct_"+e).find(".quantitySelect").show(),$("#upsellCollectionProduct_"+e).find(".quantityTextbox").hide()),$("#upsellCollectionProduct_"+e).find(".quantitySelect")[0].value=t,$("#upsellCollectionProduct_"+e).find(".quantityTextbox")[0].value=t,$("#upsellCollectionProduct_"+e).find(".add-to-cart")[0].setAttribute("quantity",t)}function changeGroupedAddOnProduct(e,o,i){getGroupedUpsellProductIds(e).forEach(e=>{var t=$('.upsellProductCard[data-productid="'+e+'"]').find(".includeBox .checkbox");o?t.removeClass("selected"):t.addClass("selected"),upsellProductContainersMountedApp["id_"+i]?.changeBundle(e,!o)})}window.addParentToStorage=e=>{if(e){let o=[...e.line_items.digital_items,...e.line_items.custom_items,...e.line_items.physical_items],i=[];o.forEach(t=>{var e=o.find(e=>e.id===t.parent_id);e&&i.push(e)}),localStorage.setItem("parentThatHaveExam",JSON.stringify(i)),i.length<=0&&localStorage.removeItem("parentThatHaveExam")}else localStorage.removeItem("parentThatHaveExam")},window.addExamInCart=(t,e)=>{var o=localStorage.getItem("examsInCart")?JSON.parse(localStorage.getItem("examsInCart")):[];let i=[];e.options[0]?.option_values.forEach(e=>{e?.value_data?.product_id&&i.push(e?.value_data?.product_id)});
202e={id:t.id,removeIds:i};o.some(e=>e.id===t.id)||(o.push(e),localStorage.setItem("examsInCart",JSON.stringify(o)))},window.getCartId=()=>{let t=0<localStorage.getItem("bcCartId")?.length?localStorage.getItem("bcCartId"):"";return void 0!==t&&0<!t?.length&&mainProductIds.forEach(e=>{e=addToCartMountedApp["id_"+e].cartId;0<e.length&&(t=e)}),t};let membershipExpiredApp=Vue.createApp({data(){return{wawUser:window.wawUser}},methods:{openPopup(){$("#membership_expired_popup").modal("show"),localStorage.setItem("MembershipRenewalAlertShown",(new Date).getTime())},closePopup(){$("#membership_expired_popup").modal("hide")},getHourDiff(e){return Math.abs((new Date).getTime()-e)/36e5},setDontShowAgain(){$.ajax({url:window.location.origin+"/profile/dont-show-membership-expiry-alert",type:"POST",dataType:"json",data:{personId:this.wawUser.personId}}),this.closePopup()}},computed:{},created(){var e=localStorage.getItem("MembershipRenewalAlertShown"),e=null===e||24<=this.getHourDiff(e);!window.suppressPopups&&e&&this.wawUser.isMembershipOnGracePeriod&&this.wawUser.shouldShowMembershipExpiredAlert&&setTimeout(()=>{this.openPopup()},5e3)}});var membershipExpiredMountedApp=membershipExpiredApp.mount("#membership_expired_popup");let ActivityType={None:0,Login:1,Logout:2,StartImpersonation:3,StopImpersonation:4,PageVisit:5,ProductPurchase:6,MembershipOnboardingCompleted:7,MembershipActivationSuccess:8};function sendActivityLog(e){if(window.activityLogSettings?.enabled){var t={activityTypeId:e,personId:safeValue(wawUserPersonId),uuid:getOrCreateSessionUuid(),url:window.location.href,referrerUrl:getExternalReferrer(),statusCode:safeValue(window.wawStatusCode),isMobileApp:!0===window.isMobileAppRequest};switch(e){case ActivityType.StopImpersonation:t.impersonatedUser=safeValue(window.impersonatedUser);break;case ActivityType.ProductPurchase:t.orderId=safeValue(window.orderDetails?.orderID);break;case ActivityType.PageVisit:window.activityLogPageMeta&&(t.pageMeta=window.activityLogPageMeta)}try{$.ajax({url:"/api/activitylog/add",method:"POST",headers:{"X-WaW-Log-Token":$("#WaWLogToken").val()},contentType:"application/json",data:JSON.stringify(t),error:function(e,t,o){500===e.status||400===e.status?console.error("Server error:",e.responseText):console.warn("Activity log send failed:",t,o)}})}catch(e){console.warn("Activity logging failed",e)}}}function getExternalReferrer(){try{var e,t,o,i,a=document.referrer;return a?(e=new URL(a).hostname,t=window.location.hostname,i=(o=$("#AppConfig_AppPaths_IDPURL").val())?new URL(o).hostname:null,e!==t&&e!==i?a:null):null}catch(e){return null}}function safeValue(e){return null==e||""===e?null:e}function getOrCreateSessionUuid(){try{var e,t="waw_uuid",o=window.activityLogSettings?.uuidCookieExpirySeconds,i=cookieMap().get(t);return i?(setWawUuidCookie(t,i,o),i):(setWawUuidCookie(t,e=window.crypto?.randomUUID?.(),o),e)}catch{return null}}function setWawUuidCookie(e,t,o){var i="localhost"===location.hostname;let a=`${e}=${encodeURIComponent(t)}; path=/; max-age=${o}; SameSite=Lax`;i||(a+="; domain=worldatwork.org"),document.cookie=a}function logPageVisit(){if(!window.__skipActivityLog&&!window.__activityLogSent){window.__activityLogSent=!0;var t=Number(window.activityLogSettings?.pageVisitTimeoutMs||0),o=()=>sendActivityLog(ActivityType.PageVisit);if(0<t){let e=setTimeout(o,t);window.addEventListener("beforeunload",()=>clearTimeout(e))}else o()}}window.addEventListener("load",()=>{logPageVisit()}); 203//# sourceMappingURL=site.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.