PageSourceSearch

https://my.mainlinehealth.org/MyChart/Scripts/lib/Widget/openschedulingsimple.js?updateDt=cb543d0d8cdcbd512900

js mainlinehealth.org collected 2026-10-02 02:54:32 UTC 4,997 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmychartWidget=self.webpackChunkmychartWidget||[]).push([[940],{551:(e,t,a)=>{a.r(t),a.d(t,{getConfig:()=>y});var n=a(211);function i(e,t){const a=(0,n.d)(t);if(t.additionalParams&&(a.visitType=t.additionalParams.visittype,a.provider=t.additionalParams.provider,a.department=t.additionalParams.department,a.numDays=+t.additionalParams.numdays||2,a.numSlotsPerDay=+t.additionalParams.numslotsperday||3,a.startDate=t.additionalParams.startdate,a.telehealthMode=t.additionalParams.telehealthmode,t.additionalParams.passthroughparams)){a.passThroughParams={};for(const e in t.additionalParams.passthroughparams)e&&(a.passThroughParams[e]=t.additionalParams.passthroughparams[e])}return t.accessToken&&(a.accessToken=t.accessToken),a}var o,r=a(617);function s(e){const t=(0,r.X)(e);return t.passthroughparams=(0,r.X)(e,"^data-additionalparams-passthroughparams-"),t}function d(e){const t=document.querySelectorAll(`#${e} .myc_error`);t.length>0&&t[0].classList.remove("myc_hidden")}function c(e){const t=document.querySelectorAll(`#${e} .myc_loadingSpinner`);t.length>0&&t[0].classList.add("myc_hidden")}!function(e){e[e.NotDefined=0]="NotDefined",e[e.InPerson=1]="InPerson",e[e.Video=2]="Video",e[e.Telephone=3]="Telephone"}(o||(o={}));var l=function(e,t,a,n){return new(a||(a=Promise))((function(i,o){function r(e){try{d(n.next(e))}catch(e){o(e)}}function s(e){try{d(n.throw(e))}catch(e){o(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,s)}d((n=n.apply(e,t||[])).next())}))};var u=function(e,t,a,n){return new(a||(a=Promise))((function(i,o){function r(e){try{d(n.next(e))}catch(e){o(e)}}function s(e){try{d(n.throw(e))}catch(e){o(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,s)}d((n=n.apply(e,t||[])).next())}))};function m(e){const{url:t="",containerId:a="",containerRef:n,apiKey:i="",visitType:r="",provider:s="",department:m="",numDays:h=0,numSlotsPerDay:p=0,startDate:f="",telehealthMode:y=o.NotDefined,passThroughParams:g={},lang:v="",highContrast:P=!1,accessToken:T=""}=e,S={HostName:t,ContainerId:a,ContainerRef:n,VisitTypeId:r,ProviderId:s,DepartmentId:m,NumDays:h,NumSlotsPerDay:p,StartDate:f,TelehealthMode:y,PassThroughParams:g,BrowserTimeZoneOffset:(new Date).getTimezoneOffset()};for(const e in g)e&&(S.PassThroughParams[e]=g[e]);S.PassThroughParams.lang=v,S.PassThroughParams.highContrast=P?"1":"0";const D=e=>`\n\t\t${S.HostName}/Scheduling/Embedded/${e}?\n\t\tapiKey=${i}\n\t\t&lang=${v}\n\t\t`,W=D("SimpleWidgetContainer"),N=D("SimpleWidgetContent"),b=D("GetSimpleWidgetTokenExchangeUrl");return{initSimpleWidget:()=>u(this,void 0,void 0,(function*(){let e;e=n||document.querySelectorAll(`#${a}`)[0];try{const a=yield(t=W,fetch(t,{method:"POST",cache:"no-cache"}).then((e=>e.text())));a?e.innerHTML=a:d(e.id)}catch(t){return void d(e.id)}var t;const i=e.getElementsByClassName("WidgetTokenContainer")[0].getElementsByTagName("input")[0].value;try{const t=yield function(e,t,a,n){return fetch(e,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json",__WidgetHeader:a,Authorization:n},body:JSON.stringify(t)}).then((e=>e.text()))}(N,S,i,T);if(c(e.id),t){const a=e.querySelectorAll(".myc_osSimpleWidget")[0];a.innerHTML=t,T&&function(e,t,a,n){e.querySelectorAll("button[data-tokenExchangeDestination]").forEach((e=>{e.addEventListener("click",(e=>l(this,void 0,void 0,(function*(){var i;const o=e.target.dataset.tokenexchangedestination||"",r=yield function(e,t,a,n){return fetch(e,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json",__WidgetHeader:a,Authorization:n},body:JSON.stringify({destination:t})}).then((e=>e.json()))}(t,o,a,n);(null!==(i=window.top)&&void 0!==i?i:window.parent).location=r.tokenExchangeUrl}))))}))}(a,b,i,T)}else d(e.id);return}catch(t){return c(e.id),void d(e.id)}}))}}function h(e){m(e).initSimpleWidget()}var p=a(512);function f(e,t){var a,n,i,r,s,d;let c=!0;const l=null===(a=t.additionalParams)||void 0===a?void 0:a.startdate,u=null===(n=t.additionalParams)||void 0===n?void 0:n.numdays,m=null===(i=t.additionalParams)||void 0===i?void 0:i.numslotsperday,h=null===(r=t.additionalParams)||void 0===r?void 0:r.telehealthmode,f=+u||0,y=+m||0;return l&&Number.isNaN(Date.parse(l))&&((0,p.W)(e,"StartDate must be in ISO date format"),c=!1),u&&(f<1||f>4)&&((0,p.W)(e,"NumDays must be between 1 and 4"),c=!1),m&&y<1&&((0,p.W)(e,"NumSlotsPerDay must be greater than 0"),c=!1),h&&(+h<o.NotDefined||+h>o.Telephone)&&((0,p.W)(e,"Telehealth mode must be between 0 and 3"),c=!1),(null===(s=t.additionalParams)||void 0===s?void 0:s.visittype)||((0,p.W)(e,"Visit type must be specified"),c=!1),(null===(d=t.additionalParams)||void 0===d?void 0:d.department)||((0,p.W)(e,"Department must be specified"),c=!1),c}function y(){return{buildWidget:i,render:h,extractAdditionalParameters:s,validateAdditionalParameters:f,cssFiles:["/en-us
1/styles/OpenSchedulingSimpleWidget.css"]}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.