function padNumber(n,t){var i=getDecimalSeparator();return n>0?(n=n.toString().replace(/\./,i),Array(t-n.length+1).join("0")+n):(n=(-n).toString().replace(/\./,i),"-"+Array(t-n.length).join("0")+n)}function padNumber2(n,t){return n==0?Array(t+1).join("0"):padNumber(n,t)}function escapeRegExp(n){return n.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function getDecimalSeparator(){var n;return n=$$WP.Strings.get("NumericDecimalFormatterOverride","I18N.Numbers"),n&&n.length>0?n:$$WP.I18N.DecimalSeparator}function getGroupSeparator(){var n;return n=$$WP.Strings.get("NumericGroupSeparatorOverride","I18N.Numbers"),n&&n.length>0?n:$$WP.I18N.GroupSeparator}function getRangeSeparator(){var n;return n=$$WP.Strings.get("NumericRangeSeparatorOverride","I18N.Numbers"),n&&n.length>0?n:$$WP.I18N.RangeSeparator}function IsNumericMinMax(n,t,i,r,u){var o=!0,a="Core.CommonUtils",h=!1,f,s,e,v,y,c,l,p,w;return n==null?h:((u===null||u==="")&&(u=h),e=n.value,v=getGroupSeparator(),y=getDecimalSeparator(),c=getErrorForScreenReader(),l=c+$$WP.Strings.get("NumericError",a),p=new RegExp(escapeRegExp(v),"g"),w=new RegExp(escapeRegExp(y),"g"),e=="")?o:e.indexOf(v)!=-1&&e.indexOf(y)<0?(WP.Validators.DisplayErrors(l),h):(e=e.replace(p,""),f=e.replace(w,"."),f=Number(f),isNaN(f)?(WP.Validators.DisplayErrors(l),s=o):r||f==Math.round(f)?t!=""&&f<Number(t)?(WP.Validators.DisplayErrors(c+$$WP.Strings.get("MinimumNumericError",a).replace("@MYCHART@MINVALUE@",t)),s=o):i!=""&&f>Number(i)&&(WP.Validators.DisplayErrors(c+$$WP.Strings.get("MaximumNumericError",a).replace("@MYCHART@MAXVALUE@",i)),s=o):(WP.Validators.DisplayErrors(l),s=o),s&&!u)?h:(n.value=e,o)}function IsNumericOrRangeMinMax(n,t,i,r,u){var l="@MYCHART@MAXVALUE@",a="@MYCHART@MINVALUE@",y="@MYCHART@RANGESEPARATOR@",s=!0,d="Core.CommonUtils",p=!1,f,e,h,o,w,g,nt,c,b,k,rt,v,tt,it;if(n===null||((u===null||u==="")&&(u=p),$(".Popup").length>0))return p;if(o=n.value,g=getDecimalSeparator(),nt=getGroupSeparator(),c=getRangeSeparator().replace(/\s+/g,""),b=getErrorForScreenReader(),k=new RegExp(escapeRegExp(g),"g"),rt=new RegExp(escapeRegExp(nt),"g"),v=b+$$WP.Strings.get("NumericOrRangeError",d),tt=b+$$WP.Strings.get("MinimumNumericError",d),it=b+$$WP.Strings.get("MaximumNumericError",d),o==="")return s;if(o.indexOf(nt)!==-1&&o.indexOf(g)<0)return WP.Validators.DisplayErrors(v.replace(y,c).replace(a,t).replace(l,i)),u||(n.select(),n.focus()),p;if(o=o.replace(rt,""),w=o.indexOf(c),w!==-1){if(f=o.substring(0,w).replace(k,"."),f==="")return WP.Validators.DisplayErrors(v.replace(y,c).replace(a,t).replace(l,i)),u||(n.select(),n.focus()),p;e=o.substring(w+1).replace(k,".")}else f=o.replace(k,".");return(f=Number(f),isNaN(f)?(WP.Validators.DisplayErrors(v.replace(y,c).replace(a,t).replace(l,i)),h=s):(r||(f=Math.round(f)),t!==""&&f<Number(t)?(WP.Validators.DisplayErrors(tt.replace(a,t)),h=s):i!==""&&f>Number(i)&&(WP.Validators.DisplayErrors(it.replace(l,i)),h=s)),e&&!h&&(e=Number(e),isNaN(e)?(WP.Validators.DisplayErrors(v.replace(y,c).replace(a,t).replace(l,i)),h=s):(r||(e=Math.round(e)),t!==""&&e<Number(t)?(WP.Validators.DisplayErrors(tt.replace(a,t)),h=s):i!==""&&e>Number(i)?(WP.Validators.DisplayErrors(it.replace(l,i)),h=s):(f>e||f===e)&&(WP.Validators.DisplayErrors(v.replace(y,c).replace(a,t).replace(l,i)),h=s))),h)?(u||(n.select(),n.focus()),p):(r||(o=w!==-1?f+c+e:f),n.value=o,s)}function autoLogout(n){if($$WPUtil.setActivity.msSinceLastActivity()<checkActivity.sessionTimeout){pre_checkActivity();return}pre_checkActivity.logoutPage=n||pre_checkActivity.logoutPage;var t,i;t=new $$WPComp.LoggingOutComponent;i=new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideCentered,Components:t,TitleText:null,IsClosable:!1,Class:"logout"});i.show(!0)}function IsPatientInActiveVVCallback(n){n==="True"&&($$WPUtil.setActivity(),WP.Comm.startKeepAlive())}function checkActivity(n,t,i,r){var u=!0,e=$afe.jq(window),f,o;if(checkActivity.refreshTimeout=n||checkActivity.refreshTimeout,checkActivity.sessionTimeout=t||checkActivity.sessionTimeout,checkActivity.logoutPage=r||checkActivity.logoutPage,checkActivity.warningPopup=i!==!1&&checkActivity.warningPopup!==!1||i===u,checkActivity.__ranOnce!==u&&(e=$afe.jq(window),e.add(document.body),isDataTile()&&!isShareEverywhere()&&parent.window!==window&&e.add(parent.window),e.focus($$WPUtil.checkActivity),checkActivity.__ranOnce=u),f=$$WPUtil.setActivity.msSinceLastActivity(),f>=checkActivity.sessionTimeout){document.write("");WP.Comm.logOut(null,u,null,u,u);return}window.clearTimeout(checkActivity.tRefreshID);checkActivity.tRefreshID=window.setTimeout(checkActivity,Math.floor((checkActivity.refreshTimeout-f)/1e3));window.clearTimeout(checkActivity.tSessionID);o=Math.floor((checkActivity.sessionTimeout-f)/1e3);checkActivity.tSessionID=window.setTimeout(autoLogout,o);f>checkActivity.refreshTimeout&&$$WPComp.TimeoutWarningComponent.hasVisibleInstance!==u&&$$WPUtil.quickPopup(new $$WPComp.TimeoutWarningComponent({SecondsLeft:o}),{PierceShieldOfJustice:u})}function logOut(n,t,i){var f=!0,r=null,u=!1;return $afe.select("body").hasClass("passthru")?(self.location.href=makeLink("closeExternalJumpPopup.asp"),u):(n!==""&&n!==r&&typeof n!="undefined"?self.location.href=n:typeof checkActivity.logoutPage=="string"&&checkActivity.logoutPage!==""?WP.Comm.logOut(r,f,checkActivity.logoutPage,u,i):getFederatedLogoutMode()||isShareEverywhere()?WP.Comm.logOut(r,f,r,u,i):t===f?WP.Comm.logOut(r,f,r,u,i):WP.Comm.logOut(function(n){$$WPUtil.IsNullOrEmpty(n)||(window.location=makeLink(n))},u,r,u,i),f)}function CheckLength(n,t,i,r){var u,f;return(u=t,r!=""&&r!=null&&r=="1"&&(t=t-1),f=n.value.replace(/\r\n/g,""),f.length>t)?(i==""&&(i=getErrorForScreenReader()+$$WP.Strings.get("MaximumTextError","Core.CommonUtils").replace("@MYCHART@MAXMIMUMLENGTH@",u)),$$WP.Utilities.quickMessageBox(i,"",[],null,[],""),n.focus(),!1):!0}function insideBodyLoad(n,t,i,r){return WP&&WP.Comm&&WP.Comm.startKeepAlive&&WP.Comm.startKeepAlive(),$$WPUtil.setActivity(),WP.Events.addListener(document.body,"click",$$WPUtil.setActivity),WP.Events.addListener(document.body,"keypress",$$WPUtil.setActivity),WP.Events.addListener(document.body,"click",$$WPUtil.NotifyMobileOfActivity),WP.Events.addListener(document.body,"input",$$WPUtil.NotifyMobileOfActivity),checkActivity(n,t,i,r),window.focus(),!0}function assignInlineEventHandlers(){var t=!1,n="click";$afe.select('a#printerfriendlylink:not([href="#"])').on(n,function(){return window.open(this.href.replace(/\#(.*)/,""),"WWW","width=1024,height=720,resizable,status,scrollbars").focus(),t});$afe.select('a#printerfriendlylink[href="#"]').on(n,function(){return $$WPUtil.PrintAndAuditNET(),t});$afe.select("a#printWindowPrintLink").on(n,function(){window.print()});$afe.select("a#printWindowCloseLink").on(n,function(){window.close()});$afe.select("a#sortOrgLink").on(n,function(){return sortOrgList(this),t});$afe.select("a#SelfSignupButton").on(n,function(){return $$WP.Utilities.TryRedirect(this.href),t});$afe.select("a#cookieHelpLink").on(n,function(){return window.open("Help/Cookies"),t});$afe.select("a#completedTaskPrinkLink").on(n,function(){return window.open(HTMLUnencode(this.href),"WWW","width=800,height=600,resizable,status,scrollbars").focus(),t});$afe.select("form#retryform").on("submit",function(){disableButton1(this.refresh)})}function jumpToAnchor(n){var t=window.location.hash.substr(1);if(/^[a-zA-Z][\w-]*$/.test(t)){if(t===""){history.scrollRestoration="auto";return}if(history.scrollRestoration="manual",!doJumpToAnchorAction(t)){n||(n=3e3);var r=function(n,i){doJumpToAnchorAction(t)&&i.disconnect()},i=new MutationObserver(r);i.observe(document.body,{attributes:!0,childList:!0,subtree:!0});setTimeout(function(){i.disconnect()},n)}}}function doJumpToAnchorAction(n){return(n="#"+n,$afe.select(n).filter(":visible").length>0)?(location.replace(n),$afe.select(n).focus(),!0):!1}function getPostLoginStringsManagerContent(n){$afe.select("#vbPrintHeader").empty().safeAppend($afe.renderTemplate($$WP.Templates.Core.vbPrintheader));$afe.select("footer#footer #baselinks").empty().safeAppend($afe.renderTemplate($$WP.Templates.Core.vbBaselinks,n));$afe.select(".cssSwitcher").click(function(n){var t;(n&&n.currentTarget.nodeName==="A"&&(t=n.currentTarget.getAttribute("data-csstitle")),t.length!==0)&&($$WP.Utilities.UI.ActivateStylesheet(t),$$WP.Utilities.UI.FocusCssSwitcher(t))})}function getObjectValue(n){var i,r,t;if(n){if(i=0,i=n.length,t="",i>0)for(r=0;r<i;r++)t=t+n[r].value;else t=n.value;return t}}function doMainKeyPress(n){try{return routeEvent(n)}catch(t){}}function submitForm(n){if(n.form.submitcontrol.value=="submit form")return n.form.submitform.click(),!1}function addFocus(n){return n.form.submitcontrol.value="nosubmit",!0}function taKeyDown(n){n.form.submitcontrol.value="nosubmit"}function recordKey(n){n.submitcontrol.value=window.event.keyCode==13&&n.submitcontrol.value!="nosubmit"?"submit form":""}function containsSpace(n){for(var t=0;t<n.length;++t)if(n.charAt(t)==" ")return!0;return!1}function containsPunctuation(n){for(var i=n.toUpperCase(),r,t=0;t<i.length;++t)if(r=i.charAt(t),"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@._-".indexOf(r)<0)return!0;return!1}function selectCheckBox(n){var t=!0,i;if(n!=null&&(document.all||document.getElementById)){for(i=0;i<n.length;i++)if(n[i].checked==t)return t;return n.checked==t?t:(alert($$WP.Strings.get("CheckBoxSelectionError","Core.CommonUtils")),!1)}return t}function disableButton(n){return submitcount==0?(submitcount++,!0):(n.disabled=!0,!1)}function removeWhiteSpace(n){var t=""+n;return t.replace(/\W/g,"")}function enableIfReqFilled(n,t){if(document.getElementById){var f,i,s,e,c,h,v,r,o,l,u,a;if((f=document.getElementById(n),f)&&(u=t.split("^"),u&&u.length!=0)){for(c=[],e=[],o=0,a=enableIfReqFilled.arguments,i=2;i<a.length;i++)s=a[i].split("^"),h=s[0],v=s[1]||h,r=s[2]||h,l=f[h],l&&!c[r]&&(removeWhiteSpace(l.value).length==0?e[r]||(e[r]=!0,o++):(c[r]=!0,e[r]&&(e[r]=!1,o--)));if(IsFormValid(n)===!1&&o++,o>0)for(i=0;i<u.length;i++)disableBtn(f[u[i]]);else for(i=0;i<u.length;i++)enableBtn(f[u[i]])}}}function IsFormValid(n,t){var i,r;try{if(WP&&WP.Validators&&WP.Validators.Forms&&(r=WP.Validators.Forms[n],r))for(i=0;i<r.length;i++)if(removeWhiteSpace(r[i]).length>0)return t===!0&&alert(r[i]),!1}catch(u){}return!0}function confirmEmbedDelete(n,t,i){var r;return r=i===!0?$$WPUtil.quickMessageBoxByEnum.typeEnum.RestoreGoback:$$WPUtil.quickMessageBoxByEnum.typeEnum.RemoveGoback,$$WPUtil.confirmFormSubmission(n,t,r,function(n,t){if(t===$$WP.Components.TOOLBARIDENTIFIER+"continue"){var i,r;i=document.getElementById("confirmStep");i&&(i=i.parentNode,i&&(r=document.createElement("input"),r.type="hidden",r.className="hidden",r.name="clickSub",r.value="1",i.appendChild(r)))}})}function setCheckboxesByPrefix(n){for(var t=1,i=document.getElementById(n+t);i!==null;)$afe.jq(i).safeAttr("checked","true"),i.checked=!0,t=t+1,i=document.getElementById(n+t)}function unsetCheckboxesByPrefix(n){for(var t=1,i=document.getElementById(n+t);i!==null;)i.removeAttribute("checked"),i.checked=!1,t=t+1,i=document.getElementById(n+t)}function statusOfCheckboxesByPrefix(n){var t,i,r,u;for(r=!0,u=!1,t=1,i=document.getElementById(n+t);i!==null;)i.checked?u=!0:r=!1,t=t+1,i=document.getElementById(n+t);return r?3:u?2:1}function checkAll(n,t){if(typeof document=="object"&&n!=null&&t!=null&&document.getElementById&&typeof document.getElementById(n)=="object")for(var r=document.getElementById(n),i,u=0;i=r[u++];)i.type=="checkbox"&&(i.checked=!0)}function selectRadioButton(n){var t=!0,i;if(document.all||document.getElementById){for(i=0;i<n.length;i++)if(n[i].checked==t)return t;return n.checked==t?t:(alert($$WP.Strings.get("RadioButtonSelectionError","Core.CommonUtils")),!1)}return t}function disableButton1(n){return typeof n=="object"&&(n.disabled=!0),!0}function getParentDocument(){if(!parent)return null;try{return parent.document}catch(n){return null}}function addDataTileUtils(){if(getParentDocument()){var n=window.frameElement;n!=null&&(n.tryRedirect=$$WPUtil.TryRedirect,n.safeToRedirect=$$WPUtil.SafeToRedirect,WP&&WP.Events&&(n.hasUnsavedChanges=WP.Events.showBeforeUnloadMessage))}}function scrollTopOfTheIframe(n,t){getParentDocument()&&window.setTimeout(function(){for(var n,f=window.parent.document.getElementsByTagName("iframe"),i,r,u=0,e=f.length;u<e;u++)if(i=f[u],i.contentWindow==window){n=i.getBoundingClientRect();r=$$WPUtil.getScrollTop();t===!0?n.top<0&&$$WPUtil.setScrollTop(r+n.top):$$WPUtil.setScrollTop(r+n.top);break}},n)}function handleBrowserBack(n){n!==null&&n.target!==null&&$$WP._currentURL!==null&&document.getElementsByClassName("md_mychartquestionnaire_questionnaires").length===0&&$$WP._currentURL===n.target.location.href&&location.reload()}function dataTileLoad(){addDataTileUtils();self===top&&$afe.select("body").addClass("removeOverflow");$$WP._currentURL=window.location.href;try{$afe.select(".cardlist.column_3, .cardlist.column_4").trigger("cardLoad");$afe.jq(window).on("popstate",handleBrowserBack);setupIframeResizer()}catch(n){return}}function setupIframeResizer(){var t,i,r,n;isIframeResizeScheduled=!1;setAppropriateHeight();setAppropriateHeightOnResize();i=document.getElementById("appPopupRoot");i&&setAppropriateHeightOnDOMMutations(i);t=document.getElementById("classicPopupRoot");t&&setAppropriateHeightOnDOMMutations(t);r=document.getElementById("wrap");r&&setAppropriateHeightOnDOMMutations(r);n=function(){isIframeResizeScheduled||(setTimeout(function(){setAppropriateHeight();isIframeResizeScheduled=!1},100),isIframeResizeScheduled=!0)};document.body.addEventListener("animationend",n);document.body.addEventListener("transitionend",n);document.body.addEventListener("load",n,!0)}function setAppropriateHeightOnResize(){var n=getFrameWidth(),t=function(){n==getFrameWidth()||isIframeResizeScheduled||(setTimeout(function(){setAppropriateHeight();n=getFrameWidth();isIframeResizeScheduled=!1},100),isIframeResizeScheduled=!0)};$afe.jq(window).resize(t)}function setAppropriateHeightOnDOMMutations(n){var t=!0,i,r;n&&(i={attributes:t,childList:t,subtree:t},r=function(r,u){isIframeResizeScheduled||(setTimeout(function(){u.disconnect();setAppropriateHeight();u.observe(n,i);isIframeResizeScheduled=!1},100),isIframeResizeScheduled=t)},new MutationObserver(r).observe(n,i))}function isShareEverywhere(){return $afe.select("html").hasClass("shareeverywhere")}function isDataTile(){return $afe.select("html").hasClass("datatile")}function isEmbedded(){return $afe.select("body").hasClass("embedded")}function isBedsideTV(){return $afe.select("html").hasClass("bedsidetv")}function setAppropriateHeight(){var k="pageLoadedBefore",s="height",r="px",h="autoheight",c="body",y=document.getElementById("vdtFrame"),d,t,e,i,n,o,p,g,w,nt,l,tt,b,a,u,v,f;if((isDataTile()&&getParentDocument()||y||$$WP.WidgetMode)&&window.name!=="iframeMEDADVICE_ATTACHMENTS"&&window.name!=="iframeMESSAGELIST_ATTACHMENTS"&&window.name!=="iframeCACHED_UPLOAD_DATA"&&(d=$$WPUtil.getScrollTop(),$$WP.WidgetMode||(t=window.frameElement),!t&&y&&(t=y),$$WP.WidgetMode||t&&document&&document.body&&t.style&&!0)){for(w=getContainerPrevHeight(t),setContainerMinHeight(t,""),$afe.select(c).addClass(h),nt=$afe.select("iframe:not(.hidden)").length>0?document.body.scrollHeight:document.body.offsetHeight,i=nt+r,$afe.select(c).removeClass(h),e=getMinHeightForDatePicker(),p=$afe.select(".Popup.component"),l=0;l<p.length;l++)n=$afe.jq(p[l]),n.hasClass("externaljumppopup")&&n.find("> .content").css("max-height")==="none"&&!n.hasClass("hidden")?(n.css(s,"auto"),g=n.outerHeight(),n.css(s,""),e="80vh",i=g+r):(n.hasClass("large")||n.hasClass("medium"))&&!n.hasClass("hidden")?(n.css(s,"auto"),i=n.outerHeight()+r,n.css(s,""),e=i):e=n.outerHeight()+70+r;if(o=$afe.select("#lightbox:not(.hidden):not(:empty)"),o.length>0&&(o.hasClass("captchaPopup")?(tt=580,i=Math.max(o.outerHeight(),tt)+r):i=o.outerHeight()+r),b=$afe.select("._ShieldOfJustice"),b.length>0&&(a=b.siblings("[role=dialog]"),a.length>0)){for(u=0,v=0;v<a.length;v++)f=a[v],f.classList.contains("size-10")||f.classList.contains("size-20")?u=Math.max(u,parseInt(w),450):(f.classList.add(h),u=Math.max(u,f.scrollHeight),f.classList.remove(h)),repositionReactDataTilesPopup(window.frameElement,f);u>0&&(i=u+r)}setContainerMinHeight(t,e);w!=i&&(setContainerHeight(t,i),$afe.select(c).prop(k)!==!0?(scrollTopOfTheIframe(0,!0),$afe.select(c).prop(k,!0)):$$WPUtil.setScrollTop(d))}}function getMinHeightForDatePicker(){return $calendarButtons=$afe.select(".calendar.datechooserAnchor"),$calendarButtons.length>0?"350px":""}function repositionReactDataTilesPopup(n,t){if(isDataTile()&&n!=null){var i;(t.classList.contains("size-10")||t.classList.contains("size-20"))&&(i=$$WPUtil.getDataTileScrollTop(n)+35,overhang=i+t.clientHeight-n.scrollHeight,overhang>0&&(i=i-overhang),t.style.top=i+"px",t.style.opacity=1)}}function getFrameWidth(){return $$WP.WidgetMode?$$WPUtil.GetIframeWidth().then(function(n){return n}):window.frameElement?window.frameElement.offsetWidth:null}function setContainerHeight(n,t){$$WP.WidgetMode?($$WPUtil.SetCrossDomainIframeHeight(t),$$WP.ContainerHeight=t):n.style.height=t}function setContainerMinHeight(n,t){$$WP.WidgetMode?$$WPUtil.SetCrossDomainIframeMinHeight(t):n.style.minHeight=t}function getContainerPrevHeight(n){return $$WP.WidgetMode?$$WP.ContainerHeight:n.style.height}function DoRedirect(n,t){return t===!0?logOut(null,!0):$$WPUtil.SafeToRedirect(CreateLogOutPopup,n),!1}function CreateLogOutPopup(n){if(n){var t,i;t=new $$WPComp.LoggingOutComponent({positioningFunction:$$WPContain.Positions.InsideNearTop});i=new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideNearTop,Components:t,IsClosable:!1,TitleText:null,Size:$$WPContain.Popup.SizeEnum.SMALL,Class:"logout"});i.show(!0)}}function InlineEndSession(n,t){var i,r=new $$WPComp.InlineLoggingOutComponent({positioningFunction:$$WPContain.Positions.InsideNearTop},function(){t&&t();n&&i.hide()},!1);n&&(i=new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideNearTop,Components:r,IsClosable:!1,TitleText:null,Size:$$WPContain.Popup.SizeEnum.SMALL,Class:"logout"}),i.show(!0));r.logout()}function DoRedirectOE(){return this.document.write("<br /><br /><br /><br /><center>"+$$WP.Strings.get("LogoutRedirect","Core.CommonUtils")+"<\/center>"),window.location="./oebye.asp",!1}function captureBackEnterKey(){var i="textarea",t,n;if($$WPUtil.setActivity(),window.event&&(window.event.keyCode==8||window.event.keyCode==13)){if(t=window.event.srcElement,n=t.type,!t.readOnly){if((n=="text"||n==i||n=="password")&&window.event.keyCode==8)return;if((n==i||n=="submit")&&window.event.keyCode==13)return}return window.event.cancelBubble=!0,window.event.returnValue=!1,!1}}function showItem(n){var t;return(document.getElementById?t=document.getElementById(n):document.all&&(t=document.all.item(n)),t!=null)?(t.style.display="block",!0):!1}function hideItem(n){var t;return(document.getElementById?t=document.getElementById(n):document.all&&(t=document.all.item(n)),t!=null)?(t.style.display="none",!0):!1}function showElement(n,t){if(n!==null||(t!==null&&t.length>0&&(n=document.getElementById(t)),n!==null)){removeClassNames(n,"hidden");return}}function hideElement(n,t){if(n!==null||(t!==null&&t.length>0&&(n=document.getElementById(t)),n!==null)){removeClassNames(n,"hidden");n.className=n.className+" hidden";return}}function activateField(n,t){if(n!==null||(typeof t=="string"&&t.length>0&&(n=document.getElementById(t)),n!==null)){removeClassNames(n,"disabled,activefield");n.className=n.className+" activefield";return}}function activateFieldsByIds(n){var t,i;if(n!==null&&(i=n.split(",")),i!==null)for(t=0;t<i.length;t=t+1)activateField(document.getElementById(i[t]))}function deactivateField(n,t){if(n!==null||(typeof t=="string"&&t.length>0&&(n=document.getElementById(t)),n!==null)){removeClassNames(n,"disabled,activefield");n.className=n.className+" disabled";return}}function deactivateFieldsByIds(n){var t,i;if(n!==null&&(i=n.split(",")),i!==null)for(t=0;t<i.length;t=t+1)deactivateField(document.getElementById(i[t]))}function applyClass(n,t){var r,i;if(n){for(r=t.split(","),i=0;i<r.length;i++)containsClassName(n,r[i])||(n.className+=(n.className.length>0?" ":"")+r[i]);return n}}function removeClassNames(n,t){var u,i,f,r;if(n&&t&&!(n.className.length<1)&&!(t.length<1)){for(u=t.split(","),r=n.className,i=0;i<u.length;i=i+1)f=new RegExp("(^|\\s+)"+u[i]+"(\\s+|$)","g"),r=r.replace(f," ");n.className=r}}function replaceClassNames(n,t,i){removeClassNames(n,t);applyClass(n,i)}function containsClassName(n,t){var i;return!n||typeof t!="string"||t.length<1?!1:typeof n.className!="string"||n.className.length<1?!1:(i=new RegExp("(^|\\s+)"+t+"(\\s+|$)","g"),i?n.className.match(i)!=null:!1)}function applyUniqueClassNameAmongSiblings(n,t){for(var r=n.parentNode,i=0;i<r.children.length;i++)removeClassNames(r.children[i],t);applyClass(n,t)}function selectAllFirstTime(n){return n===null?!1:(containsClassName(n,"clckd")||(n.select(),n.className=n.className+" clckd",n.onblur=function(){return removeClassNames(this,"clckd"),!1}),!1)}function enableBtn(n){n&&n.removeAttribute&&(n.removeAttribute("disabled"),n.className=n.className.replace(/\ ?disabled/,""))}function disableBtn(n){var t="disabled";if(n){if(typeof n=="function")return;n.disabled=t;n.className.indexOf(t)==-1&&(n.className=n.className.replace(/\ *$/,""),n.className.length>0&&(t=" "+t),n.className=n.className+t)}}function getElementPosition(n,t){if(n.offsetParent){for(var i=n,u=0,f=0,r;i;){if(r=i,i.tagName=="HTML")break;if(t&&i==t)break;if(u+=i.offsetLeft,f+=i.offsetTop,i.scrollLeft&&(u-=i.scrollLeft),i.id.toLowerCase()=="wrap"){u-=i.offsetLeft;f-=i.offsetTop;break}i=WP.DOM.Browser.isFirefox&&WP.DOM.Read.getStyle(i,"position")==="fixed"?null:i.offsetParent;!!i&&i.classList.contains("fixedCalendarParent")&&(i=document.getElementById("classicPopupRoot"))}return navigator.userAgent.indexOf("Mac")!=-1&&typeof document.body.leftMargin!="undefined"&&(u+=document.body.leftMargin,f+=document.body.topMargin),u+="px",f+="px",r.tagName=="HTML"&&(r=r.getElementsByTagName("body")[0],r.offsetLeft&&(u-=r.offsetLeft),r.offsetTop&&(f-=r.offsetTop)),{x:u,y:f,topElement:r}}}function changePasswdCheck(n){var t="Core.CommonUtils",i,r,u,f;return n==null?!1:(f=getErrorForScreenReader(),i=n.oldpasswd.value,i=="")?(alert($$WP.Strings.get("CurrentPasswordError",t)),n.oldpasswd.focus(),!1):(r=n.newpasswd.value,u=n.verifypasswd.value,r!=u)?(alert($$WP.Strings.get("ReTypeNewPasswordError",t)),n.verifypasswd.focus(),!1):!0}function changeQuesAnsCheck(n){var t="Core.CommonUtils",i,r,u;return n==null?!1:(u=getErrorForScreenReader(),i=n.oldpasswd.value,i=="")?(alert($$WP.Strings.get("CurrentPasswordError",t)),n.oldpasswd.focus(),!1):(r=n.pwdans.value,r=="")?(alert($$WP.Strings.get("AnswerError",t)),n.pwdans.focus(),!1):!0}function CheckFilenameExtensions(){var n=!0,u=!1,h=document.getElementById("ALLOWED_EXTENSIONS"),f,c,o,t,e,l,y=0,i=u,r=n,s,a,v;if(!h)return n;for(f=h.value,c=new RegExp("^([a-zA-Z]:(\\\\|/)|file://|/|\\\\\\\\)[^\\\\/:].*\\..+");!i;){if(o=document.getElementById("upload"+ ++y),!o){i=n;break}if(t=o.value,t.length!=0){if(navigator.userAgent.indexOf("MSIE")!=-1&&!c.test(t)){r=u;i=n;break}if(e=t.split("."),e.length<2){r=u;i=n;break}if(l=e[e.length-1].toUpperCase(),f.indexOf("^"+l+"^")==-1){r=u;i=n;break}}}return r||(s=document.getElementById("progbar"),s&&(s.className+=" hidden"),a=f.substr(1,f.length-2).replace(/\^/g,", "),v=$$WP.Strings.get("BadFilenameExtension","Core.CommonUtils").replace("@MYCHART@FILENAME@",t).replace("@MYCHART@ALLOWEDEXTENSIONS@",a),alert(v)),r}function checkEnter(n,t){if(n!=null){var i=n.keyCode;if(i=="13")return t!=null&&t.click(),!1}return!0}function isBasicInlineValidationError(n,t,i,r,u,f,e,o,s,h,c){var a=!0,v=null,l=!1,y=l,p=l,w=l,b=l,k=l;return((i==""||i==v)&&(i=getErrorForScreenReader()+$$WP.Strings.get("RequiredFieldError","Global")),(o==""||o==v)&&(o=i),n==v)?l:((c==""||c==v)&&(c=-1),n.maxLength>1e4&&(r=l),r&&c<0&&(c=n.id=="dob"?n.maxLength-2:n.maxLength),n.value==""||n.value==v?(y=a,p=a):r&&n.value.length<c&&n.value.length>0?(y=a,w=a):h&&isNaN(n.value)&&(y=a,b=a),y?u||(p?s?isHighlighted(n)&&changeErrorField(t,i,l,[n]):(turnOnHighlight(n),changeErrorField(t,i,l,[n])):(w||b||k)&&(turnOnHighlight(n),changeErrorField(t,o,l,[n]))):(e||turnOffHighlight(n),f||changeErrorField(t,"",a,[n])),y)}function changeErrorField(n,t,i,r){var h="aria-invalid",o="aria-describedby",f,c,e,u,s;if(n.length>0&&(f=document.getElementById(n))){if(i&&(f.innerHTML==="&nbsp;"||f.innerHTML===""))return;if(dangerou$.setHtml(f,t),r&&r.length>=1)for(c=t==="",e=0;e<r.length;e++)u=$afe.jq(r[e]),s=u.safeAttr(o),c?(u.removeAttr(h),s===n&&u.removeAttr(o)):(u.safeAttr(h,"true"),s||u.safeAttr(o,n))}}function turnOnHighlight(n){n.className.search("inputHighlighted")<0&&(n.className=n.className+" inputHighlighted")}function turnOffHighlight(n){isHighlighted(n)&&(n.className=n.className.replace(" inputHighlighted",""))}function highlightIfEmpty(n,t){var i;n!=null&&(i=n.value,i==""?t||turnOnHighlight(n):turnOffHighlight(n))}function isHighlighted(n){return n==null?!1:n.className.search("inputHighlighted")>-1}function validateEmptinessOfTwoRelatedFields(n,t){n.value.length<1?t.value.length<1?isHighlighted(t)&&turnOnHighlight(n):turnOnHighlight(n):turnOffHighlight(n)}function checkKeyPress(n,t,i){var u=!0,r=!1;switch(t){case ALPHANUMERIC:(n.keyCode>=48&&n.keyCode<=57||n.keyCode>=65&&n.keyCode<=90||n.keyCode>=96&&n.keyCode<=105||n.which>=48&&n.which<=57||n.which>=65&&n.which<=90||n.which>=96&&n.which<=105)&&(r=u);WP.DOM.Browser.isAndroid&&(r=u);break;case EQUAL_TO_CODE:(n.keyCode==i||n.which==i)&&(r=u);break;case GREATER_THAN_CODE:(n.keyCode>i||n.which>i)&&(r=u);break;case LESS_THAN_CODE:(n.keyCode<i||n.which<i)&&(r=u);break;default:return r}return r}function checkIfFocusOnPrevField(n,t,i,r){var u,f;f=r-1;f>0&&checkKeyPress(n,EQUAL_TO_CODE,"8")&&t.value==""&&(u=document.getElementById(i+f),u!=null&&(u.focus(),isTabAllowed=!0,u.value=u.value))}function autotab(n,t,i){checkKeyPress(n,ALPHANUMERIC)?t.getAttribute&&t.value.length==t.getAttribute("maxlength")&&(WP.DOM.Browser.isIPod||WP.DOM.Browser.isIPhone||WP.DOM.Browser.isIPad?(i.focus(),isTabAllowed=!1):(i.focus(),i.select(),isTabAllowed=!1)):checkKeyPress(n,EQUAL_TO_CODE,"16")&&(isTabAllowed=!0)}function isDiscreteFieldsError(n,t,i,r,u,f,e,o,s,h){var v=!0,w=null,l=!1,a,c,k,b=l,nt=l,y=l,d=l,tt=l,p,g=0,it=l;for(p=u,y=o==w,(u==""||u==w)&&(u=$$WP.Strings.get("RequiredFieldError","Global")),f==""&&(f=u),a=1;a<=t;a++)c=document.getElementById(n+a),c!=w&&(c.value!=""?(s&&(s=""),p=f,a=t):isHighlighted(c)&&s&&(s=""));if(y||(isHighlighted(o)&&(tt=v),b=isBasicInlineValidationError(o,r,p,i,e,1,"",p,s,h)),b)d=v;else for(t==w&&(t=1),a=1;a<=t;a++)c=t==1?document.getElementById(n):document.getElementById(n+a),c.maxLength>1e4&&(i=l),i&&(g=c.id=="dob"||c.id=="ssn"?c.maxLength-2:c.maxLength),c!=w&&(c.value==""?(b=v,!e&&y&&(turnOnHighlight(c),changeErrorField(r,p,l,[c]))):i&&c.value.length<g&&c.value.length>0?(b=v,nt=v,!e&&y&&(turnOnHighlight(c),changeErrorField(r,p,l,[c]))):(y&&turnOffHighlight(c),(o==c||y)&&(k=$afe.jq(c),k.removeAttr("aria-invalid"),k.removeAttr("aria-describedby"))),isHighlighted(c)&&(d=v));return b?(d||changeErrorField(r,""),v):(changeErrorField(r,""),l)}function checkIfTabAllowed(n,t){checkKeyPress(n,EQUAL_TO_CODE,"16")?isTabAllowed=!0:checkKeyPress(n,EQUAL_TO_CODE,"9")&&t.value.length<1&&!isTabAllowed&&(cancelEvent(n),isTabAllowed=!0)}function cancelEvent(n){n.cancelBubble=!0;n.returnValue=!1;n.stopPropagation&&(n.stopPropagation(),n.preventDefault())}function easyDOBEntry(n,t,i,r){var u;n!=null&&(t?i?isValidTwoDigitYear(n.value)&&(r?isTabAllowed=!0:n.value=getFourDigitYearFromTwoDigitYear(n.value,BIRTH_YEAR_MIN_YEARS_BACK).toString()):n.value.length==1&&n.value>0&&(r?isTabAllowed=!0:n.value="0"+n.value):(u=n.length,u?(isValidOneDigitDatePart(n[0].value)&&(n[0].value="0"+n[0].value),isValidOneDigitDatePart(n[1].value)&&(n[1].value="0"+n[1].value),isValidTwoDigitYear(n[2].value)&&(n[2].value=getFourDigitYearFromTwoDigitYear(n[2].value,BIRTH_YEAR_MIN_YEARS_BACK).toString())):n.value<100&&n.value>=0&&(n.value=getFourDigitYearFromTwoDigitYear(n.value,BIRTH_YEAR_MIN_YEARS_BACK).toString())))}function removeCharFromField(n,t,i,r){var u;(r==null||r=="")&&(r=REMOVE_IF_EQUAL_TO_REMOVE_CHAR);u=charKeyPressed(n);r==REMOVE_IF_EQUAL_TO_REMOVE_CHAR?!checkKeyPress(n,GREATER_THAN_CODE,"0")||checkKeyPress(n,EQUAL_TO_CODE,"9")||checkKeyPress(n,EQUAL_TO_CODE,"16")||u==i&&cancelEvent(n):r==REMOVE_NONNUMERIC&&(checkKeyPress(n,EQUAL_TO_CODE,"8")||checkKeyPress(n,EQUAL_TO_CODE,"9")||checkKeyPress(n,EQUAL_TO_CODE,"27")||checkKeyPress(n,EQUAL_TO_CODE,"46")||checkKeyPress(n,EQUAL_TO_CODE,"37")||checkKeyPress(n,EQUAL_TO_CODE,"39")||!isNaN(u)||cancelEvent(n))}function charKeyPressed(n){var t;return n||(n=window.event),n.keyCode?t=n.keyCode:n.which&&(t=n.which),t>0?String.fromCharCode(t):""}function ShowPharmacyHours(n,t,i){var r=document.getElementById(t).selectedIndex,u;r!=null&&(u=n+r,r==0?dangerou$.setHtml(document.getElementById(i).innerHTML,"&nbsp;"):dangerou$.setHtml(document.getElementById(i),document.getElementById(u).value))}function clearRadioSelection(n){for(var i=document.getElementsByName(n),t=0;t<i.length;t++)i[t].type=="radio"&&(i[t].checked=!1)}function UpdateAddressOptions(){var u="hidden",t,o,c,l,s,n,f,h,r,a,i,e;if(o=document.getElementById("pharmacy").selectedIndex,o!==null){for(c="pharmacyaddresses"+o,l=document.getElementById(c).value,s=l.split("*"),t=document.getElementsByName("address"),n=0;n<t.length;n++)if((h=t[n].id.indexOf("_"),!(h<0))&&(r=t[n].id.substring(h+1),r.length!=0&&r!=99)&&(a="addresslabel_"+r,i=document.getElementById(a),i)){for(t[n].disabled=!0,applyClass(t[n],u),applyClass(i,u),i.disabled=!0,f=0;f<s.length;f++)if(s[f]==r){e||(e=t[n]);t[n].disabled=!1;removeClassNames(t[n],u);removeClassNames(i,u);i.disabled=!1;break}return""}e&&(e.checked=!0)}}function UpdateDeliveryMethods(n,t,i,r,u){var c=!1,l="comments",a="addressoptions",p="pickupoptions",s=!0,o="hidden",d="deliveryoptions",g,nt,tt,w,b,rt,ut,h,ft,e,v,f,k,it,y;if(g=document.getElementById(t).selectedIndex,g!==null){if(nt=n+g,document.getElementById(nt)===null){f=document.getElementById(d);f&&(applyClass(f,o),f.disabled=s);showAndHideButtons("send","paynext");k=document.getElementById("paymentoptions");k&&(applyClass(k,o),k.disabled=s);hidePickupFields([p,a,l]);return}if(tt=document.getElementById(nt).value,w=tt.split("^"),hidePickupFields([p,a,l]),tt.length===0)f=document.getElementById(d),f&&(applyClass(f,o),f.disabled=s);else{for(it=c,f=document.getElementById(d),f&&(removeClassNames(f,o),f.disabled=c),h=1;h<4;h++){if(rt=i+h,ut=r+h,e=document.getElementById(rt),e)e.checked&&u==1?(it=s,e.value==1?showPickupFields([p]):showPickupFields([a,l])):e.checked=c,e.disabled=s,applyClass(e,o),v=document.getElementById(ut),applyClass(v,o),v.disabled=s;else continue;for(b=0;b<w.length;b++)ft=w[b].split("|"),ft[0]==h&&(e.disabled=c,removeClassNames(e,o),removeClassNames(v,o),v.disabled=c,y||(y=e))}w.length>0&&!it&&y&&(y.checked=s,y.value==1?(showPickupFields([p]),hidePickupFields([a,l])):showPickupFields([a,l]))}UpdateAddressOptions();UpdatePaymentMethods("pharmacymethods","pharmacy","deliverymethod","paymentmethod","paymentmethodlabel",u)}}function getRadioValue(n){var t,i;if(t=document.getElementsByName(n),t.length==0)return"";for(i=0;i<t.length;i++)if(t[i].checked==!0)return t[i].value;return""}function UpdatePaymentMethods(n,t,i,r,u,f){var v=!1,y=!0,c="hidden",ut="paymentoptions",g="paynext",nt="send",tt,ft,et,l,e,p,ot,a,b,it,s,o,k,d,h,rt,w;if(showAndHideButtons(nt,g),h=document.getElementById(ut),h&&(applyClass(h,c),h.disabled=y),tt=document.getElementById(t).selectedIndex,it=getRadioValue(i),tt!==null&&it.length!==0){for(ft=n+tt,et=document.getElementById(ft).value,l=et.split("^"),d="",e=0;e<l.length;e++)if(s=l[e].indexOf("|"),a=s<0?l[e]:l[e].substring(0,s),it==a){s>=0&&(d=l[e].substring(s+1));break}if(d.length>0){for(rt=v,b=d.split("|"),h=document.getElementById(ut),h&&(removeClassNames(h,c),h.disabled=v),o=document.getElementsByName(r),e=0;e<o.length;e++)if((s=o[e].id.indexOf("_"),!(s<0))&&(a=o[e].id.substring(s+1),a.length!=0))for(ot=u+"_"+a,p=document.getElementById(ot),f&&o[e].checked?(rt=y,o[e].value==2&&showAndHideButtons(g,nt)):o[e].checked=v,w||(w=o[e]),o[e].disabled=y,applyClass(o[e],c),applyClass(p,c),p.disabled=y,k=0;k<b.length;k++)b[k]==a&&(o[e].disabled=v,removeClassNames(o[e],c),removeClassNames(p,c),p.disabled=v);b.length>0&&!rt&&w&&(w.checked=y,w.value==2&&showAndHideButtons(g,nt))}}}function HidePharmacyText(n,t,i,r){var f,u;n||(n=document.getElementById(t));n&&(f=document.getElementById(i),u=document.getElementById(r),f&&u&&(n.options[n.selectedIndex].value==f.value?(u.disabled=!1,removeClassNames(u,"hidden")):(u.disabled=!0,applyClass(u,"hidden"))))}function showAndHideButtons(n,t){var i,r;i=document.getElementById(n);i&&(i.disabled=!1,removeClassNames(i,"hidden"));r=document.getElementById(t);r&&(r.disabled=!0,applyClass(r,"hidden"))}function showPickupFields(n){var t,i;if(n)for(t=0;t<n.length;t++)i=document.getElementById(n[t]),i&&(removeClassNames(i,"hidden"),i.disabled=!1)}function hidePickupFields(n){var t,i;if(n)for(t=0;t<n.length;t++)i=document.getElementById(n[t]),i&&(applyClass(i,"hidden"),i.disabled=!0)}function enableIfRadioCheckedAndElementsFilled(n,t,i,r,u){var f,e;f=document.getElementById(t);e=document.getElementById(i);e&&!containsClassName(e,"hidden")&&f&&f.checked?enableIfReqFilled(n,r,u):enableIfReqFilled(n,r)}function isValidEmail(n){var t=new RegExp(/^\s*[A-Za-z0-9\xC0-\xFFƒŠŒŽšœžŸ._%+-]+@[A-Za-z0-9\xC0-\xFFƒŠŒŽšœžŸ.-]+\.[A-Za-z\xC0-\xFFƒŠŒŽšœžŸ]{2,18}\s*$/);return t.test(n)}function $T(n,t){var i="undefined";return n&&(typeof n.innerText!==i&&(n.innerText=t),typeof n.textContent!==i&&(n.textContent=t)),n}function clearElement(n){if(n)for(n.innerHTML="",n.value="",n.innerText="";n.hasChildNodes();)n.removeChild(n.lastChild)}function HTMLUnencode(n){return HTMLEncodeDecodeDiv.innerHTML=n||"",HTMLEncodeDecodeDiv.innerText||HTMLEncodeDecodeDiv.textContent}function HTMLEncode(n){return n.replace($$WP.Utilities.Global.HtmlChars,$$WP.Utilities.HtmlEncodeCallback)}function createElement(n,t,i){var r=document.createElement(n||"div");return t&&(r.className=t),i&&(r.id=i),r}function getPrefix(n){var i="Core.CommonUtils",t;return t=n?$$WP.Strings.get("DataTileStaticURLPrefix",i):$$WP.Strings.get("DataTileURLPrefix",i),t.length===0&&(t=WP.myPath+"@mychart@url@"),t}function applyPrefix(n,t){var u,r,i;return(t=t||"",!n)?t:(r=t.indexOf("#"),r>0&&(u=t.substring(r+1),t=t.substring(0,r)),i=n.replace(/@mychart@url@/gi,t),i=i.replace(/@mychart@wrappedurl@/gi,encodeURIComponent(t)),r>0&&(i=i+"#"+u),i)}function makeStaticLink(n){var t,i,r;return(n=n.replace(/\\/g,"/"),n.indexOf(".")===0&&(n=n.substring(1)),n.indexOf(".")===0&&(n=n.substring(1)),n.indexOf("/")===0&&(n=n.substring(1)),$$WP.ApplicationContext===78)?Epic.PatientEngagement.Welcome.Core.Utilities.getUrl("Content/"+n):(t=getPrefix(!0),i=$$WP.AffiliateFilePath,r=new RegExp("svg$","i"),n=!$$WPUtil.IsNullOrEmpty(i)&&r.test(n)?$$WP.AffiliateFilePath+"/"+n:$$WP.I18N.getMyChartLocale()+"/"+n,applyPrefix(t,n))}function createImage(n,t,i,r){var u=createElement("img",n,t);return u.src=makeStaticLink("/images/"+(i||"")),u.alt=r||"",u.title=r||"",u}function getOffset(n,t){var i=n[t];for(n=n.offsetParent;n;)i+=n[t],n=n.offsetParent;return i}function createAlert(n,t,i){if(n.length===0){clearElement(i);return}var r,f,u;return r=createElement("span","alert"),t===!0&&(f=createImage("yield","","warning.png",$$WP.Strings.get("YieldTitle","Core.CommonUtils")),r.appendChild(f)),u=createElement("span","errHolder"),dangerou$.setHtml(u,n),r.appendChild(u),i&&(i.appendChild(r),i.className=""),r}function getChild(n,t){for(var r="#comment",i=n.firstChild;t>0;){for(t--;i&&(i.nodeName===r||i.nodeName==="#text");)i=i.nextSibling;if(!i)return null;i=i.nextSibling}while(i&&(i.nodeName===r||i.nodeName==="#text"))i=i.nextSibling;return i}function getTrackedWindowString(n){return(n===""||n===null||typeof n=="undefined")&&(n="openWindows"),getCookie(n,!0)}function openWindow(n,t,i,r,u,f,e){var s="undefined",h,o,c;return(typeof i!==s&&i!==""||u||(i="status=0,menubar=0,scrollbars=1,resizable=1,toolbar=0"),e)?openWindowInternal(n,t,i):((r===null||typeof r===s)&&(r="openWindows"),o=getCookie(r,!0),c=o===""?0:o.split("^").length,(typeof t===s||t===null||t==="")&&(t="mycWin"+makeLink("")+c),h=openWindowInternal(n,t,i),o=o+(o.length>0?"^":"")+t,setCookie(r,o,!0),h)}function openWindowInternal(n,t,i){var r;return r=$$WP._windowOpenReal(n,t,i),r&&(r.opener=null),r}function openOAuthWindow(n){var f="GetAccessTokenProxy",r="onmessage",e=$$WPUtil.getDomain(window.location),o=n.callback||function(){window.location.reload()},u=openWindow(n.sUrl,n.sName,n.sFeature),i,t;u&&u.focus();i=function(n){if(n.origin==e&&n.data=="GotAccessToken"){try{u.close()}catch(t){}window.removeEventListener?window.removeEventListener("message",i,!1):window.detachEvent?window.detachEvent(r,i):document.detachEvent&&document.detachEvent(r,i);o()}};window.attachEvent?window.attachEvent(r,i):document.attachEvent?document.attachEvent(r,i):window.addEventListener&&window.addEventListener("message",i);t=document.getElementById(f);!t&&(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&(t=document.createElement("iframe"),t.src=n.sProxy,t.width=0,t.height=0,t.frameBorder=0,t.style.visibility="hidden",t.id=f,document.body.appendChild(t))}function postMessageForOAuthPopup(n,t){if(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0){var i=document.getElementById("GetAccessTokenProxy");try{i.contentWindow.postMessage(n,t)}catch(r){}}else window.postMessage(n,t)}function closeAllWindows(n){var r,u,f,t,e,i;if((n===""||n===null||typeof n=="undefined")&&(n="openWindows"),r=getCookie(n,!0),r){for(u=r.split("^"),e=u.length,t=0;t<e;t++)if(f=u[t],f)try{i=$$WP._windowOpenReal("",f,"");i&&i.close&&i.close()}catch(o){}deleteCookie(n,!0)}}function setCookie(n,t,i,r){var u;n&&(u=n+(i?"4"+makeLink("").replace(new RegExp("/","g"),"").toLowerCase():"")+"="+escape(t)+";path=/",u+=r?"; expires="+r.toGMTString():"",hasSameSiteBug()||!!$$WP.DisableSameSiteSecureCookie||(u+=";SameSite=None; Secure"),document.cookie=u)}function hasSameSiteBug(){var n=navigator.userAgent,t=RegExp("^.*CPU OS 1[0-2].*Version/1[0-2].*Safari.*$"),i=RegExp("^.*CPU iPhone OS 1[0-2].*Version/1[0-2].*Safari.*$"),r=RegExp("^.*Macintosh; Intel Mac OS X 10_1[0-4].*Version/1[0-3].*Safari.*$"),u=RegExp("^.*Chrom[^ /]+/(5[1-9]|6[0-6])[.d]*.*$"),f=RegExp("^.*CriOS[^ /]+/(5[1-9]|6[0-6])[.d]*.*$"),e=RegExp("^.*CPU OS 12.*like Mac OS X.*$"),o=RegExp("^.*CPU iPhone OS 12.*$");return t.test(n)||i.test(n)||r.test(n)||u.test(n)||f.test(n)||e.test(n)||o.test(n)?!0:!1}function getCookie(n,t){var r,u,s,i,h,o,f,e;if(e="",r=document.cookie,!r||r.length===0)return e;if(u=r.split(";"),u)for(h=new RegExp(n+(t?"4"+makeLink("").replace(new RegExp("/","g"),"").toLowerCase():"")+"s?="),o=/^\s+|\s+$/g,i=0;i<u.length&&!s;i=i+1)f=u[i].replace(o,""),f.search(h)>-1&&(e=unescape(f.substr(f.indexOf("=")+1)).replace(o,""),s=!0);return e}function deleteCookie(n,t){n&&setCookie(n,"",t,new Date(1))}function makeLink(n){if(n.match(/^(epic)?https?:\/\//i))return n;if($$WP.ApplicationContext===78)return Epic.PatientEngagement.Welcome.Core.Utilities.getUrl(n);var t;return t=getPrefix(!1),applyPrefix(t,n)}function makeErrorPageLink(){return $$WP.ApplicationContext===78?makeLink("Core/Home/Error"):makeLink("500.aspx")}function makeStaticImageLink(n){return $$WP.ApplicationContext===78?Epic.PatientEngagement.Welcome.Core.Utilities.getUrl("Content/images/"+n):makeStaticLink("images/"+n)}function addQueryStringToUrl(n,t,i){if(n&&t){var u=n.indexOf("?")!==-1,r="";r=u?"&":"?";i||(i="");n=n+r+t+"="+i}return n}function getCSRFTokenAsQS(n){var t=$afe.select("body");if(t.hasClass("isPrelogin")){n();return}if(!$$WPUtil.IsNullOrEmpty($$WP.Settings.DotNetOnly)&&$$WP.Settings.DotNetOnly){n();return}$$WP=$$WP||{};$$WP._CSRFCallBackQueue=$$WP._CSRFCallBackQueue||[];$$WP._CSRFTokenQs?n($$WP._CSRFTokenQs):$$WP._CSRFReqSent?$$WP._CSRFCallBackQueue.push(n):($$WP._CSRFReqSent=!0,$.get(makeLink("Home/CSRFToken"),function(t){var u,f,r,i;if(t&&(u=dangerou$.parseHtml(t),f=u.safeAttr("name")||"__RequestVerificationToken",r=u.val(),$$WP._CSRFTokenName=f,$$WP._CSRFToken=r,$$WP._CSRFTokenQs=f+"="+encodeURIComponent(r),$$WP._CSRFTokenQsToken=encodeURIComponent(r)),n($$WP._CSRFTokenQs),$$WP._CSRFCallBackQueue.length>0){for(i=0;i<$$WP._CSRFCallBackQueue.length;i++)typeof $$WP._CSRFCallBackQueue[i]=="function"&&setTimeout($$WP._CSRFCallBackQueue[i],0,$$WP._CSRFTokenQs);$$WP._CSRFCallBackQueue=[]}}))}function setFederatedLogoutMode(n){$$WP.FederatedLogoutMode=n}function getFederatedLogoutMode(){return $$WP.FederatedLogoutMode==!0}function disableEmptyFormInputs(n){var r,i,t;for(r=document.getElementById(n),i=r.getElementsByTagName("input"),t=0;t<i.length;t++)i[t].value.length||$afe.jq(i[t]).safeAttr("disabled",!0)}function removeNonNumericInput(n){var t=n.value.replace(/[^\d]/g,"");n.value!=t&&(n.value=t)}function removeFadedtextHint(n){$afe.jq(n).hasClass("fadedtext")&&(n.value="")}function logAction(n,t,i){$$WP.ApplicationContext===78&&Epic.PatientEngagement.Welcome.Core.EventLogging.EventLoggingServices.logAction(n,t,i)}function SetActivity(){$$WPUtil.setActivity()}function SetBlurActivity(){$$WPUtil.setActivity()}function HandleKeyPress(){return $$WPUtil.setActivity(),!0}function HandleKeyPressAndMaxLen(n,t,i,r){var u;return u=navigator.appName!="Netscape"?window.event.keyCode:n.which,$$WPUtil.setActivity(),u===8||u===0?!0:n.ctrlKey&&!(u===86||u===118)?!0:CheckLength(t,i,r,1)}function HandleBlurAndMaxLen(n,t,i,r){return HandleKeyPressAndMaxLen(n,t,i,r)}function HandleOnChangeAndMaxLen(n,t,i){return $$WPUtil.setActivity(),CheckLength(n,t,i)}function enableIfChecked(n){if(document.getElementById){var r,i,u,t,e,o,s,f,h=[];if(u=document.getElementById(n),u){for(e=enableIfChecked.arguments,t=1;t<e.length;t++)i=u[e[t]],i&&typeof i=="object"&&h.push(i);for(o=u.getElementsByTagName("input"),s=!1,f=0;f<o.length;f++)if((r=o[f],r.type=="checkbox"||r.type=="radio")&&r.className.toLowerCase().indexOf("hidden")==-1&&r.checked){s=!0;break}for(t=0;t<h.length;t++)i=h[t],s?enableBtn(i):disableBtn(i)}}}function enableIfAllChecked(){for(var t,i=!0,n=0;n<arguments.length;n++)(t="#"+arguments[n],$afe.select(t).length!==0)&&($afe.select(t).prop("checked")||(i=!1));return i}function decodeMnemonics(n,t){var i,r;t=t||{};for(i in t)typeof t[i]!="undefined"&&(r=new RegExp(i,"g"),n=n.replace(r,t[i]));return n}function disableButtonAndShowSpinner(n){n.prop("disabled",!0);n.addClass("omitdisablestyling");var t=document.createElement("div");$afe.jq(t).addClass("spinningLoadWheel");n.safeAfter(t)}function moveFormSubmissionButtonAndShowSpinner(n){var t=document.createElement("input"),i;$afe.jq(t).addClass("button completeworkflow omitdisablestyling formbuttons");$afe.jq(t).prop("id","noActionButton");$afe.jq(t).prop("value","Submit");$afe.jq(t).prop("type","submit");$afe.jq(t).prop("disabled",!0);n.safeAfter(t);n.css("position","absolute");n.css("left","-999em");i=document.createElement("div");$afe.jq(i).addClass("spinningLoadWheel");$afe.jq(t).safeAfter(i);n.on("keydown",function(n){(n.keyCode===32||n.keyCode===13)&&n.preventDefault()})}function reportFormFactor(){$$WP.Analytics.UsageTrackingController.logFormFactor()}function getErrorForScreenReader(){return"<span class='clearlabel'>"+$$WP.Strings.get("ErrorLabelText","Global")+"<\/span>"}function vdtAdmissionLoad(){var n,r,t,u,f=!1,i=document.getElementById("appRoot");if(n=document.getElementById("loadingSpinner"),n&&(n.style.display="none"),n=document.getElementById("vdtFrame"),n.parentNode.style.height="auto",n.contentDocument||(f=!0),f||n.contentDocument.getElementById("vdtError")==null||(u=!0),u){n=document.getElementById("vdtErrorDiv");n.style.display="inherit";return}n.style.display="inherit";try{$afe.jq(window).on("popstate",handleBrowserBack);isDataTile()?(r=getGenericHeight,t=r(n),n.style.height!=t&&(n.style.height=t)):setAppropriateHeight();i=document.getElementById("appRoot");i&&setAppropriateHeightOnDOMMutations(i)}catch(e){return}}function getGenericHeight(n){return n.style.height="100px",Math.max(document.body.scrollHeight||200,document.body.offsetHeight||200)+16+"px"}function setClientTimeZone(){$$WP.I18N.setClientTimeZone()}function addMobileTitle(n){typeof Android!="undefined"&&Android.setWebViewTitle?Android.setWebViewTitle(n):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.setWebViewTitle&&window.webkit.messageHandlers.setWebViewTitle.postMessage(n)}function isArbitraryDownloadSupported(){if($$WP.Utilities.UI.IsMobile){if(typeof Android!="undefined")return Android.webViewDownloadEnabled&&Android.webViewDownloadEnabled();if(window.webkit&&window.webkit.messageHandlers)return window.webkit.messageHandlers.webViewDownloadEnabled&&window.webkit.messageHandlers.webViewDownloadEnabled()}return!0}function getFourDigitYearFromTwoDigitYear(n,t){var r=parseInt(n),f=(new Date).getFullYear(),i,u;return(isNaN(t)&&(t=BIRTH_YEAR_MIN_YEARS_BACK),i=f-t,isNaN(r))?i:(u=i%100,u<r?(Math.floor(i/100)-1)*100+r:i-u+r)}function isValidTwoDigitYear(n){return n.length==2&&n>=0}function isValidOneDigitDatePart(n){return n<10&&n>0&&n.length<2}function getAppVirtualPath(){return makeLink("")}function getDeviceIdKey(){return"MYCHART-WEB-DEVICE-"+getAppVirtualPath()}function reconcileWebDevice(n){var t="undefined",i,r,u;(typeof $$WP===t||typeof $$WP.IsMidloginStep===t)&&(isShareEverywhere()||isBedsideTV()||(n=!!n,i=getDeviceIdKey(),$$WPUtil.isLocalStorageAvailable()&&typeof window.localStorage!==t&&(r=localStorage.getItem(i)),u={deviceId:r,skipSessionCheck:n},$.ajax({url:makeLink("Authentication/RememberDevices/ReconcileWebDevice"),type:"POST",data:u,dataType:"json",success:function(n){var u=$$WPUtil.isLocalStorageAvailable()&&typeof window.localStorage!==t,r;u&&(r=localStorage.getItem(i));(n.forceUpdate||r===null)&&n.deviceId&&(r=n.deviceId,u&&localStorage.setItem(i,r))}})))}var WP=WP||{},pre_checkActivity,oldElement,currentElement,HTMLEncodeDecodeDiv;typeof WP.FdiUtils=="undefined"&&(WP.FdiUtils={});WP.FdiUtils.handleFDILink=function(n){var i,t,r;i=$afe.jq(n.target);n.preventDefault();t=i.closest("[data-fdi-context]");t.length>0&&(r=t.safeAttr("data-fdi-context"),WP.FdiUtils.ExecuteFDILink(r))};WP.FdiUtils.ExecuteFDILink=function(n){var t,r,u,f,i,e,o;i="";n!==""&&(t=JSON.parse(n),r=t.fdi,u=t.csn,f=t.ord,e=t.DocumentID,o=t.eptId,delete t.fdi,delete t.csn,delete t.ord,delete t.DocumentID,delete t.eptId,i=WP.FdiUtils.buildFDILinkParamString(r,u,f,t,e,o));getCSRFTokenAsQS(function(n){$.ajax({url:makeLink("Extensibility/Redirection/FdiData"+i),type:"POST",dataType:"json",data:n,success:function(n){WP.FdiUtils.fdiJSONSuccess(n,i)}})})};WP.FdiUtils.fdiJSONSuccess=function(n,t){var i,r,u,f;i=n.url;r=n.launchmode;f=n.IsFdiPost;r===4&&(i=makeLink(i));f&&(i=makeLink("Extensibility/Redirection/FdiRedirection"+t));switch(r){case 1:case 4:window.location.href=i;break;case 0:case 2:case 3:default:u=openWindow(i,"","",null,!0,!1,!0);u!=null&&u!==undefined||WP.DOM.Browser.isIE||WP.DOM.Browser.isLegacyEdge||WP.FdiUtils.PopupBlocked(i)}};WP.FdiUtils.PopupBlocked=function(n){var t;$$WP.Strings.setDefaultNamespace("Global");t=new $$WPComp.MessageComponent({TitleText:$$WP.Strings.get("BlockedPopupTitle"),Message:$$WP.Strings.get("BlockedPopupMessageWithLink"),ToolbarButtons:[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("BlockedPopupLaunchBtnTitle"),null,"completeworkflow","LaunchLink"),new $$WPComp.ComplexObjects.Button($$WP.Strings.get("BlockedPopupCancelBtnTitle"),null,"cancelworkflow","")],IsCloseable:!0});t.addEventListener("click",$.proxy(this.LaunchClickHandler,this,n));$$WPUtil.quickPopup(t)};WP.FdiUtils.LaunchClickHandler=function(n,t){t&&t.dataId&&t.dataId==="toolbarLaunchLink"&&openWindow(n,"","",null,!0,!1,!0)};WP.FdiUtils.buildFDILinkParamString=function(n,t,i,r,u,f){var e;if(e="",n)e=$$WPUtil.addUrlParameter(e,"fdi",encodeURIComponent(n));else return"";return t&&(e=$$WPUtil.addUrlParameter(e,"csn",encodeURIComponent(t))),i&&(e=$$WPUtil.addUrlParameter(e,"ord",encodeURIComponent(i))),$.isEmptyObject(r)||(e=$$WPUtil.addUrlParameter(e,"extra",encodeURIComponent(JSON.stringify(r)))),u&&(e=$$WPUtil.addUrlParameter(e,"DocumentID",encodeURIComponent(u))),f&&(e=$$WPUtil.addUrlParameter(e,"eptID",encodeURIComponent(f))),e};$$WP.PageStartup=$$WP.PageStartup||{},function(){var r="function",i=!1,t=!0,n=null;if($$WP._ajaxReal){$$WP.Debug.logError("$.ajax has already been copied. Did this file get included twice?");return}var f=function(){return $$WP&&$$WP._CSRFTokenName&&$$WP._CSRFToken?{tokenName:$$WP._CSRFTokenName,tokenValue:$$WP._CSRFToken}:n},e=function(){var t=u("#__CSRFContainer");return t.tokenName!=n&&t.tokenValue!=n&&($$WP._CSRFTokenName=t.tokenName,$$WP._CSRFToken=t.tokenValue),t},o=function(){return f()||e()},s=function(){return $$WP&&$$WP._WidgetTokenName&&$$WP._WidgetToken?{tokenName:$$WP._WidgetTokenName,tokenValue:$$WP._WidgetToken}:n},h=function(){var t=u("#__WidgetTokenContainer");return t.tokenName!=n&&t.tokenValue!=n&&($$WP._WidgetTokenName=t.tokenName,$$WP._WidgetToken=t.tokenValue),t},c=function(){return s()||h()},u=function(n){var r={},i,t;return i=$afe.select(n),i&&i.length>0&&(t=i.find("input").first(),t&&t.length>0&&(r={tokenName:t.safeAttr("name"),tokenValue:t.val()})),r},l=function(n){var f,e,u;n.success&&(n.hasOwnSuccessHandler=t,f=n.context?n.success.bind(n.context):n.success.bind(n));n.error&&(n.hasOwnErrorHandler=t,e=n.context?n.error.bind(n.context):n.error.bind(n));u=i;n.success=function(n,i,e){try{u||$$WP&&$$WP.Performance&&$$WP.Performance.Tracker&&typeof $$WP.Performance.Tracker._logHttpRequest===r&&($$WP.Performance.Tracker._logHttpRequestFromAjax(e),u=t)}finally{f&&f(n,i,e)}};n.error=function(n,i,f){try{u||$$WP&&$$WP.Performance&&$$WP.Performance.Tracker&&typeof $$WP.Performance.Tracker._logHttpRequest===r&&($$WP.Performance.Tracker._logHttpRequestFromAjax(n),u=t)}finally{e&&e(n,i,f)}}};$.ajaxPrefilter(function(n,t,r){n.crossDomain&&(n.contents.script=i);r.originalOptions=t});$$WP._ajaxReal=$.ajax||jQuery.ajax;$.ajax=function(n,t){var i;return typeof n=="object"?(t=n,n=t.url):t=t||{},t.type=t.type||"GET",t.type.toUpperCase()!=="GET"&&(t.headers=t.headers||{},i=o(),t.headers[i.tokenName]=i.tokenValue),$$WP.WidgetMode&&(t.headers=t.headers||{},t.headers.Authorization=c().tokenValue,t.headers["api-key"]=$$WP.WidgetApiKey,$$WP.WidgetLanguage&&(t.headers.lang=$$WP.WidgetLanguage)),t.captchaResponse&&(t.headers["X-Captcha-Response"]=t.captchaResponse),n=$$WP.Utilities.addUrlParameter(n,"noCache",Math.random()),t.url=n,l(t),$$WP._ajaxReal(n,t)};$$WP.IsPendingAJAXRequests=i;$$WP.PendingAJAXCallBack=n;$afe.jq(document).ajaxStart(function(){$$WP.IsPendingAJAXRequests=t});$afe.jq(document).ajaxStop(function(){$$WP.IsPendingAJAXRequests=i;$$WP.PendingAJAXCallBack!==n&&typeof $$WP.PendingAJAXCallBack===r&&($$WP.PendingAJAXCallBack(),$$WP.PendingAJAXCallBack=n)})}(),function(n){var r="jqHidden",t=!0,i;if($$WP._showReal&&$$WP._hideReal){$$WP.Debug.logError("$.show and $.hide have already been copied. Did this file get included twice?");return}$$WP._showReal=n.fn.show;$$WP._hideReal=n.fn.hide;i=function(n){var f="function",r,i,u,e=function(){r()},o=function(){};if(n.length!==0){for(i=0;i<n.length;i++)r=n[i],typeof r=="object"?(n[i].complete=typeof r.complete===f?e:o,u=t):typeof r===f&&(n[i]=e,u=t);u||Array.prototype.push.call(n,o)}};n.fn.show=function(){var n=this,u;return setTimeout(function(){$$WP.Debug.UpdateTopMarginForBanners()},100),n.length>0&&(n.hasClass("hidden")?$$WP.Debug.logError("$.show() called on a hidden element. It still won't be shown - it's hidden. If you want it to ever appear, use the jqHidden class instead of hidden."):n.hasClass(r)||$$WP.Debug.log("$.show() called on an element without the jqHidden class. You should set this class rather than an inline display style.",t)),arguments.length>0?(i(arguments),u=$$WP._showReal.apply(n,arguments)):(u=$$WP._showReal.apply(n),n.hasClass("cardlist")&&n.trigger("cardLoad")),u};n.fn.hide=function(){var n=this,u;return n.length>0&&(n.hasClass("hidden")?$$WP.Debug.logError("$.hide() called on a hidden element. This was a pointless function call."):n.hasClass(r)||$$WP.Debug.log("$.hide() called on an element without the jqHidden class. You should set this class rather than an inline display style.",t)),arguments.length>0?(i(arguments),u=$$WP._hideReal.apply(n,arguments)):u=$$WP._hideReal.apply(n),u}}(jQuery);$afe.onDocumentReady(function(){var t=null,r=!1,u="click",i="body",n=!0,f,e;$$WP.WidgetMode&&(setInterval($$WPUtil.RefreshHeader,9e5),setupIframeResizer());$$WP.IsEpicAjaxErrorHandlerDisabled!==n&&$afe.jq(document).ajaxError($$WPUtil.defaultAjaxErrorHandler);f=function(n){var o="margin-right",f="margin-left",r,t,i,e,u,s;return(i=n.safeAttr("name"),!i)?($$WP.Debug.logError("Input elements require a name in order to associate them with a message display"),$afe.jq()):(r=$afe.jq(n.get(0).form),r.length===0)?($$WP.Debug.logError("Input elements need to be contained within a form in order to associate them with a message display"),$afe.jq()):(t=r.find('[data-message-for="'+i+'"]'),t.length===0&&(t=$$WP.SimpleTemplates.MessageDisplay(i),n.safeAfter(t)),t.get(0).hasAttribute("data-script-generated")&&n.css("display")!=="none"&&(e=n.position().left-t.position().left,typeof n.css(f)!="undefined"&&(e+=parseInt(n.css(f),10)),t.css(f,e),t.css(o,n.css(o)),u=n.width(),(n.get(0).type==="checkbox"||n.get(0).type==="radio")&&(s=r.find('label[for="'+i+'"]'),u+=s.width()),u!==0&&t.width(u)),t)};e=function(n,t,i){var r="alert",f="invisible",u;t?(i?(n.addClass(r),n.empty(),n.text(t),u=$$WP.SimpleTemplates.WarningIcon(),n.safePrepend(u),u.safeAfter($$WP.SimpleTemplates.ErrorLabel())):(n.removeClass(r),n.empty(),n.text(t)),n.removeClass(f)):(n.addClass(f),n.removeClass(r),dangerou$.setHtml(n,"&nbsp;"))},function(){if(WP.FdiUtils){$afe.select(i).on(u,"a[data-fdi-option]",WP.FdiUtils.handleFDILink);$afe.select(i).on(u,'a[href="#Extensibility_ReportLink"]',WP.FdiUtils.handleFDILink)}}(),function(){var a="keyup change",e,o,s,h,v,f,c,l,y,p;v=/<([A-Za-z\/])/gm;y=/&#/gm;p=[9,16,17,18,20,27,33,34,35,36,37,38,39,40,44,112,113,114,115,116,117,118,119,120,121,122,123,144,145];h=function(n){var t;return t=n.replace(v,"< $1"),t.replace(y,"& #")};e=function(t){var i=r;return p.forEach(function(r){if(t===r){i=n;return}}),i};o=function(t){var i="Global",o="UnsupportedCharsPopupMessage",u,f,r;t&&t.which&&e(t.which)||(u=this.value,f=h(u),r=$$WPUtil.RemoveUnsupportedChars(f),u.length!==r.length&&(this.value=r,r!==f&&($$WP.Utilities.UI.IsMobile||WP.DOM.Browser.isMobile?alert($$WP.Strings.get(o,i)):$$WPUtil.quickPopup(new $$WPComp.MessageComponent({TitleText:$$WP.Strings.get("UnsupportedCharsPopupTitle",i),ToolbarButtons:[{Text:$$WP.Strings.get("UnsupportedCharsPopupConfirmButton",i)}],Message:$$WP.Strings.get(o,i),IsClosable:n}),{Size:$$WP.Containers.Popup.SizeEnum.Small,positioningFunction:$$WPContain.Positions.InsideCentered}))))};s=function(n){var t,i;n&&n.which&&e(n.which)||(t=this.value,i=h(t),t!==i&&(this.value=i))};f=$afe.select(i);c='input:not([data-jq-ignore="true"]):not([data-permissive="true"]):not([type]):not([data-validation-settings]), input:not([data-jq-ignore="true"]):not([data-permissive="true"])[type="text"]:not([data-validation-settings]), textarea:not([data-jq-ignore="true"]):not([data-permissive="true"]):not([data-validation-settings])';l='input:not([data-jq-ignore="true"]):not([data-permissive="true"]):not([type])[data-validation-settings], input:not([data-jq-ignore="true"]):not([data-permissive="true"])[type="text"][data-validation-settings], textarea:not([data-jq-ignore="true"]):not([data-permissive="true"])[data-validation-settings]';f.on(a,c,o);f.on(a,l,s);f.on("paste",c,function(){setTimeout($.proxy(o,this),300)});f.on("paste",l,function(){setTimeout($.proxy(s,this),300)});f.on(u,"a",function(n){var f="target",i,r,e,o,u;if(i=$afe.jq(n.currentTarget).closest("a"),r=i.safeAttr("data-redirect")||i.safeAttr("href"),u=i.safeAttr(f),u||!i.safeAttr("data-jq-ignore")){if(i.hasClass("disabled")||r==="#"){n.preventDefault();return}i.get(0).hasAttribute("onclick")||typeof r!="string"||r.length===0||r[0]==="#"||i.get(0).hasAttribute(f)&&u!=="_blank"&&u!=="_self"||(e=i.safeAttr(f)==="_blank"||n.ctrlKey,o=i.safeAttr("data-organization"),$$WPUtil.TryRedirect(r,t,o,e),n.preventDefault())}});if(window.location!==window.parent.location)f.on("focus","a[href]:not([tabindex='-1']), area[href]:not([tabindex='-1']), input:not([tabindex='-1']), select:not([tabindex='-1']), textarea:not([tabindex='-1']), button:not([tabindex='-1']), [tabindex]:not([tabindex='-1'])",function(){var r="failedStorageRequest",t="LoginWidget",u=document.location.pathname.toLowerCase().indexOf("authentication/login/loginwidget")!==-1,i=n;try{i=window.top.location.hostname.toLowerCase()!==window.location.hostname.toLowerCase()}catch(e){i=n}u&&i&&typeof document.requestStorageAccess=="function"&&WP.DOM.Browser.isFirefox&&$$WPUtil.canWriteCookies()&&document.requestStorageAccess().then(function(){getCookie(t,n)!="1"&&(setCookie(t,"1",n),document.getElementById("loginForm")||window.location.reload())},function(){getCookie(t,n)!="1"&&(setCookie(t,"0",n),f.trigger(r))});$$WPUtil.canWriteCookies()||$$WPUtil.canWriteCookiesAsync().then(function(n){n?f.trigger("successfulStorageRequest"):f.trigger(r)})})}(),function(){var r=function(){$afe.select(i).on(u,"[data-driving-directions]",f)},f=function(i){var r=$afe.jq(i.currentTarget).safeAttr("data-driving-directions");openWindow(makeLink("Education/DrivingDirections?destination="+encodeURIComponent(r)),t,"",t,n);i.preventDefault()};r()}(),function(){$afe.select(i).on("input keyup keypress change scroll click dblclick select wheel cut paste touchstart touchend touchmove touchcancel",$$WP.Utilities.SetActivity)}(),function(){var n;$$WP._windowOpenReal=$.proxy(window.open,window);n=function(n,i,u,f){return openWindow(n,i,u,t,r,f)};window.open=n}(),function(){var n=function(){var o,e,u,i,s,h,n=arguments[0]||{},f=1,l=arguments.length,c=r;for(typeof n=="boolean"&&(c=n,n=arguments[f]||{},f++),typeof n=="object"||jQuery.isFunction(n)||(n={}),f===l&&(n=this,f--);f<l;f++)if((o=arguments[f])!=t)for(e in o)(u=n[e],i=o[e],n!==i&&e!=="__proto__")&&(c&&i&&(jQuery.isPlainObject(i)||(s=jQuery.isArray(i)))?(s?(s=r,h=u&&jQuery.isArray(u)?u:[]):h=u&&jQuery.isPlainObject(u)?u:{},n[e]=jQuery.extend(c,h,i)):i!==undefined&&(n[e]=i));return n};jQuery.extend=jQuery.fn.extend=n}()});WP=WP||{};typeof WP.TelehealthUtils=="undefined"&&(WP.TelehealthUtils={});WP.TelehealthUtils.flashPopup=function(n){var t;t=window.open("","history","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=800,height=600");t.closed||!t.document.URL||t.document.URL.indexOf("about")===0?t.location=n:window.setTimeout(t.focus,1)};WP.TelehealthUtils.telemedPopup=function(n){var t;t=window.open(n,"history","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=1280,height=720");t.opener=window;t.closed||!t.document.URL||t.document.URL.indexOf("about")===0?t.location=n:window.setTimeout(t.focus,1)};WP.TelehealthUtils.telemedExecuteFDI=function(n,t,i,r){var u,f="";r!=null&&(f="&webrtccontext="+r);i?window.open(makeLink("epichttp://fdiredirect?webid="+encodeURIComponent(n)+"&ecsn="+encodeURIComponent(t)+f)):(u=WP.FdiUtils.buildFDILinkParamString(n,t,"",""),$.ajax({url:makeLink("Extensibility/Redirection/FdiData"+u),type:"POST",success:function(n){WP.FdiUtils.fdiJSONSuccess(n,u)}}))};WP.TelehealthUtils.keepAliveMessageIfInActiveVisit=function(n){$.ajax({url:makeLink("TelemedicineHome/IsPatientInActiveVideoVisit"),type:"POST",success:n,async:!1})};WP.TelehealthUtils.webRtcContextEnum={HardwareTest:0,VideoVisit:1};$$WPUtil.guaranteeExistence($$WP,"CommunityUtilities");$$WP.CommunityUtilities.openDeepLink=function(n,t,i,r,u,f,e,o){var w=!1,rt="completeworkflow",g="externalJumpWindow",v=!0,b="cancel",y=null,s="community.externaljump",l="",ut="@MYCHART@OrganizationName@",nt="object",k=[],h,d,ft,tt,et,it,c,a,p;if(!t||typeof t!==nt){$$WP.Debug.log("Organization passed in to the function is null or not an object.");return}if(t.IncompleteH2GSetup){$$WP.Strings.addMnemonic(ut,t.OrganizationName,l,s);ft=new $$WPComp.MessageComponent({TitleText:$$WP.Strings.get("IncompleteH2GPopupTitle",s),Message:$$WP.Strings.get("IncompleteH2GPopupText",s),ToolbarButtons:[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("OkayButtonText",s),y,b,l)]});$$WPUtil.quickPopup(ft);$$WP.Strings.removeMnemonic(ut,s);return}if(($$WPUtil.IsNullOrEmpty(e)||isNaN(e))&&(e="-1"),r||(r=$$WP.CommunityUtilities.openDeepLinkType.InPopup),t.IsSSO&&(r||(tt=v),r=$$WP.CommunityUtilities.openDeepLinkType.InNewTab),et=!$$WP.Utilities.UI.IsMobile&&WP.DOM.Browser.isMobile&&$afe.jq(window).width()<768,(WP.DOM.Browser.isIE||WP.DOM.Browser.isSafari||et)&&r===$$WP.CommunityUtilities.openDeepLinkType.InPopup&&(r=$$WP.CommunityUtilities.openDeepLinkType.InNewTab,tt=v,k.push({Name:"isIEOrSafari",Value:1})),!$$WPUtil.IsNullOrEmpty(i)&&typeof i===nt)for(it in i)k.push({Name:it,Value:i[it]});d=document.location.protocol+"//"+document.location.hostname;$$WPUtil.IsNullOrEmpty(document.location.port)||(d=d+":"+document.location.port);k.push({Name:"parentJumpGUID",Value:$$WP.CommunityUtilities.getExternalJumpGUID()},{Name:"parentDomain",Value:d},{Name:"lang",Value:$$WP.I18N.getMyChartLocale()},{Name:"launchInBrowser",Value:$$WP.Utilities.UI.IsMobile?1:0});c={};c.mode=n;c.orgID=t.OrganizationId;c.parameters=k;c.patientIndex=e;$$WP.Utilities.UI.IsMobile||closeAllWindows(g);var st=function(n){var u;if(n&&typeof n=="string"&&(n=JSON.parse(n)),n&&n.RedirectToSignup&&n.CommunityResponse===y){h.hide();$$WP.CommunityUtilities.ShowSignupFailedMessage(t);return}if(n&&n.CommunityResponse&&!$$WPUtil.IsNullOrEmpty(n.CommunityResponse.RedirectURL))n.RedirectToSignup&&$$WP.CommunityUtilities.markCommunityLinkDirty(t.OrganizationId),r?h&&h._Components&&h._Components.length>0&&($$WP.Strings.setOrganization(n.CommunityResponse.Organization,s),u=[new $$WPComp.ComplexObjects.Button($$WP.Strings.getForTemplate("Continue",s),y,rt,"continue"),new $$WPComp.ComplexObjects.Button($$WP.Strings.getForTemplate(b,s),y,"previousstep",b)],$$WP.Utilities.UI.IsMobile?(h._Components[0].setMessage($$WP.Strings.get("redirectMessageForMobile",s)),n.CommunityResponse.RedirectURL=makeLink(n.CommunityResponse.RedirectURL+"&launchInBrowser=1")):h._Components[0].$content.html($$WP.Strings.get("redirectMessage",s)),h._Components[0].CallbackArgs=[n],h._Components[0].setToolbar(u),h.setFocus(),h.$container.trigger("resize"),$$WP.Strings.clearOrganization(s)):(a.loadIframe(n),$$WP.CommunityUtilities.logDeepLinkAudit("3",t.OrganizationId,n.EptId));else{var i=l,f=w,e=w,o=l;n&&n.CommunityResponse&&!$$WPUtil.IsNullOrEmpty(n.ErrorCode)&&(i=n.ErrorCode,i==="AlreadySignedUp"?(e=v,o=$$WP.Strings.get("externalLinkAlreadySignedUpTitle",s)):f=v);ot(i,f,e,o)}},ht=function(){var n,i,u;this.CallbackArgs[1]==="toolbarcontinue"&&(response=this.CallbackArgs[0],typeof response=="string"&&(response=JSON.parse(response)),typeof response===nt&&(r===$$WP.CommunityUtilities.openDeepLinkType.InNewTab?n=l:r===$$WP.CommunityUtilities.openDeepLinkType.InNewWindow&&(n="scrollbars=1,resizable=1"),i=response.CommunityResponse.IsSSOPost?l:response.CommunityResponse.RedirectURL,response.CommunityResponse.IsSSOPost?(u=openWindow(i,l,n,g,v),$$WPUtil.postForm(response.CommunityResponse.RedirectURL,response.CommunityResponse.SSOParams,u.name)):openWindow(i,l,n,g,v),$$WP.CommunityUtilities.logDeepLinkAudit("4",t.OrganizationId,response.EptId),response.RedirectToSignup&&$$WP.CommunityUtilities.markCommunityLinkDirty(t.OrganizationId)))},ot=function(n,t,i,u){var f,e=y,o,c,p;a&&(f=a.callback,a.callback=y,r||a.dispose());h.hide();errorMessage=$$WPUtil.IsNullOrEmpty(n)?"externalLinkErrorMessage":"externalLink"+n+"ErrorMessage";o=!t;t?e=[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("LogoutButtonText",s),y,b,l)]:i&&(e=[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("RefreshButtonText",s),y,rt,l)]);c=new $$WPComp.MessageComponent({Message:$$WP.Strings.get(errorMessage,s),IsClosable:o,ToolbarButtons:e,TitleText:u,callback:function(){f&&a.runCallback(f);t?CreateLogOutPopup(v):i&&location.reload()}});p=new $$WPUtil.quickPopup(c);p.show()};r!==0?(c.access=tt?"3":"4",$$WP.Strings.setOrganization(t,s),p={TitleText:$$WP.Strings.getForTemplate("RedirectPopupTitle",s),Html:$$WP.Templates.UI.AjaxSpinner({inline:1}),callback:ht,IsClosable:v,ToolbarButtons:[]},h=$$WPUtil.quickPopup(new $$WPComp.MessageComponent(p),{Size:$$WPContain.Popup.SizeEnum.SMALL,Class:"sm-autosizedpopup externalJumpRequestPopup Popup"}),$$WPUtil.ShowAjaxSpinner(h.$content.find(".ajaxspinner")),$$WP.Strings.clearOrganization(s)):(c.access="3",p={},u&&f&&(p.callback=u,p.context=f),a=new $$WPComp.ExternalJumpPopupComponent(p),a.initialize(),h=new $$WPContain.Popup({Components:[a],positioningFunction:$$WPContain.Positions.InsideNearTop,Size:$$WPContain.Popup.SizeEnum.LARGE,Class:"externaljumppopup",CommunicationsIndicator:w,BackButtonText:$$WP.Strings.get("ExitPopup",s),GetInvisibleLastFocusAnchor:function(n){return a.getLastFocusTrap(n)}}),h.show(v),h.setAppropriateScrollBar(),h.firstFocus.focus());o&&(c.access="5");c=$$WPUtil.postify(c);getCSRFTokenAsQS(function(){$.ajax({url:makeLink("ExternalJump/GetExternalJumpUrl"),type:"POST",data:c,dataType:"json",error:function(){ot(y,w)},cache:w,success:st})})};$$WP.CommunityUtilities.openDeepLinkType={InPopup:0,InNewTab:1,InNewWindow:2};$$WP.CommunityUtilities.logDeepLinkAudit=function(n,t,i){var r={};r.access=n;r.orgID=t;r.eptId=i;getCSRFTokenAsQS(function(){$.ajax({url:makeLink("ExternalJump/LogExternalJumpAudit"),type:"POST",data:r,cache:!1})})};$$WP.CommunityUtilities.markCommunityLinkDirty=function(n){var t={};t.organizationId=n;getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/MarkCommunityLinkDirty"),type:"POST",data:t,cache:!1})})};$$WP.CommunityUtilities.refreshCommunityLink=function(n){var t={},i=function(){location.reload()};t.organizationId=n;getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/RefreshCommunityLink"),type:"POST",data:t,cache:!1,error:i,success:i})})};$$WP.CommunityUtilities.getExternalJumpGUID=function(){return $$WPUtil.IsNullOrEmpty($$WP.CommunityUtilities._externalJumpGUID)&&($$WP.CommunityUtilities._externalJumpGUID=$$WPUtil.generateRandomGUID()),$$WP.CommunityUtilities._externalJumpGUID};$$WP.CommunityUtilities.getParentJumpGUID=function(){return $$WPUtil.IsNullOrEmpty($$WP.CommunityUtilities._parentJumpGUID)?"":$$WP.CommunityUtilities._parentJumpGUID};$$WP.CommunityUtilities.clearJumpGUIDs=function(){$$WP.CommunityUtilities._externalJumpGUID=null;$$WP.CommunityUtilities._parentJumpGUID=null};$$WP.CommunityUtilities.setJumpParameters=function(n,t){$$WPUtil.IsNullOrEmpty(n)||($$WP.CommunityUtilities._parentJumpGUID=n);$$WPUtil.IsNullOrEmpty(t)||($$WP.CommunityUtilities._parentDomain=t)};$$WP.CommunityUtilities.getParentDomain=function(){return $$WPUtil.IsNullOrEmpty($$WP.CommunityUtilities._parentDomain)?"":$$WP.CommunityUtilities._parentDomain};$$WP.CommunityUtilities.closeExternalParentPopup=function(){var n={},t;if(n.externalGUID=$$WP.CommunityUtilities.getParentJumpGUID(),n.message="closePopup",t=$$WP.CommunityUtilities.getParentDomain(),parent)try{parent.postMessage(JSON.stringify(n),t)}catch(i){console.error("Invalid Parent Domain")}WP.Comm.logOut();$$WP.CommunityUtilities.clearJumpGUIDs();$$WP.CommunityUtilities._parentDomain=null;self===top&&(self.location=makeLink("home/logout"))};$$WP.CommunityUtilities.externalJumpMessageListener=function(n){var i=$$WP.CommunityUtilities.getParentDomain(),t;n&&n.originalEvent&&n.originalEvent.origin===i&&n.originalEvent.data&&(t=JSON.parse(n.originalEvent.data),t.message==="logout"?(WP.Comm.logOut(),$$WP.CommunityUtilities.clearJumpGUIDs()):t.message==="valid"&&($$WP._isExternalJumpParentValid=!0))};$$WP.CommunityUtilities.checkIfCommunityJumpIsValid=function(){var t=$afe.select("body"),n,i;if(!t.hasClass("md_default")||t.hasClass("isPrelogin")||t.hasClass("PUpage")){if(self!==top){if(self.window.location.href.toLowerCase().indexOf("/err.asp?")>0)return;n={};n.message="isValidContext";n.externalGUID=$$WP.CommunityUtilities.getParentJumpGUID();i=$$WP.CommunityUtilities.getParentDomain();try{parent.postMessage(JSON.stringify(n),i)}catch(r){console.error("Parent Domain Validation failed")}setTimeout(function(){$$WP._isExternalJumpParentValid||top.location.replace(makeLink("home/logout"))},1e3)}}else self.location=makeLink("closeExternalJumpPopup.asp")};$$WP.CommunityUtilities.openDeepLinkUrl=function(n,t,i,r,u){var f=$$WPUtil.parseQueryString(n),e=f.mode;delete f.mode;$$WP.CommunityUtilities.openDeepLink(e,t,f,i,r,u)};$$WP.CommunityUtilities.ShowSignupFailedMessage=function(n){$$WP.CommunityUtilities.__showSignupFailureMessage(n,"SignupConnectionFailedMessage")};$$WP.CommunityUtilities.ShowSignUpNotAllowedMessage=function(n){$$WP.CommunityUtilities.__showSignupFailureMessage(n,"SignupNotAllowedMessage")};$$WP.CommunityUtilities.__showSignupFailureMessage=function(n,t){var i,r,u;$$WP.Strings.setDefaultNamespace("community.externallinking");$$WP.Strings.setOrganization(n);i=$$WP.Strings.get(t);r=$$WP.Strings.get("SignupErrorTitle");$$WP.Strings.clearOrganization();u=[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("ok","cancelpopup"),null,"previousstep","cancel")];$$WPUtil.quickMessageBox(i,r,u,null,null,"SignupNotAllowed");$afe.select(".SignupNotAllowed.component.Popup").removeClass("textlessTitle");$$WP.Strings.clearDefaultNamespace()};$$WP.CommunityUtilities.hasCommunityLinks=function(){return $afe.select("body").hasClass("hasNoCommunityLinks")?!1:!0};$$WP.CommunityUtilities.communityChecksuccesscallback=function(n){var i,t;n!==null&&typeof n!="undefined"&&(t=n.isCommunityActive,i=t?"hasCommunityLinks":"hasNoCommunityLinks",$$WP.CommunityUtilities.__isNotDotNetMode()&&$.ajax({url:makeLink("session.asp?mode=updateCommunityActiveCheckFlags&IsCommunityActive="+t)}),getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/UpdateCommunityActiveCheckFlags"),type:"POST"})}),$afe.select("body").removeClass("hasNoCommunityLinks hasCommunityLinks").addClass(i))};$$WP.CommunityUtilities.clearCommunityLinksSessionStatus=function(){$$WP.CommunityUtilities.__isNotDotNetMode()&&$.ajax({url:makeLink("session.asp?mode=clearCommunityActiveCheckFlags")});getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/ClearCommunityActiveCheckFlags"),type:"POST"})})};$$WP.CommunityUtilities.__isNotDotNetMode=function(){return $$WPUtil.IsNullOrEmpty($$WP.Settings.DotNetOnly)||!$$WP.Settings.DotNetOnly};$$WP.CommunityUtilities.checkIfCommunityLinksAvailable=function(){var n=$afe.select("body");n.hasClass("isPrelogin")||n.hasClass("termsPage")||getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/IsCommunityActive"),dataType:"JSON",type:"POST",cache:!1,success:$$WP.CommunityUtilities.communityChecksuccesscallback,failure:function(){$$WP.Debug.log("Community Links available ajax called failed.")}})})};$$WP.CommunityUtilities.getCommunityLinks=function(n,t,i,r){t=t||"*";n=n||function(){};r=r||window;i=i||[];var u=$$WP.CommunityUtilities.getCommunityLinks;if(u._links[t])return i.push(u._links[t]),n.apply(r,i);u._callback=n;u._args=i;u._context=r;u._waitingFor=t;getCSRFTokenAsQS(function(){$.ajax({url:makeLink("ExternalJump/GetCommunityLinks?requireSecurityForMode="+t),dataType:"JSON",type:"POST",cache:!1,success:$$WP.CommunityUtilities.getCommunityLinks.callStack,failure:function(){$$WP.CommunityUtilities.getCommunityLinks.callStack({ForMode:t,Organizations:[]})}})})};$$WP.CommunityUtilities.getCommunityLinks.callStack=function(n){var t=$$WP.CommunityUtilities.getCommunityLinks;t._links[n.ForMode]=n.Organizations;n.ForMode===t._waitingFor&&typeof t._callback=="function"&&(t._args.push(n.Organizations),t._callback.apply(t._context,t._args));t._waitingFor=null;t._callback=null};$$WP.CommunityUtilities.getCommunityLinks._links={};$$WP.CommunityUtilities.pickOrganization=function(n,t,i,r,u){$$WP.CommunityUtilities.getCommunityLinks(function(r){if(!r||r.length===0){i.push("1");n.apply(this,i);return}if(r.length===1){i.push(r[0]);n.apply(this,i);return}var s,h,o=[],f,e;for(e=r.length,e>3&&(e=3),f=0;f<r.length;f++)o.push(new $$WPComp.ComplexObjects.Button(new Handlebars.SafeString("<span class='orglogo roundedimage' style='background-image:url("+r[f].LogoUrl+");'><\/span> <span class='orgname'>"+HTMLEncode(r[f].OrganizationName)+"<\/span>"),null,"tertiary neutral CommunityLink community_"+e,f));s=new $$WPComp.MessageComponent({Message:t,callback:function(){arguments[arguments.length-1]!=="close"&&(arguments[arguments.length-1]=arguments[arguments.length-1].substr($$WPComp.TOOLBARIDENTIFIER.length),arguments[arguments.length-1]=this.links[arguments[arguments.length-1]],this.fun.apply(this,arguments))},TitleText:u,CallbackArgs:i,CallbackContext:{links:r,fun:n},ToolbarButtons:o});h=$$WPUtil.quickPopup(s,{Size:o.length<3?$$WPContain.Popup.SizeEnum.SMALL:$$WPContain.Popup.SizeEnum.MEDIUM,Class:"PickOrganization"});h.show()},r)};$$WP.CommunityUtilities.getOrganization=function(n,t,i,r){typeof t=="function"&&(r=r||window,i=i||[],$$WP.CommunityUtilities.getCommunityLinks(function(){for(var r=arguments[0],u=arguments[1],i=arguments[2],t=arguments[3],n=0;n<t.length;n++)if(t[n].OrganizationId===r){i.push(t[n]);break}u.apply(this,i)},null,[n,t,i],r))};$$WP.CommunityUtilities.getLoadingOrgNamesForHealthSummary=function(){var n=this;getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/Shared/GetLoadingAndErrorOrgNames"),type:"POST",cache:!1,data:{controllerType:9},dataType:"json",success:n.instantiateCommunityControllerForHealthSummary})})};$$WP.CommunityUtilities.UpdateBannerStringWithMnem=function(n,t,i,r){var u="Community.Shared",f;return $$WP.Strings.getNamespace(u).addMnemonic(t,n),f=/^\d+$/.test(n)?$$WP.Strings.get(r,u):$$WP.Strings.get(i,u),$$WP.Strings.removeMnemonic(t,u),f};$$WP.CommunityUtilities.UpdateBannerText=function(n,t,i,r){var f="@MYCHART@ManualOrgs@",e="Community.Shared",o,s,h,c,l,a,u;return $$WP.Strings.setDefaultNamespace(e),n!==""&&(o=$$WP.CommunityUtilities.UpdateBannerStringWithMnem(n,"@MYCHART@LoadingOrgs@","CurrentlyLoadingOneText","CurrentlyLoadingManyText"),s=!0),u=i!=="",t!==""?(h=$$WP.CommunityUtilities.UpdateBannerStringWithMnem(t,"@MYCHART@ErrorOrgs@","ErrorLoadingOneText","ErrorLoadingManyText"),c=u?r?$$WP.CommunityUtilities.UpdateBannerStringWithMnem(i,f,"ErrorLoadingAndOneManualSubtext","ErrorLoadingAndManyManualSubtext"):$$WP.CommunityUtilities.UpdateBannerStringWithMnem(i,f,"ErrorAndOneManualSubtextForSE","ErrorAndManyManualSubtextForSE"):r?$$WP.Strings.get("ErrorLoadingSubtext",e):"",l=!0):u&&(a=$$WP.CommunityUtilities.UpdateBannerStringWithMnem(i,f,"OneNonEpicUpdateDisclaimerText","ManyNonEpicUpdateDisclaimerText")),$$WP.Strings.clearDefaultNamespace(),{loadingOrgText:o,hasOrgsLoading:s,errorOrgText:h,errorOrgSubtext:c,hasOrgsWithErrors:l,nonEpicWarningText:a,hasOrgsManual:u}};$$WP.CommunityUtilities.instantiateCommunityControllerForHealthSummary=function(n){var r,t,u="",f="",e="",i;r=isShareEverywhere();t=r?!1:!0;u=n.loadingOrgNames;f=n.errorOrgNames;e=n.manualOrgNames;bannerText=$$WP.CommunityUtilities.UpdateBannerText(u,f,e,t);i=$afe.select("#refresh-banner-container");i.addClass("hidden");i.safeAppend($afe.renderTemplate($$WP.Templates.Community.NonEpicPretextBanner,{ShowDxrBannerAction:t,NonEpicWarningText:bannerText.nonEpicWarningText,HasOrgsLoading:bannerText.hasOrgsLoading,LoadingOrgText:bannerText.loadingOrgText,HasOrgsWithErrors:bannerText.hasOrgsWithErrors,ErrorLoadingText:bannerText.errorOrgText,ErrorLoadingSubtext:bannerText.errorOrgSubtext,HasOrgsManual:bannerText.hasOrgsManual}));$$WP.CommunityUtilities.instantiateCommunityController("HealthSummary",!0)};$$WP.CommunityUtilities.instantiateCommunityController=function(n,t){return t||$afe.select("#refresh-banner-button").length!==0?new $$WP.Community.CommunityController(n):null};$$WP.CommunityUtilities.createCommunityToast=function(n,t){n&&$$WP.UI.Toast.CreateSimpleToast(n,$$WP.UI.Toast.ToastTypeEnum.Warning,$$WP.CommunityUtilities.__saveDismissedFailedConnections.bind(null,t),null)};$$WP.CommunityUtilities.__saveDismissedFailedConnections=function(n){$.post({url:makeLink("Community/Shared/SaveDismissedFailedConnections"),contentType:"application/json",data:JSON.stringify(n),error:function(){return}})};$$WP.CommunityUtilities.autoExpandToFullSite=function(){var h="ExternalJump/GetMyChartFullAccessUrl",r="hidden",c="#content",u=!1,f,l=function(n){if(n&&typeof n=="string"&&(n=$.parseJSON(n)),n&&n.Redirection&&!$$WPUtil.IsNullOrEmpty(n.Redirection.RedirectURL)){var t=new $$WPComp.MessageComponent({TitleText:n.Title,Message:'<div class="center">'+n.LoadingMessage+'<\/div><div class="loadingHeart"><\/div>',IsClosable:u});$$WPUtil.quickPopup(t);n.Redirection.IsPost?$$WPUtil.postForm(n.Redirection.RedirectURL,n.Redirection.Params,"_self"):window.location.href=n.Redirection.RedirectURL}else e()},a=function(){$afe.select(c).removeClass(r);$afe.select("#footer").removeClass(r)},e=function(){if(a(),n.Utilities.UI.StopPageLoad=u,n.Utilities.UI.PageLoaded===!0){var t={};t.type="load";n.Utilities.UI.OnPageLoad(t)}},t,n,o,s,i;try{f=window.self!==window.top}catch(v){f=!0}f?a():($afe.select(c).addClass(r),$afe.select("#footer").addClass(r),t=t||{},t.PatientAccess=t.PatientAccess||{},n=n||t.PatientAccess,n.Utilities=n.Utilities||{},n.Utilities.UI=n.Utilities.UI||{},n.Utilities.UI.StopPageLoad=!0,o=window.self.location.href,s=o.toLowerCase().indexOf("/inside.asp"),s>0?(i={},i.relativeUrl=o.substring(s+1),i=$$WPUtil.postify(i),getCSRFTokenAsQS(function(){$.ajax({url:makeLink(h),type:"POST",data:i,dataType:"json",error:e,cache:u,success:l})})):$.ajax({url:makeLink(h),type:"POST",dataType:"json",error:e,cache:u,success:l}))},function(){var r="ErrorLabelText",i="string",u,f,n,e,t;$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.Div");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.Span");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.Img");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.Label");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.ErrorLabel");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.WarningIcon");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.MessageDisplay");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.Anchor");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.ValidationMessage");e=/(\w*="[^"]+")|(\w*='[^']+')/g;u=function(n){var h=" is not a valid attribute.",u,r,o,f,s,c,t;if(n&&typeof n!==i)return $$WP.Debug.logError("attributesStr is not a string."),{};if(u=n.match(e),!u||u.length<1)return $$WP.Debug.logError("attributesStr does not contain any attributes."),{};for(s={},r=0;r<u.length;r++)o=u[r],o?(f=o.split("="),f&&f.length===2?(c=f[0].trim(),t=f[1].trim(),t=t.substring(1,t.length-1),t=t.trim(),s[c]=t):$$WP.Debug.logError("piece "+r+h)):$$WP.Debug.logError("piece"+r+h);return s};f=function(n,t){var e="data-generated-by",r,f;if(!n||n.length===0){$$WP.Debug.logError("$newElement does not contain any elements!");return}if(t?typeof t===i&&(t=u(t)):t={},$$WP.Debug.IsEnabled&&"name"in Function&&typeof t[e]=="undefined")try{for(r=arguments.callee.caller;r&&r.name.indexOf("WP$ST")===0;)r=r.caller;r&&(t[e]=r.name)}catch(o){}for(f in t)n.safeAttr(f,t[f])};n=function(n,t,r){return f(n,t),r&&(typeof r===i?n.text(r):n.safeAppend(r)),n};$$WP.SimpleTemplates.Div=function(t,i){var r;return r=$afe.jq(document.createElement("div")),n(r,t,i),r};$$WP.SimpleTemplates.Span=function(t,i){var r;return r=$afe.jq(document.createElement("span")),n(r,t,i),r};$$WP.SimpleTemplates.Img=function(t){var i;return i=$afe.jq(document.createElement("img")),n(i,t),i};$$WP.SimpleTemplates.Label=function(t,i){var r;return r=$afe.jq(document.createElement("label")),n(r,t,i),r};$$WP.SimpleTemplates.ErrorLabel=function(){return $$WP.SimpleTemplates.Span({"class":"clearlabel"},$$WP.Strings.get(r))};$$WP.SimpleTemplates.WarningIcon=function(n){var i,r,u=makeStaticImageLink("error_circle.png");return i={src:u,"class":"yield",alt:""},$.type(n)==="object"?($$WPUtil.mergeObjects(n,i,!1,!0),r=$$WP.SimpleTemplates.Img(i)):(t===null&&(t=$$WP.SimpleTemplates.Img(i)),r=t.clone()),r};t=null;$$WP.SimpleTemplates.MessageDisplay=function(n,t){var i={"class":"messagedisplay invisible","data-message-for":n,"data-script-generated":null};return t&&typeof t=="object"&&$$WPUtil.mergeObjects(t,i,!1,!0),$$WP.SimpleTemplates.Div(i,"|")};$$WP.SimpleTemplates.Anchor=function(t,i){var r;return r=$afe.jq(document.createElement("a")),n(r,t,i),r};$$WP.SimpleTemplates.Option=function(t,i){var r;return r=$afe.jq(document.createElement("option")),n(r,t,i),r};$$WP.SimpleTemplates.ValidationMessage=function(t,i){var u;return i=i||{},i.class=i.class||"",i.class+=" alert validationmessage",u=$afe.jq(document.createElement("div")),n(u,i,t),u.safePrepend($$WP.SimpleTemplates.WarningIcon({alt:$$WP.Strings.get(r)})),u}}();$$WP.Strings={_DefaultNamespace:[],_Namespaces:{},EncodingTypes:{None:0,HTML:1}};$$WP.Strings.ComplexObjects={Namespace:function(n,t,i){var r=this;r._Parent=n||null;r._Mnemonics=t||{};i=(i||"").toLowerCase();r._Parent&&r._Parent!==$$WP.Strings._Namespaces?r.Name=r._Parent.Name+"."+i:(r.Name=i,r._Parent=$$WP.Strings._Namespaces.global)}};$$WP.Strings.ComplexObjects.Namespace.prototype={_Parent:null,_Mnemonics:null,Name:null,addString:function(n,t){this[n]={name:n,namespace:this.Name,value:t}},removeString:function(n){this[n]=null},getString:function(n){for(var t=this;t&&typeof t[n]=="undefined";)t=t._Parent;return t?this.replaceMnemonics(t[n].value||""):""},getStringForTemplate:function(n){return new Handlebars.SafeString(this.getString(n))},getKeyedString:function(n,t){var i;return i=this.getString(n+"_"+t),i.length===0&&(i=this.getString(n)),i},addMnemonic:function(n,t,i){var r="undefined",u;if(typeof t!==r&&t!==null){if(typeof n!="string"){$$WP.Debug.logError("mnemonicName must be a string. ["+typeof n+"]");return}t instanceof Handlebars.SafeString&&$$WP.Debug.log("value should be a string, not a SafeString.",!0);typeof i===r&&(i=$$WP.Strings.EncodingTypes.HTML);typeof t=="string"&&(u="$$$$",t=t.replace("$",u));this._Mnemonics[n]={Value:t.toString(),EncodingType:i}}},removeMnemonic:function(n){this._Mnemonics[n]=null},containsMnemonic:function(n){return this._Mnemonics[n]&&this._Mnemonics[n].Value!==""?!0:!1},replaceMnemonics:function(n){for(var i,u,r,f,t=this;t;){if(t._Mnemonics)for(i in t._Mnemonics)if(t._Mnemonics[i]!==null&&(r=t._Mnemonics[i].Value,f=t._Mnemonics[i].EncodingType,typeof r=="string"||typeof r=="number"))try{u=new RegExp(i,"gi");f!==$$WP.Strings.EncodingTypes.None&&(r=HTMLEncode(r));n=n.replace(u,r)}catch(e){$$WP.Debug.logError("addMnemonic was called for a mnemonic whose key does not work as a regular expression: "+i)}t=t._Parent}return n},addStrings:function(n){for(var t in n)n.hasOwnProperty(t)&&(this[t]={name:t,namespace:this.Name,value:n[t]})},addMnemonics:function(n){var t;for(t in n)this.addMnemonic(t,n[t].Value,n[t].EncodingType)},clearMnemonics:function(){var n;for(n in this._Mnemonics)this.removeMnemonic(n)},setOrganization:function(n){if(!n){$$WP.Debug.logError("Missing organization record",!0);return}this.addMnemonic("@MYCHART@OrganizationId@",n.OrganizationId);this.addMnemonic("@MYCHART@OrganizationName@",n.OrganizationName)},clearOrganization:function(){this.removeMnemonic("@MYCHART@OrganizationId@");this.removeMnemonic("@MYCHART@OrganizationName@")}};$$WP.Strings._Namespaces.global=new $$WP.Strings.ComplexObjects.Namespace(null);$$WP.Strings.get=function(n,t){return $$WP.Strings.getNamespace(t).getString(n)};$$WP.Strings.getForTemplate=function(n,t){var i;return i=$$WP.Strings.getNamespace(t).getString(n),new Handlebars.SafeString(i)};$$WP.Strings.setDisplayText=function(n,t,i){var r;return n?(r=$$WP.Strings.get(t,i),dangerou$.setHtml(n,r),r):null};$$WP.Strings.addMnemonic=function(n,t,i,r,u){i===!0&&(t=makeLink(t));$$WP.Strings.getNamespace(r).addMnemonic(n,t,u)};$$WP.Strings.removeMnemonic=function(n,t){$$WP.Strings.getNamespace(t).removeMnemonic(n)};$$WP.Strings.containsGlobalMnemonic=function(n){return $$WP.Strings.getNamespace("Global").containsMnemonic("@MYCHART@"+n+"@")};$$WP.Strings.add=function(n,t,i){$$WP.Strings.getNamespace(i).addString(n,t)};$$WP.Strings.setDefaultNamespace=function(n){n?$$WP.Strings._DefaultNamespace.push($$WP.Strings.getNamespace(n)):$$WP.Strings._DefaultNamespace.pop()};$$WP.Strings.clearDefaultNamespace=function(){$$WP.Strings.setDefaultNamespace(null)};$$WP.Strings.getNamespace=function(n){var u,i,r,t;if(n instanceof $$WP.Strings.ComplexObjects.Namespace)return n;if(typeof n=="string"){for(n=n.toLowerCase(),u=n.split("."),t=$$WP.Strings._Namespaces,r=0;r<u.length;r++)i=u[r],typeof t[i]=="undefined"&&(t[i]=new $$WP.Strings.ComplexObjects.Namespace(t,null,i)),t=t[i];return t}return!$$WP.Strings._DefaultNamespace||!$$WP.Strings._DefaultNamespace.length?($$WP.Debug.logError("Something removed the global namespace as the default namespace."),$$WP.Strings._Namespaces.global):$$WP.Strings._DefaultNamespace[$$WP.Strings._DefaultNamespace.length-1]};$$WP.Strings.setOrganization=function(n,t){$$WP.Strings.getNamespace(t).setOrganization(n)};$$WP.Strings.clearOrganization=function(n){$$WP.Strings.getNamespace(n).clearOrganization()};$$WP.Strings.appendNewWindowNotification=function(n,t){return t==="_blank"?n+" "+$$WP.Strings.get("NewWindowNotification"):n};$$WP.Strings.setDefaultNamespace("Global");StringResources=$$WP.Strings._Namespaces;var submitcount=0,isTabAllowed=!0,ALPHANUMERIC="1",EQUAL_TO_CODE="2",GREATER_THAN_CODE="3",LESS_THAN_CODE="4",REMOVE_IF_EQUAL_TO_REMOVE_CHAR="1",REMOVE_NONNUMERIC="2",BIRTH_YEAR_MIN_YEARS_BACK=10,WP,$$WP;typeof WP=="undefined"&&(WP={});typeof WP.myPath=="undefined"&&(WP.myPath=self.location.pathname.substr(0,self.location.pathname.indexOf(".asp")),WP.myPath.length===0&&(WP.myPath=self.location.pathname.substr(0,self.location.pathname.indexOf(".htm"))),WP.myPath=WP.myPath.length===0?self.location.pathname:self.location.pathname.substr(0,WP.myPath.lastIndexOf("/")+1));$$WP=$$WP||{};pre_checkActivity=checkActivity;navigator.appName=="Netscape"&&(window.captureEvents(Event.KEYPRESS),window.onkeypress=doMainKeyPress);getParentDocument()||console.log("Warning: Application is being displayed in a frame hosted on a different domain.");HTMLEncodeDecodeDiv=document.createElement("div");$$WP.Utilities=$$WP.Utilities||{};$$WP.Utilities.Global=$$WP.Utilities.Global||{};$$WP.Utilities.Global.HtmlEntities={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"};$$WP.Utilities.Global.HtmlChars=/[&<>"'\/`]/g;$$WP.Utilities.HtmlEncodeCallback=function(n){return $$WP.Utilities.Global.HtmlEntities[n]||n};try{$$WP&&$$WP.Utilities&&!$$WP.Utilities.isValidBrowser()&&window.location.href.indexOf("Home/Error?Code=4")===-1&&(window.location=makeLink("Home/Error?Code=4"))}catch(ex){}