@icanbwell/composite 1.646.0 → 1.648.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/184.index.js CHANGED
@@ -412,6 +412,8 @@ Take a look at the reducer(s) handling this action type: `+We.type+`.
412
412
  containerMaxWidth
413
413
  popularHealthSystemsLink
414
414
  unifiedSearchConnectionTypes
415
+ enableIncludeInactiveFilter
416
+ enableIncludePopulatedProaOnlyFilter
415
417
  }
416
418
  }
417
419
  }
@@ -522,6 +524,11 @@ Take a look at the reducer(s) handling this action type: `+We.type+`.
522
524
  enabled
523
525
  icon
524
526
  }
527
+ scheduling {
528
+ enabled
529
+ url
530
+ icon
531
+ }
525
532
  }
526
533
  allergies {
527
534
  label
@@ -2789,6 +2796,8 @@ Take a look at the reducer(s) handling this action type: `+We.type+`.
2789
2796
  containerMaxWidth
2790
2797
  popularHealthSystemsLink
2791
2798
  unifiedSearchConnectionTypes
2799
+ enableIncludeInactiveFilter
2800
+ enableIncludePopulatedProaOnlyFilter
2792
2801
  }
2793
2802
  }
2794
2803
  }
@@ -2899,6 +2908,11 @@ Take a look at the reducer(s) handling this action type: `+We.type+`.
2899
2908
  enabled
2900
2909
  icon
2901
2910
  }
2911
+ scheduling {
2912
+ enabled
2913
+ url
2914
+ icon
2915
+ }
2902
2916
  }
2903
2917
  allergies {
2904
2918
  label
@@ -5324,7 +5338,7 @@ Take a look at the reducer(s) handling this action type: `+We.type+`.
5324
5338
  questionnaireName
5325
5339
  }
5326
5340
  }
