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