"+n+"<\/div>");i=r.find("h2");t.DontSetH2AsTitle||i.length===1&&(t.setTitle(i.text(),t._Title.Buttons,t._Title.Image,t.IsClosable),i.remove());t.Components$ViewComponent$html(r.html());t.setInfoButtonData(u)},dispose:function(n){if(!this._isDisposed){var t=this.$container.find("form");t.each(function(){WP.Validators&&delete WP.Validators.Forms[this.id]});this.Components$ViewComponent$dispose(n)}},cleanResponse:function(n){var t=dangerou$.parseHtml(n);return t.find("#main").html()},getInfoButtonData:function(n){var t=8,f=0,i=0,r=[],u,e,o,s;do t=n.indexOf('type="text/javascript">var info = WP.Controls.InfoButton',f),f=n.indexOf("<\/script>",t),t!==-1&&(u=n.indexOf("HTMLUnencode",t),e=n.substring(t+82,u-4),o=n.indexOf('"), "popupparentdiv',t),s=n.substring(u+14,o),r[i]={},r[i].id=e,r[i].info=s,i=i+1);while(t!==-1);return r},setInfoButtonData:function(n){var t=0;if(n!==null&&n.length!==null){for(t=0;t
0)for(n=0;n
")+28;return t>27&&(n=n.substring(t,n.indexOf("
",t))),n},$$WPUtil.ComponentFactory.vb6Mode("","widgetName=staticNews",n)};$$WPUtil.ComponentFactory.HomePage.alerts=function(n){return n=n||{},n.Class=n.Class||"",n.Class+=" Alerts",n.SupportAnimations=n.SupportAnimations!==!1,n.copy=n.copy||function(n){return n.Html=n.Html||this.$content.get(0).innerHTML,$$WPUtil.ComponentFactory.HomePage.alerts(n)},n.Components$VB6Component$html=$$WPComp.VB6Component.prototype.html,n.html=n.html||function(n){var t=this,i,r,u;t.Components$VB6Component$html(n);t.$content.find("#alertspanel-autowaitlist").length>0||t.$content.find("#alertspanel-expiredautowaitlist").length>0?$$WPUtil.ComponentFactory.HomePage.AutoWaitList(0,null):t.$content.find("a").length===0&&t.$container.addClass("noinfo");i=t.$content.find("[data-alertid='alertspanel-notificationreview']");i.length>0&&(r=JSON.parse($(i[0]).html()),$$WPUtil.guaranteeExistence($$WP,"Preferences.NotificationsReviewAlertComponent"),u=new $$WP.Preferences.NotificationsReviewAlertComponent(r),$$WPUtil.ComponentFactory.HomePage.ShowNotificationAlertAsPopup(u),t.$content.find("#alerts div").length===1&&t.hide())},$$WPUtil.ComponentFactory.vb6Mode("","widgetName=alerts",n)};$$WPUtil.ComponentFactory.HomePage.ShowNotificationAlertAsPopup=function(n){var t=new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideNearTop,Components:n,IsClosable:!n.Data.emailRequired,TitleText:null,Size:$$WPContain.Popup.SizeEnum.MEDIUM,Class:"notificationreview",BackButtonText:$$WP.Strings.get("AskLaterExitPopup","notifications.notificationalert")});n.show();t.show(!0);$$WP.FormValidation.initializeDOMSubtree($afe.select("#updateform"));setupButtoncheck()};$$WPUtil.guaranteeExistence($$WPUtil,"ComponentFactory.Clinical");$$WPUtil.ComponentFactory.Clinical.goals=function(n){var t="",r,u,i;return n=n||{},n.DontSetH2AsTitle=!0,n.Class=n.Class||t,n.Class+=" goalsvb6",n.SupportAnimations=n.SupportAnimations!==!1,i=n.RegistryID||t,u="section=1&widgetMode=1®istryid="+i,r=i===t?"goalsreview":"mycondition",n.Components$VB6Component$html=$$WPComp.VB6Component.prototype.html,n.html=n.html||function(i){var e="showing_clicked_goal_details",u="Clinical.Goals",r=this,o,s,h,c,l,a,v=0,f,y,p,w,b,k,d;r.Components$VB6Component$html(i);s=$$WP.Strings.getForTemplate("graphlabel",u);h=$$WP.Strings.getForTemplate("tablelabel",u);c=new $$WPComp.ComplexObjects.Button(s,t,"graphButton selected","graph");l=new $$WPComp.ComplexObjects.Button(h,t,"tableButton","table");a=[c,l];y=new $$WPComp.ComplexObjects.ButtonBar(t,t,"goaltitle",t,t);w=new $$WPComp.ComplexObjects.ButtonBar(t,t,"goalrecentvalue",t,t);k=new $$WPComp.ComplexObjects.ButtonBar(t,t,"goalbuttonlist",$$WPUtil.copyObject(a),$$WPComp.TITLEBARIDENTIFIER);p=$afe.renderTemplate($$WP.Templates.Core.ButtonBar,y);b=$afe.renderTemplate($$WP.Templates.Core.ButtonBar,w);d=$afe.renderTemplate($$WP.Templates.Core.ButtonBar,k);r.$content.safePrepend(d);r.$content.safePrepend(b);r.$content.safePrepend(p);f=$$WP.SimpleTemplates.Anchor({href:"//www.cnctarh.com/mychart/MyChart/bundles/#","class":"focusanchor",name:"goalmaintop",title:$$WP.Strings.get(e,u)});$$WP.Strings.setDisplayText(f,e,u);r.$content.safePrepend(f);loadGraphs();v=n._selectedIndex||0;o=$afe.select(".goalslarge .goalslist").find("[data-index='"+v+"']").safeAttr("id");n._showSelectedGoalGraph(o)},n._componentClick=function(t){return n._switchTableGraph(t),!1},$$WPUtil.ComponentFactory.vb6Mode(r,u,n)};$$WPUtil.ComponentFactory.Clinical.TestResultDetails=function(n){n=n||{};n.DontSetH2AsTitle=!0;n.Class=n.Class||"";n.SupportAnimations=n.SupportAnimations!==!1;var t,i=n.RegistryID||"";return n.Components$VB6Component$html=$$WPComp.VB6Component.prototype.html,n.Components$VB6Component$cleanResponse=$$WPComp.VB6Component.prototype.cleanResponse,n.cleanResponse=function(n){var u;n=this.Components$VB6Component$cleanResponse(n);var t=dangerou$.parseHtml(n),r=t.filter(".title"),f=t.filter(".cptLink"),i=t.filter(".tabcontainer");return i.removeClass("tabcontainer"),r.find("div#assistiveicons").remove(),i.find(".navparent").remove(),u=$afe.jq(document.createElement("div")).safeAppend(r).safeAppend(f).safeAppend(i),u.html()},$$WPUtil.ComponentFactory.vb6Mode("labdetail",t,n)};$$WPComp.TemplateComponent=function(n){this.Components$Component(n)};$$WPComp.TemplateComponent.prototype={Url:makeLink(""),Data:{},template:function(){console.error("Descendents of TemplateComponent must implement the template property (or pass it in the settings bag).")},setData:function(n){n=n||{};n.ComponentNumber=this.ComponentNumber;this.Data=n;this.refresh()},refresh:function(){var n=this,t=Array.isArray(n.Data)?{dataElement:n.Data}:n.Data;try{n.html(n.template(t).trim())}catch(i){throw"Failed to execute the template for component"+n.ComponentNumber;}},copy:function(n){return n=n||{},n.Data=this.Data,this.Components$Component$copy(n)},show:function(){var n=this;n._shownOnce||n._isDisposed||n.setData(n.Data);n.Components$Component$show()},load:function(n,t,i,r){return this.makeRequest({success:this.setData,dataType:"json",data:r,type:"POST",url:n||this.Url},i||"load",t)}};$$WPComp.TemplateComponent.extend("Components.Component");$$WPComp.InlineLoadingComponent=function(n){this.Components$TemplateComponent(n);this.addEventListener("resize",this._resize)};$$WPComp.InlineLoadingComponent.prototype={CommunicationsIndicator:!1,$PermanentParent:null,template:$$WP.Templates.Core.loading,Data:{PrimaryMessage:$$WP.Strings.getForTemplate("GenericLoadingMessage","Global"),ExtraMessage:""},IsClosable:!1,TitleText:null,ToolbarButtons:null,Class:"inlineloading",show:function(n){var t=this;n=t.$PermanentParent||n;t.$container.parent().length===0&&t.$container.safeInsertBefore(n.children(".content"));t.Components$TemplateComponent$show()},_resize:function(){return!1}};$$WPComp.InlineLoadingComponent.extend("Components.TemplateComponent");$$WPComp.InlineLoadingComponentWithSources=function(n){var t=this;t.Components$TemplateComponent(n);t.AreaName!==null&&(t.Url=makeLink("Loading/GetStatus?AreaName="+t.AreaName));t.addEventListener("resize",t._resize);$$WP.CommunityUtilities.hasCommunityLinks()||(t.Url="")};$$WPComp.InlineLoadingComponentWithSources.prototype={CommunicationsIndicator:!1,$PermanentParent:null,Url:makeLink("Loading/GetStatus"),template:$$WP.Templates.Core.loading,IsClosable:!1,TitleText:null,ToolbarButtons:null,Class:"inlineloading withsources",stopGetStatus:!1,AreaName:null,statusIsCount:!1,setData:function(n){n.DataFromMultipleSources=!0;this.Components$TemplateComponent$setData(n);this.success(n)},success:function(n){var s="@MYCHART@TOTALORGS@",h="@MYCHART@LOADEDORGS@",c="CommunityLoadingStatus",t=this,r,o,l,u,f,e,i;if($$WP.Strings.setDefaultNamespace("community.externaljump"),r=0,u="",$$WP.CommunityUtilities.hasCommunityLinks()){if(n&&n.Organizations&&n.Organizations.length>0&&!t.stopGetStatus){for(f=0;f
0){if(i=o.find("> .content"),$$WP.Utilities.isBrowserCapableOf("touchEvents")&&i.css(u)==="none"){n.closest(s).css(r,"");n.css(r,"100vh");return}f=$afe.select("body").hasClass("scrollDisabled")&&i.css(u)!=="none"?$$WPUtil.cssValueToPixels(i.css(u)):i.height();typeof f=="undefined"||isDataTile()||(t=f-h-5)}t<150&&(t=150);n.css(r,t+"px");n.closest(s).css(r,t+"px")}},showBrowserUnSupportedMessage:function(){var u="UnSupportedBtnText",f=".browsersupport",n="community.externaljump",t="UnSupportedMessage",i,r;i=$$WP.SimpleTemplates.Div({id:t},null);$$WP.Strings.setDisplayText(i,t,n);this.$content.find(f).safeAppend(i);r=$$WP.SimpleTemplates.Anchor({href:"//www.cnctarh.com/mychart/MyChart/bundles/#","data-id":"unsupportedbrowserlink","class":"button completeworkflow autowidth",title:$$WP.Strings.get(u,n),"aria-describedby":t});$$WP.Strings.setDisplayText(r,u,n);this.$content.find(f).safeAppend(r)},failure:function(){this.Data.ErrorMessage=$$WP.Strings.getForTemplate("WidgetErrorMessage");this.refresh()},updateData:function(n){var i="community.externaljump",t=this;n&&n.Organization&&(t.Data.OrganizationLogo=n.Organization.LogoUrl,t.Data.OrganizationName=n.Organization.OrganizationName,$$WP.Strings.setOrganization(n.Organization,i),t.Data.LoadingStatus=$$WP.Strings.getForTemplate("DeepLinkPopupLoadingMessage",i),t.Data.IframeTitle=$$WP.Strings.getForTemplate("IframeTitle",i),$$WP.Strings.clearOrganization(),t.Data.Address=n.Organization.Address,t.Data.Contact=n.Organization.ContactInformation,t.Data.Contact===null&&(t.Data.contactInfoClass="nocontact"))},msgListener:function(n){var t=this,i,r;if(n&&n.originalEvent&&n.originalEvent.data){if(i=JSON.parse(n.originalEvent.data),!i)return;if(i.message==="cookieFlag"&&!i.canSetCookies){t.hideLoadingIndicator();$afe.select("//www.cnctarh.com/mychart/MyChart/bundles/#"+t.ExternalJumpIframeId).remove();t.showBrowserUnSupportedMessage();return}i.externalGUID===$$WP.CommunityUtilities.getExternalJumpGUID()&&t&&(i.message==="closePopup"?(t.ContainerComponent&&t.ContainerComponent._oldDispose(),t&&t._disposeTimeout&&clearTimeout(t._disposeTimeout)):i.message==="isValidContext"?t.ExternalJumpIframe&&t.ExternalJumpIframe.contentWindow&&(r={},r.message="valid",t.ExternalJumpIframe.contentWindow.postMessage(JSON.stringify(r),"*")):i.message==="setActivity"&&$$WPUtil.setActivity())}},_clickEvent:function(n){var i="externalJumpWindow",r="scrollbars=1,resizable=1",t=this;return n?n.dataId==="unsupportedbrowserlink"&&t.ResponseObject!==null&&!$$WPUtil.IsNullOrEmpty(t.ResponseObject.RedirectURL)?(t.ResponseObject.IsSSOPost?(t.NewWindowReference=openWindow("","",r,i,!0),$$WPUtil.postForm(t.ResponseObject.RedirectURL,t.ResponseObject.SSOParams,t.NewWindowReference.name)):(t.ResponseObject.RedirectURL=t.ResponseObject.RedirectURL+"&co=true",t.NewWindowReference=openWindow(t.ResponseObject.RedirectURL,"",r,i,!0)),!1):void 0:!0},_popupDispose:function(){var n=this,t;n&&((n.ExternalJumpIframe&&n.ExternalJumpIframe.contentWindow||n.NewWindowReference!==null&&!n.NewWindowReference.closed)&&(t={},t.message="logout",n.NewWindowReference!==null?n.NewWindowReference.window.postMessage(JSON.stringify(t),"*"):n.ExternalJumpIframe.contentWindow.postMessage(JSON.stringify(t),"*")),n.ContainerComponent.hide(),n._disposeTimeout=setTimeout($.proxy(function(){var n=this;n.NewWindowReference===null||n.NewWindowReference.closed||closeAllWindows("externalJumpWindow");n.ContainerComponent&&n.ContainerComponent._oldDispose()},n),500))},dispose:function(){var n=this;$afe.jq(window).off("message."+n.ComponentNumber,n.windowMsgListener);$afe.jq(window).off("resize orientationchange","",$.proxy(n._resizeIframe,n));n.ResponseObject!==null&&n.RefreshCommunityTokenOnClose&&$$WP.CommunityUtilities.refreshCommunityLink(n.ResponseObject.Organization.OrganizationId);n.runCallback(n.callback);n.Components$Component$dispose()},runCallback:function(n){n&&this.context&&typeof n=="function"&&n.apply(this.context)}};$$WPComp.ExternalJumpPopupComponent.extend("Components.TemplateComponent");$$WPComp.ConfirmComponent=function(n){var t=this;$$WPComp.applySettings(n,t);typeof t.callback!="function"&&console.error("A callback function is required for Confirm");t.Components$Component({});t.CallbackContext=t.CallbackContext||t;t.addEventListener("click",t._clickToolbar)};$$WPComp.ConfirmComponent.prototype={AffirmButtonIndex:0,_clickToolbar:function(n){var t=this;if(n.dataId)return t.callback.apply(t.CallbackContext,[$$WPComp.TOOLBARIDENTIFIER+t.AffirmButtonIndex===n.dataId]),t.dispose(!0),!1}};$$WPComp.ConfirmComponent.extend("Components.Component");$$WPUtil.guaranteeExistence($$WP,"Containers");$$WPContain=$$WP.Containers;$$WPContain.ContainerComponent=function(n){var t=this;t._Components=[];t.Components$Component(n);t.Components&&(Array.isArray(t.Components)?t.addComponent(t.Components):t.setSingleComponent(t.Components),delete t.Components)};$$WPContain.ContainerComponent.prototype={Class:"container",Events:["dispose","resize"],_Components:[],IsClosable:!0,hasComponents:function(){return this._Components&&this._Components.length>0},show:function(n){var t=this,i;if(t._visible!==!0){if($$WP.Debug.UpdateTopMarginForBanners(),n&&t.hasComponents())for(i=0;i
-1;r--)if(i._Components[r].ComponentNumber===u)break;n=i._Components[r];n&&n.ComponentNumber===u&&(t!==!0&&n.dispose(),n.$container.remove(),n.ContainerComponent=null,n.isVisible=n._isVisibleOld,delete n._isVisibleOld,i._Components=i._Components.slice(0,r-1).concat(i._Components.slice(r+1,i._Components.length-1)))},clearComponents:function(n){for(var t=this;t._Components.length;)t.removeComponent(t._Components[t._Components.length-1].ComponentNumber,n);t._Components=[]},setSingleComponent:function(n){if(!$$WPComp.isComponent(n)){console.error("setSingleComponent called with something that isn't a component");return}this.addComponent(n);this.setTitle(n.TitleText,n.TitleButtons,n.TitleImage,n.IsClosable);n.setTitle(null,null,null,!1)},dispose:function(n){var t=this;t._isDisposed||(t.clearComponents(),t.Components$Component$dispose(n),t._ContentGeneratedOnce=!1)},html:function(){console.error("You cannot directly set the HTML of a container.")},copy:function(n,t){var i,r;for(n=n||{},n.Components=n.Components||[],r=this._Components.length,i=0;i
0?o=(r.height()-i.outerHeight())/2-y:(this._IsWindowScrollDisabled=!1,$afe.select("body").removeClass("scrollDisabled"))):(f.y<0&&(f.y=0),o=c+(r.height()-i.outerHeight())/2-f.y);o==undefined&&(o=0);u=Math.max(c+35,o);h=window.frameElement;isDataTile()&&h!=null&&(i.hasClass("small")?(u=$$WPUtil.getDataTileScrollTop(h)+35,a=u+i.outerHeight()-h.scrollHeight,a>0&&(u=u-a)):u=0);s=l+(r.width()-i.outerWidth())/2-f.x;s<0&&(s=0);$afe.select("html").hasClass("mobile")&&r.scrollTop(0);i.css({top:u+"px",left:s+"px",right:s+"px"})},InsideNearTop:function(n,t){var u,s,e,i=n.data,f,o,r,h;typeof i=="number"&&(i=$$WPComp.Instances[i]);e=i.$container;u=$afe.jq(window);s=$$WPContain.Positions.getOffset.apply(i,[t]);f=$afe.select("#header").outerHeight()||null;$afe.select("body").hasClass("scrollDisabled")?(h=$$WPUtil.cssValueToPixels($afe.select("body").css("margin-top")),o=f-h+10+"px"):o=$afe.select("html").hasClass("mobile")?f+10+"px":f+$$WPUtil.getScrollTop()+10+"px";scrollLeft=$$WPUtil.getScrollLeft();window.visualViewport&&Math.round(window.visualViewport.width)!==u.innerWidth()&&(scrollLeft=0);r=scrollLeft+(u.width()-e.outerWidth())/2-s.x;r<0&&(r=0);$afe.select("html").hasClass("mobile")&&u.scrollTop(0);e.css({left:r,top:o,right:r})},getOffset:function(n){var t=this,i,r,u,f;return(!t.origOffset||n)&&(t.$container.css({position:"absolute",top:0,left:0,right:0}),i=t.$container.offset(),r=$afe.select("html").safeAttr("dir")==="rtl",r?(u=$afe.jq(window).width(),f=t.$container.outerWidth(),t.origOffset={x:u-(i.left+f),y:i.top}):t.origOffset={x:i.left,y:i.top}),t.origOffset}};$$WPUtil.guaranteeExistence($$WP,"Popups");$$WPUtil.guaranteeExistence($$WP,"Utilities.UI");$$WPPop=$$WP.Popups;$$WPContain.Popup=function(n){var t=this;$$WPComp.applySettings(n,t);switch(t.Size){case $$WPContain.Popup.SizeEnum.SMALL:t.Class+=" small";break;case $$WPContain.Popup.SizeEnum.MEDIUM:t.Class+=" medium";break;case $$WPContain.Popup.SizeEnum.LARGE:t.Class+=" large"}t.positioningFunction===null&&(t.positioningFunction=$$WPContain.Positions.InsideCentered);t.$parent=$afe.select("#classicPopupRoot");t.$parent=t.$parent&&t.$parent.length>0?t.$parent:$afe.jq(document.body);t._shouldOverrideMobileBack()&&(Array.isArray(t.Components)?t.Components.forEach(function(n){n.IsClosable=!1}):t.Components.IsClosable=!1);t.Containers$ContainerComponent({});t.addEventListener("resize",t._resizePopup);t.addEventListener("click",t._clickPopup);t.addEventListener("keydown",t._keydownPopup);t.addEventListener("fullscreenchange",t._adjustFullscreen);t.GetInvisibleLastFocusAnchor&&t.addEventListener("keyup",t._keyupPopup);$$WP.Utilities.UI.IsMobile&&t.addEventListener("focusout",t._onMobileFocusOut);t.HasBackButton!==!1&&(t.HasBackButton||isDataTile()&&t.IsClosable&&t.Size!=$$WPContain.Popup.SizeEnum.SMALL)&&(t.BackButtonText===""&&(t.BackButtonText=$$WP.Strings.get("PopupBackToPreviousPageButton",t.StringsNamespace)),t.ToolbarButtons===null&&(t.ToolbarButtons=[]),t.ToolbarButtons.push(new $$WPComp.ComplexObjects.Button(t.BackButtonText,null,"secondary neutral previouspage","close",t.BackButtonText)))};$$WPContain.Popup.SizeEnum={SMALL:1,MEDIUM:2,LARGE:3,AUTO:4};$$WPContain.Popup.__zIndex=0;$$WPContain.Popup.prototype={ToolbarButtons:null,HasOverlay:!0,IsClosable:!0,Class:"Popup",positioningFunction:$$WPContain.Positions.InsideCentered,Size:$$WPContain.Popup.SizeEnum.SMALL,_IsWindowScrollDisabled:!1,_ScrollBarPosition:0,_ScrollBarLeft:0,_IsScrollBarDisabledWhenOpened:!1,_InitialBodyMarginTop:0,_InitialBodyMarginLeft:0,$parent:$afe.select("body"),HasBackButton:null,BackButtonText:"",GetLastFocus:null,MonitorAriaLiveContent:!0,OnCloseCallback:null,_MinContentHeight:null,AriaLabelledByID:"",AriaDescribedByID:"",PierceShieldOfJustice:!1,CanResetFocusOnKeydown:!1,GetInvisibleLastFocusAnchor:null,_componentsHaveTitleText:function(){var t=!0,n=this;if(n.TitleText&&n.TitleText.string&&!$$WP.Utilities.IsNullOrEmpty(n.TitleText.string)||n._Title&&n._Title.Text&&!$$WP.Utilities.IsNullOrEmpty(n._Title.Text))return t;for(i=0;i
0&&(t.MonitorAriaLiveContent=!1),t.$container.safeAttr("role","dialog"),t.$container.safeAttr("aria-modal","true"),t._ScrollBarPosition=$$WPUtil.getScrollTop(),t._ScrollBarLeft=$$WPUtil.getScrollLeft(),t._IsScrollBarDisabledWhenOpened=$afe.select(u).hasClass("scrollDisabled"),t._IsScrollBarDisabledWhenOpened&&(t._InitialBodyMarginTop=$afe.select(u).css("margin-top"),t._InitialBodyMarginLeft=$afe.select(u).css("margin-left")),t.setAppropriateScrollBar(),$$WP.Debug.UpdateTopMarginForBanners(),t.HasOverlay)t._overlay.on(!t.IsClosable,t);if(t.Containers$ContainerComponent$show(n),f=$afe.select("#popupCloseAction"),f)f.on("click","",t.ComponentNumber,t._closePopup);t._supportsAriaDescription()&&(t.AriaDescribedByID.length>0?t.$container.safeAttr(h,t.AriaDescribedByID):(r=t.AriaDescriptionComponentNumber>-1?t.AriaDescriptionComponentNumber:t.ComponentNumber,t.AriaDescribedByID="popupdescription"+r,t.$container.safeAttr(h,t.AriaDescribedByID)),t.MonitorAriaLiveContent=!1);t._supportsAriaLabel()&&(t.AriaLabelledByID.length>0?t.$container.safeAttr(s,t.AriaLabelledByID):(r=t.AriaLabelComponentNumber>-1?t.AriaLabelComponentNumber:t.ComponentNumber,t.AriaLabelledByID="popuplabel"+r,t.$container.safeAttr(s,t.AriaLabelledByID)));t.MonitorAriaLiveContent&&(t.$container.safeAttr("aria-live","polite"),t.$container.safeAttr("aria-relevant","additions"));t.setFocus();t.focus();$afe.jq(window).on("resize orientationchange","",t.ComponentNumber,t.__windowResize);if(t._shouldOverrideMobileBack()){c=t._getMobileBackEvents();t.$container.data(o,[]);c.forEach(function(n){this.$container.data(o).push(n)},t);$afe.jq(window).off(e);$afe.jq(window).on(e,"",t.ComponentNumber,t.__mobileBack)}if(t.__otherPopupsExist()&&(t.__setAriaHiddenPreviousPopupContent(i),popupAlert=t._createPopupAlert(),t.$container.safePrepend(popupAlert),t.focus(),popupAlert.setAttribute("tabindex","-1")),t._MinContentHeight=$$WPUtil.cssValueToPixels(t.$content.css("min-height")),t.setAppropriateContentHeight(),isDataTile()&&t.Size!==$$WPContain.Popup.SizeEnum.SMALL)try{window.history.pushState(null,null,location.href);scrollTopOfTheIframe(0,i)}catch(l){$$WP.Debug.log("Cannot add Push state as the parent domain is not accessible")}}},setAppropriateScrollBar:function(){var f="scrollDisabled",t=this,n=$afe.select("body"),i=$afe.jq(window),r=$afe.select("#header"),e,o,c,s;if(e=i.width(),o=i.height(),c=$$WPUtil.cssValueToPixels(n.css("min-width")),s=t.$container.outerHeight()+t.$container.offset().top<=o&&t.$container.outerWidth()<=e,!isDataTile()&&s){var h=$$WPUtil.getScrollTop(),l=$$WPUtil.getScrollLeft(),u=r.hasClass("compact");t._IsWindowScrollDisabled=!0;h>75&&(u||r.hasClass("static")||(r.addClass("compact"),i.trigger("compactHeader"),u=!0));t._IsScrollBarDisabledWhenOpened||(n.css({"margin-top":"-"+h+"px"}),n.css({"margin-left":"-"+l+"px"}),n.addClass(f),$$WP.Utilities.UI.EnforceEpicLogoVisibility(!u))}else t._IsWindowScrollDisabled=!1,n.css({"margin-top":""}),n.css({"margin-left":""}),n.removeClass(f)},setAppropriateContentHeight:function(){var o="> .content",s="undefined",i=this,t,h=$afe.select("#header").outerHeight(),r,u,c,n,f,e;i._IsWindowScrollDisabled?(r=$afe.jq(window).innerHeight(),u=$afe.select(".Popup > .titlebar").outerHeight(),e=$afe.select(".Popup > .toolbar").outerHeight(),t=r-2*h-e-u,c=i.$content.contentHeight(),n=i._MinContentHeight,f=r-h-e-u-10,typeof n!==s&&n>f&&(n=f),typeof n!==s&&n>t&&(t=n),t<150&&(t=150),i.$container.find(o).css({"max-height":t+"px","overflow-y":"auto","min-height":n+"px"})):i.$container.find(o).css({"max-height":"","overflow-y":"visible"})},setFocus:function(){var n=this;try{n.firstFocus=WP.DOM.Search.getNextFocusable(n.$container.get(0))}catch(t){}try{n.lastFocus=n.GetLastFocus!==null?n.GetLastFocus(n.$container.get(0)):WP.DOM.Search.getLastFocusable(n.$container.get(0))}catch(i){}n.isFirstFocus=!1},__focus:function(){var t=this,n;try{n=Array.isArray(t._Components)?t.__findFirstFocusableContent(t._Components,0):WP.DOM.Search.getNextFocusable(t._Components.$content);n||(n=WP.DOM.Search.getNextFocusable(t.$container.get(0)),n.id==="skipToMain"&&(n=WP.DOM.Search.getNextFocusable(n)));t.PierceShieldOfJustice&&n.setAttribute("data-pierce-shield","true");n.focus()}catch(i){}},__windowResize:function(n){var t=$$WPComp.getInstance(n.data);t&&(t._IsWindowScrollDisabled=!1,t.setAppropriateScrollBar(),t.$container.trigger("resize"))},hide:function(n){var u="mobile_back",i=!1,t=this,f,r;if(t._visible!==i){t.__otherPopupsExist()?t.__setAriaHiddenPreviousPopupContent(i):t.__setAriaHidden(i);t.Containers$ContainerComponent$hide(n);t._visible=i;t._IsScrollBarDisabledWhenOpened?$afe.select("body").css({"margin-top":t._InitialBodyMarginTop,"margin-left":t._InitialBodyMarginLeft}):$afe.select("body").css({"margin-top":"","margin-left":""}).removeClass("scrollDisabled");t._IsWindowScrollDisabled=i;t.HasOverlay&&t._overlay.off(!t.IsClosable,t);try{f=isDataTile()&&window.frameElement!=null;t.FocusOnClose.focus({preventScroll:f})}catch(e){}t._ScrollBarPosition&&$$WPUtil.setScrollTop(t._ScrollBarPosition);t._ScrollBarLeft&&$$WPUtil.setScrollLeft(t._ScrollBarLeft);$afe.select(".Popup.component").length===1&&$afe.jq(window).off("resize orientationchange","",t.__windowResize);t._shouldOverrideMobileBack()&&(r=t.$container.data("_cachedWindowEvents"),r&&($afe.jq(window).off(u),r.forEach(function(n){$afe.jq(window).on(u,n.selector,n.data,n.handler)})));typeof t.OnCloseCallback=="function"&&t.OnCloseCallback()}},reposition:function(n){var i="opacity",t=this,r;if(t.$container.parent().length!==0){r=t.$container.css(i);t.$container.css(i,0);try{t.positioningFunction({data:t},n)}catch(u){throw"repositioning error";}t.$container.css(i,r)}},setTitle:function(n,t,i,r){var f="clearlabel",u=this,e;n||t&&t.length!==0||r?u.$container.removeClass("notitle"):(e=!0,t=[new $$WPComp.ComplexObjects.Button($$WP.Strings.getForTemplate("JumpToContent","Core.Popup"),null,f,"jumptocontent")],u.$container.addClass("notitle"));u.Containers$ContainerComponent$setTitle(n,t,i,r);e&&u.$title.addClass(f)},_resizePopup:function(){var n=this;return n.isVisible()?(n.reposition(!0),n.setAppropriateContentHeight(),n.setFocus(),!1):!1},_clickPopup:function(n){return n.dataId===$$WPComp.TITLEBARIDENTIFIER+"jumptocontent"?(this.focus(!0),!1):n.dataId==="focusanchor"?!1:void 0},_adjustFullscreen:function(){$afe.select("body").css("margin-left","-"+this._ScrollBarLeft+"px");this.reposition(!0)},_onMobileFocusOut:function(n){n.relatedTarget||$afe.jq(window).scrollTop(0)},_keydownPopup:function(n){var i=!1,t=this,u,r;if(t.canResetFocusOnKeydown&&t.setFocus(),u=$afe.select(".infoBubbleWrapper.hover").length>0,n.keyCode===27&&t.IsClosable&&!u&&t.dispose(i),n.keyCode===9)return n.target!==t.firstFocus&&n.target!==t.lastFocus?t.isFirstFocus?(r=n.shiftKey?t.lastFocus:t.firstFocus,r&&r.focus(),delete t.isFirstFocus,i):void 0:n.shiftKey&&n.target===t.firstFocus?(t.lastFocus&&t.lastFocus.focus(),t.isFirstFocus&&delete t.isFirstFocus,i):!n.shiftKey&&n.target===t.lastFocus?(t.firstFocus&&t.firstFocus.focus(),t.isFirstFocus&&delete t.isFirstFocus,i):void 0},_keyupPopup:function(n){var t=this,i=t.GetInvisibleLastFocusAnchor(t.$container.get(0));if(i){if(!n.shiftKey&&n.target===i)return i===t.lastFocus?(t.firstFocus&&t.firstFocus.focus(),t.isFirstFocus&&delete t.isFirstFocus):WP.DOM.Search.getNextFocusable(i).focus(),!1;n.shiftKey&&n.target===i&&WP.DOM.Search.getPreviousFocusable(i).focus()}},__mobileBack:function(n){var t=$$WPComp.getInstance(n.data);t&&t.dispose()},_shouldOverrideMobileBack:function(){if(!$$WP.Utilities.UI.IsMobile||this.Size!==$$WPContain.Popup.SizeEnum.MEDIUM&&this.Size!==$$WPContain.Popup.SizeEnum.LARGE||isDataTile())return!1;var n=this._getMobileBackEvents();return n&&n.length>0},_getMobileBackEvents:function(){var n=$._data(window,"events");return n?n.mobile_back:null},_overlay:{on:function(n,t){var r,i;if(i=$afe.select("#classicPopupRoot"),i=i&&i.length>0?i:$afe.select("body"),i=i&&i.length>0?i:$afe.select("#datatile"),$$WPContain.Popup.__zIndex+=3,r=3e3+$$WPContain.Popup.__zIndex,t.$overlay=$afe.renderTemplate($$WP.Templates.Core.overlay,{}),i.safeAppend(t.$overlay),t.$overlay.show(),t.$overlay.css("z-index",r),t.$container.css("z-index",r+1),$$WP.Utilities.UI.PDF&&$$WP.Utilities.UI.PDF.needIframeShim()&&$$WP.Utilities.UI.PDF.pageHasEmbeddedPdf()&&$$WP.Utilities.UI.PDF.hidePdfs(),!n)t.$overlay.on("click","",t.ComponentNumber,t._overlay._overlayClick)},off:function(n,t){var i;n||t.$overlay.off("click","",t._overlay._overlayClick);t.$overlay.remove();i=$afe.select(".lb_overlay:visible").length;$$WP.Utilities.UI.PDF&&$$WP.Utilities.UI.PDF.needIframeShim()&&$$WP.Utilities.UI.PDF.pageHasEmbeddedPdf()&&i==0&&$$WP.Utilities.UI.PDF.showPdfs()},_overlayClick:function(n){var t=$$WPComp.getInstance(n.data);return t&&t.dispose(),$$WPUtil.preventEvent(n)}},__setAriaHidden:function(n){var t=this.__getPageElementsForAria();for(i=0;i
1},__getAllPopups:function(){var n=[],t=[],r=0;for(n=document.querySelectorAll("div[data-component-id]"),i=0;i
=n.length?null:(r=n[t].$content,!r)?this.__findFirstFocusableContent(n,++t):(i=WP.DOM.Search.getNextFocusable(r.get(0)),i===null||i.id==="popupCloseAction"||i.tagName.toUpperCase()==="OBJECT"||!this.$container.get(0).contains(i)?this.__findFirstFocusableContent(n,++t):i)},focus:function(){try{this.FocusOnClose===null&&(this.FocusOnClose=WP.DOM.Search.getFocused(document.body))}catch(n){}try{this.__focus()}catch(t){}},_supportsAriaDescription:function(){var n=this;if(n.SupportsAriaDescription)return!0;for(i=0;i
= 4.0.0"],main:function(r,f,e,o,s,h,c){var a,l;return'
'+((a=e[i].call(f!=n?f:r.nullContext||{},f!=n?f.IsPrevEnabled:f,{name:i,hash:{},fn:r.program(1,s,0,h,c),inverse:r.program(3,s,0,h,c),data:s}))!=n?a:"")+'
'+r.escapeExpression((l=(l=e.Title||(f!=n?f.Title:f))!=n?l:e.helperMissing,typeof l===t?l.call(f!=n?f:r.nullContext||{},{name:"Title",hash:{},data:s}):l))+"<\/th>"+((a=e[i].call(f!=n?f:r.nullContext||{},f!=n?f.IsNextEnabled:f,{name:i,hash:{},fn:r.program(5,s,0,h,c),inverse:r.program(3,s,0,h,c),data:s}))!=n?a:"")+"<\/tr> |
"+((a=e.each.call(f!=n?f:r.nullContext||{},f!=n?f.Days:f,{name:"each",hash:{},fn:r.program(7,s,0,h,c),inverse:r.noop,data:s}))!=n?a:"")+"<\/tr><\/thead>"+r.escapeExpression((e.$$WP$Components$Calendar$getCalendarObject||f&&f.$$WP$Components$Calendar$getCalendarObject||e.helperMissing).call(f!=n?f:r.nullContext||{},f!=n?f.ComponentNumber:f,{name:"$$WP$Components$Calendar$getCalendarObject",hash:{},data:s}))+"<\/table><\/div> "},"1":function(i,r,s,h,c){var a="PrevTitle",v,l;return'
|
<\/th>"},"5":function(i,r,s,h,c){var a="NextTitle",v,l;return' |
|
"+((h=t.lambda(r,r))!=n?h:"")+"<\/th>"},"8":function(){return' aria-hidden="true"'},useData:!0,useDepths:!0})}();$$WPUtil.guaranteeExistence($$WP,"Components");$$WP.Components.Calendar=function(n){var r=!0,h="PrevButton",c="NextButton",l="HoverTextDisabled",a="UI.Calendar",v="HoverText",u="Global.Calendar",y="undefined",t=this,e,o,s,p,f,i;for(typeof $$WP!==y&&typeof $$WP.Strings!==y&&($$WP.Strings.setDefaultNamespace(u),$$WP.Strings.add("CalendarMonthTitleFormat","Jan"),$$WP.Strings.add("CalendarAudibleDate","_STR_AudibleDate_"),$$WP.Strings.add(v,$$WP.Strings.get("SelectTooltip",a)),$$WP.Strings.add(l,$$WP.Strings.get("NotAvailableTooltip",a)),$$WP.Strings.add(c,""),$$WP.Strings.add(h,""),$$WP.Strings.clearDefaultNamespace()),t.onSelect=n.onSelect||function(){},t.TitleText=n.TitleText||"",t.Image=n.Image||"",t.filter=n.filter||function(){return r},t.FromDTE=n.FromDTE,t.ToDTE=n.ToDTE,t.callback=n.callback||function(){},t.SelectedDate=n.SelectedDate,t.HighlightDays=n.HighlightDays||[],t.HasSelectableDays=n.HasSelectableDays===r,t._calendarMouseover=n._calendarMouseover||t._calendarMouseover,t.IsClickEventEnabled=n.IsClickEventEnabled||r,t.IsNextEnabled=n.IsNextEnabled||!1,t.IsPrevEnabled=n.IsPrevEnabled||!1,t.IsAriaHidden=n.IsAriaHidden||!1,f=0;f
0&&(e=new Date(t.HighlightDays[f]),o=e.getMonth()+1,p=e.getDate(),s=e.getFullYear(),t.Dict[o+"/"+p+"/"+s]=r,t.SelectableMonths[o+"/"+s]=r);for(t.Today=$$WP.Utilities.IsNullOrEmpty(t.SelectedDate)?new Date:typeof t.SelectedDate.getYear=="function"?t.SelectedDate:typeof t.SelectedDate.getYear=="string"?new Date(t.SelectedDate):new Date,t.Month=t.Today.getMonth(),t.Year=t.Today.getFullYear(),t.PrevButton=$$WP.Strings.get(h,u),t.NextButton=$$WP.Strings.get(c,u),t.HoverText=$$WP.Strings.get(v,u),t.HoverTextDisabled=$$WP.Strings.get(l,u),i=0;i<7;i++)t.Days[i]='
'+getDayName((i+getFirstDayOfWeek())%7)+"<\/span>"+getDayLetter((i+getFirstDayOfWeek())%7);t.Components$TemplateComponent(n);t.addEventListener("click",t._calendarClick);t.addEventListener("focus",t._calendarFocus)};$$WP.Components.Calendar.prototype={Today:{},Title:"",Image:"",Summary:"",Class:"calendar",filter:"",FromDTE:"",ToDTE:"",Callback:"",SelectedDate:"",HoverText:"",HoverTextDisabled:"",Month:"",Year:"",Days:[],PrevButton:"",NextButton:"",HighlightDays:[],HasSelectableDays:"",Dict:{},SelectableMonths:{},data:{},IsClickEventEnabled:!0,IsNextEnabled:!1,IsPrevEnabled:!1,IsAriaHidden:!1,template:$$WP.Templates.Core.calendar,setData:function(){this.setTitles();this.Components$TemplateComponent$setData(this.Data)},setTitles:function(){var u="CalendarNextPrevMonthHelpText",t="@MYCHART@DATEWITHMONTH@",n=this,f,l,e,o,s,a,h,c,v,i=n.Month,r=n.Year;v=!n.hasSelectableDay(i,r);s=$$WP.I18N.monthTitleFormat(makeDate(r,i+1));$$WP.Strings.setDefaultNamespace("UI.Calendar");$$WP.Strings.addMnemonic(t,$$WP.I18N.monthTitleFormat(makeDate(r,i)));f=$$WP.Strings.get(u);$$WP.Strings.removeMnemonic(t);$$WP.Strings.addMnemonic(t,$$WP.I18N.monthTitleFormat(makeDate(r,i+2)));h=$$WP.Strings.get(u);$$WP.Strings.removeMnemonic(t);$$WP.Strings.clearDefaultNamespace();e=n.IsPrevEnabled;c=n.IsNextEnabled;o=n.IsAriaHidden;n.Data={PrevClass:l,PrevButton:n.PrevButton,IsPrevEnabled:e,Title:s,PrevTitle:f,NextTitle:h,NextClass:a,NextButton:n.NextButton,IsNextEnabled:c,IsAriaHidden:o,Days:n.Days,ComponentNumber:n.ComponentNumber}},reInit:function(n){var t,u,f,e,i,r;if(!!n.HighlightDays)for(r=0;r
0&&(t=new Date(i),u=t.getMonth()+1,e=t.getDate(),f=t.getFullYear(),this.Dict[u+"/"+e+"/"+f]=!0);this.setData();this.refresh()},html:function(n){this.Components$Component$html(n);this.$content.find(".hasevents").safeAttr("data-id","hasevents")},_calendarClick:function(n){this.IsClickEventEnabled&&(n.dataId==="calnext"&&(this.drawNextMonth(),WP.Events.cancelEvent(n),WP.Events.preventDefault(n)),n.dataId==="calprev"&&(this.drawPreviousMonth(),WP.Events.cancelEvent(n),WP.Events.preventDefault(n)))},_calendarFocus:function(n,t){this.$$WP$Components$Calendar$_mouseover(n,t)},_isInCalendar:function(n){for(var t=n,i=0;t&&i<6;t=t.parentNode,i++)if(!!t&&!!t.id&&t.id.toLowerCase()==="calendar")return!0;return!1},setClickFunction:function(n){for(var u=this,h=u.hoverText,c=u.hoverTextDisabled,l=u.clickFunction,s=n.getElementsByTagName("td"),t,i,f=new Date,a=document.all?"hand":"pointer",e=function(n,t){var i="mouseover";WP.Events.addListener(n,"click",l);n.className==="ctrl"?(WP.Events.addListener(n,i,hi()),WP.Events.addListener(n,"mouseout",lo),WP.Events.addListener(n.firstChild,"focus",hi(!0)),WP.Events.addListener(n.firstChild,"blur",lo)):(WP.Events.addListener(n,i,function(){n.firstChild.focus()}),WP.Events.addListener(n.firstChild,"focus",hi()));n.style.cursor=a;t!==!0&&(n.title=h)},r=function(n){n.style.cursor="default";n.title=c},o=0;o
0?r(t):i.indexOf("n")===0?r(t):i.indexOf("wkndn")===0?r(t):i==="ctrln"?r(t):i!=="today"?e(t):u.filter(f.getFullYear(),f.getMonth(),f.getDate())?e(t):r(t))},drawNextMonth:function(){var n=this;n.Month=(n.Month+1)%12;n.Month===0&&n.Year++;n.set()},drawPreviousMonth:function(){var n=this;n.Month=n.Month-1;n.Month<0&&(n.Month+=12);n.Month===11&&n.Year--;n.getCalendarObject();n.set()},hasSelectableDay:function(n,t){var r=1,i=makeDate(t,n+1,r);for(n=i.getMonth();i.getMonth()===n;){if(this.filter(i.getFullYear(),i.getMonth(),r))return!0;i.setDate(++r)}return!1},getCalendarObject:function(){var t=this,a=document.createElement("tbody"),h,f=t.Month,o=t.Year,n,e=new Date,p=e.getDate(),w=e.getMonth(),b=e.getFullYear(),k=WP.DOM.Create.tag,nt=!t.hasSelectableDay(f,o),d=t.IsAriaHidden,g=t,r,i,u,v,y,s,c,l;for(e.setHours(0,0,0,0),v=function(n,t,i){var r=n.getMonth(),u=n.getDate(),f=n.getFullYear(),e=n.getDay();return!$$WP.Utilities.IsNullOrEmpty(i)&&!t&&!!i[r+1+"/"+u+"/"+f]?!0:!1},y=function(n,t,i,r){var e=n.getMonth(),o=n.getDate(),s=n.getFullYear(),u="",c=n.getDay(),h;if($$WP.Utilities.IsNullOrEmpty(i)||t||!i[e+1+"/"+o+"/"+s]||(u=" hasevents"),n
'+i+"<\/span>",t+'
'+r+"<\/span>"}};Handlebars.registerHelper("$$WP$Components$Calendar$getCalendarObject",function(n){return new Handlebars.SafeString($$WP.Components.getInstance(n).getCalendarObject());var t});$$WP.Components.Calendar.extend("Components.TemplateComponent");$$WPUtil.guaranteeExistence($$WP,"Containers");$$WP.Containers.MultiMonthCalendar=function(n){var f=!1,t=this,r,u,e,h,i,o,s,c;for(t.Containers$ContainerComponent(n),t.NumOfMonths=n.NumOfMonths||2,t.Class="multiMonthCalendar",t.Today=new Date,t.Month=t.Today.getMonth(),t.Year=t.Today.getFullYear(),t.IsAriaHidden=n.IsAriaHidden||f,r="SingleCalendar ",r=t.NumOfMonths<2?r+"full":t.NumOfMonths>2?r+"onethird":r+"half",u=t.Month,e=t.Year,h=t.IsAriaHidden,i=0;i
=0))if(e=parseInt(u[0],10),o=parseInt(u[1],10),r>e)t=i;else if(r===e)if(f>o)t=i;else break;else break;return t!==""?t:null},getNextEvent:function(){var n=this,h,c,i,r,t,e,s,o,u,f;for(t=n.Month,i=n.Year,r=!1,o=0;o
=0&&(e=parseInt(f[0],10),s=parseInt(f[1],10),i<=e&&(r=!0,i===e&&(r=t<=s?!0:!1)),r)))return u;return null},moveCalendarMonths:function(n,t){for(var r=this,i=0;i
5&&(r=u.substring(0,4),i=u.substring(5,u.length)),r&&i&&(r=parseInt(r,10),i=parseInt(i,10),i=i-(t.NumOfMonths-1),i<0&&(i+=12,r--),t.Month=i,t.Year=r,t.moveCalendarMonths(i,r)),n.preventDefault(),f=!0):n.target.className.indexOf("calendarBackEventBtn")!==-1&&(u="",n.dataId&&(u=n.dataId.substring(7)),u.length>5&&(r=u.substring(0,4),i=u.substring(5,u.length)),r&&i&&(r=parseInt(r,10),i=parseInt(i,10),t.Month=i,t.Year=r,t.moveCalendarMonths(i,r)),n.preventDefault(),f=!0),f?(t.$container.find("button").first().focus(),!1):void 0},getFormattedMonthID:function(n,t){return t+"_"+n}};$$WP.Containers.MultiMonthCalendar.extend("Containers.ContainerComponent");keyCode={TAB:9,ESC:27,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};DateChooser.prototype.drawCalendar=function(n){var h="keydown",e="cal",o="0px",y="calendar",t=this,i,f,p,s,r,c,w,b,k,d,g,nt,l,u,a,v;if(n=n===undefined?null:n,_removeCalendar(!0),_dateChooser=t,i=document.createElement("div"),w=new Date,i.id=y,i.className=y,i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-labelledby","monthlabel"),t.lastDayOfMonth=new Date(t.year,t.month+1,0),t.lastDateOfMonth=t.lastDayOfMonth.getDate(),l=getFirstDayOfWeek(),u=t.lastDayOfMonth.getDay()-l,t.lastDisplayedDateId=u>=0?t.lastDateOfMonth-u+6:t.lastDateOfMonth-u+7,u=new Date(t.year,t.month,1).getDay()-l,t.firstDisplayedDateId=u>=0?1-u:-u-6,i.appendChild(t.getCalendarObject()),t.setClickFunction(i),c=document.documentElement.className.indexOf("mobile")>=0,t.trigger.offsetParent||(t.trigger=document.getElementById(t.trigger.id)),t.trigger.offsetParent?(i.style.position="absolute",f=getElementPosition(t.trigger),p=f.topElement,p.appendChild(i),$$WPContain.Popup.__zIndex+=3,i.style.zIndex=3e3+$$WPContain.Popup.__zIndex,i.style.left=f.x,i.style.top=f.y,g=$afe.select("html.datatile")[0],d=$afe.jq(t.trigger).parents(".Popup")[0],nt=document.getElementById("main"),s=d||g||nt,b=s.offsetWidth,k=s.offsetHeight,f=getElementPosition(t.trigger,s),i.offsetWidth&&(a=parseInt(i.style.left,10),r=parseInt(f.x,10)+i.offsetWidth-b,r>0&&(i.style.left=r
0&&(i.style.top=r
t.lastDateOfMonth?t.lastDateOfMonth:n,document.getElementById(e+n).firstChild.focus()):t.month===t.today.getMonth()&&t.year===t.today.getFullYear()&&document.getElementById(e+w.getDate())?(document.getElementById(e+t.date).firstChild.focus(),t.focusOn=e+t.date):(document.getElementById(e+t.firstDate).firstChild.focus(),t.focusOn=e+t.firstDate),WP.Events.addListener(document.getElementById("calprev"),h,keyOnPrevMonth),WP.Events.addListener(document.getElementById("calnext"),h,keyOnNextMonth),WP.Events.addListener(document.getElementById("calcancel"),h,tabOnCancel),accessibilityHidePage(),t.firstDate="",t.lastDate="",c)$afe.jq(i).on("touchmove",function(n){$$WP.Utilities.Mobile.Optimization.IgnoreTouchMove(n,!0)})};DateChooser.prototype.clearCalendar=function(){var n=this;_removeCalendar();n.callback();n.trigger.className=n.trigger.className.replace(" hidden","");n.trigger.focus()};DateChooser.prototype.setClickFunction=function(n){for(var e=this.clickFunction,u=n.getElementsByTagName("td"),i,t,h=new Date,o=document.all?"hand":"pointer",f=function(n){var t="mouseover";WP.Events.addListener(n,"click",e);n.className==="ctrl"?(WP.Events.addListener(n,t,hi()),WP.Events.addListener(n,"mouseout",lo),WP.Events.addListener(n.firstChild,"focus",hi(!0)),WP.Events.addListener(n.firstChild,"blur",lo)):(WP.Events.addListener(n,t,function(){n.firstChild.focus()}),WP.Events.addListener(n.firstChild,"focus",hi()));n.style.cursor=o},s=function(n){n.style.cursor="default"},r=0;r
=0||t.indexOf("n")===0||t.indexOf("ctrln")>=0?s(i):f(i));WP.Events.addListener(n,"keydown",HandleKeyDown);WP.Events.addListener(n,"keyup",HandleKeyUp)};DateChooser.prototype.isDateDisplayed=function(n){return n>=this.firstDisplayedDateId&&n<=this.lastDisplayedDateId};DateChooser.prototype.drawNextMonth=function(n){var i=this,t;n=n===undefined?null:n;i.clearCalendar();i.month=(i.month+1)%12;i.month===0&&i.year++;i.drawCalendar(n);n||(t=document.getElementById("calnext"),t!==null&&(t=t.firstChild,t&&t.nodeName.toUpperCase()==="BUTTON"&&(t.focus(),lo({target:document.getElementById(_dateChooser.focusOn),srcElement:document.getElementById(_dateChooser.focusOn)}))))};DateChooser.prototype.drawPreviousMonth=function(n){var t=this,i;n=n===undefined?null:n;t.clearCalendar();t.month=t.month-1;t.month<0&&(t.month+=12);t.month===11&&t.year--;t.drawCalendar(n);n||(i=document.getElementById("calprev").firstChild,i&&i.nodeName.toUpperCase()==="BUTTON"&&(i.focus(),lo({target:document.getElementById(_dateChooser.focusOn),srcElement:document.getElementById(_dateChooser.focusOn)})))};DateChooser.prototype.getCalendarObject=function(){var ct="tabindex",nt="default",p="true",tt="aria-disabled",a="aria-label",c="button",v="ctrl",l="td",w="tr",n="",y="UI.Calendar",s=this,b=document.createElement("table"),it=document.createElement("thead"),rt=document.createElement("tbody"),r,i,t,e=s.month,o=s.year,lt=s.filter,k,h,u,ut=new Date,at=ut.getDate(),vt=ut.getMonth(),yt=ut.getFullYear(),f=WP.DOM.Create.tag,d=$$WP.Strings.get("PrevButtonOverride",y),ft=$$WP.Strings.get("PrevButtonTooltip",y),g=$$WP.Strings.get("NextButtonOverride",y),et=$$WP.Strings.get("NextButtonTooltip",y),pt=$$WP.Strings.get("CancelButton",y);for(d===n&&(d="«"),g===n&&(g="»"),h=!hasSelectableDay(e,o),r=document.createElement(w),hasSelectableDay(e-1,o)||h?(i=f(l,v+(hasSelectableDay(e-1,o)||h?n:"n"),"calprev",ft),t=f(c,n,n,n,d),i.appendChild(t),t.setAttribute(a,ft)):(i=f(l,v+(hasSelectableDay(e-1,o)||h?n:"n"),"calprev",$$WP.I18N.monthTitleFormat(makeDate(o,e)),n),t=f(c,n,n,n,d),t.setAttribute(tt,p),t.setAttribute(a,ft),t.style.cursor=nt,i.appendChild(t)),r.appendChild(i),r.appendChild(f("th","hdr calmonth","monthlabel",n,$$WP.I18N.monthTitleFormat(makeDate(o,e+1)))),r.lastChild.colSpan=5,hasSelectableDay(e+1,o)||h?(i=f(l,v+(hasSelectableDay(e+1,o)||h?n:"n"),"calnext",et),t=f(c,n,n,n,g),i.appendChild(t),t.setAttribute(a,et)):(i=f(l,v+(hasSelectableDay(e+1,o)||h?n:"n"),"calnext",$$WP.I18N.monthTitleFormat(makeDate(o,e+2)),n),t=f(c,n,n,n,g),t.setAttribute(a,et),t.setAttribute(tt,p),t.style.cursor=nt,i.appendChild(t)),r.appendChild(i),it.appendChild(r),r=document.createElement(w),k=0;k<7;k++)i=f("th","hdr",n,n,getDayLetter((k+getFirstDayOfWeek())%7)),$afe.jq(i).safeAttr("aria-hidden",p),r.appendChild(i);it.appendChild(r);b.appendChild(it);for(var ot,wt=function(t,i){var u=t.getMonth(),f=t.getDate(),e=t.getFullYear(),o=t.getDay(),r,s;return r=o===0||o===6,s=u===vt&&f===at&&e===yt,(lt(e,u,f)?r?"wknd":"d":r?"wkndn":"n")+(s?" today":n)+(i?" othermonth":n)},st,ht=s.firstDisplayedDateId,u=new Date(o,e,ht);u.getMonth()!==e+1&&u.getFullYear()<=o;){for(r=document.createElement(w),st=0;st<7;st++)ot=u.getMonth()!==e,i=f(l,wt(u,ot),"cal"+ht),t=f(c,n,n,n,u.getDate()),t.setAttribute(a,$$WP.I18N.getCalendarDateAriaString(u)),s.filter(u.getFullYear(),u.getMonth(),u.getDate())?(t.setAttribute(ct,"0"),ot||(s.firstDate&&s.firstDate!==n||(s.firstDate=u.getDate()),(!s.lastDate||s.lastDate
0,i=i||200,e.hideHintTextFun=function(){var t=$afe.jq(n);t.parent().hasClass(w)||(t.removeClass(p).val(""),WP.Events.removeListener(n,a,e.hideHintTextFun))},e.showHintTextFun=function(){var t=$afe.jq(n);t.parent().hasClass(w)||(t.addClass(p).val("Enter Text Here"),WP.Events.addListener(n,a,e.hideHintTextFun))},u&&(s=WP.Validators.Forms[u],typeof s=="undefined"&&(WP.Validators.Forms[u]=[],s=WP.Validators.Forms[u]),h=s.length),e.isEmpty=WP.Strings.isEmpty,e.scrollPreventer=function(){var t=n.scrollTop,i=n.scrollHeight,r=t+n.height===n.scrollHeight;e.valueChecker();n.scrollTop!==t&&(n.scrollTop=r===o?i:t);typeof f===l&&f()},e.valueChecker=function(){var w="data-invalid",p,l,a,f;$input=$afe.jq(n);$$WP.Utilities.setActivity();p=n.value.length;l={};l[y]=i;p>i?(l["@MYCHART@OVERLIMIT@"]=p-i,f=decodeMnemonics("@MYCHART@OVERLIMIT@ too many characters",l),a=createAlert(f,!1)):(l["@MYCHART@REMAININGCHARACTERS@"]=Math.max(0,i-p)+"",f=e.isEmpty(n.value)&&v?t:" ",a=f.trim().length>0?createAlert(f,o):decodeMnemonics("@MYCHART@REMAININGCHARACTERS@ of @MYCHART@MAXLEN@ characters left",l),removeClassNames(n,c));a.length===0&&(a=" ");WP.Validators.DisplayErrors(a,"",r);u&&(s[h]=f,f.trim().length>0?($input.safeAttr(w,"true"),applyClass(n,"invalid")):($input.removeAttr(w),removeClassNames(n,"invalid")))},e.focusFun=function(){removeClassNames(n,c);WP.Events.removeListener(n,a,e.focusFun)},e.blurFun=function(){var p,w,b,k,d;e.isEmpty(n.value)?(n.value.length===0&&e.showHintTextFun(),v&&(p=o,w={},w[y]=i,b=decodeMnemonics(t,w),k=createAlert(b,o),WP.suppressErrors===o&&applyClass(k,"clearlabel"),WP.Validators.DisplayErrors(k,"",r),u&&(s[h]=b))):n.value.length<=i?(removeClassNames(n,c),WP.Validators.DisplayErrors(" ","",r),u&&(s[h]=" "),typeof f===l&&f()):p=o;p&&WP.suppressErrors!==o&&(applyClass(n,c),WP.Events.addListener(n,a,e.focusFun));e.valueChecker();d=$afe.select("form#"+u);d.length>0&&$$WP.FormValidation.checkIfFormIsValid(d,o)},e.afterCutPaste=function(){window.setTimeout(e.scrollPreventer,1)},WP.Events.addListener(n,"blur",e.blurFun),WP.Events.addListener(n,"keyup",e.scrollPreventer),WP.Events.addListener(n,"paste",e.afterCutPaste),WP.Events.addListener(n,"cut",e.afterCutPaste),WP.Validators.undoRedo(n),WP.suppressErrors=o,e.scrollPreventer(),e.blurFun(),WP.suppressErrors=!1,n.removeMaxLength=function(){WP.Events.removeListener(n,"blur",e.blurFun);WP.Events.removeListener(n,"keyup",e.scrollPreventer);WP.Events.removeListener(n,"cut",e.afterCutPaste);WP.Events.removeListener(n,"paste",e.afterCutPaste);e.hideHintTextFun();e.focusFun();delete e.blurFun;delete e.scrollPreventer;delete e.valueChecker;delete e.isEmpty;delete e.firstAction;delete e.showHintTextFun;delete e.hideHintTextFun;delete e.focusFun;s[h]="";typeof f===l&&f();typeof n.removeUndoRedo===l&&n.removeUndoRedo()})};typeof WP.Validators.undoRedo=="undefined"&&(WP.Validators.undoRedo=function(n){var i=!0,r=!1,t;navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(t={undoStack:[n.value],redoStack:[],isDeleting:r,isInserting:r},t.pop=function(n){if(n.length!==0){var t=n[n.length-1];return n.length-=1,t}},t.addUndoFun=function(r){n.value!=="Enter Text Here"&&(t.undoStack.length===0||n.value!==t.undoStack[t.undoStack.length-1])&&(t.undoStack[t.undoStack.length]=n.value,t.undoStack.length>75&&t.undoStack.shift(),r!==i&&(t.redoStack=[]))},t.onKeyUp=function(u){var f,e=u||window.event;if(e.ctrlKey===r){t.clearNativeUndo();return}if(e.keyCode===90){if(t.undoStack.length===0)return;t.redoStack[t.redoStack.length]=n.value;f=t.pop(t.undoStack);f===n.value&&(f=t.pop(t.undoStack)||"");n.value=f}else if(e.keyCode===89){if(t.redoStack.length===0)return;f=t.pop(t.redoStack);t.addUndoFun(i);n.value=f}},t.onKeyDown=function(n){var u=n||window.event;u.keyCode===8||u.keyCode===46?(t.isDeleting=i,t.isInserting===i&&(t.isInserting=r,t.addUndoFun())):(t.isInserting=i,t.isDeleting===i?(t.isDeleting=r,t.addUndoFun()):u.keyCode===32?(t.isSpacing!==i&&t.addUndoFun(),t.isSpacing=i):(t.isSpacing===i&&t.addUndoFun(),t.isSpacing=r))},t.clearNativeUndo=function(){var n=document.createElement("div");document.body.appendChild(n);document.body.removeChild(n)},WP.Events.addListener(n,"keyup",t.onKeyUp),WP.Events.addListener(n,"paste",t.addUndoFun),WP.Events.addListener(n,"cut",t.addUndoFun),WP.Events.addListener(n,"keydown",t.onKeyDown),n.removeUndoRedo=function(){WP.Events.removeListener(n,"keyup",t.onKeyUp);WP.Events.removeListener(n,"paste",t.addUndoFun);WP.Events.removeListener(n,"cut",t.addUndoFun);WP.Events.removeListener(n,"keydown",t.onKeyDown);try{delete t.addUndoFun;delete t.onKeyDown;delete t.undoStack;delete t.redoStack;delete t.isDeleting;delete t.isInserting;delete t.pop;delete t.clearNativeUndo}catch(i){}},t.addUndoFun())});typeof WP.Validators.Calendar=="undefined"&&(WP.Validators.Calendar={aftertwodays:function(n,t,i){return new Date(n,t,i)-new Date>86399e3},past:function(n,t,i){return new Date(n,t,i)<=new Date},future:function(n,t,i){return new Date(n,t,i+1)>=new Date},range:function(n,t,i){var r,u,f;return u=window.cachedStartDate,f=window.cachedEndDate,r=new Date(n,t,i),u&&r
f?!1:!0},any:function(){return!0}});typeof WP.Validators.Forms=="undefined"&&(WP.Validators.Forms={});WP.Validators.Forms.SelectionRequired=function(n,t,i,r,u,f){var h="alertborder",l="function",o=!0,c,s,a,e={};n&&(typeof n=="string"&&(n=document.getElementById(n)),u=u||null,t=t||"",a=t.length>0,i=i||-1,u&&(s=WP.Validators.Forms[u],typeof s=="undefined"&&(WP.Validators.Forms[u]=[],s=WP.Validators.Forms[u]),c=s.length),e.scrollPreventer=function(){var t=n.scrollTop,i=n.scrollHeight,r=t+n.height===n.scrollHeight;e.blurFun();n.scrollTop!==t&&(n.scrollTop=r===o?i:t);typeof f===l&&f()},e.focusFun=function(){removeClassNames(n,h);WP.Events.removeListener(n,"focus",e.focusFun)},e.blurFun=function(){var p,w,v,y;n.value==i?a&&(p=o,w={},v=decodeMnemonics(t,w),y=createAlert(v,o),WP.suppressErrors===o&&applyClass(y,"clearlabel"),WP.Validators.DisplayErrors(y,"",r),u&&(s[c]=v)):(removeClassNames(n,h),WP.Validators.DisplayErrors("","",r),u&&(s[c]=" "),typeof f===l&&f());p&&WP.suppressErrors!==o&&(applyClass(n,h),WP.Events.addListener(n,"focus",e.focusFun))},WP.Events.addListener(n,"blur",e.blurFun),WP.Events.addListener(n,"change",e.blurFun),WP.Events.addListener(n,"keyup",e.scrollPreventer),WP.suppressErrors=o,e.scrollPreventer(),e.blurFun(),WP.suppressErrors=!1)};$$WPContain.HTMLTemplateContainer=function(n){n=n||{};n.$parent&&n.$parent.length>0&&(n.Html=n.$parent.html(),n.$parent.empty());this.Containers$Panel(n)};$$WPContain.HTMLTemplateContainer.prototype={SupportedComponents:[],ComponentProperties:{SupportAnimations:!0},ContainerProperties:{SupportAnimations:!0},Class:"HPtemplate",html:function(n){var i=this,t,r;i.clearComponents();i.Components$Component$html(n);i.show(!1);t=i;t.$content.find("[data-component]").each(function(){var i,u,f,n,c,s,h,e,o;if(i=$afe.jq(this),u=i.safeAttr("data-component"),s=i.safeAttr("data-component-settings"),$.inArray(u,t.SupportedComponents)>=0||t.SupportedComponents.length===0){if(n=$$WPUtil.copyObject(t.ComponentProperties),n.$container=n.$container||i,u==="campaigns"){r=function(){new $$WP.CampaignOutreach.CampaignsController(n.$container).render()}.bind(this);return}if(s)for(n.TemplateSettings={},h=s.split("&"),o=0;o
|