5327
- `));function uwe(e){const t=Object.assign(Object.assign({},Zc),e);return Apollo.useQuery(V$,t)}function cwe(e){const t=Object.assign(Object.assign({},Zc),e);return Apollo.useLazyQuery(V$,t)}const lwe=e=>useMutation(CreateOauthThirdPartyConnection,e),fwe=e=>useMutation(DisconnectUserToken,e),_we=e=>useMutation(CreateConnectionStatus,e),dwe=e=>useQuery(GetMemberConnections,e),pwe=e=>useQuery(GetConnections,e),hwe=e=>useQuery(GetConnection,e),Swe=e=>useQuery(GetOauthGeneratedUrl,e);var G$=p(46),Hp,Em;class B${constructor(){this.type="backend",Hp.set(this,void 0),Em.set(this,void 0)}init(t,{clientSlug:r,apiClient:n}){if(!n)throw t.logger.error('"apiClient" not supplied to "QueryBackend".'),new Error('"apiClient" required for "QueryBackend".');Du(this,Hp,r,"f"),Du(this,Em,uU(n),"f")}read(t,r,n){return sm(this,void 0,void 0,function*(){try{const{translation:i}=yield Jr(this,Em,"f").getClientTranslations({name:Jr(this,Hp,"f"),key:r,lang:t});n(null,i?.json||{})}catch{const a=`Error fetching translation with key "${r}" and client "${Jr(this,Hp,"f")||"N/A"}".`;n(a,null)}})}}Hp=new WeakMap,Em=new WeakMap,B$.type="backend";var zf;class k${constructor(t){this.type="logger",zf.set(this,void 0),Du(this,zf,t,"f")}log([t,r,...n]){Jr(this,zf,"f").info({meta:r},t,...n)}warn([t,r,...n]){Jr(this,zf,"f").error({meta:r},t,...n)}error([t,r,...n]){Jr(this,zf,"f").error({meta:r},t,...n)}}zf=new WeakMap,k$.type="logger";var vm,mm,el,Yp,Ii,tl;const j$="appLanguage";class Pa{constructor({keys:t,nativeBridge:r,fallbackKeys:n=[],defaultLanguage:i="en",logger:a,parent:u,debug:c=!1,remoteConfig:v={}}){el.set(this,void 0),Yp.set(this,void 0),Ii.set(this,void 0),tl.set(this,void 0),Du(this,el,t,"f"),Du(this,Yp,n,"f"),Du(this,tl,r,"f");const _={lng:i,fallbackNS:Jr(this,Yp,"f"),debug:c,defaultNS:t,returnNull:!1};u?Du(this,Ii,u.cloneInstance(_),"f"):(Du(this,Ii,ea.createInstance(),"f"),a&&Jr(this,Ii,"f").use(new k$(a.child({library:"@icanbwell/i18n"}))),v.apiClient&&Jr(this,Ii,"f").use(B$),Jr(this,Ii,"f").init(Object.assign(Object.assign({},_),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:v,saveMissing:!0,missingKeyHandler:(h,L,W)=>Jr(this,Ii,"f").services.logger.error(`missing key: ${W}; language: ${h}; key: ${L}`)}))),this.t=Jr(this,Ii,"f").t,Pa.resolvedLanguage=Jr(this,Ii,"f").resolvedLanguage||i}load(){var t;return sm(this,void 0,void 0,function*(){const r=(yield(t=Jr(this,tl,"f"))===null||t===void 0?void 0:t.storage.getItem(j$))||Pa.resolvedLanguage;r!==Pa.resolvedLanguage&&(yield Jr(this,Ii,"f").changeLanguage(r),Pa.resolvedLanguage=r),yield Jr(this,Ii,"f").loadNamespaces(Jr(this,el,"f"));const n=Jr(this,el,"f").filter(i=>!Jr(this,Ii,"f").hasResourceBundle(r,i));if(n.length)throw new Error(`Error loading translations for key(s): ${n.join(", ")}`);return Jr(Pa,vm,"f",mm).emit("changeLanguage",r),this})}child(t){return new Pa(Object.assign(Object.assign({},t),{nativeBridge:Jr(this,tl,"f"),fallbackKeys:[...Jr(this,Yp,"f"),...Jr(this,el,"f")],parent:Jr(this,Ii,"f"),defaultLanguage:Jr(this,Ii,"f").language}))}get isLoaded(){return Jr(this,el,"f").every(t=>Jr(this,Ii,"f").hasResourceBundle(Jr(this,Ii,"f").language,t))}changeLanguage(t){var r;return sm(this,void 0,void 0,function*(){Pa.resolvedLanguage=t,yield Jr(this,Ii,"f").changeLanguage(t),Jr(Pa,vm,"f",mm).emit("changeLanguage",t),yield(r=Jr(this,tl,"f"))===null||r===void 0?void 0:r.storage.setItem(j$,t),Jr(this,tl,"f").reloadView()})}get resolvedLanguage(){return Pa.resolvedLanguage}onChangeLanguage(t){Jr(Pa,vm,"f",mm).on("changeLanguage",t)}}vm=Pa,el=new WeakMap,Yp=new WeakMap,Ii=new WeakMap,tl=new WeakMap,mm={value:new G$},Pa.resolvedLanguage="en";var PC=p(1827),qp;(function(e){e.one="1.0.0"})(qp||(qp={}));const Tm="orchestrator:native-bridge",p9={id:Tm,dependencies:{featureServices:{}},create:()=>({[qp.one]:()=>({featureService:PC.b})})};var Kp;(function(e){e.one="1.0.0"})(Kp||(Kp={}));const Am="orchestrator:translation-service",h9={id:Am,dependencies:{featureServices:{[za]:Nr.one,[js]:Pu.one,[Wn]:vi.one,[Mp]:Bf.one,[Tm]:qp.one}},create:({featureServices:e})=>{const t=e[za],r=e[js],n=e[Mp],{slug:i}=e[Wn].getClientContext(),a=e[Tm],u=new Pa({keys:[],nativeBridge:a,defaultLanguage:"en",logger:r,remoteConfig:{clientSlug:i,apiClient:t}});return n.setProfileProperties({language:u.resolvedLanguage}),u.onChangeLanguage(c=>n.setProfileProperties({language:c})),{[Kp.one]:()=>({featureService:u})}}};var Xf,Jf,gm,rl;const ym="tokens";class S9{constructor({apiClient:t,stateService:r,identityGatewaySdk:n,storage:i}){Xf.set(this,void 0),Jf.set(this,void 0),gm.set(this,void 0),rl.set(this,void 0),(0,F.GG)(this,Xf,t,"f"),(0,F.GG)(this,Jf,r,"f"),(0,F.GG)(this,gm,n,"f"),(0,F.GG)(this,rl,i,"f")}getStoredTokens(){const t=(0,F.gn)(this,rl,"f").getItem(ym);return t?JSON.parse(t):void 0}removeStoredTokens(){(0,F.gn)(this,rl,"f").removeItem(ym)}storeTokens(t){(0,F.gn)(this,rl,"f").setItem(ym,JSON.stringify(t))}logout(){return(0,F.sH)(this,void 0,void 0,function*(){const t=(0,F.gn)(this,Jf,"f").getUserTokenData().accessToken.jwtToken,{key:r,variant:n}=(0,F.gn)(this,Jf,"f").getClientContext();n!==te.GUEST&&(yield(0,F.gn)(this,gm,"f").logout({accessToken:t},{context:{headers:{clientKey:r}}})),(0,F.gn)(this,Xf,"f").stop(),(0,F.gn)(this,Xf,"f").clearAuth(),yield(0,F.gn)(this,Xf,"f").clearStore(),(0,F.gn)(this,Jf,"f").logoutUser(),(0,F.gn)(this,rl,"f").removeItem(ym)})}}Xf=new WeakMap,Jf=new WeakMap,gm=new WeakMap,rl=new WeakMap;var Rm;(function(e){e.one="1.0.0"})(Rm||(Rm={}));const H$="orchestrator:identity-utils",E9={id:H$,dependencies:{featureServices:{[za]:Nr.one,[js]:Pu.one,[Wn]:vi.one,[Mp]:Bf.one}},create:({featureServices:e})=>{const t=e[za];return{[Rm.one]:()=>({featureService:new S9({apiClient:t,stateService:e[Wn],identityGatewaySdk:Sx(t),storage:window.sessionStorage})})}}};var Om;(function(e){e.one="1.0.0"})(Om||(Om={}));const Y$="orchestrator:globaleventemitter-service",v9=e=>({id:Y$,create:()=>({[Om.one]:()=>({featureService:e})})});var bm;(function(e){e.one="1.0.0"})(bm||(bm={}));const q$="orchestrator:reboot-controller",m9=e=>({id:q$,create:()=>({[bm.one]:()=>({featureService:e})})});class Bi extends Error{constructor(t,r){super(t),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(t){return t instanceof Bi}}class Ewe extends Bi{constructor(t="Authentication Error"){super(t),this.name="AuthenticationError"}}class vwe extends Bi{constructor(t="Illegal Argument Error"){super(t),this.name="IllegalArgumentError"}}class mwe extends Bi{constructor(t="Illegal State Error"){super(t),this.name="IllegalStateError"}}class T9 extends Bi{constructor(t="Invalid Client Key Error"){super(t),this.name="InvalidClientKeyError"}}class MC extends Bi{constructor(t,r){super(t),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class Zf extends Bi{constructor(t="Invalid Token Error"){super(t),this.name="InvalidTokenError"}}class A9 extends Bi{constructor(t,r){super(t),this.status=r,this.name="NetworkError"}}class g9 extends Bi{constructor(t){super(t.message()),this.operationOutcome=t,this.name="OperationOutcomeError"}}class IC extends Bi{constructor(t,r){super(t),this.data=r,this.name="UnknownError"}}class y9 extends Bi{constructor(t){super(t.join(". ")),this.errors=t,this.name="ValidationError"}}class ar{constructor(t,r){this.data=t,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(t){return new ar(void 0,t)}}var K$=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Cm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Wp,Qp;class Kt{static success(t){return new R9(t)}static failure(t){return new Pm(t)}}class R9 extends Kt{constructor(t){super(),Wp.set(this,void 0),K$(this,Wp,t,"f")}data(){return Cm(this,Wp,"f")}error(){throw Cm(this,Wp,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new ar(this.data())}}Wp=new WeakMap;class Pm extends Kt{constructor(t){super(),Qp.set(this,void 0),K$(this,Qp,t,"f")}data(){throw Cm(this,Qp,"f")}error(){return Cm(this,Qp,"f")}success(){return!1}failure(){return!0}intoFailure(){return Kt.failure(this.error())}toQueryResult(){return new ar(void 0,this.error())}}Qp=new WeakMap;var NC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},zp;class O9{constructor(){zp.set(this,[])}add(t){NC(this,zp,"f").push(t)}errors(){return NC(this,zp,"f")}hasErrors(){return NC(this,zp,"f").length>0}}zp=new WeakMap;var W$=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},LC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Xp,Mm;class b9{constructor(t){Xp.set(this,void 0),Mm.set(this,void 0),W$(this,Mm,t,"f"),W$(this,Xp,this.transformInput(t),"f")}validate(){return Kt.success(null)}data(){return LC(this,Xp,"f")}toJSON(){return LC(this,Xp,"f")}transformInput(t){return t}input(){return LC(this,Mm,"f")}}Xp=new WeakMap,Mm=new WeakMap;class sa extends b9{validate(){const t=new O9;return this.validator.validate(this.input(),t),t.hasErrors()?Kt.failure(new y9(t.errors())):Kt.success(null)}}var Q$=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Im,z$,X$;const J$=100,C9=20;class qs{constructor(){Im.add(this)}validate(t,r){Q$(this,Im,"m",z$).call(this,t.page,r),Q$(this,Im,"m",X$).call(this,t.pageSize,r)}}Im=new WeakSet,z$=function(t,r){t<0&&r.add("page must be a positive number")},X$=function(t,r){t!==void 0&&(t<=0&&r.add("Page size must be greater than 0"),t>J$&&r.add(`Page size must not exceed ${J$}`))};class Ks extends sa{constructor(){super(...arguments),this.validator=new qs}transformInput(t){return Object.assign({pageSize:C9},t)}}function P9(){var e;return!(typeof process>"u"||((e=process.versions)===null||e===void 0?void 0:e.node)===void 0)}function M9(){return typeof window<"u"}function Z$(){if(M9())return"browser";if(P9())return"node";throw new Error("Invalid runtime")}function I9(e){switch(Z$()){case"browser":return e.browser();case"node":return e.node()}}function eV(e){switch(Z$()){case"node":return Buffer.from(e,"base64").toString("utf-8");case"browser":return atob(e)}}function Fn(e){return e!=null}function Fo(e){return e==null}function Twe(e){return Fn(e)&&e!==""}function Ws(e){return e==null||e===""}function ka(e){return e===void 0}function ki(e){return e!==void 0}function N9(e){return JSON.parse(eV(e)).env}const L9=3;function tV(e){const t=e.split("."),r=t[1];if(r===void 0||t.length!==L9)throw new Zf("Token is missing data and may be corrupted");try{return JSON.parse(eV(r))}catch(n){const i=n;throw new Zf(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function D9(e){const r=tV(e).exp;if(typeof r!="number")throw new Zf("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const w9="custom:clientFhirPersonId",U9="custom:bwellFhirPatientId";function x9(e){const t=tV(e),r=t[U9],n=t[w9];return Fn(r)&&Fn(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}function $o(e){return e.trim()===""}const F9="1.32.1";function $9(){return F9}var DC;(function(e){e.Arrived="ARRIVED",e.Booked="BOOKED",e.Cancelled="CANCELLED",e.CheckedIn="CHECKED_IN",e.EnteredInError="ENTERED_IN_ERROR",e.Fulfilled="FULFILLED",e.Noshow="NOSHOW",e.Pending="PENDING",e.Proposed="PROPOSED",e.Waitlist="WAITLIST"})(DC||(DC={}));var rV;(function(e){e.Guest="GUEST"})(rV||(rV={}));var Nm;(function(e){e.CommunicationPreferencesPhi="COMMUNICATION_PREFERENCES_PHI",e.DataSharing="DATA_SHARING",e.HealthCircleAdolescent="HEALTH_CIRCLE_ADOLESCENT",e.HealthCircleMinor="HEALTH_CIRCLE_MINOR",e.HealthMatch="HEALTH_MATCH",e.IasImportRecords="IAS_IMPORT_RECORDS",e.MobileCommunicationPreferences="MOBILE_COMMUNICATION_PREFERENCES",e.PersonalizedHealthOffersAndAds="PERSONALIZED_HEALTH_OFFERS_AND_ADS",e.ProaAttestation="PROA_ATTESTATION",e.Tos="TOS"})(Nm||(Nm={}));var nV;(function(e){e.Bwell="bwell"})(nV||(nV={}));var iV;(function(e){e.Bwell="BWELL"})(iV||(iV={}));var aV;(function(e){e.Basic="BASIC",e.Oauth="OAUTH"})(aV||(aV={}));var wC;(function(e){e.Deny="DENY",e.Permit="PERMIT"})(wC||(wC={}));var UC;(function(e){e.Active="ACTIVE",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Inactive="INACTIVE",e.Proposed="PROPOSED",e.Rejected="REJECTED"})(UC||(UC={}));var oV;(function(e){e.Usd="USD"})(oV||(oV={}));var sV;(function(e){e.Connected="CONNECTED",e.Deleted="DELETED",e.Disconnected="DISCONNECTED",e.Error="ERROR",e.Expired="EXPIRED"})(sV||(sV={}));var uV;(function(e){e.Clinical="CLINICAL",e.Insurance="INSURANCE",e.Lab="LAB",e.Pharmacy="PHARMACY",e.Practitioner="PRACTITIONER"})(uV||(uV={}));var Lm;(function(e){e.Connecthub="connecthub",e.Nppes="nppes"})(Lm||(Lm={}));var cV;(function(e){e.Connecthub="CONNECTHUB",e.Nppes="NPPES"})(cV||(cV={}));var lV;(function(e){e.BwellPatient="BWELL_PATIENT",e.BwellPerson="BWELL_PERSON",e.ClientPatient="CLIENT_PATIENT",e.ClientPerson="CLIENT_PERSON"})(lV||(lV={}));var fV;(function(e){e.Active="active",e.EnteredInError="entered_in_error",e.Error="error",e.Off="off",e.Suspended="suspended",e.Test="test"})(fV||(fV={}));var _V;(function(e){e.Active="ACTIVE",e.EnteredInError="ENTERED_IN_ERROR",e.Error="ERROR",e.Off="OFF",e.Suspended="SUSPENDED",e.Test="TEST"})(_V||(_V={}));var xC;(function(e){e.CustomEvent="CUSTOM_EVENT",e.MobilePushOpen="MOBILE_PUSH_OPEN"})(xC||(xC={}));var FC;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(FC||(FC={}));var $C;(function(e){e.Person="Person"})($C||($C={}));var VC;(function(e){e.Characteristic="characteristic",e.Communication="communication",e.Gender="gender",e.Specialty="specialty"})(VC||(VC={}));var dV;(function(e){e.Characteristic="CHARACTERISTIC",e.Communication="COMMUNICATION",e.Gender="GENDER",e.Specialty="SPECIALTY"})(dV||(dV={}));var pV;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(pV||(pV={}));var hV;(function(e){e.Female="FEMALE",e.Male="MALE",e.Other="OTHER",e.Unknown="UNKNOWN"})(hV||(hV={}));var SV;(function(e){e.AllergyIntolerance="ALLERGY_INTOLERANCE",e.CarePlan="CARE_PLAN",e.Condition="CONDITION",e.Encounter="ENCOUNTER",e.Immunization="IMMUNIZATION",e.Labs="LABS",e.Medications="MEDICATIONS",e.Procedure="PROCEDURE",e.VitalSigns="VITAL_SIGNS"})(SV||(SV={}));var EV;(function(e){e.Official="_official",e.Old="_old",e.Secondary="_secondary",e.Temp="_temp",e.Usual="_usual"})(EV||(EV={}));var vV;(function(e){e.Clicked="clicked"})(vV||(vV={}));var mV;(function(e){e.Clicked="CLICKED"})(mV||(mV={}));var GC;(function(e){e.Debug="DEBUG",e.Error="ERROR",e.Info="INFO",e.Verbose="VERBOSE",e.Warn="WARN"})(GC||(GC={}));var TV;(function(e){e.Activity="ACTIVITY",e.Exam="EXAM",e.Imaging="IMAGING",e.Laboratory="LABORATORY",e.Procedure="PROCEDURE",e.SocialHistory="SOCIAL_HISTORY",e.Survey="SURVEY",e.Therapy="THERAPY",e.VitalSigns="VITAL_SIGNS"})(TV||(TV={}));var AV;(function(e){e.CancelDelete="CANCEL_DELETE",e.ConfirmDelete="CONFIRM_DELETE",e.DeletionInProgress="DELETION_IN_PROGRESS",e.ImmediateExecution="IMMEDIATE_EXECUTION",e.RequestDelete="REQUEST_DELETE"})(AV||(AV={}));var BC;(function(e){e.C19Vaccine="C19Vaccine",e.Device="Device",e.Insurance="Insurance",e.Laboratory="Laboratory",e.Pharmacy="Pharmacy",e.Provider="Provider",e.Bus="bus",e.Cg="cg",e.Crs="crs",e.Dept="dept",e.Edu="edu",e.Govt="govt",e.Ins="ins",e.Other="other",e.Pay="pay",e.Prov="prov",e.Reli="reli",e.Team="team"})(BC||(BC={}));var gV;(function(e){e.Bus="BUS",e.C19Vaccine="C19VACCINE",e.Cg="CG",e.Crs="CRS",e.Dept="DEPT",e.Device="DEVICE",e.Edu="EDU",e.Govt="GOVT",e.Ins="INS",e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Other="OTHER",e.Pay="PAY",e.Pharmacy="PHARMACY",e.Prov="PROV",e.Provider="PROVIDER",e.Reli="RELI",e.Team="TEAM"})(gV||(gV={}));var yV;(function(e){e.Add="add",e.Copy="copy",e.Move="move",e.Remove="remove",e.Replace="replace",e.Test="test"})(yV||(yV={}));var RV;(function(e){e.Patient="Patient",e.Person="Person"})(RV||(RV={}));var OV;(function(e){e.Practice="practice",e.Practitioner="practitioner"})(OV||(OV={}));var bV;(function(e){e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(bV||(bV={}));var CV;(function(e){e.QuestionnaireResponse="QuestionnaireResponse"})(CV||(CV={}));var PV;(function(e){e.AllergyIntolerance="ALLERGY_INTOLERANCE",e.CarePlan="CARE_PLAN",e.Condition="CONDITION",e.Encounter="ENCOUNTER",e.Immunization="IMMUNIZATION",e.MedicationDispense="MEDICATION_DISPENSE",e.MedicationRequest="MEDICATION_REQUEST",e.MedicationStatement="MEDICATION_STATEMENT",e.Observation="OBSERVATION",e.Procedure="PROCEDURE"})(PV||(PV={}));var MV;(function(e){e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Pharmacy="PHARMACY",e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(MV||(MV={}));var kC;(function(e){e.Content="content",e.Distance="distance",e.Relevance="relevance"})(kC||(kC={}));var IV;(function(e){e.Content="CONTENT",e.DataSourceRank="DATA_SOURCE_RANK",e.Distance="DISTANCE",e.Relevance="RELEVANCE"})(IV||(IV={}));var jC;(function(e){e.Asc="asc",e.Desc="desc"})(jC||(jC={}));var NV;(function(e){e.Asc="ASC",e.Desc="DESC"})(NV||(NV={}));var LV;(function(e){e.CareSearch="CARE_SEARCH",e.Proa="PROA",e.ProviderDetails="PROVIDER_DETAILS",e.Sayt="SAYT",e.Unspecified="UNSPECIFIED"})(LV||(LV={}));var DV;(function(e){e.Error="ERROR",e.Pending="PENDING",e.Retrieved="RETRIEVED",e.Retrieving="RETRIEVING"})(DV||(DV={}));var HC;(function(e){e.Accepted="ACCEPTED",e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.OnHold="ON_HOLD",e.Ready="READY",e.Received="RECEIVED",e.Rejected="REJECTED",e.Requested="REQUESTED"})(HC||(HC={}));var wV;(function(e){e.Accurate="accurate",e.Estimate="estimate"})(wV||(wV={}));const V9=new Set(Object.values(FC));function UV(e){return V9.has(e)}const G9=new Set(Object.values(UC));function B9(e){return G9.has(e)}const k9=new Set(Object.values(Nm));function xV(e){return k9.has(e)}const j9=new Set(Object.values(wC));function H9(e){return j9.has(e)}class Y9{validate(t,r){!ka(t.gender)&&!UV(t.gender)&&r.add(`Invalid gender value: "${t.gender}"`)}}class Awe extends sa{constructor(){super(...arguments),this.validator=new Y9}}class q9{validate(t,r){xV(t.category)||r.add(`Invalid consent category code: "${t.category}"`)}}class gwe extends sa{constructor(){super(...arguments),this.validator=new q9}}class K9{validate(t,r){B9(t.status)||r.add(`Invalid consent status: "${t.status}"`),H9(t.provision)||r.add(`Invalid consent provision type: "${t.provision}"`),xV(t.category)||r.add(`Invalid consent category code: "${t.category}"`),!ka(t.organizationId)&&$o(t.organizationId)&&r.add("organizationId cannot be empty"),t.category===Nm.ProaAttestation&&ka(t.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class ywe extends sa{constructor(){super(...arguments),this.validator=new K9}}class W9{validate(t,r){Ws(t.exportId)&&r.add("exportId is required"),Ws(t.password)&&r.add("password is required")}}class Rwe extends sa{constructor(){super(...arguments),this.validator=new W9}}class Owe extends null{}var ja=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ua,Uu,FV,$V,VV,GV,BV,kV;class YC{constructor(){ua.add(this)}validate(t,r){if(!t.values||t.values.length===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}for(const n of t.values)ja(this,ua,"m",FV).call(this,n,r)}}ua=new WeakSet,Uu=function(t,r){t&&t!==null&&isNaN(t.getTime())&&r.add("The date is not valid")},FV=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:c,lessThanOrEqualTo:v,approximately:_}=t,L=[n,i,a,u,c,v,_].filter(W=>W!=null).length;if(L===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}ja(this,ua,"m",$V).call(this,t,L,r),ja(this,ua,"m",BV).call(this,t,r),ja(this,ua,"m",kV).call(this,t,r)},$V=function(t,r,n){const{equals:i,notEquals:a,approximately:u}=t;if(i&&r>1){n.add("The equals value cannot be set with any other values");return}if(a&&r>1){n.add("The notEquals value cannot be set with any other values");return}if(u&&r>1){n.add("The approximately value cannot be set with any other values");return}ja(this,ua,"m",VV).call(this,t,n),ja(this,ua,"m",GV).call(this,t,n)},VV=function(t,r){t.greaterThan&&t.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},GV=function(t,r){t.lessThan&&t.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},BV=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:c,lessThanOrEqualTo:v,approximately:_}=t;n&&ja(this,ua,"m",Uu).call(this,n,r),i&&ja(this,ua,"m",Uu).call(this,i,r),a&&ja(this,ua,"m",Uu).call(this,a,r),u&&ja(this,ua,"m",Uu).call(this,u,r),c&&ja(this,ua,"m",Uu).call(this,c,r),v&&ja(this,ua,"m",Uu).call(this,v,r),_&&ja(this,ua,"m",Uu).call(this,_,r)},kV=function(t,r){const{greaterThan:n,greaterThanOrEqualTo:i,lessThan:a,lessThanOrEqualTo:u}=t;n&&u&&n>=u&&r.add("The greaterThan value must be less than the lessThanOrEqualTo value"),i&&a&&i>=a&&r.add("The greaterThanOrEqualTo value must be less than the lessThan value"),n&&a&&n>=a&&r.add("The greaterThan value must be less than the lessThan value"),i&&u&&i>=u&&r.add("The greaterThanOrEqualTo value must be less than the lessThanOrEqualTo value")};var qC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Jp;class Dm{constructor(){Jp.set(this,new Q9)}validate(t,r){var n;if(t.value===void 0&&t.values===void 0&&t.notEquals===void 0){r.add("Either SearchToken value or values or notEquals must be provided");return}if(t.value!==void 0&&qC(this,Jp,"f").validate(t.value,r),t.values!==void 0&&t.values.length===0){r.add("At least one Coding must be set to instantiate a SearchToken");return}for(const i of(n=t.values)!==null&&n!==void 0?n:[])qC(this,Jp,"f").validate(i,r);if(t.notEquals!==void 0){if(t.notEquals.values!==void 0){if(t.notEquals.values.length===0){r.add("If notEquals values are provided, at least one Coding must be set");return}for(const i of t.notEquals.values)qC(this,Jp,"f").validate(i,r)}t.notEquals.code===void 0&&t.notEquals.value===void 0&&t.notEquals.system===void 0&&t.notEquals.values===void 0&&r.add("NotEquals must have at least one non-null property (code, value, system, or values)")}}}Jp=new WeakMap;class Q9{validate(t,r){!t.system&&!t.code&&r.add("Each Coding in the list must have at least one non-null and non-empty value for system or code")}}var e_=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},KC,WC,QC,zC,XC,JC;class jV extends qs{constructor(){super(...arguments),KC.set(this,new Dm),WC.set(this,new YC)}validate(t,r){super.validate(t,r),t.groupCode&&e_(this,KC,"f").validate(t.groupCode,r),t.lastUpdated&&e_(this,WC,"f").validate(t.lastUpdated,r)}}KC=new WeakMap,WC=new WeakMap;class z9{validate(t,r){t.length===0&&r.add("Prescription array must not be empty.")}}class HV extends qs{constructor(){super(...arguments),QC.set(this,new z9),zC.set(this,new YC)}validate(t,r){super.validate(t,r),t.lastUpdated!==void 0&&e_(this,zC,"f").validate(t.lastUpdated,r),t.prescription!==void 0&&e_(this,QC,"f").validate(t.prescription,r)}}QC=new WeakMap,zC=new WeakMap;class X9 extends qs{validate(t,r){var n;super.validate(t,r),!((n=t?.ids)===null||n===void 0)&&n.length||r.add("ids must not be empty")}}class J9 extends Ks{constructor(){super(...arguments),this.validator=new jV}}class bwe extends null{}class Cwe extends null{}class Pwe extends null{}class Mwe extends null{}class Iwe extends null{}class Nwe extends null{}class Lwe extends null{}class Dwe extends null{}class wwe extends null{}class Uwe extends null{}class xwe extends null{}class Fwe extends null{}class $we extends null{}class Vwe extends null{}class Gwe extends null{}class Bwe extends null{}class kwe extends null{}class jwe extends null{}class Hwe extends null{}class Z9 extends HV{constructor(){super(...arguments),XC.set(this,new Dm)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&e_(this,XC,"f").validate(t.medicationCode,r)}}XC=new WeakMap;class Ywe extends Ks{constructor(){super(...arguments),this.validator=new HV}}class qwe extends Ks{constructor(){super(...arguments),this.validator=new Z9}}class eZ extends jV{constructor(){super(...arguments),JC.set(this,new Dm)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&e_(this,JC,"f").validate(t.medicationCode,r)}}JC=new WeakMap;class Kwe extends J9{constructor(){super(...arguments),this.validator=new eZ}}class Wwe extends null{}class Qwe extends Ks{constructor(){super(...arguments),this.validator=new X9}}class zwe extends null{}class tZ{validate(t,r){$o(t.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class Xwe extends sa{constructor(){super(...arguments),this.validator=new tZ}}class rZ extends qs{validate(t,r){$o(t.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(t,r)}}class Jwe extends Ks{constructor(){super(...arguments),this.validator=new rZ}}class nZ extends qs{validate(t,r){$o(t.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(t,r)}}class Zwe extends Ks{constructor(){super(...arguments),this.validator=new nZ}}const iZ=new Set(Object.values(HC));function YV(e){return iZ.has(e)}var aZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ZC,qV;class oZ extends qs{constructor(){super(...arguments),ZC.add(this)}validate(t,r){if(super.validate(t,r),!ka(t.status)){const n=Array.isArray(t.status)?t.status:[t.status];for(const i of n)aZ(this,ZC,"m",qV).call(this,i,r)}}}ZC=new WeakSet,qV=function(t,r){YV(t)||r.add(`Invalid task status: "${t}"`)};class eUe extends Ks{constructor(){super(...arguments),this.validator=new oZ}}class sZ{validate(t,r){YV(t.newStatus)||r.add(`Invalid task status: "${t.newStatus}"`)}}class tUe extends sa{constructor(){super(...arguments),this.validator=new sZ}}var wm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},t_,KV,WV,QV,zV;class rUe extends Ks{constructor(){super(...arguments),this.validator=new uZ}}class uZ extends qs{constructor(){super(...arguments),t_.add(this)}validate(t,r){super.validate(t,r),ki(t.organizationTypeFilters)&&wm(this,t_,"m",KV).call(this,t.organizationTypeFilters,r),ki(t.sortBy)&&wm(this,t_,"m",WV).call(this,t.sortBy,r),ki(t.filterFields)&&wm(this,t_,"m",QV).call(this,t.filterFields,r),ki(t.gender)&&wm(this,t_,"m",zV).call(this,t.gender,r)}}t_=new WeakSet,KV=function(t,r){for(const n of t)lZ(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},WV=function(t,r){ki(t.field)&&!_Z(t.field)&&r.add(`Invalid sortBy.field value: "${t.field}"`),ki(t.order)&&!pZ(t.order)&&r.add(`Invalid sortBy.order value: "${t.order}"`)},QV=function(t,r){for(const n of t)SZ(n)||r.add(`Invalid filterField value: "${n}"`)},zV=function(t,r){UV(t)||r.add(`Invalid gender value: "${t}"`)};const cZ=new Set(Object.values(BC));function lZ(e){return cZ.has(e)}const fZ=new Set(Object.values(kC));function _Z(e){return fZ.has(e)}const dZ=new Set(Object.values(jC));function pZ(e){return dZ.has(e)}const hZ=new Set(Object.values(VC));function SZ(e){return hZ.has(e)}class nUe extends null{}class iUe extends Ks{constructor(){super(...arguments),this.validator=new EZ}}class EZ extends qs{validate(t,r){super.validate(t,r)}}const vZ="data-connection-status";var mZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},eP;const TZ="connectionId cannot be null or empty",AZ="username cannot be null or empty",gZ="password cannot be null or empty";class XV{validate(t,r){t.connectionId===""&&r.add(TZ)}}class yZ{constructor(){eP.set(this,new XV)}validate(t,r){mZ(this,eP,"f").validate(t,r),t.username===""&&r.add(AZ),t.password===""&&r.add(gZ)}}eP=new WeakMap;class RZ extends sa{constructor(){super(...arguments),this.validator=new XV}}class aUe extends null{}class oUe extends RZ{constructor(){super(...arguments),this.validator=new yZ}}const OZ="deviceToken is required",bZ="platformName must be a valid DevicePlatform value",CZ="applicationName is required";var tP;(function(e){e.IOS="IOS",e.ANDROID="ANDROID"})(tP||(tP={}));const PZ=new Set(Object.values(tP));function MZ(e){return PZ.has(e)}function IZ(e){return!MZ(e)}class JV{validate(t,r){$o(t.deviceToken)&&r.add(OZ)}}class NZ extends JV{validate(t,r){super.validate(t,r),IZ(t.platformName.toUpperCase())&&r.add(bZ),$o(t.applicationName)&&r.add(CZ)}}class sUe extends sa{constructor(){super(...arguments),this.validator=new NZ}}class uUe extends sa{constructor(){super(...arguments),this.validator=new JV}}const LZ="string parameter serializedNotification must be provided",DZ="serialized notification must have a non-empty notification_id field of type string",ZV="serialized notification must have an itbl object containing a non-empty messageId field of type string",wZ="parsed notification must be a non-null object.",UZ="serialized notification is not valid JSON.";class xZ{validate(t,r){if(ka(t.serializedNotification)||typeof t.serializedNotification!="string"||$o(t.serializedNotification)){r.add(LZ);return}let n=null;try{n=JSON.parse(t.serializedNotification)}catch{r.add(UZ);return}if(typeof n!="object"||n===null){r.add(wZ);return}const{itbl:i,notification_id:a}=n;if((ka(a)||typeof a!="string"||$o(a))&&r.add(DZ),typeof i!="object"||Fo(i)){r.add(ZV);return}(ka(i.messageId)||typeof i.messageId!="string"||$o(i.messageId))&&r.add(ZV)}}class cUe extends sa{constructor(){super(...arguments),this.validator=new xZ}}const FZ="SearchStringValue should be a non-empty string";class $Z{validate(t,r){if(Fo(t.values))return;let n=!1;for(const i of t.values)$o(i)&&(n=!0);n&&r.add(FZ)}}var rP=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},nP,iP,aP;class VZ{constructor(){nP.set(this,new YC),iP.set(this,new $Z),aP.set(this,new Dm)}validate(t,r){var n;Fn(t._source)&&rP(this,iP,"f").validate(t._source,r),Fn(t.date)&&rP(this,nP,"f").validate(t.date,r),Fn(t._count)&&t._count<0&&r.add("Value of count cannot be less than 0"),Fn(t._getpagesoffset)&&t._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),Fn((n=t.supporting_info)===null||n===void 0?void 0:n.value)&&$o(t.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),Fn(t.status)&&rP(this,aP,"f").validate(t.status,r)}}nP=new WeakMap,iP=new WeakMap,aP=new WeakMap;class lUe extends sa{constructor(){super(...arguments),this.validator=new VZ}}class GZ{validate(t,r){if(!Fo(t.cancelationReason)){if(Fo(t.cancelationReason.coding)||t.cancelationReason.coding.length===0){r.add("cancelationReason must have at least one coding");return}for(const n of t.cancelationReason.coding)(Fo(n?.code)||Fo(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class fUe extends sa{constructor(){super(...arguments),this.validator=new GZ}}class BZ{validate(t,r){var n;Ws((n=t.organization.value)===null||n===void 0?void 0:n.trim())&&r.add("Organization reference is required and must have a non-empty value.")}}class _Ue extends sa{constructor(){super(...arguments),this.validator=new BZ}}class kZ{validate(t,r){const n=t.questionnaireResponse;if(Fo(n)){r.add("questionnaireResponse is required");return}if((Ws(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ws(n.status)&&r.add("questionnaireResponse.status is required"),Ws(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),Fo(n.contained)||n.contained.length===0)r.add("questionnaireResponse.contained must have at least one item");else{let i=null;for(const a of n.contained){if(Fo(a)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(a.resourceType==="Questionnaire"){i=a;break}}if(Fo(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}Ws(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class dUe extends sa{constructor(){super(...arguments),this.validator=new kZ}}var oP=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(h){try{_(n.next(h))}catch(L){u(L)}}function v(h){try{_(n.throw(h))}catch(L){u(L)}}function _(h){h.done?a(h.value):i(h.value).then(c,v)}_((n=n.apply(e,t||[])).next())})};class eG{constructor(t=new Map){this.storage=t}get(t){return oP(this,void 0,void 0,function*(){return this.storage.get(t)})}set(t,r){return oP(this,void 0,void 0,function*(){this.storage.set(t,r)})}delete(t){return oP(this,void 0,void 0,function*(){return this.storage.delete(t)})}}const jZ={logLevel:GC.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new eG,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var Qs;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(Qs||(Qs={}));var HZ=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},tG=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Zp,Mr;(function(e){e[e.VERBOSE=0]="VERBOSE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.FATAL=5]="FATAL"})(Mr||(Mr={}));const YZ={[Mr.VERBOSE]:"VERBOSE",[Mr.DEBUG]:"DEBUG",[Mr.INFO]:"INFO",[Mr.WARN]:"WARN",[Mr.ERROR]:"ERROR",[Mr.FATAL]:"FATAL"};class r_{constructor(t){Zp.set(this,void 0),HZ(this,Zp,t,"f")}get severity(){return tG(this,Zp,"f")}shouldLog(t){return t>=tG(this,Zp,"f")}static severityText(t){return YZ[t]}static severityFromText(t){switch(t){case"VERBOSE":return Mr.VERBOSE;case"DEBUG":return Mr.DEBUG;case"INFO":return Mr.INFO;case"WARN":return Mr.WARN;case"ERROR":return Mr.ERROR;case"FATAL":return Mr.FATAL;default:throw new Error(`Invalid severity text: ${t}`)}}}Zp=new WeakMap;var sP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Es=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},xu,rG,Um,eh,xm,nl;class nG{constructor(t,r,n){xu.add(this),Um.set(this,void 0),eh.set(this,void 0),xm.set(this,void 0),sP(this,Um,n,"f"),sP(this,eh,new r_(t),"f"),sP(this,xm,r,"f")}name(){return Es(this,Um,"f")}severity(){return Es(this,eh,"f").severity}verbose(t,r){Es(this,xu,"m",nl).call(this,Mr.VERBOSE,t,r)}debug(t,r){Es(this,xu,"m",nl).call(this,Mr.DEBUG,t,r)}info(t,r){Es(this,xu,"m",nl).call(this,Mr.INFO,t,r)}warn(t,r){Es(this,xu,"m",nl).call(this,Mr.WARN,t,r)}error(t,r){let n;r instanceof Kt&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),Es(this,xu,"m",nl).call(this,Mr.ERROR,t,n)}fatal(t,r){Es(this,xu,"m",nl).call(this,Mr.FATAL,t,r)}static otelSeverityNumber(t){switch(t){case Mr.VERBOSE:return Qs.TRACE;case Mr.DEBUG:return Qs.DEBUG;case Mr.INFO:return Qs.INFO;case Mr.WARN:return Qs.WARN;case Mr.ERROR:return Qs.ERROR;case Mr.FATAL:return Qs.FATAL;default:return Qs.UNSPECIFIED}}}rG=nG,Um=new WeakMap,eh=new WeakMap,xm=new WeakMap,xu=new WeakSet,nl=function(t,r,n){!Es(this,eh,"f").shouldLog(t)||Es(this,xm,"f").emit({timestamp:Date.now(),severityNumber:rG.otelSeverityNumber(t),severityText:r_.severityText(t),body:r,attributes:n??{}})};var iG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},aG=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Fm,$m;class qZ{constructor(t,r){Fm.set(this,void 0),$m.set(this,void 0),iG(this,$m,t,"f"),iG(this,Fm,r.loggerProvider(),"f")}getLogger(t){const r=t??"default",n=aG(this,Fm,"f").getLogger(r);return new nG(aG(this,$m,"f"),n,r)}}Fm=new WeakMap,$m=new WeakMap;class KZ{format(t,r,n,i){let u=`[${new Date().toISOString()}] ${r_.severityText(t)}`;return n!==void 0&&(u+=` (${n})`),u+=`: ${r}`,i===void 0?[u]:[u,i]}}var uP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},di=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},vs,ms,zs;class WZ{constructor(t,r){vs.set(this,void 0),ms.set(this,void 0),zs.set(this,void 0),uP(this,ms,new r_(t),"f"),uP(this,vs,r,"f"),uP(this,zs,new KZ,"f")}name(){return di(this,vs,"f")}severity(){return di(this,ms,"f").severity}verbose(t,r){di(this,ms,"f").shouldLog(Mr.VERBOSE)&&console.debug(...di(this,zs,"f").format(Mr.VERBOSE,t,di(this,vs,"f"),r))}debug(t,r){di(this,ms,"f").shouldLog(Mr.DEBUG)&&console.debug(...di(this,zs,"f").format(Mr.DEBUG,t,di(this,vs,"f"),r))}info(t,r){di(this,ms,"f").shouldLog(Mr.INFO)&&console.info(...di(this,zs,"f").format(Mr.INFO,t,di(this,vs,"f"),r))}warn(t,r){di(this,ms,"f").shouldLog(Mr.WARN)&&console.warn(...di(this,zs,"f").format(Mr.WARN,t,di(this,vs,"f"),r))}error(t,r){let n=r;r instanceof Kt&&(n=r.failure()?r.error():r.data()),di(this,ms,"f").shouldLog(Mr.ERROR)&&console.error(...di(this,zs,"f").format(Mr.ERROR,t,di(this,vs,"f"),n))}fatal(t,r){di(this,ms,"f").shouldLog(Mr.FATAL)&&console.error(...di(this,zs,"f").format(Mr.FATAL,t,di(this,vs,"f"),r))}}vs=new WeakMap,ms=new WeakMap,zs=new WeakMap;var QZ=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},zZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Vm;class ji{constructor(t=Mr.FATAL){Vm.set(this,void 0),QZ(this,Vm,t,"f")}getLogger(t){return new WZ(zZ(this,Vm,"f"),t)}}Vm=new WeakMap;var XZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},cP,oG;class JZ{constructor(){cP.add(this)}createLogProvider(t,r){switch(XZ(this,cP,"m",oG).call(this,t)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new qZ(t.logLevel,r);case"console":return new ji(t.logLevel)}}}cP=new WeakSet,oG=function(t){return t.telemetry.enabled?"otel":"console"};var Nn=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Xs=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ao,n_,Fu,i_,$u,il,sG,uG,cG,lG,fG,_G,dG,pG,hG,SG;class Gm{constructor(t){ao.add(this),n_.set(this,void 0),Fu.set(this,void 0),i_.set(this,void 0),$u.set(this,void 0),il.set(this,void 0),this.bwellConfig=Nn(this,ao,"m",fG).call(this,t),Xs(this,n_,r_.severityFromText(this.bwellConfig.logLevel),"f"),Xs(this,il,Nn(this,ao,"m",SG).call(this),"f"),Xs(this,i_,Nn(this,ao,"m",dG).call(this),"f"),Xs(this,Fu,Nn(this,ao,"m",pG).call(this),"f"),Xs(this,$u,Nn(this,ao,"m",hG).call(this),"f")}static initialize(t){try{const r=new Gm(t);return Kt.success(r)}catch(r){if(Bi.isBwellError(r))return Kt.failure(r);throw r}}get logLevel(){return Nn(this,n_,"f")}get graphQL(){return Nn(this,i_,"f")}get telemetry(){return Nn(this,Fu,"f")}get http(){return Nn(this,$u,"f")}get context(){return Nn(this,il,"f")}setContextUser(t){Nn(this,il,"f").user=t}mergeRemoteConfig(t){Xs(this,n_,Nn(this,ao,"m",sG).call(this,t),"f"),Xs(this,i_,Nn(this,ao,"m",uG).call(this,t),"f"),Xs(this,Fu,Object.freeze(Nn(this,ao,"m",cG).call(this,t)),"f"),Xs(this,$u,Object.freeze(Nn(this,ao,"m",lG).call(this,t)),"f")}}n_=new WeakMap,Fu=new WeakMap,i_=new WeakMap,$u=new WeakMap,il=new WeakMap,ao=new WeakSet,sG=function(t){var r;const n=(r=t?.logLevel)!==null&&r!==void 0?r:null;return n===null?Nn(this,n_,"f"):r_.severityFromText(n)},uG=function(t){var r;const n=(r=t?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return Nn(this,i_,"f");const{authedApiUrl:i,unauthedApiUrl:a}=this.bwellConfig.overrides;return{unauthApiUrl:a??n.url,apiUrl:i??n.authUrl}},cG=function(t){var r,n;const i=(r=t?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return Nn(this,Fu,"f");const a=(n=i.enabled)!==null&&n!==void 0?n:Nn(this,Fu,"f").enabled;if(i.collectorUrl.endsWith("/"))throw new Error('Telemetry config "collectorUrl" cannot end with a trailing slash.');let u;try{u=new URL(i.collectorUrl)}catch{throw new Error('Telemetry config "collectorUrl" malformed/is not a proper URL.')}if(u.pathname!=="/")throw new Error('Telemetry config "collectorUrl" cannot contain a path.');return Object.assign(Object.assign({},Nn(this,Fu,"f")),{enabled:a,collectorUrl:i.collectorUrl})},lG=function(t){var r,n,i;const a=(r=t?.httpClient)!==null&&r!==void 0?r:null;return a===null?Nn(this,$u,"f"):{timeout:(n=a.requestTimeout)!==null&&n!==void 0?n:Nn(this,$u,"f").timeout,retryPolicy:(i=a.retry)!==null&&i!==void 0?i:Nn(this,$u,"f").retryPolicy}},fG=function(t){return Object.assign(Object.assign({},jZ),t)},_G=function(){try{return N9(this.bwellConfig.clientKey)}catch{throw new T9("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},dG=function(){var t,r;return{apiUrl:(t=this.bwellConfig.overrides.authedApiUrl)!==null&&t!==void 0?t:`https://api-gateway.${Nn(this,il,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${Nn(this,il,"f").env}.icanbwell.com/federated-graph/graphql`}},pG=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},hG=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},SG=function(){return{clientKey:this.bwellConfig.clientKey,env:Nn(this,ao,"m",_G).call(this),user:null}};var ZZ=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(h){try{_(n.next(h))}catch(L){u(L)}}function v(h){try{_(n.throw(h))}catch(L){u(L)}}function _(h){h.done?a(h.value):i(h.value).then(c,v)}_((n=n.apply(e,t||[])).next())})},EG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Bm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},a_,km;class eee{constructor(t,r=new ji){a_.set(this,void 0),km.set(this,void 0),EG(this,km,t,"f"),EG(this,a_,r.getLogger("ConfigManager"),"f")}initialize(t){return ZZ(this,void 0,void 0,function*(){const r=Gm.initialize(t);if(r.failure())return r;const n=r.data();Bm(this,a_,"f").verbose("Initializing SDK Configuration");const i=yield Bm(this,km,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const a=i.data();try{n.mergeRemoteConfig(a)}catch(u){Bm(this,a_,"f").error("Error merging SDK config with remote config.",u)}return Bm(this,a_,"f").info("Remote SDK Configuration merged with user config"),Kt.success(n)})}}a_=new WeakMap,km=new WeakMap;const lP=JSON,tee=e=>e.toUpperCase(),ree=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},nee=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},iee=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0},aee=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},pUe=(e,t,...r)=>{const[n,i]=r;return e.document?e:{url:e,document:t,variables:n,requestHeaders:i,signal:void 0}},hUe=(e,t,...r)=>{const[n,i]=r;return e.query?e:{url:e,query:t,variables:n,requestHeaders:i,signal:void 0}};var oee=p(5157),see=p(2704);const vG=e=>{let t;const r=e.definitions.filter(n=>n.kind==="OperationDefinition");return r.length===1&&(t=r[0]?.name?.value),t},jm=e=>{if(typeof e=="string"){let r;try{const n=(0,oee.qg)(e);r=vG(n)}catch{}return{query:e,operationName:r}}const t=vG(e);return{query:(0,see.y)(e),operationName:t}};class Vu extends Error{constructor(t,r){const n=`${Vu.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Vu.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Vu)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${t.status})`}}var o_=p(288),uee=p.t(o_,2);const cee="connection_init",lee="connection_ack",mG="ping",TG="pong",fee="subscribe",_ee="next",dee="error",AG="complete";class Gu{get type(){return this._type}get id(){return this._id}get payload(){return this._payload}constructor(t,r,n){this._type=t,this._payload=r,this._id=n}get text(){const t={type:this.type};return this.id!=null&&this.id!=null&&(t.id=this.id),this.payload!=null&&this.payload!=null&&(t.payload=this.payload),JSON.stringify(t)}static parse(t,r){const{type:n,payload:i,id:a}=JSON.parse(t);return new Gu(n,r(i),a)}}class pee{constructor(t,{onInit:r,onAcknowledged:n,onPing:i,onPong:a}){this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=t,t.addEventListener("open",async u=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={},t.send(See(r?await r():null).text)}),t.addEventListener("close",u=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={}}),t.addEventListener("error",u=>{console.error(u)}),t.addEventListener("message",u=>{try{const c=hee(u.data);switch(c.type){case lee:{this.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(this.socketState.acknowledged=!0,n&&n(c.payload));return}case mG:{i?i(c.payload).then(L=>t.send(gG(L).text)):t.send(gG(null).text);return}case TG:{a&&a(c.payload);return}}if(!this.socketState.acknowledged||c.id===void 0||c.id===null||!this.socketState.subscriptions[c.id])return;const{query:v,variables:_,subscriber:h}=this.socketState.subscriptions[c.id];switch(c.type){case _ee:{!c.payload.errors&&c.payload.data&&h.next&&h.next(c.payload.data),c.payload.errors&&h.error&&h.error(new Vu({...c.payload,status:200},{query:v,variables:_}));return}case dee:{h.error&&h.error(new Vu({errors:c.payload,status:200},{query:v,variables:_}));return}case AG:{h.complete&&h.complete(),delete this.socketState.subscriptions[c.id];return}}}catch(c){console.error(c),t.close(1006)}t.close(4400,"Unknown graphql-ws message.")})}makeSubscribe(t,r,n,i){const a=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[a]={query:t,variables:i,subscriber:n},this.socket.send(vee(a,{query:t,operationName:r,variables:i}).text),()=>{this.socket.send(mee(a).text),delete this.socketState.subscriptions[a]}}rawRequest(t,r){return new Promise((n,i)=>{let a;this.rawSubscribe(t,{next:(u,c)=>a={data:u,extensions:c},error:i,complete:()=>n(a)},r)})}request(t,r){return new Promise((n,i)=>{let a;this.subscribe(t,{next:u=>a=u,error:i,complete:()=>n(a)},r)})}subscribe(t,r,n){const{query:i,operationName:a}=jm(t);return this.makeSubscribe(i,a,r,n)}rawSubscribe(t,r,n){return this.makeSubscribe(t,void 0,r,n)}ping(t){this.socket.send(Eee(t).text)}close(){this.socket.close(1e3)}}pee.PROTOCOL="graphql-transport-ws";function hee(e,t=r=>r){return Gu.parse(e,t)}function See(e){return new Gu(cee,e)}function Eee(e){return new Gu(mG,e,void 0)}function gG(e){return new Gu(TG,e,void 0)}function vee(e,t){return new Gu(fee,t,e)}function mee(e){return new Gu(AG,void 0,e)}const s_=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||uee&&o_.Headers&&e instanceof o_.Headers?t=ree(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):t=e),t},yG=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Tee=e=>{if(!Array.isArray(e.query)){const n=e,i=[`query=${encodeURIComponent(yG(n.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,r=e.query.reduce((n,i,a)=>(n.push({query:yG(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[a]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(r))}`},Aee=e=>async t=>{const{url:r,query:n,variables:i,operationName:a,fetch:u,fetchOptions:c,middleware:v}=t,_={...t.headers};let h="",L;e==="POST"?(L=yee(n,i,a,c.jsonSerializer),typeof L=="string"&&(_["Content-Type"]="application/json")):h=Tee({query:n,variables:i,operationName:a,jsonSerializer:c.jsonSerializer??lP});const W={method:e,headers:_,body:L,...c};let Te=r,me=W;if(v){const Oe=await Promise.resolve(v({...W,url:r,operationName:a,variables:i})),{url:He,...qe}=Oe;Te=He,me=qe}return h&&(Te=`${Te}?${h}`),await u(Te,me)};class Hm{constructor(t,r={}){this.url=t,this.requestConfig=r,this.rawRequest=async(...n)=>{const[i,a,u]=n,c=iee(i,a,u),{headers:v,fetch:_=o_,method:h="POST",requestMiddleware:L,responseMiddleware:W,...Te}=this.requestConfig,{url:me}=this;c.signal!==void 0&&(Te.signal=c.signal);const{operationName:Oe}=jm(c.query);return fP({url:me,query:c.query,variables:c.variables,headers:{...s_(_P(v)),...s_(c.requestHeaders)},operationName:Oe,fetch:_,method:h,fetchOptions:Te,middleware:L}).then(He=>(W&&W(He),He)).catch(He=>{throw W&&W(He),He})}}async request(t,...r){const[n,i]=r,a=nee(t,n,i),{headers:u,fetch:c=o_,method:v="POST",requestMiddleware:_,responseMiddleware:h,...L}=this.requestConfig,{url:W}=this;a.signal!==void 0&&(L.signal=a.signal);const{query:Te,operationName:me}=jm(a.document);return fP({url:W,query:Te,variables:a.variables,headers:{...s_(_P(u)),...s_(a.requestHeaders)},operationName:me,fetch:c,method:v,fetchOptions:L,middleware:_}).then(Oe=>(h&&h(Oe),Oe.data)).catch(Oe=>{throw h&&h(Oe),Oe})}batchRequests(t,r){const n=aee(t,r),{headers:i,...a}=this.requestConfig;n.signal!==void 0&&(a.signal=n.signal);const u=n.documents.map(({document:v})=>jm(v).query),c=n.documents.map(({variables:v})=>v);return fP({url:this.url,query:u,variables:c,headers:{...s_(_P(i)),...s_(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??o_,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware}).then(v=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(v),v.data)).catch(v=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(v),v})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const fP=async e=>{const{query:t,variables:r,fetchOptions:n}=e,i=Aee(tee(e.method??"post")),a=Array.isArray(e.query),u=await i(e),c=await Ree(u,n.jsonSerializer??lP),v=Array.isArray(c)?!c.some(({data:h})=>!h):Boolean(c.data),_=Array.isArray(c)||!c.errors||Array.isArray(c.errors)&&!c.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(u.ok&&_&&v){const{errors:h,...L}=(Array.isArray(c),c),W=n.errorPolicy==="ignore"?L:c;return{...a?{data:W}:W,headers:u.headers,status:u.status}}else{const h=typeof c=="string"?{error:c}:c;throw new Vu({...h,status:u.status,headers:u.headers},{query:t,variables:r})}},SUe=async(...e)=>{const[t,r,...n]=e,i=parseRawRequestExtendedArgs(t,r,...n);return new Hm(i.url).rawRequest({...i})};async function EUe(e,t,...r){const n=parseRequestExtendedArgs(e,t,...r);return new Hm(n.url).request({...n})}const vUe=async(...e)=>{const t=gee(e);return new Hm(t.url).batchRequests(t)},gee=e=>e.length===1?e[0]:{url:e[0],documents:e[1],requestHeaders:e[2],signal:void 0},yee=(e,t,r,n)=>{const i=n??lP;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:r});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const a=e.reduce((u,c,v)=>(u.push({query:c,variables:t?t[v]:void 0}),u),[]);return i.stringify(a)},Ree=async(e,t)=>{let r;return e.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},_P=e=>typeof e=="function"?e():e,mUe=(e,...t)=>e.reduce((r,n,i)=>`${r}${n}${i in t?String(t[i]):""}`,""),TUe=null,Hi=`
5341
+ `));function uwe(e){const t=Object.assign(Object.assign({},Zc),e);return Apollo.useQuery(V$,t)}function cwe(e){const t=Object.assign(Object.assign({},Zc),e);return Apollo.useLazyQuery(V$,t)}const lwe=e=>useMutation(CreateOauthThirdPartyConnection,e),fwe=e=>useMutation(DisconnectUserToken,e),_we=e=>useMutation(CreateConnectionStatus,e),dwe=e=>useQuery(GetMemberConnections,e),pwe=e=>useQuery(GetConnections,e),hwe=e=>useQuery(GetConnection,e),Swe=e=>useQuery(GetOauthGeneratedUrl,e);var G$=p(46),Hp,Em;class B${constructor(){this.type="backend",Hp.set(this,void 0),Em.set(this,void 0)}init(t,{clientSlug:r,apiClient:n}){if(!n)throw t.logger.error('"apiClient" not supplied to "QueryBackend".'),new Error('"apiClient" required for "QueryBackend".');Du(this,Hp,r,"f"),Du(this,Em,uU(n),"f")}read(t,r,n){return sm(this,void 0,void 0,function*(){try{const{translation:i}=yield Jr(this,Em,"f").getClientTranslations({name:Jr(this,Hp,"f"),key:r,lang:t});n(null,i?.json||{})}catch{const a=`Error fetching translation with key "${r}" and client "${Jr(this,Hp,"f")||"N/A"}".`;n(a,null)}})}}Hp=new WeakMap,Em=new WeakMap,B$.type="backend";var zf;class k${constructor(t){this.type="logger",zf.set(this,void 0),Du(this,zf,t,"f")}log([t,r,...n]){Jr(this,zf,"f").info({meta:r},t,...n)}warn([t,r,...n]){Jr(this,zf,"f").error({meta:r},t,...n)}error([t,r,...n]){Jr(this,zf,"f").error({meta:r},t,...n)}}zf=new WeakMap,k$.type="logger";var vm,mm,el,Yp,Ii,tl;const j$="appLanguage";class Pa{constructor({keys:t,nativeBridge:r,fallbackKeys:n=[],defaultLanguage:i="en",logger:a,parent:u,debug:c=!1,remoteConfig:v={}}){el.set(this,void 0),Yp.set(this,void 0),Ii.set(this,void 0),tl.set(this,void 0),Du(this,el,t,"f"),Du(this,Yp,n,"f"),Du(this,tl,r,"f");const _={lng:i,fallbackNS:Jr(this,Yp,"f"),debug:c,defaultNS:t,returnNull:!1};u?Du(this,Ii,u.cloneInstance(_),"f"):(Du(this,Ii,ea.createInstance(),"f"),a&&Jr(this,Ii,"f").use(new k$(a.child({library:"@icanbwell/i18n"}))),v.apiClient&&Jr(this,Ii,"f").use(B$),Jr(this,Ii,"f").init(Object.assign(Object.assign({},_),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:v,saveMissing:!0,missingKeyHandler:(h,L,W)=>Jr(this,Ii,"f").services.logger.error(`missing key: ${W}; language: ${h}; key: ${L}`)}))),this.t=Jr(this,Ii,"f").t,Pa.resolvedLanguage=Jr(this,Ii,"f").resolvedLanguage||i}load(){var t;return sm(this,void 0,void 0,function*(){const r=(yield(t=Jr(this,tl,"f"))===null||t===void 0?void 0:t.storage.getItem(j$))||Pa.resolvedLanguage;r!==Pa.resolvedLanguage&&(yield Jr(this,Ii,"f").changeLanguage(r),Pa.resolvedLanguage=r),yield Jr(this,Ii,"f").loadNamespaces(Jr(this,el,"f"));const n=Jr(this,el,"f").filter(i=>!Jr(this,Ii,"f").hasResourceBundle(r,i));if(n.length)throw new Error(`Error loading translations for key(s): ${n.join(", ")}`);return Jr(Pa,vm,"f",mm).emit("changeLanguage",r),this})}child(t){return new Pa(Object.assign(Object.assign({},t),{nativeBridge:Jr(this,tl,"f"),fallbackKeys:[...Jr(this,Yp,"f"),...Jr(this,el,"f")],parent:Jr(this,Ii,"f"),defaultLanguage:Jr(this,Ii,"f").language}))}get isLoaded(){return Jr(this,el,"f").every(t=>Jr(this,Ii,"f").hasResourceBundle(Jr(this,Ii,"f").language,t))}changeLanguage(t){var r;return sm(this,void 0,void 0,function*(){Pa.resolvedLanguage=t,yield Jr(this,Ii,"f").changeLanguage(t),Jr(Pa,vm,"f",mm).emit("changeLanguage",t),yield(r=Jr(this,tl,"f"))===null||r===void 0?void 0:r.storage.setItem(j$,t),Jr(this,tl,"f").reloadView()})}get resolvedLanguage(){return Pa.resolvedLanguage}onChangeLanguage(t){Jr(Pa,vm,"f",mm).on("changeLanguage",t)}}vm=Pa,el=new WeakMap,Yp=new WeakMap,Ii=new WeakMap,tl=new WeakMap,mm={value:new G$},Pa.resolvedLanguage="en";var PC=p(1827),qp;(function(e){e.one="1.0.0"})(qp||(qp={}));const Tm="orchestrator:native-bridge",p9={id:Tm,dependencies:{featureServices:{}},create:()=>({[qp.one]:()=>({featureService:PC.b})})};var Kp;(function(e){e.one="1.0.0"})(Kp||(Kp={}));const Am="orchestrator:translation-service",h9={id:Am,dependencies:{featureServices:{[za]:Nr.one,[js]:Pu.one,[Wn]:vi.one,[Mp]:Bf.one,[Tm]:qp.one}},create:({featureServices:e})=>{const t=e[za],r=e[js],n=e[Mp],{slug:i}=e[Wn].getClientContext(),a=e[Tm],u=new Pa({keys:[],nativeBridge:a,defaultLanguage:"en",logger:r,remoteConfig:{clientSlug:i,apiClient:t}});return n.setProfileProperties({language:u.resolvedLanguage}),u.onChangeLanguage(c=>n.setProfileProperties({language:c})),{[Kp.one]:()=>({featureService:u})}}};var Xf,Jf,gm,rl;const ym="tokens";class S9{constructor({apiClient:t,stateService:r,identityGatewaySdk:n,storage:i}){Xf.set(this,void 0),Jf.set(this,void 0),gm.set(this,void 0),rl.set(this,void 0),(0,F.GG)(this,Xf,t,"f"),(0,F.GG)(this,Jf,r,"f"),(0,F.GG)(this,gm,n,"f"),(0,F.GG)(this,rl,i,"f")}getStoredTokens(){const t=(0,F.gn)(this,rl,"f").getItem(ym);return t?JSON.parse(t):void 0}removeStoredTokens(){(0,F.gn)(this,rl,"f").removeItem(ym)}storeTokens(t){(0,F.gn)(this,rl,"f").setItem(ym,JSON.stringify(t))}logout(){return(0,F.sH)(this,void 0,void 0,function*(){const t=(0,F.gn)(this,Jf,"f").getUserTokenData().accessToken.jwtToken,{key:r,variant:n}=(0,F.gn)(this,Jf,"f").getClientContext();n!==te.GUEST&&(yield(0,F.gn)(this,gm,"f").logout({accessToken:t},{context:{headers:{clientKey:r}}})),(0,F.gn)(this,Xf,"f").stop(),(0,F.gn)(this,Xf,"f").clearAuth(),yield(0,F.gn)(this,Xf,"f").clearStore(),(0,F.gn)(this,Jf,"f").logoutUser(),(0,F.gn)(this,rl,"f").removeItem(ym)})}}Xf=new WeakMap,Jf=new WeakMap,gm=new WeakMap,rl=new WeakMap;var Rm;(function(e){e.one="1.0.0"})(Rm||(Rm={}));const H$="orchestrator:identity-utils",E9={id:H$,dependencies:{featureServices:{[za]:Nr.one,[js]:Pu.one,[Wn]:vi.one,[Mp]:Bf.one}},create:({featureServices:e})=>{const t=e[za];return{[Rm.one]:()=>({featureService:new S9({apiClient:t,stateService:e[Wn],identityGatewaySdk:Sx(t),storage:window.sessionStorage})})}}};var Om;(function(e){e.one="1.0.0"})(Om||(Om={}));const Y$="orchestrator:globaleventemitter-service",v9=e=>({id:Y$,create:()=>({[Om.one]:()=>({featureService:e})})});var bm;(function(e){e.one="1.0.0"})(bm||(bm={}));const q$="orchestrator:reboot-controller",m9=e=>({id:q$,create:()=>({[bm.one]:()=>({featureService:e})})});class Bi extends Error{constructor(t,r){super(t),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(t){return t instanceof Bi}}class Ewe extends Bi{constructor(t="Authentication Error"){super(t),this.name="AuthenticationError"}}class vwe extends Bi{constructor(t="Illegal Argument Error"){super(t),this.name="IllegalArgumentError"}}class mwe extends Bi{constructor(t="Illegal State Error"){super(t),this.name="IllegalStateError"}}class T9 extends Bi{constructor(t="Invalid Client Key Error"){super(t),this.name="InvalidClientKeyError"}}class MC extends Bi{constructor(t,r){super(t),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class Zf extends Bi{constructor(t="Invalid Token Error"){super(t),this.name="InvalidTokenError"}}class A9 extends Bi{constructor(t,r){super(t),this.status=r,this.name="NetworkError"}}class g9 extends Bi{constructor(t){super(t.message()),this.operationOutcome=t,this.name="OperationOutcomeError"}}class IC extends Bi{constructor(t,r){super(t),this.data=r,this.name="UnknownError"}}class y9 extends Bi{constructor(t){super(t.join(". ")),this.errors=t,this.name="ValidationError"}}class ar{constructor(t,r){this.data=t,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(t){return new ar(void 0,t)}}var K$=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Cm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Wp,Qp;class Kt{static success(t){return new R9(t)}static failure(t){return new Pm(t)}}class R9 extends Kt{constructor(t){super(),Wp.set(this,void 0),K$(this,Wp,t,"f")}data(){return Cm(this,Wp,"f")}error(){throw Cm(this,Wp,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new ar(this.data())}}Wp=new WeakMap;class Pm extends Kt{constructor(t){super(),Qp.set(this,void 0),K$(this,Qp,t,"f")}data(){throw Cm(this,Qp,"f")}error(){return Cm(this,Qp,"f")}success(){return!1}failure(){return!0}intoFailure(){return Kt.failure(this.error())}toQueryResult(){return new ar(void 0,this.error())}}Qp=new WeakMap;var NC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},zp;class O9{constructor(){zp.set(this,[])}add(t){NC(this,zp,"f").push(t)}errors(){return NC(this,zp,"f")}hasErrors(){return NC(this,zp,"f").length>0}}zp=new WeakMap;var W$=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},LC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Xp,Mm;class b9{constructor(t){Xp.set(this,void 0),Mm.set(this,void 0),W$(this,Mm,t,"f"),W$(this,Xp,this.transformInput(t),"f")}validate(){return Kt.success(null)}data(){return LC(this,Xp,"f")}toJSON(){return LC(this,Xp,"f")}transformInput(t){return t}input(){return LC(this,Mm,"f")}}Xp=new WeakMap,Mm=new WeakMap;class sa extends b9{validate(){const t=new O9;return this.validator.validate(this.input(),t),t.hasErrors()?Kt.failure(new y9(t.errors())):Kt.success(null)}}var Q$=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Im,z$,X$;const J$=100,C9=20;class qs{constructor(){Im.add(this)}validate(t,r){Q$(this,Im,"m",z$).call(this,t.page,r),Q$(this,Im,"m",X$).call(this,t.pageSize,r)}}Im=new WeakSet,z$=function(t,r){t<0&&r.add("page must be a positive number")},X$=function(t,r){t!==void 0&&(t<=0&&r.add("Page size must be greater than 0"),t>J$&&r.add(`Page size must not exceed ${J$}`))};class Ks extends sa{constructor(){super(...arguments),this.validator=new qs}transformInput(t){return Object.assign({pageSize:C9},t)}}function P9(){var e;return!(typeof process>"u"||((e=process.versions)===null||e===void 0?void 0:e.node)===void 0)}function M9(){return typeof window<"u"}function Z$(){if(M9())return"browser";if(P9())return"node";throw new Error("Invalid runtime")}function I9(e){switch(Z$()){case"browser":return e.browser();case"node":return e.node()}}function eV(e){switch(Z$()){case"node":return Buffer.from(e,"base64").toString("utf-8");case"browser":return atob(e)}}function Fn(e){return e!=null}function Fo(e){return e==null}function Twe(e){return Fn(e)&&e!==""}function Ws(e){return e==null||e===""}function ka(e){return e===void 0}function ki(e){return e!==void 0}function N9(e){return JSON.parse(eV(e)).env}const L9=3;function tV(e){const t=e.split("."),r=t[1];if(r===void 0||t.length!==L9)throw new Zf("Token is missing data and may be corrupted");try{return JSON.parse(eV(r))}catch(n){const i=n;throw new Zf(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function D9(e){const r=tV(e).exp;if(typeof r!="number")throw new Zf("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const w9="custom:clientFhirPersonId",U9="custom:bwellFhirPatientId";function x9(e){const t=tV(e),r=t[U9],n=t[w9];return Fn(r)&&Fn(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}function $o(e){return e.trim()===""}const F9="1.33.0";function $9(){return F9}var DC;(function(e){e.Arrived="ARRIVED",e.Booked="BOOKED",e.Cancelled="CANCELLED",e.CheckedIn="CHECKED_IN",e.EnteredInError="ENTERED_IN_ERROR",e.Fulfilled="FULFILLED",e.Noshow="NOSHOW",e.Pending="PENDING",e.Proposed="PROPOSED",e.Waitlist="WAITLIST"})(DC||(DC={}));var rV;(function(e){e.Guest="GUEST"})(rV||(rV={}));var Nm;(function(e){e.CommunicationPreferencesPhi="COMMUNICATION_PREFERENCES_PHI",e.DataSharing="DATA_SHARING",e.HealthCircleAdolescent="HEALTH_CIRCLE_ADOLESCENT",e.HealthCircleMinor="HEALTH_CIRCLE_MINOR",e.HealthMatch="HEALTH_MATCH",e.IasImportRecords="IAS_IMPORT_RECORDS",e.MobileCommunicationPreferences="MOBILE_COMMUNICATION_PREFERENCES",e.PersonalizedHealthOffersAndAds="PERSONALIZED_HEALTH_OFFERS_AND_ADS",e.ProaAttestation="PROA_ATTESTATION",e.Tos="TOS"})(Nm||(Nm={}));var nV;(function(e){e.Bwell="bwell"})(nV||(nV={}));var iV;(function(e){e.Bwell="BWELL"})(iV||(iV={}));var aV;(function(e){e.Basic="BASIC",e.Oauth="OAUTH"})(aV||(aV={}));var wC;(function(e){e.Deny="DENY",e.Permit="PERMIT"})(wC||(wC={}));var UC;(function(e){e.Active="ACTIVE",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Inactive="INACTIVE",e.Proposed="PROPOSED",e.Rejected="REJECTED"})(UC||(UC={}));var oV;(function(e){e.Usd="USD"})(oV||(oV={}));var sV;(function(e){e.Connected="CONNECTED",e.Deleted="DELETED",e.Disconnected="DISCONNECTED",e.Error="ERROR",e.Expired="EXPIRED"})(sV||(sV={}));var uV;(function(e){e.Clinical="CLINICAL",e.Insurance="INSURANCE",e.Lab="LAB",e.Pharmacy="PHARMACY",e.Practitioner="PRACTITIONER"})(uV||(uV={}));var Lm;(function(e){e.Connecthub="connecthub",e.Nppes="nppes"})(Lm||(Lm={}));var cV;(function(e){e.Connecthub="CONNECTHUB",e.Nppes="NPPES"})(cV||(cV={}));var lV;(function(e){e.BwellPatient="BWELL_PATIENT",e.BwellPerson="BWELL_PERSON",e.ClientPatient="CLIENT_PATIENT",e.ClientPerson="CLIENT_PERSON"})(lV||(lV={}));var fV;(function(e){e.Active="active",e.EnteredInError="entered_in_error",e.Error="error",e.Off="off",e.Suspended="suspended",e.Test="test"})(fV||(fV={}));var _V;(function(e){e.Active="ACTIVE",e.EnteredInError="ENTERED_IN_ERROR",e.Error="ERROR",e.Off="OFF",e.Suspended="SUSPENDED",e.Test="TEST"})(_V||(_V={}));var xC;(function(e){e.CustomEvent="CUSTOM_EVENT",e.MobilePushOpen="MOBILE_PUSH_OPEN"})(xC||(xC={}));var FC;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(FC||(FC={}));var $C;(function(e){e.Person="Person"})($C||($C={}));var VC;(function(e){e.Characteristic="characteristic",e.Communication="communication",e.Gender="gender",e.Specialty="specialty"})(VC||(VC={}));var dV;(function(e){e.Characteristic="CHARACTERISTIC",e.Communication="COMMUNICATION",e.Gender="GENDER",e.Specialty="SPECIALTY"})(dV||(dV={}));var pV;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(pV||(pV={}));var hV;(function(e){e.Female="FEMALE",e.Male="MALE",e.Other="OTHER",e.Unknown="UNKNOWN"})(hV||(hV={}));var SV;(function(e){e.AllergyIntolerance="ALLERGY_INTOLERANCE",e.CarePlan="CARE_PLAN",e.Condition="CONDITION",e.Encounter="ENCOUNTER",e.Immunization="IMMUNIZATION",e.Labs="LABS",e.Medications="MEDICATIONS",e.Procedure="PROCEDURE",e.VitalSigns="VITAL_SIGNS"})(SV||(SV={}));var EV;(function(e){e.Official="_official",e.Old="_old",e.Secondary="_secondary",e.Temp="_temp",e.Usual="_usual"})(EV||(EV={}));var vV;(function(e){e.Clicked="clicked"})(vV||(vV={}));var mV;(function(e){e.Clicked="CLICKED"})(mV||(mV={}));var GC;(function(e){e.Debug="DEBUG",e.Error="ERROR",e.Info="INFO",e.Verbose="VERBOSE",e.Warn="WARN"})(GC||(GC={}));var TV;(function(e){e.Activity="ACTIVITY",e.Exam="EXAM",e.Imaging="IMAGING",e.Laboratory="LABORATORY",e.Procedure="PROCEDURE",e.SocialHistory="SOCIAL_HISTORY",e.Survey="SURVEY",e.Therapy="THERAPY",e.VitalSigns="VITAL_SIGNS"})(TV||(TV={}));var AV;(function(e){e.CancelDelete="CANCEL_DELETE",e.ConfirmDelete="CONFIRM_DELETE",e.DeletionInProgress="DELETION_IN_PROGRESS",e.ImmediateExecution="IMMEDIATE_EXECUTION",e.RequestDelete="REQUEST_DELETE"})(AV||(AV={}));var BC;(function(e){e.C19Vaccine="C19Vaccine",e.Device="Device",e.Insurance="Insurance",e.Laboratory="Laboratory",e.Pharmacy="Pharmacy",e.Provider="Provider",e.Bus="bus",e.Cg="cg",e.Crs="crs",e.Dept="dept",e.Edu="edu",e.Govt="govt",e.Ins="ins",e.Other="other",e.Pay="pay",e.Prov="prov",e.Reli="reli",e.Team="team"})(BC||(BC={}));var gV;(function(e){e.Bus="BUS",e.C19Vaccine="C19VACCINE",e.Cg="CG",e.Crs="CRS",e.Dept="DEPT",e.Device="DEVICE",e.Edu="EDU",e.Govt="GOVT",e.Ins="INS",e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Other="OTHER",e.Pay="PAY",e.Pharmacy="PHARMACY",e.Prov="PROV",e.Provider="PROVIDER",e.Reli="RELI",e.Team="TEAM"})(gV||(gV={}));var yV;(function(e){e.Add="add",e.Copy="copy",e.Move="move",e.Remove="remove",e.Replace="replace",e.Test="test"})(yV||(yV={}));var RV;(function(e){e.Patient="Patient",e.Person="Person"})(RV||(RV={}));var OV;(function(e){e.Practice="practice",e.Practitioner="practitioner"})(OV||(OV={}));var bV;(function(e){e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(bV||(bV={}));var CV;(function(e){e.QuestionnaireResponse="QuestionnaireResponse"})(CV||(CV={}));var PV;(function(e){e.AllergyIntolerance="ALLERGY_INTOLERANCE",e.CarePlan="CARE_PLAN",e.Condition="CONDITION",e.Encounter="ENCOUNTER",e.Immunization="IMMUNIZATION",e.MedicationDispense="MEDICATION_DISPENSE",e.MedicationRequest="MEDICATION_REQUEST",e.MedicationStatement="MEDICATION_STATEMENT",e.Observation="OBSERVATION",e.Procedure="PROCEDURE"})(PV||(PV={}));var MV;(function(e){e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Pharmacy="PHARMACY",e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(MV||(MV={}));var kC;(function(e){e.Content="content",e.Distance="distance",e.Relevance="relevance"})(kC||(kC={}));var IV;(function(e){e.Content="CONTENT",e.DataSourceRank="DATA_SOURCE_RANK",e.Distance="DISTANCE",e.Relevance="RELEVANCE"})(IV||(IV={}));var jC;(function(e){e.Asc="asc",e.Desc="desc"})(jC||(jC={}));var NV;(function(e){e.Asc="ASC",e.Desc="DESC"})(NV||(NV={}));var LV;(function(e){e.CareSearch="CARE_SEARCH",e.Proa="PROA",e.ProviderDetails="PROVIDER_DETAILS",e.Sayt="SAYT",e.Unspecified="UNSPECIFIED"})(LV||(LV={}));var DV;(function(e){e.Error="ERROR",e.Pending="PENDING",e.Retrieved="RETRIEVED",e.Retrieving="RETRIEVING"})(DV||(DV={}));var HC;(function(e){e.Accepted="ACCEPTED",e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Failed="FAILED",e.InProgress="IN_PROGRESS",e.OnHold="ON_HOLD",e.Ready="READY",e.Received="RECEIVED",e.Rejected="REJECTED",e.Requested="REQUESTED"})(HC||(HC={}));var wV;(function(e){e.Accurate="accurate",e.Estimate="estimate"})(wV||(wV={}));const V9=new Set(Object.values(FC));function UV(e){return V9.has(e)}const G9=new Set(Object.values(UC));function B9(e){return G9.has(e)}const k9=new Set(Object.values(Nm));function xV(e){return k9.has(e)}const j9=new Set(Object.values(wC));function H9(e){return j9.has(e)}class Y9{validate(t,r){!ka(t.gender)&&!UV(t.gender)&&r.add(`Invalid gender value: "${t.gender}"`)}}class Awe extends sa{constructor(){super(...arguments),this.validator=new Y9}}class q9{validate(t,r){xV(t.category)||r.add(`Invalid consent category code: "${t.category}"`)}}class gwe extends sa{constructor(){super(...arguments),this.validator=new q9}}class K9{validate(t,r){B9(t.status)||r.add(`Invalid consent status: "${t.status}"`),H9(t.provision)||r.add(`Invalid consent provision type: "${t.provision}"`),xV(t.category)||r.add(`Invalid consent category code: "${t.category}"`),!ka(t.organizationId)&&$o(t.organizationId)&&r.add("organizationId cannot be empty"),t.category===Nm.ProaAttestation&&ka(t.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class ywe extends sa{constructor(){super(...arguments),this.validator=new K9}}class W9{validate(t,r){Ws(t.exportId)&&r.add("exportId is required"),Ws(t.password)&&r.add("password is required")}}class Rwe extends sa{constructor(){super(...arguments),this.validator=new W9}}class Owe extends null{}var ja=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ua,Uu,FV,$V,VV,GV,BV,kV;class YC{constructor(){ua.add(this)}validate(t,r){if(!t.values||t.values.length===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}for(const n of t.values)ja(this,ua,"m",FV).call(this,n,r)}}ua=new WeakSet,Uu=function(t,r){t&&t!==null&&isNaN(t.getTime())&&r.add("The date is not valid")},FV=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:c,lessThanOrEqualTo:v,approximately:_}=t,L=[n,i,a,u,c,v,_].filter(W=>W!=null).length;if(L===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}ja(this,ua,"m",$V).call(this,t,L,r),ja(this,ua,"m",BV).call(this,t,r),ja(this,ua,"m",kV).call(this,t,r)},$V=function(t,r,n){const{equals:i,notEquals:a,approximately:u}=t;if(i&&r>1){n.add("The equals value cannot be set with any other values");return}if(a&&r>1){n.add("The notEquals value cannot be set with any other values");return}if(u&&r>1){n.add("The approximately value cannot be set with any other values");return}ja(this,ua,"m",VV).call(this,t,n),ja(this,ua,"m",GV).call(this,t,n)},VV=function(t,r){t.greaterThan&&t.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},GV=function(t,r){t.lessThan&&t.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},BV=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:c,lessThanOrEqualTo:v,approximately:_}=t;n&&ja(this,ua,"m",Uu).call(this,n,r),i&&ja(this,ua,"m",Uu).call(this,i,r),a&&ja(this,ua,"m",Uu).call(this,a,r),u&&ja(this,ua,"m",Uu).call(this,u,r),c&&ja(this,ua,"m",Uu).call(this,c,r),v&&ja(this,ua,"m",Uu).call(this,v,r),_&&ja(this,ua,"m",Uu).call(this,_,r)},kV=function(t,r){const{greaterThan:n,greaterThanOrEqualTo:i,lessThan:a,lessThanOrEqualTo:u}=t;n&&u&&n>=u&&r.add("The greaterThan value must be less than the lessThanOrEqualTo value"),i&&a&&i>=a&&r.add("The greaterThanOrEqualTo value must be less than the lessThan value"),n&&a&&n>=a&&r.add("The greaterThan value must be less than the lessThan value"),i&&u&&i>=u&&r.add("The greaterThanOrEqualTo value must be less than the lessThanOrEqualTo value")};var qC=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Jp;class Dm{constructor(){Jp.set(this,new Q9)}validate(t,r){var n;if(t.value===void 0&&t.values===void 0&&t.notEquals===void 0){r.add("Either SearchToken value or values or notEquals must be provided");return}if(t.value!==void 0&&qC(this,Jp,"f").validate(t.value,r),t.values!==void 0&&t.values.length===0){r.add("At least one Coding must be set to instantiate a SearchToken");return}for(const i of(n=t.values)!==null&&n!==void 0?n:[])qC(this,Jp,"f").validate(i,r);if(t.notEquals!==void 0){if(t.notEquals.values!==void 0){if(t.notEquals.values.length===0){r.add("If notEquals values are provided, at least one Coding must be set");return}for(const i of t.notEquals.values)qC(this,Jp,"f").validate(i,r)}t.notEquals.code===void 0&&t.notEquals.value===void 0&&t.notEquals.system===void 0&&t.notEquals.values===void 0&&r.add("NotEquals must have at least one non-null property (code, value, system, or values)")}}}Jp=new WeakMap;class Q9{validate(t,r){!t.system&&!t.code&&r.add("Each Coding in the list must have at least one non-null and non-empty value for system or code")}}var e_=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},KC,WC,QC,zC,XC,JC;class jV extends qs{constructor(){super(...arguments),KC.set(this,new Dm),WC.set(this,new YC)}validate(t,r){super.validate(t,r),t.groupCode&&e_(this,KC,"f").validate(t.groupCode,r),t.lastUpdated&&e_(this,WC,"f").validate(t.lastUpdated,r)}}KC=new WeakMap,WC=new WeakMap;class z9{validate(t,r){t.length===0&&r.add("Prescription array must not be empty.")}}class HV extends qs{constructor(){super(...arguments),QC.set(this,new z9),zC.set(this,new YC)}validate(t,r){super.validate(t,r),t.lastUpdated!==void 0&&e_(this,zC,"f").validate(t.lastUpdated,r),t.prescription!==void 0&&e_(this,QC,"f").validate(t.prescription,r)}}QC=new WeakMap,zC=new WeakMap;class X9 extends qs{validate(t,r){var n;super.validate(t,r),!((n=t?.ids)===null||n===void 0)&&n.length||r.add("ids must not be empty")}}class J9 extends Ks{constructor(){super(...arguments),this.validator=new jV}}class bwe extends null{}class Cwe extends null{}class Pwe extends null{}class Mwe extends null{}class Iwe extends null{}class Nwe extends null{}class Lwe extends null{}class Dwe extends null{}class wwe extends null{}class Uwe extends null{}class xwe extends null{}class Fwe extends null{}class $we extends null{}class Vwe extends null{}class Gwe extends null{}class Bwe extends null{}class kwe extends null{}class jwe extends null{}class Hwe extends null{}class Z9 extends HV{constructor(){super(...arguments),XC.set(this,new Dm)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&e_(this,XC,"f").validate(t.medicationCode,r)}}XC=new WeakMap;class Ywe extends Ks{constructor(){super(...arguments),this.validator=new HV}}class qwe extends Ks{constructor(){super(...arguments),this.validator=new Z9}}class eZ extends jV{constructor(){super(...arguments),JC.set(this,new Dm)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&e_(this,JC,"f").validate(t.medicationCode,r)}}JC=new WeakMap;class Kwe extends J9{constructor(){super(...arguments),this.validator=new eZ}}class Wwe extends null{}class Qwe extends Ks{constructor(){super(...arguments),this.validator=new X9}}class zwe extends null{}class tZ{validate(t,r){$o(t.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class Xwe extends sa{constructor(){super(...arguments),this.validator=new tZ}}class rZ extends qs{validate(t,r){$o(t.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(t,r)}}class Jwe extends Ks{constructor(){super(...arguments),this.validator=new rZ}}class nZ extends qs{validate(t,r){$o(t.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(t,r)}}class Zwe extends Ks{constructor(){super(...arguments),this.validator=new nZ}}const iZ=new Set(Object.values(HC));function YV(e){return iZ.has(e)}var aZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ZC,qV;class oZ extends qs{constructor(){super(...arguments),ZC.add(this)}validate(t,r){if(super.validate(t,r),!ka(t.status)){const n=Array.isArray(t.status)?t.status:[t.status];for(const i of n)aZ(this,ZC,"m",qV).call(this,i,r)}}}ZC=new WeakSet,qV=function(t,r){YV(t)||r.add(`Invalid task status: "${t}"`)};class eUe extends Ks{constructor(){super(...arguments),this.validator=new oZ}}class sZ{validate(t,r){YV(t.newStatus)||r.add(`Invalid task status: "${t.newStatus}"`)}}class tUe extends sa{constructor(){super(...arguments),this.validator=new sZ}}var wm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},t_,KV,WV,QV,zV;class rUe extends Ks{constructor(){super(...arguments),this.validator=new uZ}}class uZ extends qs{constructor(){super(...arguments),t_.add(this)}validate(t,r){super.validate(t,r),ki(t.organizationTypeFilters)&&wm(this,t_,"m",KV).call(this,t.organizationTypeFilters,r),ki(t.sortBy)&&wm(this,t_,"m",WV).call(this,t.sortBy,r),ki(t.filterFields)&&wm(this,t_,"m",QV).call(this,t.filterFields,r),ki(t.gender)&&wm(this,t_,"m",zV).call(this,t.gender,r)}}t_=new WeakSet,KV=function(t,r){for(const n of t)lZ(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},WV=function(t,r){ki(t.field)&&!_Z(t.field)&&r.add(`Invalid sortBy.field value: "${t.field}"`),ki(t.order)&&!pZ(t.order)&&r.add(`Invalid sortBy.order value: "${t.order}"`)},QV=function(t,r){for(const n of t)SZ(n)||r.add(`Invalid filterField value: "${n}"`)},zV=function(t,r){UV(t)||r.add(`Invalid gender value: "${t}"`)};const cZ=new Set(Object.values(BC));function lZ(e){return cZ.has(e)}const fZ=new Set(Object.values(kC));function _Z(e){return fZ.has(e)}const dZ=new Set(Object.values(jC));function pZ(e){return dZ.has(e)}const hZ=new Set(Object.values(VC));function SZ(e){return hZ.has(e)}class nUe extends null{}class iUe extends Ks{constructor(){super(...arguments),this.validator=new EZ}}class EZ extends qs{validate(t,r){super.validate(t,r)}}const vZ="data-connection-status";var mZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},eP;const TZ="connectionId cannot be null or empty",AZ="username cannot be null or empty",gZ="password cannot be null or empty";class XV{validate(t,r){t.connectionId===""&&r.add(TZ)}}class yZ{constructor(){eP.set(this,new XV)}validate(t,r){mZ(this,eP,"f").validate(t,r),t.username===""&&r.add(AZ),t.password===""&&r.add(gZ)}}eP=new WeakMap;class RZ extends sa{constructor(){super(...arguments),this.validator=new XV}}class aUe extends null{}class oUe extends RZ{constructor(){super(...arguments),this.validator=new yZ}}const OZ="deviceToken is required",bZ="platformName must be a valid DevicePlatform value",CZ="applicationName is required";var tP;(function(e){e.IOS="IOS",e.ANDROID="ANDROID"})(tP||(tP={}));const PZ=new Set(Object.values(tP));function MZ(e){return PZ.has(e)}function IZ(e){return!MZ(e)}class JV{validate(t,r){$o(t.deviceToken)&&r.add(OZ)}}class NZ extends JV{validate(t,r){super.validate(t,r),IZ(t.platformName.toUpperCase())&&r.add(bZ),$o(t.applicationName)&&r.add(CZ)}}class sUe extends sa{constructor(){super(...arguments),this.validator=new NZ}}class uUe extends sa{constructor(){super(...arguments),this.validator=new JV}}const LZ="string parameter serializedNotification must be provided",DZ="serialized notification must have a non-empty notification_id field of type string",ZV="serialized notification must have an itbl object containing a non-empty messageId field of type string",wZ="parsed notification must be a non-null object.",UZ="serialized notification is not valid JSON.";class xZ{validate(t,r){if(ka(t.serializedNotification)||typeof t.serializedNotification!="string"||$o(t.serializedNotification)){r.add(LZ);return}let n=null;try{n=JSON.parse(t.serializedNotification)}catch{r.add(UZ);return}if(typeof n!="object"||n===null){r.add(wZ);return}const{itbl:i,notification_id:a}=n;if((ka(a)||typeof a!="string"||$o(a))&&r.add(DZ),typeof i!="object"||Fo(i)){r.add(ZV);return}(ka(i.messageId)||typeof i.messageId!="string"||$o(i.messageId))&&r.add(ZV)}}class cUe extends sa{constructor(){super(...arguments),this.validator=new xZ}}const FZ="SearchStringValue should be a non-empty string";class $Z{validate(t,r){if(Fo(t.values))return;let n=!1;for(const i of t.values)$o(i)&&(n=!0);n&&r.add(FZ)}}var rP=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},nP,iP,aP;class VZ{constructor(){nP.set(this,new YC),iP.set(this,new $Z),aP.set(this,new Dm)}validate(t,r){var n;Fn(t._source)&&rP(this,iP,"f").validate(t._source,r),Fn(t.date)&&rP(this,nP,"f").validate(t.date,r),Fn(t._count)&&t._count<0&&r.add("Value of count cannot be less than 0"),Fn(t._getpagesoffset)&&t._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),Fn((n=t.supporting_info)===null||n===void 0?void 0:n.value)&&$o(t.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),Fn(t.status)&&rP(this,aP,"f").validate(t.status,r)}}nP=new WeakMap,iP=new WeakMap,aP=new WeakMap;class lUe extends sa{constructor(){super(...arguments),this.validator=new VZ}}class GZ{validate(t,r){if(!Fo(t.cancelationReason)){if(Fo(t.cancelationReason.coding)||t.cancelationReason.coding.length===0){r.add("cancelationReason must have at least one coding");return}for(const n of t.cancelationReason.coding)(Fo(n?.code)||Fo(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class fUe extends sa{constructor(){super(...arguments),this.validator=new GZ}}class BZ{validate(t,r){var n;Ws((n=t.organization.value)===null||n===void 0?void 0:n.trim())&&r.add("Organization reference is required and must have a non-empty value.")}}class _Ue extends sa{constructor(){super(...arguments),this.validator=new BZ}}class kZ{validate(t,r){const n=t.questionnaireResponse;if(Fo(n)){r.add("questionnaireResponse is required");return}if((Ws(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ws(n.status)&&r.add("questionnaireResponse.status is required"),Ws(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),Fo(n.contained)||n.contained.length===0)r.add("questionnaireResponse.contained must have at least one item");else{let i=null;for(const a of n.contained){if(Fo(a)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(a.resourceType==="Questionnaire"){i=a;break}}if(Fo(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}Ws(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class dUe extends sa{constructor(){super(...arguments),this.validator=new kZ}}var oP=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(h){try{_(n.next(h))}catch(L){u(L)}}function v(h){try{_(n.throw(h))}catch(L){u(L)}}function _(h){h.done?a(h.value):i(h.value).then(c,v)}_((n=n.apply(e,t||[])).next())})};class eG{constructor(t=new Map){this.storage=t}get(t){return oP(this,void 0,void 0,function*(){return this.storage.get(t)})}set(t,r){return oP(this,void 0,void 0,function*(){this.storage.set(t,r)})}delete(t){return oP(this,void 0,void 0,function*(){return this.storage.delete(t)})}}const jZ={logLevel:GC.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new eG,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var Qs;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(Qs||(Qs={}));var HZ=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},tG=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Zp,Mr;(function(e){e[e.VERBOSE=0]="VERBOSE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.FATAL=5]="FATAL"})(Mr||(Mr={}));const YZ={[Mr.VERBOSE]:"VERBOSE",[Mr.DEBUG]:"DEBUG",[Mr.INFO]:"INFO",[Mr.WARN]:"WARN",[Mr.ERROR]:"ERROR",[Mr.FATAL]:"FATAL"};class r_{constructor(t){Zp.set(this,void 0),HZ(this,Zp,t,"f")}get severity(){return tG(this,Zp,"f")}shouldLog(t){return t>=tG(this,Zp,"f")}static severityText(t){return YZ[t]}static severityFromText(t){switch(t){case"VERBOSE":return Mr.VERBOSE;case"DEBUG":return Mr.DEBUG;case"INFO":return Mr.INFO;case"WARN":return Mr.WARN;case"ERROR":return Mr.ERROR;case"FATAL":return Mr.FATAL;default:throw new Error(`Invalid severity text: ${t}`)}}}Zp=new WeakMap;var sP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Es=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},xu,rG,Um,eh,xm,nl;class nG{constructor(t,r,n){xu.add(this),Um.set(this,void 0),eh.set(this,void 0),xm.set(this,void 0),sP(this,Um,n,"f"),sP(this,eh,new r_(t),"f"),sP(this,xm,r,"f")}name(){return Es(this,Um,"f")}severity(){return Es(this,eh,"f").severity}verbose(t,r){Es(this,xu,"m",nl).call(this,Mr.VERBOSE,t,r)}debug(t,r){Es(this,xu,"m",nl).call(this,Mr.DEBUG,t,r)}info(t,r){Es(this,xu,"m",nl).call(this,Mr.INFO,t,r)}warn(t,r){Es(this,xu,"m",nl).call(this,Mr.WARN,t,r)}error(t,r){let n;r instanceof Kt&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),Es(this,xu,"m",nl).call(this,Mr.ERROR,t,n)}fatal(t,r){Es(this,xu,"m",nl).call(this,Mr.FATAL,t,r)}static otelSeverityNumber(t){switch(t){case Mr.VERBOSE:return Qs.TRACE;case Mr.DEBUG:return Qs.DEBUG;case Mr.INFO:return Qs.INFO;case Mr.WARN:return Qs.WARN;case Mr.ERROR:return Qs.ERROR;case Mr.FATAL:return Qs.FATAL;default:return Qs.UNSPECIFIED}}}rG=nG,Um=new WeakMap,eh=new WeakMap,xm=new WeakMap,xu=new WeakSet,nl=function(t,r,n){!Es(this,eh,"f").shouldLog(t)||Es(this,xm,"f").emit({timestamp:Date.now(),severityNumber:rG.otelSeverityNumber(t),severityText:r_.severityText(t),body:r,attributes:n??{}})};var iG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},aG=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Fm,$m;class qZ{constructor(t,r){Fm.set(this,void 0),$m.set(this,void 0),iG(this,$m,t,"f"),iG(this,Fm,r.loggerProvider(),"f")}getLogger(t){const r=t??"default",n=aG(this,Fm,"f").getLogger(r);return new nG(aG(this,$m,"f"),n,r)}}Fm=new WeakMap,$m=new WeakMap;class KZ{format(t,r,n,i){let u=`[${new Date().toISOString()}] ${r_.severityText(t)}`;return n!==void 0&&(u+=` (${n})`),u+=`: ${r}`,i===void 0?[u]:[u,i]}}var uP=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},di=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},vs,ms,zs;class WZ{constructor(t,r){vs.set(this,void 0),ms.set(this,void 0),zs.set(this,void 0),uP(this,ms,new r_(t),"f"),uP(this,vs,r,"f"),uP(this,zs,new KZ,"f")}name(){return di(this,vs,"f")}severity(){return di(this,ms,"f").severity}verbose(t,r){di(this,ms,"f").shouldLog(Mr.VERBOSE)&&console.debug(...di(this,zs,"f").format(Mr.VERBOSE,t,di(this,vs,"f"),r))}debug(t,r){di(this,ms,"f").shouldLog(Mr.DEBUG)&&console.debug(...di(this,zs,"f").format(Mr.DEBUG,t,di(this,vs,"f"),r))}info(t,r){di(this,ms,"f").shouldLog(Mr.INFO)&&console.info(...di(this,zs,"f").format(Mr.INFO,t,di(this,vs,"f"),r))}warn(t,r){di(this,ms,"f").shouldLog(Mr.WARN)&&console.warn(...di(this,zs,"f").format(Mr.WARN,t,di(this,vs,"f"),r))}error(t,r){let n=r;r instanceof Kt&&(n=r.failure()?r.error():r.data()),di(this,ms,"f").shouldLog(Mr.ERROR)&&console.error(...di(this,zs,"f").format(Mr.ERROR,t,di(this,vs,"f"),n))}fatal(t,r){di(this,ms,"f").shouldLog(Mr.FATAL)&&console.error(...di(this,zs,"f").format(Mr.FATAL,t,di(this,vs,"f"),r))}}vs=new WeakMap,ms=new WeakMap,zs=new WeakMap;var QZ=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},zZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Vm;class ji{constructor(t=Mr.FATAL){Vm.set(this,void 0),QZ(this,Vm,t,"f")}getLogger(t){return new WZ(zZ(this,Vm,"f"),t)}}Vm=new WeakMap;var XZ=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},cP,oG;class JZ{constructor(){cP.add(this)}createLogProvider(t,r){switch(XZ(this,cP,"m",oG).call(this,t)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new qZ(t.logLevel,r);case"console":return new ji(t.logLevel)}}}cP=new WeakSet,oG=function(t){return t.telemetry.enabled?"otel":"console"};var Nn=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Xs=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},ao,n_,Fu,i_,$u,il,sG,uG,cG,lG,fG,_G,dG,pG,hG,SG;class Gm{constructor(t){ao.add(this),n_.set(this,void 0),Fu.set(this,void 0),i_.set(this,void 0),$u.set(this,void 0),il.set(this,void 0),this.bwellConfig=Nn(this,ao,"m",fG).call(this,t),Xs(this,n_,r_.severityFromText(this.bwellConfig.logLevel),"f"),Xs(this,il,Nn(this,ao,"m",SG).call(this),"f"),Xs(this,i_,Nn(this,ao,"m",dG).call(this),"f"),Xs(this,Fu,Nn(this,ao,"m",pG).call(this),"f"),Xs(this,$u,Nn(this,ao,"m",hG).call(this),"f")}static initialize(t){try{const r=new Gm(t);return Kt.success(r)}catch(r){if(Bi.isBwellError(r))return Kt.failure(r);throw r}}get logLevel(){return Nn(this,n_,"f")}get graphQL(){return Nn(this,i_,"f")}get telemetry(){return Nn(this,Fu,"f")}get http(){return Nn(this,$u,"f")}get context(){return Nn(this,il,"f")}setContextUser(t){Nn(this,il,"f").user=t}mergeRemoteConfig(t){Xs(this,n_,Nn(this,ao,"m",sG).call(this,t),"f"),Xs(this,i_,Nn(this,ao,"m",uG).call(this,t),"f"),Xs(this,Fu,Object.freeze(Nn(this,ao,"m",cG).call(this,t)),"f"),Xs(this,$u,Object.freeze(Nn(this,ao,"m",lG).call(this,t)),"f")}}n_=new WeakMap,Fu=new WeakMap,i_=new WeakMap,$u=new WeakMap,il=new WeakMap,ao=new WeakSet,sG=function(t){var r;const n=(r=t?.logLevel)!==null&&r!==void 0?r:null;return n===null?Nn(this,n_,"f"):r_.severityFromText(n)},uG=function(t){var r;const n=(r=t?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return Nn(this,i_,"f");const{authedApiUrl:i,unauthedApiUrl:a}=this.bwellConfig.overrides;return{unauthApiUrl:a??n.url,apiUrl:i??n.authUrl}},cG=function(t){var r,n;const i=(r=t?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return Nn(this,Fu,"f");const a=(n=i.enabled)!==null&&n!==void 0?n:Nn(this,Fu,"f").enabled;if(i.collectorUrl.endsWith("/"))throw new Error('Telemetry config "collectorUrl" cannot end with a trailing slash.');let u;try{u=new URL(i.collectorUrl)}catch{throw new Error('Telemetry config "collectorUrl" malformed/is not a proper URL.')}if(u.pathname!=="/")throw new Error('Telemetry config "collectorUrl" cannot contain a path.');return Object.assign(Object.assign({},Nn(this,Fu,"f")),{enabled:a,collectorUrl:i.collectorUrl})},lG=function(t){var r,n,i;const a=(r=t?.httpClient)!==null&&r!==void 0?r:null;return a===null?Nn(this,$u,"f"):{timeout:(n=a.requestTimeout)!==null&&n!==void 0?n:Nn(this,$u,"f").timeout,retryPolicy:(i=a.retry)!==null&&i!==void 0?i:Nn(this,$u,"f").retryPolicy}},fG=function(t){return Object.assign(Object.assign({},jZ),t)},_G=function(){try{return N9(this.bwellConfig.clientKey)}catch{throw new T9("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},dG=function(){var t,r;return{apiUrl:(t=this.bwellConfig.overrides.authedApiUrl)!==null&&t!==void 0?t:`https://api-gateway.${Nn(this,il,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${Nn(this,il,"f").env}.icanbwell.com/federated-graph/graphql`}},pG=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},hG=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},SG=function(){return{clientKey:this.bwellConfig.clientKey,env:Nn(this,ao,"m",_G).call(this),user:null}};var ZZ=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function c(h){try{_(n.next(h))}catch(L){u(L)}}function v(h){try{_(n.throw(h))}catch(L){u(L)}}function _(h){h.done?a(h.value):i(h.value).then(c,v)}_((n=n.apply(e,t||[])).next())})},EG=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Bm=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},a_,km;class eee{constructor(t,r=new ji){a_.set(this,void 0),km.set(this,void 0),EG(this,km,t,"f"),EG(this,a_,r.getLogger("ConfigManager"),"f")}initialize(t){return ZZ(this,void 0,void 0,function*(){const r=Gm.initialize(t);if(r.failure())return r;const n=r.data();Bm(this,a_,"f").verbose("Initializing SDK Configuration");const i=yield Bm(this,km,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const a=i.data();try{n.mergeRemoteConfig(a)}catch(u){Bm(this,a_,"f").error("Error merging SDK config with remote config.",u)}return Bm(this,a_,"f").info("Remote SDK Configuration merged with user config"),Kt.success(n)})}}a_=new WeakMap,km=new WeakMap;const lP=JSON,tee=e=>e.toUpperCase(),ree=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},nee=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},iee=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0},aee=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},pUe=(e,t,...r)=>{const[n,i]=r;return e.document?e:{url:e,document:t,variables:n,requestHeaders:i,signal:void 0}},hUe=(e,t,...r)=>{const[n,i]=r;return e.query?e:{url:e,query:t,variables:n,requestHeaders:i,signal:void 0}};var oee=p(5157),see=p(2704);const vG=e=>{let t;const r=e.definitions.filter(n=>n.kind==="OperationDefinition");return r.length===1&&(t=r[0]?.name?.value),t},jm=e=>{if(typeof e=="string"){let r;try{const n=(0,oee.qg)(e);r=vG(n)}catch{}return{query:e,operationName:r}}const t=vG(e);return{query:(0,see.y)(e),operationName:t}};class Vu extends Error{constructor(t,r){const n=`${Vu.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Vu.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Vu)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${t.status})`}}var o_=p(288),uee=p.t(o_,2);const cee="connection_init",lee="connection_ack",mG="ping",TG="pong",fee="subscribe",_ee="next",dee="error",AG="complete";class Gu{get type(){return this._type}get id(){return this._id}get payload(){return this._payload}constructor(t,r,n){this._type=t,this._payload=r,this._id=n}get text(){const t={type:this.type};return this.id!=null&&this.id!=null&&(t.id=this.id),this.payload!=null&&this.payload!=null&&(t.payload=this.payload),JSON.stringify(t)}static parse(t,r){const{type:n,payload:i,id:a}=JSON.parse(t);return new Gu(n,r(i),a)}}class pee{constructor(t,{onInit:r,onAcknowledged:n,onPing:i,onPong:a}){this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=t,t.addEventListener("open",async u=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={},t.send(See(r?await r():null).text)}),t.addEventListener("close",u=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={}}),t.addEventListener("error",u=>{console.error(u)}),t.addEventListener("message",u=>{try{const c=hee(u.data);switch(c.type){case lee:{this.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(this.socketState.acknowledged=!0,n&&n(c.payload));return}case mG:{i?i(c.payload).then(L=>t.send(gG(L).text)):t.send(gG(null).text);return}case TG:{a&&a(c.payload);return}}if(!this.socketState.acknowledged||c.id===void 0||c.id===null||!this.socketState.subscriptions[c.id])return;const{query:v,variables:_,subscriber:h}=this.socketState.subscriptions[c.id];switch(c.type){case _ee:{!c.payload.errors&&c.payload.data&&h.next&&h.next(c.payload.data),c.payload.errors&&h.error&&h.error(new Vu({...c.payload,status:200},{query:v,variables:_}));return}case dee:{h.error&&h.error(new Vu({errors:c.payload,status:200},{query:v,variables:_}));return}case AG:{h.complete&&h.complete(),delete this.socketState.subscriptions[c.id];return}}}catch(c){console.error(c),t.close(1006)}t.close(4400,"Unknown graphql-ws message.")})}makeSubscribe(t,r,n,i){const a=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[a]={query:t,variables:i,subscriber:n},this.socket.send(vee(a,{query:t,operationName:r,variables:i}).text),()=>{this.socket.send(mee(a).text),delete this.socketState.subscriptions[a]}}rawRequest(t,r){return new Promise((n,i)=>{let a;this.rawSubscribe(t,{next:(u,c)=>a={data:u,extensions:c},error:i,complete:()=>n(a)},r)})}request(t,r){return new Promise((n,i)=>{let a;this.subscribe(t,{next:u=>a=u,error:i,complete:()=>n(a)},r)})}subscribe(t,r,n){const{query:i,operationName:a}=jm(t);return this.makeSubscribe(i,a,r,n)}rawSubscribe(t,r,n){return this.makeSubscribe(t,void 0,r,n)}ping(t){this.socket.send(Eee(t).text)}close(){this.socket.close(1e3)}}pee.PROTOCOL="graphql-transport-ws";function hee(e,t=r=>r){return Gu.parse(e,t)}function See(e){return new Gu(cee,e)}function Eee(e){return new Gu(mG,e,void 0)}function gG(e){return new Gu(TG,e,void 0)}function vee(e,t){return new Gu(fee,t,e)}function mee(e){return new Gu(AG,void 0,e)}const s_=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||uee&&o_.Headers&&e instanceof o_.Headers?t=ree(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):t=e),t},yG=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Tee=e=>{if(!Array.isArray(e.query)){const n=e,i=[`query=${encodeURIComponent(yG(n.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,r=e.query.reduce((n,i,a)=>(n.push({query:yG(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[a]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(r))}`},Aee=e=>async t=>{const{url:r,query:n,variables:i,operationName:a,fetch:u,fetchOptions:c,middleware:v}=t,_={...t.headers};let h="",L;e==="POST"?(L=yee(n,i,a,c.jsonSerializer),typeof L=="string"&&(_["Content-Type"]="application/json")):h=Tee({query:n,variables:i,operationName:a,jsonSerializer:c.jsonSerializer??lP});const W={method:e,headers:_,body:L,...c};let Te=r,me=W;if(v){const Oe=await Promise.resolve(v({...W,url:r,operationName:a,variables:i})),{url:He,...qe}=Oe;Te=He,me=qe}return h&&(Te=`${Te}?${h}`),await u(Te,me)};class Hm{constructor(t,r={}){this.url=t,this.requestConfig=r,this.rawRequest=async(...n)=>{const[i,a,u]=n,c=iee(i,a,u),{headers:v,fetch:_=o_,method:h="POST",requestMiddleware:L,responseMiddleware:W,...Te}=this.requestConfig,{url:me}=this;c.signal!==void 0&&(Te.signal=c.signal);const{operationName:Oe}=jm(c.query);return fP({url:me,query:c.query,variables:c.variables,headers:{...s_(_P(v)),...s_(c.requestHeaders)},operationName:Oe,fetch:_,method:h,fetchOptions:Te,middleware:L}).then(He=>(W&&W(He),He)).catch(He=>{throw W&&W(He),He})}}async request(t,...r){const[n,i]=r,a=nee(t,n,i),{headers:u,fetch:c=o_,method:v="POST",requestMiddleware:_,responseMiddleware:h,...L}=this.requestConfig,{url:W}=this;a.signal!==void 0&&(L.signal=a.signal);const{query:Te,operationName:me}=jm(a.document);return fP({url:W,query:Te,variables:a.variables,headers:{...s_(_P(u)),...s_(a.requestHeaders)},operationName:me,fetch:c,method:v,fetchOptions:L,middleware:_}).then(Oe=>(h&&h(Oe),Oe.data)).catch(Oe=>{throw h&&h(Oe),Oe})}batchRequests(t,r){const n=aee(t,r),{headers:i,...a}=this.requestConfig;n.signal!==void 0&&(a.signal=n.signal);const u=n.documents.map(({document:v})=>jm(v).query),c=n.documents.map(({variables:v})=>v);return fP({url:this.url,query:u,variables:c,headers:{...s_(_P(i)),...s_(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??o_,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware}).then(v=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(v),v.data)).catch(v=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(v),v})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const fP=async e=>{const{query:t,variables:r,fetchOptions:n}=e,i=Aee(tee(e.method??"post")),a=Array.isArray(e.query),u=await i(e),c=await Ree(u,n.jsonSerializer??lP),v=Array.isArray(c)?!c.some(({data:h})=>!h):Boolean(c.data),_=Array.isArray(c)||!c.errors||Array.isArray(c.errors)&&!c.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(u.ok&&_&&v){const{errors:h,...L}=(Array.isArray(c),c),W=n.errorPolicy==="ignore"?L:c;return{...a?{data:W}:W,headers:u.headers,status:u.status}}else{const h=typeof c=="string"?{error:c}:c;throw new Vu({...h,status:u.status,headers:u.headers},{query:t,variables:r})}},SUe=async(...e)=>{const[t,r,...n]=e,i=parseRawRequestExtendedArgs(t,r,...n);return new Hm(i.url).rawRequest({...i})};async function EUe(e,t,...r){const n=parseRequestExtendedArgs(e,t,...r);return new Hm(n.url).request({...n})}const vUe=async(...e)=>{const t=gee(e);return new Hm(t.url).batchRequests(t)},gee=e=>e.length===1?e[0]:{url:e[0],documents:e[1],requestHeaders:e[2],signal:void 0},yee=(e,t,r,n)=>{const i=n??lP;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:r});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const a=e.reduce((u,c,v)=>(u.push({query:c,variables:t?t[v]:void 0}),u),[]);return i.stringify(a)},Ree=async(e,t)=>{let r;return e.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},_P=e=>typeof e=="function"?e():e,mUe=(e,...t)=>e.reduce((r,n,i)=>`${r}${n}${i in t?String(t[i]):""}`,""),TUe=null,Hi=`
5328
5342
  fragment CodingFields on Coding {
5329
5343
  system
5330
5344
  code
@@ -6334,17 +6348,14 @@ ${mP}`,Hee=`
6334
6348
  ${oo}
6335
6349
  ${bn}`,Yee=`
6336
6350
  fragment QuestionnaireResponseItemFields on QuestionnaireResponseItem {
6337
- id
6338
6351
  linkId
6339
6352
  text
6340
6353
  answer {
6341
- id
6342
6354
  valueBoolean
6343
6355
  valueDecimal
6344
6356
  valueInteger
6345
6357
  valueDate
6346
6358
  valueDateTime
6347
- valueTime
6348
6359
  valueString
6349
6360
  valueUri
6350
6361
  valueAttachment {
@@ -6364,7 +6375,6 @@ ${bn}`,Yee=`
6364
6375
  type
6365
6376
  display
6366
6377
  extension {
6367
- id
6368
6378
  url
6369
6379
  valueBoolean
6370
6380
  valueInteger
@@ -6378,9 +6388,6 @@ ${bn}`,Yee=`
6378
6388
  }
6379
6389
  valueCodeableConcept {
6380
6390
  ...CodeableConceptFields
6381
- coding {
6382
- id
6383
- }
6384
6391
  }
6385
6392
  valueDateTime
6386
6393
  valueCode
@@ -6398,9 +6405,7 @@ ${bn}`,Yee=`
6398
6405
  ${ca}
6399
6406
  ${Ur}`,qee=`
6400
6407
  fragment QuestionnaireItemFields on QuestionnaireItem {
6401
- id
6402
6408
  extension {
6403
- id
6404
6409
  url
6405
6410
  valueBoolean
6406
6411
  valueInteger
@@ -6414,9 +6419,6 @@ ${Ur}`,qee=`
6414
6419
  }
6415
6420
  valueCodeableConcept {
6416
6421
  ...CodeableConceptFields
6417
- coding {
6418
- id
6419
- }
6420
6422
  }
6421
6423
  valueDateTime
6422
6424
  valueCode
@@ -6427,7 +6429,6 @@ ${Ur}`,qee=`
6427
6429
  display
6428
6430
  }
6429
6431
  extension {
6430
- id
6431
6432
  url
6432
6433
  valueBoolean
6433
6434
  valueInteger
@@ -6441,9 +6442,6 @@ ${Ur}`,qee=`
6441
6442
  }
6442
6443
  valueCodeableConcept {
6443
6444
  ...CodeableConceptFields
6444
- coding {
6445
- id
6446
- }
6447
6445
  }
6448
6446
  valueDateTime
6449
6447
  valueCode
@@ -6460,7 +6458,6 @@ ${Ur}`,qee=`
6460
6458
  text
6461
6459
  type
6462
6460
  enableWhen {
6463
- id
6464
6461
  question
6465
6462
  operator
6466
6463
  answerBoolean
@@ -6488,10 +6485,8 @@ ${Ur}`,qee=`
6488
6485
  readOnly
6489
6486
  maxLength
6490
6487
  answerOption {
6491
- id
6492
6488
  valueInteger
6493
6489
  valueDate
6494
- valueTime
6495
6490
  valueString
6496
6491
  valueCoding {
6497
6492
  ...CodingFields
@@ -6501,7 +6496,6 @@ ${Ur}`,qee=`
6501
6496
  type
6502
6497
  display
6503
6498
  extension {
6504
- id
6505
6499
  url
6506
6500
  valueBoolean
6507
6501
  valueInteger
@@ -6515,9 +6509,6 @@ ${Ur}`,qee=`
6515
6509
  }
6516
6510
  valueCodeableConcept {
6517
6511
  ...CodeableConceptFields
6518
- coding {
6519
- id
6520
- }
6521
6512
  }
6522
6513
  valueDateTime
6523
6514
  valueCode
@@ -6532,13 +6523,11 @@ ${Ur}`,qee=`
6532
6523
  initialSelected
6533
6524
  }
6534
6525
  initial {
6535
- id
6536
6526
  valueBoolean
6537
6527
  valueDecimal
6538
6528
  valueInteger
6539
6529
  valueDate
6540
6530
  valueDateTime
6541
- valueTime
6542
6531
  valueString
6543
6532
  valueUri
6544
6533
  valueAttachment {
@@ -6558,7 +6547,6 @@ ${Ur}`,qee=`
6558
6547
  type
6559
6548
  display
6560
6549
  extension {
6561
- id
6562
6550
  url
6563
6551
  valueBoolean
6564
6552
  valueInteger
@@ -6572,9 +6560,6 @@ ${Ur}`,qee=`
6572
6560
  }
6573
6561
  valueCodeableConcept {
6574
6562
  ...CodeableConceptFields
6575
- coding {
6576
- id
6577
- }
6578
6563
  }
6579
6564
  valueDateTime
6580
6565
  valueCode
@@ -8312,6 +8297,34 @@ ${hP}`,xte=`
8312
8297
  npi
8313
8298
  gender
8314
8299
  iconString
8300
+ endpoint {
8301
+ identifier {
8302
+ type {
8303
+ coding {
8304
+ code
8305
+ system
8306
+ display
8307
+ }
8308
+ text
8309
+ }
8310
+ value
8311
+ system
8312
+ }
8313
+ name
8314
+ status
8315
+ connectionType {
8316
+ code
8317
+ system
8318
+ display
8319
+ }
8320
+ address
8321
+ }
8322
+ score
8323
+ scores {
8324
+ value
8325
+ description
8326
+ calculation
8327
+ }
8315
8328
  }
8316
8329
  }
8317
8330
  }