@icanbwell/composite 1.916.0 → 1.918.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/565.index.js +24 -1
- package/565.index.js.map +1 -1
- package/index.js +1 -1
- package/native.js +1 -1
- package/package.json +3 -3
package/565.index.js
CHANGED
|
@@ -12176,7 +12176,7 @@ found at http://polymer.github.io/PATENTS.txt
|
|
|
12176
12176
|
>
|
|
12177
12177
|
<slot name="error" slot="error"></slot>
|
|
12178
12178
|
</feature-app-container>
|
|
12179
|
-
`}catch(a){return r.error(a),mf` <slot name="error"></slot> `}}}gh([Co({type:String})],n.prototype,"featureAppId",void 0),gh([Co({type:String})],n.prototype,"featureAppName",void 0),gh([Co({type:String})],n.prototype,"baseUrl",void 0),gh([Co({type:String})],n.prototype,"src",void 0),gh([Co({type:Object})],n.prototype,"config",void 0),customElements.define(sB,n)}var qte=_(3081),Hte=_(9742),vf,Ef;class Yte{constructor(){vf.set(this,void 0),Ef.set(this,void 0)}onReboot(t){return(0,R.GG)(this,vf,t,"f"),()=>{(0,R.GG)(this,vf,void 0,"f")}}reboot(t,r){const{featureServices:n}=U1((0,Hte.Ak)(),{featureServiceDefinitions:t,featureServiceDependencies:r});return(0,R.GG)(this,Ef,n,"f"),(0,R.gn)(this,vf,"f")&&(0,R.gn)(this,vf,"f").call(this,(0,R.gn)(this,Ef,"f")),(0,R.gn)(this,Ef,"f")}getRebootedServices(){return(0,R.gn)(this,Ef,"f")}}vf=new WeakMap,Ef=new WeakMap;var rE,nE,iE,vh,wP;class Wte{constructor({initialState:t={},logger:r,globalEventEmitter:n,bwellSdk:i}){rE.add(this),nE.set(this,void 0),iE.set(this,{[_r.apiClient.id]:_r.apiClient.version.one,[_r.bwellSdk.id]:_r.bwellSdk.version.one,[_r.theme.id]:_r.theme.version.one,[_r.analytics.id]:_r.theme.version.one,[_r.auth.id]:_r.auth.version.one,[_r.logging.id]:_r.logging.version.one,[_r.state.id]:_r.state.version.one,[_r.navigation.id]:_r.navigation.version.one,[_r.translation.id]:_r.translation.version.one,[_r.featureFlags.id]:_r.featureFlags.version.one,[_r.identityUtils.id]:_r.apiClient.version.one,[_r.nativeBridge.id]:_r.nativeBridge.version.one,[_r.globalEventEmitter.id]:_r.globalEventEmitter.version.one,[_r.rebootController.id]:_r.rebootController.version.one}),vh.set(this,void 0),(0,R.GG)(this,nE,n,"f"),(0,R.GG)(this,vh,new Yte,"f");const{featureAppManager:a,featureServices:u}=U1("orchestrator:integrator",{featureServiceDependencies:(0,R.gn)(this,iE,"f"),featureServiceDefinitions:(0,R.gn)(this,rE,"m",wP).call(this,{initialState:t,bwellSdk:i}),moduleLoader:qte.h,logger:r});this.services=u,Qte(a)}reboot({initialState:t,bwellSdk:r}){this.services=(0,R.gn)(this,vh,"f").reboot((0,R.gn)(this,rE,"m",wP).call(this,{initialState:t,bwellSdk:r}),(0,R.gn)(this,iE,"f"))}}nE=new WeakMap,iE=new WeakMap,vh=new WeakMap,rE=new WeakSet,wP=function({initialState:t,bwellSdk:r}){return[_r.apiClient.definition,_r.bwellSdk.define(r.sdk),_r.theme.definition,_r.analytics.definition,_r.auth.define(r.sdk,r.tokenStorage),_r.logging.definition,_r.state.define(t),_r.navigation.definition,_r.translation.definition,_r.featureFlags.definition,_r.identityUtils.definition,_r.nativeBridge.definition,_r.globalEventEmitter.define((0,R.gn)(this,nE,"f")),_r.rebootController.define((0,R.gn)(this,vh,"f"))]};function zte(e){try{return JSON.parse(atob(e))}catch{}}function Kte(e){var t,r,n;const i=zte(e);if(!i?.env)return re.C;const a={rest:{endpoints:{}}};for(const u in(t=re.C===null||re.C===void 0?void 0:re.C.rest)===null||t===void 0?void 0:t.endpoints){const f=(r=re.C===null||re.C===void 0?void 0:re.C.rest)===null||r===void 0?void 0:r.endpoints[u];typeof f=="string"&&((n=a?.rest)===null||n===void 0?void 0:n.endpoints)&&(a.rest.endpoints[u]=f.replace(".prod.",`.${i.env}.`))}return a}class ia extends Error{constructor(t,r){super(t),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(t){return t instanceof ia}}class OFe extends ia{constructor(t="Authentication Error"){super(t),this.name="AuthenticationError"}}class RFe extends ia{constructor(t="Illegal Argument Error"){super(t),this.name="IllegalArgumentError"}}class PFe extends ia{constructor(t="Illegal State Error"){super(t),this.name="IllegalStateError"}}class Xte extends ia{constructor(t="Invalid Client Key Error"){super(t),this.name="InvalidClientKeyError"}}class UP extends ia{constructor(t,r){super(t),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class yf extends ia{constructor(t="Invalid Token Error"){super(t),this.name="InvalidTokenError"}}class Jte extends ia{constructor(t,r){super(t),this.status=r,this.name="NetworkError"}}class Zte extends ia{constructor(t){super(t.message()),this.operationOutcome=t,this.name="OperationOutcomeError"}}class $P extends ia{constructor(t,r){super(t),this.data=r,this.name="UnknownError"}}class ere extends ia{constructor(t){super(t.join(". ")),this.errors=t,this.name="ValidationError"}}class tr{constructor(t,r){this.data=t,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(t){return new tr(void 0,t)}}var uB=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},aE=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)},Eh,yh;class Jt{static success(t){return new tre(t)}static failure(t){return new oE(t)}}class tre extends Jt{constructor(t){super(),Eh.set(this,void 0),uB(this,Eh,t,"f")}data(){return aE(this,Eh,"f")}error(){throw aE(this,Eh,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new tr(this.data())}}Eh=new WeakMap;class oE extends Jt{constructor(t){super(),yh.set(this,void 0),uB(this,yh,t,"f")}data(){throw aE(this,yh,"f")}error(){return aE(this,yh,"f")}success(){return!1}failure(){return!0}intoFailure(){return Jt.failure(this.error())}toQueryResult(){return new tr(void 0,this.error())}}yh=new WeakMap;var GP=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)},Th;class cB{constructor(){Th.set(this,[])}add(t){GP(this,Th,"f").push(t)}errors(){return GP(this,Th,"f")}hasErrors(){return GP(this,Th,"f").length>0}}Th=new WeakMap;var lB=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},FP=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)},Ah,sE;class rre{constructor(t){Ah.set(this,void 0),sE.set(this,void 0),lB(this,sE,t,"f"),lB(this,Ah,this.transformInput(t),"f")}validate(){return Jt.success(null)}data(){return FP(this,Ah,"f")}toJSON(){return FP(this,Ah,"f")}transformInput(t){return t}input(){return FP(this,sE,"f")}}Ah=new WeakMap,sE=new WeakMap;class Jn extends rre{validate(){const t=new cB;return this.validator.validate(this.input(),t),t.hasErrors()?Jt.failure(new ere(t.errors())):Jt.success(null)}}var dB=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)},uE,fB,_B;const pB=100,xP=20;class Yi{constructor(){uE.add(this)}validate(t,r){dB(this,uE,"m",fB).call(this,t.page,r),dB(this,uE,"m",_B).call(this,t.pageSize,r)}}uE=new WeakSet,fB=function(t,r){t<0&&r.add("page must be a positive number")},_B=function(t,r){t!==void 0&&(t<=0&&r.add("Page size must be greater than 0"),t>pB&&r.add(`Page size must not exceed ${pB}`))};class Wi extends Jn{constructor(){super(...arguments),this.validator=new Yi}transformInput(t){return Object.assign({pageSize:xP},t)}}function VP(){return new Date().toISOString()}function nre(){var e;return!(typeof process>"u"||((e=process.versions)===null||e===void 0?void 0:e.node)===void 0)}function ire(){return typeof window<"u"}function hB(){if(ire())return"browser";if(nre())return"node";throw new Error("Invalid runtime")}function are(e){switch(hB()){case"browser":return e.browser();case"node":return e.node()}}function SB(e){switch(hB()){case"node":return Buffer.from(e,"base64").toString("utf-8");case"browser":return atob(e)}}function xr(e){return e!=null}function Aa(e){return e==null}function MFe(e){return xr(e)&&e!==""}function Ca(e){return e==null||e===""}function no(e){return e===void 0}function $n(e){return e!==void 0}function ore(e){return JSON.parse(SB(e)).env}const sre=3;function mB(e){const t=e.split("."),r=t[1];if(r===void 0||t.length!==sre)throw new yf("Token is missing data and may be corrupted");try{return JSON.parse(SB(r))}catch(n){const i=n;throw new yf(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function ure(e){const r=mB(e).exp;if(typeof r!="number")throw new yf("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const cre="custom:clientFhirPersonId",lre="custom:bwellFhirPatientId";function dre(e){const t=mB(e),r=t[lre],n=t[cre];return xr(r)&&xr(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}function ba(e){return e.trim()===""}const fre="1.57.0";function _re(){return fre}var BP;(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"})(BP||(BP={}));var gB;(function(e){e.Guest="GUEST"})(gB||(gB={}));var cE;(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"})(cE||(cE={}));var vB;(function(e){e.Bwell="bwell"})(vB||(vB={}));var EB;(function(e){e.Bwell="BWELL"})(EB||(EB={}));var yB;(function(e){e.Basic="BASIC",e.Identity="IDENTITY",e.Oauth="OAUTH"})(yB||(yB={}));var kP;(function(e){e.Deny="DENY",e.Permit="PERMIT"})(kP||(kP={}));var jP;(function(e){e.Active="ACTIVE",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Inactive="INACTIVE",e.Proposed="PROPOSED",e.Rejected="REJECTED"})(jP||(jP={}));var TB;(function(e){e.Usd="USD"})(TB||(TB={}));var AB;(function(e){e.AccessEnded="ACCESS_ENDED",e.Connected="CONNECTED",e.Deleted="DELETED",e.Disconnected="DISCONNECTED",e.Error="ERROR",e.Expired="EXPIRED"})(AB||(AB={}));var CB;(function(e){e.Clinical="CLINICAL",e.Insurance="INSURANCE",e.Lab="LAB",e.Pharmacy="PHARMACY",e.Practitioner="PRACTITIONER"})(CB||(CB={}));var lE;(function(e){e.Connecthub="connecthub",e.Nppes="nppes"})(lE||(lE={}));var bB;(function(e){e.Connecthub="CONNECTHUB",e.Nppes="NPPES"})(bB||(bB={}));var OB;(function(e){e.Deleted="DELETED"})(OB||(OB={}));var RB;(function(e){e.Kilometers="KILOMETERS",e.Meters="METERS",e.Miles="MILES"})(RB||(RB={}));var PB;(function(e){e.BwellPatient="BWELL_PATIENT",e.BwellPerson="BWELL_PERSON",e.ClientPatient="CLIENT_PATIENT",e.ClientPerson="CLIENT_PERSON"})(PB||(PB={}));var MB;(function(e){e.Active="active",e.EnteredInError="entered_in_error",e.Error="error",e.Off="off",e.Suspended="suspended",e.Test="test"})(MB||(MB={}));var IB;(function(e){e.Active="ACTIVE",e.EnteredInError="ENTERED_IN_ERROR",e.Error="ERROR",e.Off="OFF",e.Suspended="SUSPENDED",e.Test="TEST"})(IB||(IB={}));var QP;(function(e){e.CustomEvent="CUSTOM_EVENT",e.MobilePushOpen="MOBILE_PUSH_OPEN"})(QP||(QP={}));var qP;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(qP||(qP={}));var HP;(function(e){e.Person="Person"})(HP||(HP={}));var YP;(function(e){e.Characteristic="characteristic",e.Communication="communication",e.Gender="gender",e.Specialty="specialty"})(YP||(YP={}));var NB;(function(e){e.Characteristic="CHARACTERISTIC",e.Communication="COMMUNICATION",e.Gender="GENDER",e.Specialty="SPECIALTY"})(NB||(NB={}));var LB;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(LB||(LB={}));var DB;(function(e){e.Female="FEMALE",e.Male="MALE",e.Other="OTHER",e.Unknown="UNKNOWN"})(DB||(DB={}));var wB;(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"})(wB||(wB={}));var UB;(function(e){e.Official="_official",e.Old="_old",e.Secondary="_secondary",e.Temp="_temp",e.Usual="_usual"})(UB||(UB={}));var $B;(function(e){e.Clicked="clicked"})($B||($B={}));var GB;(function(e){e.Clicked="CLICKED"})(GB||(GB={}));var WP;(function(e){e.Debug="DEBUG",e.Error="ERROR",e.Info="INFO",e.Verbose="VERBOSE",e.Warn="WARN"})(WP||(WP={}));var FB;(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"})(FB||(FB={}));var xB;(function(e){e.CancelDelete="CANCEL_DELETE",e.ConfirmDelete="CONFIRM_DELETE",e.DeletionInProgress="DELETION_IN_PROGRESS",e.ImmediateExecution="IMMEDIATE_EXECUTION",e.RequestDelete="REQUEST_DELETE"})(xB||(xB={}));var zP;(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"})(zP||(zP={}));var VB;(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"})(VB||(VB={}));var BB;(function(e){e.Add="add",e.Copy="copy",e.Move="move",e.Remove="remove",e.Replace="replace",e.Test="test"})(BB||(BB={}));var kB;(function(e){e.ExistingPatients="EXISTING_PATIENTS",e.NewPatients="NEW_PATIENTS"})(kB||(kB={}));var jB;(function(e){e.Patient="Patient",e.Person="Person"})(jB||(jB={}));var QB;(function(e){e.Practice="practice",e.Practitioner="practitioner"})(QB||(QB={}));var qB;(function(e){e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(qB||(qB={}));var HB;(function(e){e.QuestionnaireResponse="QuestionnaireResponse"})(HB||(HB={}));var YB;(function(e){e.Closed="CLOSED",e.Hold="HOLD",e.New="NEW",e.Open="OPEN",e.Pending="PENDING",e.Solved="SOLVED"})(YB||(YB={}));var WB;(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"})(WB||(WB={}));var zB;(function(e){e.DataConnections="DATA_CONNECTIONS",e.FindCare="FIND_CARE"})(zB||(zB={}));var KB;(function(e){e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Pharmacy="PHARMACY",e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(KB||(KB={}));var XB;(function(e){e.UpdatedAt="UPDATED_AT"})(XB||(XB={}));var KP;(function(e){e.Content="content",e.Distance="distance",e.Relevance="relevance"})(KP||(KP={}));var JB;(function(e){e.Content="CONTENT",e.DataSourceRank="DATA_SOURCE_RANK",e.Distance="DISTANCE",e.NextAvailable="NEXT_AVAILABLE",e.OnlineBookingAvailable="ONLINE_BOOKING_AVAILABLE",e.Relevance="RELEVANCE"})(JB||(JB={}));var XP;(function(e){e.Asc="asc",e.Desc="desc"})(XP||(XP={}));var ZB;(function(e){e.Asc="ASC",e.Desc="DESC"})(ZB||(ZB={}));var ek;(function(e){e.CareSearch="CARE_SEARCH",e.Proa="PROA",e.ProviderDetails="PROVIDER_DETAILS",e.Sayt="SAYT",e.Unspecified="UNSPECIFIED"})(ek||(ek={}));var tk;(function(e){e.DataDeleted="DATA_DELETED",e.Deleting="DELETING",e.Error="ERROR",e.Pending="PENDING",e.Retrieved="RETRIEVED",e.Retrieving="RETRIEVING"})(tk||(tk={}));var JP;(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"})(JP||(JP={}));var dE;(function(e){e.Accurate="accurate",e.Estimate="estimate"})(dE||(dE={}));var rk;(function(e){e.Active="ACTIVE",e.Completed="COMPLETED"})(rk||(rk={}));var nk;(function(e){e.PersonMatchError="PERSON_MATCH_ERROR",e.ServerError="SERVER_ERROR"})(nk||(nk={}));const pre=new Set(Object.values(qP));function ik(e){return pre.has(e)}const hre=new Set(Object.values(jP));function Sre(e){return hre.has(e)}const mre=new Set(Object.values(cE));function ak(e){return mre.has(e)}const gre=new Set(Object.values(kP));function vre(e){return gre.has(e)}class Ere{validate(t,r){!no(t.gender)&&!ik(t.gender)&&r.add(`Invalid gender value: "${t.gender}"`)}}class IFe extends Jn{constructor(){super(...arguments),this.validator=new Ere}}class yre{validate(t,r){ak(t.category)||r.add(`Invalid consent category code: "${t.category}"`)}}class NFe extends Jn{constructor(){super(...arguments),this.validator=new yre}}class Tre{validate(t,r){Sre(t.status)||r.add(`Invalid consent status: "${t.status}"`),vre(t.provision)||r.add(`Invalid consent provision type: "${t.provision}"`),ak(t.category)||r.add(`Invalid consent category code: "${t.category}"`),!no(t.organizationId)&&ba(t.organizationId)&&r.add("organizationId cannot be empty"),t.category===cE.ProaAttestation&&no(t.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class LFe extends Jn{constructor(){super(...arguments),this.validator=new Tre}}class Are{validate(t,r){Ca(t.exportId)&&r.add("exportId is required"),Ca(t.password)&&r.add("password is required")}}class DFe extends Jn{constructor(){super(...arguments),this.validator=new Are}}class wFe extends null{}var io=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)},Oa,zu,ok,sk,uk,ck,lk,dk;class Tf{constructor(){Oa.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)io(this,Oa,"m",ok).call(this,n,r)}}Oa=new WeakSet,zu=function(t,r){t&&t!==null&&isNaN(t.getTime())&&r.add("The date is not valid")},ok=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:f,lessThanOrEqualTo:y,approximately:h}=t,G=[n,i,a,u,f,y,h].filter(K=>K!=null).length;if(G===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}io(this,Oa,"m",sk).call(this,t,G,r),io(this,Oa,"m",lk).call(this,t,r),io(this,Oa,"m",dk).call(this,t,r)},sk=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}io(this,Oa,"m",uk).call(this,t,n),io(this,Oa,"m",ck).call(this,t,n)},uk=function(t,r){t.greaterThan&&t.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},ck=function(t,r){t.lessThan&&t.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},lk=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:f,lessThanOrEqualTo:y,approximately:h}=t;n&&io(this,Oa,"m",zu).call(this,n,r),i&&io(this,Oa,"m",zu).call(this,i,r),a&&io(this,Oa,"m",zu).call(this,a,r),u&&io(this,Oa,"m",zu).call(this,u,r),f&&io(this,Oa,"m",zu).call(this,f,r),y&&io(this,Oa,"m",zu).call(this,y,r),h&&io(this,Oa,"m",zu).call(this,h,r)},dk=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 ZP=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)},Ch;class gl{constructor(){Ch.set(this,new Cre)}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&&ZP(this,Ch,"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:[])ZP(this,Ch,"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)ZP(this,Ch,"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)")}}}Ch=new WeakMap;class Cre{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 Af=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)},eM,tM,rM,nM,iM,aM;class fk extends Yi{constructor(){super(...arguments),eM.set(this,new gl),tM.set(this,new Tf)}validate(t,r){super.validate(t,r),t.groupCode&&Af(this,eM,"f").validate(t.groupCode,r),t.lastUpdated&&Af(this,tM,"f").validate(t.lastUpdated,r)}}eM=new WeakMap,tM=new WeakMap;class bre{validate(t,r){t.length===0&&r.add("Prescription array must not be empty.")}}class _k extends Yi{constructor(){super(...arguments),rM.set(this,new bre),nM.set(this,new Tf)}validate(t,r){super.validate(t,r),t.lastUpdated!==void 0&&Af(this,nM,"f").validate(t.lastUpdated,r),t.prescription!==void 0&&Af(this,rM,"f").validate(t.prescription,r)}}rM=new WeakMap,nM=new WeakMap;class Ore extends Yi{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 Rre extends Wi{constructor(){super(...arguments),this.validator=new fk}}class UFe extends null{}class $Fe extends null{}class GFe extends null{}class FFe extends null{}class xFe extends null{}class VFe extends null{}class BFe extends null{}class kFe extends null{}class jFe extends null{}class QFe extends null{}class qFe extends null{}class HFe extends null{}class YFe extends null{}class WFe extends null{}class zFe extends null{}class KFe extends null{}class XFe extends null{}class JFe extends null{}class ZFe extends null{}class Pre extends _k{constructor(){super(...arguments),iM.set(this,new gl)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&Af(this,iM,"f").validate(t.medicationCode,r)}}iM=new WeakMap;class exe extends Wi{constructor(){super(...arguments),this.validator=new _k}}class txe extends Wi{constructor(){super(...arguments),this.validator=new Pre}}class Mre extends fk{constructor(){super(...arguments),aM.set(this,new gl)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&Af(this,aM,"f").validate(t.medicationCode,r)}}aM=new WeakMap;class rxe extends Rre{constructor(){super(...arguments),this.validator=new Mre}}class nxe extends null{}class ixe extends null{}class axe extends Wi{constructor(){super(...arguments),this.validator=new Ore}}class Ire{validate(t,r){ba(t.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class oxe extends Jn{constructor(){super(...arguments),this.validator=new Ire}}class Nre extends Yi{validate(t,r){ba(t.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(t,r)}}class sxe extends Wi{constructor(){super(...arguments),this.validator=new Nre}}class Lre extends Yi{validate(t,r){ba(t.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(t,r)}}class uxe extends Wi{constructor(){super(...arguments),this.validator=new Lre}}var pk;(function(e){e.Active="ACTIVE",e.Completed="COMPLETED"})(pk||(pk={}));class Dre{validate(t,r){Aa(t)&&r.add("input must be provided."),Ca(t.id)&&r.add("id must be a non-empty string."),Aa(t.status)&&r.add("status is required.")}}class cxe extends Jn{constructor(){super(...arguments),this.validator=new Dre}}const wre=new Set(Object.values(JP));function hk(e){return wre.has(e)}var Ure=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)},oM,Sk;class $re extends Yi{constructor(){super(...arguments),oM.add(this)}validate(t,r){if(super.validate(t,r),!no(t.status)){const n=Array.isArray(t.status)?t.status:[t.status];for(const i of n)Ure(this,oM,"m",Sk).call(this,i,r)}}}oM=new WeakSet,Sk=function(t,r){hk(t)||r.add(`Invalid task status: "${t}"`)};class lxe extends Wi{constructor(){super(...arguments),this.validator=new $re}}class Gre{validate(t,r){hk(t.newStatus)||r.add(`Invalid task status: "${t.newStatus}"`)}}class dxe extends Jn{constructor(){super(...arguments),this.validator=new Gre}}var fE=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)},Cf,mk,gk,vk,Ek;class fxe extends Wi{constructor(){super(...arguments),this.validator=new Fre}}class Fre extends Yi{constructor(){super(...arguments),Cf.add(this)}validate(t,r){super.validate(t,r),$n(t.organizationTypeFilters)&&fE(this,Cf,"m",mk).call(this,t.organizationTypeFilters,r),$n(t.sortBy)&&fE(this,Cf,"m",gk).call(this,t.sortBy,r),$n(t.filterFields)&&fE(this,Cf,"m",vk).call(this,t.filterFields,r),$n(t.gender)&&fE(this,Cf,"m",Ek).call(this,t.gender,r)}}Cf=new WeakSet,mk=function(t,r){for(const n of t)Vre(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},gk=function(t,r){$n(t.field)&&!kre(t.field)&&r.add(`Invalid sortBy.field value: "${t.field}"`),$n(t.order)&&!Qre(t.order)&&r.add(`Invalid sortBy.order value: "${t.order}"`)},vk=function(t,r){for(const n of t)Hre(n)||r.add(`Invalid filterField value: "${n}"`)},Ek=function(t,r){ik(t)||r.add(`Invalid gender value: "${t}"`)};const xre=new Set(Object.values(zP));function Vre(e){return xre.has(e)}const Bre=new Set(Object.values(KP));function kre(e){return Bre.has(e)}const jre=new Set(Object.values(XP));function Qre(e){return jre.has(e)}const qre=new Set(Object.values(YP));function Hre(e){return qre.has(e)}class _xe extends null{}class pxe extends Wi{constructor(){super(...arguments),this.validator=new Yre}}class Yre extends Yi{validate(t,r){super.validate(t,r)}}const Wre="data-connection-status";var zre=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)},sM;const Kre="connectionId cannot be null or empty",Xre="username cannot be null or empty",Jre="password cannot be null or empty";class yk{validate(t,r){t.connectionId===""&&r.add(Kre)}}class Zre{constructor(){sM.set(this,new yk)}validate(t,r){zre(this,sM,"f").validate(t,r),t.username===""&&r.add(Xre),t.password===""&&r.add(Jre)}}sM=new WeakMap;class ene extends Jn{constructor(){super(...arguments),this.validator=new yk}}class hxe extends null{}class Sxe extends ene{constructor(){super(...arguments),this.validator=new Zre}}const tne="deviceToken is required",rne="platformName must be a valid DevicePlatform value",nne="applicationName is required";var uM;(function(e){e.IOS="IOS",e.ANDROID="ANDROID"})(uM||(uM={}));const ine=new Set(Object.values(uM));function ane(e){return ine.has(e)}function one(e){return!ane(e)}class Tk{validate(t,r){ba(t.deviceToken)&&r.add(tne)}}class sne extends Tk{validate(t,r){super.validate(t,r),one(t.platformName.toUpperCase())&&r.add(rne),ba(t.applicationName)&&r.add(nne)}}class mxe extends Jn{constructor(){super(...arguments),this.validator=new sne}}class gxe extends Jn{constructor(){super(...arguments),this.validator=new Tk}}const une="string parameter serializedNotification must be provided",cne="serialized notification must have a non-empty notification_id field of type string",Ak="serialized notification must have an itbl object containing a non-empty messageId field of type string",lne="parsed notification must be a non-null object.",dne="serialized notification is not valid JSON.";class fne{validate(t,r){if(no(t.serializedNotification)||typeof t.serializedNotification!="string"||ba(t.serializedNotification)){r.add(une);return}let n=null;try{n=JSON.parse(t.serializedNotification)}catch{r.add(dne);return}if(typeof n!="object"||n===null){r.add(lne);return}const{itbl:i,notification_id:a}=n;if((no(a)||typeof a!="string"||ba(a))&&r.add(cne),typeof i!="object"||Aa(i)){r.add(Ak);return}(no(i.messageId)||typeof i.messageId!="string"||ba(i.messageId))&&r.add(Ak)}}class vxe extends Jn{constructor(){super(...arguments),this.validator=new fne}}const _ne="SearchReference value should be a non-empty string";class Ck{validate(t,r){Aa(t.value)||(typeof t.value!="string"||ba(t.value))&&r.add(_ne)}}const pne="SearchStringValue should be a non-empty string";class bh{validate(t,r){if(Aa(t.values))return;let n=!1;for(const i of t.values)ba(i)&&(n=!0);n&&r.add(pne)}}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)},cM,lM,pE;class hne extends Yi{constructor(){super(...arguments),cM.set(this,new bh),lM.set(this,new Tf),pE.set(this,new Ck)}validate(t,r){super.validate(t,r),$n(t.id)&&_E(this,cM,"f").validate(t.id,r),$n(t.lastUpdated)&&_E(this,lM,"f").validate(t.lastUpdated,r),$n(t.beneficiary)&&_E(this,pE,"f").validate(t.beneficiary,r),$n(t.patient)&&_E(this,pE,"f").validate(t.patient,r)}}cM=new WeakMap,lM=new WeakMap,pE=new WeakMap;class Exe extends Wi{constructor(){super(...arguments),this.validator=new hne}}class Sne extends Yi{validate(t,r){super.validate(t,r)}}class yxe extends Wi{constructor(){super(...arguments),this.validator=new Sne}}var vl=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)},dM,hE,Oh,fM;class mne extends Yi{constructor(){super(...arguments),dM.set(this,new bh),hE.set(this,new Tf),Oh.set(this,new Ck),fM.set(this,new gl)}validate(t,r){super.validate(t,r),$n(t.id)&&vl(this,dM,"f").validate(t.id,r),$n(t.lastUpdated)&&vl(this,hE,"f").validate(t.lastUpdated,r),$n(t.created)&&vl(this,hE,"f").validate(t.created,r),$n(t.patient)&&vl(this,Oh,"f").validate(t.patient,r),$n(t.provider)&&vl(this,Oh,"f").validate(t.provider,r),$n(t.coverage)&&vl(this,Oh,"f").validate(t.coverage,r),$n(t.status)&&vl(this,fM,"f").validate(t.status,r)}}dM=new WeakMap,hE=new WeakMap,Oh=new WeakMap,fM=new WeakMap;class Txe extends Wi{constructor(){super(...arguments),this.validator=new mne}}var _M=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)},pM,hM,SM;class gne{constructor(){pM.set(this,new Tf),hM.set(this,new bh),SM.set(this,new gl)}validate(t,r){var n;xr(t._source)&&_M(this,hM,"f").validate(t._source,r),xr(t.date)&&_M(this,pM,"f").validate(t.date,r),xr(t._count)&&t._count<0&&r.add("Value of count cannot be less than 0"),xr(t._getpagesoffset)&&t._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),xr((n=t.supporting_info)===null||n===void 0?void 0:n.value)&&ba(t.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),xr(t.status)&&_M(this,SM,"f").validate(t.status,r)}}pM=new WeakMap,hM=new WeakMap,SM=new WeakMap;class Axe extends Jn{constructor(){super(...arguments),this.validator=new gne}}class vne{validate(t,r){if(!Aa(t.cancelationReason)){if(Aa(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)(Aa(n?.code)||Aa(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class Cxe extends Jn{constructor(){super(...arguments),this.validator=new vne}}class Ene{validate(t,r){var n;Ca((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 bxe extends Jn{constructor(){super(...arguments),this.validator=new Ene}}class SE{validate(t,r,n={}){const{requireRole:i=!0}=n;xr(t.id)?ba(t.id)?r.add("Member id cannot be empty"):t.id.length>255&&r.add("Member id cannot exceed 255 characters"):r.add("Member id is required"),xr(t.type)?ba(t.type)&&r.add("Member type cannot be empty"):r.add("Member type is required");const a=xr(t.role);if(i&&!a&&r.add("Member role is required"),a&&t.role)for(let u=0;u<t.role.length;u++){const f=t.role[u];xr(f)?ba(f)&&r.add(`Role ${u}: Cannot be blank`):r.add(`Role ${u}: Cannot be null or undefined`)}}}class Oxe extends Jn{constructor(){super(...arguments),this.validator=new SE}}class yne{constructor(){this.updateValidator=new SE}validate(t,r){this.updateValidator.validate(t,r,{requireRole:!1})}}class Rxe extends Jn{constructor(){super(...arguments),this.validator=new yne}}class Tne{constructor(){this.updateValidator=new SE}validate(t,r){this.updateValidator.validate(t,r,{requireRole:!0})}}class Pxe extends Jn{constructor(){super(...arguments),this.validator=new Tne}}class Ane{constructor(){this.updateValidator=new SE}validate(t,r){if(!xr(t.members)){r.add("Members array is required");return}if(t.members.length===0){r.add("Members array cannot be empty");return}for(let n=0;n<t.members.length;n++){const i=t.members[n];if(!xr(i)){r.add(`Member ${n}: Cannot be null or undefined`);continue}const a=new cB;this.updateValidator.validate(i,a,{requireRole:!0});for(const u of a.errors())r.add(`Member ${n}: ${u}`)}}}class Mxe extends Jn{constructor(){super(...arguments),this.validator=new Ane}}class Cne extends Yi{validate(t,r){super.validate(t,r)}}class bne extends Wi{constructor(){super(...arguments),this.validator=new Cne}}class One{validate(t,r){const n=t.questionnaireResponse;if(Aa(n)){r.add("questionnaireResponse is required");return}if((Ca(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ca(n.status)&&r.add("questionnaireResponse.status is required"),Ca(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),Aa(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(Aa(a)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(a.resourceType==="Questionnaire"){i=a;break}}if(Aa(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}Ca(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class Ixe extends Jn{constructor(){super(...arguments),this.validator=new One}}class Rne{validate(t,r){const n=t.questionnaireResponse;if(Aa(n)){r.add("questionnaireResponse is required");return}(Ca(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ca(n.status)&&r.add("questionnaireResponse.status is required"),Ca(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required")}}class Nxe extends Jn{constructor(){super(...arguments),this.validator=new Rne}}var mE=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)},mM,gM,gE;class Pne extends Yi{constructor(){super(...arguments),mM.set(this,new Tf),gM.set(this,new bh),gE.set(this,new gl)}validate(t,r){super.validate(t,r),xr(t.id)&&mE(this,gM,"f").validate(t.id,r),xr(t.lastUpdated)&&mE(this,mM,"f").validate(t.lastUpdated,r),xr(t.status)&&mE(this,gE,"f").validate(t.status,r),xr(t.tag)&&mE(this,gE,"f").validate(t.tag,r)}}mM=new WeakMap,gM=new WeakMap,gE=new WeakMap;class Lxe extends Wi{constructor(){super(...arguments),this.validator=new Pne}}var Rh=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,bf;class Mne extends Yi{constructor(){super(...arguments),vM.set(this,new bh),bf.set(this,new gl)}validate(t,r){super.validate(t,r),xr(t.id)&&Rh(this,vM,"f").validate(t.id,r),xr(t.tag)&&Rh(this,bf,"f").validate(t.tag,r),xr(t.security)&&Rh(this,bf,"f").validate(t.security,r),xr(t.context)&&Rh(this,bf,"f").validate(t.context,r),xr(t.identifier)&&Rh(this,bf,"f").validate(t.identifier,r)}}vM=new WeakMap,bf=new WeakMap;class Dxe extends Wi{constructor(){super(...arguments),this.validator=new Mne}}class Ine extends Yi{validate(t,r){super.validate(t,r)}}class wxe extends Wi{constructor(){super(...arguments),this.validator=new Ine}}class Nne{constructor(){this.dataURIRegex=/^data:[a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+;base64,([A-Za-z0-9+/]*={0,2})$/}validate(t,r){t.file.trim()||r.add("File content is required"),t.file.trim()&&!this.dataURIRegex.test(t.file)&&r.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)"),t.fileName.trim()||r.add("File name is required")}}class Uxe extends Jn{constructor(){super(...arguments),this.validator=new Nne}}class Lne{validate(t,r){t.attachmentId.trim()||r.add("Attachment ID is required")}}class $xe extends Jn{constructor(){super(...arguments),this.validator=new Lne}}class Dne{validate(t,r){t.subject.trim()||r.add("Subject is required"),t.comment.body.trim()||r.add("Comment body is required"),t.fields.category.trim()||r.add("Category is required")}}class Gxe extends Jn{constructor(){super(...arguments),this.validator=new Dne}}class wne extends Yi{validate(t,r){super.validate(t,r)}}class Fxe extends Wi{constructor(){super(...arguments),this.validator=new wne}}class Une extends Yi{validate(t,r){t.requestId<0&&r.add("requestId must be a non-negative number"),super.validate(t,r)}}class xxe extends Wi{constructor(){super(...arguments),this.validator=new Une}}class $ne{validate(t,r){t.requestId<0&&r.add("Request ID must be a non-negative integer"),Ca(t.body.trim())&&r.add("Comment body is required")}}class Vxe extends Jn{constructor(){super(...arguments),this.validator=new $ne}}class Gne{validate(t,r){Ca(t.attachmentId.trim())&&r.add("attachmentId must be a non-empty string"),t.requestId<0&&r.add("requestId must be a non-negative number")}}class Bxe extends Jn{constructor(){super(...arguments),this.validator=new Gne}}var EM=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 f(g){try{h(n.next(g))}catch(G){u(G)}}function y(g){try{h(n.throw(g))}catch(G){u(G)}}function h(g){g.done?a(g.value):i(g.value).then(f,y)}h((n=n.apply(e,t||[])).next())})};class yM{constructor(t=new Map){this.storage=t}get(t){return EM(this,void 0,void 0,function*(){return this.storage.get(t)})}set(t,r){return EM(this,void 0,void 0,function*(){this.storage.set(t,r)})}delete(t){return EM(this,void 0,void 0,function*(){return this.storage.delete(t)})}}const Fne={logLevel:WP.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new yM,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var iu;(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"})(iu||(iu={}));var xne=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},bk=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)},Ph,kr;(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"})(kr||(kr={}));const Vne={[kr.VERBOSE]:"VERBOSE",[kr.DEBUG]:"DEBUG",[kr.INFO]:"INFO",[kr.WARN]:"WARN",[kr.ERROR]:"ERROR",[kr.FATAL]:"FATAL"};class Of{constructor(t){Ph.set(this,void 0),xne(this,Ph,t,"f")}get severity(){return bk(this,Ph,"f")}shouldLog(t){return t>=bk(this,Ph,"f")}static severityText(t){return Vne[t]}static severityFromText(t){switch(t){case"VERBOSE":return kr.VERBOSE;case"DEBUG":return kr.DEBUG;case"INFO":return kr.INFO;case"WARN":return kr.WARN;case"ERROR":return kr.ERROR;case"FATAL":return kr.FATAL;default:throw new Error(`Invalid severity text: ${t}`)}}}Ph=new WeakMap;var TM=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},Ns=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)},Ku,Ok,vE,Mh,EE,El;class Rk{constructor(t,r,n){Ku.add(this),vE.set(this,void 0),Mh.set(this,void 0),EE.set(this,void 0),TM(this,vE,n,"f"),TM(this,Mh,new Of(t),"f"),TM(this,EE,r,"f")}name(){return Ns(this,vE,"f")}severity(){return Ns(this,Mh,"f").severity}verbose(t,r){Ns(this,Ku,"m",El).call(this,kr.VERBOSE,t,r)}debug(t,r){Ns(this,Ku,"m",El).call(this,kr.DEBUG,t,r)}info(t,r){Ns(this,Ku,"m",El).call(this,kr.INFO,t,r)}warn(t,r){Ns(this,Ku,"m",El).call(this,kr.WARN,t,r)}error(t,r){let n;r instanceof Jt&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),Ns(this,Ku,"m",El).call(this,kr.ERROR,t,n)}fatal(t,r){Ns(this,Ku,"m",El).call(this,kr.FATAL,t,r)}static otelSeverityNumber(t){switch(t){case kr.VERBOSE:return iu.TRACE;case kr.DEBUG:return iu.DEBUG;case kr.INFO:return iu.INFO;case kr.WARN:return iu.WARN;case kr.ERROR:return iu.ERROR;case kr.FATAL:return iu.FATAL;default:return iu.UNSPECIFIED}}}Ok=Rk,vE=new WeakMap,Mh=new WeakMap,EE=new WeakMap,Ku=new WeakSet,El=function(t,r,n){!Ns(this,Mh,"f").shouldLog(t)||Ns(this,EE,"f").emit({timestamp:Date.now(),severityNumber:Ok.otelSeverityNumber(t),severityText:Of.severityText(t),body:r,attributes:n??{}})};var Pk=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},Mk=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)},yE,TE;class Bne{constructor(t,r){yE.set(this,void 0),TE.set(this,void 0),Pk(this,TE,t,"f"),Pk(this,yE,r.loggerProvider(),"f")}getLogger(t){const r=t??"default",n=Mk(this,yE,"f").getLogger(r);return new Rk(Mk(this,TE,"f"),n,r)}}yE=new WeakMap,TE=new WeakMap;class kne{format(t,r,n,i){let u=`[${new Date().toISOString()}] ${Of.severityText(t)}`;return n!==void 0&&(u+=` (${n})`),u+=`: ${r}`,i===void 0?[u]:[u,i]}}var AM=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},Li=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)},Ls,Ds,au;class jne{constructor(t,r){Ls.set(this,void 0),Ds.set(this,void 0),au.set(this,void 0),AM(this,Ds,new Of(t),"f"),AM(this,Ls,r,"f"),AM(this,au,new kne,"f")}name(){return Li(this,Ls,"f")}severity(){return Li(this,Ds,"f").severity}verbose(t,r){Li(this,Ds,"f").shouldLog(kr.VERBOSE)&&console.debug(...Li(this,au,"f").format(kr.VERBOSE,t,Li(this,Ls,"f"),r))}debug(t,r){Li(this,Ds,"f").shouldLog(kr.DEBUG)&&console.debug(...Li(this,au,"f").format(kr.DEBUG,t,Li(this,Ls,"f"),r))}info(t,r){Li(this,Ds,"f").shouldLog(kr.INFO)&&console.info(...Li(this,au,"f").format(kr.INFO,t,Li(this,Ls,"f"),r))}warn(t,r){Li(this,Ds,"f").shouldLog(kr.WARN)&&console.warn(...Li(this,au,"f").format(kr.WARN,t,Li(this,Ls,"f"),r))}error(t,r){let n=r;r instanceof Jt&&(n=r.failure()?r.error():r.data()),Li(this,Ds,"f").shouldLog(kr.ERROR)&&console.error(...Li(this,au,"f").format(kr.ERROR,t,Li(this,Ls,"f"),n))}fatal(t,r){Li(this,Ds,"f").shouldLog(kr.FATAL)&&console.error(...Li(this,au,"f").format(kr.FATAL,t,Li(this,Ls,"f"),r))}}Ls=new WeakMap,Ds=new WeakMap,au=new WeakMap;var Qne=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},qne=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)},AE;class ji{constructor(t=kr.FATAL){AE.set(this,void 0),Qne(this,AE,t,"f")}getLogger(t){return new jne(qne(this,AE,"f"),t)}}AE=new WeakMap;var Hne=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)},CM,Ik;class Yne{constructor(){CM.add(this)}createLogProvider(t,r){switch(Hne(this,CM,"m",Ik).call(this,t)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new Bne(t.logLevel,r);case"console":return new ji(t.logLevel)}}}CM=new WeakSet,Ik=function(t){return t.telemetry.enabled?"otel":"console"};var Zn=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)},ou=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},bo,Rf,Xu,Pf,Ju,yl,Nk,Lk,Dk,wk,Uk,$k,Gk,Fk,xk,Vk;class CE{constructor(t){bo.add(this),Rf.set(this,void 0),Xu.set(this,void 0),Pf.set(this,void 0),Ju.set(this,void 0),yl.set(this,void 0),this.bwellConfig=Zn(this,bo,"m",Uk).call(this,t),ou(this,Rf,Of.severityFromText(this.bwellConfig.logLevel),"f"),ou(this,yl,Zn(this,bo,"m",Vk).call(this),"f"),ou(this,Pf,Zn(this,bo,"m",Gk).call(this),"f"),ou(this,Xu,Zn(this,bo,"m",Fk).call(this),"f"),ou(this,Ju,Zn(this,bo,"m",xk).call(this),"f")}static initialize(t){try{const r=new CE(t);return Jt.success(r)}catch(r){if(ia.isBwellError(r))return Jt.failure(r);throw r}}get logLevel(){return Zn(this,Rf,"f")}get graphQL(){return Zn(this,Pf,"f")}get telemetry(){return Zn(this,Xu,"f")}get http(){return Zn(this,Ju,"f")}get context(){return Zn(this,yl,"f")}setContextUser(t){Zn(this,yl,"f").user=t}mergeRemoteConfig(t){ou(this,Rf,Zn(this,bo,"m",Nk).call(this,t),"f"),ou(this,Pf,Zn(this,bo,"m",Lk).call(this,t),"f"),ou(this,Xu,Object.freeze(Zn(this,bo,"m",Dk).call(this,t)),"f"),ou(this,Ju,Object.freeze(Zn(this,bo,"m",wk).call(this,t)),"f")}}Rf=new WeakMap,Xu=new WeakMap,Pf=new WeakMap,Ju=new WeakMap,yl=new WeakMap,bo=new WeakSet,Nk=function(t){var r;const n=(r=t?.logLevel)!==null&&r!==void 0?r:null;return n===null?Zn(this,Rf,"f"):Of.severityFromText(n)},Lk=function(t){var r;const n=(r=t?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return Zn(this,Pf,"f");const{authedApiUrl:i,unauthedApiUrl:a}=this.bwellConfig.overrides;return{unauthApiUrl:a??n.url,apiUrl:i??n.authUrl}},Dk=function(t){var r,n;const i=(r=t?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return Zn(this,Xu,"f");const a=(n=i.enabled)!==null&&n!==void 0?n:Zn(this,Xu,"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({},Zn(this,Xu,"f")),{enabled:a,collectorUrl:i.collectorUrl})},wk=function(t){var r,n,i;const a=(r=t?.httpClient)!==null&&r!==void 0?r:null;return a===null?Zn(this,Ju,"f"):{timeout:(n=a.requestTimeout)!==null&&n!==void 0?n:Zn(this,Ju,"f").timeout,retryPolicy:(i=a.retry)!==null&&i!==void 0?i:Zn(this,Ju,"f").retryPolicy}},Uk=function(t){return Object.assign(Object.assign({},Fne),t)},$k=function(){try{return ore(this.bwellConfig.clientKey)}catch{throw new Xte("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},Gk=function(){var t,r;return{apiUrl:(t=this.bwellConfig.overrides.authedApiUrl)!==null&&t!==void 0?t:`https://api-gateway.${Zn(this,yl,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${Zn(this,yl,"f").env}.icanbwell.com/federated-graph/graphql`}},Fk=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},xk=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},Vk=function(){return{clientKey:this.bwellConfig.clientKey,env:Zn(this,bo,"m",$k).call(this),user:null}};var Wne=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 f(g){try{h(n.next(g))}catch(G){u(G)}}function y(g){try{h(n.throw(g))}catch(G){u(G)}}function h(g){g.done?a(g.value):i(g.value).then(f,y)}h((n=n.apply(e,t||[])).next())})},Bk=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},bE=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)},Mf,OE;class zne{constructor(t,r=new ji){Mf.set(this,void 0),OE.set(this,void 0),Bk(this,OE,t,"f"),Bk(this,Mf,r.getLogger("ConfigManager"),"f")}initialize(t){return Wne(this,void 0,void 0,function*(){const r=CE.initialize(t);if(r.failure())return r;const n=r.data();bE(this,Mf,"f").verbose("Initializing SDK Configuration");const i=yield bE(this,OE,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const a=i.data();try{n.mergeRemoteConfig(a)}catch(u){bE(this,Mf,"f").error("Error merging SDK config with remote config.",u)}return bE(this,Mf,"f").info("Remote SDK Configuration merged with user config"),Jt.success(n)})}}Mf=new WeakMap,OE=new WeakMap;class Zu extends Error{response;request;constructor(t,r){const n=`${Zu.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Zu.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zu)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${String(t.status)})`}}const kk=e=>e.toUpperCase(),bM=e=>typeof e=="function"?e():e,jk=(e,t)=>e.map((r,n)=>[r,t[n]]),If=e=>{let t={};return e instanceof Headers?t=Kne(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):e&&(t=e),t},Kne=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},Xne=e=>{try{const t=e();return Jne(t)?t.catch(r=>Qk(r)):t}catch(t){return Qk(t)}},Qk=e=>e instanceof Error?e:new Error(String(e)),Jne=e=>typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"&&"catch"in e&&typeof e.catch=="function"&&"finally"in e&&typeof e.finally=="function",OM=e=>{throw new Error(`Unhandled case: ${String(e)}`)},RE=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),kxe=e=>Object.entries(e),jxe=e=>Object.values(e),Qxe=(e,t)=>Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)])),qxe=e=>e.charAt(0).toLowerCase()+e.slice(1);function Hxe(e){if(!Array.isArray(e))throw new Error(`Expected array. Got: ${String(e)}`)}function Yxe(e){if(e===null||typeof e!="object")throw new Error(`Expected object. Got: ${String(e)}`)}const Wxe=e=>e.charAt(0).toUpperCase()+e.slice(1),zxe=e=>{let t=!1,r,n;return{promise:new Promise((a,u)=>{r=a,n=u}),isResolved:()=>t,resolve:a=>{if(t=!0,e?.strict&&t)throw new Error(`Deferred is already resolved. Attempted to resolve with: ${JSON.stringify(a)}`);r(a)},reject:a=>n(a)}},Zne=(...e)=>{process.env.DEBUG&&console.log(...e)},Kxe=(...e)=>(...t)=>{Zne(...e,...t)},Xxe=e=>{const t=[],r=[];for(const n of e)n instanceof Error?t.push(n):r.push(n);return[r,t]},Jxe=async(...e)=>{const t=eie(e);return new GraphQLClient(t.url).batchRequests(t)},eie=e=>e.length===1?e[0]:{url:e[0],documents:e[1],requestHeaders:e[2],signal:void 0},tie=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Zxe=async(...e)=>{const[t,r,...n]=e,i=rie(t,r,...n);return new GraphQLClient(i.url).rawRequest({...i})},rie=(e,t,...r)=>{const[n,i]=r;return typeof e=="string"?{url:e,query:t,variables:n,requestHeaders:i,signal:void 0}:e},nie=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0};var iie=_(2455);const qk="Accept",RM="Content-Type",PM="application/json",Hk="application/graphql-response+json",eVe={success:200},Yk=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),aie=e=>{const t=e.toLowerCase();return t.includes(Hk)||t.includes(PM)},Wk=e=>{try{if(Array.isArray(e))return{_tag:"Batch",executionResults:e.map(zk)};if(RE(e))return{_tag:"Single",executionResult:zk(e)};throw new Error(`Invalid execution result: result is not object or array.
|
|
12179
|
+
`}catch(a){return r.error(a),mf` <slot name="error"></slot> `}}}gh([Co({type:String})],n.prototype,"featureAppId",void 0),gh([Co({type:String})],n.prototype,"featureAppName",void 0),gh([Co({type:String})],n.prototype,"baseUrl",void 0),gh([Co({type:String})],n.prototype,"src",void 0),gh([Co({type:Object})],n.prototype,"config",void 0),customElements.define(sB,n)}var qte=_(3081),Hte=_(9742),vf,Ef;class Yte{constructor(){vf.set(this,void 0),Ef.set(this,void 0)}onReboot(t){return(0,R.GG)(this,vf,t,"f"),()=>{(0,R.GG)(this,vf,void 0,"f")}}reboot(t,r){const{featureServices:n}=U1((0,Hte.Ak)(),{featureServiceDefinitions:t,featureServiceDependencies:r});return(0,R.GG)(this,Ef,n,"f"),(0,R.gn)(this,vf,"f")&&(0,R.gn)(this,vf,"f").call(this,(0,R.gn)(this,Ef,"f")),(0,R.gn)(this,Ef,"f")}getRebootedServices(){return(0,R.gn)(this,Ef,"f")}}vf=new WeakMap,Ef=new WeakMap;var rE,nE,iE,vh,wP;class Wte{constructor({initialState:t={},logger:r,globalEventEmitter:n,bwellSdk:i}){rE.add(this),nE.set(this,void 0),iE.set(this,{[_r.apiClient.id]:_r.apiClient.version.one,[_r.bwellSdk.id]:_r.bwellSdk.version.one,[_r.theme.id]:_r.theme.version.one,[_r.analytics.id]:_r.theme.version.one,[_r.auth.id]:_r.auth.version.one,[_r.logging.id]:_r.logging.version.one,[_r.state.id]:_r.state.version.one,[_r.navigation.id]:_r.navigation.version.one,[_r.translation.id]:_r.translation.version.one,[_r.featureFlags.id]:_r.featureFlags.version.one,[_r.identityUtils.id]:_r.apiClient.version.one,[_r.nativeBridge.id]:_r.nativeBridge.version.one,[_r.globalEventEmitter.id]:_r.globalEventEmitter.version.one,[_r.rebootController.id]:_r.rebootController.version.one}),vh.set(this,void 0),(0,R.GG)(this,nE,n,"f"),(0,R.GG)(this,vh,new Yte,"f");const{featureAppManager:a,featureServices:u}=U1("orchestrator:integrator",{featureServiceDependencies:(0,R.gn)(this,iE,"f"),featureServiceDefinitions:(0,R.gn)(this,rE,"m",wP).call(this,{initialState:t,bwellSdk:i}),moduleLoader:qte.h,logger:r});this.services=u,Qte(a)}reboot({initialState:t,bwellSdk:r}){this.services=(0,R.gn)(this,vh,"f").reboot((0,R.gn)(this,rE,"m",wP).call(this,{initialState:t,bwellSdk:r}),(0,R.gn)(this,iE,"f"))}}nE=new WeakMap,iE=new WeakMap,vh=new WeakMap,rE=new WeakSet,wP=function({initialState:t,bwellSdk:r}){return[_r.apiClient.definition,_r.bwellSdk.define(r.sdk),_r.theme.definition,_r.analytics.definition,_r.auth.define(r.sdk,r.tokenStorage),_r.logging.definition,_r.state.define(t),_r.navigation.definition,_r.translation.definition,_r.featureFlags.definition,_r.identityUtils.definition,_r.nativeBridge.definition,_r.globalEventEmitter.define((0,R.gn)(this,nE,"f")),_r.rebootController.define((0,R.gn)(this,vh,"f"))]};function zte(e){try{return JSON.parse(atob(e))}catch{}}function Kte(e){var t,r,n;const i=zte(e);if(!i?.env)return re.C;const a={rest:{endpoints:{}}};for(const u in(t=re.C===null||re.C===void 0?void 0:re.C.rest)===null||t===void 0?void 0:t.endpoints){const f=(r=re.C===null||re.C===void 0?void 0:re.C.rest)===null||r===void 0?void 0:r.endpoints[u];typeof f=="string"&&((n=a?.rest)===null||n===void 0?void 0:n.endpoints)&&(a.rest.endpoints[u]=f.replace(".prod.",`.${i.env}.`))}return a}class ia extends Error{constructor(t,r){super(t),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(t){return t instanceof ia}}class OFe extends ia{constructor(t="Authentication Error"){super(t),this.name="AuthenticationError"}}class RFe extends ia{constructor(t="Illegal Argument Error"){super(t),this.name="IllegalArgumentError"}}class PFe extends ia{constructor(t="Illegal State Error"){super(t),this.name="IllegalStateError"}}class Xte extends ia{constructor(t="Invalid Client Key Error"){super(t),this.name="InvalidClientKeyError"}}class UP extends ia{constructor(t,r){super(t),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class yf extends ia{constructor(t="Invalid Token Error"){super(t),this.name="InvalidTokenError"}}class Jte extends ia{constructor(t,r){super(t),this.status=r,this.name="NetworkError"}}class Zte extends ia{constructor(t){super(t.message()),this.operationOutcome=t,this.name="OperationOutcomeError"}}class $P extends ia{constructor(t,r){super(t),this.data=r,this.name="UnknownError"}}class ere extends ia{constructor(t){super(t.join(". ")),this.errors=t,this.name="ValidationError"}}class tr{constructor(t,r){this.data=t,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(t){return new tr(void 0,t)}}var uB=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},aE=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)},Eh,yh;class Jt{static success(t){return new tre(t)}static failure(t){return new oE(t)}}class tre extends Jt{constructor(t){super(),Eh.set(this,void 0),uB(this,Eh,t,"f")}data(){return aE(this,Eh,"f")}error(){throw aE(this,Eh,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new tr(this.data())}}Eh=new WeakMap;class oE extends Jt{constructor(t){super(),yh.set(this,void 0),uB(this,yh,t,"f")}data(){throw aE(this,yh,"f")}error(){return aE(this,yh,"f")}success(){return!1}failure(){return!0}intoFailure(){return Jt.failure(this.error())}toQueryResult(){return new tr(void 0,this.error())}}yh=new WeakMap;var GP=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)},Th;class cB{constructor(){Th.set(this,[])}add(t){GP(this,Th,"f").push(t)}errors(){return GP(this,Th,"f")}hasErrors(){return GP(this,Th,"f").length>0}}Th=new WeakMap;var lB=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},FP=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)},Ah,sE;class rre{constructor(t){Ah.set(this,void 0),sE.set(this,void 0),lB(this,sE,t,"f"),lB(this,Ah,this.transformInput(t),"f")}validate(){return Jt.success(null)}data(){return FP(this,Ah,"f")}toJSON(){return FP(this,Ah,"f")}transformInput(t){return t}input(){return FP(this,sE,"f")}}Ah=new WeakMap,sE=new WeakMap;class Jn extends rre{validate(){const t=new cB;return this.validator.validate(this.input(),t),t.hasErrors()?Jt.failure(new ere(t.errors())):Jt.success(null)}}var dB=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)},uE,fB,_B;const pB=100,xP=20;class Yi{constructor(){uE.add(this)}validate(t,r){dB(this,uE,"m",fB).call(this,t.page,r),dB(this,uE,"m",_B).call(this,t.pageSize,r)}}uE=new WeakSet,fB=function(t,r){t<0&&r.add("page must be a positive number")},_B=function(t,r){t!==void 0&&(t<=0&&r.add("Page size must be greater than 0"),t>pB&&r.add(`Page size must not exceed ${pB}`))};class Wi extends Jn{constructor(){super(...arguments),this.validator=new Yi}transformInput(t){return Object.assign({pageSize:xP},t)}}function VP(){return new Date().toISOString()}function nre(){var e;return!(typeof process>"u"||((e=process.versions)===null||e===void 0?void 0:e.node)===void 0)}function ire(){return typeof window<"u"}function hB(){if(ire())return"browser";if(nre())return"node";throw new Error("Invalid runtime")}function are(e){switch(hB()){case"browser":return e.browser();case"node":return e.node()}}function SB(e){switch(hB()){case"node":return Buffer.from(e,"base64").toString("utf-8");case"browser":return atob(e)}}function xr(e){return e!=null}function Aa(e){return e==null}function MFe(e){return xr(e)&&e!==""}function Ca(e){return e==null||e===""}function no(e){return e===void 0}function $n(e){return e!==void 0}function ore(e){return JSON.parse(SB(e)).env}const sre=3;function mB(e){const t=e.split("."),r=t[1];if(r===void 0||t.length!==sre)throw new yf("Token is missing data and may be corrupted");try{return JSON.parse(SB(r))}catch(n){const i=n;throw new yf(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function ure(e){const r=mB(e).exp;if(typeof r!="number")throw new yf("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const cre="custom:clientFhirPersonId",lre="custom:bwellFhirPatientId";function dre(e){const t=mB(e),r=t[lre],n=t[cre];return xr(r)&&xr(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}function ba(e){return e.trim()===""}const fre="1.58.0";function _re(){return fre}var BP;(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"})(BP||(BP={}));var gB;(function(e){e.Guest="GUEST"})(gB||(gB={}));var cE;(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"})(cE||(cE={}));var vB;(function(e){e.Bwell="bwell"})(vB||(vB={}));var EB;(function(e){e.Bwell="BWELL"})(EB||(EB={}));var yB;(function(e){e.Basic="BASIC",e.Identity="IDENTITY",e.Oauth="OAUTH"})(yB||(yB={}));var kP;(function(e){e.Deny="DENY",e.Permit="PERMIT"})(kP||(kP={}));var jP;(function(e){e.Active="ACTIVE",e.Draft="DRAFT",e.EnteredInError="ENTERED_IN_ERROR",e.Inactive="INACTIVE",e.Proposed="PROPOSED",e.Rejected="REJECTED"})(jP||(jP={}));var TB;(function(e){e.Usd="USD"})(TB||(TB={}));var AB;(function(e){e.AccessEnded="ACCESS_ENDED",e.Connected="CONNECTED",e.Deleted="DELETED",e.Disconnected="DISCONNECTED",e.Error="ERROR",e.Expired="EXPIRED"})(AB||(AB={}));var CB;(function(e){e.Clinical="CLINICAL",e.Insurance="INSURANCE",e.Lab="LAB",e.Pharmacy="PHARMACY",e.Practitioner="PRACTITIONER"})(CB||(CB={}));var lE;(function(e){e.Connecthub="connecthub",e.Nppes="nppes"})(lE||(lE={}));var bB;(function(e){e.Connecthub="CONNECTHUB",e.Nppes="NPPES"})(bB||(bB={}));var OB;(function(e){e.Deleted="DELETED"})(OB||(OB={}));var RB;(function(e){e.Kilometers="KILOMETERS",e.Meters="METERS",e.Miles="MILES"})(RB||(RB={}));var PB;(function(e){e.BwellPatient="BWELL_PATIENT",e.BwellPerson="BWELL_PERSON",e.ClientPatient="CLIENT_PATIENT",e.ClientPerson="CLIENT_PERSON"})(PB||(PB={}));var MB;(function(e){e.Active="active",e.EnteredInError="entered_in_error",e.Error="error",e.Off="off",e.Suspended="suspended",e.Test="test"})(MB||(MB={}));var IB;(function(e){e.Active="ACTIVE",e.EnteredInError="ENTERED_IN_ERROR",e.Error="ERROR",e.Off="OFF",e.Suspended="SUSPENDED",e.Test="TEST"})(IB||(IB={}));var QP;(function(e){e.CustomEvent="CUSTOM_EVENT",e.MobilePushOpen="MOBILE_PUSH_OPEN"})(QP||(QP={}));var qP;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(qP||(qP={}));var HP;(function(e){e.Person="Person"})(HP||(HP={}));var YP;(function(e){e.Characteristic="characteristic",e.Communication="communication",e.Gender="gender",e.Specialty="specialty"})(YP||(YP={}));var NB;(function(e){e.Characteristic="CHARACTERISTIC",e.Communication="COMMUNICATION",e.Gender="GENDER",e.Specialty="SPECIALTY"})(NB||(NB={}));var LB;(function(e){e.Female="female",e.Male="male",e.Other="other",e.Unknown="unknown"})(LB||(LB={}));var DB;(function(e){e.Female="FEMALE",e.Male="MALE",e.Other="OTHER",e.Unknown="UNKNOWN"})(DB||(DB={}));var wB;(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"})(wB||(wB={}));var UB;(function(e){e.Official="_official",e.Old="_old",e.Secondary="_secondary",e.Temp="_temp",e.Usual="_usual"})(UB||(UB={}));var $B;(function(e){e.Clicked="clicked"})($B||($B={}));var GB;(function(e){e.Clicked="CLICKED"})(GB||(GB={}));var WP;(function(e){e.Debug="DEBUG",e.Error="ERROR",e.Info="INFO",e.Verbose="VERBOSE",e.Warn="WARN"})(WP||(WP={}));var FB;(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"})(FB||(FB={}));var xB;(function(e){e.CancelDelete="CANCEL_DELETE",e.ConfirmDelete="CONFIRM_DELETE",e.DeletionInProgress="DELETION_IN_PROGRESS",e.ImmediateExecution="IMMEDIATE_EXECUTION",e.RequestDelete="REQUEST_DELETE"})(xB||(xB={}));var zP;(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"})(zP||(zP={}));var VB;(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"})(VB||(VB={}));var BB;(function(e){e.Add="add",e.Copy="copy",e.Move="move",e.Remove="remove",e.Replace="replace",e.Test="test"})(BB||(BB={}));var kB;(function(e){e.ExistingPatients="EXISTING_PATIENTS",e.NewPatients="NEW_PATIENTS"})(kB||(kB={}));var jB;(function(e){e.Patient="Patient",e.Person="Person"})(jB||(jB={}));var QB;(function(e){e.Practice="practice",e.Practitioner="practitioner"})(QB||(QB={}));var qB;(function(e){e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(qB||(qB={}));var HB;(function(e){e.QuestionnaireResponse="QuestionnaireResponse"})(HB||(HB={}));var YB;(function(e){e.Closed="CLOSED",e.Hold="HOLD",e.New="NEW",e.Open="OPEN",e.Pending="PENDING",e.Solved="SOLVED"})(YB||(YB={}));var WB;(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"})(WB||(WB={}));var zB;(function(e){e.DataConnections="DATA_CONNECTIONS",e.FindCare="FIND_CARE"})(zB||(zB={}));var KB;(function(e){e.Insurance="INSURANCE",e.Laboratory="LABORATORY",e.Pharmacy="PHARMACY",e.Practice="PRACTICE",e.Practitioner="PRACTITIONER"})(KB||(KB={}));var XB;(function(e){e.UpdatedAt="UPDATED_AT"})(XB||(XB={}));var KP;(function(e){e.Content="content",e.Distance="distance",e.Relevance="relevance"})(KP||(KP={}));var JB;(function(e){e.Content="CONTENT",e.DataSourceRank="DATA_SOURCE_RANK",e.Distance="DISTANCE",e.NextAvailable="NEXT_AVAILABLE",e.OnlineBookingAvailable="ONLINE_BOOKING_AVAILABLE",e.Relevance="RELEVANCE"})(JB||(JB={}));var XP;(function(e){e.Asc="asc",e.Desc="desc"})(XP||(XP={}));var ZB;(function(e){e.Asc="ASC",e.Desc="DESC"})(ZB||(ZB={}));var ek;(function(e){e.CareSearch="CARE_SEARCH",e.Proa="PROA",e.ProviderDetails="PROVIDER_DETAILS",e.Sayt="SAYT",e.Unspecified="UNSPECIFIED"})(ek||(ek={}));var tk;(function(e){e.DataDeleted="DATA_DELETED",e.Deleting="DELETING",e.Error="ERROR",e.Pending="PENDING",e.Retrieved="RETRIEVED",e.Retrieving="RETRIEVING"})(tk||(tk={}));var JP;(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"})(JP||(JP={}));var dE;(function(e){e.Accurate="accurate",e.Estimate="estimate"})(dE||(dE={}));var rk;(function(e){e.Active="ACTIVE",e.Completed="COMPLETED"})(rk||(rk={}));var nk;(function(e){e.PersonMatchError="PERSON_MATCH_ERROR",e.ServerError="SERVER_ERROR"})(nk||(nk={}));const pre=new Set(Object.values(qP));function ik(e){return pre.has(e)}const hre=new Set(Object.values(jP));function Sre(e){return hre.has(e)}const mre=new Set(Object.values(cE));function ak(e){return mre.has(e)}const gre=new Set(Object.values(kP));function vre(e){return gre.has(e)}class Ere{validate(t,r){!no(t.gender)&&!ik(t.gender)&&r.add(`Invalid gender value: "${t.gender}"`)}}class IFe extends Jn{constructor(){super(...arguments),this.validator=new Ere}}class yre{validate(t,r){ak(t.category)||r.add(`Invalid consent category code: "${t.category}"`)}}class NFe extends Jn{constructor(){super(...arguments),this.validator=new yre}}class Tre{validate(t,r){Sre(t.status)||r.add(`Invalid consent status: "${t.status}"`),vre(t.provision)||r.add(`Invalid consent provision type: "${t.provision}"`),ak(t.category)||r.add(`Invalid consent category code: "${t.category}"`),!no(t.organizationId)&&ba(t.organizationId)&&r.add("organizationId cannot be empty"),t.category===cE.ProaAttestation&&no(t.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class LFe extends Jn{constructor(){super(...arguments),this.validator=new Tre}}class Are{validate(t,r){Ca(t.exportId)&&r.add("exportId is required"),Ca(t.password)&&r.add("password is required")}}class DFe extends Jn{constructor(){super(...arguments),this.validator=new Are}}class wFe extends null{}var io=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)},Oa,zu,ok,sk,uk,ck,lk,dk;class Tf{constructor(){Oa.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)io(this,Oa,"m",ok).call(this,n,r)}}Oa=new WeakSet,zu=function(t,r){t&&t!==null&&isNaN(t.getTime())&&r.add("The date is not valid")},ok=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:f,lessThanOrEqualTo:y,approximately:h}=t,G=[n,i,a,u,f,y,h].filter(K=>K!=null).length;if(G===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}io(this,Oa,"m",sk).call(this,t,G,r),io(this,Oa,"m",lk).call(this,t,r),io(this,Oa,"m",dk).call(this,t,r)},sk=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}io(this,Oa,"m",uk).call(this,t,n),io(this,Oa,"m",ck).call(this,t,n)},uk=function(t,r){t.greaterThan&&t.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},ck=function(t,r){t.lessThan&&t.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},lk=function(t,r){const{equals:n,notEquals:i,greaterThan:a,greaterThanOrEqualTo:u,lessThan:f,lessThanOrEqualTo:y,approximately:h}=t;n&&io(this,Oa,"m",zu).call(this,n,r),i&&io(this,Oa,"m",zu).call(this,i,r),a&&io(this,Oa,"m",zu).call(this,a,r),u&&io(this,Oa,"m",zu).call(this,u,r),f&&io(this,Oa,"m",zu).call(this,f,r),y&&io(this,Oa,"m",zu).call(this,y,r),h&&io(this,Oa,"m",zu).call(this,h,r)},dk=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 ZP=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)},Ch;class gl{constructor(){Ch.set(this,new Cre)}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&&ZP(this,Ch,"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:[])ZP(this,Ch,"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)ZP(this,Ch,"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)")}}}Ch=new WeakMap;class Cre{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 Af=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)},eM,tM,rM,nM,iM,aM;class fk extends Yi{constructor(){super(...arguments),eM.set(this,new gl),tM.set(this,new Tf)}validate(t,r){super.validate(t,r),t.groupCode&&Af(this,eM,"f").validate(t.groupCode,r),t.lastUpdated&&Af(this,tM,"f").validate(t.lastUpdated,r)}}eM=new WeakMap,tM=new WeakMap;class bre{validate(t,r){t.length===0&&r.add("Prescription array must not be empty.")}}class _k extends Yi{constructor(){super(...arguments),rM.set(this,new bre),nM.set(this,new Tf)}validate(t,r){super.validate(t,r),t.lastUpdated!==void 0&&Af(this,nM,"f").validate(t.lastUpdated,r),t.prescription!==void 0&&Af(this,rM,"f").validate(t.prescription,r)}}rM=new WeakMap,nM=new WeakMap;class Ore extends Yi{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 Rre extends Wi{constructor(){super(...arguments),this.validator=new fk}}class UFe extends null{}class $Fe extends null{}class GFe extends null{}class FFe extends null{}class xFe extends null{}class VFe extends null{}class BFe extends null{}class kFe extends null{}class jFe extends null{}class QFe extends null{}class qFe extends null{}class HFe extends null{}class YFe extends null{}class WFe extends null{}class zFe extends null{}class KFe extends null{}class XFe extends null{}class JFe extends null{}class ZFe extends null{}class Pre extends _k{constructor(){super(...arguments),iM.set(this,new gl)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&Af(this,iM,"f").validate(t.medicationCode,r)}}iM=new WeakMap;class exe extends Wi{constructor(){super(...arguments),this.validator=new _k}}class txe extends Wi{constructor(){super(...arguments),this.validator=new Pre}}class Mre extends fk{constructor(){super(...arguments),aM.set(this,new gl)}validate(t,r){super.validate(t,r),t.medicationCode!==void 0&&Af(this,aM,"f").validate(t.medicationCode,r)}}aM=new WeakMap;class rxe extends Rre{constructor(){super(...arguments),this.validator=new Mre}}class nxe extends null{}class ixe extends null{}class axe extends Wi{constructor(){super(...arguments),this.validator=new Ore}}class Ire{validate(t,r){ba(t.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class oxe extends Jn{constructor(){super(...arguments),this.validator=new Ire}}class Nre extends Yi{validate(t,r){ba(t.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(t,r)}}class sxe extends Wi{constructor(){super(...arguments),this.validator=new Nre}}class Lre extends Yi{validate(t,r){ba(t.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(t,r)}}class uxe extends Wi{constructor(){super(...arguments),this.validator=new Lre}}var pk;(function(e){e.Active="ACTIVE",e.Completed="COMPLETED"})(pk||(pk={}));class Dre{validate(t,r){Aa(t)&&r.add("input must be provided."),Ca(t.id)&&r.add("id must be a non-empty string."),Aa(t.status)&&r.add("status is required.")}}class cxe extends Jn{constructor(){super(...arguments),this.validator=new Dre}}const wre=new Set(Object.values(JP));function hk(e){return wre.has(e)}var Ure=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)},oM,Sk;class $re extends Yi{constructor(){super(...arguments),oM.add(this)}validate(t,r){if(super.validate(t,r),!no(t.status)){const n=Array.isArray(t.status)?t.status:[t.status];for(const i of n)Ure(this,oM,"m",Sk).call(this,i,r)}}}oM=new WeakSet,Sk=function(t,r){hk(t)||r.add(`Invalid task status: "${t}"`)};class lxe extends Wi{constructor(){super(...arguments),this.validator=new $re}}class Gre{validate(t,r){hk(t.newStatus)||r.add(`Invalid task status: "${t.newStatus}"`)}}class dxe extends Jn{constructor(){super(...arguments),this.validator=new Gre}}var fE=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)},Cf,mk,gk,vk,Ek;class fxe extends Wi{constructor(){super(...arguments),this.validator=new Fre}}class Fre extends Yi{constructor(){super(...arguments),Cf.add(this)}validate(t,r){super.validate(t,r),$n(t.organizationTypeFilters)&&fE(this,Cf,"m",mk).call(this,t.organizationTypeFilters,r),$n(t.sortBy)&&fE(this,Cf,"m",gk).call(this,t.sortBy,r),$n(t.filterFields)&&fE(this,Cf,"m",vk).call(this,t.filterFields,r),$n(t.gender)&&fE(this,Cf,"m",Ek).call(this,t.gender,r)}}Cf=new WeakSet,mk=function(t,r){for(const n of t)Vre(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},gk=function(t,r){$n(t.field)&&!kre(t.field)&&r.add(`Invalid sortBy.field value: "${t.field}"`),$n(t.order)&&!Qre(t.order)&&r.add(`Invalid sortBy.order value: "${t.order}"`)},vk=function(t,r){for(const n of t)Hre(n)||r.add(`Invalid filterField value: "${n}"`)},Ek=function(t,r){ik(t)||r.add(`Invalid gender value: "${t}"`)};const xre=new Set(Object.values(zP));function Vre(e){return xre.has(e)}const Bre=new Set(Object.values(KP));function kre(e){return Bre.has(e)}const jre=new Set(Object.values(XP));function Qre(e){return jre.has(e)}const qre=new Set(Object.values(YP));function Hre(e){return qre.has(e)}class _xe extends null{}class pxe extends Wi{constructor(){super(...arguments),this.validator=new Yre}}class Yre extends Yi{validate(t,r){super.validate(t,r)}}const Wre="data-connection-status";var zre=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)},sM;const Kre="connectionId cannot be null or empty",Xre="username cannot be null or empty",Jre="password cannot be null or empty";class yk{validate(t,r){t.connectionId===""&&r.add(Kre)}}class Zre{constructor(){sM.set(this,new yk)}validate(t,r){zre(this,sM,"f").validate(t,r),t.username===""&&r.add(Xre),t.password===""&&r.add(Jre)}}sM=new WeakMap;class ene extends Jn{constructor(){super(...arguments),this.validator=new yk}}class hxe extends null{}class Sxe extends ene{constructor(){super(...arguments),this.validator=new Zre}}const tne="deviceToken is required",rne="platformName must be a valid DevicePlatform value",nne="applicationName is required";var uM;(function(e){e.IOS="IOS",e.ANDROID="ANDROID"})(uM||(uM={}));const ine=new Set(Object.values(uM));function ane(e){return ine.has(e)}function one(e){return!ane(e)}class Tk{validate(t,r){ba(t.deviceToken)&&r.add(tne)}}class sne extends Tk{validate(t,r){super.validate(t,r),one(t.platformName.toUpperCase())&&r.add(rne),ba(t.applicationName)&&r.add(nne)}}class mxe extends Jn{constructor(){super(...arguments),this.validator=new sne}}class gxe extends Jn{constructor(){super(...arguments),this.validator=new Tk}}const une="string parameter serializedNotification must be provided",cne="serialized notification must have a non-empty notification_id field of type string",Ak="serialized notification must have an itbl object containing a non-empty messageId field of type string",lne="parsed notification must be a non-null object.",dne="serialized notification is not valid JSON.";class fne{validate(t,r){if(no(t.serializedNotification)||typeof t.serializedNotification!="string"||ba(t.serializedNotification)){r.add(une);return}let n=null;try{n=JSON.parse(t.serializedNotification)}catch{r.add(dne);return}if(typeof n!="object"||n===null){r.add(lne);return}const{itbl:i,notification_id:a}=n;if((no(a)||typeof a!="string"||ba(a))&&r.add(cne),typeof i!="object"||Aa(i)){r.add(Ak);return}(no(i.messageId)||typeof i.messageId!="string"||ba(i.messageId))&&r.add(Ak)}}class vxe extends Jn{constructor(){super(...arguments),this.validator=new fne}}const _ne="SearchReference value should be a non-empty string";class Ck{validate(t,r){Aa(t.value)||(typeof t.value!="string"||ba(t.value))&&r.add(_ne)}}const pne="SearchStringValue should be a non-empty string";class bh{validate(t,r){if(Aa(t.values))return;let n=!1;for(const i of t.values)ba(i)&&(n=!0);n&&r.add(pne)}}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)},cM,lM,pE;class hne extends Yi{constructor(){super(...arguments),cM.set(this,new bh),lM.set(this,new Tf),pE.set(this,new Ck)}validate(t,r){super.validate(t,r),$n(t.id)&&_E(this,cM,"f").validate(t.id,r),$n(t.lastUpdated)&&_E(this,lM,"f").validate(t.lastUpdated,r),$n(t.beneficiary)&&_E(this,pE,"f").validate(t.beneficiary,r),$n(t.patient)&&_E(this,pE,"f").validate(t.patient,r)}}cM=new WeakMap,lM=new WeakMap,pE=new WeakMap;class Exe extends Wi{constructor(){super(...arguments),this.validator=new hne}}class Sne extends Yi{validate(t,r){super.validate(t,r)}}class yxe extends Wi{constructor(){super(...arguments),this.validator=new Sne}}var vl=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)},dM,hE,Oh,fM;class mne extends Yi{constructor(){super(...arguments),dM.set(this,new bh),hE.set(this,new Tf),Oh.set(this,new Ck),fM.set(this,new gl)}validate(t,r){super.validate(t,r),$n(t.id)&&vl(this,dM,"f").validate(t.id,r),$n(t.lastUpdated)&&vl(this,hE,"f").validate(t.lastUpdated,r),$n(t.created)&&vl(this,hE,"f").validate(t.created,r),$n(t.patient)&&vl(this,Oh,"f").validate(t.patient,r),$n(t.provider)&&vl(this,Oh,"f").validate(t.provider,r),$n(t.coverage)&&vl(this,Oh,"f").validate(t.coverage,r),$n(t.status)&&vl(this,fM,"f").validate(t.status,r)}}dM=new WeakMap,hE=new WeakMap,Oh=new WeakMap,fM=new WeakMap;class Txe extends Wi{constructor(){super(...arguments),this.validator=new mne}}var _M=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)},pM,hM,SM;class gne{constructor(){pM.set(this,new Tf),hM.set(this,new bh),SM.set(this,new gl)}validate(t,r){var n;xr(t._source)&&_M(this,hM,"f").validate(t._source,r),xr(t.date)&&_M(this,pM,"f").validate(t.date,r),xr(t._count)&&t._count<0&&r.add("Value of count cannot be less than 0"),xr(t._getpagesoffset)&&t._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),xr((n=t.supporting_info)===null||n===void 0?void 0:n.value)&&ba(t.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),xr(t.status)&&_M(this,SM,"f").validate(t.status,r)}}pM=new WeakMap,hM=new WeakMap,SM=new WeakMap;class Axe extends Jn{constructor(){super(...arguments),this.validator=new gne}}class vne{validate(t,r){if(!Aa(t.cancelationReason)){if(Aa(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)(Aa(n?.code)||Aa(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class Cxe extends Jn{constructor(){super(...arguments),this.validator=new vne}}class Ene{validate(t,r){var n;Ca((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 bxe extends Jn{constructor(){super(...arguments),this.validator=new Ene}}class SE{validate(t,r,n={}){const{requireRole:i=!0}=n;xr(t.id)?ba(t.id)?r.add("Member id cannot be empty"):t.id.length>255&&r.add("Member id cannot exceed 255 characters"):r.add("Member id is required"),xr(t.type)?ba(t.type)&&r.add("Member type cannot be empty"):r.add("Member type is required");const a=xr(t.role);if(i&&!a&&r.add("Member role is required"),a&&t.role)for(let u=0;u<t.role.length;u++){const f=t.role[u];xr(f)?ba(f)&&r.add(`Role ${u}: Cannot be blank`):r.add(`Role ${u}: Cannot be null or undefined`)}}}class Oxe extends Jn{constructor(){super(...arguments),this.validator=new SE}}class yne{constructor(){this.updateValidator=new SE}validate(t,r){this.updateValidator.validate(t,r,{requireRole:!1})}}class Rxe extends Jn{constructor(){super(...arguments),this.validator=new yne}}class Tne{constructor(){this.updateValidator=new SE}validate(t,r){this.updateValidator.validate(t,r,{requireRole:!0})}}class Pxe extends Jn{constructor(){super(...arguments),this.validator=new Tne}}class Ane{constructor(){this.updateValidator=new SE}validate(t,r){if(!xr(t.members)){r.add("Members array is required");return}if(t.members.length===0){r.add("Members array cannot be empty");return}for(let n=0;n<t.members.length;n++){const i=t.members[n];if(!xr(i)){r.add(`Member ${n}: Cannot be null or undefined`);continue}const a=new cB;this.updateValidator.validate(i,a,{requireRole:!0});for(const u of a.errors())r.add(`Member ${n}: ${u}`)}}}class Mxe extends Jn{constructor(){super(...arguments),this.validator=new Ane}}class Cne extends Yi{validate(t,r){super.validate(t,r)}}class bne extends Wi{constructor(){super(...arguments),this.validator=new Cne}}class One{validate(t,r){const n=t.questionnaireResponse;if(Aa(n)){r.add("questionnaireResponse is required");return}if((Ca(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ca(n.status)&&r.add("questionnaireResponse.status is required"),Ca(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),Aa(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(Aa(a)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(a.resourceType==="Questionnaire"){i=a;break}}if(Aa(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}Ca(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class Ixe extends Jn{constructor(){super(...arguments),this.validator=new One}}class Rne{validate(t,r){const n=t.questionnaireResponse;if(Aa(n)){r.add("questionnaireResponse is required");return}(Ca(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ca(n.status)&&r.add("questionnaireResponse.status is required"),Ca(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required")}}class Nxe extends Jn{constructor(){super(...arguments),this.validator=new Rne}}var mE=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)},mM,gM,gE;class Pne extends Yi{constructor(){super(...arguments),mM.set(this,new Tf),gM.set(this,new bh),gE.set(this,new gl)}validate(t,r){super.validate(t,r),xr(t.id)&&mE(this,gM,"f").validate(t.id,r),xr(t.lastUpdated)&&mE(this,mM,"f").validate(t.lastUpdated,r),xr(t.status)&&mE(this,gE,"f").validate(t.status,r),xr(t.tag)&&mE(this,gE,"f").validate(t.tag,r)}}mM=new WeakMap,gM=new WeakMap,gE=new WeakMap;class Lxe extends Wi{constructor(){super(...arguments),this.validator=new Pne}}var Rh=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,bf;class Mne extends Yi{constructor(){super(...arguments),vM.set(this,new bh),bf.set(this,new gl)}validate(t,r){super.validate(t,r),xr(t.id)&&Rh(this,vM,"f").validate(t.id,r),xr(t.tag)&&Rh(this,bf,"f").validate(t.tag,r),xr(t.security)&&Rh(this,bf,"f").validate(t.security,r),xr(t.context)&&Rh(this,bf,"f").validate(t.context,r),xr(t.identifier)&&Rh(this,bf,"f").validate(t.identifier,r)}}vM=new WeakMap,bf=new WeakMap;class Dxe extends Wi{constructor(){super(...arguments),this.validator=new Mne}}class Ine extends Yi{validate(t,r){super.validate(t,r)}}class wxe extends Wi{constructor(){super(...arguments),this.validator=new Ine}}class Nne{constructor(){this.dataURIRegex=/^data:[a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+;base64,([A-Za-z0-9+/]*={0,2})$/}validate(t,r){t.file.trim()||r.add("File content is required"),t.file.trim()&&!this.dataURIRegex.test(t.file)&&r.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)"),t.fileName.trim()||r.add("File name is required")}}class Uxe extends Jn{constructor(){super(...arguments),this.validator=new Nne}}class Lne{validate(t,r){t.attachmentId.trim()||r.add("Attachment ID is required")}}class $xe extends Jn{constructor(){super(...arguments),this.validator=new Lne}}class Dne{validate(t,r){t.subject.trim()||r.add("Subject is required"),t.comment.body.trim()||r.add("Comment body is required"),t.fields.category.trim()||r.add("Category is required")}}class Gxe extends Jn{constructor(){super(...arguments),this.validator=new Dne}}class wne extends Yi{validate(t,r){super.validate(t,r)}}class Fxe extends Wi{constructor(){super(...arguments),this.validator=new wne}}class Une extends Yi{validate(t,r){t.requestId<0&&r.add("requestId must be a non-negative number"),super.validate(t,r)}}class xxe extends Wi{constructor(){super(...arguments),this.validator=new Une}}class $ne{validate(t,r){t.requestId<0&&r.add("Request ID must be a non-negative integer"),Ca(t.body.trim())&&r.add("Comment body is required")}}class Vxe extends Jn{constructor(){super(...arguments),this.validator=new $ne}}class Gne{validate(t,r){Ca(t.attachmentId.trim())&&r.add("attachmentId must be a non-empty string"),t.requestId<0&&r.add("requestId must be a non-negative number")}}class Bxe extends Jn{constructor(){super(...arguments),this.validator=new Gne}}var EM=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 f(g){try{h(n.next(g))}catch(G){u(G)}}function y(g){try{h(n.throw(g))}catch(G){u(G)}}function h(g){g.done?a(g.value):i(g.value).then(f,y)}h((n=n.apply(e,t||[])).next())})};class yM{constructor(t=new Map){this.storage=t}get(t){return EM(this,void 0,void 0,function*(){return this.storage.get(t)})}set(t,r){return EM(this,void 0,void 0,function*(){this.storage.set(t,r)})}delete(t){return EM(this,void 0,void 0,function*(){return this.storage.delete(t)})}}const Fne={logLevel:WP.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new yM,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var iu;(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"})(iu||(iu={}));var xne=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},bk=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)},Ph,kr;(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"})(kr||(kr={}));const Vne={[kr.VERBOSE]:"VERBOSE",[kr.DEBUG]:"DEBUG",[kr.INFO]:"INFO",[kr.WARN]:"WARN",[kr.ERROR]:"ERROR",[kr.FATAL]:"FATAL"};class Of{constructor(t){Ph.set(this,void 0),xne(this,Ph,t,"f")}get severity(){return bk(this,Ph,"f")}shouldLog(t){return t>=bk(this,Ph,"f")}static severityText(t){return Vne[t]}static severityFromText(t){switch(t){case"VERBOSE":return kr.VERBOSE;case"DEBUG":return kr.DEBUG;case"INFO":return kr.INFO;case"WARN":return kr.WARN;case"ERROR":return kr.ERROR;case"FATAL":return kr.FATAL;default:throw new Error(`Invalid severity text: ${t}`)}}}Ph=new WeakMap;var TM=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},Ns=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)},Ku,Ok,vE,Mh,EE,El;class Rk{constructor(t,r,n){Ku.add(this),vE.set(this,void 0),Mh.set(this,void 0),EE.set(this,void 0),TM(this,vE,n,"f"),TM(this,Mh,new Of(t),"f"),TM(this,EE,r,"f")}name(){return Ns(this,vE,"f")}severity(){return Ns(this,Mh,"f").severity}verbose(t,r){Ns(this,Ku,"m",El).call(this,kr.VERBOSE,t,r)}debug(t,r){Ns(this,Ku,"m",El).call(this,kr.DEBUG,t,r)}info(t,r){Ns(this,Ku,"m",El).call(this,kr.INFO,t,r)}warn(t,r){Ns(this,Ku,"m",El).call(this,kr.WARN,t,r)}error(t,r){let n;r instanceof Jt&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),Ns(this,Ku,"m",El).call(this,kr.ERROR,t,n)}fatal(t,r){Ns(this,Ku,"m",El).call(this,kr.FATAL,t,r)}static otelSeverityNumber(t){switch(t){case kr.VERBOSE:return iu.TRACE;case kr.DEBUG:return iu.DEBUG;case kr.INFO:return iu.INFO;case kr.WARN:return iu.WARN;case kr.ERROR:return iu.ERROR;case kr.FATAL:return iu.FATAL;default:return iu.UNSPECIFIED}}}Ok=Rk,vE=new WeakMap,Mh=new WeakMap,EE=new WeakMap,Ku=new WeakSet,El=function(t,r,n){!Ns(this,Mh,"f").shouldLog(t)||Ns(this,EE,"f").emit({timestamp:Date.now(),severityNumber:Ok.otelSeverityNumber(t),severityText:Of.severityText(t),body:r,attributes:n??{}})};var Pk=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},Mk=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)},yE,TE;class Bne{constructor(t,r){yE.set(this,void 0),TE.set(this,void 0),Pk(this,TE,t,"f"),Pk(this,yE,r.loggerProvider(),"f")}getLogger(t){const r=t??"default",n=Mk(this,yE,"f").getLogger(r);return new Rk(Mk(this,TE,"f"),n,r)}}yE=new WeakMap,TE=new WeakMap;class kne{format(t,r,n,i){let u=`[${new Date().toISOString()}] ${Of.severityText(t)}`;return n!==void 0&&(u+=` (${n})`),u+=`: ${r}`,i===void 0?[u]:[u,i]}}var AM=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},Li=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)},Ls,Ds,au;class jne{constructor(t,r){Ls.set(this,void 0),Ds.set(this,void 0),au.set(this,void 0),AM(this,Ds,new Of(t),"f"),AM(this,Ls,r,"f"),AM(this,au,new kne,"f")}name(){return Li(this,Ls,"f")}severity(){return Li(this,Ds,"f").severity}verbose(t,r){Li(this,Ds,"f").shouldLog(kr.VERBOSE)&&console.debug(...Li(this,au,"f").format(kr.VERBOSE,t,Li(this,Ls,"f"),r))}debug(t,r){Li(this,Ds,"f").shouldLog(kr.DEBUG)&&console.debug(...Li(this,au,"f").format(kr.DEBUG,t,Li(this,Ls,"f"),r))}info(t,r){Li(this,Ds,"f").shouldLog(kr.INFO)&&console.info(...Li(this,au,"f").format(kr.INFO,t,Li(this,Ls,"f"),r))}warn(t,r){Li(this,Ds,"f").shouldLog(kr.WARN)&&console.warn(...Li(this,au,"f").format(kr.WARN,t,Li(this,Ls,"f"),r))}error(t,r){let n=r;r instanceof Jt&&(n=r.failure()?r.error():r.data()),Li(this,Ds,"f").shouldLog(kr.ERROR)&&console.error(...Li(this,au,"f").format(kr.ERROR,t,Li(this,Ls,"f"),n))}fatal(t,r){Li(this,Ds,"f").shouldLog(kr.FATAL)&&console.error(...Li(this,au,"f").format(kr.FATAL,t,Li(this,Ls,"f"),r))}}Ls=new WeakMap,Ds=new WeakMap,au=new WeakMap;var Qne=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},qne=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)},AE;class ji{constructor(t=kr.FATAL){AE.set(this,void 0),Qne(this,AE,t,"f")}getLogger(t){return new jne(qne(this,AE,"f"),t)}}AE=new WeakMap;var Hne=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)},CM,Ik;class Yne{constructor(){CM.add(this)}createLogProvider(t,r){switch(Hne(this,CM,"m",Ik).call(this,t)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new Bne(t.logLevel,r);case"console":return new ji(t.logLevel)}}}CM=new WeakSet,Ik=function(t){return t.telemetry.enabled?"otel":"console"};var Zn=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)},ou=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},bo,Rf,Xu,Pf,Ju,yl,Nk,Lk,Dk,wk,Uk,$k,Gk,Fk,xk,Vk;class CE{constructor(t){bo.add(this),Rf.set(this,void 0),Xu.set(this,void 0),Pf.set(this,void 0),Ju.set(this,void 0),yl.set(this,void 0),this.bwellConfig=Zn(this,bo,"m",Uk).call(this,t),ou(this,Rf,Of.severityFromText(this.bwellConfig.logLevel),"f"),ou(this,yl,Zn(this,bo,"m",Vk).call(this),"f"),ou(this,Pf,Zn(this,bo,"m",Gk).call(this),"f"),ou(this,Xu,Zn(this,bo,"m",Fk).call(this),"f"),ou(this,Ju,Zn(this,bo,"m",xk).call(this),"f")}static initialize(t){try{const r=new CE(t);return Jt.success(r)}catch(r){if(ia.isBwellError(r))return Jt.failure(r);throw r}}get logLevel(){return Zn(this,Rf,"f")}get graphQL(){return Zn(this,Pf,"f")}get telemetry(){return Zn(this,Xu,"f")}get http(){return Zn(this,Ju,"f")}get context(){return Zn(this,yl,"f")}setContextUser(t){Zn(this,yl,"f").user=t}mergeRemoteConfig(t){ou(this,Rf,Zn(this,bo,"m",Nk).call(this,t),"f"),ou(this,Pf,Zn(this,bo,"m",Lk).call(this,t),"f"),ou(this,Xu,Object.freeze(Zn(this,bo,"m",Dk).call(this,t)),"f"),ou(this,Ju,Object.freeze(Zn(this,bo,"m",wk).call(this,t)),"f")}}Rf=new WeakMap,Xu=new WeakMap,Pf=new WeakMap,Ju=new WeakMap,yl=new WeakMap,bo=new WeakSet,Nk=function(t){var r;const n=(r=t?.logLevel)!==null&&r!==void 0?r:null;return n===null?Zn(this,Rf,"f"):Of.severityFromText(n)},Lk=function(t){var r;const n=(r=t?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return Zn(this,Pf,"f");const{authedApiUrl:i,unauthedApiUrl:a}=this.bwellConfig.overrides;return{unauthApiUrl:a??n.url,apiUrl:i??n.authUrl}},Dk=function(t){var r,n;const i=(r=t?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return Zn(this,Xu,"f");const a=(n=i.enabled)!==null&&n!==void 0?n:Zn(this,Xu,"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({},Zn(this,Xu,"f")),{enabled:a,collectorUrl:i.collectorUrl})},wk=function(t){var r,n,i;const a=(r=t?.httpClient)!==null&&r!==void 0?r:null;return a===null?Zn(this,Ju,"f"):{timeout:(n=a.requestTimeout)!==null&&n!==void 0?n:Zn(this,Ju,"f").timeout,retryPolicy:(i=a.retry)!==null&&i!==void 0?i:Zn(this,Ju,"f").retryPolicy}},Uk=function(t){return Object.assign(Object.assign({},Fne),t)},$k=function(){try{return ore(this.bwellConfig.clientKey)}catch{throw new Xte("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},Gk=function(){var t,r;return{apiUrl:(t=this.bwellConfig.overrides.authedApiUrl)!==null&&t!==void 0?t:`https://api-gateway.${Zn(this,yl,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${Zn(this,yl,"f").env}.icanbwell.com/federated-graph/graphql`}},Fk=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},xk=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},Vk=function(){return{clientKey:this.bwellConfig.clientKey,env:Zn(this,bo,"m",$k).call(this),user:null}};var Wne=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 f(g){try{h(n.next(g))}catch(G){u(G)}}function y(g){try{h(n.throw(g))}catch(G){u(G)}}function h(g){g.done?a(g.value):i(g.value).then(f,y)}h((n=n.apply(e,t||[])).next())})},Bk=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},bE=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)},Mf,OE;class zne{constructor(t,r=new ji){Mf.set(this,void 0),OE.set(this,void 0),Bk(this,OE,t,"f"),Bk(this,Mf,r.getLogger("ConfigManager"),"f")}initialize(t){return Wne(this,void 0,void 0,function*(){const r=CE.initialize(t);if(r.failure())return r;const n=r.data();bE(this,Mf,"f").verbose("Initializing SDK Configuration");const i=yield bE(this,OE,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const a=i.data();try{n.mergeRemoteConfig(a)}catch(u){bE(this,Mf,"f").error("Error merging SDK config with remote config.",u)}return bE(this,Mf,"f").info("Remote SDK Configuration merged with user config"),Jt.success(n)})}}Mf=new WeakMap,OE=new WeakMap;class Zu extends Error{response;request;constructor(t,r){const n=`${Zu.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Zu.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zu)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${String(t.status)})`}}const kk=e=>e.toUpperCase(),bM=e=>typeof e=="function"?e():e,jk=(e,t)=>e.map((r,n)=>[r,t[n]]),If=e=>{let t={};return e instanceof Headers?t=Kne(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):e&&(t=e),t},Kne=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},Xne=e=>{try{const t=e();return Jne(t)?t.catch(r=>Qk(r)):t}catch(t){return Qk(t)}},Qk=e=>e instanceof Error?e:new Error(String(e)),Jne=e=>typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"&&"catch"in e&&typeof e.catch=="function"&&"finally"in e&&typeof e.finally=="function",OM=e=>{throw new Error(`Unhandled case: ${String(e)}`)},RE=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),kxe=e=>Object.entries(e),jxe=e=>Object.values(e),Qxe=(e,t)=>Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)])),qxe=e=>e.charAt(0).toLowerCase()+e.slice(1);function Hxe(e){if(!Array.isArray(e))throw new Error(`Expected array. Got: ${String(e)}`)}function Yxe(e){if(e===null||typeof e!="object")throw new Error(`Expected object. Got: ${String(e)}`)}const Wxe=e=>e.charAt(0).toUpperCase()+e.slice(1),zxe=e=>{let t=!1,r,n;return{promise:new Promise((a,u)=>{r=a,n=u}),isResolved:()=>t,resolve:a=>{if(t=!0,e?.strict&&t)throw new Error(`Deferred is already resolved. Attempted to resolve with: ${JSON.stringify(a)}`);r(a)},reject:a=>n(a)}},Zne=(...e)=>{process.env.DEBUG&&console.log(...e)},Kxe=(...e)=>(...t)=>{Zne(...e,...t)},Xxe=e=>{const t=[],r=[];for(const n of e)n instanceof Error?t.push(n):r.push(n);return[r,t]},Jxe=async(...e)=>{const t=eie(e);return new GraphQLClient(t.url).batchRequests(t)},eie=e=>e.length===1?e[0]:{url:e[0],documents:e[1],requestHeaders:e[2],signal:void 0},tie=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Zxe=async(...e)=>{const[t,r,...n]=e,i=rie(t,r,...n);return new GraphQLClient(i.url).rawRequest({...i})},rie=(e,t,...r)=>{const[n,i]=r;return typeof e=="string"?{url:e,query:t,variables:n,requestHeaders:i,signal:void 0}:e},nie=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0};var iie=_(2455);const qk="Accept",RM="Content-Type",PM="application/json",Hk="application/graphql-response+json",eVe={success:200},Yk=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),aie=e=>{const t=e.toLowerCase();return t.includes(Hk)||t.includes(PM)},Wk=e=>{try{if(Array.isArray(e))return{_tag:"Batch",executionResults:e.map(zk)};if(RE(e))return{_tag:"Single",executionResult:zk(e)};throw new Error(`Invalid execution result: result is not object or array.
|
|
12180
12180
|
Got:
|
|
12181
12181
|
${String(e)}`)}catch(t){return t}},zk=e=>{if(typeof e!="object"||e===null)throw new Error("Invalid execution result: result is not object");let t,r,n;if("errors"in e){if(!RE(e.errors)&&!Array.isArray(e.errors))throw new Error("Invalid execution result: errors is not plain object OR array");t=e.errors}if("data"in e){if(!RE(e.data)&&e.data!==null)throw new Error("Invalid execution result: data is not plain object");r=e.data}if("extensions"in e){if(!RE(e.extensions))throw new Error("Invalid execution result: extensions is not plain object");n=e.extensions}return{data:r,errors:t,extensions:n}},oie=e=>e._tag==="Batch"?e.executionResults.some(Kk):Kk(e.executionResult),Kk=e=>Array.isArray(e.errors)?e.errors.length>0:Boolean(e.errors),Xk=e=>typeof e=="object"&&e!==null&&"kind"in e&&e.kind===iie.b.OPERATION_DEFINITION;var sie=_(5157),uie=_(2704);const cie=e=>{let t;const r=e.definitions.filter(Xk);return r.length===1&&(t=r[0].name?.value),t},lie=e=>{let t=!1;const r=e.definitions.filter(Xk);return r.length===1&&(t=r[0].operation==="mutation"),t},MM=(e,t)=>{const r=typeof e=="string"||"kind"in e?e:String(e),n=typeof r=="string"?r:(0,uie.y)(r);let i=!1,a;if(t)return{expression:n,isMutation:i,operationName:a};const u=Xne(()=>typeof r=="string"?(0,sie.qg)(r):r);return u instanceof Error?{expression:n,isMutation:i,operationName:a}:(a=cie(u),i=lie(u),{expression:n,operationName:a,isMutation:i})},IM=JSON,NM=async e=>{const t={...e,method:e.request._tag==="Single"?e.request.document.isMutation?"POST":kk(e.method??"post"):e.request.hasMutations?"POST":kk(e.method??"post"),fetchOptions:{...e.fetchOptions,errorPolicy:e.fetchOptions.errorPolicy??"none"}},n=await fie(t.method)(t),i=await n.text();let a;try{a=die(i,n.headers.get(RM),e.fetchOptions.jsonSerializer??IM)}catch(f){a=f}const u={status:n.status,headers:n.headers,body:i};if(!n.ok){if(a instanceof Error)return new Zu({...u},{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables});const f=a._tag==="Batch"?{...a.executionResults,...u}:{...a.executionResult,...u};return new Zu(f,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}if(a instanceof Error)throw a;if(oie(a)&&t.fetchOptions.errorPolicy==="none"){const f=a._tag==="Batch"?{...a.executionResults,...u}:{...a.executionResult,...u};return new Zu(f,{query:e.request._tag==="Single"?e.request.document.expression:e.request.query,variables:e.request.variables})}switch(a._tag){case"Single":return{...u,...Jk(t)(a.executionResult)};case"Batch":return{...u,data:a.executionResults.map(Jk(t))};default:OM(a)}},Jk=e=>t=>({extensions:t.extensions,data:t.data,errors:e.fetchOptions.errorPolicy==="all"?t.errors:void 0}),die=(e,t,r)=>t&&aie(t)?Wk(r.parse(e)):Wk(e),fie=e=>async t=>{const r=new Headers(t.headers);let n=null,i;r.has(qk)||r.set(qk,[Hk,PM].join(", ")),e==="POST"?(i=(t.fetchOptions.jsonSerializer??IM).stringify(_ie(t)),typeof i=="string"&&!r.has(RM)&&r.set(RM,PM)):n=pie(t);const a={method:e,headers:r,body:i,...t.fetchOptions};let u=new URL(t.url),f=a;if(t.middleware){const h=await Promise.resolve(t.middleware({...a,url:t.url,operationName:t.request._tag==="Single"?t.request.document.operationName:void 0,variables:t.request.variables})),{url:g,...G}=h;u=new URL(g),f=G}return n&&n.forEach((h,g)=>{u.searchParams.append(g,h)}),await(t.fetch??fetch)(u,f)},_ie=e=>{switch(e.request._tag){case"Single":return{query:e.request.document.expression,variables:e.request.variables,operationName:e.request.document.operationName};case"Batch":return jk(e.request.query,e.request.variables??[]).map(([t,r])=>({query:t,variables:r}));default:throw OM(e.request)}},pie=e=>{const t=e.fetchOptions.jsonSerializer??IM,r=new URLSearchParams;switch(e.request._tag){case"Single":return r.append("query",Yk(e.request.document.expression)),e.request.variables&&r.append("variables",t.stringify(e.request.variables)),e.request.document.operationName&&r.append("operationName",e.request.document.operationName),r;case"Batch":{const n=e.request.variables?.map(u=>t.stringify(u))??[],i=e.request.query.map(Yk),a=jk(i,n).map(([u,f])=>({query:u,variables:f}));return r.append("query",t.stringify(a)),r}default:throw OM(e.request)}};class hie{url;requestConfig;constructor(t,r={}){this.url=t,this.requestConfig=r}rawRequest=async(...t)=>{const[r,n,i]=t,a=nie(r,n,i),{headers:u,fetch:f=globalThis.fetch,method:y="POST",requestMiddleware:h,responseMiddleware:g,excludeOperationName:G,...K}=this.requestConfig,{url:ye}=this;a.signal!==void 0&&(K.signal=a.signal);const Te=MM(a.query,G),Re=await NM({url:ye,request:{_tag:"Single",document:Te,variables:a.variables},headers:{...If(bM(u)),...If(a.requestHeaders)},fetch:f,method:y,fetchOptions:K,middleware:h});if(g&&await g(Re,{operationName:Te.operationName,variables:n,url:this.url}),Re instanceof Error)throw Re;return Re};async request(t,...r){const[n,i]=r,a=Sie(t,n,i),{headers:u,fetch:f=globalThis.fetch,method:y="POST",requestMiddleware:h,responseMiddleware:g,excludeOperationName:G,...K}=this.requestConfig,{url:ye}=this;a.signal!==void 0&&(K.signal=a.signal);const Te=MM(a.document,G),Re=await NM({url:ye,request:{_tag:"Single",document:Te,variables:a.variables},headers:{...If(bM(u)),...If(a.requestHeaders)},fetch:f,method:y,fetchOptions:K,middleware:h});if(g&&await g(Re,{operationName:Te.operationName,variables:a.variables,url:this.url}),Re instanceof Error)throw Re;return Re.data}async batchRequests(t,r){const n=tie(t,r),{headers:i,excludeOperationName:a,...u}=this.requestConfig;n.signal!==void 0&&(u.signal=n.signal);const f=n.documents.map(({document:K})=>MM(K,a)),y=f.map(({expression:K})=>K),h=f.some(({isMutation:K})=>K),g=n.documents.map(({variables:K})=>K),G=await NM({url:this.url,request:{_tag:"Batch",operationName:void 0,query:y,hasMutations:h,variables:g},headers:{...If(bM(i)),...If(n.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||"POST",fetchOptions:u,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware&&await this.requestConfig.responseMiddleware(G,{operationName:void 0,variables:g,url:this.url}),G instanceof Error)throw G;return G.data}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}}async function tVe(e,t,...r){const n=mie(e,t,...r);return new GraphQLClient(n.url).request({...n})}const Sie=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},mie=(e,t,...r)=>{const[n,i]=r;return typeof e=="string"?{url:e,document:t,variables:n,requestHeaders:i,signal:void 0}:e},rVe=null,Qi=`
|
|
12182
12182
|
fragment CodingFields on Coding {
|
|
@@ -16056,6 +16056,29 @@ ${ha}`,Vae=`
|
|
|
16056
16056
|
description
|
|
16057
16057
|
calculation
|
|
16058
16058
|
}
|
|
16059
|
+
communication {
|
|
16060
|
+
coding {
|
|
16061
|
+
code
|
|
16062
|
+
system
|
|
16063
|
+
display
|
|
16064
|
+
}
|
|
16065
|
+
text
|
|
16066
|
+
}
|
|
16067
|
+
acceptingNewPatients
|
|
16068
|
+
acceptedAgeRanges {
|
|
16069
|
+
years {
|
|
16070
|
+
gt
|
|
16071
|
+
gte
|
|
16072
|
+
lt
|
|
16073
|
+
lte
|
|
16074
|
+
}
|
|
16075
|
+
months {
|
|
16076
|
+
gt
|
|
16077
|
+
gte
|
|
16078
|
+
lt
|
|
16079
|
+
lte
|
|
16080
|
+
}
|
|
16081
|
+
}
|
|
16059
16082
|
}
|
|
16060
16083
|
}
|
|
16061
16084
|
}
|