@icanbwell/composite 1.1153.3 → 1.1154.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.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/native.js +1 -1
  3. package/package.json +3 -3
package/index.js CHANGED
@@ -866,7 +866,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
866
866
  <div class="wrapper">
867
867
  <bwell-error-component />
868
868
  </div>
869
- `}}customElements.get(ve)===void 0&&customElements.define(ve,Ee);const De=[{name:"loader",defaultElement:document.createElement(re)},{name:"error",defaultElement:document.createElement(ve)}],Se=["error","loading"],Ie={error:"error",loading:"loader"},xe=({src:Ot,elementNameSuffix:Dt,version:Qt,prefetchFeatureApp:zt})=>(0,p.__awaiter)(void 0,void 0,void 0,function*(){var Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;window.bwell||(window.bwell=new ue({metadata:{version:Qt}}));const mr=`bwell-${Dt}`;if(customElements.get(mr)!==void 0)return;class Bn extends h{constructor(){super(),Ke.add(this),We.set(this,(0,z.nanoid)()),Ct.set(this,void 0),Qe.set(this,document.createElement("feature-app-loader")),Ye.set(this,new q.EventEmitter),It.set(this,void 0),mn.set(this,void 0),Sn.set(this,void 0),et.set(this,void 0),Rt.set(this,void 0),kt.set(this,void 0),this.attachShadow({mode:"open"});const Yr=new pe(De).attachToShadowRoot(this.shadowRoot);Yr.addEventListener("visibilitychange",({visibility:Nt,container:Fe,name:ot})=>{ot==="error"&&Nt==="visible"&&window.bwell._registerEmbeddableContent(Fe),(0,p.__classPrivateFieldGet)(this,Qe,"f").style.display=Nt==="hidden"?"unset":"hidden"}),(0,p.__classPrivateFieldSet)(this,kt,{slots:Yr,attributes:new V().bindTo(this),loaderEventEmitter:(0,p.__classPrivateFieldGet)(this,Ye,"f")},"f"),(0,p.__classPrivateFieldSet)(this,It,(0,p.__classPrivateFieldGet)(this,Ke,"m",qn).bind(this),"f"),(0,p.__classPrivateFieldSet)(this,mn,(0,p.__classPrivateFieldGet)(this,Ke,"m",Sr).bind(this),"f"),(0,p.__classPrivateFieldSet)(this,Sn,(0,p.__classPrivateFieldGet)(this,Ke,"m",Ln).call(this,"error"),"f"),(0,p.__classPrivateFieldSet)(this,et,(0,p.__classPrivateFieldGet)(this,Ke,"m",Ln).call(this,"loading"),"f")}connectedCallback(){return(0,p.__awaiter)(this,void 0,void 0,function*(){(0,p.__classPrivateFieldGet)(this,Sn,"f").call(this,(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get("error")),(0,p.__classPrivateFieldGet)(this,et,"f").call(this,(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get("loading")),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.addEventListener("visibilitychange",(0,p.__classPrivateFieldGet)(this,mn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.addChangeListener("error",(0,p.__classPrivateFieldGet)(this,Sn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.addChangeListener("loading",(0,p.__classPrivateFieldGet)(this,et,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("loader");try{yield window.bwell.validateLoad()}catch{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}(0,p.__classPrivateFieldSet)(this,We,this.id||(0,p.__classPrivateFieldGet)(this,We,"f"),"f"),(0,p.__classPrivateFieldSet)(this,Ct,new T((0,p.__classPrivateFieldGet)(this,We,"f")),"f"),(0,p.__classPrivateFieldGet)(this,Ct,"f").registerDispatcher(Yr=>this.dispatchEvent(Yr)),window.bwell.isInitialized?(0,p.__classPrivateFieldGet)(this,It,"f").call(this):(window.bwell.once("initialized",(0,p.__classPrivateFieldGet)(this,It,"f")),window.bwell.once("error",()=>{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}),zt&&(0,b.h)(Ot).catch(()=>{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}))})}disconnectedCallback(){var Yr;(0,p.__classPrivateFieldGet)(this,Ye,"f").emit("disconnect"),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.removeEventListener("visibilitychange",(0,p.__classPrivateFieldGet)(this,mn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.removeChangeListener("error",(0,p.__classPrivateFieldGet)(this,Sn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.removeChangeListener("loading",(0,p.__classPrivateFieldGet)(this,et,"f")),(Yr=(0,p.__classPrivateFieldGet)(this,Ct,"f"))===null||Yr===void 0||Yr.deregister(),(0,p.__classPrivateFieldGet)(this,Ye,"f").removeAllListeners()}}We=new WeakMap,Ct=new WeakMap,Qe=new WeakMap,Ye=new WeakMap,It=new WeakMap,mn=new WeakMap,Sn=new WeakMap,et=new WeakMap,Rt=new WeakMap,kt=new WeakMap,Ke=new WeakSet,qn=function(){(0,p.__classPrivateFieldGet)(this,Qe,"f").setAttribute("featureAppId",`bwell-embeddable:${mr}`),(0,p.__classPrivateFieldGet)(this,Qe,"f").setAttribute("src",Ot),(0,p.__classPrivateFieldGet)(this,Qe,"f").config={id:(0,p.__classPrivateFieldGet)(this,We,"f"),name:Dt,elementName:mr,utils:(0,p.__classPrivateFieldGet)(this,kt,"f")},this.shadowRoot.appendChild((0,p.__classPrivateFieldGet)(this,Qe,"f"))},Sr=function({visibility:Yr,name:Nt}){(0,p.__classPrivateFieldGet)(this,Qe,"f").style.display=Yr==="hidden"?"unset":"hidden"},pn=function(Yr){(0,p.__classPrivateFieldGet)(this,Rt,"f")(),(0,p.__classPrivateFieldSet)(this,Rt,void 0,"f")},Ln=function(Yr){return Nt=>{const Fe=Se.findIndex(Je=>Je===Yr);if(!Se.slice(0,Fe).some(Je=>(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get(Je)!==null)){if(Nt!==null)(0,p.__classPrivateFieldGet)(this,Rt,"f")&&(0,p.__classPrivateFieldGet)(this,Ke,"m",pn).call(this,Yr),(0,p.__classPrivateFieldSet)(this,Rt,(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlotLocked(Ie[Yr]),"f");else if(Nt===null&&(0,p.__classPrivateFieldGet)(this,Rt,"f")){(0,p.__classPrivateFieldGet)(this,Ke,"m",pn).call(this,Yr);const Je=Se.find(tt=>(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get(tt)!==null);Je&&(0,p.__classPrivateFieldSet)(this,Rt,(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlotLocked(Ie[Je]),"f")}}}},customElements.define(mr,Bn)}),$e={rE:"1.1153.3"},it="composite";var vt=e(67321);xe({src:`https://embeddables.prod.icanbwell.com/${it}/${$e.rE}/scripts/embeddable.federated.js`,elementNameSuffix:it,version:$e.rE,prefetchFeatureApp:!0})},79566:(Y,l,e)=>{"use strict";var n=e(31085),t=e(94043),r=e(45250),s=e(35473),o=e(25624),i=Object.defineProperty,a=Object.defineProperties,g=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,A=(b,h,f)=>h in b?i(b,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):b[h]=f,m=(b,h)=>{for(var f in h||(h={}))u.call(h,f)&&A(b,f,h[f]);if(c)for(var f of c(h))E.call(h,f)&&A(b,f,h[f]);return b},d=(b,h)=>a(b,g(h));const O=(b,h,f)=>{const v=_.cloneDeep(b);if(!v.contained||h<0)return v;const M=v.contained.findIndex(x=>x.resourceType==="Questionnaire");if(M!==-1&&!f){const x=v.contained[M];if(x.item){if(!x.item.some(y=>isPageExtensionPresent(y)))return v;let z=0,S=x.item.length;for(let y=0;y<x.item.length;y++){const C=x.item[y];if(isPageExtensionPresent(C)){if(z===h+1){S=y;break}z++}}x.item=x.item.slice(0,S),v.contained[M]=x}}else f&&M!==-1&&(v.contained[M]=d(m({},v.contained[M]),{item:f}));return v},p=({formId:b,questionnaireResponse:h,showQuestionPrefix:f,nextQuestion:v,onGoBack:M,handleHiddenQuestion:x,errorConfig:T,onClearError:z,customErrorConfigurations:S,showStepper:y,hideBackButton:C,onFormDataChange:R,externalComponentRenderMap:P,className:L,children:D})=>{var w,N,V;const{currentGroupIndex:q,hasCustomError:I}=useFHIRQuestionnaire(),k=(w=h.questionnaire)==null?void 0:w.replace("#",""),U=(N=h?.contained)==null?void 0:N.find(K=>K.id===k&&K.resourceType==="Questionnaire"),F=(K,G,se)=>{let oe=_.cloneDeep(h);oe.item=K,oe=trimQuestionnaireItems(oe,q,se),v(oe,G)};return jsx("div",{className:cx(`${I?"mb-3":"mb-8"} flex w-full flex-col gap-8`,L),children:jsx(FHIRQuestionnaire,{formId:b,onFormDataChange:R,questionnaireResponseItem:(V=h?.item)!=null?V:[],questionnaireSchema:U,status:h.status,showQuestionPrefix:f,errorConfig:T,customErrorConfigurations:S,isAdaptiveFlow:!0,onComplete:F,onGoBack:M,onClearError:z,handleHiddenQuestion:x,showStepper:y,hideBackButton:C,externalComponentRenderMap:P,children:D})})}},19622:(Y,l,e)=>{"use strict";e.d(l,{K:()=>v});var n=e(31085),t=e(14041),r=e(94043),s=e(76323),o=e(36087),i=e(56192),a=e(76808),g=e(66267),c=Object.defineProperty,u=Object.defineProperties,E=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,O=(M,x,T)=>x in M?c(M,x,{enumerable:!0,configurable:!0,writable:!0,value:T}):M[x]=T,p=(M,x)=>{for(var T in x||(x={}))m.call(x,T)&&O(M,T,x[T]);if(A)for(var T of A(x))d.call(x,T)&&O(M,T,x[T]);return M},b=(M,x)=>u(M,E(x)),h=(M,x,T)=>new Promise((z,S)=>{var y=P=>{try{R(T.next(P))}catch(L){S(L)}},C=P=>{try{R(T.throw(P))}catch(L){S(L)}},R=P=>P.done?z(P.value):Promise.resolve(P.value).then(y,C);R((T=T.apply(M,x)).next())});const f=10,v=({id:M="location-filter-desktop",initialValue:x,onInputChange:T,onValueChange:z,isDisabled:S=!1,className:y="",setIsLoading:C,errorText:R})=>{const P=(0,a.Ul)(),{i18n:{t:L},loading:D}=(0,g.E_)({keys:["shared-translations"]}),w=x?.placeId,N=x?.description,[V,q]=(0,t.useState)(""),[I,k]=(0,t.useState)(""),[U,F]=(0,t.useState)(null),[K,G]=(0,t.useState)(null),[se,oe]=(0,t.useState)(!1),te=(0,t.useRef)(!1),pe=[{id:"placeholder",label:"No Locations",isDisabled:!0}],[be,ze]=(0,t.useState)(pe),[ge,ne]=(0,t.useState)(pe),[ae,{loading:me,error:he}]=(0,i.Ncb)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch geocode data")}}),[de,{loading:ue,error:re}]=(0,i.qtq)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch geocode by lat/lon data")}}),[J,{loading:ve,error:Ee}]=(0,i.zUC)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch place autocomplete data"),ze(pe)},onCompleted:Qt=>{var zt,Ke;const We=(Ke=(zt=Qt.placeAutocomplete)==null?void 0:zt.predictions)==null?void 0:Ke.map(Ct=>{var Qe;return{id:Ct.placeId,label:(0,s.removeAfterLastComma)(Ct.description),mainText:Ct?.mainText||((Qe=Ct.description.split(",")[0])==null?void 0:Qe.trim()),secondaryText:(0,s.removeAfterLastComma)(Ct?.secondaryText||Ct.description.split(",").slice(1).join(",").trim())}});ze(We?.length?We:pe)}}),De=(0,t.useMemo)(()=>be.map(Qt=>b(p({},Qt),{displayLabel:(0,r.RZ)(Qt?.label||"",V)})),[V,be]),Se=Qt=>h(void 0,null,function*(){var zt,Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;if(F(Qt),G(Qt),oe(!1),Qt&&typeof Qt=="string"){const mr=be.find(tt=>tt.id===Qt),Bn=mr?.label||V;if(!mr)return;q(Bn),k(Bn),setTimeout(()=>{const tt=[{id:mr.id,label:mr.label}];ze(tt),ne(tt)},f);const Xr=yield ae({variables:{placeId:Qt}}),Yr=(Ke=(zt=Xr?.data)==null?void 0:zt.geocodingByPlaceId)==null?void 0:Ke.latitude,Nt=(Ct=(We=Xr?.data)==null?void 0:We.geocodingByPlaceId)==null?void 0:Ct.longitude,Fe=((Ye=(Qe=Xr?.data)==null?void 0:Qe.geocodingByPlaceId)==null?void 0:Ye.zipCode)||"",ot=((mn=(It=Xr?.data)==null?void 0:It.geocodingByPlaceId)==null?void 0:mn.state)||"",Je=((et=(Sn=Xr?.data)==null?void 0:Sn.geocodingByPlaceId)==null?void 0:et.stateCode)||"";if(Yr&&Nt)if(!Fe||!Je){const tt=yield de({variables:{latitude:String(Yr),longitude:String(Nt)}}),rt=((kt=(Rt=tt?.data)==null?void 0:Rt.geocodingByLatLon)==null?void 0:kt.zipCode)||"",lt=((Sr=(qn=tt?.data)==null?void 0:qn.geocodingByLatLon)==null?void 0:Sr.state)||"",St=((Ln=(pn=tt?.data)==null?void 0:pn.geocodingByLatLon)==null?void 0:Ln.stateCode)||"";z({latitude:Yr,longitude:Nt,zipCode:rt,state:lt,stateCode:St,placeId:Qt,description:Bn,value:Qt})}else z({latitude:Yr,longitude:Nt,zipCode:Fe,state:ot,stateCode:Je,placeId:Qt,description:Bn,value:Qt});else oe(!0)}}),Ie=()=>!0,xe=(0,s.useDebounce)(Qt=>h(void 0,null,function*(){return yield J({variables:{input:Qt,types:"geocode"}})})),$e=Qt=>h(void 0,null,function*(){if(oe(!1),q(Qt),T?.(Qt),!Qt||Qt.trim().length===0){F(null),ze(pe),z({latitude:0,longitude:0,zipCode:"",state:"",stateCode:"",placeId:"",description:"",value:Qt});return}const zt=Qt.trim();zt.length>=2?yield xe(zt):ze(pe)}),it=Qt=>{te.current=Qt},vt=()=>{q(I),ze(ge),F(K)};(0,t.useEffect)(()=>{(()=>h(void 0,null,function*(){var zt,Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;if(w&&N){ze([{id:w,label:V||N}]),ne([{id:w,label:V||N}]),F(w),G(w),q(N),k(N),N===V&&q(N);const mr=yield ae({variables:{placeId:w}}),Bn=(Ke=(zt=mr?.data)==null?void 0:zt.geocodingByPlaceId)==null?void 0:Ke.latitude,Xr=(Ct=(We=mr?.data)==null?void 0:We.geocodingByPlaceId)==null?void 0:Ct.longitude,Yr=((Ye=(Qe=mr?.data)==null?void 0:Qe.geocodingByPlaceId)==null?void 0:Ye.zipCode)||"",Nt=((mn=(It=mr?.data)==null?void 0:It.geocodingByPlaceId)==null?void 0:mn.state)||"",Fe=((et=(Sn=mr?.data)==null?void 0:Sn.geocodingByPlaceId)==null?void 0:et.stateCode)||"";if(Bn&&Xr)if(!Yr||!Nt||!Fe){const ot=yield de({variables:{latitude:String(Bn),longitude:String(Xr)}}),Je=((kt=(Rt=ot?.data)==null?void 0:Rt.geocodingByLatLon)==null?void 0:kt.zipCode)||"",tt=((Sr=(qn=ot?.data)==null?void 0:qn.geocodingByLatLon)==null?void 0:Sr.state)||"",rt=((Ln=(pn=ot?.data)==null?void 0:pn.geocodingByLatLon)==null?void 0:Ln.stateCode)||"";z({latitude:Bn,longitude:Xr,zipCode:Je,state:tt,stateCode:rt,placeId:w,description:N,value:w})}else z({latitude:Bn,longitude:Xr,zipCode:Yr,state:Nt,stateCode:Fe,placeId:w,description:N,value:w})}else F(null),G(null),q(""),k(""),ze(pe),ne(pe)}))()},[]);const Ot=se||!!he||!!re||!!Ee||!!R,Dt=Ot?R||L("ADDRESS_TYPEAHEAD_ERROR"):"";return(0,t.useEffect)(()=>{C&&C(me||ue||D)},[C,me,ue,D]),(0,n.jsx)("div",{className:y,children:(0,n.jsx)(o.Select.ComboBox,{id:M,size:"md",isDisabled:S,inputValue:V,isLoading:ve||me||ue,placeholder:L("ADDRESS_AUTO_COMPLETE_PLACEHOLDER"),items:De,selectedKey:U,onSelectionChange:Se,onInputChange:$e,defaultFilter:Ie,onOpenChange:it,onBlur:vt,isInvalid:Ot,hint:Dt,autoComplete:"address-line1",className:"w-full",children:Qt=>{const zt=Qt,Ke=V.trim().length>=2,We=zt.mainText||"",Ct=zt.secondaryText||"",Qe=We.trim().length>0,Ye=Ct.trim().length>0,It=Qe?(0,r.RZ)(We,V):{beforePart:"",highlightedPart:"",remainingPart:""},mn=Ye?(0,r.RZ)(Ct,V):{beforePart:"",highlightedPart:"",remainingPart:""};return(0,n.jsx)(o.Select.Item,{id:zt.id,supportingText:zt.supportingText,isDisabled:zt.isDisabled,icon:zt.icon,avatarUrl:zt.avatarUrl,textValue:zt.label,children:Ke&&Qe?(0,n.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,n.jsxs)("div",{className:"truncate text-sm font-medium",children:[(0,n.jsx)("span",{children:It.beforePart}),(0,n.jsx)("span",{className:"text-brand-primary font-semibold",children:It.highlightedPart}),(0,n.jsx)("span",{children:It.remainingPart})]}),Ye&&(0,n.jsxs)("div",{className:"truncate text-xs text-gray-600",children:[(0,n.jsx)("span",{children:mn.beforePart}),(0,n.jsx)("span",{className:"text-brand-primary font-semibold",children:mn.highlightedPart}),(0,n.jsx)("span",{children:mn.remainingPart})]})]}):(0,n.jsx)("div",{className:"truncate",children:zt.label})})}})})}},18077:()=>{},12200:(Y,l,e)=>{"use strict";e.d(l,{AddressTypeahead:()=>n.K});var n=e(19622),t=e(18077),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"DeviceLocationProvider")&&e.d(l,{DeviceLocationProvider:function(){return t.DeviceLocationProvider}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useDeviceLocationContext")&&e.d(l,{useDeviceLocationContext:function(){return t.useDeviceLocationContext}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}})},52113:(Y,l,e)=>{"use strict";var n=e(31085),t=e(36087),r=e(87896);const s=({icon:o,title:i})=>{const{isSmallScreen:a}=useDeviceDetection();return jsx("div",{className:`tw-preflight mb-5 flex justify-center ${a?"-mx-5 -mt-5":""}`,children:jsxs("div",{className:`max-w bg-utility-blue-50 border-utility-blue-200 flex h-12 w-full flex-row items-center gap-3 border-t border-b pl-5 ${a?"":"rounded-lg border-r border-l"}`,children:[o??jsx(FileSearch02,{size:20}),jsxs(Typography,{className:"text-md text-primary font-normal",tag:"h3",children:[i,jsx("span",{className:"animate-pulse",children:"..."})]})]})})}},87858:(Y,l,e)=>{"use strict";var n=e(31085),t=e(36087),r=e(66267),s=e(64081),o=e(52449);const i=({className:a})=>{const{pathname:g}=useLocation(),c=useNavigationService(),u=useBreadcrumbsConfig(),{overrides:E}=useBreadcrumbsOverrideContext(),{loading:A,i18n:{t:m}}=useI18nChild({keys:["shared"]}),d=getPathSegments(g).flatMap(O=>{const p=c.getId(O),b=c.getRouteMeta(p)||{},h=getBreadcrumbTitleKey(p,b,u);if(!h||b.breadcrumbHide)return[];const f=E[p];let v=c.getHref(p),M=h;return f&&(f.href?v=f.href:f.search&&(v=c.getHref({id:p,search:f.search})),f.titleKey&&(M=f.titleKey)),[{routeId:p,href:v,label:m(M),onClick:f?.onClick}]});return A||d.length<=1?null:jsx(BreadcrumbsBase,{type:"button",className:cx("tw-preflight hidden lg:block",a),children:d.map(O=>jsx(BreadcrumbsBase.Item,{href:O.href,onClick:O.onClick,children:O.label},O.routeId))})}},85449:(Y,l,e)=>{"use strict";e.d(l,{rJ:()=>y,GU:()=>S});var n=e(31085),t=e(14041),r=e(76323),s=e(78579),o=e(76808),i=e(5380),a=e(87896),g=e(26877);const c=(C,R)=>new Promise((P,L)=>setTimeout(()=>L(new Error(R)),C)),u=(C,R,P)=>Promise.race([C,c(R,P)]),E=5e3,A=1e4;var m=Object.defineProperty,d=Object.defineProperties,O=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=(C,R,P)=>R in C?m(C,R,{enumerable:!0,configurable:!0,writable:!0,value:P}):C[R]=P,v=(C,R)=>{for(var P in R||(R={}))b.call(R,P)&&f(C,P,R[P]);if(p)for(var P of p(R))h.call(R,P)&&f(C,P,R[P]);return C},M=(C,R)=>d(C,O(R)),x=(C,R,P)=>new Promise((L,D)=>{var w=q=>{try{V(P.next(q))}catch(I){D(I)}},N=q=>{try{V(P.throw(q))}catch(I){D(I)}},V=q=>q.done?L(q.value):Promise.resolve(q.value).then(w,N);V((P=P.apply(C,R)).next())});const T={enableHighAccuracy:!0,maximumAge:3e4,timeout:15e3},z=(0,t.createContext)({loading:!1,overrideSearchSettings:()=>Promise.resolve(),locationPermission:void 0,setLocationPermission:()=>{},position:void 0,refreshPosition:()=>Promise.resolve(void 0),requestPosition:()=>Promise.resolve(void 0),requestCurrentLocation:()=>Promise.resolve(),checkLocaitonPermission:()=>Promise.resolve(void 0)}),S=()=>(0,t.useContext)(z),y=({children:C})=>{var R;const{mobileOS:P}=(0,r.useDeviceDetection)(),L=(0,o.Ul)(),{geolocation:D}=(0,s.c)(),{queryParams:w,setQueryParams:N}=(0,a.useSearchQueryParams)(),V=(0,t.useRef)(!1),q=(0,t.useRef)(w);(0,t.useEffect)(()=>{q.current=w},[w]);const[I,k]=(0,t.useState)(!1),[U,F]=(0,t.useState)((R=w.locationPermission)!=null?R:void 0),[K,G]=(0,t.useState)(),[se,oe]=(0,t.useState)(!1),te=(0,t.useCallback)(ve=>{F(ve);try{N(M(v({},q.current),{locationPermission:ve||i.Ef.UNAVAILABLE}))}catch(Ee){Ee instanceof Error?L?.error(Ee,"Failed to update query params"):L?.error(`Failed to update query params - ${JSON.stringify(Ee)}`)}},[N,L]),pe=(0,t.useCallback)(()=>x(void 0,null,function*(){try{return yield D.isAvailable()}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking geolocation availability"):L?.error(`Error checking geolocation availability - ${JSON.stringify(ve)}`),!1}}),[D,L]),be=(0,t.useCallback)(ve=>x(void 0,null,function*(){const Ee=D.getCurrentPosition(ve).then(De=>{if(!De||!De.coords)throw new Error("Location data is invalid or unavailable");return De});try{return yield u(Ee,E,"Location request timed out. Please check that location services are enabled.")}catch(De){throw De instanceof Error&&L?.error(De,"Geolocation timeout or error"),De}}),[D,L]),ze=(0,t.useCallback)(()=>x(void 0,null,function*(){return u(D.checkPermission(),E,"Check permission timed out")}),[D]),ge=(0,t.useCallback)(()=>x(void 0,null,function*(){return u(D.requestPermission(),A,"Permission request timed out - user did not respond to permission dialog")}),[D]),ne=(0,t.useCallback)(()=>x(void 0,null,function*(){try{if(!(yield pe()))return L?.error("Location services not available"),!1;const Ee=yield ze();return Ee!==i.Ef.GRANTED&&Ee!==i.Ef.PROMPT?(L?.error(`Location permission not granted: ${Ee}`),!1):!0}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking location services"):L?.error(`Error checking location services - ${JSON.stringify(ve)}`),!1}}),[pe,L,ze]);(0,t.useEffect)(()=>{if(V.current)return;V.current=!0,(()=>x(void 0,null,function*(){const Ee=w.locationPermission;if(Ee===i.Ef.DENIED||Ee===i.Ef.BLOCKED||Ee===i.Ef.UNAVAILABLE){F(Ee);return}k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}if(Ee===i.Ef.GRANTED){try{const Ie=yield ze();if(Ie===i.Ef.GRANTED){const xe=yield be(T);xe&&(G(xe),te(i.Ef.GRANTED))}else Ie===i.Ef.PROMPT?(te(Ie),oe(!0)):te(Ie)}catch(Ie){Ie instanceof Error?L?.error(Ie,"Error getting initial location with granted permission"):L?.error(`Error getting initial location with granted permission - ${JSON.stringify(Ie)}`),te(i.Ef.UNAVAILABLE)}return}const Se=yield ze();if(te(Se),Se===i.Ef.GRANTED)try{const Ie=yield be(T);Ie?G(Ie):te(i.Ef.UNAVAILABLE)}catch(Ie){Ie instanceof Error?L?.error(Ie,"Error getting initial location"):L?.error(`Error getting initial location - ${JSON.stringify(Ie)}`),te(i.Ef.UNAVAILABLE)}else Se===i.Ef.PROMPT&&oe(!0)}catch(De){De instanceof Error?L?.error(De,"Error initializing location permission"):L?.error(`Error initializing location permission - ${JSON.stringify(De)}`),te(i.Ef.UNAVAILABLE)}finally{k(!1)}}))()},[]);const ae=(0,t.useCallback)(()=>x(void 0,null,function*(){try{if(!(yield ne())){te(i.Ef.UNAVAILABLE);return}k(!0);let Ee=yield ze();if(te(Ee),Ee===i.Ef.GRANTED||Ee===i.Ef.PROMPT){if(P==="Android"&&Ee===i.Ef.GRANTED)try{Ee=yield ge(),te(Ee)}catch(De){De instanceof Error?L?.error(De,"Error re-requesting Android permission"):L?.error(`Error re-requesting Android permission - ${JSON.stringify(De)}`);return}if(Ee!==i.Ef.UNAVAILABLE){const De=yield be(T);return G(De),De}}return}catch(ve){te(i.Ef.UNAVAILABLE),ve instanceof Error?L?.error(ve,"Error refreshing location"):L?.error(`Error refreshing location - ${JSON.stringify(ve)}`);return}finally{k(!1)}}),[ne,L,P,te,be,ze,ge]),me=(0,t.useCallback)(()=>x(void 0,null,function*(){try{return(yield pe())?yield ze():i.Ef.UNAVAILABLE}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking location permission"):L?.error(`Error checking location permission - ${JSON.stringify(ve)}`),i.Ef.UNAVAILABLE}}),[pe,L,ze]),he=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield ze();te(Ee)}catch(ve){ve instanceof Error?L?.error(ve,"Error checking and setting location permission"):L?.error(`Error checking and setting location permission - ${JSON.stringify(ve)}`),te(i.Ef.UNAVAILABLE)}finally{k(!1)}}),[pe,L,te,ze]),de=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield ze();if(Ee===i.Ef.DENIED||Ee===i.Ef.BLOCKED||Ee===i.Ef.UNAVAILABLE){te(Ee);return}const De=yield ge();if(te(De),["granted","prompt"].includes(De)){const Se=yield be(T);return G(Se),Se}return}catch(ve){if(ve instanceof Error)ve.message.includes("User denied Geolocation")||L?.error(ve,"Error requesting location");else{const Ee=ve&&typeof ve=="object"&&"message"in ve?ve.message:JSON.stringify(ve);Ee?.includes("User denied Geolocation")||L?.error(`Error requesting location - ${Ee}`)}te(i.Ef.UNAVAILABLE);return}finally{k(!1)}}),[pe,L,te,be,ge,ze]),ue=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield be(T);Ee&&(G(Ee),F(i.Ef.GRANTED),N(M(v({},q.current),{location:`${Ee.coords.latitude},${Ee.coords.longitude}`,locationType:i.iF.CURRENT_LOCATION,lat:`${Ee.coords.latitude}`,lng:`${Ee.coords.longitude}`,locationPermission:i.Ef.GRANTED})))}catch(ve){throw ve instanceof Error?L?.error(ve,"Error requesting current location"):L?.error(`Error requesting current location - ${JSON.stringify(ve)}`),te(i.Ef.UNAVAILABLE),ve}finally{k(!1)}}),[pe,L,N,te,be]),re=(0,t.useCallback)(()=>x(void 0,null,function*(){try{k(!0);const ve=yield ae();ve&&N(M(v({},q.current),{location:`${ve.coords.latitude},${ve.coords.longitude}`,locationType:i.iF.CURRENT_LOCATION,lat:`${ve.coords.latitude}`,lng:`${ve.coords.longitude}`,locationPermission:U||i.Ef.UNAVAILABLE}))}catch(ve){ve instanceof Error?L?.error(ve,"Error overriding search settings"):L?.error(`Error overriding search settings - ${JSON.stringify(ve)}`)}finally{k(!1)}}),[L,U,ae,N]),J=(0,t.useMemo)(()=>({loading:I,overrideSearchSettings:re,locationPermission:U,setLocationPermission:F,position:K,refreshPosition:ae,requestPosition:de,requestCurrentLocation:ue,checkAndSetLocationPermission:he,checkLocaitonPermission:me}),[I,re,U,K,ae,de,ue,he,me]);return(0,n.jsxs)(z.Provider,{value:J,children:[se&&(0,n.jsx)(g.J,{isOpen:se,onClose:()=>oe(!1),title:"Find results nearby",description:"Enable location services to see results near you. We'll only use your location while you're searching."}),C]})}},82825:(Y,l,e)=>{"use strict";e.d(l,{GU:()=>n.GU,rJ:()=>n.rJ});var n=e(85449)},1053:(Y,l,e)=>{"use strict";e.d(l,{pc:()=>lt,GI:()=>be,rz:()=>et,Fp:()=>Sn,el:()=>mn,ao:()=>It,oA:()=>D,Yt:()=>St,g4:()=>Ye,tn:()=>Ue,n4:()=>w,gD:()=>L,Vp:()=>tt,Cx:()=>k,bK:()=>q,gi:()=>rt,Z$:()=>he,GT:()=>Je,hr:()=>de,JL:()=>ue,Ck:()=>I,dU:()=>V,wG:()=>mr,hZ:()=>pn,$e:()=>Rt,qT:()=>Sr,GQ:()=>qn,q3:()=>Ln,D_:()=>kt,Uf:()=>F,_l:()=>ge,Md:()=>se,V7:()=>G,fe:()=>ae,JP:()=>At,Z_:()=>N,zO:()=>me,UZ:()=>te,$7:()=>Ke,rb:()=>K,_W:()=>Ct,WS:()=>We,VF:()=>Fe,vf:()=>Xr,PV:()=>ot,PS:()=>Bn,Iz:()=>Nt,zD:()=>oe,m3:()=>Ot,XP:()=>Dt,PM:()=>De,cX:()=>re,G6:()=>J,Us:()=>Ie,AA:()=>Ee,G0:()=>vt,mO:()=>$e,HH:()=>Se,PU:()=>ye,it:()=>zt,Tl:()=>it,uH:()=>Qt,c3:()=>ve,rx:()=>P});var n=e(36087),t=e(14041);const r=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21m14-3 2 2 4-4m-7.5-8.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));r.displayName="UserCheck01";const s=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 21v-1.2c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C13.72 15 12.88 15 11.2 15H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 17.28 2 18.12 2 19.8V21M16 6l2 2 4-4m-9.5 3.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z"}));s.displayName="UserCheck02";const o=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21m17 0v-6m-3 3h6M14.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));o.displayName="UserPlus01";var i=e(8957);const a=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m16.5 16 5 5m0-5-5 5M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21M14.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));a.displayName="UserX01";const g=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));g.displayName="Users01";const c=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m21 21-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));c.displayName="SearchSm";var u=e(15297),E=e(22716),A=e(9495);const m=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M4 8h16M4 16h16M8 3v18m8-18v18"}));m.displayName="Hash01";const d=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m9.5 3-3 18m11-18-3 18m6-13h-17m16 8h-17"}));d.displayName="Hash02";const O=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M15 4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 3 13.96 3 13.4 3h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 3.76 9 4.04 9 4.6v2.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C8.24 9 7.96 9 7.4 9H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 9.76 3 10.04 3 10.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 15 4.04 15 4.6 15h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C9 15.76 9 16.04 9 16.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C9.76 21 10.04 21 10.6 21h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C15 20.24 15 19.96 15 19.4v-2.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C15.76 15 16.04 15 16.6 15h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 14.24 21 13.96 21 13.4v-2.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 9 19.96 9 19.4 9h-2.8c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C15 8.24 15 7.96 15 7.4V4.6Z"}));O.displayName="MedicalCross";const p=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 2v5m0-5c-.713 0-1.41.075-2.08.217M12 2c.713 0 1.41.075 2.08.217M12 7a5 5 0 0 0-5 5m5-5a5 5 0 0 1 5 5m-5 5v5m0-5a5 5 0 0 0 5-5m-5 5a5 5 0 0 1-5-5m5 10c.712 0 1.407-.075 2.077-.216M12 22a10.02 10.02 0 0 1-2.085-.218M4.93 4.93l3.535 3.535m7.072 7.072 3.535 3.535M2 12h5m-5 0c0 .713.075 1.41.217 2.08M2 12c0-.714.075-1.411.217-2.083M17 12h5m0 0c0-.713-.075-1.41-.217-2.08M22 12c0 .713-.075 1.409-.216 2.08M4.928 19.07l3.535-3.536m7.072-7.07 3.535-3.536m-1.624-1.317a10.053 10.053 0 0 1 2.942 2.943m-.003 10.895a10.053 10.053 0 0 1-2.941 2.94m-10.891-.002a10.055 10.055 0 0 1-2.94-2.937m0-10.896a10.054 10.054 0 0 1 2.94-2.942"}));p.displayName="Virus";const b=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M22 10H2m9 4H6M2 8.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 19 4.08 19 5.2 19h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 17.48 22 16.92 22 15.8V8.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 5 19.92 5 18.8 5H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 6.52 2 7.08 2 8.2Z"}));b.displayName="CreditCard02";const h=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}));h.displayName="Link03";var f=e(85418);const v=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 4c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C20 6.605 20 7.07 20 8v9.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V8c0-.93 0-1.395.102-1.776a3 3 0 0 1 2.122-2.122C6.605 4 7.07 4 8 4m1 11 2 2 4.5-4.5M9.6 6h4.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C16 5.24 16 4.96 16 4.4v-.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C15.24 2 14.96 2 14.4 2H9.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C8 2.76 8 3.04 8 3.6v.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C8.76 6 9.04 6 9.6 6Z"}));v.displayName="ClipboardCheck";const M=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 4c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C20 6.605 20 7.07 20 8v9.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V8c0-.93 0-1.395.102-1.776a3 3 0 0 1 2.122-2.122C6.605 4 7.07 4 8 4m4 13v-6m-3 3h6M9.6 6h4.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C16 5.24 16 4.96 16 4.4v-.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C15.24 2 14.96 2 14.4 2H9.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C8 2.76 8 3.04 8 3.6v.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C8.76 6 9.04 6 9.6 6Z"}));M.displayName="ClipboardPlus";const x=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M11.5 5h.434c3.048 0 4.571 0 5.15.547a2 2 0 0 1 .586 1.845c-.156.781-1.4 1.66-3.888 3.42l-4.064 2.876c-2.488 1.76-3.732 2.639-3.888 3.42a2 2 0 0 0 .586 1.845c.579.547 2.102.547 5.15.547h.934M8 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm14 14a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));x.displayName="Route";const T=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 7c0-.93 0-1.395-.102-1.776a3 3 0 0 0-2.121-2.122C13.395 3 12.93 3 12 3c-.93 0-1.395 0-1.777.102a3 3 0 0 0-2.12 2.122C8 5.605 8 6.07 8 7M5.2 21h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 19.48 22 18.92 22 17.8v-7.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 7 19.92 7 18.8 7H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 8.52 2 9.08 2 10.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 21 4.08 21 5.2 21Z"}));T.displayName="Briefcase01";const z=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12.913 17h7.174m-7.174 0L11 21m1.913-4 2.865-5.991c.231-.483.347-.724.505-.8a.5.5 0 0 1 .434 0c.158.076.274.317.505.8L20.087 17m0 0L22 21M2 5h6m0 0h3.5M8 5V3m3.5 2H14m-2.5 0c-.496 2.957-1.647 5.636-3.334 7.884M10 14a9.396 9.396 0 0 1-1.834-1.116m0 0C6.813 11.848 5.603 10.427 5 9m3.166 3.884A17.295 17.295 0 0 1 2 18"}));z.displayName="Translate01";const S=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M10 8.502a2.248 2.248 0 0 1 4.37.75c0 1.499-2.25 2.248-2.25 2.248m.03 3h.01M9.9 19.2l1.46 1.947c.217.29.326.434.459.486a.5.5 0 0 0 .362 0c.133-.052.242-.197.459-.486L14.1 19.2c.293-.39.44-.586.619-.735a2 2 0 0 1 .822-.412c.226-.053.47-.053.959-.053 1.398 0 2.097 0 2.648-.228a3 3 0 0 0 1.624-1.624C21 15.597 21 14.898 21 13.5V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v5.7c0 1.398 0 2.097.228 2.648a3 3 0 0 0 1.624 1.624C5.403 18 6.102 18 7.5 18c.489 0 .733 0 .96.053a2 2 0 0 1 .821.412c.18.149.326.344.619.735Z"}));S.displayName="AnnotationQuestion";const y=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M15 2.458A9.996 9.996 0 0 0 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.715-.432-3.33-1.193-4.74M17 5.75h.005M10.5 21.888v-2.203a.5.5 0 0 1 .12-.325l2.486-2.9a.5.5 0 0 0-.131-.76l-2.857-1.632a.499.499 0 0 1-.186-.187L8.07 10.62a.5.5 0 0 0-.478-.25l-5.528.492M21 6c0 2.21-2 4-4 6-2-2-4-3.79-4-6a4 4 0 0 1 8 0Zm-3.75-.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0Z"}));y.displayName="Globe05";const C=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M11.302 21.615c.221.129.332.194.488.227.122.026.298.026.42 0 .156-.034.267-.098.488-.227C14.646 20.478 20 16.908 20 12V7.217c0-.799 0-1.199-.13-1.542a2 2 0 0 0-.548-.79c-.275-.243-.65-.383-1.398-.664l-5.362-2.01c-.208-.078-.312-.117-.419-.133a1 1 0 0 0-.286 0c-.107.016-.21.055-.419.133L6.076 4.22c-.748.28-1.122.421-1.398.664a2 2 0 0 0-.547.79C4 6.018 4 6.418 4 7.217V12c0 4.908 5.354 8.478 7.302 9.615Z"}));C.displayName="Shield01";const R=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M21 15v1.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V15m14-7-5-5m0 0L7 8m5-5v12"}));R.displayName="Upload01";const P=/^(https?):\/\/([a-zA-Z0-9-]+\.)+[a-zA-Z0-9-]{2,}(?::\d+)?(\/[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?(#\/[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?(\?[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?$/i,L="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",D="http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",w="http://hl7.org/fhir/questionnaire-item-control",N="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs",V="http://hl7.org/fhir/StructureDefinition/minValue",q="http://hl7.org/fhir/StructureDefinition/maxValue",I="http://icanbwell.com/fhir/StructureDefinition/minValue-error-message",k="http://icanbwell.com/fhir/StructureDefinition/maxValue-error-message",U="http://icanbwell.com/fhir/StructureDefinition/questionnaire-readOnlyExpression",F="http://icanbwell.com/fhir/StructureDefinition/navigation-linkId",K="http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink",G="http://icanbwell.com/fhir/StructureDefinition/questionnaire-autocomplete",se="http://hl7.org/fhir/StructureDefinition/entryFormat",oe="http://hl7.org/fhir/StructureDefinition/tz-code",te="tz-code",pe="footer",be="check-box",ze="header",ge="page",ne="http://icanbwell.com/fhir/StructureDefinition/questionnaire-callNextQuestion",ae="http://icanbwell.com/fhir/StructureDefinition/questionnaire-currentStep",me="http://icanbwell.com/fhir/StructureDefinition/questionnaire-totalSteps",he=[{patterns:["pdf"],type:"pdf"},{patterns:["word","document"],type:"doc"},{patterns:["excel","spreadsheet"],type:"xlsx"},{patterns:["powerpoint","presentation"],type:"ppt"},{patterns:["image/jpeg"],type:"jpg"},{patterns:["image/png"],type:"png"},{patterns:["image/gif"],type:"gif"},{patterns:["image/svg"],type:"svg"},{patterns:["text/plain"],type:"txt"},{patterns:["zip"],type:"zip"},{patterns:["csv"],type:"csv"}],de={"image/*":"image/*","application/pdf":".pdf","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","image/jpeg":"image/jpeg","image/jpg":"image/jpg","image/png":"image/png","image/gif":"image/gif","image/webp":"image/webp","image/heic":"image/heic","image/heif":"image/heif","image/svg+xml":"image/svg+xml"},ue={"image/*":"Images",".pdf":"PDF",".doc":"DOCX",".docx":"DOCX","image/jpeg":"JPEG","image/jpg":"JPG","image/png":"PNG","image/gif":"GIF","image/webp":"WEBP","image/heic":"HEIC","image/heif":"HEIF","image/svg+xml":"SVG"},re="ui-toolkit/CoordinatePicker",J="ui-toolkit/DetailsInfo",ve="ui-toolkit/ServiceChoice",Ee="ui-toolkit/InfoBanner",De="ui-toolkit/Button",Se="ui-toolkit/Phone",Ie="ui-toolkit/ErrorCard",xe="ui-toolkit/FormContainer",$e="ui-toolkit/PageHeader",it="ui-toolkit/SelectableOption",vt="ui-toolkit/Modal",Ot="ui-toolkit/Alert",Dt="ui-toolkit/AppSectionAccess",Qt="ui-toolkit/SensitiveDataCategory",zt="ui-toolkit/QuestCard",Ke="http://icanbwell.com/fhir/StructureDefinition/subtitle",We="http://icanbwell.com/fhir/StructureDefinition/text-align",Ct={LEFT:"left",CENTER:"center"},Qe={MYSELF:"myself",SOMEONE_ELSE:"someone-else"},Ye="http://icanbwell.com/fhir/StructureDefinition/icon-name",It="http://icanbwell.com/fhir/StructureDefinition/error-title",mn="http://icanbwell.com/fhir/StructureDefinition/error-subtitle",Sn="http://icanbwell.com/fhir/StructureDefinition/error-icon-name",et="http://icanbwell.com/fhir/StructureDefinition/description",Rt="http://icanbwell.com/fhir/StructureDefinition/modal-description",kt="http://icanbwell.com/fhir/StructureDefinition/modal-title",qn="http://icanbwell.com/fhir/StructureDefinition/modal-icon-name",Sr="http://icanbwell.com/fhir/StructureDefinition/modal-icon-color",pn="http://icanbwell.com/fhir/StructureDefinition/button-text",Ln="http://icanbwell.com/fhir/StructureDefinition/secondary-button-text",mr="http://icanbwell.com/fhir/StructureDefinition/modal-button-action",Bn="http://icanbwell.com/fhir/StructureDefinition/trigger-text",Xr="http://icanbwell.com/fhir/StructureDefinition/trigger-icon-name",Yr="http://icanbwell.com/fhir/StructureDefinition/primary-button-text",Nt="http://icanbwell.com/fhir/StructureDefinition/trigger-variant",Fe="http://icanbwell.com/fhir/StructureDefinition/trigger-color",ot="http://icanbwell.com/fhir/StructureDefinition/trigger-size",Je="http://hl7.org/fhir/StructureDefinition/mimeType",tt="http://hl7.org/fhir/StructureDefinition/maxSize",rt="http://icanbwell.com/fhir/StructureDefinition/message-severity",lt="http://icanbwell.com/fhir/StructureDefinition/alert-color",St="http://icanbwell.com/fhir/StructureDefinition/hideLabel",st="http://icanbwell.com/fhir/StructureDefinition/placeholder",le="http://icanbwell.com/fhir/StructureDefinition/hint-text",ye="ui-toolkit/PrefilledMemberDemographicsAlert",Ue="http://hl7.org/fhir/issue-severity",Te="http://icanbwell.com/fhir/StructureDefinition/button-type",Tt="http://icanbwell.com/fhir/StructureDefinition/button-action",Zt="button-type",vn="http://icanbwell.com/fhir/StructureDefinition/analytics-form-name",_n="http://icanbwell.com/fhir/StructureDefinition/analytics-event-name",Ar="http://icanbwell.com/fhir/StructureDefinition/analytics-page-name",Ft="http://icanbwell.com/fhir/StructureDefinition/analytics-property-name",we="http://icanbwell.com/fhir/StructureDefinition/analytics-option-name",Ze={},At={"user-check":r,"user-check-02":s,"user-plus":o,"user-01":i.f,"user-x":a,"users-01":g,"search-sm":c,"info-circle":u.d,"help-circle":E.m,x:A.X,hash:m,"hash-02":d,"folder-heart":n.FolderHeart,"medical-cross":O,virus:p,pill:n.Pill,vaccine:n.Vaccine,"face-mask":n.FaceMask,"heart-beat":n.HeartBeat,"credit-card-02":b,"link-03":h,"search-lg":f.q,"clipboard-check":v,"clipboard-plus":M,route:x,"briefcase-01":T,"translate-01":z,"annotation-question":S,"globe-05":y,"shield-01":C,"upload-01":R}},25624:(Y,l,e)=>{"use strict";e.d(l,{$H:()=>w,$O:()=>vt,CP:()=>kt,Fy:()=>Rt,GN:()=>be,J4:()=>lt,MU:()=>G,Nw:()=>ot,Qr:()=>y,Ue:()=>St,Yo:()=>Ee,a0:()=>z,cz:()=>C,di:()=>I,eC:()=>st,iI:()=>k,lv:()=>q,mR:()=>vn,nt:()=>S,od:()=>V,t7:()=>Ot,u0:()=>x,yQ:()=>Zt,zj:()=>ue});var n=e(17637),t=e(43915),r=e(37234),s=e(65328),o=e(91595),i=e(27779),a=e.n(i),g=e(45250),c=e.n(g),u=e(16681),E=e(18807),A=e(1053),m=Object.defineProperty,d=Object.defineProperties,O=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=(Lt,Et,bt)=>Et in Lt?m(Lt,Et,{enumerable:!0,configurable:!0,writable:!0,value:bt}):Lt[Et]=bt,v=(Lt,Et)=>{for(var bt in Et||(Et={}))b.call(Et,bt)&&f(Lt,bt,Et[bt]);if(p)for(var bt of p(Et))h.call(Et,bt)&&f(Lt,bt,Et[bt]);return Lt},M=(Lt,Et)=>d(Lt,O(Et));const x=(Lt,Et,bt,qt)=>{if(Lt){const hn=Lt(Et,v({defaultValue:bt},qt));if(hn&&hn!==Et)return hn}return qt?Object.entries(qt).reduce((hn,[Tn,zr])=>hn.replace(`{{${Tn}}}`,String(zr)),bt):bt},T=Lt=>{var Et;return(Et=Lt.filter(bt=>bt.url.includes("questionnaire-itemControl")).flatMap(bt=>{var qt,hn;return(hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)!=null?hn:[]}).find(bt=>{var qt;return(qt=bt.code)==null?void 0:qt.startsWith("ui-toolkit/")}))==null?void 0:Et.code},z=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.V7);return bt?.valueCode||"off"},S=(Lt,Et,bt)=>{const qt=(0,E.A)(bt);return Lt&&Et&&bt?qt.replace("<p>",`<span>${Et} `).replace("</p>","</span>").trim():qt.replace("<p>","<span>").replace("</p>","</span>").trim()},y=Lt=>{const Et=Lt?.find(bt=>bt.url===A.Vp);return Et?.valueInteger},C=Lt=>{const Et=Lt?.find(bt=>bt.url===A.Z_);return Et?.valueInteger},R={date:"MM/DD/YYYY",choice:"Select an option"},P="Type your response here...",L=(Lt,Et)=>{const bt=Lt?.find(qt=>qt.url===PLACEHOLDER_EXTENSION_URL);return bt?.valueString||Et&&R[Et]||P},D=Lt=>{const Et=Lt?.find(bt=>bt.url===HINT_TEXT_EXTENSION_URL);return Et?.valueString},w=Lt=>{const Et=Lt?.filter(bt=>bt.url===A.GT&&bt.valueCode).map(bt=>A.hr[bt.valueCode]||bt.valueCode);return Et?.length?Et.join(","):void 0},N=Lt=>Lt.split(",").map(qt=>qt.trim()).map(qt=>A.JL[qt]||qt).filter((qt,hn,Tn)=>Tn.indexOf(qt)===hn).join(", "),V=(Lt,Et,bt)=>{const qt=N(Lt),hn=qt.lastIndexOf(","),Tn=hn!==-1?`${qt.substring(0,hn)} or${qt.substring(hn+1)}`:qt,zr=[Et&&`max. ${parseFloat((Et/(1e3*1e3)).toFixed(1))}MB`,bt&&`upto ${bt} file${bt>1?"s":""}`].filter(Boolean);return zr.length>0?`${Tn} (${zr.join(", ")})`:Tn},q=Lt=>{const Et=Lt?.find(bt=>bt?.url===A.zD||bt?.url===A.UZ);return Et?.valueCode||Intl.DateTimeFormat().resolvedOptions().timeZone},I=(Lt,Et)=>{var bt,qt,hn;const Tn=Et?.find(zr=>zr.url.includes(Lt));return(hn=(qt=(bt=Tn?.valueInteger)!=null?bt:Tn?.valueDecimal)!=null?qt:Tn?.valueString)!=null?hn:Tn?.valueDate},k=Lt=>{if(!!Lt){if(/^\d{4}-\d{2}-\d{2}$/.test(Lt))return Lt;try{const Et=(0,i.evaluate)({},Lt);if(Array.isArray(Et)&&Et.length>0){const bt=Et[0];if(bt instanceof Date&&!isNaN(bt.getTime())){const qt=bt.getFullYear(),hn=String(bt.getMonth()+1).padStart(2,"0"),Tn=String(bt.getDate()).padStart(2,"0");return`${qt}-${hn}-${Tn}`}if(typeof bt=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(bt))return bt}}catch{}}},U=(Lt,Et)=>{var bt,qt;const hn=Et?.find(zr=>zr.url===Lt);if(!hn)return;const Tn=(bt=hn.valueString)!=null?bt:hn.valueDate;return Tn||k((qt=hn.valueExpression)==null?void 0:qt.expression)},F=(Lt,Et)=>{if(!(!Lt||Lt.length===0))for(const bt of Lt){const qt=I(Et,bt.extension);if(qt!==void 0)return qt;if(bt.item&&bt.item.length>0){const hn=F(bt.item,Et);if(hn!==void 0)return hn}}},K=(Lt,Et)=>{try{const bt=String(Lt??Et);let qt;if(bt.includes("/"))qt=(0,n.A)(bt,"MM/dd/yyyy",new Date);else{const hn=bt.split("T")[0];qt=(0,t.A)(hn)}return(0,r.A)(qt)}catch(bt){return console.error("Date parsing error:",bt,Lt),null}},G=(Lt,Et)=>{var bt;for(const qt of Lt){if(qt.linkId===Et)return qt;if((bt=qt.item)!=null&&bt.length){const hn=G(qt.item,Et);if(hn!==void 0)return hn}}},se=(Lt,Et)=>{var bt;const qt=[];for(const hn of Lt)if(hn.linkId===Et&&qt.push(hn),(bt=hn.item)!=null&&bt.length){const Tn=se(hn.item,Et);qt.push(...Tn)}return qt},oe=(Lt,Et,bt=0)=>se(Lt,Et)[bt];function te(Lt){return Lt!=null}const pe=(Lt,Et)=>{var bt,qt,hn;if("answerString"in Lt&&te(Lt.answerString)){if(Lt.operator==="=")return Et?.valueString===Lt.answerString;if(Lt.operator==="!=")return Et?.valueString!==Lt.answerString}if("answerBoolean"in Lt&&te(Lt.answerBoolean)){if(Lt.operator==="=")return Et?.valueBoolean===Lt.answerBoolean;if(Lt.operator==="!=")return Et?.valueBoolean!==Lt.answerBoolean}if("answerInteger"in Lt&&te(Lt.answerInteger)||"answerDecimal"in Lt&&te(Lt.answerDecimal)){const Tn=Number(Et?.valueInteger||Et?.valueDecimal),zr=Number(Lt.answerInteger||Lt.answerDecimal);if(Lt.operator==="=")return Tn===zr;if(Lt.operator==="!=")return Tn!==zr;if(Lt.operator===">")return Tn>zr;if(Lt.operator==="<")return Tn<zr;if(Lt.operator===">=")return Tn>=zr;if(Lt.operator==="<=")return Tn<=zr}if("answerQuantity"in Lt&&te(Lt.answerQuantity)){const Tn=Et?.valueQuantity,zr=Lt.answerQuantity;if(Tn?.unit!==zr?.unit)return!1;if(Lt.operator==="=")return Tn.value===zr.value;if(Lt.operator==="!=")return Tn.value!==zr.value;if(Lt.operator===">")return Tn.value>zr.value;if(Lt.operator==="<")return Tn.value<zr.value;if(Lt.operator===">=")return Tn.value>=zr.value;if(Lt.operator==="<=")return Tn.value<=zr.value}if("answerCoding"in Lt&&te(Lt.answerCoding)){const Tn=Et?.valueCoding,zr=Lt.answerCoding;if(Lt.operator==="=")return Tn?.code===zr.code;if(Lt.operator==="!=")return Tn?.code!==zr.code}if("answerReference"in Lt&&te(Lt.answerReference)){const Tn=Et?.valueReference,zr=Lt.answerReference;if(Lt.operator==="=")return Tn?.reference===zr.reference;if(Lt.operator==="!=")return Tn?.reference!==zr.reference}if("answerDate"in Lt&&te(Lt.answerDate)||"answerDateTime"in Lt&&te(Lt.answerDateTime)||"answerTime"in Lt&&te(Lt.answerTime)){const Tn=new Date((hn=(qt=(bt=Et?.valueDate)!=null?bt:Et?.valueDateTime)!=null?qt:Et?.valueTime)!=null?hn:""),zr=new Date(Lt.answerDate||Lt.answerDateTime||Lt.answerTime||"");if(Lt.operator==="=")return Tn.getTime()===zr.getTime();if(Lt.operator==="!=")return Tn.getTime()!==zr.getTime();if(Lt.operator===">")return Tn.getTime()>zr.getTime();if(Lt.operator==="<")return Tn.getTime()<zr.getTime();if(Lt.operator===">=")return Tn.getTime()>=zr.getTime();if(Lt.operator==="<=")return Tn.getTime()<=zr.getTime()}return Lt.operator==="exists"?Et!=null===Lt.answerBoolean:!0},be=(Lt,Et,bt)=>{const qt=hn=>{const Tn=se(bt,hn.question);return Tn.length===0||Tn.every(zr=>!zr.answer||zr.answer.length===0)?pe(hn,void 0):Tn.some(zr=>{var zn;return(zn=zr.answer)==null?void 0:zn.some(gn=>pe(hn,gn&&Object.keys(gn).length>0?gn:void 0))})};return Lt&&Lt?.length>0?Et==="any"?Lt?.some(hn=>qt(hn)):Lt?.every(hn=>qt(hn)):!0},ze=(Lt,Et,bt,qt,hn)=>{if(!Lt||Lt.length===0)return!0;const Tn=zr=>{var zn;let gn;if(qt&&typeof hn=="number"){const Mt=bt.filter(Pt=>Pt.linkId===qt)[hn];if(Mt?.item){const Pt=Mt.item.find(Ut=>Ut.linkId===zr.question);if(Pt?.answer&&Pt.answer.length>0)return(zn=Pt?.answer)==null?void 0:zn.some(Ut=>pe(zr,Ut&&Object.keys(Ut).length>0?Ut:void 0))}}if(!gn){const en=se(bt,zr.question);if(en.length>0)return en.some(Mt=>{var Pt;return(Pt=Mt.answer)==null?void 0:Pt.some(Ut=>pe(zr,Ut&&Object.keys(Ut).length>0?Ut:void 0))});gn=void 0}return pe(zr,gn)};return Et==="any"?Lt.some(zr=>Tn(zr)):Lt.every(zr=>Tn(zr))},ge=(Lt,Et)=>{var bt;if(!!((bt=Lt?.valueExpression)!=null&&bt.expression))try{const qt=evaluate(Et,Lt.valueExpression.expression);return Array.isArray(qt)?qt.some(hn=>Boolean(hn)):Boolean(qt)}catch{return}},ne=(Lt,Et)=>{var bt;const qt=(bt=Lt.extension)==null?void 0:bt.find(Tn=>Tn.url===READ_ONLY_EXPRESSION_EXTENSION_URL),hn=ge(qt,Et);return M(v({},Lt),{readOnly:hn??Lt.readOnly})},ae=(Lt,Et,bt,qt)=>{const{required:hn,maxLength:Tn,type:zr,extension:zn,enableWhen:gn,enableBehavior:en,repeats:Mt,answerOption:Pt}=Lt;if(!be(gn,en,Et)||Lt.type==="group"||Lt.type==="display")return"";if(Mt)return me(Lt,Et,bt,qt);const Ut=re(Lt,Et);return Ut&&J(Ut,Lt)?ve(Lt,Et,bt,Ut,qt):ue(zn,zr,hn,Tn,bt,Pt,qt)},me=(Lt,Et,bt,qt)=>{const{required:hn}=Lt;if(hn){if(!bt||bt.length===0)return x(qt,Translations.VALIDATION_AT_LEAST_ONE_REQUIRED,"At least one item is required");let Tn=!1;for(let zr=0;zr<bt.length;zr++){const zn=bt[zr];if(zn&&Object.keys(zn).length>0&&Object.values(zn).some(en=>en!=null&&en!==""&&(Array.isArray(en)?en.length>0:!0))){Tn=!0;const en=ue(Lt.extension,Lt.type,!0,Lt.maxLength,[zn],Lt.answerOption,qt);if(en)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:zr+1,error:en});if(Lt.item&&Lt.item.length>0){const Mt=he(Lt.item,Et,Lt.linkId,zr,qt);if(Mt)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:zr+1,error:Mt})}}else return x(qt,Translations.VALIDATION_ITEM_FIELD_REQUIRED,"Item {{index}}: This field is required",{index:zr+1})}if(!Tn)return x(qt,Translations.VALIDATION_AT_LEAST_ONE_REQUIRED,"At least one item is required")}else if(bt&&bt.length>0)for(let Tn=0;Tn<bt.length;Tn++){const zr=bt[Tn];if(zr&&Object.keys(zr).length>0&&Object.values(zr).some(gn=>gn!=null&&gn!==""&&(Array.isArray(gn)?gn.length>0:!0))){const gn=ue(Lt.extension,Lt.type,!1,Lt.maxLength,[zr],Lt.answerOption,qt);if(gn)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Tn+1,error:gn});if(Lt.item&&Lt.item.length>0){const en=he(Lt.item,Et,Lt.linkId,Tn,qt);if(en)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Tn+1,error:en})}}}return""},he=(Lt,Et,bt,qt,hn)=>{var Tn,zr;for(const zn of Lt){if(!ze(zn.enableWhen,zn.enableBehavior,Et,bt,qt))continue;const gn=G(Et,bt),en=(Tn=gn?.item)==null?void 0:Tn.find(Pt=>Pt.linkId===zn.linkId),Mt=(zr=en?.answer)!=null&&zr[qt]?[en.answer[qt]]:void 0;if(zn.required){if(!Mt||!Mt[0]||!de(Mt[0]))return x(hn,Translations.VALIDATION_NAMED_FIELD_REQUIRED,"{{fieldName}} is required",{fieldName:zn.text||zn.linkId});const Pt=ue(zn.extension,zn.type,!0,zn.maxLength,Mt,zn.answerOption,hn);if(Pt)return`${zn.text||zn.linkId}: ${Pt}`}else if(Mt&&Mt[0]&&de(Mt[0])){const Pt=ue(zn.extension,zn.type,!1,zn.maxLength,Mt,zn.answerOption,hn);if(Pt)return`${zn.text||zn.linkId}: ${Pt}`}if(zn.item&&zn.item.length>0){const Pt=he(zn.item,Et,zn.linkId,qt,hn);if(Pt)return Pt}}return""},de=Lt=>!Lt||Object.keys(Lt).length===0?!1:Object.values(Lt).some(Et=>Et!=null&&Et!==""&&(Array.isArray(Et)?Et.length>0:!0)),ue=(Lt,Et,bt,qt,hn,Tn,zr)=>{var zn,gn,en,Mt,Pt;let Ut="";const ln=!!Lt?.find(Rr=>{var $r,c0;return Rr.url===A.gD&&((c0=($r=Rr.valueCodeableConcept)==null?void 0:$r.coding)==null?void 0:c0.some(xo=>xo.system===A.n4&&xo.code===A.GI))}),Jt=hn?.[0],En={choice:((zn=Jt?.valueCoding)==null?void 0:zn.code)||(Jt?.valueString&&Tn?.some(Rr=>Rr.valueString===Jt.valueString)?Jt.valueString:null),"open-choice":((gn=Jt?.valueCoding)==null?void 0:gn.code)||Jt?.valueString,boolean:Jt?.valueBoolean,string:Jt?.valueString,text:Jt?.valueString,url:Jt?.valueUri,integer:Jt?.valueInteger,decimal:Jt?.valueDecimal,dateTime:Jt?.valueDateTime,date:Jt?.valueDate,time:Jt?.valueTime,quantity:(en=Jt?.valueQuantity)==null?void 0:en.value,reference:(Mt=Jt?.valueReference)==null?void 0:Mt.display,attachment:(Pt=Jt?.valueAttachment)==null?void 0:Pt.title};if(!(Et in En))return"";const jn=En[Et],Hr={required:()=>bt&&(jn==null||jn===""||jn==="NaN"||Number.isNaN(jn)||Et==="boolean"&&jn!==!0&&ln)?x(zr,u.p.VALIDATION_FIELD_REQUIRED,"This field is required"):"",maxLength:()=>qt&&jn!==null&&jn!==void 0&&jn.toString().length>qt?x(zr,u.p.VALIDATION_MAX_LENGTH,"Input should not exceed {{maxLength}} characters",{maxLength:qt}):"",minLength:()=>{const Rr=I("minLength",Lt);return Rr&&jn!==null&&jn!==void 0&&jn.toString().length<Number(Rr)?x(zr,u.p.VALIDATION_MIN_LENGTH,"Input should be at least {{minLength}} characters",{minLength:Rr}):""},urlRegex:()=>{const Rr=new RegExp(A.rx),$r=I("regexError",Lt),c0=$r??x(zr,u.p.VALIDATION_INVALID_URL,"Please enter a valid url starting from http:// and https://");return Rr&&Et==="url"&&jn&&!Rr.test(jn)?String(c0):""},regex:()=>{const Rr=I("regex",Lt);if(!Rr||typeof jn!="string")return"";const $r=new RegExp(Rr),c0=I("regexError",Lt),xo=c0??x(zr,u.p.VALIDATION_INVALID_INPUT,"Please enter a valid input");return $r&&jn&&!$r.test(jn)?String(xo):""},dateTime:()=>{if(Et==="dateTime"&&jn){const Rr=jn?.toString(),$r=new Date(Rr);return isNaN($r.getTime())?x(zr,u.p.VALIDATION_INVALID_DATETIME,"Please enter a valid date-time"):""}return""},date:()=>{if(Et!=="date"||!jn)return"";const Rr=jn.replace(/\D/g,"");return Rr.length>0&&Rr.length<8||isNaN(new Date(jn).getTime())?x(zr,u.p.VALIDATION_INVALID_DATE,"Invalid date"):""},minValue:()=>{var Rr;if(Et==="date"){const c0=U(A.dU,Lt),xo=K(c0??"01/01/1900","01/01/1900"),B0=K(jn,"");if(!xo||!B0)return"";if((0,s.A)(B0,xo)){const Q0=(Rr=Lt?.find(q0=>q0.url===A.Ck))==null?void 0:Rr.valueString;return Q0??x(zr,u.p.VALIDATION_DATE_BEFORE_MIN,"Date should not be before {{minDate}}",{minDate:c0??"01/01/1900"})}return""}const $r=I("minValue",Lt);return $r!=null&&jn!==null&&jn!==void 0&&jn<$r?x(zr,u.p.VALIDATION_MIN_VALUE,"Input should not be less than {{minValue}}",{minValue:$r}):""},maxValue:()=>{var Rr;if(Et==="date"){const c0=U(A.bK,Lt),xo=K(c0??"01/01/2100","01/01/2100"),B0=K(jn,"");if(!xo||!B0)return"";if((0,o.A)(B0,xo)){const Q0=(Rr=Lt?.find(q0=>q0.url===A.Cx))==null?void 0:Rr.valueString;return Q0??x(zr,u.p.VALIDATION_DATE_AFTER_MAX,"Date should not be after {{maxDate}}",{maxDate:c0??"01/01/2100"})}return""}const $r=I("maxValue",Lt);return $r!=null&&jn!==null&&jn!==void 0&&jn>$r?x(zr,u.p.VALIDATION_MAX_VALUE,"Input should not exceed {{maxValue}}",{maxValue:$r}):""}};return Ut=Hr.required()||Hr.maxLength()||Hr.minLength()||Hr.urlRegex()||Hr.regex()||Hr.dateTime()||Hr.date()||Hr.minValue()||Hr.maxValue()||"",Ut},re=(Lt,Et)=>{for(const bt of Et)if(bt.item){if(bt.item.find(Tn=>Tn.linkId===Lt.linkId))return bt;const hn=re(Lt,bt.item);if(hn)return hn}return null},J=(Lt,Et)=>{if(Lt.answer&&Lt.answer.length>1)return!0;if(Lt.item){const bt=Lt.item.find(qt=>qt.linkId===Et.linkId);if(bt&&bt.answer&&bt.answer.length>1)return!0}return!1},ve=(Lt,Et,bt,qt,hn)=>{var Tn,zr;const{required:zn}=Lt,gn=(Tn=qt.item)==null?void 0:Tn.find(Pt=>Pt.linkId===Lt.linkId),en=gn?.answer||[],Mt=((zr=qt.answer)==null?void 0:zr.length)||1;for(let Pt=0;Pt<Mt;Pt++){const Ut=en[Pt];if(zn){if(!Ut||!de(Ut))return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:x(hn,Translations.VALIDATION_NAMED_FIELD_REQUIRED,"{{fieldName}} is required",{fieldName:Lt.text||Lt.linkId})});const ln=ue(Lt.extension,Lt.type,!0,Lt.maxLength,[Ut],Lt.answerOption,hn);if(ln)return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:ln})}else if(Ut&&de(Ut)){const ln=ue(Lt.extension,Lt.type,!1,Lt.maxLength,[Ut],Lt.answerOption,hn);if(ln)return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:ln})}}return""},Ee=(Lt,Et)=>{for(const bt of Lt){if(bt?.linkId===Et)return bt;if(bt?.item&&bt.item.length>0){const qt=Ee(bt.item,Et);if(qt)return qt}}},De=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===FOOTER_CODE))}))},Se=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>bt.url===A.oA&&bt.valueBoolean))},Ie=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===HEADER_CODE))}))},xe=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===A.gD&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===A.n4&&Tn.code===A._l))}))},$e=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>bt.url===QUESTIONNAIRE_CALL_NEXT_QUESTION_EXTENSION_URL&&bt.valueBoolean))},it=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===CHECKBOX_CODE))}))},vt=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.fe);return bt?.valueInteger},Ot=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.zO);return bt?.valueInteger},Dt=Lt=>{var Et;const bt=(Et=Lt?.extension)==null?void 0:Et.find(qt=>qt.url===QUESTIONNAIRE_TOTAL_STEPS_EXTENSION_URL);return bt?.valueInteger},Qt=(Lt,Et,bt,qt,hn,Tn)=>{const zr=gn=>Et.filter(en=>en.linkId===gn),zn=new Set;return Lt.map(gn=>{if(zn.has(gn.linkId)||De(gn))return null;const Mt=zr(gn.linkId),Pt=gn.type==="group"&&gn.repeats;if(zn.add(gn.linkId),Pt){const Ut=[];if(Mt.forEach((ln,Jt)=>{const En={linkId:gn.linkId,text:gn.text};let jn;if(bt===gn.linkId&&typeof Tn=="number"&&Tn===Jt&&hn&&hn.length>0){const Hr=ln?.item||[];jn=[...Hr],hn.forEach(Rr=>{const $r=jn.findIndex(c0=>c0.linkId===Rr.linkId);$r>=0?jn[$r]=M(v({},Hr[$r]),{answer:Rr.answer}):jn.push(Rr)})}else gn.item&&(jn=Qt(gn.item,ln?.item||[],bt,qt,hn,Jt));bt===gn.linkId&&typeof Tn=="number"&&Tn===Jt&&qt?En.answer=qt:En.answer=ln.answer||[{}],jn&&jn.length>0?En.item=jn:ln.item&&(En.item=ln.item),Ut.push(En)}),bt===gn.linkId&&typeof Tn=="number"&&Tn>=Mt.length)for(let ln=Mt.length;ln<=Tn;ln++){const Jt={linkId:gn.linkId,text:gn.text,answer:ln===Tn&&qt?qt:[{}]};ln===Tn&&hn&&hn.length>0?Jt.item=hn:gn.item&&(Jt.item=Qt(gn.item,[],void 0,void 0,void 0,void 0)),Ut.push(Jt)}return Ut}else if(gn.repeats&&typeof Tn=="number"&&bt===gn.linkId){const Ut=Mt[0]||{linkId:gn.linkId,text:gn.text,answer:[]},ln={linkId:gn.linkId,text:gn.text,answer:[...Ut.answer||[]]};if(qt&&qt.length>0){for(;ln.answer.length<=Tn;)ln.answer.push({});ln.answer[Tn]=qt[0]}return ln}else{const Ut=Mt[0],ln=gn.item?Qt(gn.item,Ut?.item||[],bt,qt,hn,Tn):void 0,Jt=ln&&ln.length>0,En={linkId:gn.linkId,text:gn.text};return bt&&gn.linkId===bt&&typeof Tn!="number"?(qt||!qt&&!hn?En.answer=qt:Ut?.answer&&(En.answer=Ut.answer),hn?En.item=hn:Jt&&(En.item=ln)):(Ut?.answer?En.answer=Ut.answer:En.answer=[{}],Jt&&(En.item=ln)),En}}).filter(Boolean).flat()},zt=(Lt,Et)=>{for(const bt of Lt)if(bt.linkId===Et||bt.item&&zt(bt.item,Et))return bt.linkId;return null},Ke=(Lt,Et,bt,qt)=>{var hn;const Tn=(hn=Lt?.item)!=null?hn:qt;return!Tn||Tn.length===0?!0:Tn.every(zr=>{var zn;const gn=se(Et,zr.linkId);if(gn.length===0){const en=(zn=G(Et,zr.linkId))==null?void 0:zn.answer;if(ae(zr,Et,en)&&be(zr.enableWhen,zr.enableBehavior,Et)&&bt.includes(zr.linkId))return!1}else for(const en of gn)if(ae(zr,Et,en.answer)&&be(zr.enableWhen,zr.enableBehavior,Et)&&bt.includes(zr.linkId))return!1;return zr.item?Ke(zr,Et,bt):!0})},We=(Lt,Et,bt=!0)=>{for(const qt of Lt)if(qt.linkId===Et&&qt.answer&&qt.answer.length>0||qt.item&&qt.item.length>0&&We(qt.item,Et,bt))return!0;return!1},Ct=(Lt,Et,bt=0)=>{const qt=Lt.filter(hn=>hn.linkId===Et);if(qt.length>bt){const hn=qt[bt];if(hn.answer&&hn.answer.length>0)return hn.answer.some(Tn=>Tn&&Object.keys(Tn).length>0&&Object.values(Tn).some(zr=>zr!=null&&zr!==""));if(hn.item&&hn.item.length>0)return We(hn.item,Et,!1)}return We(Lt,Et,!1)},Qe=(Lt,Et)=>{if(!Lt||!Lt.item)return!1;const bt=qt=>{var hn;if(Se(qt)&&qt.required&&be(qt.enableWhen,qt.enableBehavior,Et)){const Tn=G(Et,qt.linkId),zr=ue(qt.extension,qt.type,qt.required,qt.maxLength,Tn?.answer,qt.answerOption);if(!((hn=Tn?.answer)!=null&&hn.length)||zr)return!0}if(qt.item){for(const Tn of qt.item)if(bt(Tn))return!0}return!1};for(const qt of Lt.item)if(bt(qt))return!0;return!1},Ye=Lt=>{var Et,bt,qt;if(Lt.valueString!==void 0)return Lt.valueString;if(Lt.valueBoolean!==void 0)return Lt.valueBoolean;if(Lt.valueInteger!==void 0)return Lt.valueInteger;if(Lt.valueDecimal!==void 0)return Lt.valueDecimal;if(Lt.valueDate!==void 0)return Lt.valueDate;if(Lt.valueDateTime!==void 0)return Lt.valueDateTime;if(((Et=Lt.valueCoding)==null?void 0:Et.code)!==void 0)return Lt.valueCoding.code;if(((bt=Lt.valueReference)==null?void 0:bt.reference)!==void 0)return Lt.valueReference.reference;if(((qt=Lt.valueQuantity)==null?void 0:qt.value)!==void 0)return Lt.valueQuantity.value;if(Lt.valueAttachment!==void 0)return Lt.valueAttachment},It=Lt=>{const Et={linkId:Lt.linkId};if(Lt.answer&&Lt.answer.length>0){const bt=Lt.answer.map(qt=>Ye(qt)).filter(qt=>qt!==void 0);bt.length>0&&(Et.answer=bt)}if(Lt.item&&Lt.item.length>0){const bt=Lt.item.map(qt=>It(qt)).filter(qt=>{const hn=Object.keys(qt);return hn.length>1||hn.length===1&&hn[0]!=="linkId"});bt.length>0&&(Et.item=bt)}return Et},mn=(Lt,Et,bt,qt,hn,Tn)=>{var zr;const zn=(zr=Et?.item)==null?void 0:zr[bt[qt]],gn=zn?.linkId;if(!gn)return!1;const en=se(Lt,gn),Mt=se(hn,gn),Pt=Ut=>{if(Ut!=null){if(Array.isArray(Ut)){const ln=Ut.filter(Jt=>Jt!=null).map(Jt=>Pt(Jt)).filter(Jt=>Jt!==void 0);return ln.length===0||ln.length===1&&typeof ln[0]=="object"&&Object.keys(ln[0]).length===0?void 0:ln}if(typeof Ut=="object"){const ln={};for(const[Jt,En]of Object.entries(Ut))if(En!=null){const jn=Pt(En);jn!==void 0&&(ln[Jt]=jn)}return Object.keys(ln).length===0?void 0:ln}return Ut}};if(en.length!==Mt.length)return!1;for(let Ut=0;Ut<en.length;Ut++){const ln=en[Ut],Jt=Mt[Ut];if(!ln||!Jt)return!1;const En=It(Pt(ln)),jn=It(Pt(Jt));if(!_.isEqual(En,jn))return!1}return qt!==Tn},Sn=(Lt,Et,bt,qt)=>bt&&bt.length>0&&!(bt.length===1&&Object.keys(bt[0]).length===0)&&ae(Lt,Et,bt,qt)||null,et=(Lt,Et,bt)=>{const qt={},hn=Tn=>{Tn.forEach(zr=>{const zn=se(Et,zr.linkId);if(ye(zr,Lt)||zr.repeats)for(let gn=0;gn<zn.length;gn++){const en=zn[gn];if(en?.answer&&en.answer.length>0){const Mt=Sn(zr,Et,en.answer,bt);Mt&&(qt[zr.linkId]=M(v({},qt[zr.linkId]),{[gn]:Mt}))}}else{const gn=G(Et,zr.linkId);if(gn?.answer&&gn.answer.length>0){const en=Sn(zr,Et,gn.answer,bt);en&&(qt[zr.linkId]={0:en})}}zr.item&&zr.item.length>0&&hn(zr.item)})};return hn(Lt),qt},Rt=Lt=>{if(!Lt)return"";const Et=Lt.split("-");if(Et.length===3){const[bt,qt,hn]=Et;return`${bt.slice(-4)}-${qt}-${hn}`}return""},kt=Lt=>Lt.trim().replace(/[A-Za-z]+/g,""),qn=(Lt,Et)=>{const bt=(qt,hn)=>{for(const Tn of qt){if(Tn.linkId===hn)return Tn.answer;if(Tn.item&&Tn.item.length>0){const zr=bt(Tn.item,hn);if(zr!==void 0)return zr}}};return bt(Lt,Et)},Sr=(Lt,Et)=>{if(!Et||Et.length===0)return null;const bt=Lt.linkId,qt=(hn,Tn,zr=[])=>{for(const zn of hn){const gn=[...zr,zn];if(zn.item){if(zn.item.some(Pt=>Pt.linkId===Tn))return gn.some(Pt=>Pt.repeats===!0)?zn:null;if(qt(zn.item,Tn,gn))return zn}}return null};return qt(Et,bt)},pn=(Lt,Et)=>{if(!Et||Et.length===0)return!1;const bt=Lt.linkId,qt=(hn,Tn,zr=[])=>{for(const zn of hn){const gn=[...zr,zn];if(zn.item){if(zn.item.some(Pt=>Pt.linkId===Tn))return gn.some(Pt=>{const Ut=T(Pt.extension||[]);return!!Ut&&Ut!==UI_TOOLKIT_FORM_CONTAINER});if(qt(zn.item,Tn,gn))return!0}}return!1};return qt(Et,bt)},Ln=(Lt,Et,bt)=>{const qt={};if(!Lt)return qt;const{linkId:hn}=Et;if(Lt[hn]){const Tn=Lt[hn];qt[hn]=Tn[bt]||""}return Et.item&&Et.item.length>0&&Et.item.forEach(Tn=>{if(Lt[Tn.linkId]){const zr=Lt[Tn.linkId];qt[Tn.linkId]=zr[bt]||""}}),qt},mr=(Lt,Et)=>{const bt={};if(!Lt||!Lt[Et])return bt;const qt=Lt[Et];return bt[Et]=qt[0]||"",bt},Bn=Lt=>{const Et=Lt.findIndex(Tn=>!Se(Tn)),bt=Et>=0?[Et]:[],qt=new Map;let hn=null;if(Lt.forEach((Tn,zr)=>{const zn=xe(Tn);if(zn&&Tn.type==="group")zr!==Et&&bt.push(zr),qt.set(zr,[zr]),hn=zr;else if(hn!==null&&!zn){const gn=qt.get(hn)||[];qt.set(hn,[...gn,zr])}}),Lt.length>0&&bt.length>0){const Tn=bt[0];if(!qt.has(Tn)){const zr=bt.find(gn=>gn>Tn),zn=[];for(let gn=Tn;gn<(zr??Lt.length);gn++)zn.push(gn);qt.set(Tn,zn)}}return{groupIndices:bt,itemsToRenderMap:qt}},Xr=(Lt,Et,bt,qt)=>{let hn=[...qt];const Tn=(zr,zn)=>{zr.forEach(gn=>{if((!gn?.enableWhen||be(gn?.enableWhen,gn.enableBehavior,zn))&&gn.initial&&!We(zn,gn.linkId))if(gn.repeats){const en=zn.filter(Mt=>Mt.linkId===gn.linkId);en.length>0?en.forEach((Mt,Pt)=>{Ct(zn,gn.linkId,Pt)||(hn=Qt(bt,hn,gn.linkId,gn.initial,void 0,Pt))}):hn=Qt(bt,hn,gn.linkId,gn.initial)}else hn=Qt(bt,hn,gn.linkId,gn.initial);gn.item&&Tn(gn.item,zn)})};return Tn(Lt,Et),hn},Yr=(Lt,Et,bt)=>{if(!Lt)return[];const qt=[],hn=Tn=>{Tn.required===Et&&be(Tn.enableWhen,Tn.enableBehavior,bt)&&!Se(Tn)&&Tn.type!=="display"&&qt.push(Tn),Tn.item&&Tn.item.length>0&&Tn.item.forEach(hn)};return Lt.forEach(hn),qt},Nt=(Lt,Et)=>Lt.every(bt=>{var qt;const hn=se(Et,bt.linkId);if(hn.length>0)return hn.every(Tn=>!ae(bt,Et,Tn.answer));{const Tn=(qt=G(Et,bt.linkId))==null?void 0:qt.answer;return!ae(bt,Et,Tn)}}),Fe=(Lt,Et)=>{let bt=-1;for(let qt=Lt.length-1;qt>=0;qt--)if(Lt[qt].linkId===Et){bt=qt;break}return bt},ot=(Lt,Et)=>Lt.filter(bt=>bt.linkId!==Et).map(bt=>bt.item&&bt.item.length>0?M(v({},bt),{item:ot(bt.item,Et)}):bt),Je=(Lt,Et,bt=Lt)=>Lt.reduce((qt,hn)=>{const Tn=Ee(Et,hn.linkId);return Tn?.enableWhen&&!be(Tn.enableWhen,Tn.enableBehavior,bt)||(hn.item&&hn.item.length>0?qt.push(M(v({},hn),{item:Je(hn.item,Et,bt)})):qt.push(hn)),qt},[]),tt=(Lt,Et,bt=[])=>{const qt=[],hn=Tn=>{Tn.forEach(zr=>{qt.push(zr.linkId),zr.item&&zr.item.length>0&&hn(zr.item)})};for(let Tn=0;Tn<Lt.length;Tn++){const zr=Lt[Tn];if(zr.linkId===Et){const zn=Lt.slice(0,Tn+1),gn=Lt.slice(Tn+1),{kept:en,removed:Mt}=gn.reduce((Pt,Ut)=>{const ln=Ee(bt,Ut.linkId);return!ln||Se(ln)&&be(ln.enableWhen,ln.enableBehavior,zn)?Pt.kept.push(Ut):Pt.removed.push(Ut),Pt},{kept:[],removed:[]});return hn(Mt),{trimmedData:[...zn,...en],trimmedLinkIds:qt,found:!0}}if(zr.item&&zr.item.length>0){const zn=tt(zr.item,Et,bt);if(zn.found){const gn=Lt.slice(0,Tn),en=Lt.slice(Tn+1),Mt=[...gn,M(v({},zr),{item:zn.trimmedData})],{kept:Pt,removed:Ut}=en.reduce((ln,Jt)=>{const En=Ee(bt,Jt.linkId);return!En||Se(En)&&be(En.enableWhen,En.enableBehavior,Mt)?ln.kept.push(Jt):ln.removed.push(Jt),ln},{kept:[],removed:[]});return hn(Ut),{trimmedData:[...Mt,...Pt],trimmedLinkIds:[...zn.trimmedLinkIds,...qt],found:!0}}}}return{trimmedData:Lt,trimmedLinkIds:[],found:!1}},rt=(Lt,Et)=>Lt.filter(bt=>!Et.includes(bt.linkId)).map(bt=>bt.item&&bt.item.length>0?M(v({},bt),{item:rt(bt.item,Et)}):bt),lt=Lt=>{var Et;if(!Lt)return"empty";const bt=A.Z$.find(({patterns:qt})=>qt.some(hn=>Lt.includes(hn)));return(Et=bt?.type)!=null?Et:"empty"},St=(Lt,Et)=>{const{groupIndices:bt}=Bn(Lt),qt=Lt.findIndex(hn=>hn.linkId===Et);return qt!==-1?bt.indexOf(qt):-1},st=Lt=>{if(!Lt)return{restriction:null,warning:null};const Et=bt=>{const qt=Lt.find(Tn=>Tn.url===bt&&Tn.valueString);if(!qt?.valueString)return null;const hn=qt.valueString.replace(/\\n/g,`
869
+ `}}customElements.get(ve)===void 0&&customElements.define(ve,Ee);const De=[{name:"loader",defaultElement:document.createElement(re)},{name:"error",defaultElement:document.createElement(ve)}],Se=["error","loading"],Ie={error:"error",loading:"loader"},xe=({src:Ot,elementNameSuffix:Dt,version:Qt,prefetchFeatureApp:zt})=>(0,p.__awaiter)(void 0,void 0,void 0,function*(){var Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;window.bwell||(window.bwell=new ue({metadata:{version:Qt}}));const mr=`bwell-${Dt}`;if(customElements.get(mr)!==void 0)return;class Bn extends h{constructor(){super(),Ke.add(this),We.set(this,(0,z.nanoid)()),Ct.set(this,void 0),Qe.set(this,document.createElement("feature-app-loader")),Ye.set(this,new q.EventEmitter),It.set(this,void 0),mn.set(this,void 0),Sn.set(this,void 0),et.set(this,void 0),Rt.set(this,void 0),kt.set(this,void 0),this.attachShadow({mode:"open"});const Yr=new pe(De).attachToShadowRoot(this.shadowRoot);Yr.addEventListener("visibilitychange",({visibility:Nt,container:Fe,name:ot})=>{ot==="error"&&Nt==="visible"&&window.bwell._registerEmbeddableContent(Fe),(0,p.__classPrivateFieldGet)(this,Qe,"f").style.display=Nt==="hidden"?"unset":"hidden"}),(0,p.__classPrivateFieldSet)(this,kt,{slots:Yr,attributes:new V().bindTo(this),loaderEventEmitter:(0,p.__classPrivateFieldGet)(this,Ye,"f")},"f"),(0,p.__classPrivateFieldSet)(this,It,(0,p.__classPrivateFieldGet)(this,Ke,"m",qn).bind(this),"f"),(0,p.__classPrivateFieldSet)(this,mn,(0,p.__classPrivateFieldGet)(this,Ke,"m",Sr).bind(this),"f"),(0,p.__classPrivateFieldSet)(this,Sn,(0,p.__classPrivateFieldGet)(this,Ke,"m",Ln).call(this,"error"),"f"),(0,p.__classPrivateFieldSet)(this,et,(0,p.__classPrivateFieldGet)(this,Ke,"m",Ln).call(this,"loading"),"f")}connectedCallback(){return(0,p.__awaiter)(this,void 0,void 0,function*(){(0,p.__classPrivateFieldGet)(this,Sn,"f").call(this,(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get("error")),(0,p.__classPrivateFieldGet)(this,et,"f").call(this,(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get("loading")),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.addEventListener("visibilitychange",(0,p.__classPrivateFieldGet)(this,mn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.addChangeListener("error",(0,p.__classPrivateFieldGet)(this,Sn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.addChangeListener("loading",(0,p.__classPrivateFieldGet)(this,et,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("loader");try{yield window.bwell.validateLoad()}catch{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}(0,p.__classPrivateFieldSet)(this,We,this.id||(0,p.__classPrivateFieldGet)(this,We,"f"),"f"),(0,p.__classPrivateFieldSet)(this,Ct,new T((0,p.__classPrivateFieldGet)(this,We,"f")),"f"),(0,p.__classPrivateFieldGet)(this,Ct,"f").registerDispatcher(Yr=>this.dispatchEvent(Yr)),window.bwell.isInitialized?(0,p.__classPrivateFieldGet)(this,It,"f").call(this):(window.bwell.once("initialized",(0,p.__classPrivateFieldGet)(this,It,"f")),window.bwell.once("error",()=>{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}),zt&&(0,b.h)(Ot).catch(()=>{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}))})}disconnectedCallback(){var Yr;(0,p.__classPrivateFieldGet)(this,Ye,"f").emit("disconnect"),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.removeEventListener("visibilitychange",(0,p.__classPrivateFieldGet)(this,mn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.removeChangeListener("error",(0,p.__classPrivateFieldGet)(this,Sn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.removeChangeListener("loading",(0,p.__classPrivateFieldGet)(this,et,"f")),(Yr=(0,p.__classPrivateFieldGet)(this,Ct,"f"))===null||Yr===void 0||Yr.deregister(),(0,p.__classPrivateFieldGet)(this,Ye,"f").removeAllListeners()}}We=new WeakMap,Ct=new WeakMap,Qe=new WeakMap,Ye=new WeakMap,It=new WeakMap,mn=new WeakMap,Sn=new WeakMap,et=new WeakMap,Rt=new WeakMap,kt=new WeakMap,Ke=new WeakSet,qn=function(){(0,p.__classPrivateFieldGet)(this,Qe,"f").setAttribute("featureAppId",`bwell-embeddable:${mr}`),(0,p.__classPrivateFieldGet)(this,Qe,"f").setAttribute("src",Ot),(0,p.__classPrivateFieldGet)(this,Qe,"f").config={id:(0,p.__classPrivateFieldGet)(this,We,"f"),name:Dt,elementName:mr,utils:(0,p.__classPrivateFieldGet)(this,kt,"f")},this.shadowRoot.appendChild((0,p.__classPrivateFieldGet)(this,Qe,"f"))},Sr=function({visibility:Yr,name:Nt}){(0,p.__classPrivateFieldGet)(this,Qe,"f").style.display=Yr==="hidden"?"unset":"hidden"},pn=function(Yr){(0,p.__classPrivateFieldGet)(this,Rt,"f")(),(0,p.__classPrivateFieldSet)(this,Rt,void 0,"f")},Ln=function(Yr){return Nt=>{const Fe=Se.findIndex(Je=>Je===Yr);if(!Se.slice(0,Fe).some(Je=>(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get(Je)!==null)){if(Nt!==null)(0,p.__classPrivateFieldGet)(this,Rt,"f")&&(0,p.__classPrivateFieldGet)(this,Ke,"m",pn).call(this,Yr),(0,p.__classPrivateFieldSet)(this,Rt,(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlotLocked(Ie[Yr]),"f");else if(Nt===null&&(0,p.__classPrivateFieldGet)(this,Rt,"f")){(0,p.__classPrivateFieldGet)(this,Ke,"m",pn).call(this,Yr);const Je=Se.find(tt=>(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get(tt)!==null);Je&&(0,p.__classPrivateFieldSet)(this,Rt,(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlotLocked(Ie[Je]),"f")}}}},customElements.define(mr,Bn)}),$e={rE:"1.1154.0"},it="composite";var vt=e(67321);xe({src:`https://embeddables.prod.icanbwell.com/${it}/${$e.rE}/scripts/embeddable.federated.js`,elementNameSuffix:it,version:$e.rE,prefetchFeatureApp:!0})},79566:(Y,l,e)=>{"use strict";var n=e(31085),t=e(94043),r=e(45250),s=e(35473),o=e(25624),i=Object.defineProperty,a=Object.defineProperties,g=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,A=(b,h,f)=>h in b?i(b,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):b[h]=f,m=(b,h)=>{for(var f in h||(h={}))u.call(h,f)&&A(b,f,h[f]);if(c)for(var f of c(h))E.call(h,f)&&A(b,f,h[f]);return b},d=(b,h)=>a(b,g(h));const O=(b,h,f)=>{const v=_.cloneDeep(b);if(!v.contained||h<0)return v;const M=v.contained.findIndex(x=>x.resourceType==="Questionnaire");if(M!==-1&&!f){const x=v.contained[M];if(x.item){if(!x.item.some(y=>isPageExtensionPresent(y)))return v;let z=0,S=x.item.length;for(let y=0;y<x.item.length;y++){const C=x.item[y];if(isPageExtensionPresent(C)){if(z===h+1){S=y;break}z++}}x.item=x.item.slice(0,S),v.contained[M]=x}}else f&&M!==-1&&(v.contained[M]=d(m({},v.contained[M]),{item:f}));return v},p=({formId:b,questionnaireResponse:h,showQuestionPrefix:f,nextQuestion:v,onGoBack:M,handleHiddenQuestion:x,errorConfig:T,onClearError:z,customErrorConfigurations:S,showStepper:y,hideBackButton:C,onFormDataChange:R,externalComponentRenderMap:P,className:L,children:D})=>{var w,N,V;const{currentGroupIndex:q,hasCustomError:I}=useFHIRQuestionnaire(),k=(w=h.questionnaire)==null?void 0:w.replace("#",""),U=(N=h?.contained)==null?void 0:N.find(K=>K.id===k&&K.resourceType==="Questionnaire"),F=(K,G,se)=>{let oe=_.cloneDeep(h);oe.item=K,oe=trimQuestionnaireItems(oe,q,se),v(oe,G)};return jsx("div",{className:cx(`${I?"mb-3":"mb-8"} flex w-full flex-col gap-8`,L),children:jsx(FHIRQuestionnaire,{formId:b,onFormDataChange:R,questionnaireResponseItem:(V=h?.item)!=null?V:[],questionnaireSchema:U,status:h.status,showQuestionPrefix:f,errorConfig:T,customErrorConfigurations:S,isAdaptiveFlow:!0,onComplete:F,onGoBack:M,onClearError:z,handleHiddenQuestion:x,showStepper:y,hideBackButton:C,externalComponentRenderMap:P,children:D})})}},19622:(Y,l,e)=>{"use strict";e.d(l,{K:()=>v});var n=e(31085),t=e(14041),r=e(94043),s=e(76323),o=e(36087),i=e(56192),a=e(76808),g=e(66267),c=Object.defineProperty,u=Object.defineProperties,E=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,O=(M,x,T)=>x in M?c(M,x,{enumerable:!0,configurable:!0,writable:!0,value:T}):M[x]=T,p=(M,x)=>{for(var T in x||(x={}))m.call(x,T)&&O(M,T,x[T]);if(A)for(var T of A(x))d.call(x,T)&&O(M,T,x[T]);return M},b=(M,x)=>u(M,E(x)),h=(M,x,T)=>new Promise((z,S)=>{var y=P=>{try{R(T.next(P))}catch(L){S(L)}},C=P=>{try{R(T.throw(P))}catch(L){S(L)}},R=P=>P.done?z(P.value):Promise.resolve(P.value).then(y,C);R((T=T.apply(M,x)).next())});const f=10,v=({id:M="location-filter-desktop",initialValue:x,onInputChange:T,onValueChange:z,isDisabled:S=!1,className:y="",setIsLoading:C,errorText:R})=>{const P=(0,a.Ul)(),{i18n:{t:L},loading:D}=(0,g.E_)({keys:["shared-translations"]}),w=x?.placeId,N=x?.description,[V,q]=(0,t.useState)(""),[I,k]=(0,t.useState)(""),[U,F]=(0,t.useState)(null),[K,G]=(0,t.useState)(null),[se,oe]=(0,t.useState)(!1),te=(0,t.useRef)(!1),pe=[{id:"placeholder",label:"No Locations",isDisabled:!0}],[be,ze]=(0,t.useState)(pe),[ge,ne]=(0,t.useState)(pe),[ae,{loading:me,error:he}]=(0,i.Ncb)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch geocode data")}}),[de,{loading:ue,error:re}]=(0,i.qtq)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch geocode by lat/lon data")}}),[J,{loading:ve,error:Ee}]=(0,i.zUC)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch place autocomplete data"),ze(pe)},onCompleted:Qt=>{var zt,Ke;const We=(Ke=(zt=Qt.placeAutocomplete)==null?void 0:zt.predictions)==null?void 0:Ke.map(Ct=>{var Qe;return{id:Ct.placeId,label:(0,s.removeAfterLastComma)(Ct.description),mainText:Ct?.mainText||((Qe=Ct.description.split(",")[0])==null?void 0:Qe.trim()),secondaryText:(0,s.removeAfterLastComma)(Ct?.secondaryText||Ct.description.split(",").slice(1).join(",").trim())}});ze(We?.length?We:pe)}}),De=(0,t.useMemo)(()=>be.map(Qt=>b(p({},Qt),{displayLabel:(0,r.RZ)(Qt?.label||"",V)})),[V,be]),Se=Qt=>h(void 0,null,function*(){var zt,Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;if(F(Qt),G(Qt),oe(!1),Qt&&typeof Qt=="string"){const mr=be.find(tt=>tt.id===Qt),Bn=mr?.label||V;if(!mr)return;q(Bn),k(Bn),setTimeout(()=>{const tt=[{id:mr.id,label:mr.label}];ze(tt),ne(tt)},f);const Xr=yield ae({variables:{placeId:Qt}}),Yr=(Ke=(zt=Xr?.data)==null?void 0:zt.geocodingByPlaceId)==null?void 0:Ke.latitude,Nt=(Ct=(We=Xr?.data)==null?void 0:We.geocodingByPlaceId)==null?void 0:Ct.longitude,Fe=((Ye=(Qe=Xr?.data)==null?void 0:Qe.geocodingByPlaceId)==null?void 0:Ye.zipCode)||"",ot=((mn=(It=Xr?.data)==null?void 0:It.geocodingByPlaceId)==null?void 0:mn.state)||"",Je=((et=(Sn=Xr?.data)==null?void 0:Sn.geocodingByPlaceId)==null?void 0:et.stateCode)||"";if(Yr&&Nt)if(!Fe||!Je){const tt=yield de({variables:{latitude:String(Yr),longitude:String(Nt)}}),rt=((kt=(Rt=tt?.data)==null?void 0:Rt.geocodingByLatLon)==null?void 0:kt.zipCode)||"",lt=((Sr=(qn=tt?.data)==null?void 0:qn.geocodingByLatLon)==null?void 0:Sr.state)||"",St=((Ln=(pn=tt?.data)==null?void 0:pn.geocodingByLatLon)==null?void 0:Ln.stateCode)||"";z({latitude:Yr,longitude:Nt,zipCode:rt,state:lt,stateCode:St,placeId:Qt,description:Bn,value:Qt})}else z({latitude:Yr,longitude:Nt,zipCode:Fe,state:ot,stateCode:Je,placeId:Qt,description:Bn,value:Qt});else oe(!0)}}),Ie=()=>!0,xe=(0,s.useDebounce)(Qt=>h(void 0,null,function*(){return yield J({variables:{input:Qt,types:"geocode"}})})),$e=Qt=>h(void 0,null,function*(){if(oe(!1),q(Qt),T?.(Qt),!Qt||Qt.trim().length===0){F(null),ze(pe),z({latitude:0,longitude:0,zipCode:"",state:"",stateCode:"",placeId:"",description:"",value:Qt});return}const zt=Qt.trim();zt.length>=2?yield xe(zt):ze(pe)}),it=Qt=>{te.current=Qt},vt=()=>{q(I),ze(ge),F(K)};(0,t.useEffect)(()=>{(()=>h(void 0,null,function*(){var zt,Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;if(w&&N){ze([{id:w,label:V||N}]),ne([{id:w,label:V||N}]),F(w),G(w),q(N),k(N),N===V&&q(N);const mr=yield ae({variables:{placeId:w}}),Bn=(Ke=(zt=mr?.data)==null?void 0:zt.geocodingByPlaceId)==null?void 0:Ke.latitude,Xr=(Ct=(We=mr?.data)==null?void 0:We.geocodingByPlaceId)==null?void 0:Ct.longitude,Yr=((Ye=(Qe=mr?.data)==null?void 0:Qe.geocodingByPlaceId)==null?void 0:Ye.zipCode)||"",Nt=((mn=(It=mr?.data)==null?void 0:It.geocodingByPlaceId)==null?void 0:mn.state)||"",Fe=((et=(Sn=mr?.data)==null?void 0:Sn.geocodingByPlaceId)==null?void 0:et.stateCode)||"";if(Bn&&Xr)if(!Yr||!Nt||!Fe){const ot=yield de({variables:{latitude:String(Bn),longitude:String(Xr)}}),Je=((kt=(Rt=ot?.data)==null?void 0:Rt.geocodingByLatLon)==null?void 0:kt.zipCode)||"",tt=((Sr=(qn=ot?.data)==null?void 0:qn.geocodingByLatLon)==null?void 0:Sr.state)||"",rt=((Ln=(pn=ot?.data)==null?void 0:pn.geocodingByLatLon)==null?void 0:Ln.stateCode)||"";z({latitude:Bn,longitude:Xr,zipCode:Je,state:tt,stateCode:rt,placeId:w,description:N,value:w})}else z({latitude:Bn,longitude:Xr,zipCode:Yr,state:Nt,stateCode:Fe,placeId:w,description:N,value:w})}else F(null),G(null),q(""),k(""),ze(pe),ne(pe)}))()},[]);const Ot=se||!!he||!!re||!!Ee||!!R,Dt=Ot?R||L("ADDRESS_TYPEAHEAD_ERROR"):"";return(0,t.useEffect)(()=>{C&&C(me||ue||D)},[C,me,ue,D]),(0,n.jsx)("div",{className:y,children:(0,n.jsx)(o.Select.ComboBox,{id:M,size:"md",isDisabled:S,inputValue:V,isLoading:ve||me||ue,placeholder:L("ADDRESS_AUTO_COMPLETE_PLACEHOLDER"),items:De,selectedKey:U,onSelectionChange:Se,onInputChange:$e,defaultFilter:Ie,onOpenChange:it,onBlur:vt,isInvalid:Ot,hint:Dt,autoComplete:"address-line1",className:"w-full",children:Qt=>{const zt=Qt,Ke=V.trim().length>=2,We=zt.mainText||"",Ct=zt.secondaryText||"",Qe=We.trim().length>0,Ye=Ct.trim().length>0,It=Qe?(0,r.RZ)(We,V):{beforePart:"",highlightedPart:"",remainingPart:""},mn=Ye?(0,r.RZ)(Ct,V):{beforePart:"",highlightedPart:"",remainingPart:""};return(0,n.jsx)(o.Select.Item,{id:zt.id,supportingText:zt.supportingText,isDisabled:zt.isDisabled,icon:zt.icon,avatarUrl:zt.avatarUrl,textValue:zt.label,children:Ke&&Qe?(0,n.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,n.jsxs)("div",{className:"truncate text-sm font-medium",children:[(0,n.jsx)("span",{children:It.beforePart}),(0,n.jsx)("span",{className:"text-brand-primary font-semibold",children:It.highlightedPart}),(0,n.jsx)("span",{children:It.remainingPart})]}),Ye&&(0,n.jsxs)("div",{className:"truncate text-xs text-gray-600",children:[(0,n.jsx)("span",{children:mn.beforePart}),(0,n.jsx)("span",{className:"text-brand-primary font-semibold",children:mn.highlightedPart}),(0,n.jsx)("span",{children:mn.remainingPart})]})]}):(0,n.jsx)("div",{className:"truncate",children:zt.label})})}})})}},18077:()=>{},12200:(Y,l,e)=>{"use strict";e.d(l,{AddressTypeahead:()=>n.K});var n=e(19622),t=e(18077),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"DeviceLocationProvider")&&e.d(l,{DeviceLocationProvider:function(){return t.DeviceLocationProvider}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useDeviceLocationContext")&&e.d(l,{useDeviceLocationContext:function(){return t.useDeviceLocationContext}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}})},52113:(Y,l,e)=>{"use strict";var n=e(31085),t=e(36087),r=e(87896);const s=({icon:o,title:i})=>{const{isSmallScreen:a}=useDeviceDetection();return jsx("div",{className:`tw-preflight mb-5 flex justify-center ${a?"-mx-5 -mt-5":""}`,children:jsxs("div",{className:`max-w bg-utility-blue-50 border-utility-blue-200 flex h-12 w-full flex-row items-center gap-3 border-t border-b pl-5 ${a?"":"rounded-lg border-r border-l"}`,children:[o??jsx(FileSearch02,{size:20}),jsxs(Typography,{className:"text-md text-primary font-normal",tag:"h3",children:[i,jsx("span",{className:"animate-pulse",children:"..."})]})]})})}},87858:(Y,l,e)=>{"use strict";var n=e(31085),t=e(36087),r=e(66267),s=e(64081),o=e(52449);const i=({className:a})=>{const{pathname:g}=useLocation(),c=useNavigationService(),u=useBreadcrumbsConfig(),{overrides:E}=useBreadcrumbsOverrideContext(),{loading:A,i18n:{t:m}}=useI18nChild({keys:["shared"]}),d=getPathSegments(g).flatMap(O=>{const p=c.getId(O),b=c.getRouteMeta(p)||{},h=getBreadcrumbTitleKey(p,b,u);if(!h||b.breadcrumbHide)return[];const f=E[p];let v=c.getHref(p),M=h;return f&&(f.href?v=f.href:f.search&&(v=c.getHref({id:p,search:f.search})),f.titleKey&&(M=f.titleKey)),[{routeId:p,href:v,label:m(M),onClick:f?.onClick}]});return A||d.length<=1?null:jsx(BreadcrumbsBase,{type:"button",className:cx("tw-preflight hidden lg:block",a),children:d.map(O=>jsx(BreadcrumbsBase.Item,{href:O.href,onClick:O.onClick,children:O.label},O.routeId))})}},85449:(Y,l,e)=>{"use strict";e.d(l,{rJ:()=>y,GU:()=>S});var n=e(31085),t=e(14041),r=e(76323),s=e(78579),o=e(76808),i=e(5380),a=e(87896),g=e(26877);const c=(C,R)=>new Promise((P,L)=>setTimeout(()=>L(new Error(R)),C)),u=(C,R,P)=>Promise.race([C,c(R,P)]),E=5e3,A=1e4;var m=Object.defineProperty,d=Object.defineProperties,O=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=(C,R,P)=>R in C?m(C,R,{enumerable:!0,configurable:!0,writable:!0,value:P}):C[R]=P,v=(C,R)=>{for(var P in R||(R={}))b.call(R,P)&&f(C,P,R[P]);if(p)for(var P of p(R))h.call(R,P)&&f(C,P,R[P]);return C},M=(C,R)=>d(C,O(R)),x=(C,R,P)=>new Promise((L,D)=>{var w=q=>{try{V(P.next(q))}catch(I){D(I)}},N=q=>{try{V(P.throw(q))}catch(I){D(I)}},V=q=>q.done?L(q.value):Promise.resolve(q.value).then(w,N);V((P=P.apply(C,R)).next())});const T={enableHighAccuracy:!0,maximumAge:3e4,timeout:15e3},z=(0,t.createContext)({loading:!1,overrideSearchSettings:()=>Promise.resolve(),locationPermission:void 0,setLocationPermission:()=>{},position:void 0,refreshPosition:()=>Promise.resolve(void 0),requestPosition:()=>Promise.resolve(void 0),requestCurrentLocation:()=>Promise.resolve(),checkLocaitonPermission:()=>Promise.resolve(void 0)}),S=()=>(0,t.useContext)(z),y=({children:C})=>{var R;const{mobileOS:P}=(0,r.useDeviceDetection)(),L=(0,o.Ul)(),{geolocation:D}=(0,s.c)(),{queryParams:w,setQueryParams:N}=(0,a.useSearchQueryParams)(),V=(0,t.useRef)(!1),q=(0,t.useRef)(w);(0,t.useEffect)(()=>{q.current=w},[w]);const[I,k]=(0,t.useState)(!1),[U,F]=(0,t.useState)((R=w.locationPermission)!=null?R:void 0),[K,G]=(0,t.useState)(),[se,oe]=(0,t.useState)(!1),te=(0,t.useCallback)(ve=>{F(ve);try{N(M(v({},q.current),{locationPermission:ve||i.Ef.UNAVAILABLE}))}catch(Ee){Ee instanceof Error?L?.error(Ee,"Failed to update query params"):L?.error(`Failed to update query params - ${JSON.stringify(Ee)}`)}},[N,L]),pe=(0,t.useCallback)(()=>x(void 0,null,function*(){try{return yield D.isAvailable()}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking geolocation availability"):L?.error(`Error checking geolocation availability - ${JSON.stringify(ve)}`),!1}}),[D,L]),be=(0,t.useCallback)(ve=>x(void 0,null,function*(){const Ee=D.getCurrentPosition(ve).then(De=>{if(!De||!De.coords)throw new Error("Location data is invalid or unavailable");return De});try{return yield u(Ee,E,"Location request timed out. Please check that location services are enabled.")}catch(De){throw De instanceof Error&&L?.error(De,"Geolocation timeout or error"),De}}),[D,L]),ze=(0,t.useCallback)(()=>x(void 0,null,function*(){return u(D.checkPermission(),E,"Check permission timed out")}),[D]),ge=(0,t.useCallback)(()=>x(void 0,null,function*(){return u(D.requestPermission(),A,"Permission request timed out - user did not respond to permission dialog")}),[D]),ne=(0,t.useCallback)(()=>x(void 0,null,function*(){try{if(!(yield pe()))return L?.error("Location services not available"),!1;const Ee=yield ze();return Ee!==i.Ef.GRANTED&&Ee!==i.Ef.PROMPT?(L?.error(`Location permission not granted: ${Ee}`),!1):!0}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking location services"):L?.error(`Error checking location services - ${JSON.stringify(ve)}`),!1}}),[pe,L,ze]);(0,t.useEffect)(()=>{if(V.current)return;V.current=!0,(()=>x(void 0,null,function*(){const Ee=w.locationPermission;if(Ee===i.Ef.DENIED||Ee===i.Ef.BLOCKED||Ee===i.Ef.UNAVAILABLE){F(Ee);return}k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}if(Ee===i.Ef.GRANTED){try{const Ie=yield ze();if(Ie===i.Ef.GRANTED){const xe=yield be(T);xe&&(G(xe),te(i.Ef.GRANTED))}else Ie===i.Ef.PROMPT?(te(Ie),oe(!0)):te(Ie)}catch(Ie){Ie instanceof Error?L?.error(Ie,"Error getting initial location with granted permission"):L?.error(`Error getting initial location with granted permission - ${JSON.stringify(Ie)}`),te(i.Ef.UNAVAILABLE)}return}const Se=yield ze();if(te(Se),Se===i.Ef.GRANTED)try{const Ie=yield be(T);Ie?G(Ie):te(i.Ef.UNAVAILABLE)}catch(Ie){Ie instanceof Error?L?.error(Ie,"Error getting initial location"):L?.error(`Error getting initial location - ${JSON.stringify(Ie)}`),te(i.Ef.UNAVAILABLE)}else Se===i.Ef.PROMPT&&oe(!0)}catch(De){De instanceof Error?L?.error(De,"Error initializing location permission"):L?.error(`Error initializing location permission - ${JSON.stringify(De)}`),te(i.Ef.UNAVAILABLE)}finally{k(!1)}}))()},[]);const ae=(0,t.useCallback)(()=>x(void 0,null,function*(){try{if(!(yield ne())){te(i.Ef.UNAVAILABLE);return}k(!0);let Ee=yield ze();if(te(Ee),Ee===i.Ef.GRANTED||Ee===i.Ef.PROMPT){if(P==="Android"&&Ee===i.Ef.GRANTED)try{Ee=yield ge(),te(Ee)}catch(De){De instanceof Error?L?.error(De,"Error re-requesting Android permission"):L?.error(`Error re-requesting Android permission - ${JSON.stringify(De)}`);return}if(Ee!==i.Ef.UNAVAILABLE){const De=yield be(T);return G(De),De}}return}catch(ve){te(i.Ef.UNAVAILABLE),ve instanceof Error?L?.error(ve,"Error refreshing location"):L?.error(`Error refreshing location - ${JSON.stringify(ve)}`);return}finally{k(!1)}}),[ne,L,P,te,be,ze,ge]),me=(0,t.useCallback)(()=>x(void 0,null,function*(){try{return(yield pe())?yield ze():i.Ef.UNAVAILABLE}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking location permission"):L?.error(`Error checking location permission - ${JSON.stringify(ve)}`),i.Ef.UNAVAILABLE}}),[pe,L,ze]),he=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield ze();te(Ee)}catch(ve){ve instanceof Error?L?.error(ve,"Error checking and setting location permission"):L?.error(`Error checking and setting location permission - ${JSON.stringify(ve)}`),te(i.Ef.UNAVAILABLE)}finally{k(!1)}}),[pe,L,te,ze]),de=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield ze();if(Ee===i.Ef.DENIED||Ee===i.Ef.BLOCKED||Ee===i.Ef.UNAVAILABLE){te(Ee);return}const De=yield ge();if(te(De),["granted","prompt"].includes(De)){const Se=yield be(T);return G(Se),Se}return}catch(ve){if(ve instanceof Error)ve.message.includes("User denied Geolocation")||L?.error(ve,"Error requesting location");else{const Ee=ve&&typeof ve=="object"&&"message"in ve?ve.message:JSON.stringify(ve);Ee?.includes("User denied Geolocation")||L?.error(`Error requesting location - ${Ee}`)}te(i.Ef.UNAVAILABLE);return}finally{k(!1)}}),[pe,L,te,be,ge,ze]),ue=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield be(T);Ee&&(G(Ee),F(i.Ef.GRANTED),N(M(v({},q.current),{location:`${Ee.coords.latitude},${Ee.coords.longitude}`,locationType:i.iF.CURRENT_LOCATION,lat:`${Ee.coords.latitude}`,lng:`${Ee.coords.longitude}`,locationPermission:i.Ef.GRANTED})))}catch(ve){throw ve instanceof Error?L?.error(ve,"Error requesting current location"):L?.error(`Error requesting current location - ${JSON.stringify(ve)}`),te(i.Ef.UNAVAILABLE),ve}finally{k(!1)}}),[pe,L,N,te,be]),re=(0,t.useCallback)(()=>x(void 0,null,function*(){try{k(!0);const ve=yield ae();ve&&N(M(v({},q.current),{location:`${ve.coords.latitude},${ve.coords.longitude}`,locationType:i.iF.CURRENT_LOCATION,lat:`${ve.coords.latitude}`,lng:`${ve.coords.longitude}`,locationPermission:U||i.Ef.UNAVAILABLE}))}catch(ve){ve instanceof Error?L?.error(ve,"Error overriding search settings"):L?.error(`Error overriding search settings - ${JSON.stringify(ve)}`)}finally{k(!1)}}),[L,U,ae,N]),J=(0,t.useMemo)(()=>({loading:I,overrideSearchSettings:re,locationPermission:U,setLocationPermission:F,position:K,refreshPosition:ae,requestPosition:de,requestCurrentLocation:ue,checkAndSetLocationPermission:he,checkLocaitonPermission:me}),[I,re,U,K,ae,de,ue,he,me]);return(0,n.jsxs)(z.Provider,{value:J,children:[se&&(0,n.jsx)(g.J,{isOpen:se,onClose:()=>oe(!1),title:"Find results nearby",description:"Enable location services to see results near you. We'll only use your location while you're searching."}),C]})}},82825:(Y,l,e)=>{"use strict";e.d(l,{GU:()=>n.GU,rJ:()=>n.rJ});var n=e(85449)},1053:(Y,l,e)=>{"use strict";e.d(l,{pc:()=>lt,GI:()=>be,rz:()=>et,Fp:()=>Sn,el:()=>mn,ao:()=>It,oA:()=>D,Yt:()=>St,g4:()=>Ye,tn:()=>Ue,n4:()=>w,gD:()=>L,Vp:()=>tt,Cx:()=>k,bK:()=>q,gi:()=>rt,Z$:()=>he,GT:()=>Je,hr:()=>de,JL:()=>ue,Ck:()=>I,dU:()=>V,wG:()=>mr,hZ:()=>pn,$e:()=>Rt,qT:()=>Sr,GQ:()=>qn,q3:()=>Ln,D_:()=>kt,Uf:()=>F,_l:()=>ge,Md:()=>se,V7:()=>G,fe:()=>ae,JP:()=>At,Z_:()=>N,zO:()=>me,UZ:()=>te,$7:()=>Ke,rb:()=>K,_W:()=>Ct,WS:()=>We,VF:()=>Fe,vf:()=>Xr,PV:()=>ot,PS:()=>Bn,Iz:()=>Nt,zD:()=>oe,m3:()=>Ot,XP:()=>Dt,PM:()=>De,cX:()=>re,G6:()=>J,Us:()=>Ie,AA:()=>Ee,G0:()=>vt,mO:()=>$e,HH:()=>Se,PU:()=>ye,it:()=>zt,Tl:()=>it,uH:()=>Qt,c3:()=>ve,rx:()=>P});var n=e(36087),t=e(14041);const r=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21m14-3 2 2 4-4m-7.5-8.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));r.displayName="UserCheck01";const s=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 21v-1.2c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C13.72 15 12.88 15 11.2 15H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 17.28 2 18.12 2 19.8V21M16 6l2 2 4-4m-9.5 3.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z"}));s.displayName="UserCheck02";const o=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21m17 0v-6m-3 3h6M14.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));o.displayName="UserPlus01";var i=e(8957);const a=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m16.5 16 5 5m0-5-5 5M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21M14.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));a.displayName="UserX01";const g=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));g.displayName="Users01";const c=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m21 21-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));c.displayName="SearchSm";var u=e(15297),E=e(22716),A=e(9495);const m=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M4 8h16M4 16h16M8 3v18m8-18v18"}));m.displayName="Hash01";const d=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m9.5 3-3 18m11-18-3 18m6-13h-17m16 8h-17"}));d.displayName="Hash02";const O=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M15 4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 3 13.96 3 13.4 3h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 3.76 9 4.04 9 4.6v2.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C8.24 9 7.96 9 7.4 9H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 9.76 3 10.04 3 10.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 15 4.04 15 4.6 15h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C9 15.76 9 16.04 9 16.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C9.76 21 10.04 21 10.6 21h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C15 20.24 15 19.96 15 19.4v-2.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C15.76 15 16.04 15 16.6 15h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 14.24 21 13.96 21 13.4v-2.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 9 19.96 9 19.4 9h-2.8c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C15 8.24 15 7.96 15 7.4V4.6Z"}));O.displayName="MedicalCross";const p=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 2v5m0-5c-.713 0-1.41.075-2.08.217M12 2c.713 0 1.41.075 2.08.217M12 7a5 5 0 0 0-5 5m5-5a5 5 0 0 1 5 5m-5 5v5m0-5a5 5 0 0 0 5-5m-5 5a5 5 0 0 1-5-5m5 10c.712 0 1.407-.075 2.077-.216M12 22a10.02 10.02 0 0 1-2.085-.218M4.93 4.93l3.535 3.535m7.072 7.072 3.535 3.535M2 12h5m-5 0c0 .713.075 1.41.217 2.08M2 12c0-.714.075-1.411.217-2.083M17 12h5m0 0c0-.713-.075-1.41-.217-2.08M22 12c0 .713-.075 1.409-.216 2.08M4.928 19.07l3.535-3.536m7.072-7.07 3.535-3.536m-1.624-1.317a10.053 10.053 0 0 1 2.942 2.943m-.003 10.895a10.053 10.053 0 0 1-2.941 2.94m-10.891-.002a10.055 10.055 0 0 1-2.94-2.937m0-10.896a10.054 10.054 0 0 1 2.94-2.942"}));p.displayName="Virus";const b=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M22 10H2m9 4H6M2 8.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 19 4.08 19 5.2 19h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 17.48 22 16.92 22 15.8V8.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 5 19.92 5 18.8 5H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 6.52 2 7.08 2 8.2Z"}));b.displayName="CreditCard02";const h=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}));h.displayName="Link03";var f=e(85418);const v=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 4c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C20 6.605 20 7.07 20 8v9.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V8c0-.93 0-1.395.102-1.776a3 3 0 0 1 2.122-2.122C6.605 4 7.07 4 8 4m1 11 2 2 4.5-4.5M9.6 6h4.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C16 5.24 16 4.96 16 4.4v-.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C15.24 2 14.96 2 14.4 2H9.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C8 2.76 8 3.04 8 3.6v.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C8.76 6 9.04 6 9.6 6Z"}));v.displayName="ClipboardCheck";const M=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 4c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C20 6.605 20 7.07 20 8v9.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V8c0-.93 0-1.395.102-1.776a3 3 0 0 1 2.122-2.122C6.605 4 7.07 4 8 4m4 13v-6m-3 3h6M9.6 6h4.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C16 5.24 16 4.96 16 4.4v-.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C15.24 2 14.96 2 14.4 2H9.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C8 2.76 8 3.04 8 3.6v.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C8.76 6 9.04 6 9.6 6Z"}));M.displayName="ClipboardPlus";const x=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M11.5 5h.434c3.048 0 4.571 0 5.15.547a2 2 0 0 1 .586 1.845c-.156.781-1.4 1.66-3.888 3.42l-4.064 2.876c-2.488 1.76-3.732 2.639-3.888 3.42a2 2 0 0 0 .586 1.845c.579.547 2.102.547 5.15.547h.934M8 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm14 14a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));x.displayName="Route";const T=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 7c0-.93 0-1.395-.102-1.776a3 3 0 0 0-2.121-2.122C13.395 3 12.93 3 12 3c-.93 0-1.395 0-1.777.102a3 3 0 0 0-2.12 2.122C8 5.605 8 6.07 8 7M5.2 21h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 19.48 22 18.92 22 17.8v-7.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 7 19.92 7 18.8 7H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 8.52 2 9.08 2 10.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 21 4.08 21 5.2 21Z"}));T.displayName="Briefcase01";const z=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12.913 17h7.174m-7.174 0L11 21m1.913-4 2.865-5.991c.231-.483.347-.724.505-.8a.5.5 0 0 1 .434 0c.158.076.274.317.505.8L20.087 17m0 0L22 21M2 5h6m0 0h3.5M8 5V3m3.5 2H14m-2.5 0c-.496 2.957-1.647 5.636-3.334 7.884M10 14a9.396 9.396 0 0 1-1.834-1.116m0 0C6.813 11.848 5.603 10.427 5 9m3.166 3.884A17.295 17.295 0 0 1 2 18"}));z.displayName="Translate01";const S=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M10 8.502a2.248 2.248 0 0 1 4.37.75c0 1.499-2.25 2.248-2.25 2.248m.03 3h.01M9.9 19.2l1.46 1.947c.217.29.326.434.459.486a.5.5 0 0 0 .362 0c.133-.052.242-.197.459-.486L14.1 19.2c.293-.39.44-.586.619-.735a2 2 0 0 1 .822-.412c.226-.053.47-.053.959-.053 1.398 0 2.097 0 2.648-.228a3 3 0 0 0 1.624-1.624C21 15.597 21 14.898 21 13.5V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v5.7c0 1.398 0 2.097.228 2.648a3 3 0 0 0 1.624 1.624C5.403 18 6.102 18 7.5 18c.489 0 .733 0 .96.053a2 2 0 0 1 .821.412c.18.149.326.344.619.735Z"}));S.displayName="AnnotationQuestion";const y=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M15 2.458A9.996 9.996 0 0 0 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.715-.432-3.33-1.193-4.74M17 5.75h.005M10.5 21.888v-2.203a.5.5 0 0 1 .12-.325l2.486-2.9a.5.5 0 0 0-.131-.76l-2.857-1.632a.499.499 0 0 1-.186-.187L8.07 10.62a.5.5 0 0 0-.478-.25l-5.528.492M21 6c0 2.21-2 4-4 6-2-2-4-3.79-4-6a4 4 0 0 1 8 0Zm-3.75-.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0Z"}));y.displayName="Globe05";const C=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M11.302 21.615c.221.129.332.194.488.227.122.026.298.026.42 0 .156-.034.267-.098.488-.227C14.646 20.478 20 16.908 20 12V7.217c0-.799 0-1.199-.13-1.542a2 2 0 0 0-.548-.79c-.275-.243-.65-.383-1.398-.664l-5.362-2.01c-.208-.078-.312-.117-.419-.133a1 1 0 0 0-.286 0c-.107.016-.21.055-.419.133L6.076 4.22c-.748.28-1.122.421-1.398.664a2 2 0 0 0-.547.79C4 6.018 4 6.418 4 7.217V12c0 4.908 5.354 8.478 7.302 9.615Z"}));C.displayName="Shield01";const R=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M21 15v1.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V15m14-7-5-5m0 0L7 8m5-5v12"}));R.displayName="Upload01";const P=/^(https?):\/\/([a-zA-Z0-9-]+\.)+[a-zA-Z0-9-]{2,}(?::\d+)?(\/[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?(#\/[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?(\?[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?$/i,L="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",D="http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",w="http://hl7.org/fhir/questionnaire-item-control",N="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs",V="http://hl7.org/fhir/StructureDefinition/minValue",q="http://hl7.org/fhir/StructureDefinition/maxValue",I="http://icanbwell.com/fhir/StructureDefinition/minValue-error-message",k="http://icanbwell.com/fhir/StructureDefinition/maxValue-error-message",U="http://icanbwell.com/fhir/StructureDefinition/questionnaire-readOnlyExpression",F="http://icanbwell.com/fhir/StructureDefinition/navigation-linkId",K="http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink",G="http://icanbwell.com/fhir/StructureDefinition/questionnaire-autocomplete",se="http://hl7.org/fhir/StructureDefinition/entryFormat",oe="http://hl7.org/fhir/StructureDefinition/tz-code",te="tz-code",pe="footer",be="check-box",ze="header",ge="page",ne="http://icanbwell.com/fhir/StructureDefinition/questionnaire-callNextQuestion",ae="http://icanbwell.com/fhir/StructureDefinition/questionnaire-currentStep",me="http://icanbwell.com/fhir/StructureDefinition/questionnaire-totalSteps",he=[{patterns:["pdf"],type:"pdf"},{patterns:["word","document"],type:"doc"},{patterns:["excel","spreadsheet"],type:"xlsx"},{patterns:["powerpoint","presentation"],type:"ppt"},{patterns:["image/jpeg"],type:"jpg"},{patterns:["image/png"],type:"png"},{patterns:["image/gif"],type:"gif"},{patterns:["image/svg"],type:"svg"},{patterns:["text/plain"],type:"txt"},{patterns:["zip"],type:"zip"},{patterns:["csv"],type:"csv"}],de={"image/*":"image/*","application/pdf":".pdf","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","image/jpeg":"image/jpeg","image/jpg":"image/jpg","image/png":"image/png","image/gif":"image/gif","image/webp":"image/webp","image/heic":"image/heic","image/heif":"image/heif","image/svg+xml":"image/svg+xml"},ue={"image/*":"Images",".pdf":"PDF",".doc":"DOCX",".docx":"DOCX","image/jpeg":"JPEG","image/jpg":"JPG","image/png":"PNG","image/gif":"GIF","image/webp":"WEBP","image/heic":"HEIC","image/heif":"HEIF","image/svg+xml":"SVG"},re="ui-toolkit/CoordinatePicker",J="ui-toolkit/DetailsInfo",ve="ui-toolkit/ServiceChoice",Ee="ui-toolkit/InfoBanner",De="ui-toolkit/Button",Se="ui-toolkit/Phone",Ie="ui-toolkit/ErrorCard",xe="ui-toolkit/FormContainer",$e="ui-toolkit/PageHeader",it="ui-toolkit/SelectableOption",vt="ui-toolkit/Modal",Ot="ui-toolkit/Alert",Dt="ui-toolkit/AppSectionAccess",Qt="ui-toolkit/SensitiveDataCategory",zt="ui-toolkit/QuestCard",Ke="http://icanbwell.com/fhir/StructureDefinition/subtitle",We="http://icanbwell.com/fhir/StructureDefinition/text-align",Ct={LEFT:"left",CENTER:"center"},Qe={MYSELF:"myself",SOMEONE_ELSE:"someone-else"},Ye="http://icanbwell.com/fhir/StructureDefinition/icon-name",It="http://icanbwell.com/fhir/StructureDefinition/error-title",mn="http://icanbwell.com/fhir/StructureDefinition/error-subtitle",Sn="http://icanbwell.com/fhir/StructureDefinition/error-icon-name",et="http://icanbwell.com/fhir/StructureDefinition/description",Rt="http://icanbwell.com/fhir/StructureDefinition/modal-description",kt="http://icanbwell.com/fhir/StructureDefinition/modal-title",qn="http://icanbwell.com/fhir/StructureDefinition/modal-icon-name",Sr="http://icanbwell.com/fhir/StructureDefinition/modal-icon-color",pn="http://icanbwell.com/fhir/StructureDefinition/button-text",Ln="http://icanbwell.com/fhir/StructureDefinition/secondary-button-text",mr="http://icanbwell.com/fhir/StructureDefinition/modal-button-action",Bn="http://icanbwell.com/fhir/StructureDefinition/trigger-text",Xr="http://icanbwell.com/fhir/StructureDefinition/trigger-icon-name",Yr="http://icanbwell.com/fhir/StructureDefinition/primary-button-text",Nt="http://icanbwell.com/fhir/StructureDefinition/trigger-variant",Fe="http://icanbwell.com/fhir/StructureDefinition/trigger-color",ot="http://icanbwell.com/fhir/StructureDefinition/trigger-size",Je="http://hl7.org/fhir/StructureDefinition/mimeType",tt="http://hl7.org/fhir/StructureDefinition/maxSize",rt="http://icanbwell.com/fhir/StructureDefinition/message-severity",lt="http://icanbwell.com/fhir/StructureDefinition/alert-color",St="http://icanbwell.com/fhir/StructureDefinition/hideLabel",st="http://icanbwell.com/fhir/StructureDefinition/placeholder",le="http://icanbwell.com/fhir/StructureDefinition/hint-text",ye="ui-toolkit/PrefilledMemberDemographicsAlert",Ue="http://hl7.org/fhir/issue-severity",Te="http://icanbwell.com/fhir/StructureDefinition/button-type",Tt="http://icanbwell.com/fhir/StructureDefinition/button-action",Zt="button-type",vn="http://icanbwell.com/fhir/StructureDefinition/analytics-form-name",_n="http://icanbwell.com/fhir/StructureDefinition/analytics-event-name",Ar="http://icanbwell.com/fhir/StructureDefinition/analytics-page-name",Ft="http://icanbwell.com/fhir/StructureDefinition/analytics-property-name",we="http://icanbwell.com/fhir/StructureDefinition/analytics-option-name",Ze={},At={"user-check":r,"user-check-02":s,"user-plus":o,"user-01":i.f,"user-x":a,"users-01":g,"search-sm":c,"info-circle":u.d,"help-circle":E.m,x:A.X,hash:m,"hash-02":d,"folder-heart":n.FolderHeart,"medical-cross":O,virus:p,pill:n.Pill,vaccine:n.Vaccine,"face-mask":n.FaceMask,"heart-beat":n.HeartBeat,"credit-card-02":b,"link-03":h,"search-lg":f.q,"clipboard-check":v,"clipboard-plus":M,route:x,"briefcase-01":T,"translate-01":z,"annotation-question":S,"globe-05":y,"shield-01":C,"upload-01":R}},25624:(Y,l,e)=>{"use strict";e.d(l,{$H:()=>w,$O:()=>vt,CP:()=>kt,Fy:()=>Rt,GN:()=>be,J4:()=>lt,MU:()=>G,Nw:()=>ot,Qr:()=>y,Ue:()=>St,Yo:()=>Ee,a0:()=>z,cz:()=>C,di:()=>I,eC:()=>st,iI:()=>k,lv:()=>q,mR:()=>vn,nt:()=>S,od:()=>V,t7:()=>Ot,u0:()=>x,yQ:()=>Zt,zj:()=>ue});var n=e(17637),t=e(43915),r=e(37234),s=e(65328),o=e(91595),i=e(27779),a=e.n(i),g=e(45250),c=e.n(g),u=e(16681),E=e(18807),A=e(1053),m=Object.defineProperty,d=Object.defineProperties,O=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=(Lt,Et,bt)=>Et in Lt?m(Lt,Et,{enumerable:!0,configurable:!0,writable:!0,value:bt}):Lt[Et]=bt,v=(Lt,Et)=>{for(var bt in Et||(Et={}))b.call(Et,bt)&&f(Lt,bt,Et[bt]);if(p)for(var bt of p(Et))h.call(Et,bt)&&f(Lt,bt,Et[bt]);return Lt},M=(Lt,Et)=>d(Lt,O(Et));const x=(Lt,Et,bt,qt)=>{if(Lt){const hn=Lt(Et,v({defaultValue:bt},qt));if(hn&&hn!==Et)return hn}return qt?Object.entries(qt).reduce((hn,[Tn,zr])=>hn.replace(`{{${Tn}}}`,String(zr)),bt):bt},T=Lt=>{var Et;return(Et=Lt.filter(bt=>bt.url.includes("questionnaire-itemControl")).flatMap(bt=>{var qt,hn;return(hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)!=null?hn:[]}).find(bt=>{var qt;return(qt=bt.code)==null?void 0:qt.startsWith("ui-toolkit/")}))==null?void 0:Et.code},z=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.V7);return bt?.valueCode||"off"},S=(Lt,Et,bt)=>{const qt=(0,E.A)(bt);return Lt&&Et&&bt?qt.replace("<p>",`<span>${Et} `).replace("</p>","</span>").trim():qt.replace("<p>","<span>").replace("</p>","</span>").trim()},y=Lt=>{const Et=Lt?.find(bt=>bt.url===A.Vp);return Et?.valueInteger},C=Lt=>{const Et=Lt?.find(bt=>bt.url===A.Z_);return Et?.valueInteger},R={date:"MM/DD/YYYY",choice:"Select an option"},P="Type your response here...",L=(Lt,Et)=>{const bt=Lt?.find(qt=>qt.url===PLACEHOLDER_EXTENSION_URL);return bt?.valueString||Et&&R[Et]||P},D=Lt=>{const Et=Lt?.find(bt=>bt.url===HINT_TEXT_EXTENSION_URL);return Et?.valueString},w=Lt=>{const Et=Lt?.filter(bt=>bt.url===A.GT&&bt.valueCode).map(bt=>A.hr[bt.valueCode]||bt.valueCode);return Et?.length?Et.join(","):void 0},N=Lt=>Lt.split(",").map(qt=>qt.trim()).map(qt=>A.JL[qt]||qt).filter((qt,hn,Tn)=>Tn.indexOf(qt)===hn).join(", "),V=(Lt,Et,bt)=>{const qt=N(Lt),hn=qt.lastIndexOf(","),Tn=hn!==-1?`${qt.substring(0,hn)} or${qt.substring(hn+1)}`:qt,zr=[Et&&`max. ${parseFloat((Et/(1e3*1e3)).toFixed(1))}MB`,bt&&`upto ${bt} file${bt>1?"s":""}`].filter(Boolean);return zr.length>0?`${Tn} (${zr.join(", ")})`:Tn},q=Lt=>{const Et=Lt?.find(bt=>bt?.url===A.zD||bt?.url===A.UZ);return Et?.valueCode||Intl.DateTimeFormat().resolvedOptions().timeZone},I=(Lt,Et)=>{var bt,qt,hn;const Tn=Et?.find(zr=>zr.url.includes(Lt));return(hn=(qt=(bt=Tn?.valueInteger)!=null?bt:Tn?.valueDecimal)!=null?qt:Tn?.valueString)!=null?hn:Tn?.valueDate},k=Lt=>{if(!!Lt){if(/^\d{4}-\d{2}-\d{2}$/.test(Lt))return Lt;try{const Et=(0,i.evaluate)({},Lt);if(Array.isArray(Et)&&Et.length>0){const bt=Et[0];if(bt instanceof Date&&!isNaN(bt.getTime())){const qt=bt.getFullYear(),hn=String(bt.getMonth()+1).padStart(2,"0"),Tn=String(bt.getDate()).padStart(2,"0");return`${qt}-${hn}-${Tn}`}if(typeof bt=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(bt))return bt}}catch{}}},U=(Lt,Et)=>{var bt,qt;const hn=Et?.find(zr=>zr.url===Lt);if(!hn)return;const Tn=(bt=hn.valueString)!=null?bt:hn.valueDate;return Tn||k((qt=hn.valueExpression)==null?void 0:qt.expression)},F=(Lt,Et)=>{if(!(!Lt||Lt.length===0))for(const bt of Lt){const qt=I(Et,bt.extension);if(qt!==void 0)return qt;if(bt.item&&bt.item.length>0){const hn=F(bt.item,Et);if(hn!==void 0)return hn}}},K=(Lt,Et)=>{try{const bt=String(Lt??Et);let qt;if(bt.includes("/"))qt=(0,n.A)(bt,"MM/dd/yyyy",new Date);else{const hn=bt.split("T")[0];qt=(0,t.A)(hn)}return(0,r.A)(qt)}catch(bt){return console.error("Date parsing error:",bt,Lt),null}},G=(Lt,Et)=>{var bt;for(const qt of Lt){if(qt.linkId===Et)return qt;if((bt=qt.item)!=null&&bt.length){const hn=G(qt.item,Et);if(hn!==void 0)return hn}}},se=(Lt,Et)=>{var bt;const qt=[];for(const hn of Lt)if(hn.linkId===Et&&qt.push(hn),(bt=hn.item)!=null&&bt.length){const Tn=se(hn.item,Et);qt.push(...Tn)}return qt},oe=(Lt,Et,bt=0)=>se(Lt,Et)[bt];function te(Lt){return Lt!=null}const pe=(Lt,Et)=>{var bt,qt,hn;if("answerString"in Lt&&te(Lt.answerString)){if(Lt.operator==="=")return Et?.valueString===Lt.answerString;if(Lt.operator==="!=")return Et?.valueString!==Lt.answerString}if("answerBoolean"in Lt&&te(Lt.answerBoolean)){if(Lt.operator==="=")return Et?.valueBoolean===Lt.answerBoolean;if(Lt.operator==="!=")return Et?.valueBoolean!==Lt.answerBoolean}if("answerInteger"in Lt&&te(Lt.answerInteger)||"answerDecimal"in Lt&&te(Lt.answerDecimal)){const Tn=Number(Et?.valueInteger||Et?.valueDecimal),zr=Number(Lt.answerInteger||Lt.answerDecimal);if(Lt.operator==="=")return Tn===zr;if(Lt.operator==="!=")return Tn!==zr;if(Lt.operator===">")return Tn>zr;if(Lt.operator==="<")return Tn<zr;if(Lt.operator===">=")return Tn>=zr;if(Lt.operator==="<=")return Tn<=zr}if("answerQuantity"in Lt&&te(Lt.answerQuantity)){const Tn=Et?.valueQuantity,zr=Lt.answerQuantity;if(Tn?.unit!==zr?.unit)return!1;if(Lt.operator==="=")return Tn.value===zr.value;if(Lt.operator==="!=")return Tn.value!==zr.value;if(Lt.operator===">")return Tn.value>zr.value;if(Lt.operator==="<")return Tn.value<zr.value;if(Lt.operator===">=")return Tn.value>=zr.value;if(Lt.operator==="<=")return Tn.value<=zr.value}if("answerCoding"in Lt&&te(Lt.answerCoding)){const Tn=Et?.valueCoding,zr=Lt.answerCoding;if(Lt.operator==="=")return Tn?.code===zr.code;if(Lt.operator==="!=")return Tn?.code!==zr.code}if("answerReference"in Lt&&te(Lt.answerReference)){const Tn=Et?.valueReference,zr=Lt.answerReference;if(Lt.operator==="=")return Tn?.reference===zr.reference;if(Lt.operator==="!=")return Tn?.reference!==zr.reference}if("answerDate"in Lt&&te(Lt.answerDate)||"answerDateTime"in Lt&&te(Lt.answerDateTime)||"answerTime"in Lt&&te(Lt.answerTime)){const Tn=new Date((hn=(qt=(bt=Et?.valueDate)!=null?bt:Et?.valueDateTime)!=null?qt:Et?.valueTime)!=null?hn:""),zr=new Date(Lt.answerDate||Lt.answerDateTime||Lt.answerTime||"");if(Lt.operator==="=")return Tn.getTime()===zr.getTime();if(Lt.operator==="!=")return Tn.getTime()!==zr.getTime();if(Lt.operator===">")return Tn.getTime()>zr.getTime();if(Lt.operator==="<")return Tn.getTime()<zr.getTime();if(Lt.operator===">=")return Tn.getTime()>=zr.getTime();if(Lt.operator==="<=")return Tn.getTime()<=zr.getTime()}return Lt.operator==="exists"?Et!=null===Lt.answerBoolean:!0},be=(Lt,Et,bt)=>{const qt=hn=>{const Tn=se(bt,hn.question);return Tn.length===0||Tn.every(zr=>!zr.answer||zr.answer.length===0)?pe(hn,void 0):Tn.some(zr=>{var zn;return(zn=zr.answer)==null?void 0:zn.some(gn=>pe(hn,gn&&Object.keys(gn).length>0?gn:void 0))})};return Lt&&Lt?.length>0?Et==="any"?Lt?.some(hn=>qt(hn)):Lt?.every(hn=>qt(hn)):!0},ze=(Lt,Et,bt,qt,hn)=>{if(!Lt||Lt.length===0)return!0;const Tn=zr=>{var zn;let gn;if(qt&&typeof hn=="number"){const Mt=bt.filter(Pt=>Pt.linkId===qt)[hn];if(Mt?.item){const Pt=Mt.item.find(Ut=>Ut.linkId===zr.question);if(Pt?.answer&&Pt.answer.length>0)return(zn=Pt?.answer)==null?void 0:zn.some(Ut=>pe(zr,Ut&&Object.keys(Ut).length>0?Ut:void 0))}}if(!gn){const en=se(bt,zr.question);if(en.length>0)return en.some(Mt=>{var Pt;return(Pt=Mt.answer)==null?void 0:Pt.some(Ut=>pe(zr,Ut&&Object.keys(Ut).length>0?Ut:void 0))});gn=void 0}return pe(zr,gn)};return Et==="any"?Lt.some(zr=>Tn(zr)):Lt.every(zr=>Tn(zr))},ge=(Lt,Et)=>{var bt;if(!!((bt=Lt?.valueExpression)!=null&&bt.expression))try{const qt=evaluate(Et,Lt.valueExpression.expression);return Array.isArray(qt)?qt.some(hn=>Boolean(hn)):Boolean(qt)}catch{return}},ne=(Lt,Et)=>{var bt;const qt=(bt=Lt.extension)==null?void 0:bt.find(Tn=>Tn.url===READ_ONLY_EXPRESSION_EXTENSION_URL),hn=ge(qt,Et);return M(v({},Lt),{readOnly:hn??Lt.readOnly})},ae=(Lt,Et,bt,qt)=>{const{required:hn,maxLength:Tn,type:zr,extension:zn,enableWhen:gn,enableBehavior:en,repeats:Mt,answerOption:Pt}=Lt;if(!be(gn,en,Et)||Lt.type==="group"||Lt.type==="display")return"";if(Mt)return me(Lt,Et,bt,qt);const Ut=re(Lt,Et);return Ut&&J(Ut,Lt)?ve(Lt,Et,bt,Ut,qt):ue(zn,zr,hn,Tn,bt,Pt,qt)},me=(Lt,Et,bt,qt)=>{const{required:hn}=Lt;if(hn){if(!bt||bt.length===0)return x(qt,Translations.VALIDATION_AT_LEAST_ONE_REQUIRED,"At least one item is required");let Tn=!1;for(let zr=0;zr<bt.length;zr++){const zn=bt[zr];if(zn&&Object.keys(zn).length>0&&Object.values(zn).some(en=>en!=null&&en!==""&&(Array.isArray(en)?en.length>0:!0))){Tn=!0;const en=ue(Lt.extension,Lt.type,!0,Lt.maxLength,[zn],Lt.answerOption,qt);if(en)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:zr+1,error:en});if(Lt.item&&Lt.item.length>0){const Mt=he(Lt.item,Et,Lt.linkId,zr,qt);if(Mt)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:zr+1,error:Mt})}}else return x(qt,Translations.VALIDATION_ITEM_FIELD_REQUIRED,"Item {{index}}: This field is required",{index:zr+1})}if(!Tn)return x(qt,Translations.VALIDATION_AT_LEAST_ONE_REQUIRED,"At least one item is required")}else if(bt&&bt.length>0)for(let Tn=0;Tn<bt.length;Tn++){const zr=bt[Tn];if(zr&&Object.keys(zr).length>0&&Object.values(zr).some(gn=>gn!=null&&gn!==""&&(Array.isArray(gn)?gn.length>0:!0))){const gn=ue(Lt.extension,Lt.type,!1,Lt.maxLength,[zr],Lt.answerOption,qt);if(gn)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Tn+1,error:gn});if(Lt.item&&Lt.item.length>0){const en=he(Lt.item,Et,Lt.linkId,Tn,qt);if(en)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Tn+1,error:en})}}}return""},he=(Lt,Et,bt,qt,hn)=>{var Tn,zr;for(const zn of Lt){if(!ze(zn.enableWhen,zn.enableBehavior,Et,bt,qt))continue;const gn=G(Et,bt),en=(Tn=gn?.item)==null?void 0:Tn.find(Pt=>Pt.linkId===zn.linkId),Mt=(zr=en?.answer)!=null&&zr[qt]?[en.answer[qt]]:void 0;if(zn.required){if(!Mt||!Mt[0]||!de(Mt[0]))return x(hn,Translations.VALIDATION_NAMED_FIELD_REQUIRED,"{{fieldName}} is required",{fieldName:zn.text||zn.linkId});const Pt=ue(zn.extension,zn.type,!0,zn.maxLength,Mt,zn.answerOption,hn);if(Pt)return`${zn.text||zn.linkId}: ${Pt}`}else if(Mt&&Mt[0]&&de(Mt[0])){const Pt=ue(zn.extension,zn.type,!1,zn.maxLength,Mt,zn.answerOption,hn);if(Pt)return`${zn.text||zn.linkId}: ${Pt}`}if(zn.item&&zn.item.length>0){const Pt=he(zn.item,Et,zn.linkId,qt,hn);if(Pt)return Pt}}return""},de=Lt=>!Lt||Object.keys(Lt).length===0?!1:Object.values(Lt).some(Et=>Et!=null&&Et!==""&&(Array.isArray(Et)?Et.length>0:!0)),ue=(Lt,Et,bt,qt,hn,Tn,zr)=>{var zn,gn,en,Mt,Pt;let Ut="";const ln=!!Lt?.find(Rr=>{var $r,c0;return Rr.url===A.gD&&((c0=($r=Rr.valueCodeableConcept)==null?void 0:$r.coding)==null?void 0:c0.some(xo=>xo.system===A.n4&&xo.code===A.GI))}),Jt=hn?.[0],En={choice:((zn=Jt?.valueCoding)==null?void 0:zn.code)||(Jt?.valueString&&Tn?.some(Rr=>Rr.valueString===Jt.valueString)?Jt.valueString:null),"open-choice":((gn=Jt?.valueCoding)==null?void 0:gn.code)||Jt?.valueString,boolean:Jt?.valueBoolean,string:Jt?.valueString,text:Jt?.valueString,url:Jt?.valueUri,integer:Jt?.valueInteger,decimal:Jt?.valueDecimal,dateTime:Jt?.valueDateTime,date:Jt?.valueDate,time:Jt?.valueTime,quantity:(en=Jt?.valueQuantity)==null?void 0:en.value,reference:(Mt=Jt?.valueReference)==null?void 0:Mt.display,attachment:(Pt=Jt?.valueAttachment)==null?void 0:Pt.title};if(!(Et in En))return"";const jn=En[Et],Hr={required:()=>bt&&(jn==null||jn===""||jn==="NaN"||Number.isNaN(jn)||Et==="boolean"&&jn!==!0&&ln)?x(zr,u.p.VALIDATION_FIELD_REQUIRED,"This field is required"):"",maxLength:()=>qt&&jn!==null&&jn!==void 0&&jn.toString().length>qt?x(zr,u.p.VALIDATION_MAX_LENGTH,"Input should not exceed {{maxLength}} characters",{maxLength:qt}):"",minLength:()=>{const Rr=I("minLength",Lt);return Rr&&jn!==null&&jn!==void 0&&jn.toString().length<Number(Rr)?x(zr,u.p.VALIDATION_MIN_LENGTH,"Input should be at least {{minLength}} characters",{minLength:Rr}):""},urlRegex:()=>{const Rr=new RegExp(A.rx),$r=I("regexError",Lt),c0=$r??x(zr,u.p.VALIDATION_INVALID_URL,"Please enter a valid url starting from http:// and https://");return Rr&&Et==="url"&&jn&&!Rr.test(jn)?String(c0):""},regex:()=>{const Rr=I("regex",Lt);if(!Rr||typeof jn!="string")return"";const $r=new RegExp(Rr),c0=I("regexError",Lt),xo=c0??x(zr,u.p.VALIDATION_INVALID_INPUT,"Please enter a valid input");return $r&&jn&&!$r.test(jn)?String(xo):""},dateTime:()=>{if(Et==="dateTime"&&jn){const Rr=jn?.toString(),$r=new Date(Rr);return isNaN($r.getTime())?x(zr,u.p.VALIDATION_INVALID_DATETIME,"Please enter a valid date-time"):""}return""},date:()=>{if(Et!=="date"||!jn)return"";const Rr=jn.replace(/\D/g,"");return Rr.length>0&&Rr.length<8||isNaN(new Date(jn).getTime())?x(zr,u.p.VALIDATION_INVALID_DATE,"Invalid date"):""},minValue:()=>{var Rr;if(Et==="date"){const c0=U(A.dU,Lt),xo=K(c0??"01/01/1900","01/01/1900"),B0=K(jn,"");if(!xo||!B0)return"";if((0,s.A)(B0,xo)){const Q0=(Rr=Lt?.find(q0=>q0.url===A.Ck))==null?void 0:Rr.valueString;return Q0??x(zr,u.p.VALIDATION_DATE_BEFORE_MIN,"Date should not be before {{minDate}}",{minDate:c0??"01/01/1900"})}return""}const $r=I("minValue",Lt);return $r!=null&&jn!==null&&jn!==void 0&&jn<$r?x(zr,u.p.VALIDATION_MIN_VALUE,"Input should not be less than {{minValue}}",{minValue:$r}):""},maxValue:()=>{var Rr;if(Et==="date"){const c0=U(A.bK,Lt),xo=K(c0??"01/01/2100","01/01/2100"),B0=K(jn,"");if(!xo||!B0)return"";if((0,o.A)(B0,xo)){const Q0=(Rr=Lt?.find(q0=>q0.url===A.Cx))==null?void 0:Rr.valueString;return Q0??x(zr,u.p.VALIDATION_DATE_AFTER_MAX,"Date should not be after {{maxDate}}",{maxDate:c0??"01/01/2100"})}return""}const $r=I("maxValue",Lt);return $r!=null&&jn!==null&&jn!==void 0&&jn>$r?x(zr,u.p.VALIDATION_MAX_VALUE,"Input should not exceed {{maxValue}}",{maxValue:$r}):""}};return Ut=Hr.required()||Hr.maxLength()||Hr.minLength()||Hr.urlRegex()||Hr.regex()||Hr.dateTime()||Hr.date()||Hr.minValue()||Hr.maxValue()||"",Ut},re=(Lt,Et)=>{for(const bt of Et)if(bt.item){if(bt.item.find(Tn=>Tn.linkId===Lt.linkId))return bt;const hn=re(Lt,bt.item);if(hn)return hn}return null},J=(Lt,Et)=>{if(Lt.answer&&Lt.answer.length>1)return!0;if(Lt.item){const bt=Lt.item.find(qt=>qt.linkId===Et.linkId);if(bt&&bt.answer&&bt.answer.length>1)return!0}return!1},ve=(Lt,Et,bt,qt,hn)=>{var Tn,zr;const{required:zn}=Lt,gn=(Tn=qt.item)==null?void 0:Tn.find(Pt=>Pt.linkId===Lt.linkId),en=gn?.answer||[],Mt=((zr=qt.answer)==null?void 0:zr.length)||1;for(let Pt=0;Pt<Mt;Pt++){const Ut=en[Pt];if(zn){if(!Ut||!de(Ut))return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:x(hn,Translations.VALIDATION_NAMED_FIELD_REQUIRED,"{{fieldName}} is required",{fieldName:Lt.text||Lt.linkId})});const ln=ue(Lt.extension,Lt.type,!0,Lt.maxLength,[Ut],Lt.answerOption,hn);if(ln)return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:ln})}else if(Ut&&de(Ut)){const ln=ue(Lt.extension,Lt.type,!1,Lt.maxLength,[Ut],Lt.answerOption,hn);if(ln)return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:ln})}}return""},Ee=(Lt,Et)=>{for(const bt of Lt){if(bt?.linkId===Et)return bt;if(bt?.item&&bt.item.length>0){const qt=Ee(bt.item,Et);if(qt)return qt}}},De=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===FOOTER_CODE))}))},Se=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>bt.url===A.oA&&bt.valueBoolean))},Ie=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===HEADER_CODE))}))},xe=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===A.gD&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===A.n4&&Tn.code===A._l))}))},$e=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>bt.url===QUESTIONNAIRE_CALL_NEXT_QUESTION_EXTENSION_URL&&bt.valueBoolean))},it=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===CHECKBOX_CODE))}))},vt=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.fe);return bt?.valueInteger},Ot=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.zO);return bt?.valueInteger},Dt=Lt=>{var Et;const bt=(Et=Lt?.extension)==null?void 0:Et.find(qt=>qt.url===QUESTIONNAIRE_TOTAL_STEPS_EXTENSION_URL);return bt?.valueInteger},Qt=(Lt,Et,bt,qt,hn,Tn)=>{const zr=gn=>Et.filter(en=>en.linkId===gn),zn=new Set;return Lt.map(gn=>{if(zn.has(gn.linkId)||De(gn))return null;const Mt=zr(gn.linkId),Pt=gn.type==="group"&&gn.repeats;if(zn.add(gn.linkId),Pt){const Ut=[];if(Mt.forEach((ln,Jt)=>{const En={linkId:gn.linkId,text:gn.text};let jn;if(bt===gn.linkId&&typeof Tn=="number"&&Tn===Jt&&hn&&hn.length>0){const Hr=ln?.item||[];jn=[...Hr],hn.forEach(Rr=>{const $r=jn.findIndex(c0=>c0.linkId===Rr.linkId);$r>=0?jn[$r]=M(v({},Hr[$r]),{answer:Rr.answer}):jn.push(Rr)})}else gn.item&&(jn=Qt(gn.item,ln?.item||[],bt,qt,hn,Jt));bt===gn.linkId&&typeof Tn=="number"&&Tn===Jt&&qt?En.answer=qt:En.answer=ln.answer||[{}],jn&&jn.length>0?En.item=jn:ln.item&&(En.item=ln.item),Ut.push(En)}),bt===gn.linkId&&typeof Tn=="number"&&Tn>=Mt.length)for(let ln=Mt.length;ln<=Tn;ln++){const Jt={linkId:gn.linkId,text:gn.text,answer:ln===Tn&&qt?qt:[{}]};ln===Tn&&hn&&hn.length>0?Jt.item=hn:gn.item&&(Jt.item=Qt(gn.item,[],void 0,void 0,void 0,void 0)),Ut.push(Jt)}return Ut}else if(gn.repeats&&typeof Tn=="number"&&bt===gn.linkId){const Ut=Mt[0]||{linkId:gn.linkId,text:gn.text,answer:[]},ln={linkId:gn.linkId,text:gn.text,answer:[...Ut.answer||[]]};if(qt&&qt.length>0){for(;ln.answer.length<=Tn;)ln.answer.push({});ln.answer[Tn]=qt[0]}return ln}else{const Ut=Mt[0],ln=gn.item?Qt(gn.item,Ut?.item||[],bt,qt,hn,Tn):void 0,Jt=ln&&ln.length>0,En={linkId:gn.linkId,text:gn.text};return bt&&gn.linkId===bt&&typeof Tn!="number"?(qt||!qt&&!hn?En.answer=qt:Ut?.answer&&(En.answer=Ut.answer),hn?En.item=hn:Jt&&(En.item=ln)):(Ut?.answer?En.answer=Ut.answer:En.answer=[{}],Jt&&(En.item=ln)),En}}).filter(Boolean).flat()},zt=(Lt,Et)=>{for(const bt of Lt)if(bt.linkId===Et||bt.item&&zt(bt.item,Et))return bt.linkId;return null},Ke=(Lt,Et,bt,qt)=>{var hn;const Tn=(hn=Lt?.item)!=null?hn:qt;return!Tn||Tn.length===0?!0:Tn.every(zr=>{var zn;const gn=se(Et,zr.linkId);if(gn.length===0){const en=(zn=G(Et,zr.linkId))==null?void 0:zn.answer;if(ae(zr,Et,en)&&be(zr.enableWhen,zr.enableBehavior,Et)&&bt.includes(zr.linkId))return!1}else for(const en of gn)if(ae(zr,Et,en.answer)&&be(zr.enableWhen,zr.enableBehavior,Et)&&bt.includes(zr.linkId))return!1;return zr.item?Ke(zr,Et,bt):!0})},We=(Lt,Et,bt=!0)=>{for(const qt of Lt)if(qt.linkId===Et&&qt.answer&&qt.answer.length>0||qt.item&&qt.item.length>0&&We(qt.item,Et,bt))return!0;return!1},Ct=(Lt,Et,bt=0)=>{const qt=Lt.filter(hn=>hn.linkId===Et);if(qt.length>bt){const hn=qt[bt];if(hn.answer&&hn.answer.length>0)return hn.answer.some(Tn=>Tn&&Object.keys(Tn).length>0&&Object.values(Tn).some(zr=>zr!=null&&zr!==""));if(hn.item&&hn.item.length>0)return We(hn.item,Et,!1)}return We(Lt,Et,!1)},Qe=(Lt,Et)=>{if(!Lt||!Lt.item)return!1;const bt=qt=>{var hn;if(Se(qt)&&qt.required&&be(qt.enableWhen,qt.enableBehavior,Et)){const Tn=G(Et,qt.linkId),zr=ue(qt.extension,qt.type,qt.required,qt.maxLength,Tn?.answer,qt.answerOption);if(!((hn=Tn?.answer)!=null&&hn.length)||zr)return!0}if(qt.item){for(const Tn of qt.item)if(bt(Tn))return!0}return!1};for(const qt of Lt.item)if(bt(qt))return!0;return!1},Ye=Lt=>{var Et,bt,qt;if(Lt.valueString!==void 0)return Lt.valueString;if(Lt.valueBoolean!==void 0)return Lt.valueBoolean;if(Lt.valueInteger!==void 0)return Lt.valueInteger;if(Lt.valueDecimal!==void 0)return Lt.valueDecimal;if(Lt.valueDate!==void 0)return Lt.valueDate;if(Lt.valueDateTime!==void 0)return Lt.valueDateTime;if(((Et=Lt.valueCoding)==null?void 0:Et.code)!==void 0)return Lt.valueCoding.code;if(((bt=Lt.valueReference)==null?void 0:bt.reference)!==void 0)return Lt.valueReference.reference;if(((qt=Lt.valueQuantity)==null?void 0:qt.value)!==void 0)return Lt.valueQuantity.value;if(Lt.valueAttachment!==void 0)return Lt.valueAttachment},It=Lt=>{const Et={linkId:Lt.linkId};if(Lt.answer&&Lt.answer.length>0){const bt=Lt.answer.map(qt=>Ye(qt)).filter(qt=>qt!==void 0);bt.length>0&&(Et.answer=bt)}if(Lt.item&&Lt.item.length>0){const bt=Lt.item.map(qt=>It(qt)).filter(qt=>{const hn=Object.keys(qt);return hn.length>1||hn.length===1&&hn[0]!=="linkId"});bt.length>0&&(Et.item=bt)}return Et},mn=(Lt,Et,bt,qt,hn,Tn)=>{var zr;const zn=(zr=Et?.item)==null?void 0:zr[bt[qt]],gn=zn?.linkId;if(!gn)return!1;const en=se(Lt,gn),Mt=se(hn,gn),Pt=Ut=>{if(Ut!=null){if(Array.isArray(Ut)){const ln=Ut.filter(Jt=>Jt!=null).map(Jt=>Pt(Jt)).filter(Jt=>Jt!==void 0);return ln.length===0||ln.length===1&&typeof ln[0]=="object"&&Object.keys(ln[0]).length===0?void 0:ln}if(typeof Ut=="object"){const ln={};for(const[Jt,En]of Object.entries(Ut))if(En!=null){const jn=Pt(En);jn!==void 0&&(ln[Jt]=jn)}return Object.keys(ln).length===0?void 0:ln}return Ut}};if(en.length!==Mt.length)return!1;for(let Ut=0;Ut<en.length;Ut++){const ln=en[Ut],Jt=Mt[Ut];if(!ln||!Jt)return!1;const En=It(Pt(ln)),jn=It(Pt(Jt));if(!_.isEqual(En,jn))return!1}return qt!==Tn},Sn=(Lt,Et,bt,qt)=>bt&&bt.length>0&&!(bt.length===1&&Object.keys(bt[0]).length===0)&&ae(Lt,Et,bt,qt)||null,et=(Lt,Et,bt)=>{const qt={},hn=Tn=>{Tn.forEach(zr=>{const zn=se(Et,zr.linkId);if(ye(zr,Lt)||zr.repeats)for(let gn=0;gn<zn.length;gn++){const en=zn[gn];if(en?.answer&&en.answer.length>0){const Mt=Sn(zr,Et,en.answer,bt);Mt&&(qt[zr.linkId]=M(v({},qt[zr.linkId]),{[gn]:Mt}))}}else{const gn=G(Et,zr.linkId);if(gn?.answer&&gn.answer.length>0){const en=Sn(zr,Et,gn.answer,bt);en&&(qt[zr.linkId]={0:en})}}zr.item&&zr.item.length>0&&hn(zr.item)})};return hn(Lt),qt},Rt=Lt=>{if(!Lt)return"";const Et=Lt.split("-");if(Et.length===3){const[bt,qt,hn]=Et;return`${bt.slice(-4)}-${qt}-${hn}`}return""},kt=Lt=>Lt.trim().replace(/[A-Za-z]+/g,""),qn=(Lt,Et)=>{const bt=(qt,hn)=>{for(const Tn of qt){if(Tn.linkId===hn)return Tn.answer;if(Tn.item&&Tn.item.length>0){const zr=bt(Tn.item,hn);if(zr!==void 0)return zr}}};return bt(Lt,Et)},Sr=(Lt,Et)=>{if(!Et||Et.length===0)return null;const bt=Lt.linkId,qt=(hn,Tn,zr=[])=>{for(const zn of hn){const gn=[...zr,zn];if(zn.item){if(zn.item.some(Pt=>Pt.linkId===Tn))return gn.some(Pt=>Pt.repeats===!0)?zn:null;if(qt(zn.item,Tn,gn))return zn}}return null};return qt(Et,bt)},pn=(Lt,Et)=>{if(!Et||Et.length===0)return!1;const bt=Lt.linkId,qt=(hn,Tn,zr=[])=>{for(const zn of hn){const gn=[...zr,zn];if(zn.item){if(zn.item.some(Pt=>Pt.linkId===Tn))return gn.some(Pt=>{const Ut=T(Pt.extension||[]);return!!Ut&&Ut!==UI_TOOLKIT_FORM_CONTAINER});if(qt(zn.item,Tn,gn))return!0}}return!1};return qt(Et,bt)},Ln=(Lt,Et,bt)=>{const qt={};if(!Lt)return qt;const{linkId:hn}=Et;if(Lt[hn]){const Tn=Lt[hn];qt[hn]=Tn[bt]||""}return Et.item&&Et.item.length>0&&Et.item.forEach(Tn=>{if(Lt[Tn.linkId]){const zr=Lt[Tn.linkId];qt[Tn.linkId]=zr[bt]||""}}),qt},mr=(Lt,Et)=>{const bt={};if(!Lt||!Lt[Et])return bt;const qt=Lt[Et];return bt[Et]=qt[0]||"",bt},Bn=Lt=>{const Et=Lt.findIndex(Tn=>!Se(Tn)),bt=Et>=0?[Et]:[],qt=new Map;let hn=null;if(Lt.forEach((Tn,zr)=>{const zn=xe(Tn);if(zn&&Tn.type==="group")zr!==Et&&bt.push(zr),qt.set(zr,[zr]),hn=zr;else if(hn!==null&&!zn){const gn=qt.get(hn)||[];qt.set(hn,[...gn,zr])}}),Lt.length>0&&bt.length>0){const Tn=bt[0];if(!qt.has(Tn)){const zr=bt.find(gn=>gn>Tn),zn=[];for(let gn=Tn;gn<(zr??Lt.length);gn++)zn.push(gn);qt.set(Tn,zn)}}return{groupIndices:bt,itemsToRenderMap:qt}},Xr=(Lt,Et,bt,qt)=>{let hn=[...qt];const Tn=(zr,zn)=>{zr.forEach(gn=>{if((!gn?.enableWhen||be(gn?.enableWhen,gn.enableBehavior,zn))&&gn.initial&&!We(zn,gn.linkId))if(gn.repeats){const en=zn.filter(Mt=>Mt.linkId===gn.linkId);en.length>0?en.forEach((Mt,Pt)=>{Ct(zn,gn.linkId,Pt)||(hn=Qt(bt,hn,gn.linkId,gn.initial,void 0,Pt))}):hn=Qt(bt,hn,gn.linkId,gn.initial)}else hn=Qt(bt,hn,gn.linkId,gn.initial);gn.item&&Tn(gn.item,zn)})};return Tn(Lt,Et),hn},Yr=(Lt,Et,bt)=>{if(!Lt)return[];const qt=[],hn=Tn=>{Tn.required===Et&&be(Tn.enableWhen,Tn.enableBehavior,bt)&&!Se(Tn)&&Tn.type!=="display"&&qt.push(Tn),Tn.item&&Tn.item.length>0&&Tn.item.forEach(hn)};return Lt.forEach(hn),qt},Nt=(Lt,Et)=>Lt.every(bt=>{var qt;const hn=se(Et,bt.linkId);if(hn.length>0)return hn.every(Tn=>!ae(bt,Et,Tn.answer));{const Tn=(qt=G(Et,bt.linkId))==null?void 0:qt.answer;return!ae(bt,Et,Tn)}}),Fe=(Lt,Et)=>{let bt=-1;for(let qt=Lt.length-1;qt>=0;qt--)if(Lt[qt].linkId===Et){bt=qt;break}return bt},ot=(Lt,Et)=>Lt.filter(bt=>bt.linkId!==Et).map(bt=>bt.item&&bt.item.length>0?M(v({},bt),{item:ot(bt.item,Et)}):bt),Je=(Lt,Et,bt=Lt)=>Lt.reduce((qt,hn)=>{const Tn=Ee(Et,hn.linkId);return Tn?.enableWhen&&!be(Tn.enableWhen,Tn.enableBehavior,bt)||(hn.item&&hn.item.length>0?qt.push(M(v({},hn),{item:Je(hn.item,Et,bt)})):qt.push(hn)),qt},[]),tt=(Lt,Et,bt=[])=>{const qt=[],hn=Tn=>{Tn.forEach(zr=>{qt.push(zr.linkId),zr.item&&zr.item.length>0&&hn(zr.item)})};for(let Tn=0;Tn<Lt.length;Tn++){const zr=Lt[Tn];if(zr.linkId===Et){const zn=Lt.slice(0,Tn+1),gn=Lt.slice(Tn+1),{kept:en,removed:Mt}=gn.reduce((Pt,Ut)=>{const ln=Ee(bt,Ut.linkId);return!ln||Se(ln)&&be(ln.enableWhen,ln.enableBehavior,zn)?Pt.kept.push(Ut):Pt.removed.push(Ut),Pt},{kept:[],removed:[]});return hn(Mt),{trimmedData:[...zn,...en],trimmedLinkIds:qt,found:!0}}if(zr.item&&zr.item.length>0){const zn=tt(zr.item,Et,bt);if(zn.found){const gn=Lt.slice(0,Tn),en=Lt.slice(Tn+1),Mt=[...gn,M(v({},zr),{item:zn.trimmedData})],{kept:Pt,removed:Ut}=en.reduce((ln,Jt)=>{const En=Ee(bt,Jt.linkId);return!En||Se(En)&&be(En.enableWhen,En.enableBehavior,Mt)?ln.kept.push(Jt):ln.removed.push(Jt),ln},{kept:[],removed:[]});return hn(Ut),{trimmedData:[...Mt,...Pt],trimmedLinkIds:[...zn.trimmedLinkIds,...qt],found:!0}}}}return{trimmedData:Lt,trimmedLinkIds:[],found:!1}},rt=(Lt,Et)=>Lt.filter(bt=>!Et.includes(bt.linkId)).map(bt=>bt.item&&bt.item.length>0?M(v({},bt),{item:rt(bt.item,Et)}):bt),lt=Lt=>{var Et;if(!Lt)return"empty";const bt=A.Z$.find(({patterns:qt})=>qt.some(hn=>Lt.includes(hn)));return(Et=bt?.type)!=null?Et:"empty"},St=(Lt,Et)=>{const{groupIndices:bt}=Bn(Lt),qt=Lt.findIndex(hn=>hn.linkId===Et);return qt!==-1?bt.indexOf(qt):-1},st=Lt=>{if(!Lt)return{restriction:null,warning:null};const Et=bt=>{const qt=Lt.find(Tn=>Tn.url===bt&&Tn.valueString);if(!qt?.valueString)return null;const hn=qt.valueString.replace(/\\n/g,`
870
870
  `).split(`
871
871
  `).map(Tn=>Tn.trim()).filter(Boolean).map(Tn=>Tn.startsWith("*")?Tn.substring(1).trim():Tn);return hn.length===0?null:hn.length===1?{isList:!1,items:hn}:{isList:!0,items:hn}};return{restriction:Et("restriction"),warning:Et("warning")}},le=(Lt,Et)=>{var bt;switch(Et.type){case"boolean-to-string":return typeof Lt=="boolean"?Lt?Et.trueValue:Et.falseValue:Lt;case"map":return Et.mapping&&Lt in Et.mapping?Et.mapping[Lt]:Lt;case"date-format":return Lt;case"number-format":if(typeof Lt=="number"){let qt=Lt.toFixed((bt=Et.decimals)!=null?bt:0);return Et.prefix&&(qt=Et.prefix+qt),Et.suffix&&(qt=qt+Et.suffix),qt}return Lt;case"passthrough":default:return Lt}},ye=(Lt,Et)=>{const bt=Lt.linkId,qt=(Tn,zr,zn=[])=>{for(const gn of Tn){const en=[...zn,gn];if(gn.item){if(gn.item.some(Ut=>Ut.linkId===zr))return en.filter(Ut=>Ut.repeats===!0);const Pt=qt(gn.item,zr,en);if(Pt.length>0)return Pt}}return[]},hn=qt(Et,bt);return hn.length>0?hn[hn.length-1]:null},Ue=(Lt,Et)=>{if(!Lt?.item)return[];const bt=[];for(const qt of Lt.item){if(qt.type!=="group")continue;be(qt.enableWhen,qt.enableBehavior,Et||[])&&qt.linkId&&bt.push(qt.linkId)}return bt},Te=(Lt,Et)=>{const bt=Ue(Lt,Et||void 0);return bt[bt.length-1]},Tt=({questionnaire:Lt,extensionUrl:Et,errorCode:bt})=>{if(!bt||!Lt?.item)return;const qt=Lt.item.find(hn=>{var Tn;return(Tn=hn.extension)==null?void 0:Tn.some(zr=>zr.url===Et&&zr.valueString===bt)});return qt?.linkId},Zt=(Lt,Et)=>{var bt;const qt=(bt=Lt.extension)==null?void 0:bt.find(Tn=>Tn.url===A.rb);if(!qt?.valueString)return;const hn=qt.valueString;return Ee(Et,hn)},vn=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>bt.url===A.rb))},_n=(Lt,Et)=>Lt.filter(bt=>bt.linkId!==Et).map(bt=>bt.item&&bt.item.length>0?M(v({},bt),{item:_n(bt.item,Et)}):bt),Ar=Lt=>{const Et=I(ANALYTICS_FORM_NAME_EXTENSION_URL,Lt.extension);return Et??F(Lt.item,ANALYTICS_FORM_NAME_EXTENSION_URL)},Ft=Lt=>I(ANALYTICS_EVENT_NAME_EXTENSION_URL,Lt.extension),we=Lt=>I(ANALYTICS_PAGE_NAME_EXTENSION_URL,Lt.extension),Ze=Lt=>I(ANALYTICS_PROPERTY_NAME_EXTENSION_URL,Lt.extension),At=Lt=>I(ANALYTICS_OPTION_NAME_EXTENSION_URL,Lt),Gt=(Lt,Et)=>{var bt,qt,hn;if(!Lt.answerOption)return;const Tn=G(Et,Lt.linkId),zr=(hn=(qt=(bt=Tn?.answer)==null?void 0:bt[0])==null?void 0:qt.valueCoding)==null?void 0:hn.code;if(!zr)return;const zn=Lt.answerOption.find(gn=>{var en;return((en=gn.valueCoding)==null?void 0:en.code)===zr});if(!!zn)return At(zn.extension)},Yt=(Lt,Et)=>{const bt={},qt=hn=>{if(!!hn)for(const Tn of hn){const zr=Ze(Tn);if(zr){let zn;switch(Tn.type){case"choice":zn=Gt(Tn,Et);break;default:break}zn&&(bt[zr]=zn)}Tn.item&&Tn.item.length>0&&qt(Tn.item)}};return qt(Lt.item),bt},rn=Lt=>!!(Lt.initial&&Lt.initial.length>0),$n=(Lt,Et,bt,qt)=>{if(!Lt)return[];const hn=[],Tn=zr=>{zr.forEach(zn=>{if(bt&&bt.includes(zn.linkId)||qt&&zn.enableWhen&&!be(zn.enableWhen,zn.enableBehavior,qt))return;const gn=Se(zn),en=Et.includes(zn.linkId);(en||gn&&zn.required)&&hn.push(zn),en&&zn.item&&zn.item.length>0&&Tn(zn.item)})};return Tn(Lt),hn},Vr=(Lt,Et,bt,qt,hn,Tn)=>{var zr;if(bt<0||!qt?.item)return!0;const zn=hn.current[bt],gn=bt+1,en=hn.current[gn],Mt=bt===0?0:zn,Pt=en??qt.item.length,Ut=[];for(let Hr=Mt;Hr<Pt;Hr++){const Rr=(zr=qt?.item)==null?void 0:zr[Hr];if(Rr){if(Tn&&Tn.includes(Rr.linkId)||Rr.enableWhen&&!be(Rr.enableWhen,Rr.enableBehavior,Lt))continue;const $r=Se(Rr);(Et.includes(Rr.linkId)||$r&&Rr.required)&&Ut.push(Rr),Rr.item&&Rr.item.length>0&&Ut.push(...$n(Rr.item,Et,Tn,Lt))}}const ln=Ut.filter(Hr=>Hr.required===!0),Jt=Ut.filter(Hr=>Hr.required!==!0),En=Nt(ln,Lt),jn=Jt?.every(Hr=>{var Rr;const $r=(Rr=G(Lt,Hr.linkId))==null?void 0:Rr.answer;return $r?!ae(Hr,Lt,$r):!0});return!ln?.length||En&&jn}},32957:(Y,l,e)=>{"use strict";var n=e(31085),t=e(14041),r=e(61784),s=e(36087),o=e(8322),i=e(1053),a=e(25624);const g=({item:Gn})=>{const Wr=Gn.text||"",Ur=Gn.extension||[],Go=_i=>{var Ii;return(Ii=Ur.find(Ri=>Ri.url===_i))==null?void 0:Ii.valueString},jo=Go(i.$7),di=Go(i.pc)||"default";return(0,n.jsx)(s.AlertFloating,{title:Wr,description:jo??"",color:di})};var c=e(7630),u=e(16212),E=Object.defineProperty,A=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,O=(Gn,Wr,Ur)=>Wr in Gn?E(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,p=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))m.call(Wr,Ur)&&O(Gn,Ur,Wr[Ur]);if(A)for(var Ur of A(Wr))d.call(Wr,Ur)&&O(Gn,Ur,Wr[Ur]);return Gn};const b=({item:Gn})=>{const[Wr,Ur]=(0,t.useState)(!1),Go=Gn.extension||[],jo=tn=>{var Pn;return(Pn=Go.find(ar=>ar.url===tn))==null?void 0:Pn.valueString},di=jo(i.PS)||Gn.text||"",_i=jo(i.Iz)||"button",Ii=jo(i.VF),Ri=jo(i.PV),Ui=jo(i.vf),ci=Ui?i.JP[Ui]:void 0,Qi=jo(i.D_)||"",Oa=jo(i.$e),Dr=jo(i.GQ),tr=jo(i.qT)||"gray",hr=jo(i.hZ),Pe=jo(i.wG),Ce=jo(i.q3),Ve=Dr?i.JP[Dr]:void 0,gt=()=>Ur(!0),jt=()=>{switch(_i){case"icon-button":return(0,n.jsxs)("button",{onClick:gt,className:"text-secondary hover:text-primary! flex cursor-pointer items-center gap-2 rounded-lg p-2 transition-opacity",type:"button","aria-label":di||Qi||void 0,children:[ci&&(0,n.jsx)(ci,{"aria-hidden":!0,className:"text-fg-tertiary size-5"}),di&&(0,n.jsx)("span",{className:"text-sm",children:di})]});default:return(0,n.jsx)(s.Button,{color:Ii??"secondary",size:Ri??"md",iconLeading:ci,onClick:gt,"aria-label":di,children:di})}};return(0,n.jsxs)(n.Fragment,{children:[jt(),(0,n.jsx)(s.Modal,p(p(p({id:`modal-${Gn.linkId}`,isOpen:Wr,onOpenChange:Ur,title:{content:Qi},description:{content:Oa?(0,n.jsx)("div",{className:"tw-preflight [&>ul]:flex [&>ul]:list-disc [&>ul]:flex-col [&>ul]:gap-2.5 [&>ul]:pl-5",dangerouslySetInnerHTML:{__html:u.Wp.sanitizeHtml(Oa)}}):void 0},closeButton:{onCloseClick:()=>Ur(!1)}},Ve?{featuredIcon:{icon:Ve,color:tr,size:"lg",className:"bg-white"}}:{}),hr?{primaryButton:{children:hr,onClick:()=>{var tn,Pn;Pe==="open-zendesk"&&((Pn=(tn=globalThis.zE)==null?void 0:tn.activate)==null||Pn.call(tn,{hideOnClose:!0})),Ur(!1)}}}:{}),Ce?{secondaryButton:{children:Ce,onClick:()=>Ur(!1)}}:{}))]})};var h=e(18522);const f=({item:Gn})=>{var Wr,Ur,Go,jo,di,_i,Ii,Ri,Ui,ci,Qi,Oa;const{hasExternalError:Dr}=(0,h.c)(),tr=Gn.text||"",hr=(Ur=(Wr=Gn.extension)==null?void 0:Wr.find(xr=>xr.url===i.ao))==null?void 0:Ur.valueString,Pe=Dr&&hr?hr:tr,Ce=(jo=(Go=Gn.extension)==null?void 0:Go.find(xr=>xr.url===i.$7))==null?void 0:jo.valueString,Ve=(_i=(di=Gn.extension)==null?void 0:di.find(xr=>xr.url===i.el))==null?void 0:_i.valueString,gt=Dr&&Ve?Ve:Ce,jt=(Ri=(Ii=Gn.extension)==null?void 0:Ii.find(xr=>xr.url===i.g4))==null?void 0:Ri.valueString,tn=(ci=(Ui=Gn.extension)==null?void 0:Ui.find(xr=>xr.url===i.Fp))==null?void 0:ci.valueString,Pn=jt?i.JP[jt]:void 0,ar=tn?i.JP[tn]:void 0,bn=Dr&&ar?ar:Pn,Xn=((Oa=(Qi=Gn.extension)==null?void 0:Qi.find(xr=>xr.url===i.WS))==null?void 0:Oa.valueString)===i._W.LEFT,un=Xn?"items-start":"items-center",dr=Xn?"text-left":"text-center",fr=Xn?"text-2xl font-semibold":"text-3xl font-medium";return(0,n.jsxs)("div",{className:`flex flex-col ${un} gap-4`,children:[bn&&(0,n.jsx)(s.FeaturedIcon,{icon:bn,color:Dr&&ar?"error":"brand",size:"xl"}),(0,n.jsxs)("div",{className:`flex flex-col ${un} gap-1`,children:[(0,n.jsx)("h1",{className:`text-primary max-w-[330px] ${dr} ${fr} md:max-w-[352px]`,children:Pe}),(0,n.jsx)("p",{className:`text-md text-secondary ${dr}`,children:gt})]})]})};var v=e(15297),M=e(17814),x=Object.defineProperty,T=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,y=(Gn,Wr,Ur)=>Wr in Gn?x(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,C=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))z.call(Wr,Ur)&&y(Gn,Ur,Wr[Ur]);if(T)for(var Ur of T(Wr))S.call(Wr,Ur)&&y(Gn,Ur,Wr[Ur]);return Gn};const R=({item:Gn})=>{const[Wr,Ur]=(0,t.useState)(!1),Go=(0,M.T$)(),jo=Gn.extension||[],di=hr=>{var Pe;return(Pe=jo.find(Ce=>Ce.url===hr))==null?void 0:Pe.valueString},_i=Gn.text||"",Ii=di(i.PS)||"",Ri=di(i.D_)||"",Ui=di(i.$e),ci=di(i.GQ),Qi=di(i.qT)||"gray",Oa=di(i.hZ),Dr=di(i.q3),tr=ci?i.JP[ci]:void 0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"bg-secondary ring-border-secondary flex items-center justify-between rounded-lg px-4 py-2.5 ring-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(v.d,{className:"text-tertiary size-4 shrink-0"}),(0,n.jsx)("span",{className:"text-primary text-sm font-semibold",children:_i})]}),Ii&&(0,n.jsx)("button",{type:"button",className:"text-link-primary cursor-pointer text-sm font-semibold",onClick:()=>Ur(!0),children:Ii})]}),(0,n.jsx)(s.Modal,C(C(C({id:`modal-${Gn.linkId}`,isOpen:Wr,onOpenChange:Ur,title:{content:Ri},description:{content:Ui?(0,n.jsx)("div",{className:"tw-preflight [&>ul]:flex [&>ul]:list-disc [&>ul]:flex-col [&>ul]:gap-2.5 [&>ul]:pl-5",dangerouslySetInnerHTML:{__html:u.Wp.sanitizeHtml(Ui)}}):void 0},closeButton:{onCloseClick:()=>Ur(!1)}},tr?{featuredIcon:{icon:tr,color:Qi,size:"lg",className:"bg-white"}}:{}),Oa?{primaryButton:{children:Oa,onClick:()=>{Ur(!1),Go.navigate({id:"profile"})}}}:{}),Dr?{secondaryButton:{children:Dr,onClick:()=>Ur(!1)}}:{}))]})},P=({item:Gn,selectedAnswer:Wr,handleInputChange:Ur})=>{var Go,jo,di;const _i=(Go=Gn.answerOption)!=null?Go:[],Ii=(di=(jo=Wr?.[0])==null?void 0:jo.valueCoding)==null?void 0:di.code;return(0,n.jsx)("div",{className:"flex flex-col gap-3",children:_i.map(Ri=>{var Ui,ci,Qi,Oa,Dr,tr,hr;const Pe=(ci=(Ui=Ri.valueCoding)==null?void 0:Ui.code)!=null?ci:"",Ce=(Oa=(Qi=Ri.valueCoding)==null?void 0:Qi.display)!=null?Oa:"",Ve=Ii===Pe,gt=(Dr=Ri.extension)==null?void 0:Dr.find(ar=>ar.url===i.g4),jt=(tr=Ri.extension)==null?void 0:tr.find(ar=>ar.url===i.rz),tn=gt?.valueString?i.JP[gt.valueString]:void 0,Pn=(hr=jt?.valueString)!=null?hr:"";return(0,n.jsx)(s.SelectableOption,{icon:tn,title:Ce,description:Pn,isSelected:Ve,onSelect:()=>{Ur(Gn,[{valueCoding:{code:Pe,display:Ce}}])}},Pe)})})};var L=e(72866),D=e(94043),w=e(94627);const N=({text:Gn,isLabel:Wr,required:Ur,className:Go,id:jo})=>(0,n.jsxs)("p",{id:jo,className:Go??"mb-md text-md",children:[(0,n.jsx)(s.Content,{as:"span",className:(0,D.cx)(Wr&&"text-secondary text-sm font-medium sm:text-sm"),dangerouslySetInnerHTML:{__html:(0,w.p)(Gn||"")}}),Ur&&(0,n.jsx)("span",{className:"text-brand-tertiary ml-1 text-sm font-medium","aria-hidden":"true",children:"*"})]}),V="(###) ###-####",q=(Gn,Wr)=>{const Ur=Gn.replace(/\D/g,"");let Go="",jo=0;for(let di=0;di<Wr.length&&jo<Ur.length;di++)Wr[di]==="#"?(Go+=Ur[jo],jo++):Go+=Wr[di];return Go},I=Gn=>{if(!Gn)return V;const Wr=Gn.find(Ur=>Ur.url===i.Md);return Wr?.valueString||V},k=({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i})=>{var Ii;const{linkId:Ri,text:Ui,required:ci,prefix:Qi,readOnly:Oa,extension:Dr}=Gn,tr=I(Dr),hr=((Ii=Ur?.[0])==null?void 0:Ii.valueString)||"",[Pe,Ce]=(0,t.useState)("");(0,t.useEffect)(()=>{if(hr){const Pn=q(hr,tr);Ce(Pn)}},[hr,tr]);const Ve=Ui?(0,a.nt)(jo,Qi,Ui):"",gt=di?.[Ri]||"",jt=Pn=>{const ar=q(Pn,tr);Ce(ar),Go(Gn,[{valueString:ar}])},tn=()=>{Wr&&Wr(Ri)};return(0,n.jsxs)("div",{"data-testid":Ri,children:[Ve&&(0,n.jsx)(N,{isLabel:!0,text:Ve,required:ci||!1}),(0,n.jsx)(s.Input,{id:Ri,"aria-label":Ri,"data-testid":Ri,type:"tel",placeholder:"Enter phone number",value:Pe,onChange:jt,onBlur:tn,isDisabled:Oa||_i,isRequired:ci,hint:gt,isInvalid:!!gt,size:"md"},Ri)]})},U=({item:Gn,questionnaireSchemaItems:Wr})=>{var Ur;const{isLoading:Go,setCurrentGroupIndex:jo}=(0,h.c)(),di=(Ur=Gn.extension)==null?void 0:Ur.find(Ui=>Ui.url===i.Uf),_i=di?.valueString,Ii=Gn.text||"Save & continue",Ri=()=>{if(_i){const Ui=(0,a.Ue)(Wr||[],_i);Ui!==-1&&jo(Ui)}};return(0,n.jsx)("div",{"data-testid":Gn.linkId,className:"flex w-full justify-center",children:(0,n.jsx)(s.Button,{className:"md:w-xxs h-10 w-full text-sm",color:"primary",isLoading:Go,onClick:Ri,isDisabled:Gn.readOnly,children:Ii})})},F=({size:Gn=24,color:Wr="currentColor",...Ur})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gn,height:Gn,stroke:Wr,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...Ur},t.createElement("path",{d:"M10 16h4m-5.2 6h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.72 20 18.88 20 17.2V6.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 2 16.88 2 15.2 2H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 4.28 4 5.12 4 6.8v10.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 22 7.12 22 8.8 22ZM15 9a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));F.displayName="Passport";var K=e(56327);const G=({size:Gn=24,color:Wr="currentColor",...Ur})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gn,height:Gn,stroke:Wr,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...Ur},t.createElement("path",{d:"M5.316 19.438A4.001 4.001 0 0 1 9 17h6a4.001 4.001 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));G.displayName="UserCircle";var se=e(14711);const oe=({size:Gn=24,color:Wr="currentColor",...Ur})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gn,height:Gn,stroke:Wr,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...Ur},t.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));oe.displayName="Mail01";var te=e(31165),pe=e(14449),be=e(59931),ze=e(27163);const ge=Gn=>{try{const Wr=Gn.match(/^(\d{4})-(\d{2})-(\d{2})/);if(!Wr)return Gn;const[,Ur,Go,jo]=Wr;return new Date(Date.UTC(parseInt(Ur),parseInt(Go)-1,parseInt(jo))).toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})}catch{return Gn}},ne=Gn=>{try{if(Gn.includes("AM")||Gn.includes("PM"))return Gn;const Wr=Gn.match(/T?(\d{2}):(\d{2}):(\d{2})/);if(!Wr)return Gn;const[,Ur,Go]=Wr,jo=parseInt(Ur),di=jo>=12?"PM":"AM";return`${jo%12||12}:${Go} ${di}`}catch{return Gn}},ae=(Gn,Wr,Ur=v.d)=>{var Go;const jo=(Go=Gn.extension)==null?void 0:Go.find(di=>di.url===i.g4);return jo?.valueString&&i.JP[jo.valueString]?i.JP[jo.valueString]:Gn.linkId&&Wr[Gn.linkId]?Wr[Gn.linkId]:Ur},me={"appointment-review/first-name":F,"appointment-review/last-name":F,"appointment-review/dob":K.V,"appointment-review/gender":G,"appointment-review/phone":se.b,"appointment-review/email":oe,"appointment-review/vaccines":s.Vaccine,"appointment-review/appointment-date":K.V,"appointment-review/appointment-time":te.z,"appointment-review/facility-name":s.HospitalBuilding,"appointment-review/facility-phone":se.b,"appointment-review/facility-address":pe.X},he=["appointment-review/appointment-date"],de=["appointment-review/appointment-time"],ue=["appointment-review/facility-phone"],re=["appointment-review/facility-address"],J=["appointment-review/phone","appointment-review/facility-phone"],ve=({item:Gn,questionnaireSchemaItems:Wr})=>{var Ur;const{setCurrentGroupIndex:Go}=(0,h.c)(),{trackEvent:jo}=(0,o.st)(),di=Gn.item||[];if(di.length===0)return null;const _i=(Ur=Gn.extension)==null?void 0:Ur.find(ci=>ci.url===i.Uf),Ii=_i?.valueString,Ri=()=>{if(jo("edit_info_clicked",{section:Gn.text,_event_metadata:{description:"When a user clicks the Edit info link on the confirm details page during booking an appointment"}}),Ii){const ci=(0,a.Ue)(Wr||[],Ii);ci!==-1&&Go(ci)}},Ui=di.map(ci=>{let Qi="";if(ci.initial&&ci.initial.length>0){const tr=ci.initial.map(hr=>{var Pe,Ce,Ve,gt,jt,tn,Pn,ar;let bn=((Pe=hr.valueCoding)==null?void 0:Pe.display)||((Ce=hr.valueReference)==null?void 0:Ce.display)||hr.valueString||"";if(bn&&typeof bn=="string"){if(he.includes(ci.linkId)){const Xn=(jt=(gt=(Ve=hr.valueReference)==null?void 0:Ve.extension)==null?void 0:gt.find(un=>un?.url===i.zD||un?.url===i.UZ))==null?void 0:jt.valueCode;if(Xn)try{bn=(0,be.formatToTimeZone)(bn,"YYYY-MM-DD",{timeZone:Xn})}catch{}bn=ge(bn)}else if(de.includes(ci.linkId)){const Xn=(ar=(Pn=(tn=hr.valueReference)==null?void 0:tn.extension)==null?void 0:Pn.find(un=>un?.url===i.zD||un?.url===i.UZ))==null?void 0:ar.valueCode;if(Xn)try{bn=(0,be.formatToTimeZone)(bn,"h:mm A",{timeZone:Xn})}catch{bn=ne(bn)}else bn=ne(bn)}}return bn}).filter(Boolean);tr.length>1||ci.repeats&&tr.length>0?Qi=tr:tr.length===1&&(Qi=tr[0])}if(!Qi||Array.isArray(Qi)&&Qi.length===0)return null;let Oa;ue.includes(ci.linkId)?Oa="phone":re.includes(ci.linkId)&&(Oa="address");let Dr;return J.includes(ci.linkId)&&(Dr="phone"),{Icon:ae(ci,me),label:ci.text||ci.linkId,value:Qi,linkType:Oa,displayType:Dr}}).filter(Boolean);return Ui.length===0?null:(0,n.jsx)("div",{"data-testid":Gn.linkId,children:(0,n.jsx)(ze.InfoCard,{title:Gn.text||"Details",infoDetails:Ui,actionButtonText:Ii&&"Edit info",onActionButtonClick:Ii?Ri:void 0})})},Ee=({size:Gn=24,color:Wr="currentColor",...Ur})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gn,height:Gn,stroke:Wr,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...Ur},t.createElement("path",{d:"M12 9v4m0 4h.01M10.615 3.892 2.39 18.098c-.456.788-.684 1.182-.65 1.506a1 1 0 0 0 .406.705c.263.191.718.191 1.629.191h16.45c.91 0 1.365 0 1.628-.191a1 1 0 0 0 .407-.705c.034-.324-.195-.718-.65-1.506L13.383 3.892c-.454-.785-.681-1.178-.978-1.31a1 1 0 0 0-.813 0c-.296.132-.523.525-.978 1.31Z"}));Ee.displayName="AlertTriangle";var De=e(18807);const Se=({item:Gn})=>{const{setHideFooterButton:Wr,incrementCustomErrorCount:Ur,decrementCustomErrorCount:Go}=(0,h.c)();return(0,t.useEffect)(()=>(Wr(!0),Ur(),()=>{Wr(!1),Go()}),[Wr,Ur,Go]),(0,n.jsx)("div",{"data-testid":Gn.linkId,className:"flex w-full justify-center",children:(0,n.jsx)(s.EmptyState,{className:"mt-5xl",description:(0,n.jsx)(s.Content,{as:"span",dangerouslySetInnerHTML:{__html:(0,De.p)(Gn.text||"")}}),featuredIconProps:{icon:(0,n.jsx)(Ee,{}),color:"gray",className:"rounded-full shadow-0 ring-bg-primary"}})})},Ie={information:"info",warning:"warning",error:"error",fatal:"error",success:"success"},xe=({item:Gn})=>{var Wr,Ur,Go,jo;const{incrementCustomErrorCount:di,decrementCustomErrorCount:_i,setHideFooterButton:Ii}=(0,h.c)(),[Ri,Ui]=(0,t.useState)(!1),ci=(Wr=Gn.extension)==null?void 0:Wr.find(Pe=>Pe.url===i.gi),Qi=(Go=(Ur=ci?.valueCodeableConcept)==null?void 0:Ur.coding)==null?void 0:Go.find(Pe=>Pe.system===i.tn),Oa=Qi?.code||"error",Dr=Ie[Oa]||"error";(0,t.useEffect)(()=>{if(Dr==="error")return di(),Ii(!0),Ui(!0),()=>{_i(),Ii(!1)};Ui(!0)},[Dr,di,_i,Ii]);const tr=Qi?.display||"Error",hr=(jo=Gn.text)!=null?jo:"";return Ri?(0,n.jsx)("div",{"data-testid":Gn.linkId,children:(0,n.jsx)(s.InfoBanner,{type:Dr,title:tr,description:hr})}):null};var $e=e(65735);const it=({configKey:Gn,customErrorConfigurations:Wr})=>{if(!Wr)return null;const Ur=Wr[Gn];if(!Ur)return null;const{icon:Go,title:jo,description:di,primaryButton:_i,secondaryButton:Ii}=Ur;return(0,n.jsx)(s.EmptyState,{className:"mt-5xl",title:jo,description:di,featuredIconProps:{icon:Go,color:"gray"},primaryButton:_i,secondaryButton:Ii})},vt=10,Ot=({item:Gn,customErrorConfigurations:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i})=>{var Ii,Ri,Ui,ci;const{trackEvent:Qi}=(0,o.st)(),{setHideFooterButton:Oa}=(0,h.c)(),{linkId:Dr,text:tr,required:hr,answerOption:Pe,prefix:Ce,readOnly:Ve}=Gn,gt=Gn?.type==="reference",jt=(Ii=Ur?.map(cn=>{var Un,nr;return gt?(Un=cn.valueReference)==null?void 0:Un.display:(nr=cn.valueCoding)==null?void 0:nr.code}).filter(cn=>cn!==void 0))!=null?Ii:[],[tn,Pn]=(0,t.useState)(jt.length),ar=tr?(0,a.nt)(jo,Ce,tr):"",bn=(Ui=(Ri=Gn.extension)==null?void 0:Ri.find(cn=>cn.url===i.Z_))==null?void 0:Ui.valueInteger,Xn=(ci=Pe?.map(cn=>{var Un,nr,e0,p0;return{value:gt?((Un=cn.valueReference)==null?void 0:Un.display)||"":((nr=cn.valueCoding)==null?void 0:nr.code)||"",label:gt?((e0=cn.valueReference)==null?void 0:e0.display)||"":((p0=cn.valueCoding)==null?void 0:p0.display)||"",valueReference:cn.valueReference}}))!=null?ci:[],un=di?.[Dr],dr=Xn.length>vt,fr=dr?Xn.slice(0,vt):Xn,xr=dr?Xn.slice(vt):[],O0=xr.some(cn=>jt?.includes(cn?.value)),[d0,eo]=(0,t.useState)(O0);if(!(Gn.answerOption&&Gn.answerOption.length>0))return Oa(!0),(0,n.jsx)(it,{configKey:Gn.linkId,customErrorConfigurations:Wr});const ft=Xn.filter(cn=>jt?.includes(cn?.value)).map(cn=>{var Un;const{restriction:nr,warning:e0}=gt?(0,a.eC)((Un=cn.valueReference)==null?void 0:Un.extension):{restriction:null,warning:null};return{label:cn.label,restriction:nr,warning:e0}}).filter(cn=>cn.restriction||cn.warning),Vt=(cn,Un)=>{var nr;Qi("vaccine_type_checkbox_selected",{on_or_off:cn?"on":"off",vaccine:Un,_event_metadata:{description:"A user clicked the checkbox next to a vaccine type."}});let e0;if(cn){const p0=Xn.find(vo=>vo.value===Un);e0=[...(nr=Ur?.filter(vo=>Object.keys(vo).length!==0))!=null?nr:[],gt?{valueReference:p0?.valueReference}:{valueCoding:{code:Un,display:p0?.label}}],Pn(vo=>vo+1)}else e0=Ur?.filter(p0=>{var vo,y0;return gt?((vo=p0.valueReference)==null?void 0:vo.display)!==Un:((y0=p0.valueCoding)==null?void 0:y0.code)!==Un})||[{}],Pn(p0=>p0-1);Go&&Go(Gn,e0)};return(0,n.jsxs)("div",{"data-testid":Dr,children:[ar&&(0,n.jsx)(N,{text:ar,required:hr||!1}),dr&&(0,n.jsx)("div",{className:"mt-3xl mb-md text-primary font-medium",children:"Most Popular"}),(0,n.jsx)("div",{children:fr.map((cn,Un)=>{const nr=jt?.includes(cn?.value),e0=!nr&&bn?tn>=bn:!1;return(0,n.jsx)("div",{className:Un!==fr.length-1?"mb-2xl mx-lg":"mx-lg",children:(0,n.jsx)(s.Checkbox,{size:"md","data-testid":cn.value,id:Un.toString(),name:cn.label,isInvalid:!!un,isSelected:nr,label:cn.label,onChange:p0=>Vt(p0,cn.value),isDisabled:Ve||_i||e0})},Un)})}),dr&&!d0&&!O0&&(0,n.jsx)("div",{className:"mt-3xl flex justify-center",children:(0,n.jsx)(s.Button,{type:"button",onClick:()=>{eo(!0),Qi("see_all_vaccines_clicked",{_event_metadata:{description:"A user clicked the see all link on the vaccine type page."}})},color:"link-color",size:"sm",isDisabled:Ve||_i,children:"See all"})}),dr&&d0&&(0,n.jsx)("div",{className:"mt-3xl mb-md font-medium",children:"Other Vaccines"}),dr&&d0&&(0,n.jsx)("div",{children:xr.map((cn,Un)=>{const nr=jt?.includes(cn?.value),e0=!nr&&bn?tn>=bn:!1;return(0,n.jsx)("div",{className:Un!==xr.length-1?"mb-2xl mx-lg":"mx-lg",children:(0,n.jsx)(s.Checkbox,{size:"md","data-testid":cn.value,id:(vt+Un).toString(),name:cn.label,isInvalid:!!un,isSelected:nr,label:cn.label,onChange:p0=>Vt(p0,cn.value),isDisabled:Ve||_i||e0})},vt+Un)})}),(0,n.jsx)(s.HintText,{isInvalid:!!un,children:un}),ft.length>0&&(0,n.jsx)("div",{className:"mt-3xl space-y-2",children:ft.map((cn,Un)=>(0,n.jsxs)("div",{children:[cn.restriction&&(0,n.jsx)(s.InfoBanner,{type:"warning",title:`[Restriction] ${cn.label}`,description:cn.restriction.isList?(0,n.jsx)("ul",{className:"ml-5 list-disc space-y-1",children:cn.restriction.items.map((nr,e0)=>(0,n.jsx)("li",{className:"text-sm",children:nr},e0))}):(0,n.jsx)("p",{className:"text-sm",children:cn.restriction.items[0]})}),cn.warning&&(0,n.jsx)("div",{className:cn.restriction?"mt-2":"",children:(0,n.jsx)(s.InfoBanner,{type:"warning",title:`[Warning] ${cn.label}`,description:cn.warning.isList?(0,n.jsx)("ul",{className:"ml-5 list-disc space-y-1",children:cn.warning.items.map((nr,e0)=>(0,n.jsx)("li",{className:"text-sm",children:nr},e0))}):(0,n.jsx)("p",{className:"text-sm",children:cn.warning.items[0]})})})]},Un))})]})};var Dt=e(76323),Qt=e(56192),zt=e(66267),Ke=Object.defineProperty,We=Object.defineProperties,Ct=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,mn=(Gn,Wr,Ur)=>Wr in Gn?Ke(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,Sn=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))Ye.call(Wr,Ur)&&mn(Gn,Ur,Wr[Ur]);if(Qe)for(var Ur of Qe(Wr))It.call(Wr,Ur)&&mn(Gn,Ur,Wr[Ur]);return Gn},et=(Gn,Wr)=>We(Gn,Ct(Wr)),Rt=(Gn,Wr,Ur)=>new Promise((Go,jo)=>{var di=Ri=>{try{Ii(Ur.next(Ri))}catch(Ui){jo(Ui)}},_i=Ri=>{try{Ii(Ur.throw(Ri))}catch(Ui){jo(Ui)}},Ii=Ri=>Ri.done?Go(Ri.value):Promise.resolve(Ri.value).then(di,_i);Ii((Ur=Ur.apply(Gn,Wr)).next())});const kt=({item:Gn,handleInputChange:Wr,onCompleteHandler:Ur,errors:Go})=>{const{i18n:{t:jo},loading:di}=(0,zt.E_)({keys:["shared-translations","ui-toolkit-modern"]}),{trackEvent:_i}=(0,o.st)(),{linkId:Ii,required:Ri,readOnly:Ui}=Gn,ci=Go?.[Ii]||"",[Qi,Oa]=(0,t.useState)(Dt.LocationType.CURRENT_LOCATION),[Dr,tr]=(0,t.useState)(""),hr=(0,t.useRef)({}),[Pe,Ce]=(0,t.useState)([{id:Dt.LocationType.CURRENT_LOCATION,label:"Current Location"},{id:Dt.LocationType.ADDRESS,label:"Address"},{id:Dt.LocationType.ZIP_CODE,label:"Zip code"}]),{isLoading:Ve,setIsLoading:gt,setIsCurrentFormValid:jt,isCurrentFormValid:tn}=(0,h.c)(),{position:Pn,loading:ar,locationPermission:bn}=(0,Dt.useDeviceLocationContext)(),{queryParams:Xn,setQueryParams:un}=(0,Dt.useSearchQueryParams)(),[dr,{loading:fr}]=(0,Qt.qtq)({fetchPolicy:"cache-first"}),[xr,{loading:O0}]=(0,Qt.YyG)({fetchPolicy:"cache-first"}),d0=Gn.item?(0,a.Yo)(Gn.item,"postal-code"):void 0,eo=Gn.item?(0,a.Yo)(Gn.item,"state"):void 0,_o=Gn.item?(0,a.Yo)(Gn.item,"latitude"):void 0,ft=Gn.item?(0,a.Yo)(Gn.item,"longitude"):void 0,Vt=G0=>{if(!G0||!d0)return tr(""),!1;const Co=(0,a.zj)(d0.extension,d0.type,!1,d0.maxLength,[{valueString:G0}],void 0,jo);return Co?(tr(Qi!==Dt.LocationType.ZIP_CODE?jo("SELECT_DIFFERENT_LOCATION_TYPE_ERROR"):Co),!1):(tr(""),!0)},cn=()=>{const{latitude:G0,longitude:Co,state:Lo,zipcode:X0}=hr.current;return!!(G0&&Co&&Lo&&X0)},Un=(0,t.useCallback)(G0=>{hr.current={latitude:void 0,longitude:void 0,state:void 0,zipcode:void 0,placeId:void 0,addressDescription:void 0},Gn.item&&(eo&&Wr(eo,[{valueString:""}]),_o&&Wr(_o,[{valueDecimal:void 0}]),ft&&Wr(ft,[{valueDecimal:void 0}]),d0&&Wr(d0,[{valueString:""}])),un({lat:"",lng:"",location:"",zipCode:"",placeId:"",addressDescription:"",locationType:G0,locationPermission:bn}),jt&&jt(!1),tr("")},[Wr,Gn.item,_o,bn,ft,jt,un,eo,d0]);(0,t.useEffect)(()=>{if(!Ri)return;!cn()&&jt&&jt(!1)},[tn,Ri,jt]);const nr=G0=>{hr.current=Sn(Sn({},hr.current),G0),G0.addressDescription&&_i("address_selected",{value:G0.addressDescription,_event_metadata:{description:"A user selected an address from the typeahead."}}),vo(hr.current.latitude,hr.current.longitude,hr.current.state,hr.current.zipcode,hr.current.placeId,hr.current.addressDescription)},e0=G0=>Rt(void 0,null,function*(){var Co,Lo,X0;if(tr(""),hr.current.zipcode=G0,jt&&jt(!1),Vt(G0)){_i("zip_code_entered",{value:G0,_event_metadata:{description:"A user entered a zip code."}});const to=yield xr({variables:{location:G0}}),E0=(Co=to?.data)==null?void 0:Co.geocoding,f0=to?.error;if(E0){const gi=E0.stateCode||"",ko=(Lo=E0.latitude)!=null?Lo:void 0,zi=(X0=E0.longitude)!=null?X0:void 0;nr({latitude:ko,longitude:zi,state:gi,zipcode:G0,placeId:void 0,addressDescription:void 0})}else f0&&(nr({latitude:void 0,longitude:void 0,state:void 0,zipcode:G0,placeId:void 0,addressDescription:void 0}),tr(jo("SELECT_DIFFERENT_ZIPCODE_OR_LOCATION_TYPE_ERROR")))}else vo(hr.current.latitude,hr.current.longitude,hr.current.state,G0)}),p0=()=>{const G0=hr.current.zipcode||"";!G0||Qi!==Dt.LocationType.ZIP_CODE||Vt(G0)};(0,t.useEffect)(()=>{Xn.locationType&&(Oa(Xn.locationType),Xn.locationType===Dt.LocationType.ZIP_CODE&&Xn.zipCode&&e0(Xn.zipCode),Xn.locationType===Dt.LocationType.ADDRESS&&Xn.placeId&&Xn.addressDescription&&(hr.current.addressDescription=Xn.addressDescription,hr.current.placeId=Xn.placeId))},[]),(0,t.useEffect)(()=>{const G0=[Dt.LocationPermissionEnum.DENIED,Dt.LocationPermissionEnum.UNAVAILABLE,Dt.LocationPermissionEnum.BLOCKED].includes(Xn.locationPermission),Co=[Dt.LocationPermissionEnum.GRANTED,Dt.LocationPermissionEnum.PROMPT].includes(Xn.locationPermission);if(G0&&Pe.length!==2){if(Ce([{id:Dt.LocationType.ADDRESS,label:"Address"},{id:Dt.LocationType.ZIP_CODE,label:"Zip code"}]),Qi===Dt.LocationType.CURRENT_LOCATION||!Xn.locationType||Xn.locationType===""){const Lo=Xn.locationType===Dt.LocationType.ZIP_CODE?Dt.LocationType.ZIP_CODE:Dt.LocationType.ADDRESS;Oa(Lo),un(et(Sn({},Xn),{locationType:Lo})),Un(Lo)}tr("")}Co&&Pe.length!==3&&Ce([{id:Dt.LocationType.CURRENT_LOCATION,label:"Current Location"},{id:Dt.LocationType.ADDRESS,label:"Address"},{id:Dt.LocationType.ZIP_CODE,label:"Zip code"}])},[Qi,bn,Pe.length,Xn,un,Un]);const vo=(G0,Co,Lo,X0,to,E0)=>{if(!Gn.item)return;eo&&Wr(eo,[{valueString:Lo||""}]),_o&&Wr(_o,[{valueDecimal:G0}]),ft&&Wr(ft,[{valueDecimal:Co}]),d0&&Wr(d0,[{valueString:X0||""}]),un(et(Sn({},Xn),{lat:String(G0),lng:String(Co),location:`${G0},${Co}`,zipCode:X0||"",placeId:to||"",addressDescription:E0||"",locationPermission:bn}));const f0=cn()&&Vt(X0||"");jt&&jt(f0),Ur&&Ur(Ii)};(0,t.useEffect)(()=>{const G0=()=>Rt(void 0,null,function*(){var Co;try{const Lo=yield dr({variables:{latitude:String(Pn?.coords.latitude),longitude:String(Pn?.coords.longitude)}}),X0=(Co=Lo?.data)==null?void 0:Co.geocodingByLatLon,to=X0?.stateCode||"",E0=X0?.zipCode||"";(!E0||!to)&&tr(jo("SELECT_DIFFERENT_LOCATION_TYPE_ERROR")),nr({latitude:Pn?.coords.latitude,longitude:Pn?.coords.longitude,state:to,zipcode:E0,placeId:void 0,addressDescription:void 0})}catch{Oa(Dt.LocationType.ADDRESS)}});Qi===Dt.LocationType.CURRENT_LOCATION&&Pn&&G0()},[Qi,Pn]);const y0=G0=>{if(!G0||!G0.latitude||!G0.longitude||!G0.zipCode||!G0.stateCode){nr({latitude:void 0,longitude:void 0,state:void 0,zipcode:void 0,placeId:void 0,addressDescription:void 0}),G0&&typeof G0.value=="string"&&G0.value.trim().length!==0&&tr(jo("SELECT_DIFFERENT_ADDRESS_OR_LOCATION_TYPE_ERROR"));return}nr({latitude:G0.latitude,longitude:G0.longitude,state:G0.stateCode,zipcode:G0.zipCode,placeId:G0.placeId,addressDescription:G0.description})};return(0,t.useEffect)(()=>{gt(ar||fr||O0||di)},[ar,fr,O0,di,gt]),(0,t.useEffect)(()=>{Xn.locationType!==Qi&&un(et(Sn({},Xn),{locationType:Qi}))},[Qi]),(0,n.jsxs)("div",{"data-testid":Gn.linkId,children:[(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:"Location type",required:Ri||!1}),(0,n.jsx)(s.Select,{id:Ii,"aria-label":Ii,"data-testid":Ii,isDisabled:Ui||fr||O0||Ve,selectedKey:Qi,onSelectionChange:G0=>{var Co;_i("location_type_input_selected",{choice:(Co=Pe.find(({id:Lo})=>Lo===G0))==null?void 0:Co.label,_event_metadata:{description:"A user changed the location type input."}}),G0!==Qi&&(Un(G0),Oa(G0))},hint:ci,isInvalid:!!ci,items:Pe,placeholder:"Select an option",isRequired:Ri,children:G0=>(0,n.jsx)(s.Select.Item,{id:G0.id,"data-testid":G0.id,value:G0,children:G0.label},G0.id)},Ii),Qi===Dt.LocationType.CURRENT_LOCATION&&(0,n.jsx)(s.HintText,{isInvalid:!!Dr,children:Dr}),Qi===Dt.LocationType.ADDRESS&&(0,n.jsxs)("div",{className:"mt-3xl",children:[(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:"Address",required:Ri||!1}),(0,n.jsx)(Dt.AddressTypeahead,{onValueChange:y0,isDisabled:Ve,setIsLoading:gt,initialValue:{placeId:hr.current.placeId||"",description:hr.current.addressDescription||""},errorText:Dr||ci})]}),Qi===Dt.LocationType.ZIP_CODE&&(0,n.jsxs)("div",{className:"mt-3xl",children:[(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:"Zip code",required:Ri||!1}),(0,n.jsx)(s.Input,{isRequired:Ri,size:"md","aria-label":"zipcode-input","data-testid":"zipcode-input",id:`${Ii}-zipcode`,placeholder:"Type your response here...",value:hr.current.zipcode||"",onChange:e0,onBlur:p0,isDisabled:Ui||O0||Ve,hint:Dr||ci,isInvalid:!!Dr||!!ci,autoComplete:"postal-code"},`${Ii}-zipcode`)]})]})},qn=Gn=>(0,n.jsx)(Dt.DeviceLocationProvider,{children:(0,n.jsx)(kt,Sn({},Gn))}),Sr={[i.cX]:qn,[i.G6]:ve,[i.c3]:Ot,[i.AA]:xe,[i.mO]:f,[i.PM]:U,[i.HH]:k,[i.Us]:Se,[i.Tl]:P,[i.G0]:b,[i.m3]:g,[i.PU]:R,[i.XP]:c.l,[i.uH]:L.v,[i.it]:$e.d};var pn,Ln=new Uint8Array(16);function mr(){if(!pn&&(pn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!pn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pn(Ln)}const Bn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Xr(Gn){return typeof Gn=="string"&&Bn.test(Gn)}const Yr=Xr;for(var Nt=[],Fe=0;Fe<256;++Fe)Nt.push((Fe+256).toString(16).substr(1));function ot(Gn){var Wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ur=(Nt[Gn[Wr+0]]+Nt[Gn[Wr+1]]+Nt[Gn[Wr+2]]+Nt[Gn[Wr+3]]+"-"+Nt[Gn[Wr+4]]+Nt[Gn[Wr+5]]+"-"+Nt[Gn[Wr+6]]+Nt[Gn[Wr+7]]+"-"+Nt[Gn[Wr+8]]+Nt[Gn[Wr+9]]+"-"+Nt[Gn[Wr+10]]+Nt[Gn[Wr+11]]+Nt[Gn[Wr+12]]+Nt[Gn[Wr+13]]+Nt[Gn[Wr+14]]+Nt[Gn[Wr+15]]).toLowerCase();if(!Yr(Ur))throw TypeError("Stringified UUID is invalid");return Ur}const Je=ot;function tt(Gn,Wr,Ur){Gn=Gn||{};var Go=Gn.random||(Gn.rng||mr)();if(Go[6]=Go[6]&15|64,Go[8]=Go[8]&63|128,Wr){Ur=Ur||0;for(var jo=0;jo<16;++jo)Wr[Ur+jo]=Go[jo];return Wr}return Je(Go)}const rt=tt,lt=(Gn,Wr="application/octet-stream")=>{try{const Ur=window.atob(Gn),Go=new Uint8Array(Ur.length);for(let di=0;di<Ur.length;di++)Go[di]=Ur.charCodeAt(di);return new Blob([Go],{type:Wr}).size}catch{return 0}},St=(Gn,Wr)=>`data:${Wr};base64,${Gn}`,st=(Gn,Wr,Ur=512)=>{const Go=window.atob(Gn),jo=[];for(let _i=0;_i<Go.length;_i+=Ur){const Ii=Go.slice(_i,_i+Ur),Ri=new Array(Ii.length);for(let ci=0;ci<Ii.length;ci++)Ri[ci]=Ii.charCodeAt(ci);const Ui=new Uint8Array(Ri);jo.push(Ui)}const di=new Blob(jo,{type:Wr});return URL.createObjectURL(di)},le=Gn=>{const Wr=new Date().toISOString().replace(/[:.-]/g,"");return`${Gn.split(" ").join("-")}_${Wr}`},ye=4e3,Ue=.8,Te=(Gn,Wr)=>{var Ur,Go;const jo=(Ur=Wr?.maxDimension)!=null?Ur:ye,di=(Go=Wr?.quality)!=null?Go:Ue;return new Promise((_i,Ii)=>{if(!Gn.type.startsWith("image/")){_i(Gn);return}if(Gn.type==="image/heic"||Gn.type==="image/heif"||Gn.name.toLowerCase().endsWith(".heic")||Gn.name.toLowerCase().endsWith(".heif")){_i(Gn);return}const Ui=new Image,ci=new FileReader;ci.onload=()=>{const Qi=ci.result;Ui.onload=()=>{let{width:Oa,height:Dr}=Ui;if(Oa>jo||Dr>jo){const Ve=jo/Math.max(Oa,Dr);Oa=Math.round(Oa*Ve),Dr=Math.round(Dr*Ve)}const tr=document.createElement("canvas");tr.width=Oa,tr.height=Dr;const hr=tr.getContext("2d");if(!hr){_i(Gn);return}hr.drawImage(Ui,0,0,Oa,Dr);const Pe=Gn.type==="image/png"?"image/png":"image/jpeg",Ce=Gn.type==="image/png"?void 0:di;tr.toBlob(Ve=>{if(!Ve||Ve.size>=Gn.size){_i(Gn);return}_i(new File([Ve],Gn.name,{type:Pe}))},Pe,Ce)},Ui.onerror=()=>{Ii(new Error(`Failed to load image: ${Gn.name}`))},Ui.src=Qi},ci.onerror=()=>{Ii(new Error(`Failed to read file: ${Gn.name}`))},ci.readAsDataURL(Gn)})},Tt=50,Zt=(Gn,Wr=Tt)=>{if(Gn.length<=Wr)return Gn;const Ur=Gn.lastIndexOf("."),Go=Ur!==-1?Gn.slice(Ur):"",jo=Ur!==-1?Gn.slice(0,Ur):Gn,di=Wr-Go.length-1,_i=Math.ceil(di/2),Ii=Math.floor(di/2);return`${jo.slice(0,_i)}\u2026${jo.slice(-Ii)}${Go}`};var vn=Object.defineProperty,_n=Object.defineProperties,Ar=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,At=(Gn,Wr,Ur)=>Wr in Gn?vn(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,Gt=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))we.call(Wr,Ur)&&At(Gn,Ur,Wr[Ur]);if(Ft)for(var Ur of Ft(Wr))Ze.call(Wr,Ur)&&At(Gn,Ur,Wr[Ur]);return Gn},Yt=(Gn,Wr)=>_n(Gn,Ar(Wr)),rn=(Gn,Wr,Ur)=>new Promise((Go,jo)=>{var di=Ri=>{try{Ii(Ur.next(Ri))}catch(Ui){jo(Ui)}},_i=Ri=>{try{Ii(Ur.throw(Ri))}catch(Ui){jo(Ui)}},Ii=Ri=>Ri.done?Go(Ri.value):Promise.resolve(Ri.value).then(di,_i);Ii((Ur=Ur.apply(Gn,Wr)).next())});const $n=({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i})=>{const{linkId:Ii,text:Ri,required:Ui,prefix:ci,readOnly:Qi,repeats:Oa,extension:Dr}=Gn,tr=(0,a.Qr)(Dr),hr=(0,a.cz)(Dr),Pe=(0,a.$H)(Dr)||"image/*,.pdf,.doc,.docx",Ce=Ri?(0,a.nt)(jo,ci,Ri):"",Ve=di?.[Ii]||"",[gt,jt]=(0,t.useState)([]),tn=(0,t.useRef)(Ur||[]);(0,t.useEffect)(()=>{Ur&&(tn.current=Ur)},[Ur]),(0,t.useEffect)(()=>{Ur?.length&&jt(dr=>{const fr=dr.filter(O0=>O0.isLoading||O0.failed);return[...Ur.filter(O0=>O0.valueAttachment).map((O0,d0)=>{var eo,_o,ft,Vt,cn;const Un=((eo=O0.valueAttachment)==null?void 0:eo.title)||`attachment-${d0}`,nr=(_o=O0.valueAttachment)==null?void 0:_o.id,e0=dr.find(y0=>nr&&y0.id===nr||!nr&&y0.id===`existing-${d0}`),p0=(ft=O0.valueAttachment)==null?void 0:ft.data,vo=p0?lt(p0,(Vt=O0.valueAttachment)==null?void 0:Vt.contentType):0;return{id:nr||e0?.id||`existing-${d0}`,name:Un,size:e0?.size||vo,progress:100,failed:!1,type:(0,a.J4)((cn=O0.valueAttachment)==null?void 0:cn.contentType),isLoading:!1}}),...fr]})},[Ur]);const Pn=dr=>{let fr=Array.from(dr);if(hr!==void 0){const O0=hr-gt.length;if(O0<=0)return;fr=fr.slice(0,O0)}const xr=fr.map(O0=>{const d0=O0.name.replace(/\s+/g,"-");return{id:rt(),name:d0,size:O0.size,progress:0,type:(0,a.J4)(O0.type),failed:!1,isLoading:!0}});jt(O0=>[...O0,...xr]),xr.forEach(O0=>{const d0=fr.find(eo=>eo.name.replace(/\s+/g,"-")===O0.name);d0&&ar(d0,O0.id)})},ar=(dr,fr)=>rn(void 0,null,function*(){try{const xr=yield Te(dr);if(tr&&xr.size>tr){const Vt=parseFloat((tr/1e6).toFixed(1));jt(cn=>cn.map(Un=>Un.id===fr?Yt(Gt({},Un),{isLoading:!1,failed:!0,disableRetry:!0,errorMessage:`File size exceeds ${Vt} MB limit`}):Un));return}const O0=yield un(xr),d0=xr.name.replace(/\s+/g,"-");jt(Vt=>Vt.map(cn=>cn.id===fr?Yt(Gt({},cn),{isLoading:!1,progress:100,failed:!1}):cn));const eo={valueAttachment:{id:fr,contentType:xr.type,data:O0,title:d0}},ft=[...(tn.current||[]).filter(Vt=>Vt.valueAttachment||Object.keys(Vt).length>0),eo];tn.current=ft,Go(Gn,ft),Wr(Ii)}catch{jt(O0=>O0.map(d0=>d0.id===fr?Yt(Gt({},d0),{isLoading:!1,failed:!0}):d0))}}),bn=dr=>{const fr=gt.find(xr=>xr.id===dr);if(jt(xr=>xr.filter(O0=>O0.id!==dr)),fr){const xr=(tn.current||[]).filter((O0,d0)=>{var eo;if(dr.startsWith("existing-")){const _o=parseInt(dr.replace("existing-",""));return d0!==_o}return((eo=O0.valueAttachment)==null?void 0:eo.id)!==dr}).filter(O0=>O0.valueAttachment||Object.keys(O0).length>0);tn.current=xr,Go(Gn,xr.length>0?xr:[{}])}},Xn=dr=>{const fr=gt.find(xr=>xr.id===dr);if(fr){jt(O0=>O0.map(d0=>d0.id===dr?Yt(Gt({},d0),{failed:!1,isLoading:!0,progress:0}):d0));const xr=new File([""],fr.name,{type:"application/octet-stream"});ar(xr,dr)}},un=dr=>new Promise((fr,xr)=>{const O0=new FileReader;O0.onload=()=>{const eo=O0.result.split(",")[1];fr(eo)},O0.onerror=xr,O0.readAsDataURL(dr)});return(0,n.jsxs)("div",{children:[Ce&&(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:Ce,required:Ui||!1}),(0,n.jsx)(s.FileUpload,{files:gt,onDropFiles:Pn,onDeleteFile:bn,onRetryFile:Xn,onDropUnacceptedFiles:()=>{},hint:(0,a.od)(Pe,tr,hr),accept:Pe,allowsMultiple:Oa!==!1,isDisabled:Qi||_i||hr!==void 0&&gt.length>=hr,className:"w-full",showDisclosureModal:!0}),Ve&&(0,n.jsx)("div",{className:"text-error-primary mt-2 text-sm",children:Ve})]})},Vr=({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i})=>{var Ii,Ri;const{linkId:Ui,text:ci,prefix:Qi,readOnly:Oa,required:Dr,extension:tr}=Gn,{trackQuestionnaireEvent:hr}=(0,h.c)(),Pe=ci?(0,a.nt)(jo,Qi,ci):"",Ce=di?.[Ui];return tr?.find(gt=>{var jt,tn;return gt.url===i.gD&&((tn=(jt=gt.valueCodeableConcept)==null?void 0:jt.coding)==null?void 0:tn.some(Pn=>Pn.system===i.n4&&Pn.code===i.GI))})?(0,n.jsxs)("div",{"data-testid":Ui,children:[(0,n.jsxs)("div",{className:"flex items-start gap-3","data-testid":Ui,children:[(0,n.jsx)(s.Checkbox,{size:"md",id:Ui,name:Ui,isDisabled:Oa||_i,isSelected:(Ii=Ur?.[0])==null?void 0:Ii.valueBoolean,"aria-label":Ui,label:"",className:"mt-1",onChange:gt=>{hr(Gn.linkId,{value:gt}),Go(Gn,[{valueBoolean:gt}]),Wr(Gn.linkId)}}),Pe&&(0,n.jsx)(N,{isLabel:!0,text:Pe,required:Dr||!1})]}),(0,n.jsx)(s.HintText,{isInvalid:!!Ce,children:Ce})]}):(0,n.jsxs)("div",{"data-testid":Ui,children:[Pe&&(0,n.jsx)(N,{isLabel:!0,text:Pe,required:Dr||!1}),(0,n.jsxs)(s.RadioGroup,{size:"md",id:Ui,name:Ui,"aria-label":Ui,value:String((Ri=Ur?.[0])==null?void 0:Ri.valueBoolean)||"",onChange:gt=>{Go(Gn,[{valueBoolean:gt==="true"}]),Wr(Gn.linkId)},isInvalid:!!Ce,children:[(0,n.jsx)(s.RadioButton,{size:"md",value:"true",label:"Yes",isDisabled:Oa||_i}),(0,n.jsx)(s.RadioButton,{size:"md",value:"false",label:"No",isDisabled:Oa||_i})]},Ui),Ce&&(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:(0,D.cx)("text-error-primary","text-sm","mt-[1.5]"),children:Ce})})]})};var Lt=Object.defineProperty,Et=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,hn=(Gn,Wr,Ur)=>Wr in Gn?Lt(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,Tn=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))bt.call(Wr,Ur)&&hn(Gn,Ur,Wr[Ur]);if(Et)for(var Ur of Et(Wr))qt.call(Wr,Ur)&&hn(Gn,Ur,Wr[Ur]);return Gn};const zr=({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i,placeholder:Ii,hintText:Ri})=>{var Ui,ci,Qi;const{linkId:Oa,text:Dr,required:tr,answerOption:hr,prefix:Pe,readOnly:Ce}=Gn,Ve=Dr?(0,a.nt)(jo,Pe,Dr):"",gt=hr?.map(Pn=>{var ar,bn,Xn,un;return{id:((ar=Pn.valueCoding)==null?void 0:ar.code)||Pn.valueString||"",label:((bn=Pn.valueCoding)==null?void 0:bn.display)||Pn.valueString||"",value:((Xn=Pn.valueCoding)==null?void 0:Xn.code)||Pn.valueString||"",extension:Pn.extension||[],system:((un=Pn.valueCoding)==null?void 0:un.system)||void 0}})||[],jt=((ci=(Ui=Ur?.[0])==null?void 0:Ui.valueCoding)==null?void 0:ci.code)||((Qi=Ur?.[0])==null?void 0:Qi.valueString)||"",tn=di?.[Oa];return(0,n.jsxs)("div",{children:[Ve&&(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:Ve,required:tr||!1}),(0,n.jsx)(s.Select,{id:Oa,"aria-label":Oa,"data-testid":Oa,isDisabled:Ce||_i,selectedKey:jt,onSelectionChange:Pn=>{const ar=String(Pn),bn=gt.find(dr=>dr.value===ar),Xn=bn?bn.label:"",un=Boolean(hr?.find(dr=>dr.valueString===ar));Go(Gn,[un?{valueString:ar}:{valueCoding:Tn({code:ar,display:Xn},bn?.system?{system:bn.system}:{}),extension:bn?.extension||[]}]),Wr(Gn.linkId)},isInvalid:!!tn,hint:tn||Ri,items:gt,placeholder:Ii,isRequired:tr,children:Pn=>(0,n.jsx)(s.Select.Item,{id:Pn.id,"data-testid":Pn.value,value:Pn.value,children:Pn.label},Pn.id)},Oa)]})};var zn=Object.defineProperty,gn=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,Pt=(Gn,Wr,Ur)=>Wr in Gn?zn(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,Ut=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))en.call(Wr,Ur)&&Pt(Gn,Ur,Wr[Ur]);if(gn)for(var Ur of gn(Wr))Mt.call(Wr,Ur)&&Pt(Gn,Ur,Wr[Ur]);return Gn};const ln=Gn=>{var Wr,Ur,Go;const{item:jo,selectedAnswer:di,updatedText:_i,required:Ii,errorMessage:Ri}=Gn,Ui=jo?.type==="reference",ci=(Wr=di?.map(hr=>{var Pe,Ce;return Ui?(Pe=hr.valueReference)==null?void 0:Pe.display:(Ce=hr.valueCoding)==null?void 0:Ce.code}).filter(hr=>hr!==void 0))!=null?Wr:[],[Qi,Oa]=(0,t.useState)(ci.length),Dr=(Go=(Ur=jo.extension)==null?void 0:Ur.find(hr=>hr.url===i.Z_))==null?void 0:Go.valueInteger,tr=(hr,Pe)=>{var Ce,Ve,gt;let jt;if(hr){const tn=Gn.options.find(Pn=>Pn.value===Pe);jt=[...(Ve=(Ce=Gn.selectedAnswer)==null?void 0:Ce.filter(Pn=>Object.keys(Pn).length!==0))!=null?Ve:[],Ui?{valueReference:tn?.valueReference}:{valueCoding:Ut({code:Pe,display:tn?.label},tn?.system?{system:tn.system}:{}),extension:tn?.extension||[]}],Oa(Pn=>Pn+1)}else jt=((gt=Gn.selectedAnswer)==null?void 0:gt.filter(tn=>{var Pn,ar;return Ui?((Pn=tn.valueReference)==null?void 0:Pn.display)!==Pe:((ar=tn.valueCoding)==null?void 0:ar.code)!==Pe}))||[{}],Oa(tn=>tn-1);Gn.handleInputChange(Gn.item,jt)};return(0,n.jsxs)("div",{"data-testid":jo.linkId,children:[_i&&(0,n.jsx)(N,{isLabel:!0,text:_i,required:Ii||!1}),(0,n.jsx)("div",{children:Gn.options.map((hr,Pe)=>(0,n.jsx)(s.Checkbox,{size:"md","data-testid":hr.value,id:Pe.toString(),className:Pe!==Gn.options.length-1?"mb-2xl":"",name:hr.label,isInvalid:!!Ri,isSelected:ci?.includes(hr?.value),label:hr.label,onChange:Ce=>tr(Ce,hr.value),isDisabled:Gn.readOnly||Gn.isLoading||(!ci?.includes(hr?.value)&&Dr?Qi>=Dr:!1)},Pe))}),(0,n.jsx)(s.HintText,{isInvalid:!!Ri,children:Ri})]})},Jt=({item:Gn,onCompleteHandler:Wr,updatedText:Ur,options:Go,handleInputChange:jo,errorMessage:di,readOnly:_i,initialValue:Ii,selectedAnswer:Ri,isLoading:Ui,required:ci})=>{var Qi,Oa;const Dr=`${Gn.linkId}-label`,tr=`${Gn.linkId}-error`;return(0,n.jsxs)("div",{"data-testid":Gn.linkId,children:[Ur&&(0,n.jsx)(N,{id:Dr,isLabel:!0,text:Ur,required:ci||!1}),(0,n.jsx)(s.RadioGroup,{size:"md",id:Gn.linkId,name:Gn.linkId,"aria-labelledby":Ur?Dr:void 0,"aria-describedby":di?tr:void 0,isRequired:ci,className:Go.length===2?"flex-row flex-wrap gap-8":"gap-6",value:((Oa=(Qi=Ri?.[0])==null?void 0:Qi.valueCoding)==null?void 0:Oa.code)||Ii||"",onChange:hr=>{const Pe=hr,Ce=Go.find(gt=>gt.value===Pe),Ve=Ce?Ce.label:"";jo(Gn,[{valueCoding:{code:Pe,display:Ve,system:Ce?.system||void 0},extension:Ce?.extension||[]}]),Wr(Gn.linkId)},isInvalid:!!di,children:Go.map(hr=>(0,n.jsx)(s.RadioButton,{size:"md","data-testid":hr.value,isDisabled:_i||Ui,value:hr.value,label:hr.label},hr.value))},Gn.linkId),di&&(0,n.jsx)("div",{id:tr,children:(0,n.jsx)("span",{className:(0,D.cx)("text-error-primary","text-sm","mt-[1.5]"),children:di})})]})};var En=Object.defineProperty,jn=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,$r=(Gn,Wr,Ur)=>Wr in Gn?En(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,c0=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))Hr.call(Wr,Ur)&&$r(Gn,Ur,Wr[Ur]);if(jn)for(var Ur of jn(Wr))Rr.call(Wr,Ur)&&$r(Gn,Ur,Wr[Ur]);return Gn};const xo=({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i,placeholder:Ii,hintText:Ri})=>{var Ui,ci,Qi,Oa,Dr;const{linkId:tr,text:hr,required:Pe,answerOption:Ce,prefix:Ve,readOnly:gt}=Gn,jt=Gn?.type==="reference",tn=hr?(0,a.nt)(jo,Ve,hr):"",ar=(()=>{var xr,O0;const d0=Ce?.find(eo=>eo.initialSelected===!0);return d0?jt?((xr=d0.valueReference)==null?void 0:xr.display)||"":((O0=d0?.valueCoding)==null?void 0:O0.code)||"":""})(),bn=(Ce?.map(xr=>{var O0,d0,eo,_o,ft;return{label:((O0=xr?.valueCoding)==null?void 0:O0.display)||((d0=xr?.valueReference)==null?void 0:d0.display)||"",value:jt?((eo=xr.valueReference)==null?void 0:eo.display)||"":((_o=xr.valueCoding)==null?void 0:_o.code)||"",valueReference:jt?xr.valueReference:{},extension:xr.extension||[],system:((ft=xr.valueCoding)==null?void 0:ft.system)||""}})||[]).filter(xr=>xr.label),Xn=di?.[tr],un=(Dr=(Oa=(Qi=(ci=(Ui=Gn?.extension)==null?void 0:Ui.find(xr=>xr.url.includes("questionnaire-itemControl")))==null?void 0:ci.valueCodeableConcept)==null?void 0:Qi.coding)==null?void 0:Oa[0])==null?void 0:Dr.code;let dr=null;const fr={item:Gn,onCompleteHandler:Wr,updatedText:tn,options:bn,handleInputChange:Go,errorMessage:Xn,required:Pe,readOnly:gt,initialValue:ar,selectedAnswer:Ur,isLoading:_i,showQuestionPrefix:jo,placeholder:Ii,hintText:Ri};switch(un){case"drop-down":dr=(0,n.jsx)(zr,c0({},fr));break;case"check-box":dr=(0,n.jsx)(ln,c0({},fr));break;case"radio-button":dr=(0,n.jsx)(Jt,c0({},fr));break}return(0,n.jsx)(n.Fragment,{children:dr})};var B0=e(73697),Q0=e(71924),q0=e(46776),ho=e(16681);const br=Gn=>`${String(Gn.month).padStart(2,"0")}/${String(Gn.day).padStart(2,"0")}/${Gn.year}`,Mr=({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i,placeholder:Ii,hintText:Ri})=>{var Ui,ci,Qi;const{linkId:Oa,text:Dr,required:tr,prefix:hr,readOnly:Pe}=Gn,Ce=(0,t.useRef)(null),[Ve,gt]=(0,t.useState)(!1),[jt,tn]=(0,t.useState)(null),{t:Pn}=(0,r.SS)(),{setIsCurrentFormValid:ar,isCurrentFormValid:bn,trackQuestionnaireEvent:Xn}=(0,h.c)(),un=Dr?(0,a.nt)(jo,hr,Dr):"",dr=di?.[Oa]||"",fr=(Ui=Gn.extension)==null?void 0:Ui.find(X0=>X0.url===i.dU),xr=(ci=Gn.extension)==null?void 0:ci.find(X0=>X0.url===i.bK),O0=(0,t.useMemo)(()=>{var X0;const to=fr?.valueString||fr?.valueDate;return to||(0,a.iI)((X0=fr?.valueExpression)==null?void 0:X0.expression)},[fr]),d0=(0,t.useMemo)(()=>{var X0;const to=xr?.valueString||xr?.valueDate;return to||(0,a.iI)((X0=xr?.valueExpression)==null?void 0:X0.expression)},[xr]),eo=(0,t.useMemo)(()=>{if(O0&&/^\d{4}-\d{2}-\d{2}$/.test(O0))try{return(0,B0._U)(O0)}catch{}return(0,B0._U)("1900-01-01")},[O0]),_o=(0,t.useMemo)(()=>{if(d0&&/^\d{4}-\d{2}-\d{2}$/.test(d0))try{return(0,B0._U)(d0)}catch(X0){console.warn("Failed to parse maxDateStr:",d0,X0)}return(0,B0._U)("2099-12-31")},[d0]),Vt=(X0=>{if(!X0)return"";const to=X0.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!to)return X0;const[,E0,f0,gi]=to;return`${f0}/${gi}/${E0}`})(((Qi=Ur?.[0])==null?void 0:Qi.valueDate)||""),cn=X0=>{if(!X0)return"";const to=X0.replace(/\D/g,"");if(to.length===0)return"";if(to.length<=2)return to.length===2?`${to}/`:to;const E0=gi=>{const ko=gi.slice(0,2),zi=gi.slice(2);return zi.length===2?`${ko}/${zi}/`:`${ko}/${zi}`},f0=gi=>{const ko=gi.slice(0,2),zi=gi.slice(2,4),xi=gi.slice(4,8);return`${ko}/${zi}/${xi}`};return to.length<=4?E0(to):f0(to)},Un=()=>{if(Pe||_i)return;if(Vt.match(/^(\d{4})-(\d{2})-(\d{2})$/))try{const to=(0,B0._U)(Vt);tn(to)}catch{tn(null)}else{const to=Vt.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(to){const[,E0,f0,gi]=to,ko=parseInt(E0,10),zi=parseInt(f0,10);if(ko>=1&&ko<=12&&zi>=1&&zi<=31)try{const xi=(0,B0._U)(`${gi}-${E0}-${f0}`);tn(xi)}catch{tn(null)}else tn(null)}else tn(null)}gt(!0)},nr=()=>{if(jt){const X0=`${jt.year}-${String(jt.month).padStart(2,"0")}-${String(jt.day).padStart(2,"0")}`;Xn(Gn.linkId,{value:(0,a.CP)(`${String(jt.month).padStart(2,"0")}/${String(jt.day).padStart(2,"0")}/${jt.year}`)}),Go(Gn,[{valueDate:(0,a.Fy)(X0)}])}gt(!1),tn(null)},e0=()=>{gt(!1),tn(null)},p0=X0=>{var to;const E0=((to=Ce.current)==null?void 0:to.selectionStart)||0,f0=Vt,gi=cn(X0),ko=gi.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(ko){const[,zi,xi,ya]=ko,ma=parseInt(zi,10),Js=parseInt(xi,10),Ws=parseInt(ya,10);if(vo(ma,Js,Ws).isValid){const Ki=`${ya}-${zi}-${xi}`;Xn(Gn.linkId,{value:(0,a.CP)(`${zi}/${xi}/${ya}`)}),Go(Gn,[{valueDate:(0,a.Fy)(Ki)}])}else Go(Gn,[{valueDate:gi}])}else Go(Gn,[{valueDate:gi}]);setTimeout(()=>{if(Ce.current){const zi=f0.replace(/\D/g,""),xi=gi.replace(/\D/g,"");let ya=E0;gi===f0&&(ya=E0-1),xi.length>=zi.length&&gi!==f0?gi[E0-1]==="/"?ya=E0+1:ya=E0:xi.length<zi.length&&(f0[E0-1]==="/"?ya=Math.max(0,E0-1):ya=E0),Ce.current.setSelectionRange(ya,ya)}},0)},vo=(X0,to,E0)=>{if(X0<1||X0>12)return{isValid:!1,error:(0,a.u0)(Pn,ho.p.VALIDATION_MONTH_RANGE,"Month must be between 01 and 12")};if(to<1||to>31)return{isValid:!1,error:(0,a.u0)(Pn,ho.p.VALIDATION_DAY_RANGE,"Day must be between 01 and 31")};const f0=new Date(E0,X0,0).getDate();if(to>f0)return{isValid:!1,error:(0,a.u0)(Pn,ho.p.VALIDATION_INVALID_DAY_FOR_MONTH,"Invalid day for the selected month")};if(O0||d0){const gi=new Q0.ng(E0,X0,to);if(O0&&/^\d{4}-\d{2}-\d{2}$/.test(O0))try{const ko=(0,B0._U)(O0);if(gi.compare(ko)<0){const zi=(0,a.di)(i.Ck,Gn.extension);if(zi)return{isValid:!1,error:zi};const xi=br(ko);return{isValid:!1,error:(0,a.u0)(Pn,ho.p.VALIDATION_DATE_ON_OR_AFTER,"Date must be on or after {{minDate}}",{minDate:xi})}}}catch{}if(d0&&/^\d{4}-\d{2}-\d{2}$/.test(d0))try{const ko=(0,B0._U)(d0);if(gi.compare(ko)>0){const zi=(0,a.di)(i.Cx,Gn.extension);if(zi)return{isValid:!1,error:zi};const xi=br(ko);return{isValid:!1,error:(0,a.u0)(Pn,ho.p.VALIDATION_DATE_ON_OR_BEFORE,"Date must be on or before {{maxDate}}",{maxDate:xi})}}}catch{}}return{isValid:!0,error:""}},y0=()=>{const X0=Vt.replace(/\D/g,"");if(X0.length>0&&X0.length<8){Wr(Gn.linkId);return}const to=Vt.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(!to&&X0.length>=6){Wr(Gn.linkId);return}if(to){const[,E0,f0,gi]=to,ko=parseInt(E0,10),zi=parseInt(f0,10),xi=parseInt(gi,10);if(vo(ko,zi,xi).isValid){const ya=`${gi}-${E0}-${f0}`;Go(Gn,[{valueDate:(0,a.Fy)(ya)}])}}Wr(Gn.linkId)},Co=(()=>{if(!Vt)return"";const X0=Vt.replace(/\D/g,"");if(X0.length>0&&X0.length<8)return"";const to=Vt.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(!to&&X0.length>=6)return bn&&ar(!1),(0,a.u0)(Pn,ho.p.VALIDATION_INVALID_DATE,"Invalid date");if(to){const[,E0,f0,gi]=to,ko=parseInt(E0,10),zi=parseInt(f0,10),xi=parseInt(gi,10),{isValid:ya,error:ma}=vo(ko,zi,xi);if(!ya)return bn&&ar(!1),ma||(0,a.u0)(Pn,ho.p.VALIDATION_INVALID_DATE,"Invalid date")}return""})(),Lo=!!dr||!!Co;return(0,n.jsxs)("div",{children:[un&&(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:un,required:tr||!1}),(0,n.jsxs)("div",{className:"relative flex flex-row items-center",children:[(0,n.jsx)("button",{type:"button",disabled:Pe||_i,className:(0,D.cx)("absolute top-2.5 right-3 z-3 cursor-pointer p-0.5","outline-focus-ring rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2",(Pe||_i)&&"cursor-not-allowed opacity-50"),onClick:Un,"aria-label":"Open calendar",children:(0,n.jsx)(K.V,{className:"size-5 text-gray-400"})}),(0,n.jsx)("div",{className:(0,D.cx)("pointer-events-none absolute top-[7px] right-[2px] z-2 h-[30px] w-[35px] bg-white",(Pe||_i)&&"bg-disabled_subtle")}),(0,n.jsx)(s.Input,{ref:Ce,isRequired:tr,size:"md",type:"text",name:Oa,"data-testid":Oa,id:Oa,value:Vt,onChange:p0,placeholder:Ii,isDisabled:Pe||_i,onBlur:y0,hint:Co||dr||Ri,isInvalid:Lo,className:(0,D.cx)("[&_input::-webkit-inner-spin-button]:hidden","[&_input::-webkit-clear-button]:hidden","[&_input::-webkit-calendar-picker-indicator]:hidden")},Oa)]}),(0,n.jsx)(s.Modal,{id:"calendar-date-picker-modal",isOpen:Ve,onOpenChange:X0=>{X0||e0()},primaryButton:{children:"Apply",onClick:nr,isDisabled:!jt},secondaryButton:{children:"Cancel",onClick:e0},children:(0,n.jsx)(q0.lr,{value:jt,onChange:tn,minValue:eo,maxValue:_o,children:(0,n.jsx)(s.Calendar,{showDateInput:!1,minValue:eo,maxValue:_o,onYearPickerOpen:()=>{tn(null)}})})})]})},Or=({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i})=>{var Ii;const{linkId:Ri,text:Ui,required:ci,prefix:Qi,readOnly:Oa}=Gn,Dr=Ui?(0,a.nt)(jo,Qi,Ui):"",tr=di?.[Ri]||"";return(0,n.jsxs)("div",{children:[Dr&&(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:Dr,required:ci||!1}),(0,n.jsx)(s.Input,{isRequired:ci,size:"md",type:"datetime-local",id:Ri,"aria-label":Ri,"data-testid":Ri,placeholder:"Type your response here...",value:((Ii=Ur?.[0])==null?void 0:Ii.valueDateTime)||"",onChange:hr=>{let Pe=hr;const[Ce,Ve]=Pe.split("T");Ce&&Ve&&(Pe=`${(0,a.Fy)(Ce)}T${Ve}:00`),Go(Gn,[{valueDateTime:Pe}])},isDisabled:Oa||_i,onBlur:()=>{Wr(Gn.linkId)},hint:tr,isInvalid:!!tr},Ri)]})},R0=({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i,placeholder:Ii,hintText:Ri})=>{var Ui;const{linkId:ci,text:Qi,required:Oa,prefix:Dr,readOnly:tr}=Gn,hr=Qi?(0,a.nt)(jo,Dr,Qi):"",Pe=di?.[ci]||"",Ce=(0,a.a0)(Gn),Ve=(Ui=Ur?.[0])==null?void 0:Ui.valueDecimal,[gt,jt]=(0,t.useState)(String(Ve??""));return(0,t.useEffect)(()=>{jt(String(Ve??""))},[Ve]),(0,n.jsxs)("div",{children:[hr&&(0,n.jsx)(N,{isLabel:!0,text:hr,required:Oa||!1}),(0,n.jsx)(s.Input,{isRequired:Oa,size:"md",id:ci,"aria-label":ci,"data-testid":ci,placeholder:Ii,value:gt,onChange:tn=>{jt(tn)},isDisabled:tr||_i,onBlur:()=>{const tn=parseFloat(gt);jt(isNaN(tn)?"":String(tn)),Go(Gn,[{valueDecimal:isNaN(tn)?void 0:tn}]),Wr(Gn.linkId)},type:"number",hint:Pe||Ri,isInvalid:!!Pe,autoComplete:Ce},ci)]})},g0=({item:Gn,showStepper:Wr=!1})=>{var Ur;const{text:Go,linkId:jo,type:di}=Gn,_i=Go&&(0,a.nt)(!1,"",Go),Ii=(Ur=Gn.extension)==null?void 0:Ur.find(Qi=>Qi.url===i.Yt),Ri=Ii?.valueBoolean===!0,Ui=di==="group"&&(0,a.$O)(Gn)!==void 0,ci=()=>{const Qi=(0,a.$O)(Gn),Oa=(0,a.t7)(Gn);if(Qi===void 0||Oa===void 0||Oa<=0)return[];const Dr=[];for(let tr=1;tr<=Oa;tr++){let hr="incomplete";tr<Qi?hr="complete":tr===Qi&&(hr="current"),Dr.push({title:"",description:"",status:hr})}return Dr};return _i&&!Ri?(0,n.jsxs)("div",{"data-testid":jo,children:[(0,n.jsx)(N,{text:_i,required:!1,className:""}),Wr&&Ui&&(0,n.jsx)("div",{className:"mt-xl",children:(0,n.jsx)(s.Progress.MinimalIconsConnected,{orientation:"horizontal",size:"sm",items:ci()})})]}):null},no=({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i,placeholder:Ii,hintText:Ri})=>{var Ui;const{linkId:ci,text:Qi,required:Oa,prefix:Dr,readOnly:tr}=Gn,hr=Qi?(0,a.nt)(jo,Dr,Qi):"",Pe=di?.[ci]||"",Ce=(0,a.a0)(Gn);return(0,n.jsxs)("div",{children:[hr&&(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:hr,required:Oa||!1}),(0,n.jsx)(s.Input,{isRequired:Oa,"data-testid":ci,size:"md",id:ci,"aria-label":ci,placeholder:Ii,value:String((Ui=Ur?.[0])==null?void 0:Ui.valueInteger)||"",onChange:Ve=>{Go(Gn,[{valueInteger:Number(Ve)}])},isDisabled:tr||_i,onBlur:()=>{Wr(Gn.linkId)},type:"number",hint:Pe||Ri,isInvalid:!!Pe,autoComplete:Ce},ci)]})},Fo=({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i,placeholder:Ii,hintText:Ri})=>{var Ui,ci,Qi;const{linkId:Oa,text:Dr,extension:tr,required:hr,prefix:Pe,readOnly:Ce}=Gn,Ve=Dr?(0,a.nt)(jo,Pe,Dr):"",gt=tr?.find(Pn=>Pn.url.includes("questionnaire-unitOption")),jt=di?.[Oa],tn=(0,a.a0)(Gn);return(0,n.jsxs)("div",{children:[Ve&&(0,n.jsx)(N,{isLabel:!0,text:Ve,required:hr||!1}),(0,n.jsx)(s.InputGroup,{isRequired:hr,size:"md",id:Oa,"aria-label":Oa,"data-testid":Oa,value:(Ui=Ur?.[0])!=null&&Ui.valueQuantity?String((ci=Ur[0].valueQuantity)==null?void 0:ci.value):"",onChange:Pn=>{Go(Gn,[{valueQuantity:{value:parseFloat(Pn)}}])},isDisabled:Ce||_i,onBlur:()=>{var Pn,ar,bn;const Xn=(Pn=Ur?.[0])!=null&&Pn.valueQuantity?parseFloat(String((bn=(ar=Ur?.[0])==null?void 0:ar.valueQuantity)==null?void 0:bn.value)).toFixed(2):"";Go(Gn,[{valueQuantity:{value:parseFloat(Xn)}}]),Wr(Gn.linkId)},hint:jt||Ri,isInvalid:!!jt,trailingAddon:(0,n.jsx)("p",{className:"bg-primary ring-primary flex size-full w-max items-center rounded-lg rounded-l-none p-1 text-center ring-1 ring-inset",children:(Qi=gt?.valueCoding)==null?void 0:Qi.display}),children:(0,n.jsx)(s.InputBase,{type:"number",placeholder:Ii,autoComplete:tn})},Oa)]})},Uo={CURRENT_LOCATION:"current-location",ADDRESS:"address",ZIP_CODE:"zip-code"},si={[Uo.CURRENT_LOCATION]:ho.p.CURRENT_LOCATION,[Uo.ZIP_CODE]:ho.p.ZIP_CODE,[Uo.ADDRESS]:ho.p.ADDRESS},Di={mi:{singular:ho.p.MILE,plural:ho.p.MILES}},Li=({resourceData:Gn,handleInputChange:Wr,item:Ur,questionnaireSchemaItems:Go})=>{var jo;const{t:di}=(0,r.SS)(),{queryParams:_i}=(0,Dt.useSearchQueryParams)(),Ii=_i.locationType||"",{setCurrentGroupIndex:Ri,handleContinueButtonClick:Ui,setHideFooterButton:ci}=(0,h.c)(),{trackEvent:Qi}=(0,o.st)();(0,t.useEffect)(()=>{if(!Ur.readOnly)return ci(!0),()=>{ci(!1)}},[Ur.readOnly,ci]);const Oa=(jo=Ur.extension)==null?void 0:jo.find(ar=>ar.url===i.Uf),Dr=Oa?.valueString,tr=()=>{if(Dr){const ar=(0,a.Ue)(Go||[],Dr);ar!==-1&&Ri(ar)}},hr=ar=>{const bn=ar.find(Xn=>Xn.url.includes("description"));return bn?.valueString||""},Pe=ar=>{const bn=ar.find(O0=>O0.url.includes("distance-value")),Xn=ar.find(O0=>O0.url.includes("distance-unit")),un=bn?.valueString?Number(bn.valueString):NaN,dr=Xn?.valueString||"";if(!dr||isNaN(un))return null;const fr=Math.round(un);let xr=dr;return Di[dr]&&(xr=di(fr===1?Di[dr].singular:Di[dr].plural)),Ii&&si[Ii]?di(ho.p.LOCATION_DISTANCE,{distance:`${fr} ${xr}`,locationType:di(si[Ii])}):di(ho.p.LOCATION_DISTANCE_AWAY,{distance:`${fr} ${xr}`})},Ce=ar=>({id:ar.id||"",providerName:ar.name||"",specialty:"",distance:Pe(ar.extension||[])||"",placeholderIcon:s.WalgreensLogo,address:ar.address||"",valueReference:ar.valueReference||{reference:ar.id}}),Ve=ar=>{var bn,Xn,un,dr;const fr=ar;return Ce({id:fr.id,name:(bn=fr.name)!=null?bn:"",address:(dr=(un=(Xn=fr?.address)==null?void 0:Xn.line)==null?void 0:un[0])!=null?dr:"",extension:fr?.extension,valueReference:{reference:fr.id}})},gt=ar=>Ce({id:ar?.reference,name:ar?.display,address:hr(ar?.extension||[]),extension:ar?.extension,valueReference:ar}),tn=(()=>Gn&&Array.isArray(Gn)&&Gn.length>0?Gn.map(Ve):Ur.initial&&Array.isArray(Ur.initial)&&Ur.initial.length>0?Ur.initial.map(ar=>gt(ar.valueReference)):Ur.answerOption?Ur.answerOption.map(ar=>gt(ar.valueReference)):[])(),Pn=ar=>{Wr(Ur,[{valueReference:ar}])};return(0,n.jsx)("div",{className:(0,s.cx)("gap-md flex flex-col",!Ur.readOnly&&"pb-4xl"),children:Ur.readOnly?tn.map(({address:ar,id:bn,providerName:Xn,placeholderIcon:un,distance:dr})=>(0,n.jsx)(Dt.SchedulingLocationCard,{className:"shadow-sm",avatar:{placeholderIcon:un},locationName:Xn,address:ar,distance:dr,actionButtonText:Dr?"Change location":void 0,onActionButtonClick:Dr?tr:void 0},bn)):tn.map(({address:ar,id:bn,providerName:Xn,placeholderIcon:un,specialty:dr,valueReference:fr,distance:xr})=>(0,n.jsx)(s.LocationCard,{className:"shadow-sm",avatar:{placeholderIcon:un},providerName:{content:Xn},specialty:{content:dr},location:{address:ar,distance:xr},actionButton:{children:"Schedule appointment",onClick:()=>{Qi("schedule_appointment_clicked",{page_on:"Choose your pharmacy",location:ar,_event_metadata:{description:"A user clicked the Schedule appointment cta"}}),Pn(fr),Ui?.()}}},bn))})};var fi=e(79079),Ni=e(32066),hi=e(43915),ki=e(36181),Hi=e(37234),Ga=e(65388),Nr=Object.defineProperty,er=Object.defineProperties,Qr=Object.getOwnPropertyDescriptors,Ir=Object.getOwnPropertySymbols,V0=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Wn=(Gn,Wr,Ur)=>Wr in Gn?Nr(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,Tr=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))V0.call(Wr,Ur)&&Wn(Gn,Ur,Wr[Ur]);if(Ir)for(var Ur of Ir(Wr))Mn.call(Wr,Ur)&&Wn(Gn,Ur,Wr[Ur]);return Gn},u0=(Gn,Wr)=>er(Gn,Qr(Wr));const Zn={"ui-toolkit/LocationCard":Li,"ui-toolkit/TimeSlotSelection":({resourceData:Gn,item:Wr,handleInputChange:Ur,selectedAnswer:Go,questionnaireSchemaItems:jo,formData:di,onCompleteHandler:_i})=>{var Ii,Ri;const{t:Ui}=(0,fi.S)(),{trackEvent:ci}=(0,o.st)(),{isLoading:Qi,setIsInlineNextQuestionTriggered:Oa}=(0,h.c)(),Dr=E0=>{const f0=E0.match(/^(\d{4}-\d{2}-\d{2})/);return f0?f0[1]:E0},tr=(0,t.useCallback)(E0=>{var f0;return(f0=E0.find(gi=>gi?.url===i.zD||gi?.url===i.UZ))==null?void 0:f0.valueCode},[]),hr=(0,t.useCallback)((E0,f0)=>{const gi=tr(f0);if(!gi)return ne(E0);try{return(0,be.formatToTimeZone)(E0,"h:mm A",{timeZone:gi})}catch{return ne(E0)}},[tr]),Pe=(0,t.useCallback)((E0,f0)=>{const gi=tr(f0);if(!gi)return Dr(E0);try{return(0,be.formatToTimeZone)(E0,"YYYY-MM-DD",{timeZone:gi})}catch{return Dr(E0)}},[tr]),Ce=E0=>{const f0=E0.match(/^(\d{4})-(\d{2})-(\d{2})/);if(f0){const[,gi,ko,zi]=f0;return new Date(parseInt(gi),parseInt(ko)-1,parseInt(zi))}return new Date},gt=(()=>{var E0;if((E0=Go?.[0])!=null&&E0.valueReference){const f0=Go[0].valueReference,gi=f0.display||"",ko=Pe(gi,f0.extension||[]);if(ko)return{date:Ce(ko),slotId:f0.reference||""}}return{date:new Date,slotId:""}})(),[jt,tn]=(0,t.useState)(gt.date),[Pn,ar]=(0,t.useState)(gt.slotId),[bn,Xn]=(0,t.useState)(new Set),un=(0,t.useMemo)(()=>new Q0.ng(jt.getFullYear(),jt.getMonth()+1,jt.getDate()),[jt]),dr=E0=>({display:E0.display||"",id:E0.id||"",start:E0.start||"",extension:Array.isArray(E0.extension)?E0.extension:[],identifier:Array.isArray(E0.identifier)?E0.identifier:[],type:E0.type||""}),fr=E0=>{var f0;return dr({display:(f0=E0.start)!=null?f0:"",id:E0.id,start:E0.start,extension:E0.extension,identifier:E0.identifier})},xr=E0=>dr({display:E0?.display||"",id:E0?.reference,start:E0?.display,extension:E0?.extension,identifier:E0?.identifier,type:E0?.type}),O0=()=>{if(Array.isArray(Gn)&&Gn.length>0)return Gn.filter(E0=>E0.resourceType==="Appointment").map(fr);if(Wr.initial&&Array.isArray(Wr.initial)&&Wr.initial.length>0)return Wr.initial.map(E0=>xr(E0.valueReference));if(Wr.answerOption)return Wr.answerOption.map(E0=>xr(E0.valueReference))},d0=(0,t.useMemo)(()=>O0()||[],[Gn,Go,Wr]),eo=(0,t.useMemo)(()=>{const E0={};return d0.forEach(f0=>{if(f0.start&&f0.id){const gi=Pe(f0.start,f0.extension);E0[gi]||(E0[gi]=[]),E0[gi].push({display:f0.display,id:f0.id,start:f0.start,extension:f0.extension})}}),E0},[d0,Pe]),_o=(0,t.useMemo)(()=>{const E0=Object.keys(eo).sort(),f0=[];if(E0.length===0)return f0.push(un),bn.forEach(zi=>{const xi=(0,hi.A)(zi);f0.push(new Q0.ng(xi.getFullYear(),xi.getMonth()+1,xi.getDate()))}),f0;const gi=(0,hi.A)(E0[E0.length-1]),ko=new Q0.ng(gi.getFullYear(),gi.getMonth()+1,gi.getDate());for(let zi=un;zi.compare(ko)<=0;zi=zi.add({days:1})){const xi=`${zi.year}-${String(zi.month).padStart(2,"0")}-${String(zi.day).padStart(2,"0")}`;eo[xi]||f0.push(zi)}if(!(0,a.mR)(Wr)){const zi=(0,Ni.Ec)((0,Ni.Xj)()).add({days:30});let xi=ko.add({days:1});for(;xi.compare(zi)<=0;)f0.push(xi),xi=xi.add({days:1})}return bn.forEach(zi=>{const xi=(0,hi.A)(zi),ya=new Q0.ng(xi.getFullYear(),xi.getMonth()+1,xi.getDate());f0.some(ma=>ma.year===ya.year&&ma.month===ya.month&&ma.day===ya.day)||f0.push(ya)}),f0},[eo,bn,un,Wr]),ft=(0,t.useMemo)(()=>(0,a.mR)(Wr)?s.MAX_AVAILABLE_TIME_SLOT_DAYS:30,[Wr]),Vt=(0,t.useMemo)(()=>Object.keys(eo).map(E0=>{const f0=(0,hi.A)(E0);return new Q0.ng(f0.getFullYear(),f0.getMonth()+1,f0.getDate())}),[eo]),cn=(0,ki.A)((0,Hi.A)(jt),"yyyy-MM-dd"),Un=(0,t.useMemo)(()=>eo[cn]||[],[eo,cn]);(0,t.useEffect)(()=>{const E0=Object.entries(eo).sort(([f0],[gi])=>f0.localeCompare(gi)).slice(0,3).reduce((f0,[gi,ko])=>u0(Tr({},f0),{[`${gi} ${vo}`]:ko.map(zi=>{var xi;return(0,Ga.YX)({time:zi.start,timeZone:(0,a.lv)((xi=Un[0])==null?void 0:xi.extension)}).time})}),{});ci("slots_returned",{Specialty:"Vaccines",first_three_days_slots:E0,_event_metadata:{description:"The API called for bookable slots based on the user's answers on who, when, where and why they want to book an appointment."}})},[]);const nr=t.useRef(null),e0=t.useRef(null),p0=t.useRef(!1);(0,t.useEffect)(()=>{var E0;const f0=Object.keys(eo).sort();f0.length===0||p0.current||(p0.current=!0,(E0=Go?.[0])!=null&&E0.valueReference||tn((0,hi.A)(f0[0])))},[eo]),(0,t.useEffect)(()=>{var E0;const f0=Object.keys(eo).sort();if(f0.length===0)return;const ko=!(nr.current===null)&&JSON.stringify(nr.current)!==JSON.stringify(eo);if(nr.current=eo,!!ko&&(Xn(new Set),e0.current)){const zi=e0.current;if(!(((E0=eo[zi])==null?void 0:E0.length)>0)){const ya=new Set,ma=(0,hi.A)(zi),Js=(0,hi.A)(f0[0]);let Ws=ma;for(;Ws<Js;){const Ki=(0,ki.A)(Ws,"yyyy-MM-dd");ya.add(Ki),Ws=new Date(Ws),Ws.setDate(Ws.getDate()+1)}Xn(ya),ar("")}e0.current=null}},[eo]);const vo=(0,t.useMemo)(()=>{const E0=Un[0];if(!E0?.extension)return"";const f0=tr(E0.extension);try{return(0,be.formatToTimeZone)(new Date,"(z)",{timeZone:f0??""})}catch{return""}},[Un,tr]),y0=(0,t.useMemo)(()=>{const E0=Ui(s.Translations.NEXT_AVAILABLE_APPOINTMENTS);return vo?`${E0} ${vo}`:E0},[Ui,vo]),G0=(0,t.useMemo)(()=>{const E0=(0,Ni.Ec)((0,Ni.Xj)()).add({days:ft}),f0=`${E0.year}-${String(E0.month).padStart(2,"0")}-${String(E0.day).padStart(2,"0")}`,ko=Object.keys(eo).sort().find(zi=>zi>cn&&zi<=f0);if(ko){const zi=(0,hi.A)(ko);return new Q0.ng(zi.getFullYear(),zi.getMonth()+1,zi.getDate())}return null},[eo,cn,ft]),Co=()=>{if(G0){const E0=G0.toDate((0,Ni.Xj)());tn(E0),ar("")}},Lo=E0=>{if(!E0){ar(""),Ur(Wr,void 0);return}ar(E0.id);const f0=[{valueReference:{display:E0.display,reference:E0.id,extension:E0.extension,identifier:E0.identifier,type:E0.type}}];Ur(Wr,f0)},X0=E0=>{var f0;if(!E0||Qi||!p0.current)return;const gi=Object.keys(eo).sort(),ko=gi[gi.length-1],zi=gi[0],xi=`${E0.year}-${String(E0.month).padStart(2,"0")}-${String(E0.day).padStart(2,"0")}`;if(ko&&(xi>ko||zi&&xi<zi)&&(0,a.mR)(Wr)&&jo&&!_o?.some(ma=>ma.compare(E0)===0)){const ma=(0,a.yQ)(Wr,jo);if(ma){e0.current=xi;let Js="-06:00";if((f0=d0[0])!=null&&f0.start){const n1=d0[0].start.match(/([+-]\d{2}:\d{2})$/);n1&&(Js=n1[1])}const Ki=[{valueDateTime:`${xi}T23:59:59${Js}`}],A1=Ur(ma,Ki);Ur(Wr,void 0,(0,a.Nw)(A1||di||[],Wr.linkId),void 0,!0),Oa(!0),_i(ma.linkId,!0,!0)}}const ya=E0.toDate((0,Ni.Xj)());tn(ya)},to=E0=>{if(!E0)return;const f0=Un.find(gi=>gi.id===E0);ci("slot_selected",{Specialty:"Vaccines",time_slot:f0?(0,Ga.YX)({time:f0.start,timeZone:(0,a.lv)(Un[0].extension)}).dateWithTime:"",_event_metadata:{description:"A user clicked an option to select a slot or search a different date set if no slots were found."}}),Lo(f0??null)};return(0,n.jsx)(s.TimeSlot,{onChange:X0,disabledDates:_o,highlightedDates:Vt,loading:Qi,minValue:(0,Ni.Ec)((0,Ni.Xj)()),maxValue:(0,Ni.Ec)((0,Ni.Xj)()).add({days:ft}),value:un,defaultValue:un,appointmentSlots:{title:y0,onChange:to,defaultValue:Go&&((Ri=(Ii=Go[0])==null?void 0:Ii.valueReference)==null?void 0:Ri.reference)||void 0,value:Pn||void 0,items:Un.map(E0=>({label:hr(E0.start,E0.extension),value:E0.id}))||[]},nextAppointment:{children:(0,n.jsxs)("p",{className:"text-secondary text-center text-sm font-normal",children:[Ui(s.Translations.NO_NEXT_AVAILABLE_APPOINTMENTS),G0&&(0,n.jsx)("button",{onClick:Co,className:"ml-2 cursor-pointer font-normal text-blue-700 underline",children:Ui(s.Translations.GO_TO_NEXT_AVAILABLE_TIMESLOT)})]})}})}};var _r=Object.defineProperty,ao=Object.defineProperties,qo=Object.getOwnPropertyDescriptors,Zi=Object.getOwnPropertySymbols,qi=Object.prototype.hasOwnProperty,ua=Object.prototype.propertyIsEnumerable,Ro=(Gn,Wr,Ur)=>Wr in Gn?_r(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,x0=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))qi.call(Wr,Ur)&&Ro(Gn,Ur,Wr[Ur]);if(Zi)for(var Ur of Zi(Wr))ua.call(Wr,Ur)&&Ro(Gn,Ur,Wr[Ur]);return Gn},Xa=(Gn,Wr)=>ao(Gn,qo(Wr)),ys=(Gn,Wr)=>{var Ur={};for(var Go in Gn)qi.call(Gn,Go)&&Wr.indexOf(Go)<0&&(Ur[Go]=Gn[Go]);if(Gn!=null&&Zi)for(var Go of Zi(Gn))Wr.indexOf(Go)<0&&ua.call(Gn,Go)&&(Ur[Go]=Gn[Go]);return Ur};const xs=(Gn,Wr)=>Gn.answerOption?Gn.answerOption.map(Ur=>{var Go,jo;const di=(jo=(Go=Ur.valueReference)==null?void 0:Go.reference)==null?void 0:jo.replace("#","");return Wr.find(_i=>_i.id===di)}).filter(Boolean):[],Ss=Gn=>{var Wr,Ur,Go;const jo=Gn.find(di=>{var _i,Ii;return di.url.includes("questionnaire-itemControl")&&((Ii=(_i=di.valueCodeableConcept)==null?void 0:_i.coding)==null?void 0:Ii.some(Ri=>{var Ui;return(Ui=Ri.code)==null?void 0:Ui.startsWith("ui-toolkit/")}))});return(Go=(Ur=(Wr=jo?.valueCodeableConcept)==null?void 0:Wr.coding)==null?void 0:Ur.find(di=>{var _i;return(_i=di.code)==null?void 0:_i.startsWith("ui-toolkit/")}))==null?void 0:Go.code},os=Gn=>{var{uiToolkitCode:Wr,props:Ur}=Gn,Go=Ur,{item:jo,contained:di=[],customErrorConfigurations:_i}=Go,Ii=ys(Go,["item","contained","customErrorConfigurations"]);const{setHideFooterButton:Ri}=(0,h.c)(),Ui=Zn[Wr];if(!Ui)return(0,n.jsx)(n.Fragment,{});const ci=xs(jo,di),Qi=ci.length>0;return!(jo.answerOption&&jo.answerOption.length>0)&&!Qi&&!jo.readOnly?(Ri(!0),(0,n.jsx)(it,{configKey:Wr,customErrorConfigurations:_i})):(0,n.jsx)(Ui,Xa(x0({},Ii),{item:jo,contained:di,customErrorConfigurations:_i,resourceData:ci,"data-testid":jo.linkId}))},ir={attachment:$n,choice:xo,boolean:Vr,integer:no,string:({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i,placeholder:Ii,hintText:Ri})=>{var Ui;const{linkId:ci,text:Qi,required:Oa,prefix:Dr,readOnly:tr}=Gn,hr=Qi?(0,a.nt)(jo,Dr,Qi):"",Pe=di?.[ci]||"",Ce=(0,a.a0)(Gn);return(0,n.jsxs)("div",{children:[hr&&(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:hr,required:Oa||!1}),(0,n.jsx)(s.Input,{isRequired:Oa,size:"md","aria-label":ci,"data-testid":ci,id:ci,type:Ce==="tel"?"tel":"text",placeholder:Ii,value:((Ui=Ur?.[0])==null?void 0:Ui.valueString)||"",onChange:Ve=>{Go(Gn,[{valueString:Ve}])},isDisabled:tr||_i,onBlur:Ve=>{const gt=Ve.target.value,jt=gt.trim();jt!==gt&&Go(Gn,[{valueString:jt}]),Wr(Gn.linkId)},hint:Pe||Ri,isInvalid:!!Pe,autoComplete:Ce},ci)]})},url:({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i,placeholder:Ii,hintText:Ri})=>{var Ui;const{linkId:ci,text:Qi,required:Oa,prefix:Dr,readOnly:tr}=Gn,hr=Qi?(0,a.nt)(jo,Dr,Qi):"",Pe=di?.[ci]||"",Ce=(0,a.a0)(Gn);return(0,n.jsxs)("div",{children:[hr&&(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:hr,required:Oa||!1}),(0,n.jsx)(s.Input,{isRequired:Oa,size:"md",type:"url",id:ci,"data-testid":ci,"aria-label":ci,placeholder:Ii,value:((Ui=Ur?.[0])==null?void 0:Ui.valueUri)||"",onChange:Ve=>{Go(Gn,[{valueUri:Ve}])},isDisabled:tr||_i,onBlur:Ve=>{const gt=Ve.target.value,jt=gt.trim();jt!==gt&&Go(Gn,[{valueUri:jt}]),Wr(Gn.linkId)},hint:Pe||Ri,isInvalid:!!Pe,autoComplete:Ce},ci)]})},text:({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i,placeholder:Ii,hintText:Ri})=>{var Ui;const{linkId:ci,text:Qi,required:Oa,prefix:Dr,readOnly:tr,maxLength:hr}=Gn,Pe=Qi?(0,a.nt)(jo,Dr,Qi):"",Ce=di?.[ci]||"",Ve=(0,a.a0)(Gn);return(0,n.jsxs)("div",{children:[Pe&&(0,n.jsx)(N,{isLabel:!0,className:"mb-sm text-md",text:Pe,required:Oa||!1}),(0,n.jsx)(s.TextArea,{isRequired:Oa,id:ci,"aria-label":ci,"data-testid":ci,rows:3,placeholder:Ii,value:((Ui=Ur?.[0])==null?void 0:Ui.valueString)||"",onChange:gt=>{Go(Gn,[{valueString:gt}])},isDisabled:tr||_i,onBlur:gt=>{const jt=gt.target.value,tn=jt.trim();tn!==jt&&Go(Gn,[{valueString:tn}]),Wr(Gn.linkId)},hint:Ce||Ri,counter:!0,isInvalid:!!Ce,maxLength:hr,autoComplete:Ve},ci)]})},date:Mr,time:({item:Gn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Go,showQuestionPrefix:jo,errors:di,isLoading:_i})=>{var Ii;const{linkId:Ri,text:Ui,required:ci,prefix:Qi,readOnly:Oa}=Gn,Dr=Ui?(0,a.nt)(jo,Qi,Ui):"",tr=di?.[Ri]||"";return(0,n.jsxs)("div",{children:[Dr&&(0,n.jsx)(N,{isLabel:!0,text:Dr,required:ci||!1}),(0,n.jsx)(s.Input,{isRequired:ci,size:"md",type:"time",id:Ri,"data-testid":Ri,"aria-label":Ri,placeholder:"Type your response here...",value:((Ii=Ur?.[0])==null?void 0:Ii.valueTime)||"",onChange:hr=>{Go(Gn,[{valueTime:hr}])},isDisabled:Oa||_i,onBlur:()=>{Wr(Gn.linkId)},hint:tr,isInvalid:!!tr},Ri)]})},dateTime:Or,quantity:Fo,decimal:R0,question:g0,display:g0,group:g0,reference:Gn=>{var Wr,Ur,Go,jo,di;const{setHideFooterButton:_i}=(0,h.c)(),{item:Ii,customErrorConfigurations:Ri}=Gn,Ui=Ii.extension||[],ci=Ss(Ui);return ci?(0,n.jsx)(os,{uiToolkitCode:ci,props:Gn}):((di=(jo=(Go=(Ur=(Wr=Ii?.extension)==null?void 0:Wr.find(Oa=>Oa.url.includes("questionnaire-itemControl")))==null?void 0:Ur.valueCodeableConcept)==null?void 0:Go.coding)==null?void 0:jo[0])==null?void 0:di.code)==="check-box"?Ii.answerOption&&Ii.answerOption.length>0?(0,n.jsx)(xo,Xa(x0({},Gn),{item:Ii})):(_i(!0),(0,n.jsx)(it,{configKey:Ii.linkId,customErrorConfigurations:Ri})):null}};var A0=(Gn,Wr,Ur)=>new Promise((Go,jo)=>{var di=Ri=>{try{Ii(Ur.next(Ri))}catch(Ui){jo(Ui)}},_i=Ri=>{try{Ii(Ur.throw(Ri))}catch(Ui){jo(Ui)}},Ii=Ri=>Ri.done?Go(Ri.value):Promise.resolve(Ri.value).then(di,_i);Ii((Ur=Ur.apply(Gn,Wr)).next())});const F0=({item:Gn,selectedAnswer:Wr,showQuestionPrefix:Ur})=>{const{text:Go,prefix:jo,required:di}=Gn,_i=Go?getUpdatedQuestionText(Ur,jo,Go):"",[Ii,Ri]=useState(null),[Ui,ci]=useState(!1),{documentDownload:Qi,webview:Oa}=useNativeBridge(),Dr=(Wr||[]).filter(Ce=>{var Ve,gt;return((Ve=Ce.valueAttachment)==null?void 0:Ve.data)&&((gt=Ce.valueAttachment)==null?void 0:gt.title)}).map((Ce,Ve)=>{var gt,jt,tn,Pn,ar,bn,Xn;return{id:((gt=Ce.valueAttachment)==null?void 0:gt.id)||`preview-${Ve}`,fileName:((jt=Ce.valueAttachment)==null?void 0:jt.title)||`attachment-${Ve}`,contentType:((tn=Ce.valueAttachment)==null?void 0:tn.contentType)||"application/octet-stream",base64Data:((Pn=Ce.valueAttachment)==null?void 0:Pn.data)||"",size:getBase64Size(((ar=Ce.valueAttachment)==null?void 0:ar.data)||"",(bn=Ce.valueAttachment)==null?void 0:bn.contentType),type:getFileTypeFromMimeType((Xn=Ce.valueAttachment)==null?void 0:Xn.contentType)}}),tr=useCallback(Ce=>{const{fileName:Ve,contentType:gt,base64Data:jt}=Ce;if(Oa.isWithin)Ri({fileName:Ve,contentType:gt,base64Data:jt}),ci(!0);else{const tn=base64toObjectUrl(jt,gt),Pn=document.createElement("a");Pn.href=tn,Pn.download=Ve,document.body.appendChild(Pn),Pn.click(),document.body.removeChild(Pn),URL.revokeObjectURL(tn)}},[Oa.isWithin]),hr=useCallback(()=>A0(void 0,null,function*(){!Ii||(yield Qi.writeFile(Ii.fileName,prepareDataUrl(Ii.base64Data,Ii.contentType)))}),[Ii,Qi]),Pe=useCallback(()=>{ci(!1),Ri(null)},[]);return Dr.length?jsxs("div",{children:[_i&&jsx(FHIRQuestionnaireQuestionText,{isLabel:!0,className:"mb-sm text-md",text:_i,required:di||!1}),jsx(FileUploadList,{role:"group",className:"flex-row flex-wrap",children:Dr.map(Ce=>jsx("button",{type:"button",onClick:()=>tr(Ce),className:"max-w-full min-w-0 cursor-pointer border-0 bg-transparent p-0",children:jsx(FileListItemProgressFill,{as:"div",name:truncateFileName(Ce.fileName),size:Ce.size,type:Ce.type})},Ce.id))}),jsx(DownloadDisclosureModal,{opened:Ui,onClose:Pe,onDownload:hr,contentType:Ii?.contentType||"",analyticsEventPrefix:"Questionnaire Attachment - Disclosure"})]}):null};var _t=Object.defineProperty,Xe=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,Pr=(Gn,Wr,Ur)=>Wr in Gn?_t(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,C0=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))In.call(Wr,Ur)&&Pr(Gn,Ur,Wr[Ur]);if(wt)for(var Ur of wt(Wr))lr.call(Wr,Ur)&&Pr(Gn,Ur,Wr[Ur]);return Gn},H0=(Gn,Wr)=>Xe(Gn,ct(Wr));const K0=(Gn,Wr,Ur,Go)=>{var jo;const di=Gn.extension||[];if(Go?.[BUTTON_TYPE_EXTERNAL_KEY]&&di.some(ci=>ci.url===BUTTON_TYPE_EXTENSION_URL))return Go[BUTTON_TYPE_EXTERNAL_KEY];if(isHiddenExtensionPresent(Gn)||hasParentWithUIToolkitWidget(Gn,Wr))return null;if(Ur&&Gn.type==="attachment")return FHIRQuestionnaireAttachmentPreview;const _i=getUIToolkitCode(di),Ii=di.filter(ci=>ci.url.includes("questionnaire-itemControl")).flatMap(ci=>{var Qi,Oa;return(Oa=(Qi=ci.valueCodeableConcept)==null?void 0:Qi.coding)!=null?Oa:[]})||[];let Ri;return Go&&(Ri=(jo=Ii.find(ci=>ci.code&&Go[ci.code]))==null?void 0:jo.code),(Ri&&Go?Go[Ri]:void 0)||UI_TOOLKIT_WIDGET_MAP[_i||""]||typeToRenderFunctionMap[Gn.type]||null},oi=Gn=>{var Wr;const{item:Ur,selectedAnswer:Go,handleInputChange:jo,showQuestionPrefix:di,errors:_i,questionnaireSchemaItems:Ii,formData:Ri,isNestedRepeatedItem:Ui=!1}=Gn,{linkId:ci,text:Qi,prefix:Oa,required:Dr,repeats:tr}=Ur,hr=getMaxOccursFromExtensions(Ur.extension),Pe=getPlaceholderFromExtensions(Ur.extension,Ur.type),[Ce,Ve]=useState(()=>{if(Ur.type==="group"&&Ur.item&&Ur.item.length>0){const xr=Ri?.filter(O0=>O0.linkId===Ur.linkId)||[];if(xr.length>0)return xr.map((O0,d0)=>d0)}else if(Go&&Go.length>0)return Go.map((xr,O0)=>O0);return[0]}),gt=hr!==void 0&&Ce.length>=hr,jt=Qi?getUpdatedQuestionText(di,Oa,Qi):"",tn=()=>{const xr=Math.max(...Ce,-1)+1,O0=[...Ce,xr];if(Ve(O0),Ur.type==="group"&&Ur.item&&Ur.item.length>0){const d0=Ur.item.map(_o=>({linkId:_o.linkId,text:_o.text,answer:[{}]})),eo={linkId:Ur.linkId,text:Ur.text,answer:[{}],item:d0};jo(Ur,void 0,[eo])}else{const d0=[...Go||[]];d0.push({}),jo(Ur,d0)}},Pn=xr=>{if(Ce.length<=1)return;const O0=Ce.filter((d0,eo)=>eo!==Ce.length-1);if(Ve(O0),Ur.type==="group"&&Ur.item&&Ur.item.length>0){const d0=[];if(Ri?.forEach((eo,_o)=>{eo.linkId===ci&&d0.push({item:eo,originalIndex:_o})}),xr>=0&&xr<d0.length){const eo=d0[xr],_o=Ri?.filter((ft,Vt)=>Vt!==eo.originalIndex);jo(Ur,void 0,_o,void 0,!0)}}else{const d0=Go?.filter((eo,_o)=>_o!==xr)||[];jo(Ur,d0.length>0?d0:[{}])}},ar=xr=>{if(!Ri||!Ur.item)return[];const O0=_o=>{const ft=[];for(const Vt of _o)if(Vt.linkId===Ur.linkId&&ft.push(Vt),Vt.item&&Vt.item.length>0){const cn=O0(Vt.item);ft.push(...cn)}return ft},eo=O0(Ri)[xr];return eo?.item?eo.item:[]},bn=(xr,O0)=>{if(isHiddenExtensionPresent(xr))return null;const d0=ar(O0);if(!isQuestionEnabledForInstance(xr.enableWhen,xr.enableBehavior,Ri||[],Ur.linkId,O0))return null;if(xr.repeats){const cn=findNestedAnswer(d0,xr.linkId),Un=H0(C0({},Gn),{item:xr,selectedAnswer:cn||[{}],errors:getInstanceErrors(_i,Ur,O0),handleInputChange:(nr,e0,p0)=>jo(nr,e0,p0,O0)});return jsx("div",{children:jsx(oi,H0(C0({},Un),{isNestedRepeatedItem:!0}))},xr.linkId)}if(xr.type==="group"&&xr.item&&!getUIToolkitCode(xr?.extension||[]))return jsxs("div",{children:[xr.text&&jsx("h5",{className:"mb-3 text-base font-medium text-gray-800",children:xr.text}),jsx("div",{className:"space-y-3",children:xr.item.map(cn=>{if(!isQuestionEnabledForInstance(cn.enableWhen,cn.enableBehavior,Ri||[],Ur.linkId,O0))return null;const nr=K0(cn,Ii,Gn.isLoading,Gn.externalComponentRenderMap);if(!nr)return null;const e0=findNestedAnswer(d0,cn.linkId),p0=H0(C0({},Gn),{item:cn,selectedAnswer:e0,placeholder:getPlaceholderFromExtensions(cn.extension,cn.type),errors:getInstanceErrors(_i,Ur,O0),handleInputChange:(vo,y0,G0)=>jo(vo,y0,G0,O0)});return createElement(nr,H0(C0({},p0),{key:cn.linkId}))})})]},xr.linkId);const _o=K0(xr,Ii,Gn.isLoading,Gn.externalComponentRenderMap);if(!_o)return null;const ft=findNestedAnswer(d0,xr.linkId),Vt=H0(C0({},Gn),{item:xr,selectedAnswer:ft,placeholder:getPlaceholderFromExtensions(xr.extension,xr.type),errors:getInstanceErrors(_i,Ur,O0),handleInputChange:(cn,Un,nr)=>jo(cn,Un,nr,O0)});return createElement(_o,H0(C0({},Vt),{key:`${xr.linkId}-${O0}`}))},Xn=()=>{const xr=getDirectErrors(_i,ci);return jsxs("div",{className:"flex flex-col gap-2",children:[xr[ci]&&jsx("div",{className:"text-error-primary text-sm font-medium",children:xr[ci]}),!gt&&jsx("div",{className:"flex items-center justify-center",children:jsx(Button,{color:"link-color",size:"sm",onClick:tn,className:"mt-4 text-center",isDisabled:Gn.isLoading,iconLeading:jsx(Plus,{className:"h-4 w-4"}),children:"Add Item"})})]})},un=xr=>Ce.length>1&&jsx(Button,{color:"tertiary-destructive",onClick:()=>Pn(xr),className:"text-error-primary hover:text-error-primary-hover","aria-label":`Remove Item ${xr+1}`,iconLeading:jsx(Trash02,{className:"h-4 w-4"}),isDisabled:Gn.isLoading}),dr=K0(Ur,Ii,Gn.isLoading,Gn.externalComponentRenderMap);return hasRepeatingParent(Ur,Ii)&&!Ui?null:!tr||tr&&hasCheckboxExtension(Ur)?dr?jsx(dr,H0(C0({},Gn),{placeholder:Pe,errors:{[Ur.linkId]:((Wr=_i?.[Ur.linkId])==null?void 0:Wr[0])||""}})):null:Ur.type==="group"&&Ur.item&&Ur.item.length>0&&Ur.repeats?jsxs("div",{"data-testid":`${ci}-repeating`,children:[jt&&jsx(FHIRQuestionnaireQuestionText,{text:jt,required:Dr||!1}),Ce.map(xr=>{var O0;return jsxs("div",{className:"relative mb-4",children:[jsxs("div",{className:`mb-4 flex items-center justify-between ${xr>0?"mt-8":""}`,children:[jsxs("p",{className:"mb-2 text-sm font-bold",children:["Item ",xr+1]}),un(xr)]}),jsx("div",{className:"space-y-4",children:(O0=Ur.item)==null?void 0:O0.map(d0=>bn(d0,xr))})]},`${ci}-instance-${xr}`)}),Xn()]}):dr?jsxs("div",{"data-testid":`${ci}-repeating`,children:[Ce.map(xr=>{const O0=Go?.[xr]?[Go[xr]]:void 0,d0=H0(C0({},Gn),{item:Ur,selectedAnswer:O0,errors:getInstanceErrors(_i,Ur,xr),handleInputChange:(eo,_o,ft)=>jo(eo,_o,ft,xr)});return jsxs("div",{className:"relative mb-2",children:[jsxs("div",{className:"flex items-end justify-between",children:[jsxs("p",{className:"mb-2 text-sm font-bold",children:["Item ",xr+1]}),un(xr)]}),jsx(dr,C0({},d0))]},`${ci}-instance-${xr}`)}),jsxs("div",{children:[(()=>{const O0=getDirectErrors(_i,ci)[ci];return O0&&jsx("div",{className:"text-error-primary mb-3 text-sm font-medium",children:O0})})(),!gt&&jsx("div",{className:"flex items-center justify-center",children:jsx(Button,{color:"link-color",size:"sm",onClick:tn,className:"mt-4 text-center",isDisabled:Gn.isLoading,iconLeading:jsx(Plus,{className:"h-4 w-4"}),children:"Add Item"})})]})]}):null};var Jo=Object.defineProperty,ui=Object.defineProperties,Bi=Object.getOwnPropertyDescriptors,ha=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,Ma=Object.prototype.propertyIsEnumerable,Za=(Gn,Wr,Ur)=>Wr in Gn?Jo(Gn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):Gn[Wr]=Ur,is=(Gn,Wr)=>{for(var Ur in Wr||(Wr={}))oa.call(Wr,Ur)&&Za(Gn,Ur,Wr[Ur]);if(ha)for(var Ur of ha(Wr))Ma.call(Wr,Ur)&&Za(Gn,Ur,Wr[Ur]);return Gn},Ba=(Gn,Wr)=>ui(Gn,Bi(Wr));const Us=null,s1=({formId:Gn,questionnaireSchema:Wr,questionnaireResponseItem:Ur,errorConfig:Go,customErrorConfigurations:jo,showQuestionPrefix:di=!0,isAdaptiveFlow:_i=!1,status:Ii,hideBackButton:Ri=!1,showStepper:Ui=!1,onComplete:ci,onClearError:Qi,handleHiddenQuestion:Oa,onGoBack:Dr,onFormDataChange:tr=()=>{},externalComponentRenderMap:hr,children:Pe})=>{var Ce,Ve;const{setHandleContinueButtonClick:gt,setHandleBackButtonClick:jt,setIsCurrentFormValid:tn,setCurrentGroupLinkId:Pn,setCurrentGroupIndex:ar,setTotalSteps:bn,setHideFooterButton:Xn,setIsInlineNextQuestionTriggered:un,isCurrentFormValid:dr,currentGroupIndex:fr,isLoading:xr,hasCustomError:O0,groupItemIndicesRef:d0}=useFHIRQuestionnaire(),{trackEvent:eo}=useAnalytics(),{t:_o}=useUIToolkitTranslations(),[ft,Vt]=useState([]),[cn,Un]=useState(new Set),[nr,e0]=useState([]),[p0,vo]=useState([]),y0=d0,G0=useRef(new Map),Co=useRef(new Set),[Lo,X0]=useState({}),[to,E0]=useState(!1),[f0,gi]=useState(Wr),ko=useRef(Ur||[]),zi=useRef(!1),xi=useRef(!1),ya=useMemo(()=>getTotalStepsFromQuestionnaire(Wr),[Wr]),[ma,Js]=useState(!1),Ws=useRef([]),Ki=(Xo,$o)=>{var Vi,Wo,Ji,Pa,Fa,as;if(isCallNextQuestionExtensionPresent(Xo))return Xo.linkId;const $a=validateCurrentPage($o,ft,fr,f0,y0),js=Wa=>{for(const ga of Wa){if((!ga.enableWhen||isQuestionEnabled(ga.enableWhen,ga.enableBehavior,$o))&&isCallNextQuestionExtensionPresent(ga))return ga.linkId;if(ga.item){const _1=js(ga.item);if(_1)return _1}}},l1=(Wa,ga)=>{for(const ws of Wa)if(ws.item){const _1=ws.item.findIndex(Gs=>Gs.linkId===ga);if(_1!==-1)return js(ws.item.slice(_1+1));const pl=l1(ws.item,ga);if(pl!==void 0)return pl}},yl=l1((Vi=f0?.item)!=null?Vi:[],Xo.linkId);if(yl)return yl;const dl=y0.current[fr],Gl=fr+1,Il=y0.current[Gl],gu=fr===0?0:dl,hu=(Ji=Il??((Wo=f0?.item)==null?void 0:Wo.length))!=null?Ji:0;let Oo=-1;for(let Wa=gu;Wa<hu;Wa++){const ga=(Pa=f0?.item)==null?void 0:Pa[Wa];if(ga?.linkId===Xo.linkId){Oo=Wa;break}}const Hn=(Wa,ga=[])=>(Wa.forEach(ws=>{var _1;if((!ws.enableWhen||isQuestionEnabled(ws.enableWhen,ws.enableBehavior,$o))&&isCallNextQuestionExtensionPresent(ws)&&!Ws.current.includes(ws.linkId))if(ws.required){const Gs=(_1=findResponseItem($o,ws.linkId))==null?void 0:_1.answer;(Gs&&Gs.length>0&&Object.keys(Gs[0]).length>0||ws.initial&&ws.initial.length>0&&!cn.has(ws.linkId))&&ga.push(ws.linkId)}else ga.push(ws.linkId);ws.item&&ws.item.length>0&&Hn(ws.item,ga)}),ga),Ti=[],na=Oo!==-1?Oo+1:hu;for(let Wa=gu;Wa<na;Wa++){const ga=(Fa=f0?.item)==null?void 0:Fa[Wa];ga&&Hn([ga],Ti)}if(Ti.length>0&&$a){const Wa=Ti[Ti.length-1],ga=Gs=>Gs.flatMap(h1=>[h1,...h1.item?ga(h1.item):[]]),ws=ga((as=f0?.item)!=null?as:[]),_1=ws.findIndex(Gs=>Gs.linkId===Wa),pl=ws.findIndex(Gs=>Gs.linkId===Xo.linkId);return _1!==-1&&pl>_1?void 0:Wa}},A1=Xo=>Ki(Xo,ko.current)?!0:Xo.item&&Xo.item.length>0?Xo.item.some(A1):!1,n1=()=>{var Xo,$o;if(!_i||fr<0||!f0?.item)return{shouldTriggerInlineLoading:!1,canNavigateToNextGroup:!1,hasMoreGroups:!1};const Vi=y0.current[fr],Wo=G0.current.get(Vi)||[Vi],Ji=(Xo=f0.item)==null?void 0:Xo[Wo[Wo.length-1]],Pa=Ji?A1(Ji):!1,Fa=fr<y0.current.length-1;let as=!1;if(Pa&&Fa){const $a=fr+1,js=y0.current[$a],l1=($o=f0?.item)==null?void 0:$o[js],yl=!l1?.enableWhen||isQuestionEnabled(l1.enableWhen,l1.enableBehavior,ko.current),dl=l1?isPageExtensionPresent(l1):!1;as=yl&&dl}return{shouldTriggerInlineLoading:Pa,canNavigateToNextGroup:as,hasMoreGroups:Fa}},ls=(Xo,$o,Vi,Wo)=>{const Ji=getUpdatedFormData(f0?.item||[],ko.current,Xo,$o,Vi,Wo);return ko.current=Ji,tr(Ji),Ji},w1=(Xo,$o,Vi,Wo,Ji)=>{ls($o,Vi,Wo,Ji),Wo.forEach(Pa=>{const Fa=getValidationError(Ba(is({},Xo),{linkId:Pa.linkId}),ko.current,Pa.answer,_o);Fa&&X0(as=>Ba(is({},as),{[Pa.linkId]:typeof Ji=="number"?Ba(is({},as[Pa.linkId]),{[Ji]:Fa}):Fa}))})},yr=(Xo,$o,Vi,Wo,Ji)=>{var Pa;const Fa=ls($o,Vi,Wo,Ji),as=(Pa=findResponseItem(Fa,$o))==null?void 0:Pa.answer,$a=getValidationError(Xo,ko.current,as,_o);X0(js=>Ba(is({},js),{[$o]:typeof Ji=="number"?Ba(is({},js[$o]),{[Ji]:$a}):$a}))},Qn=(Xo,$o)=>{const Vi=validateCurrentPage($o,ft,fr,f0,y0);if(tn(Vi),f0?.item){const Wo=validateAllItemsRecursively(f0.item,$o,_o);if(Object.keys(Wo).length>0)X0(Ji=>is(is({},Ji),Wo));else{const Ji=f0.item,Pa={},Fa=as=>{as.forEach($a=>{Pa[$a.linkId]={},$a.item&&Fa($a.item)})};Fa(Ji),X0(as=>is(is({},as),Pa))}}},Br=(Xo,$o,Vi,Wo,Ji=!1)=>{var Pa;const{linkId:Fa}=Xo;if(Ji)return ko.current=Vi||[],Qn(Fa,Vi||[]),ko.current;if(Vi&&Vi.length>0&&Xo.type==="group"&&Xo.repeats){let l1=ko.current.length;for(let dl=ko.current.length-1;dl>=0;dl--)if(ko.current[dl].linkId===Fa){l1=dl+1;break}const yl=[...ko.current.slice(0,l1),...Vi,...ko.current.slice(l1)];return ko.current=yl,Qn(Fa,yl),ko.current}if(typeof Wo=="number"&&$o){const l1=hasRepeatingParent(Xo,f0?.item||[]);if(l1){const yl=ko.current.filter(Gl=>Gl.linkId===l1.linkId);if(Wo<yl.length){const Gl=ko.current.map(Il=>{if(Il.linkId===l1.linkId&&ko.current.slice(0,ko.current.indexOf(Il)).filter(hu=>hu.linkId===l1.linkId).length===Wo){const hu=(Ti,na)=>{const Wa=new Map(Ti.map(ws=>[ws.linkId,ws])),ga=[];return na?.forEach(ws=>{const _1=Wa.get(ws.linkId);if(ws.linkId===Fa)ga.push(is({linkId:ws.linkId,text:ws.text,answer:$o},_1?.item&&{item:_1.item}));else if(_1)if(ws.item&&ws.item.length>0){const pl=hu(_1.item||[],ws.item);ga.push(Ba(is({},_1),{item:pl}))}else ga.push(_1);else if(ws.item&&ws.item.length>0){const pl=hu([],ws.item);pl.some(h1=>h1.linkId===Fa||h1.item&&Oo(h1.item,Fa))&&ga.push({linkId:ws.linkId,text:ws.text,answer:[{}],item:pl})}Wa.delete(ws.linkId)}),Wa.forEach(ws=>{ga.push(ws)}),ga},Oo=(Ti,na)=>Ti.some(Wa=>Wa.linkId===na||Wa.item&&Oo(Wa.item,na)),Hn=hu(Il.item||[],l1.item);return Ba(is({},Il),{item:Hn})}return Il});ko.current=Gl,tr(Gl)}else{const Gl=Wo+1,Il=yl.length;if(Il<Gl||Gl===1){const gu=[],hu=(Ti,na,Wa)=>Ti.map(ga=>{const ws={linkId:ga.linkId,text:ga.text,answer:ga.linkId===na?Wa:[{}]};return ga.item&&ga.item.length>0&&(ws.item=hu(ga.item,na,Wa)),ws});for(let Ti=Il;Ti<Gl;Ti++){const na=l1.item?hu(l1.item,Fa,$o):[],Wa={linkId:l1.linkId,text:l1.text,answer:[{}],item:na};gu.push(Wa)}let Oo=ko.current.length;for(let Ti=ko.current.length-1;Ti>=0;Ti--)if(ko.current[Ti].linkId===l1.linkId){Oo=Ti+1;break}const Hn=[...ko.current.slice(0,Oo),...gu,...ko.current.slice(Oo)];ko.current=Hn,tr(Hn)}}const dl=getValidationError(Xo,ko.current,$o,_o);return X0(Gl=>Ba(is({},Gl),{[Fa]:typeof Wo=="number"?Ba(is({},Gl[Fa]),{[Wo]:dl}):dl})),Qn(Fa,ko.current),ko.current}}if(typeof Wo=="number")return Vi&&Vi.length>0?w1(Xo,Fa,$o,Vi,Wo):yr(Xo,Fa,$o,Vi,Wo),ko.current;const as=ls(Fa,$o,Vi),$a=(Pa=findResponseItem(as,Fa))==null?void 0:Pa.answer,js=getValidationError(Xo,as,$a,_o);return X0(l1=>Ba(is({},l1),{[Fa]:typeof Wo=="number"?Ba(is({},l1[Fa]),{[Wo]:js}):js})),Qn(Fa,as),ko.current},pr=()=>{var Xo;for(let $o=fr+1;$o<y0.current.length;$o++){const Vi=y0.current[$o],Wo=(Xo=f0?.item)==null?void 0:Xo[Vi];if(!!Wo&&(!Wo.enableWhen||isQuestionEnabled(Wo.enableWhen,Wo.enableBehavior,ko.current)))return!0}return!1},qr=()=>{var Xo,$o,Vi,Wo,Ji;const Pa=(Xo=Wr?.item)==null?void 0:Xo[y0.current[fr]];if(Pa){const $a=($o=getAnalyticsEventName(Pa))!=null?$o:"questionnaire_form",js=getAnalyticsPageName(Pa);if(js){const l1=(Vi=getAnalyticsFormName(Wr))!=null?Vi:Wr.name,yl=collectAnalyticsProperties(Pa,ko.current),dl={};l1&&(dl.form_name=l1),dl.page_name=js,Object.assign(dl,yl),eo($a,dl)}}const Fa=fr<y0.current.length-1,as=checkCurrentStepDataMatch(ko.current,f0,y0.current,fr,Ur,y0.current.length-1);if(_i&&Fa){const $a=fr+1,js=y0.current[$a],l1=(Wo=f0?.item)==null?void 0:Wo[js],yl=!l1?.enableWhen||isQuestionEnabled(l1.enableWhen,l1.enableBehavior,ko.current),dl=l1?isPageExtensionPresent(l1):!1;if(yl&&dl&&as){ar($a),tn(!1),window.scrollTo(0,0);return}}if(as&&y0.current.length>0){pr()?ar(fr+1):(ci(removeDisabledItems(ko.current,f0?.item||[])),tn(!1),window.scrollTo(0,0));return}if(fr<y0.current.length-1){const $a=(Ji=f0?.item)==null?void 0:Ji[y0.current[fr]];if(!$a){ci(removeDisabledItems(ko.current,f0?.item||[]));return}const js=$a.linkId,l1=findLastGroupInstanceIndex(ko.current,js),yl=ko.current.slice(0,l1+1);if(!validateCurrentPage(yl,ft,fr,f0,y0))return;_i?(ko.current=yl,tr(yl),ci(ko.current),tn(!1)):y0.current.length>0&&(pr()?ar(fr+1):(ci(removeDisabledItems(ko.current,f0?.item||[])),window.scrollTo(0,0)))}else ci(removeDisabledItems(ko.current,f0?.item||[])),tn(!1),window.scrollTo(0,0)};useEffect(()=>{var Xo;gt(()=>qr),jt(()=>ri),tn(dr);const $o=(Xo=f0?.item)==null?void 0:Xo[y0.current[fr]];$o&&Pn($o.linkId)},[dr,fr]),useEffect(()=>{if(!Wr?.item)return;const{groupIndices:Xo,itemsToRenderMap:$o}=collectGroupItemIndices(Wr.item);y0.current=Xo,G0.current=$o;const Vi=ya??Xo.length;bn(Vi),e0(Xo),_i?(xi.current||ar(Xo.length>0?Xo.length-1:0),un(!1),xi.current=!1):fr===-1&&ar(0)},[Wr?.item,ya]),useEffect(()=>{if(fr<0||!f0?.item)return;const Xo=validateCurrentPage(ko.current,ft,fr,f0,y0);if(!Xo){tn(!1);return}const{shouldTriggerInlineLoading:$o,canNavigateToNextGroup:Vi,hasMoreGroups:Wo}=n1();if(_i&&$o){if(!Wo){tn(!1);return}if(Vi&&Xo){tn(!0);return}else{tn(!1);return}}tn(Xo)},[fr,f0?.item,O0,_i,ko.current,ft]),useEffect(()=>{if(!Wr?.item||zi.current)return;const Xo=initializeQuestionnaireItems(Wr.item,ko.current,Wr.item,ko.current);if(Xo!==ko.current){ko.current=Xo;const Vi=(Ji=>{const Pa=new Set,Fa=as=>{as.forEach($a=>{var js;const l1=$a.initial&&$a.initial.length>0,yl=($a.type==="choice"||$a.type==="open-choice")&&((js=$a.answerOption)==null?void 0:js.some(dl=>dl.initialSelected===!0));(l1||yl)&&(!$a.enableWhen||isQuestionEnabled($a.enableWhen,$a.enableBehavior,ko.current))&&Pa.add($a.linkId),$a.item&&Fa($a.item)})};return Fa(Ji),Pa})(f0?.item||[]);Un(Vi);const Wo=validateAllItemsRecursively(f0?.item||[],ko.current,_o);Object.keys(Wo).length>0&&X0(Ji=>is(is({},Ji),Wo))}zi.current=!0},[f0?.item,Wr,_o]),useEffect(()=>{gi(Wr)},[Wr]),useEffect(()=>{fr>=0&&window.scrollTo(0,0)},[fr]),useEffect(()=>{var Xo;if(!_i||ft.length===0||xr||!f0?.item)return;const $o=y0.current[fr];if($o===void 0)return;const Vi=G0.current.get($o)||[$o],Wo=[];if(Vi.forEach($a=>{var js;const l1=(js=f0?.item)==null?void 0:js[$a];l1&&hasInitialValue(l1)&&Wo.push(l1)}),Wo.length===0||!Wo.some($a=>Ki($a,ko.current)&&!Ws.current.includes($a.linkId)?(Ws.current.push($a.linkId),!0):!1))return;const Pa=validateCurrentPage(ko.current,ft,fr,f0,y0),Fa=(Xo=f0?.item)==null?void 0:Xo[$o],as=isHiddenAnswerInValid(Fa,ko.current);!Pa||as||(Co.current.add(fr),un(!0),xi.current=!0,$0(Wo[Wo.length-1].linkId))},[fr,ft,_i,xr,f0]);const $0=(Xo,$o=!1,Vi=!1)=>{var Wo,Ji;if($o){ci(removeDisabledItems(ko.current,f0?.item||[]),Vi),tn(!1);return}const Pa=findQuestionByLinkId(f0?.item||[],Xo);if(!Pa)return;const Fa=(Wo=findResponseItem(ko.current,Xo))==null?void 0:Wo.answer;if(getValidationError(Pa,ko.current,Fa,_o))return;const as=getUpdatedFormData(f0?.item||[],ko.current,Xo,Fa),$a=Ki(Pa,as);if(!$a||Xo!==$a&&Ws.current.includes($a))return;tn(!1);const js=findRootGroupLinkId(f0?.item||[],Xo);let l1=as,yl=[];const dl=deepTrimFormData(as,$a,f0?.item||[]);l1=dl.trimmedData,yl=dl.trimmedLinkIds;const Gl=findQuestionByLinkId(f0?.item||[],js||"");ko.current=l1;const Il=findGroupPositionByLinkId(f0?.item||[],Xo||""),gu=Il!==-1?Il:fr;let hu;const Oo=(()=>{var ws;const _1=(ws=f0?.item)!=null?ws:[],pl=(xl,I1)=>xl.some(Xu=>Xu.linkId===I1||(Xu.item?pl(Xu.item,I1):!1)),Gs=_1.findIndex(xl=>xl.linkId===$a||(xl.item?pl(xl.item,$a):!1));if(Gs===-1)return[];const h1=xl=>xl.flatMap(I1=>[I1.linkId,...I1.item?h1(I1.item):[]]),f1=xl=>xl.flatMap(I1=>[I1,...I1.item?f1(I1.item):[]]),B1=f1(_1),Fl=B1.findIndex(xl=>xl.linkId===$a),rl=new Set;let au=!0;for(;au;){au=!1;for(const xl of B1){if(rl.has(xl.linkId)||!xl.enableWhen)continue;xl.enableWhen.some(Xu=>{const ed=B1.findIndex(sc=>sc.linkId===Xu.question);return ed!==-1&&ed<=Fl||rl.has(Xu.question)})&&(rl.add(xl.linkId),au=!0)}}return h1(_1.slice(Gs+1)).filter(xl=>!rl.has(xl))})();Oo.length>0&&(hu=removeItemsFromSchema(f0?.item||[],Oo),gi(Ba(is({},f0),{item:hu})));const Hn=[...yl,...Oo],Ti=validateCurrentPage(l1,ft,gu,f0,y0,Hn),na=findQuestionByLinkId(f0?.item||[],$a),Wa=(Ji=findResponseItem(l1,$a))==null?void 0:Ji.answer,ga=!na?.required||Wa!==void 0&&Wa.length>0&&Object.keys(Wa[0]).length>0;if(Ti&&ga&&!isHiddenAnswerInValid(Gl,l1)){un(!0),xi.current=!0;const _1=((pl,Gs)=>{const h1=[];let f1=!1;const B1=Fl=>{for(const rl of Fl)f1?(h1.push(rl.linkId),rl.item&&B1(rl.item)):rl.linkId===Gs?f1=!0:rl.item&&B1(rl.item)};return B1(pl),h1})(f0?.item||[],$a);_1.length>0&&(Ws.current=Ws.current.filter(pl=>!_1.includes(pl)),Un(pl=>{const Gs=new Set(pl);return _1.forEach(h1=>Gs.delete(h1)),Gs})),Ws.current.push($a),ci(removeDisabledItems(l1,f0?.item||[]),!0,hu)}},Z0=(Xo,$o,Vi=!1)=>{const Wo=updateItemWithReadOnlyExpression(Xo,f0),Ji={item:Wo,selectedAnswer:$o,handleInputChange:Br,showQuestionPrefix:di,onCompleteHandler:$0,errors:Lo,isLoading:xr,isCurrentFormValid:dr,contained:f0?.contained,questionnaireSchemaItems:f0?.item,customErrorConfigurations:jo,formData:ko.current,showStepper:Ui,totalStepsFromExtension:ya,externalComponentRenderMap:hr,hintText:getHintTextFromExtensions(Wo.extension)};if(typeof Oa=="function"&&Vi)Oa(Xo,Ji,ko.current);else if(Xo.type in typeToRenderFunctionMap&&!Vi)return ft.includes(Xo.linkId)||Vt(Pa=>[...Pa,Xo.linkId]),jsx(RenderFHIRQuestionnaireItem,is({},Ji),Xo.linkId);return null},Bt=Xo=>Xo.map($o=>{var Vi,Wo;const Ji=isHiddenExtensionPresent($o);let Pa=(Vi=findResponseItem(ko.current,$o.linkId))==null?void 0:Vi.answer;if((!Pa||Object.keys((Wo=Pa?.[0])!=null?Wo:{}).length===0)&&!cn.has($o.linkId)){if($o.initial&&$o.initial.length>0)Pa=$o.initial,Un(Fa=>new Set(Fa).add($o.linkId));else if(($o.type==="choice"||$o.type==="open-choice")&&$o.answerOption){const Fa=$o.answerOption.filter(as=>as.initialSelected===!0);Fa.length>0&&(Pa=Fa.map(as=>{let $a={};return as.valueCoding?$a={valueCoding:{code:as.valueCoding.code,display:as.valueCoding.display,system:as.valueCoding.system}}:as.valueReference&&($a={valueReference:{reference:as.valueReference.reference,display:as.valueReference.display}}),$a}).filter(as=>Object.keys(as).length>0),Un(as=>new Set(as).add($o.linkId)))}Pa&&(ko.current=getUpdatedFormData(f0?.item||[],ko.current,$o.linkId,Pa))}if(!$o?.enableWhen||isQuestionEnabled($o?.enableWhen,$o.enableBehavior,ko.current)){const Fa=Us.includes($o.linkId)||getUIToolkitCode($o.extension||[])===UI_TOOLKIT_FORM_CONTAINER;return jsxs(React.Fragment,{children:[Z0($o,Pa,Ji),$o.item&&!Ji&&(Fa?jsx(FormContainer,{children:jsx("div",{className:"gap-3xl flex flex-col",children:Bt($o.item)})}):Bt($o.item))]},$o.linkId)}else if($o.type==="group"&&!Ji)return p0.includes($o.linkId)||(ya===void 0&&bn(y0.current.length-1||-1),y0.current=y0.current.filter((Fa,as)=>as!==fr),vo(Fa=>[...Fa,$o.linkId])),null});if(fr>=0){const Xo=[];let $o=0,Vi=0;for(;$o<nr.length&&Vi<y0.current.length;){const Wo=nr[$o],Ji=y0.current[Vi];if(Wo<Ji){const Pa=(Ce=f0?.item)==null?void 0:Ce[Wo];(!Pa?.enableWhen||isQuestionEnabled(Pa.enableWhen,Pa.enableBehavior,ko.current))&&Xo.push($o),$o++}else Wo===Ji&&$o++,Vi++}for(;$o<nr.length;){const Wo=nr[$o],Ji=(Ve=f0?.item)==null?void 0:Ve[Wo];(!Ji?.enableWhen||isQuestionEnabled(Ji.enableWhen,Ji.enableBehavior,ko.current))&&Xo.push($o),$o++}if(Xo.length>0){ya===void 0&&bn(y0.current.length+Xo.length),Xo.reverse().forEach(Ji=>{const Pa=nr[Ji];let Fa=0;for(let as=0;as<y0.current.length;as++){if(y0.current[as]>Pa){Fa=as;break}Fa=as+1}y0.current.splice(Fa,0,Pa)});const Wo=Xo.map(Ji=>{var Pa;const Fa=nr[Ji],as=(Pa=f0?.item)==null?void 0:Pa[Fa];return as?.linkId}).filter(Boolean);vo(Ji=>Ji.filter(Pa=>!Wo.includes(Pa)))}nr.forEach(Wo=>{var Ji;const Pa=(Ji=f0?.item)==null?void 0:Ji[Wo];Pa?.enableWhen&&!isQuestionEnabled(Pa.enableWhen,Pa.enableBehavior,ko.current)&&ko.current.some(as=>as.linkId===Pa.linkId)&&(ko.current=removeAnswerFromFormData(ko.current,Pa.linkId))})}const ri=()=>{var Xo;if(Go&&!to&&fr>0&&Ii!=="completed")ar(y0.current.length-1),E0(!0),Xn(!1),Qi?.();else if(fr>0&&Ii!=="completed"){let $o=fr-1;for(;$o>0;){const Vi=y0.current[$o],Wo=(Xo=f0?.item)==null?void 0:Xo[Vi];if(!Wo?.enableWhen||isQuestionEnabled(Wo.enableWhen,Wo.enableBehavior,ko.current))break;$o--}ar($o),tn(!0),Xn(!1),Qi?.()}else Dr?.()},Ci=Xo=>Xo.preventDefault();return useEffect(()=>{const Xo=setTimeout(()=>{Js(!0)},0);return()=>clearTimeout(Xo)},[]),ma?jsxs(Fragment,{children:[jsxs("form",{id:Gn,className:"w-full","data-testid":"questionnaire-form",onSubmit:Ci,children:[!Ri&&jsxs("div",{className:"tw group text-secondary gap-md mb-2xl hover:text-secondary_hover flex w-fit cursor-pointer items-center text-sm font-semibold hover:font-bold",role:"button","data-testid":"questionnaire-back-button",tabIndex:0,onClick:()=>ri(),onKeyDown:Xo=>{(Xo.key==="Enter"||Xo.key===" ")&&ri()},children:[jsx(ArrowLeft,{}),jsx("span",{className:"group-hover:underline",children:"Back"})]}),Go&&!to?jsx(EmptyState,{className:"mt-5xl",title:Go.title,description:Go.description,featuredIconProps:{icon:Go.icon,color:"gray"},primaryButton:Go.primaryButton,secondaryButton:Go.secondaryButton?Ba(is({},Go.secondaryButton),{onClick:ri}):void 0}):jsxs(Fragment,{children:[!f0?.item&&xr&&jsx(LoadingIndicator,{size:"md",label:"",testId:"questionnaire-loading-indicator"}),f0?.item&&jsx("div",{className:"gap-3xl flex flex-col",children:Bt(fr>=0?f0.item.filter((Xo,$o)=>{const Vi=y0.current[fr];return(G0.current.get(Vi)||[Vi]).includes($o)}):f0?.item||[])})]})]}),zi.current&&Pe]}):jsx(LoadingIndicator,{})}},78912:()=>{},7630:(Y,l,e)=>{"use strict";e.d(l,{l:()=>b});var n=e(31085),t=e(14041),r=e(36087),s=e(1053),o=e(25624),i=e(18522),a=Object.defineProperty,g=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,m=(h,f,v)=>f in h?a(h,f,{enumerable:!0,configurable:!0,writable:!0,value:v}):h[f]=v,d=(h,f)=>{for(var v in f||(f={}))E.call(f,v)&&m(h,v,f[v]);if(u)for(var v of u(f))A.call(f,v)&&m(h,v,f[v]);return h},O=(h,f)=>g(h,c(f));const p=({selected:h,onClick:f,icon:v,title:M,description:x,readOnly:T})=>{const z=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:(0,r.cx)("mr-4 flex h-[64px] w-[64px] items-center justify-center rounded-md",h?"bg-utility-accent-500/20":"bg-gray-100",h?"text-accent-800":"text-quaternary"),children:v}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,n.jsx)("div",{className:"font-body flex w-full flex-row items-start justify-between",children:(0,n.jsx)("div",{className:"text-md text-secondary font-semibold",children:M})}),(0,n.jsx)("div",{className:"text-sm font-normal text-gray-600",children:x})]})]}),S=(0,r.cx)("p-lg flex w-full items-start rounded-xl border-2 text-left shadow-none transition-colors",T?"cursor-not-allowed":"cursor-pointer",T?"border-gray-200 bg-white":h?"border-blue-700 bg-white":"border-gray-100 bg-white",!T&&!h&&"hover:border-gray-400");return T?(0,n.jsx)("div",{className:S,children:z}):(0,n.jsx)("button",{type:"button",onClick:f,className:S,"aria-pressed":!!h,children:z})},b=({item:h,handleInputChange:f,formData:v,isLoading:M})=>{const{incrementCustomErrorCount:x,decrementCustomErrorCount:T}=(0,i.c)(),z=(0,t.useMemo)(()=>{var w;return(w=h.item)!=null?w:[]},[h.item]),S=h.readOnly===!0,y=(0,t.useMemo)(()=>z.filter(w=>!w.enableWhen||(0,o.GN)(w.enableWhen,w.enableBehavior,v??[])),[z,v]),C=(0,t.useMemo)(()=>z.filter(w=>w.enableWhen&&!(0,o.GN)(w.enableWhen,w.enableBehavior,v??[])),[z,v]),R=w=>{var N,V;if(!v)return!1;const q=(0,o.MU)(v,w);return((V=(N=q?.answer)==null?void 0:N[0])==null?void 0:V.valueBoolean)===!0},P=(0,t.useMemo)(()=>y.some(w=>R(w.linkId)),[y,v]),L=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(S||y.length===0){L.current&&(T(),L.current=!1);return}!P&&!L.current?(x(),L.current=!0):P&&L.current&&(T(),L.current=!1)},[P,S,y.length,x,T]),(0,t.useEffect)(()=>{C.forEach(w=>{var N,V;const q=v?(0,o.MU)(v,w.linkId):void 0;(!q||((V=(N=q.answer)==null?void 0:N[0])==null?void 0:V.valueBoolean)!==!1)&&f(w,[{valueBoolean:!1}])})},[C]),(0,t.useEffect)(()=>()=>{L.current&&T()},[]);const D=w=>{const N=R(w.linkId);f(w,[{valueBoolean:!N}])};return(0,n.jsx)("div",O(d({className:"flex flex-col gap-3"},M?{inert:""}:{}),{children:y.map(w=>{var N,V,q,I;const k=R(w.linkId),U=(N=w.extension)==null?void 0:N.find(se=>se.url===s.g4),F=(V=w.extension)==null?void 0:V.find(se=>se.url===s.rz),K=U?.valueString?s.JP[U.valueString]:void 0,G=(q=F?.valueString)!=null?q:"";return(0,n.jsx)(p,{icon:K?(0,n.jsx)(K,{className:"h-6 w-6"}):void 0,title:(I=w.text)!=null?I:"",description:G,selected:k,readOnly:S,onClick:S?void 0:()=>D(w)},w.linkId)})}))}},72866:(Y,l,e)=>{"use strict";e.d(l,{v:()=>i});var n=e(31085),t=e(94627),r=e(36087),s=e(25624);const o=({selected:a,onClick:g,label:c,readOnly:u})=>{const E=(0,r.cx)("rounded-sm border-2 px-3 py-2 text-sm font-medium transition-colors",u?"cursor-default":"cursor-pointer",a?"border-brand bg-brand-50 text-primary":"border-secondary bg-primary text-secondary",!u&&!a&&"hover:border-tertiary");return u?(0,n.jsx)("div",{className:E,children:c}):(0,n.jsx)("button",{type:"button",onClick:g,className:E,"aria-pressed":!!a,children:c})},i=({item:a,handleInputChange:g,formData:c})=>{var u;const E=(u=a.item)!=null?u:[],A=a.readOnly===!0,m=O=>{var p,b;if(!c)return!1;const h=(0,s.MU)(c,O);return((b=(p=h?.answer)==null?void 0:p[0])==null?void 0:b.valueBoolean)===!0},d=O=>{const p=m(O.linkId);g(O,[{valueBoolean:!p}])};return(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[a.text&&(0,n.jsx)("p",{className:"text-secondary text-sm",dangerouslySetInnerHTML:{__html:(0,t.p)(a.text)}}),(0,n.jsx)("div",{className:"flex flex-wrap gap-3",children:E.map(O=>{var p;const b=m(O.linkId);return(0,n.jsx)(o,{label:(p=O.text)!=null?p:"",selected:b,readOnly:A,onClick:A?void 0:()=>d(O)},O.linkId)})})]})}},65735:(Y,l,e)=>{"use strict";e.d(l,{d:()=>s});var n=e(31085),t=e(36087),r=e(1053);const s=({item:o})=>{var i,a,g,c;const u=o.text||"",E=(a=(i=o.extension)==null?void 0:i.find(d=>d.url===r.rz))==null?void 0:a.valueString,A=(c=(g=o.extension)==null?void 0:g.find(d=>d.url===r.g4))==null?void 0:c.valueString,m=A?r.JP[A]:void 0;return(0,n.jsxs)("div",{className:"bg-primary flex items-start gap-4 rounded-lg px-4 py-6 shadow-sm","data-testid":o.linkId,children:[m&&(0,n.jsx)(t.FeaturedIcon,{icon:m,color:"brand",size:"lg",className:"text-accent-600 size-14"}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[(0,n.jsx)("p",{className:"text-primary text-lg font-semibold",children:u}),E&&(0,n.jsx)("p",{className:"text-secondary text-sm",children:E})]})]})}},18522:(Y,l,e)=>{"use strict";e.d(l,{c:()=>O});var n=e(31085),t=e(14041),r=e(8322),s=e(25624),o=Object.defineProperty,i=Object.defineProperties,a=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,E=(b,h,f)=>h in b?o(b,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):b[h]=f,A=(b,h)=>{for(var f in h||(h={}))c.call(h,f)&&E(b,f,h[f]);if(g)for(var f of g(h))u.call(h,f)&&E(b,f,h[f]);return b},m=(b,h)=>i(b,a(h));const d=(0,t.createContext)(void 0),O=()=>{const b=(0,t.useContext)(d);if(!b)throw new Error("useFHIRQuestionnaire must be used within an FHIRQuestionnaireProvider");return b},p=({children:b,analyticsConfig:h})=>{const{trackEvent:f}=useAnalytics(),[v,M]=useState(null),[x,T]=useState(null),[z,S]=useState(!1),[y,C]=useState(null),[R,P]=useState(-1),[L,D]=useState(!1),[w,N]=useState(-1),[V,q]=useState(!1),[I,k]=useState(0),[U,F]=useState(!1),[K,G]=useState(!1),se=useRef([]),oe=()=>{k(ne=>ne+1)},te=useCallback(ne=>{F(ne)},[]),pe=()=>{k(ne=>Math.max(0,ne-1))},be=I>0,ze=useCallback((ne,ae,me)=>{if(!h)return;const he=h[ne];if(!he)return;let de;if(Array.isArray(he))if(me)de=he.find(Ee=>Ee.inputType===me);else{console.warn(`Multiple analytics configs found for linkId "${ne}" but no inputType provided. Skipping tracking.`);return}else{if(me&&he.inputType&&he.inputType!==me)return;de=he}if(!de)return;let ue=A({},ae);de.valueTransform&&(ue=Object.keys(ae).reduce((Ee,De)=>{var Se;const Ie=(Se=de.valueTransform)==null?void 0:Se[De];return Ee[De]=Ie?applyValueTransform(ae[De],Ie):ae[De],Ee},{}));let re=A({},ue);de.propertyMapping&&(re=Object.keys(ue).reduce((Ee,De)=>{var Se;const Ie=((Se=de.propertyMapping)==null?void 0:Se[De])||De;return Ee[Ie]=ue[De],Ee},{}));const J=de.eventName,ve=de.description;f(J,m(A(A({},re),de.properties),{_event_metadata:ve?{description:ve}:void 0}))},[h,f]),ge={isCurrentFormValid:z,currentGroupLinkId:y,currentGroupIndex:R,hideFooterButton:L,totalSteps:w,isLoading:V,isInlineNextQuestionTriggered:K,hasCustomError:be,analyticsConfig:h,hasExternalError:U,handleContinueButtonClick:v,handleBackButtonClick:x,setHandleContinueButtonClick:M,setHandleBackButtonClick:T,setIsCurrentFormValid:S,setCurrentGroupLinkId:C,setCurrentGroupIndex:P,setHideFooterButton:D,setTotalSteps:N,setIsLoading:q,setIsInlineNextQuestionTriggered:G,incrementCustomErrorCount:oe,decrementCustomErrorCount:pe,trackQuestionnaireEvent:ze,setHasExternalError:te,groupItemIndicesRef:se};return jsx(d.Provider,{value:ge,children:b})}},35473:(Y,l,e)=>{"use strict";var n=e(32957),t=e(18522),r=e(78912),s=e.n(r);e.o(r,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return r.BWELL_STORED_TOKENS_KEY}}),e.o(r,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return r.LocationPermissionEnum}}),e.o(r,"LocationType")&&e.d(l,{LocationType:function(){return r.LocationType}}),e.o(r,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return r.SchedulingLocationCard}}),e.o(r,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return r.formatPhoneNumber}}),e.o(r,"getInitials")&&e.d(l,{getInitials:function(){return r.getInitials}}),e.o(r,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return r.removeAfterLastComma}}),e.o(r,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return r.shouldForceLogoutAfterAuthFailure}}),e.o(r,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return r.unformatPhoneNumber}}),e.o(r,"useDebounce")&&e.d(l,{useDebounce:function(){return r.useDebounce}}),e.o(r,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return r.useDeviceDetection}}),e.o(r,"useRedirect")&&e.d(l,{useRedirect:function(){return r.useRedirect}}),e.o(r,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return r.useSearchQueryParams}});var o=e(25624),i=e(1053),a=e(7630),g=e(72866),c=e(65735)},61388:(Y,l,e)=>{"use strict";e.d(l,{n:()=>s});var n=e(31085),t=e(36087),r=e(33180);const s=({actionButtonText:o,onActionButtonClick:i,title:a,infoDetails:g})=>(0,n.jsxs)("div",{className:"bg-primary py-2xl px-lg rounded-2xl shadow-sm",children:[(0,n.jsxs)("div",{className:"gap-lg mb-2xl flex items-center justify-between",children:[(0,n.jsx)("p",{className:"text-primary text-md font-semibold",children:a}),o&&i&&(0,n.jsx)(t.Button,{color:"link-color",onClick:i,className:"text-link-primary hover:text-link-primary focus:text-link-primary focus-visible:text-link-primary",children:o})]}),(0,n.jsx)(r.InfoCardDetails,{infoDetails:g})]})},79286:()=>{},97257:(Y,l,e)=>{"use strict";e.d(l,{d:()=>o});var n=e(31085),t=e(94043),r=e(76323),s=e(36087);const o=({infoDetails:i,className:a})=>{const{redirectToBook:g,redirectToMap:c,redirectToUrl:u}=(0,r.useRedirect)(),E=(d,O,p)=>{d.preventDefault(),O.linkType==="phone"?g(p):O.linkType==="address"?c({address:p}):O.linkType==="url"&&O.link?u(O.link):O.link&&window.open(O.link,"_blank","noopener,noreferrer")},A=(d,O)=>{switch(O){case"phone":return(0,r.formatPhoneNumber)(d);default:return d}},m=(d,O)=>O.linkType||O.link?(0,n.jsx)(s.Button,{color:"link-color",onClick:p=>E(p,O,d),className:"text-md text-link-primary hover:text-link-primary focus:text-link-primary focus-visible:text-link-primary text-left font-normal! wrap-anywhere underline underline-offset-2",children:A(d,O.displayType)}):(0,n.jsx)("p",{className:"text-primary text-md m-0 wrap-anywhere",children:A(d,O.displayType)});return(0,n.jsx)("div",{className:(0,t.cx)("gap-2xl flex flex-col",a),children:i.map((d,O)=>{const p=d.Icon;return(0,n.jsxs)("div",{className:"gap-md flex items-start",children:[(0,n.jsx)(s.FeaturedIcon,{icon:(0,n.jsx)(p,{className:"text-fg-secondary"}),size:"lg",color:"gray"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-tertiary m-0 mb-1 text-sm",children:d.label}),(()=>{const b=Array.isArray(d.value)?d.value:[d.value];return b.length>1?(0,n.jsx)("ul",{className:"m-0 list-disc pl-5",children:b.map((h,f)=>(0,n.jsx)("li",{className:"text-primary text-md font-medium",children:m(h,d)},f))}):m(b[0],d)})()]})]},O)})})}},71428:()=>{},3203:(Y,l,e)=>{"use strict";e.d(l,{InfoCardDetails:()=>n.d});var n=e(97257),t=e(71428),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}})},33180:(Y,l,e)=>{"use strict";e.d(l,{InfoCardDetails:()=>n.InfoCardDetails});var n=e(3203);e.o(n,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return n.BWELL_STORED_TOKENS_KEY}}),e.o(n,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return n.LocationPermissionEnum}}),e.o(n,"LocationType")&&e.d(l,{LocationType:function(){return n.LocationType}}),e.o(n,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return n.SchedulingLocationCard}}),e.o(n,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return n.formatPhoneNumber}}),e.o(n,"getInitials")&&e.d(l,{getInitials:function(){return n.getInitials}}),e.o(n,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return n.removeAfterLastComma}}),e.o(n,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return n.shouldForceLogoutAfterAuthFailure}}),e.o(n,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return n.unformatPhoneNumber}}),e.o(n,"useDebounce")&&e.d(l,{useDebounce:function(){return n.useDebounce}}),e.o(n,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return n.useDeviceDetection}}),e.o(n,"useRedirect")&&e.d(l,{useRedirect:function(){return n.useRedirect}}),e.o(n,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return n.useSearchQueryParams}})},27163:(Y,l,e)=>{"use strict";e.d(l,{InfoCard:()=>n.n});var n=e(61388),t=e(79286),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}});var s=e(33180);e.o(s,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return s.BWELL_STORED_TOKENS_KEY}}),e.o(s,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return s.LocationPermissionEnum}}),e.o(s,"LocationType")&&e.d(l,{LocationType:function(){return s.LocationType}}),e.o(s,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return s.SchedulingLocationCard}}),e.o(s,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return s.formatPhoneNumber}}),e.o(s,"getInitials")&&e.d(l,{getInitials:function(){return s.getInitials}}),e.o(s,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return s.removeAfterLastComma}}),e.o(s,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return s.shouldForceLogoutAfterAuthFailure}}),e.o(s,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return s.unformatPhoneNumber}}),e.o(s,"useDebounce")&&e.d(l,{useDebounce:function(){return s.useDebounce}}),e.o(s,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return s.useDeviceDetection}}),e.o(s,"useRedirect")&&e.d(l,{useRedirect:function(){return s.useRedirect}}),e.o(s,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return s.useSearchQueryParams}})},98549:(Y,l,e)=>{"use strict";var n=e(31085);const t=({currentStep:r,totalSteps:s})=>jsx(Stack,{"data-testid":"stepper",width:"100%",children:jsx(LinearProgress,{"aria-label":`Progress bar showing step ${r} of ${s}`,sx:{height:"2px",backgroundColor:"rgba(0,0,0,0.1)","& .MuiLinearProgress-bar":{backgroundColor:"accessibility.info",borderRadius:2}},value:r/s*100,variant:"determinate"})})},26877:(Y,l,e)=>{"use strict";e.d(l,{J:()=>M});var n=e(31085),t=e(14041);const r=({size:x=24,color:T="currentColor",...z})=>t.createElement("svg",{viewBox:"0 0 24 24",width:x,height:x,stroke:T,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...z},t.createElement("path",{d:"M3.413 10.745c-.595-.232-.893-.348-.98-.515a.5.5 0 0 1 0-.461c.087-.167.385-.283.98-.515L20.3 2.664c.537-.21.806-.315.978-.258a.5.5 0 0 1 .316.316c.057.172-.048.44-.258.977l-6.59 16.888c-.232.595-.348.893-.515.98a.5.5 0 0 1-.462 0c-.167-.088-.282-.385-.514-.98l-2.628-6.759a1.075 1.075 0 0 0-.107-.232.5.5 0 0 0-.116-.117 1.069 1.069 0 0 0-.232-.106l-6.759-2.628Z"}));r.displayName="NavigationPointer01";var s=e(8322),o=e(76808),i=e(92094),a=e(5380),g=e(54783),c=e(53151),u=e(85449),E=Object.defineProperty,A=Object.defineProperties,m=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,b=(x,T,z)=>T in x?E(x,T,{enumerable:!0,configurable:!0,writable:!0,value:z}):x[T]=z,h=(x,T)=>{for(var z in T||(T={}))O.call(T,z)&&b(x,z,T[z]);if(d)for(var z of d(T))p.call(T,z)&&b(x,z,T[z]);return x},f=(x,T)=>A(x,m(T)),v=(x,T,z)=>new Promise((S,y)=>{var C=L=>{try{P(z.next(L))}catch(D){y(D)}},R=L=>{try{P(z.throw(L))}catch(D){y(D)}},P=L=>L.done?S(L.value):Promise.resolve(L.value).then(C,R);P((z=z.apply(x,T)).next())});const M=({setLocationUpdating:x,title:T,description:z,isOpen:S,onClose:y})=>{const{locationPermission:C,position:R,requestPosition:P,setLocationPermission:L}=(0,u.GU)(),{trackEvent:D}=(0,s.st)(),{queryParams:w,setQueryParams:N}=(0,g.i)(),[V,q]=(0,t.useState)(!1),I=(0,c.s)(a.so.LAST_LOCATION_PROMPT),k=S!==void 0?S:V;(0,t.useEffect)(()=>{(k||S)&&D("location_permissions_modal_loaded",{_event_metadata:{description:"A user was presented with the location permissions modal."}})},[S,k,D]);const U=(0,t.useCallback)(be=>{N(f(h({},w),{location:be,locationType:a.iF.CURRENT_LOCATION,locationPermission:C||""}))},[C,w,N]),F=(0,t.useCallback)(()=>{S===void 0&&(!C||[a.Ef.GRANTED].includes(C)&&I.get()||[a.Ef.PROMPT].includes(C)&&I.get()&&R||q([a.Ef.PROMPT,a.Ef.GRANTED].includes(C)))},[S,C,I,R]);(0,t.useEffect)(()=>{F()},[F]);const K=(0,o.Ul)(),G=(0,t.useCallback)(()=>v(void 0,null,function*(){x&&x(!0);let be;try{be=yield P(),be&&U&&U(`${be.coords.latitude},${be.coords.longitude}`)}catch(ze){ze instanceof Error?K?.error(ze,"Error requesting location"):K?.error(`Error requesting location - ${JSON.stringify(ze)}`),S!==void 0&&y?y():q(!1)}return x&&x(!1),!!be}),[K,U,P,x,S,y]),se=(0,t.useCallback)(()=>v(void 0,null,function*(){D("location_permissions_cta_clicked",{click:"Use my current location",_event_metadata:{description:"A user clicked continue an option on the location permissions modal."}}),S!==void 0&&y?y():q(!1),I.set(new Date().toISOString()),yield G()}),[D,S,y,I,G]),oe=(0,t.useCallback)(be=>{D("location_permissions_cta_clicked",{click:be==="close"?"X":"Search another way",_event_metadata:{description:"A user clicked continue an option on the location permissions modal."}}),L(a.Ef.DENIED),N(f(h({},w),{locationPermission:a.Ef.DENIED})),I.remove(),S!==void 0&&y?y():q(!1)},[D,L,N,w,I,S,y]),te=(0,t.useCallback)(()=>oe("close"),[oe]),pe=(0,t.useCallback)(()=>oe("cancel"),[oe]);return(0,n.jsx)(i.Modal,{id:"location-modal",isOpen:k,className:"sm:max-w-md",title:{content:T,tag:"h1"},featuredIcon:{icon:r,color:"brand",size:"lg"},description:{content:z},closeButton:{onCloseClick:te},primaryButton:{children:"Use my current location",onClick:se},secondaryButton:{children:"Search another way",onClick:pe}})}},35471:(Y,l,e)=>{"use strict";var n=e(26877)},98741:(Y,l,e)=>{"use strict";var n=e(31085),t=e(14041),r=Object.defineProperty,s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(E,A,m)=>A in E?r(E,A,{enumerable:!0,configurable:!0,writable:!0,value:m}):E[A]=m,g=(E,A)=>{for(var m in A||(A={}))o.call(A,m)&&a(E,m,A[m]);if(s)for(var m of s(A))i.call(A,m)&&a(E,m,A[m]);return E};const c=E=>{if(!E||typeof E!="object")throw new Error("Invalid animation data");const A=m=>{if(!m||typeof m!="object")return m;if(Array.isArray(m))return m.map(A);const d=g({},m);delete d.ef,delete d.expr,typeof d.x=="string"&&delete d.x;for(const O in d)typeof d[O]=="object"&&(d[O]=A(d[O]));return d};return A(E)},u=({animationData:E,loop:A=!0,autoplay:m=!0,className:d=""})=>{const O=useRef(null),p=useRef(null);return useEffect(()=>{if(!!O.current){try{const b=c(E);p.current=lottie.loadAnimation({container:O.current,renderer:"svg",loop:A,autoplay:m,animationData:b})}catch(b){console.error("Failed to load Lottie animation:",b)}return()=>{var b;(b=p.current)==null||b.destroy()}}},[E,A,m]),jsx("div",{ref:O,className:d})}},81304:(Y,l,e)=>{"use strict";e.d(l,{T:()=>u});var n=e(31085),t=e(14041),r=e(78628),s=e(66267);const o=E=>E*1609.34;var i=e(27419);const a={gray50:"#f9fafb",gray100:"#f3f4f6",blue100:"#dbeafe"};var g=e(92469);const c=({center:E,isLoading:A=!1,searchRadius:m,className:d,height:O="350px",width:p="100%",googleMapsApiKey:b,ariaLabel:h})=>{const f=(0,s.Bd)(),{isLoaded:v}=(0,r.KD)({googleMapsApiKey:b||""}),M={height:typeof O=="number"?`${O}px`:O,width:typeof p=="number"?`${p}px`:p},x=(0,t.useCallback)(z=>{google.maps.event.addListenerOnce(z,"idle",()=>{if(m&&E.lat&&E.lng){const y=new google.maps.Circle({center:{lat:E.lat,lng:E.lng},radius:o(m)}).getBounds();y&&z.fitBounds(y,0)}if(h){const y=z.getDiv().querySelector('[role="region"][aria-label="Map"]');y&&y.setAttribute("aria-label",h)}})},[E,m,h]);if(!v||A)return(0,n.jsx)("div",{className:(0,i.cx)("flex animate-pulse items-center justify-center rounded-lg bg-gray-200",d),style:M,children:(0,n.jsx)("div",{className:"text-sm text-gray-500",children:f("LOADING_MAP")})});if(!E.lat||!E.lng)return(0,n.jsx)("div",{className:(0,i.cx)("flex items-center justify-center rounded-lg border-2 border-dashed border-gray-300 bg-gray-100",d),style:M,children:(0,n.jsx)("div",{className:"text-sm text-gray-500",children:f("UNABLE_TO_LOAD_MAP_NO_LOCATION")})});const T={clickableIcons:!1,disableDefaultUI:!0,disableDoubleClickZoom:!0,styles:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{color:a.gray50}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:a.gray100}]},{featureType:"water",elementType:"geometry",stylers:[{color:a.blue100}]}]};return(0,n.jsx)("div",{className:(0,i.cx)("focus-within:ring-focus-ring overflow-hidden rounded-lg focus-within:ring-2 focus-within:ring-offset-2 [&_iframe]:outline-none",d),children:(0,n.jsx)(r.u6,{center:{lat:E.lat,lng:E.lng},mapContainerStyle:M,onLoad:x,options:T,zoom:12,children:(0,n.jsx)(g.I,{center:E})})})},u=(0,t.memo)(c)},82184:()=>{},53269:(Y,l,e)=>{"use strict";e.d(l,{Map:()=>n.T});var n=e(81304),t=e(82184),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}});var s=e(92469)},92469:(Y,l,e)=>{"use strict";e.d(l,{I:()=>r});var n=e(31085),t=e(78628);const r=({center:s})=>typeof s?.lat=="number"&&typeof s?.lng=="number"&&!isNaN(s.lat)&&!isNaN(s.lng)?(0,n.jsx)(t.pH,{clickable:!1,"data-testid":"marker-center",position:{lat:s.lat,lng:s.lng}}):null},43743:(Y,l,e)=>{"use strict";var n=e(31085),t=e(76323),r=e(36087);const s=({name:i,profileUrl:a,subTitle:g,variant:c="default",showChevron:u=!0,onClick:E,pendingText:A})=>{const m=!!A,d=!m&&!!E,O=u&&d;return jsxs("button",{type:"button",onClick:d?E:void 0,disabled:!d,className:cx("bg-primary border-primary flex w-full items-center justify-between gap-3 rounded-lg border p-4 text-left",c==="compact"&&"rounded-xl p-3",!O&&"justify-start",d?"cursor-pointer":"cursor-default",m&&"opacity-60"),children:[jsx(Avatar,{src:a,alt:i,size:"md",initials:getInitials(i),className:"[&>span]:text-secondary"}),jsxs("div",{className:"flex flex-col items-start",children:[jsx("span",{className:"text-sm font-semibold",children:i}),m?jsxs("span",{className:"text-secondary flex items-center gap-1.5 text-sm",children:[jsx(LoadingIndicator,{size:"xs"}),A]}):jsx("span",{className:"text-secondary text-sm",children:g})]}),O&&jsx(ChevronRight,{className:"text-quaternary ml-auto size-5"})]})},o=()=>jsx("div",{className:"bg-primary border-primary animate-pulse items-center justify-between rounded-lg border p-4",children:jsxs("div",{className:"flex items-center space-x-4",children:[jsx("div",{className:"h-10 w-10 rounded-full bg-gray-300"}),jsxs("div",{className:"flex-1 space-y-2",children:[jsx("div",{className:"h-4 w-3/4 rounded bg-gray-300"}),jsx("div",{className:"h-3 w-1/2 rounded bg-gray-300"})]})]})})},4062:(Y,l,e)=>{"use strict";var n=e(31085);const t=({children:s,content:o,fullImageHeader:i=!1,header:a,title:g})=>jsx("div",{className:"tw-preflight gap-lg flex h-full w-full items-center justify-center",children:jsxs("div",{className:"max-w-16xl flex h-fit w-full flex-col items-center justify-center self-center overflow-hidden rounded-2xl",children:[i?a:jsx("div",{className:"bg-utility-accent-100 mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg",children:a}),jsxs("div",{className:"gap-lg p-sm md:pb-2xl h-fit w-full md:p-[55px]",children:[jsxs("div",{className:"text-center",children:[jsx("h1",{className:"font-display text-primary mb-md px-5 text-3xl leading-[38px] font-normal tracking-tight",children:g}),o&&jsx("h2",{className:"font-body text-secondary leading-xl text-sm font-normal",children:o})]}),s]})]})}),r=null},51254:(Y,l,e)=>{"use strict";var n=e(31085),t=e(36087);const r=({title:s,description:o,icon:i})=>{var a;return jsxs("div",{className:"tw-preflight py-md gap-md flex h-fit w-full flex-row items-start",children:[jsx(FeaturedIcon,{icon:i.icon,color:(a=i.color)!=null?a:"brand",size:"lg",className:i.iconClassName}),jsxs("div",{className:"flex flex-col",children:[jsx("p",{className:"font-body leading-xl text-secondary text-sm font-semibold",children:s}),o&&jsx("p",{className:"font-body leading-xl text-secondary text-sm font-normal",children:o})]})]})}},69092:()=>{},33457:(Y,l,e)=>{"use strict";var n=e(51254),t=e(69092),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}})},77057:(Y,l,e)=>{"use strict";e.d(l,{i:()=>Qe});var n=e(31085),t=e(36087),r=e(14041);const s=({size:Ye=24,color:It="currentColor",...mn})=>r.createElement("svg",{viewBox:"0 0 24 24",width:Ye,height:Ye,stroke:It,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...mn},r.createElement("path",{d:"M9.5 7h5m-5 4h5m-5 4h5m3.5 6V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C16.48 3 15.92 3 14.8 3H9.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C6 4.52 6 5.08 6 6.2V21m14 0H4"}));s.displayName="Building04";var o=e(14449),i=e(14711),a=e(58139),g=e(37121),c=e(43144);function u(Ye){Ye()}let E=null;const A=Ye=>E=Ye,m=()=>E,d=(0,r.createContext)(null),O=null;function p(){return(0,r.useContext)(d)}let h=()=>{throw new Error("uSES not initialized!")};const f=Ye=>{h=Ye},v=(Ye,It)=>Ye===It;function M(Ye=d){const It=Ye===d?p:()=>(0,r.useContext)(Ye);return function(Sn,et=v){const{store:Rt,subscription:kt,getServerState:qn}=It(),Sr=h(kt.addNestedSub,Rt.getState,qn||Rt.getState,Sn,et);return(0,r.useDebugValue)(Sr),Sr}}const x=M();var T=e(75985),z=e(524);function S(){const Ye=getBatch();let It=null,mn=null;return{clear(){It=null,mn=null},notify(){Ye(()=>{let Sn=It;for(;Sn;)Sn.callback(),Sn=Sn.next})},get(){let Sn=[],et=It;for(;et;)Sn.push(et),et=et.next;return Sn},subscribe(Sn){let et=!0,Rt=mn={callback:Sn,next:null,prev:mn};return Rt.prev?Rt.prev.next=Rt:It=Rt,function(){!et||It===null||(et=!1,Rt.next?Rt.next.prev=Rt.prev:mn=Rt.prev,Rt.prev?Rt.prev.next=Rt.next:It=Rt.next)}}}}const y={notify(){},get:()=>[]};function C(Ye,It){let mn,Sn=y;function et(mr){return Sr(),Sn.subscribe(mr)}function Rt(){Sn.notify()}function kt(){Ln.onStateChange&&Ln.onStateChange()}function qn(){return Boolean(mn)}function Sr(){mn||(mn=It?It.addNestedSub(kt):Ye.subscribe(kt),Sn=S())}function pn(){mn&&(mn(),mn=void 0,Sn.clear(),Sn=y)}const Ln={addNestedSub:et,notifyNestedSubs:Rt,handleChangeWrapper:kt,isSubscribed:qn,trySubscribe:Sr,tryUnsubscribe:pn,getListeners:()=>Sn};return Ln}const R=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",P=null,L=null;let D=null;const w=Ye=>{D=Ye},N=null,V=null,q=Ye=>{try{return JSON.stringify(Ye)}catch{return String(Ye)}};function I(Ye,It,mn){useIsomorphicLayoutEffect(()=>Ye(...It),mn)}function k(Ye,It,mn,Sn,et,Rt){Ye.current=Sn,mn.current=!1,et.current&&(et.current=null,Rt())}function U(Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln){if(!Ye)return()=>{};let mr=!1,Bn=null;const Xr=()=>{if(mr||!qn.current)return;const Nt=It.getState();let Fe,ot;try{Fe=Sn(Nt,et.current)}catch(Je){ot=Je,Bn=Je}ot||(Bn=null),Fe===Rt.current?kt.current||pn():(Rt.current=Fe,Sr.current=Fe,kt.current=!0,Ln())};return mn.onStateChange=Xr,mn.trySubscribe(),Xr(),()=>{if(mr=!0,mn.tryUnsubscribe(),mn.onStateChange=null,Bn)throw Bn}}const F=()=>N;function K(Ye,It){return Ye===It}let G=!1;function se(Ye,It,mn,{pure:Sn,areStatesEqual:et=K,areOwnPropsEqual:Rt=shallowEqual,areStatePropsEqual:kt=shallowEqual,areMergedPropsEqual:qn=shallowEqual,forwardRef:Sr=!1,context:pn=ReactReduxContext}={}){const Ln=pn,mr=mapStateToPropsFactory(Ye),Bn=mapDispatchToPropsFactory(It),Xr=mergePropsFactory(mn),Yr=Boolean(Ye);return Fe=>{const ot=Fe.displayName||Fe.name||"Component",Je=`Connect(${ot})`,tt={shouldHandleStateChanges:Yr,displayName:Je,wrappedComponentName:ot,WrappedComponent:Fe,initMapStateToProps:mr,initMapDispatchToProps:Bn,initMergeProps:Xr,areStatesEqual:et,areStatePropsEqual:kt,areOwnPropsEqual:Rt,areMergedPropsEqual:qn};function rt(st){const[le,ye,Ue]=useMemo(()=>{const{reactReduxForwardedRef:zn}=st,gn=_objectWithoutPropertiesLoose(st,L);return[st.context,zn,gn]},[st]),Te=useMemo(()=>le&&le.Consumer&&isContextConsumer(React.createElement(le.Consumer,null))?le:Ln,[le,Ln]),Tt=useContext(Te),Zt=Boolean(st.store)&&Boolean(st.store.getState)&&Boolean(st.store.dispatch),vn=Boolean(Tt)&&Boolean(Tt.store),_n=Zt?st.store:Tt.store,Ar=vn?Tt.getServerState:_n.getState,Ft=useMemo(()=>defaultSelectorFactory(_n.dispatch,tt),[_n]),[we,Ze]=useMemo(()=>{if(!Yr)return V;const zn=createSubscription(_n,Zt?void 0:Tt.subscription),gn=zn.notifyNestedSubs.bind(zn);return[zn,gn]},[_n,Zt,Tt]),At=useMemo(()=>Zt?Tt:_extends({},Tt,{subscription:we}),[Zt,Tt,we]),Gt=useRef(),Yt=useRef(Ue),rn=useRef(),$n=useRef(!1),Vr=useRef(!1),Lt=useRef(!1),Et=useRef();useIsomorphicLayoutEffect(()=>(Lt.current=!0,()=>{Lt.current=!1}),[]);const bt=useMemo(()=>()=>rn.current&&Ue===Yt.current?rn.current:Ft(_n.getState(),Ue),[_n,Ue]),qt=useMemo(()=>gn=>we?U(Yr,_n,we,Ft,Yt,Gt,$n,Lt,rn,Ze,gn):()=>{},[we]);I(k,[Yt,Gt,$n,Ue,rn,Ze]);let hn;try{hn=D(qt,bt,Ar?()=>Ft(Ar(),Ue):bt)}catch(zn){throw Et.current&&(zn.message+=`
872
872
  The error may be correlated with this previous error:
package/native.js CHANGED
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import{ComponentView as o}from"@icanbwell/native-components";var s="@icanbwell/composite",p="1.1153.3",c="icanbwell",v="module",l="index.js",m="types/index.d.ts",b="UNLICENSED",d={url:"https://github.com/icanbwell/ui-platform.git"},y={"*":{native:["types/native.d.ts"]}},u={lint:"eslint .","lint:eslint":"npm run lint"},w={"@icanbwell/native-components":"6.14.2"},f={react:"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-native":"^0.71.2","react-native-webview":"^11.4.2"},O={"react-native":{optional:!0},react:{optional:!0},"react-dom":{optional:!0},"react-native-webview":{optional:!0}},j="0.1409.3",D="@icanbwell/composite. repo version: 0.1409.3",V={name:s,version:p,author:c,type:v,main:l,types:m,license:b,repository:d,typesVersions:y,scripts:u,dependencies:w,peerDependencies:f,peerDependenciesMeta:O,repoVersion:j,description:D};const g="composite";var h=Object.defineProperty,P=Object.defineProperties,x=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,i=(r,e,t)=>e in r?h(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,M=(r,e)=>{for(var t in e||(e={}))C.call(e,t)&&i(r,t,e[t]);if(n)for(var t of n(e))E.call(e,t)&&i(r,t,e[t]);return r},N=(r,e)=>P(r,x(e));const I=r=>a(o,N(M({},r),{version:V.version,name:g}));export{I as Composite};
1
+ import{jsx as a}from"react/jsx-runtime";import{ComponentView as o}from"@icanbwell/native-components";var s="@icanbwell/composite",p="1.1154.0",c="icanbwell",v="module",l="index.js",m="types/index.d.ts",b="UNLICENSED",d={url:"https://github.com/icanbwell/ui-platform.git"},y={"*":{native:["types/native.d.ts"]}},u={lint:"eslint .","lint:eslint":"npm run lint"},w={"@icanbwell/native-components":"6.14.2"},f={react:"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-native":"^0.71.2","react-native-webview":"^11.4.2"},O={"react-native":{optional:!0},react:{optional:!0},"react-dom":{optional:!0},"react-native-webview":{optional:!0}},j="0.1410.0",D="@icanbwell/composite. repo version: 0.1410.0",V={name:s,version:p,author:c,type:v,main:l,types:m,license:b,repository:d,typesVersions:y,scripts:u,dependencies:w,peerDependencies:f,peerDependenciesMeta:O,repoVersion:j,description:D};const g="composite";var h=Object.defineProperty,P=Object.defineProperties,x=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,i=(r,e,t)=>e in r?h(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,M=(r,e)=>{for(var t in e||(e={}))C.call(e,t)&&i(r,t,e[t]);if(n)for(var t of n(e))E.call(e,t)&&i(r,t,e[t]);return r},N=(r,e)=>P(r,x(e));const I=r=>a(o,N(M({},r),{version:V.version,name:g}));export{I as Composite};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/composite",
3
- "version": "1.1153.3",
3
+ "version": "1.1154.0",
4
4
  "author": "icanbwell",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -43,6 +43,6 @@
43
43
  "optional": true
44
44
  }
45
45
  },
46
- "repoVersion": "0.1409.3",
47
- "description": "@icanbwell/composite. repo version: 0.1409.3"
46
+ "repoVersion": "0.1410.0",
47
+ "description": "@icanbwell/composite. repo version: 0.1410.0"
48
48
  }