@photonhealth/elements 0.19.5 → 0.19.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1448,7 +1448,7 @@ Replace your options with a function.`),t;const a=typeof t=="function"?t():t;ret
|
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
|
-
`;function _H(e){const t=wn(),[r,n]=B(null);async function i(){const{data:a}=await t.apollo.query({query:kH,variables:{id:e.pharmacyId}});a?.pharmacy&&n(a.pharmacy)}return Tt(()=>{i()}),(()=>{var a=xH();return S(a,b(be,{get loading(){return!r()},sampleLoadingText:"Loading Name",get children(){return r()?.name}}),null),S(a,b(be,{get loading(){return!r()},color:"gray",size:"sm",sampleLoadingText:"Cityville, ST",get children(){var o=wH(),s=o.firstChild;return S(o,()=>r()?.address?.city,s),S(o,()=>r()?.address?.state,null),o}}),null),a})()}var CH=x("<div class=mt-4><div>"),SH=x("<div><div>");const Xs={patientWillSelect:{badgeColor:"purple",badgeText:"Patient Will Select",text:"Patient will select a pharmacy after you send the prescription(s)."},recentPharmacy:{badgeColor:"yellow",badgeText:"Recent Pharmacy",text:"This patient selected this pharmacy in the last 8 hours. After you send this order, the patient can change the pharmacy."},preferredPharmacy:{badgeColor:"blue",badgeText:"Preferred Pharmacy",text:"
|
|
1451
|
+
`;function _H(e){const t=wn(),[r,n]=B(null);async function i(){const{data:a}=await t.apollo.query({query:kH,variables:{id:e.pharmacyId}});a?.pharmacy&&n(a.pharmacy)}return Tt(()=>{i()}),(()=>{var a=xH();return S(a,b(be,{get loading(){return!r()},sampleLoadingText:"Loading Name",get children(){return r()?.name}}),null),S(a,b(be,{get loading(){return!r()},color:"gray",size:"sm",sampleLoadingText:"Cityville, ST",get children(){var o=wH(),s=o.firstChild;return S(o,()=>r()?.address?.city,s),S(o,()=>r()?.address?.state,null),o}}),null),a})()}var CH=x("<div class=mt-4><div>"),SH=x("<div><div>");const Xs={patientWillSelect:{badgeColor:"purple",badgeText:"Patient Will Select",text:"Patient will select a pharmacy after you send the prescription(s)."},recentPharmacy:{badgeColor:"yellow",badgeText:"Recent Pharmacy",text:"This patient selected this pharmacy in the last 8 hours. After you send this order, the patient can change the pharmacy."},preferredPharmacy:{badgeColor:"blue",badgeText:"Preferred Pharmacy",text:"The patient can update their preferred pharmacy selection for 15 minutes. Otherwise, we'll send it to their preferred pharmacy on file."},coverageOptionPharmacy:{badgeColor:"gray",badgeText:"Selected Pharmacy",text:"The selected option was for this pharmacy."}};function EH(e){const t=wn(),{orderFormData:r,selectedCoverageOption:n}=As(),[i,a]=B(Xs.patientWillSelect),[o,s]=B(void 0),l=M(()=>({variables:{id:e.patientId},client:t.apollo})),d=rc(Wf,l),u=rc(w6,l),c=M(()=>!u.loading&&!d.loading),h=M(()=>{const f=u()?.orders?.[0];if(f){const p=new Date,g=new Date(p.getTime()-8*60*60*1e3);if(new Date(f.createdAt)>g)return f}});return ce(()=>{if(c()){const f=d()?.patient?.preferredPharmacies,p=h()?.pharmacy;if((f?.length??0)>0){if(a(Xs.preferredPharmacy),f&&f.length>0){const g=f[0],m={...g,address:{country:"",postalCode:"",...g.address}};s(m)}}else p?(a(Xs.recentPharmacy),s(p)):a(Xs.patientWillSelect)}else s(void 0)}),ce(()=>{const f=n();f&&f.pharmacy.id===r.pharmacyId&&(a(Xs.coverageOptionPharmacy),t.clinical.pharmacy.getPharmacy({id:r.pharmacyId}).then(p=>{s(p.data.pharmacy)}))}),b(K,{get when(){return c()},get fallback(){return b(ni,{size:"sm"})},get children(){var f=CH(),p=f.firstChild;return S(p,b(Do,{get color(){return i().badgeColor},get children(){return i().badgeText}})),S(f,b(be,{size:"sm",class:"py-4",get children(){return i().text}}),null),S(f,b(K,{get when(){return o()},children:g=>b(hn,{variant:"gray",get children(){var m=SH(),v=m.firstChild;return S(m,b(be,{size:"sm",bold:!0,get children(){return g().name}}),v),S(v,b(be,{size:"sm",get children(){return b6(g().address)}})),m}})}),null),f}})}var TH=x("<div class=mb-2><label>Search home delivery options");function AH(e){const t=wn(),[r,n]=B(!1),[i,a]=B(""),[o,s]=B(),l=M(()=>{const u=o();return u&&u.length===0}),d=M(()=>{const u=i(),c=u?new RegExp(u,"i"):null,h=p=>!c||c.test(p.name),f=p=>({...p,isPreferred:!1,isPrevious:!1});return o()?.filter(h).map(f)});return ce(()=>{async function u(){n(!0);try{const{data:c}=await t.apolloClinical.query({query:uB,variables:{offset:0,limit:40,fulfillmentType:"MAIL_ORDER",integrated:!1}});s(c.pharmacies)}catch(c){console.error("Failed to load mail order pharmacy options",c)}finally{n(!1)}}u()}),ce(()=>{e.selected||a("")}),M(()=>M(()=>!!l())()?null:b($6,{get label(){return TH()},get options(){return d()},onSearch:a,get value(){return e.selected},get setValue(){return e.selectPharmacy},get loading(){return r()}}))}var d1=x("<div>"),OH=x("<div class=space-y-4>"),IH=x("<div><div class=pt-4>"),PH=x("<div>Please select a patient."),NH=x("<div class=space-y-2><label>Choose a partner pharmacy");const Xm=[{name:"Send to Patient",fulfillmentType:"SEND_TO_PATIENT"},{name:"Local Pickup",fulfillmentType:Zm.FulfillmentType.PickUp},{name:"Mail Order",fulfillmentType:Zm.FulfillmentType.MailOrder}],Jm=e=>e==="SEND_TO_PATIENT"?void 0:e;function DH(e){const{orderFormData:t,selectedCoverageOption:r,unroutablePharmacyIds:n}=As(),i=M(()=>!!e.address?.trim()),[a,o]=B(),[s,l]=B(),[d,u]=B(),[c,h]=B([]),[f,p]=B("Send to Patient"),g=M(()=>e.mailOrderPharmacyIds?.filter(w=>!n().has(w))),m=M(()=>g()?.[0]);let v;ce(()=>{const w=s();w&&n().has(w)&&v[1].setSelected(m()||"")}),Tt(()=>{h([...e.enableSendToPatient?["Send to Patient"]:[],...e.enableLocalPickup?["Local Pickup"]:[],...e.enableDeliveryPharmacies?["Mail Order"]:[]]);const w=Xm.find(k=>k.name===c()[0])?.fulfillmentType;e.setFufillmentType(Jm(w)),p(c()[0])}),ce(()=>{const w=r(),k=Re(()=>t.pharmacyId);w&&k===w.pharmacy.id&&p(c()[0])});const $=w=>{p(w),c().includes(w)||h([...c(),w]);const k=Xm.find(C=>C.name===w)?.fulfillmentType;e.setFufillmentType(Jm(k)),w==="Local Pickup"&&a()?e.setPharmacyId(a()):w==="Mail Order"&&s()?e.setPharmacyId(s()):e.setPharmacyId(r()?.pharmacy.id)};return(()=>{var w=IH(),k=w.firstChild;return S(w,b($H,{get tabs(){return c()},get activeTab(){return f()},setActiveTab:$}),k),S(k,b(K,{get when(){return c().includes("Send to Patient")},get children(){var C=d1();return S(C,b(K,{get when(){return(e?.patientIds?.length||0)>0},get fallback(){return PH()},get children(){return b(EH,{get patientId(){return e.patientIds[0]}})}})),Y(()=>rt(C,f()!=="Send to Patient"?"hidden":"")),C}}),null),S(k,b(K,{get when(){return c().includes("Local Pickup")},get children(){var C=d1();return S(C,b(K,{get when(){return i()},get fallback(){return b(Hl,{type:"warning",header:"Address required",message:"Please add a patient address to select a pharmacy."})},get children(){return b(x6,{get address(){return e?.address||""},get patientId(){return e?.patientIds?.[0]},setPharmacy:E=>{o(E.id),f()==="Local Pickup"&&e.setPharmacyId(E.id)},setPreferred:E=>e?.setPreferredPharmacy?.(E)})}})),Y(()=>rt(C,f()!=="Local Pickup"?"hidden":"")),C}}),null),S(k,b(K,{get when(){return c().includes("Mail Order")},get children(){var C=d1();return S(C,b(K,{get when(){return i()},get fallback(){return b(Hl,{type:"warning",header:"Address required",message:"Please add a patient address to select a pharmacy."})},get children(){var E=OH();return S(E,b(AH,{get selected(){return d()},selectPharmacy:A=>{u(A),l(A.id),f()==="Mail Order"&&e.setPharmacyId(A.id)}}),null),S(E,(()=>{var A=M(()=>(e.mailOrderPharmacyIds?.length??0)>0);return()=>A()&&(()=>{var L=NH();return L.firstChild,S(L,b(Gl,{label:"Pharmacies",get value(){return s()},setSelected:F=>{u(void 0),l(F),f()==="Mail Order"&&e.setPharmacyId(F)},contextRef:F=>v=F,get children(){return b(Ct,{get each(){return e?.mailOrderPharmacyIds||[]},children:F=>b(Gl.Option,{value:F,get disabled(){return n().has(F)},get alert(){return M(()=>!!n().has(F))()&&b(Xz,{})},get children(){return b(_H,{pharmacyId:F})}})})}}),null),L})()})(),null),E}})),Y(()=>rt(C,f()!=="Mail Order"?"hidden":"")),C}}),null),w})()}const MH=e=>b(DR,{get containerStyle(){return{"margin-top":`${e?.buffer||0}px`}}});function LH(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let r="";for(let n=0;n<e;n++)r+=t.charAt(Math.floor(Math.random()*t.length));return r}function FH(e=5,t=10){const r=Math.floor(Math.random()*(t-e+1))+e;return LH(r)}function RH(e){let t="N/A",r="",n="N/A",i="N/A",a="N/A";return e&&(t=e.dispenseQuantity.toString(),e.dispenseQuantity>0&&(r=` ${e.dispenseUnit}`),e.daysSupply&&(n=e.daysSupply.toString()),e.fillsAllowed?i=(e.fillsAllowed-1).toString():i="0",e.instructions&&(a=e.instructions)),`QTY: ${t}${r} | Days Supply: ${n} | Refills: ${i} | Sig: ${a}`}var zH=x('<div class="flex justify-center w-full">'),jH=x('<div class="text-red-700 font-bold flex space-x-2 items-center justify-center"><span>An error occurred. Please refresh and try again'),VH=x("<div class=w-full>"),UH=x('<div class="flex flex-col space-y-5"><div class="bg-[#FFFAEB] flex text-[#DC6803] py-2 font-semibold items-center text-sm">Required before writing prescriptions</div><div class=space-y-3><p class=text-base>By selecting <span class=font-bold>Agree</span>, you approve any prescriptions you create and send via Photon Health, Inc and that you are a practitioner authorized to prescribe and licensed in the relevant state. This signature image will not be used for any other purposes.</p></div><div class="flex justify-end space-x-4">');const C6=Fe`
|
|
1452
1452
|
query GetCurrentUserSignatureAttestationStatus {
|
|
1453
1453
|
me {
|
|
1454
1454
|
signatureAttestationStatus {
|
|
@@ -1491,7 +1491,7 @@ Replace your options with a function.`),t;const a=typeof t=="function"?t():t;ret
|
|
|
1491
1491
|
}
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
|
-
`,XH={CatalogTreatmentsFieldsComponentFragment:ZH};class JH{sdk;setStore;store;authentication;getSDK;clinical;autoLogin;constructor(t,r=!1){this.sdk=t,this.autoLogin=r;const[n,i]=sa({authentication:{isAuthenticated:!1,isInOrg:!1,permissions:[],isLoading:!0,error:void 0,user:void 0},catalog:{isLoading:!1,treatments:[],templates:[]},catalogs:{isLoading:!1,catalogs:[]},dispenseUnits:{isLoading:!1,dispenseUnits:new Array},patients:{isLoading:!1,patients:[],finished:!1},patient:{isLoading:!1,patient:void 0},prescription:{isLoading:!1,errors:[],error:void 0,data:void 0}});this.setStore=i,this.store=n,this.authentication={state:n.authentication,handleRedirect:async a=>{try{const o=await this.sdk.authentication.handleRedirect(a);YH(o?.appState),await this.authentication.checkSession()}catch(o){const s=new URLSearchParams(window.location.search).get("error_description");o.message.includes("must be an organization id")?this.setStore("authentication",{...this.store.authentication,error:"The provided organization id is invalid or does not exist"}):s?.includes("is not part of the org")?this.setStore("authentication",{...this.store.authentication,error:"User is not authorized",isLoading:!1}):this.setStore("authentication",{...this.store.authentication,error:o.message})}},checkSession:this.checkSession.bind(this),login:this.login.bind(this),logout:this.logout.bind(this)},this.getSDK=this._getSDK.bind(this),this.clinical={catalog:{state:n.catalog,getCatalog:this.getCatalog.bind(this)},catalogs:{state:n.catalogs,getCatalogs:this.getCatalogs.bind(this)},dispenseUnits:{state:n.dispenseUnits,getDispenseUnits:this.getDispenseUnits.bind(this)},patients:{state:n.patients,getPatients:this.getPatients.bind(this)},patient:{state:n.patient,getPatient:this.getPatient.bind(this)},prescription:{state:n.prescription,createPrescription:this.createPrescription.bind(this)}}}_getSDK(){return this.sdk}async checkSession(){try{await this.sdk.authentication.checkSession();const t=await this.sdk.authentication.isAuthenticated();this.setStore("authentication",{...this.store.authentication,isAuthenticated:t});const r=await this.sdk.authentication.getUser(),n=!!this.sdk?.organization&&!!r?.org_id;let i=[];if(this.autoLogin||t)try{const o=await this.sdk.authentication.getAccessToken();i=KH(o)?.permissions||[]}catch{i=[]}const a=t&&n&&this.sdk.organization===r.org_id;this.setStore("authentication",{...this.store.authentication,user:r,isLoading:!1,isInOrg:a,permissions:i||[]})}catch{this.setStore("authentication",{...this.store.authentication,isLoading:!1})}}async login(t={}){await this.sdk.authentication.login(t),await this.checkSession()}async logout(t={}){await this.sdk.authentication.logout(t),this.setStore("authentication",{...this.store.authentication,isAuthenticated:!1,isInOrg:!1,permissions:[],user:void 0})}async getPatients(t){t||(t={}),this.setStore("patients",{...this.store.patients,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatients(t);this.setStore("patients",{...this.store.patients,isLoading:!1,patients:t.clear?r.patients:this.store.patients.patients.concat(r.patients),finished:r.patients.length==0})}async getPatient(t){this.setStore("patient",{...this.store.patient,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatient(t);return this.setStore("patient",{...this.store.patient,isLoading:!1,patient:r.patient}),r.patient}async getCatalog(t){this.setStore("catalog",{...this.store.catalog,isLoading:!0});const{data:r}=await this.sdk.clinical.catalog.getCatalog({id:t.id,fragment:XH});this.setStore("catalog",{...this.store.catalog,isLoading:!1,treatments:r.catalog.treatments.map(n=>n)||[],templates:r.catalog.templates.map(n=>n)||[]})}async getCatalogs(){this.setStore("catalogs",{...this.store.catalogs,isLoading:!0});const{data:t}=await this.sdk.clinical.catalog.getCatalogs();this.setStore("catalogs",{...this.store.catalogs,isLoading:!1,catalogs:t.catalogs})}async getDispenseUnits(){this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!0});const{data:t}=await this.sdk.clinical.prescription.getDispenseUnits();this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!1,dispenseUnits:t.dispenseUnits.map((r,n)=>({id:String(n),...r}))})}async createPrescription(t){this.setStore("prescription",{...this.store.prescription,isLoading:!0});const r=this.sdk.clinical.prescription.createPrescription({});try{const{data:n,errors:i}=await r({variables:t,refetchQueries:[],awaitRefetchQueries:!1});return i&&i.length>0&&this.setStore("prescription",{...this.store.prescription,errors:[...i]}),n?.createPrescription&&this.setStore("prescription",{...this.store.prescription,data:n.createPrescription}),this.setStore("prescription",{...this.store.prescription,isLoading:!1}),{data:n,errors:i}}catch(n){return this.setStore("prescription",{...this.store.prescription,error:n,isLoading:!1}),{data:null,errors:[]}}}}const eW=(e,t,r)=>{const n=r(e,t);return xr(()=>clearInterval(n))},E6="%[a-f0-9]{2}",tg=new RegExp("("+E6+")|([^%]+?)","gi"),rg=new RegExp("("+E6+")+","gi");function _h(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;const r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],_h(r),_h(n))}function tW(e){try{return decodeURIComponent(e)}catch{let t=e.match(tg)||[];for(let r=1;r<t.length;r++)e=_h(t,r).join(""),t=e.match(tg)||[];return e}}function rW(e){const t={"%FE%FF":"��","%FF%FE":"��"};let r=rg.exec(e);for(;r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{const i=tW(r[0]);i!==r[0]&&(t[r[0]]=i)}r=rg.exec(e)}t["%C2"]="�";const n=Object.keys(t);for(const i of n)e=e.replace(new RegExp(i,"g"),t[i]);return e}function nW(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return rW(e)}}function iW(e,t){const r={};if(Array.isArray(t))for(const n of t){const i=Object.getOwnPropertyDescriptor(e,n);i?.enumerable&&Object.defineProperty(r,n,i)}else for(const n of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,n);if(i.enumerable){const a=e[n];t(n,a,e)&&Object.defineProperty(r,n,i)}}return r}function T6(e,t){if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||t==="")return[];const r=e.indexOf(t);return r===-1?[]:[e.slice(0,r),e.slice(r+t.length)]}const aW=e=>e==null,oW=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Ch=Symbol("encodeFragmentIdentifier");function sW(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const i=r.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[er(t,e),"[",i,"]"].join("")]:[...r,[er(t,e),"[",er(i,e),"]=",er(n,e)].join("")]};case"bracket":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[er(t,e),"[]"].join("")]:[...r,[er(t,e),"[]=",er(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[er(t,e),":list="].join("")]:[...r,[er(t,e),":list=",er(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[er(r,e),t,er(i,e)].join("")]:[[n,er(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,er(t,e)]:[...r,[er(t,e),"=",er(n,e)].join("")]}}function lW(e){let t;switch(e.arrayFormat){case"index":return(r,n,i)=>{if(t=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!t){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][t[1]]=n};case"bracket":return(r,n,i)=>{if(t=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!t){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[...i[r],n]};case"colon-list-separator":return(r,n,i)=>{if(t=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!t){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[...i[r],n]};case"comma":case"separator":return(r,n,i)=>{const a=typeof n=="string"&&n.includes(e.arrayFormatSeparator),o=typeof n=="string"&&!a&&fi(n,e).includes(e.arrayFormatSeparator);n=o?fi(n,e):n;const s=a||o?n.split(e.arrayFormatSeparator).map(l=>fi(l,e)):n===null?n:fi(n,e);i[r]=s};case"bracket-separator":return(r,n,i)=>{const a=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!a){i[r]=n&&fi(n,e);return}const o=n===null?[]:fi(n,e).split(e.arrayFormatSeparator);if(i[r]===void 0){i[r]=o;return}i[r]=[...i[r],...o]};default:return(r,n,i)=>{if(i[r]===void 0){i[r]=n;return}i[r]=[...[i[r]].flat(),n]}}}function A6(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function er(e,t){return t.encode?t.strict?oW(e):encodeURIComponent(e):e}function fi(e,t){return t.decode?nW(e):e}function O6(e){return Array.isArray(e)?e.sort():typeof e=="object"?O6(Object.keys(e)).sort((t,r)=>Number(t)-Number(r)).map(t=>e[t]):e}function I6(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function dW(e){let t="";const r=e.indexOf("#");return r!==-1&&(t=e.slice(r)),t}function ng(e,t,r){return r==="string"&&typeof e=="string"?e:typeof r=="function"&&typeof e=="string"?r(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":r==="number"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""||t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):e}function Xf(e){e=I6(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function Jf(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...t},A6(t.arrayFormatSeparator);const r=lW(t),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(const i of e.split("&")){if(i==="")continue;const a=t.decode?i.replaceAll("+"," "):i;let[o,s]=T6(a,"=");o===void 0&&(o=a),s=s===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:fi(s,t),r(fi(o,t),s,n)}for(const[i,a]of Object.entries(n))if(typeof a=="object"&&a!==null&&t.types[i]!=="string")for(const[o,s]of Object.entries(a)){const l=t.types[i]?t.types[i].replace("[]",""):void 0;a[o]=ng(s,t,l)}else typeof a=="object"&&a!==null&&t.types[i]==="string"?n[i]=Object.values(a).join(t.arrayFormatSeparator):n[i]=ng(a,t,t.types[i]);return t.sort===!1?n:(t.sort===!0?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((i,a)=>{const o=n[a];return i[a]=o&&typeof o=="object"&&!Array.isArray(o)?O6(o):o,i},Object.create(null))}function P6(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},A6(t.arrayFormatSeparator);const r=o=>t.skipNull&&aW(e[o])||t.skipEmptyString&&e[o]==="",n=sW(t),i={};for(const[o,s]of Object.entries(e))r(o)||(i[o]=s);const a=Object.keys(i);return t.sort!==!1&&a.sort(t.sort),a.map(o=>{const s=e[o];return s===void 0?"":s===null?er(o,t):Array.isArray(s)?s.length===0&&t.arrayFormat==="bracket-separator"?er(o,t)+"[]":s.reduce(n(o),[]).join("&"):er(o,t)+"="+er(s,t)}).filter(o=>o.length>0).join("&")}function N6(e,t){t={decode:!0,...t};let[r,n]=T6(e,"#");return r===void 0&&(r=e),{url:r?.split("?")?.[0]??"",query:Jf(Xf(e),t),...t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:fi(n,t)}:{}}}function D6(e,t){t={encode:!0,strict:!0,[Ch]:!0,...t};const r=I6(e.url).split("?")[0]||"",n=Xf(e.url),i={...Jf(n,{sort:!1}),...e.query};let a=P6(i,t);a&&=`?${a}`;let o=dW(e.url);if(typeof e.fragmentIdentifier=="string"){const s=new URL(r);s.hash=e.fragmentIdentifier,o=t[Ch]?s.hash:`#${e.fragmentIdentifier}`}return`${r}${a}${o}`}function M6(e,t,r){r={parseFragmentIdentifier:!0,[Ch]:!1,...r};const{url:n,query:i,fragmentIdentifier:a}=N6(e,r);return D6({url:n,query:iW(i,t),fragmentIdentifier:a},r)}function uW(e,t,r){const n=Array.isArray(t)?i=>!t.includes(i):(i,a)=>!t(i,a);return M6(e,n,r)}const L6=Object.freeze(Object.defineProperty({__proto__:null,exclude:uW,extract:Xf,parse:Jf,parseUrl:N6,pick:M6,stringify:P6,stringifyUrl:D6},Symbol.toStringTag,{value:"Module"})),cW=(e=window.location.search)=>{if(!e)return!1;const t=L6.parse(e);return"state"in t&&"photon"in t&&("code"in t||"error"in t)},hW=e=>/^\d+$/.test(e)&&e.length>=5;function Sh(e,t){return e.every(r=>t.includes(r))}const fW="0.19.5",pW={version:fW};var mW=Q("<slot>"),gW=Q("<div>");const vW=pW?.version,yW=e=>{let t;const r=e.redirectUri?e.redirectUri:window.location.origin,n=L6.stringifyUrl({url:r,query:{photon:!0}}),i=new Ak({env:e.env,domain:e.domain,audience:e.audience,connection:e.connection,uri:e.uri,clientId:e.id,redirectURI:n,organization:e.org,developmentMode:e.developmentMode},vW),a=new JH(i,e.autoLogin);e.developmentMode&&console.info("[PhotonClient]: Development mode enabled");const[o]=B(a),s=async()=>{await o()?.authentication.handleRedirect(),e.redirectPath&&window.location.replace(e.redirectPath)},l=async()=>{await o()?.authentication.checkSession(),eW(async()=>{await o()?.authentication.checkSession()},6e4,setInterval)};return ce(()=>{cW()&&o()?s():o()&&l()}),ce(()=>{if(!o()?.authentication.state.isLoading){if(!o()?.authentication.state.isAuthenticated&&e.autoLogin){const d={appState:{}};e.redirectPath&&(d.appState.returnTo=e.redirectPath),o()?.authentication.login(d)}else if(e.externalUserId!=null&&o().authentication.state.user?.sub?.split("|").reverse()[0]!==e.externalUserId){o()?.authentication.logout();const d={appState:{}};e.redirectPath&&(d.appState.returnTo=e.redirectPath),o()?.authentication.login(d)}}}),(()=>{var d=gW(),u=t;return typeof u=="function"?Be(u,d):t=d,I(d,b(S6.Provider,{get value(){return o()},get children(){return b(gB,{get children(){return b(vR,{client:i,get children(){var c=mW();return c._$owner=ue(),c}})}})}})),d})()};At("photon-client",{domain:{attribute:"domain",value:void 0,reflect:!1,notify:!1,parse:!1},id:{attribute:"id",value:void 0,reflect:!1,notify:!1,parse:!1},redirectUri:{attribute:"redirect-uri",value:void 0,reflect:!1,notify:!1,parse:!1},redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1},org:{attribute:"org",value:void 0,reflect:!1,notify:!1,parse:!1},audience:{attribute:"audience",value:void 0,reflect:!1,notify:!1,parse:!1},connection:{attribute:"connection",value:void 0,reflect:!1,notify:!1,parse:!1},uri:{attribute:"uri",value:void 0,reflect:!1,notify:!1,parse:!1},developmentMode:{attribute:"dev-mode",value:!1,reflect:!0,notify:!1,parse:!0},errorMessage:{attribute:"error-message",value:"Oh snap! There was an error loading. Please contact your site's administrator",reflect:!1,notify:!1,parse:!1},autoLogin:{attribute:"auto-login",value:!1,reflect:!1,notify:!1,parse:!0},env:{attribute:"env",value:void 0,reflect:!1,notify:!1,parse:!1},externalUserId:{attribute:"user-id",value:void 0,reflect:!0,notify:!0,parse:!1}},yW);const jt='*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(21 112 239 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(21 112 239 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 475px){.container{max-width:475px}}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.left-0{left:0}.top-0{top:0}.z-2000{z-index:2000}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.order-last{order:9999}.m-0{margin:0}.m-3{margin:.75rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.\\!mt-8{margin-top:2rem!important}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.mr-1{margin-right:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-\\[21px\\]{height:21px}.h-\\[28px\\]{height:28px}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-2\\/5{width:40%}.w-\\[44px\\]{width:44px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\\[40\\%\\]{min-width:40%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * (1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-none{border-style:none}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229,231,235,var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248,113,113,var(--tw-border-opacity))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249,250,251,var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(21,112,239,var(--tw-bg-opacity))}.bg-photon-blue{--tw-bg-opacity: 1;background-color:rgb(49,130,206,var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254,226,226,var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255,255,255,var(--tw-bg-opacity))}.p-0{padding:0}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-40{padding-bottom:10rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-5{padding-left:1.25rem}.pl-\\[19\\.75px\\]{padding-left:19.75px}.pr-2{padding-right:.5rem}.pr-5{padding-right:1.25rem}.pt-1{padding-top:.25rem}.pt-14{padding-top:3.5rem}.pt-3{padding-top:.75rem}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-snug{line-height:1.375}.text-black{--tw-text-opacity: 1;color:rgb(0,0,0,var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(23,92,211,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156,163,175,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107,114,128,var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75,85,99,var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55,65,81,var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248,113,113,var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239,68,68,var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185,28,28,var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100,116,139,var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13,148,136,var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255,255,255,var(--tw-text-opacity))}.opacity-50{opacity:.5}.shadow-card{--tw-shadow: 0px 0px 1px rgba(48, 49, 51, .05),0px 2px 4px rgba(48, 49, 51, .1);--tw-shadow-colored: 0px 0px 1px var(--tw-shadow-color), 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(24,73,169,var(--tw-bg-opacity))}.hover\\:bg-photon-blue-dark:hover{--tw-bg-opacity: 1;background-color:rgb(43,108,176,var(--tw-bg-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75,85,99,var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.disabled\\:bg-gray-500:disabled{--tw-bg-opacity: 1;background-color:rgb(107,114,128,var(--tw-bg-opacity))}@media (min-width: 475px){.xs\\:mx-auto{margin-left:auto;margin-right:auto}.xs\\:\\!w-auto{width:auto!important}.xs\\:w-fit{width:-moz-fit-content;width:fit-content}.xs\\:flex-row{flex-direction:row}.xs\\:flex-row-reverse{flex-direction:row-reverse}.xs\\:justify-start{justify-content:flex-start}.xs\\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 640px){.sm\\:order-first{order:-9999}.sm\\:mt-0{margin-top:0}.sm\\:inline{display:inline}.sm\\:grid{display:grid}.sm\\:w-\\[600px\\]{width:600px}.sm\\:w-auto{width:auto}.sm\\:flex-none{flex:none}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:gap-4{gap:1rem}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:py-2{padding-top:.5rem;padding-bottom:.5rem}}@media (min-width: 768px){.md\\:\\!mt-8{margin-top:2rem!important}.md\\:\\!block{display:block!important}.md\\:flex{display:flex}.md\\:\\!hidden{display:none!important}.md\\:px-4{padding-left:1rem;padding-right:1rem}.md\\:px-8{padding-left:2rem;padding-right:2rem}.md\\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\\:py-3{padding-top:.75rem;padding-bottom:.75rem}.md\\:pb-52{padding-bottom:13rem}.md\\:pt-4{padding-top:1rem}.md\\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\\:text-xl{font-size:1.25rem;line-height:1.75rem}}';var bW=Q("<style>"),$W=Q('<button class="w-full disabled:bg-gray-500 bg-photon-blue hover:bg-blue-700 text-white h-10 px-4 rounded-lg font-sans hover:bg-photon-blue-dark transition ease-in-out delay-50">');const wW=e=>{const t=Jr();return ce(()=>{t||console.error("[photon-auth-button] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{var r=bW();return I(r,jt),r})(),t?(()=>{var r=$W();return r.$$click=async()=>{const n={appState:{}};e.redirectPath&&(n.appState.returnTo=e.redirectPath),t.authentication.state.isAuthenticated?await t.authentication.logout():await t.authentication.login(n)},I(r,()=>t.authentication.state.isAuthenticated?"Log out":"Log in"),Y(()=>r.disabled=t.authentication.state.isLoading),r})():null]};At("photon-auth-button",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},wW);oa(["click"]);var xW=Q("<style>"),kW=Q(`<div class="flex flex-col w-screen max-w-sm"><svg viewBox="0 0 305 62.61"xmlns=http://www.w3.org/2000/svg class="h-[28px] pl-[19.75px]"><g fill=#273D52><path d="M0 54.1169H6.81375V35.7722H18.0826C29.5481 35.7722 34.3963 30.3343 34.3963 18.7378V17.4275C34.3963 5.76548 29.417 0.655167 18.0826 0.655167H0V54.1169ZM6.81375 30.1377V6.28961H18.2792C24.7653 6.28961 27.386 8.9758 27.386 16.0516V20.0481C27.386 27.1895 24.7653 30.1377 18.2792 30.1377H6.81375Z"></path><path d="M70.9593 54.1169H77.773V0.655167H70.9593V24.4378H50.8456V0.655167H44.0319V54.1169H50.8456V30.3343H70.9593V54.1169Z"></path><path d="M107.146 54.772C119.528 54.772 125.687 46.5169 125.687 34.9205V19.7861C125.687 8.25511 119.528 0 107.146 0C94.6974 0 88.5388 8.25511 88.5388 19.7861V34.9205C88.5388 46.5169 94.6974 54.772 107.146 54.772ZM95.5491 35.9687V18.8033C95.5491 10.7448 99.4801 5.89651 107.146 5.89651C114.745 5.89651 118.677 10.7448 118.677 18.8033V35.9687C118.677 44.0928 114.745 48.8755 107.146 48.8755C99.4801 48.8755 95.5491 44.0928 95.5491 35.9687Z"></path><path d="M144.295 54.1169H151.109V6.48616H164.54V0.655167H130.864V6.48616H144.295V54.1169Z"></path><path d="M188.299 54.772C200.682 54.772 206.841 46.5169 206.841 34.9205V19.7861C206.841 8.25511 200.682 0 188.299 0C175.851 0 169.693 8.25511 169.693 19.7861V34.9205C169.693 46.5169 175.851 54.772 188.299 54.772ZM176.703 35.9687V18.8033C176.703 10.7448 180.634 5.89651 188.299 5.89651C195.899 5.89651 199.83 10.7448 199.83 18.8033V35.9687C199.83 44.0928 195.899 48.8755 188.299 48.8755C180.634 48.8755 176.703 44.0928 176.703 35.9687Z"></path><path d="M217.6 54.1169H224.021V14.3482L245.576 54.1169H252.608L248.058 45.1084L245.641 40.4239L224.086 0.655167H217.6V54.1169Z"></path></g><g fill=#B35724><circle cx=249.798 cy=5.202 r=5.202></circle></g></svg><h1 class="font-medium text-3xl text-center font-sans mt-6 mb-3">Log in to your account</h1><p class="text-gray-500 font-sans text-center mb-8">Don't have an account? <a href=mailto:support@photon.health class="text-teal-600 hover:underline hover:cursor-pointer font-sans font-light">Contact Support</a></p><photon-auth-button>`,!0,!1,!1);const _W=e=>{const t=Jr();return ce(()=>{t||console.error("[photon-login] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{var r=xW();return I(r,jt),r})(),(()=>{var r=kW(),n=r.firstChild,i=n.nextSibling,a=i.nextSibling,o=a.nextSibling;return o._$owner=ue(),Y(()=>o.redirectPath=e.redirectPath),r})()]};At("photon-login",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},_W);const gd=(e,t)=>{let r;const n=()=>clearTimeout(r);return ue()&&xr(n),Object.assign((...a)=>{r!==void 0&&n(),r=setTimeout(()=>e(...a),t)},{clear:n})};/**
|
|
1494
|
+
`,XH={CatalogTreatmentsFieldsComponentFragment:ZH};class JH{sdk;setStore;store;authentication;getSDK;clinical;autoLogin;constructor(t,r=!1){this.sdk=t,this.autoLogin=r;const[n,i]=sa({authentication:{isAuthenticated:!1,isInOrg:!1,permissions:[],isLoading:!0,error:void 0,user:void 0},catalog:{isLoading:!1,treatments:[],templates:[]},catalogs:{isLoading:!1,catalogs:[]},dispenseUnits:{isLoading:!1,dispenseUnits:new Array},patients:{isLoading:!1,patients:[],finished:!1},patient:{isLoading:!1,patient:void 0},prescription:{isLoading:!1,errors:[],error:void 0,data:void 0}});this.setStore=i,this.store=n,this.authentication={state:n.authentication,handleRedirect:async a=>{try{const o=await this.sdk.authentication.handleRedirect(a);YH(o?.appState),await this.authentication.checkSession()}catch(o){const s=new URLSearchParams(window.location.search).get("error_description");o.message.includes("must be an organization id")?this.setStore("authentication",{...this.store.authentication,error:"The provided organization id is invalid or does not exist"}):s?.includes("is not part of the org")?this.setStore("authentication",{...this.store.authentication,error:"User is not authorized",isLoading:!1}):this.setStore("authentication",{...this.store.authentication,error:o.message})}},checkSession:this.checkSession.bind(this),login:this.login.bind(this),logout:this.logout.bind(this)},this.getSDK=this._getSDK.bind(this),this.clinical={catalog:{state:n.catalog,getCatalog:this.getCatalog.bind(this)},catalogs:{state:n.catalogs,getCatalogs:this.getCatalogs.bind(this)},dispenseUnits:{state:n.dispenseUnits,getDispenseUnits:this.getDispenseUnits.bind(this)},patients:{state:n.patients,getPatients:this.getPatients.bind(this)},patient:{state:n.patient,getPatient:this.getPatient.bind(this)},prescription:{state:n.prescription,createPrescription:this.createPrescription.bind(this)}}}_getSDK(){return this.sdk}async checkSession(){try{await this.sdk.authentication.checkSession();const t=await this.sdk.authentication.isAuthenticated();this.setStore("authentication",{...this.store.authentication,isAuthenticated:t});const r=await this.sdk.authentication.getUser(),n=!!this.sdk?.organization&&!!r?.org_id;let i=[];if(this.autoLogin||t)try{const o=await this.sdk.authentication.getAccessToken();i=KH(o)?.permissions||[]}catch{i=[]}const a=t&&n&&this.sdk.organization===r.org_id;this.setStore("authentication",{...this.store.authentication,user:r,isLoading:!1,isInOrg:a,permissions:i||[]})}catch{this.setStore("authentication",{...this.store.authentication,isLoading:!1})}}async login(t={}){await this.sdk.authentication.login(t),await this.checkSession()}async logout(t={}){await this.sdk.authentication.logout(t),this.setStore("authentication",{...this.store.authentication,isAuthenticated:!1,isInOrg:!1,permissions:[],user:void 0})}async getPatients(t){t||(t={}),this.setStore("patients",{...this.store.patients,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatients(t);this.setStore("patients",{...this.store.patients,isLoading:!1,patients:t.clear?r.patients:this.store.patients.patients.concat(r.patients),finished:r.patients.length==0})}async getPatient(t){this.setStore("patient",{...this.store.patient,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatient(t);return this.setStore("patient",{...this.store.patient,isLoading:!1,patient:r.patient}),r.patient}async getCatalog(t){this.setStore("catalog",{...this.store.catalog,isLoading:!0});const{data:r}=await this.sdk.clinical.catalog.getCatalog({id:t.id,fragment:XH});this.setStore("catalog",{...this.store.catalog,isLoading:!1,treatments:r.catalog.treatments.map(n=>n)||[],templates:r.catalog.templates.map(n=>n)||[]})}async getCatalogs(){this.setStore("catalogs",{...this.store.catalogs,isLoading:!0});const{data:t}=await this.sdk.clinical.catalog.getCatalogs();this.setStore("catalogs",{...this.store.catalogs,isLoading:!1,catalogs:t.catalogs})}async getDispenseUnits(){this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!0});const{data:t}=await this.sdk.clinical.prescription.getDispenseUnits();this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!1,dispenseUnits:t.dispenseUnits.map((r,n)=>({id:String(n),...r}))})}async createPrescription(t){this.setStore("prescription",{...this.store.prescription,isLoading:!0});const r=this.sdk.clinical.prescription.createPrescription({});try{const{data:n,errors:i}=await r({variables:t,refetchQueries:[],awaitRefetchQueries:!1});return i&&i.length>0&&this.setStore("prescription",{...this.store.prescription,errors:[...i]}),n?.createPrescription&&this.setStore("prescription",{...this.store.prescription,data:n.createPrescription}),this.setStore("prescription",{...this.store.prescription,isLoading:!1}),{data:n,errors:i}}catch(n){return this.setStore("prescription",{...this.store.prescription,error:n,isLoading:!1}),{data:null,errors:[]}}}}const eW=(e,t,r)=>{const n=r(e,t);return xr(()=>clearInterval(n))},E6="%[a-f0-9]{2}",tg=new RegExp("("+E6+")|([^%]+?)","gi"),rg=new RegExp("("+E6+")+","gi");function _h(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;const r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],_h(r),_h(n))}function tW(e){try{return decodeURIComponent(e)}catch{let t=e.match(tg)||[];for(let r=1;r<t.length;r++)e=_h(t,r).join(""),t=e.match(tg)||[];return e}}function rW(e){const t={"%FE%FF":"��","%FF%FE":"��"};let r=rg.exec(e);for(;r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{const i=tW(r[0]);i!==r[0]&&(t[r[0]]=i)}r=rg.exec(e)}t["%C2"]="�";const n=Object.keys(t);for(const i of n)e=e.replace(new RegExp(i,"g"),t[i]);return e}function nW(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return rW(e)}}function iW(e,t){const r={};if(Array.isArray(t))for(const n of t){const i=Object.getOwnPropertyDescriptor(e,n);i?.enumerable&&Object.defineProperty(r,n,i)}else for(const n of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,n);if(i.enumerable){const a=e[n];t(n,a,e)&&Object.defineProperty(r,n,i)}}return r}function T6(e,t){if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||t==="")return[];const r=e.indexOf(t);return r===-1?[]:[e.slice(0,r),e.slice(r+t.length)]}const aW=e=>e==null,oW=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Ch=Symbol("encodeFragmentIdentifier");function sW(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const i=r.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[er(t,e),"[",i,"]"].join("")]:[...r,[er(t,e),"[",er(i,e),"]=",er(n,e)].join("")]};case"bracket":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[er(t,e),"[]"].join("")]:[...r,[er(t,e),"[]=",er(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[er(t,e),":list="].join("")]:[...r,[er(t,e),":list=",er(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[er(r,e),t,er(i,e)].join("")]:[[n,er(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,er(t,e)]:[...r,[er(t,e),"=",er(n,e)].join("")]}}function lW(e){let t;switch(e.arrayFormat){case"index":return(r,n,i)=>{if(t=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!t){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][t[1]]=n};case"bracket":return(r,n,i)=>{if(t=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!t){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[...i[r],n]};case"colon-list-separator":return(r,n,i)=>{if(t=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!t){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[...i[r],n]};case"comma":case"separator":return(r,n,i)=>{const a=typeof n=="string"&&n.includes(e.arrayFormatSeparator),o=typeof n=="string"&&!a&&fi(n,e).includes(e.arrayFormatSeparator);n=o?fi(n,e):n;const s=a||o?n.split(e.arrayFormatSeparator).map(l=>fi(l,e)):n===null?n:fi(n,e);i[r]=s};case"bracket-separator":return(r,n,i)=>{const a=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!a){i[r]=n&&fi(n,e);return}const o=n===null?[]:fi(n,e).split(e.arrayFormatSeparator);if(i[r]===void 0){i[r]=o;return}i[r]=[...i[r],...o]};default:return(r,n,i)=>{if(i[r]===void 0){i[r]=n;return}i[r]=[...[i[r]].flat(),n]}}}function A6(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function er(e,t){return t.encode?t.strict?oW(e):encodeURIComponent(e):e}function fi(e,t){return t.decode?nW(e):e}function O6(e){return Array.isArray(e)?e.sort():typeof e=="object"?O6(Object.keys(e)).sort((t,r)=>Number(t)-Number(r)).map(t=>e[t]):e}function I6(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function dW(e){let t="";const r=e.indexOf("#");return r!==-1&&(t=e.slice(r)),t}function ng(e,t,r){return r==="string"&&typeof e=="string"?e:typeof r=="function"&&typeof e=="string"?r(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":r==="number"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""||t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):e}function Xf(e){e=I6(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function Jf(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...t},A6(t.arrayFormatSeparator);const r=lW(t),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(const i of e.split("&")){if(i==="")continue;const a=t.decode?i.replaceAll("+"," "):i;let[o,s]=T6(a,"=");o===void 0&&(o=a),s=s===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:fi(s,t),r(fi(o,t),s,n)}for(const[i,a]of Object.entries(n))if(typeof a=="object"&&a!==null&&t.types[i]!=="string")for(const[o,s]of Object.entries(a)){const l=t.types[i]?t.types[i].replace("[]",""):void 0;a[o]=ng(s,t,l)}else typeof a=="object"&&a!==null&&t.types[i]==="string"?n[i]=Object.values(a).join(t.arrayFormatSeparator):n[i]=ng(a,t,t.types[i]);return t.sort===!1?n:(t.sort===!0?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((i,a)=>{const o=n[a];return i[a]=o&&typeof o=="object"&&!Array.isArray(o)?O6(o):o,i},Object.create(null))}function P6(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},A6(t.arrayFormatSeparator);const r=o=>t.skipNull&&aW(e[o])||t.skipEmptyString&&e[o]==="",n=sW(t),i={};for(const[o,s]of Object.entries(e))r(o)||(i[o]=s);const a=Object.keys(i);return t.sort!==!1&&a.sort(t.sort),a.map(o=>{const s=e[o];return s===void 0?"":s===null?er(o,t):Array.isArray(s)?s.length===0&&t.arrayFormat==="bracket-separator"?er(o,t)+"[]":s.reduce(n(o),[]).join("&"):er(o,t)+"="+er(s,t)}).filter(o=>o.length>0).join("&")}function N6(e,t){t={decode:!0,...t};let[r,n]=T6(e,"#");return r===void 0&&(r=e),{url:r?.split("?")?.[0]??"",query:Jf(Xf(e),t),...t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:fi(n,t)}:{}}}function D6(e,t){t={encode:!0,strict:!0,[Ch]:!0,...t};const r=I6(e.url).split("?")[0]||"",n=Xf(e.url),i={...Jf(n,{sort:!1}),...e.query};let a=P6(i,t);a&&=`?${a}`;let o=dW(e.url);if(typeof e.fragmentIdentifier=="string"){const s=new URL(r);s.hash=e.fragmentIdentifier,o=t[Ch]?s.hash:`#${e.fragmentIdentifier}`}return`${r}${a}${o}`}function M6(e,t,r){r={parseFragmentIdentifier:!0,[Ch]:!1,...r};const{url:n,query:i,fragmentIdentifier:a}=N6(e,r);return D6({url:n,query:iW(i,t),fragmentIdentifier:a},r)}function uW(e,t,r){const n=Array.isArray(t)?i=>!t.includes(i):(i,a)=>!t(i,a);return M6(e,n,r)}const L6=Object.freeze(Object.defineProperty({__proto__:null,exclude:uW,extract:Xf,parse:Jf,parseUrl:N6,pick:M6,stringify:P6,stringifyUrl:D6},Symbol.toStringTag,{value:"Module"})),cW=(e=window.location.search)=>{if(!e)return!1;const t=L6.parse(e);return"state"in t&&"photon"in t&&("code"in t||"error"in t)},hW=e=>/^\d+$/.test(e)&&e.length>=5;function Sh(e,t){return e.every(r=>t.includes(r))}const fW="0.19.6",pW={version:fW};var mW=Q("<slot>"),gW=Q("<div>");const vW=pW?.version,yW=e=>{let t;const r=e.redirectUri?e.redirectUri:window.location.origin,n=L6.stringifyUrl({url:r,query:{photon:!0}}),i=new Ak({env:e.env,domain:e.domain,audience:e.audience,connection:e.connection,uri:e.uri,clientId:e.id,redirectURI:n,organization:e.org,developmentMode:e.developmentMode},vW),a=new JH(i,e.autoLogin);e.developmentMode&&console.info("[PhotonClient]: Development mode enabled");const[o]=B(a),s=async()=>{await o()?.authentication.handleRedirect(),e.redirectPath&&window.location.replace(e.redirectPath)},l=async()=>{await o()?.authentication.checkSession(),eW(async()=>{await o()?.authentication.checkSession()},6e4,setInterval)};return ce(()=>{cW()&&o()?s():o()&&l()}),ce(()=>{if(!o()?.authentication.state.isLoading){if(!o()?.authentication.state.isAuthenticated&&e.autoLogin){const d={appState:{}};e.redirectPath&&(d.appState.returnTo=e.redirectPath),o()?.authentication.login(d)}else if(e.externalUserId!=null&&o().authentication.state.user?.sub?.split("|").reverse()[0]!==e.externalUserId){o()?.authentication.logout();const d={appState:{}};e.redirectPath&&(d.appState.returnTo=e.redirectPath),o()?.authentication.login(d)}}}),(()=>{var d=gW(),u=t;return typeof u=="function"?Be(u,d):t=d,I(d,b(S6.Provider,{get value(){return o()},get children(){return b(gB,{get children(){return b(vR,{client:i,get children(){var c=mW();return c._$owner=ue(),c}})}})}})),d})()};At("photon-client",{domain:{attribute:"domain",value:void 0,reflect:!1,notify:!1,parse:!1},id:{attribute:"id",value:void 0,reflect:!1,notify:!1,parse:!1},redirectUri:{attribute:"redirect-uri",value:void 0,reflect:!1,notify:!1,parse:!1},redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1},org:{attribute:"org",value:void 0,reflect:!1,notify:!1,parse:!1},audience:{attribute:"audience",value:void 0,reflect:!1,notify:!1,parse:!1},connection:{attribute:"connection",value:void 0,reflect:!1,notify:!1,parse:!1},uri:{attribute:"uri",value:void 0,reflect:!1,notify:!1,parse:!1},developmentMode:{attribute:"dev-mode",value:!1,reflect:!0,notify:!1,parse:!0},errorMessage:{attribute:"error-message",value:"Oh snap! There was an error loading. Please contact your site's administrator",reflect:!1,notify:!1,parse:!1},autoLogin:{attribute:"auto-login",value:!1,reflect:!1,notify:!1,parse:!0},env:{attribute:"env",value:void 0,reflect:!1,notify:!1,parse:!1},externalUserId:{attribute:"user-id",value:void 0,reflect:!0,notify:!0,parse:!1}},yW);const jt='*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(21 112 239 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(21 112 239 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 475px){.container{max-width:475px}}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.left-0{left:0}.top-0{top:0}.z-2000{z-index:2000}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.order-last{order:9999}.m-0{margin:0}.m-3{margin:.75rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.\\!mt-8{margin-top:2rem!important}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.mr-1{margin-right:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-\\[21px\\]{height:21px}.h-\\[28px\\]{height:28px}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-2\\/5{width:40%}.w-\\[44px\\]{width:44px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\\[40\\%\\]{min-width:40%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * (1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-none{border-style:none}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229,231,235,var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248,113,113,var(--tw-border-opacity))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249,250,251,var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(21,112,239,var(--tw-bg-opacity))}.bg-photon-blue{--tw-bg-opacity: 1;background-color:rgb(49,130,206,var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254,226,226,var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255,255,255,var(--tw-bg-opacity))}.p-0{padding:0}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-40{padding-bottom:10rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-5{padding-left:1.25rem}.pl-\\[19\\.75px\\]{padding-left:19.75px}.pr-2{padding-right:.5rem}.pr-5{padding-right:1.25rem}.pt-1{padding-top:.25rem}.pt-14{padding-top:3.5rem}.pt-3{padding-top:.75rem}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-snug{line-height:1.375}.text-black{--tw-text-opacity: 1;color:rgb(0,0,0,var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(23,92,211,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156,163,175,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107,114,128,var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75,85,99,var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55,65,81,var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248,113,113,var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239,68,68,var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185,28,28,var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100,116,139,var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13,148,136,var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255,255,255,var(--tw-text-opacity))}.opacity-50{opacity:.5}.shadow-card{--tw-shadow: 0px 0px 1px rgba(48, 49, 51, .05),0px 2px 4px rgba(48, 49, 51, .1);--tw-shadow-colored: 0px 0px 1px var(--tw-shadow-color), 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(24,73,169,var(--tw-bg-opacity))}.hover\\:bg-photon-blue-dark:hover{--tw-bg-opacity: 1;background-color:rgb(43,108,176,var(--tw-bg-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75,85,99,var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.disabled\\:bg-gray-500:disabled{--tw-bg-opacity: 1;background-color:rgb(107,114,128,var(--tw-bg-opacity))}@media (min-width: 475px){.xs\\:mx-auto{margin-left:auto;margin-right:auto}.xs\\:\\!w-auto{width:auto!important}.xs\\:w-fit{width:-moz-fit-content;width:fit-content}.xs\\:flex-row{flex-direction:row}.xs\\:flex-row-reverse{flex-direction:row-reverse}.xs\\:justify-start{justify-content:flex-start}.xs\\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 640px){.sm\\:order-first{order:-9999}.sm\\:mt-0{margin-top:0}.sm\\:inline{display:inline}.sm\\:grid{display:grid}.sm\\:w-\\[600px\\]{width:600px}.sm\\:w-auto{width:auto}.sm\\:flex-none{flex:none}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:gap-4{gap:1rem}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:py-2{padding-top:.5rem;padding-bottom:.5rem}}@media (min-width: 768px){.md\\:\\!mt-8{margin-top:2rem!important}.md\\:\\!block{display:block!important}.md\\:flex{display:flex}.md\\:\\!hidden{display:none!important}.md\\:px-4{padding-left:1rem;padding-right:1rem}.md\\:px-8{padding-left:2rem;padding-right:2rem}.md\\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\\:py-3{padding-top:.75rem;padding-bottom:.75rem}.md\\:pb-52{padding-bottom:13rem}.md\\:pt-4{padding-top:1rem}.md\\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\\:text-xl{font-size:1.25rem;line-height:1.75rem}}';var bW=Q("<style>"),$W=Q('<button class="w-full disabled:bg-gray-500 bg-photon-blue hover:bg-blue-700 text-white h-10 px-4 rounded-lg font-sans hover:bg-photon-blue-dark transition ease-in-out delay-50">');const wW=e=>{const t=Jr();return ce(()=>{t||console.error("[photon-auth-button] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{var r=bW();return I(r,jt),r})(),t?(()=>{var r=$W();return r.$$click=async()=>{const n={appState:{}};e.redirectPath&&(n.appState.returnTo=e.redirectPath),t.authentication.state.isAuthenticated?await t.authentication.logout():await t.authentication.login(n)},I(r,()=>t.authentication.state.isAuthenticated?"Log out":"Log in"),Y(()=>r.disabled=t.authentication.state.isLoading),r})():null]};At("photon-auth-button",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},wW);oa(["click"]);var xW=Q("<style>"),kW=Q(`<div class="flex flex-col w-screen max-w-sm"><svg viewBox="0 0 305 62.61"xmlns=http://www.w3.org/2000/svg class="h-[28px] pl-[19.75px]"><g fill=#273D52><path d="M0 54.1169H6.81375V35.7722H18.0826C29.5481 35.7722 34.3963 30.3343 34.3963 18.7378V17.4275C34.3963 5.76548 29.417 0.655167 18.0826 0.655167H0V54.1169ZM6.81375 30.1377V6.28961H18.2792C24.7653 6.28961 27.386 8.9758 27.386 16.0516V20.0481C27.386 27.1895 24.7653 30.1377 18.2792 30.1377H6.81375Z"></path><path d="M70.9593 54.1169H77.773V0.655167H70.9593V24.4378H50.8456V0.655167H44.0319V54.1169H50.8456V30.3343H70.9593V54.1169Z"></path><path d="M107.146 54.772C119.528 54.772 125.687 46.5169 125.687 34.9205V19.7861C125.687 8.25511 119.528 0 107.146 0C94.6974 0 88.5388 8.25511 88.5388 19.7861V34.9205C88.5388 46.5169 94.6974 54.772 107.146 54.772ZM95.5491 35.9687V18.8033C95.5491 10.7448 99.4801 5.89651 107.146 5.89651C114.745 5.89651 118.677 10.7448 118.677 18.8033V35.9687C118.677 44.0928 114.745 48.8755 107.146 48.8755C99.4801 48.8755 95.5491 44.0928 95.5491 35.9687Z"></path><path d="M144.295 54.1169H151.109V6.48616H164.54V0.655167H130.864V6.48616H144.295V54.1169Z"></path><path d="M188.299 54.772C200.682 54.772 206.841 46.5169 206.841 34.9205V19.7861C206.841 8.25511 200.682 0 188.299 0C175.851 0 169.693 8.25511 169.693 19.7861V34.9205C169.693 46.5169 175.851 54.772 188.299 54.772ZM176.703 35.9687V18.8033C176.703 10.7448 180.634 5.89651 188.299 5.89651C195.899 5.89651 199.83 10.7448 199.83 18.8033V35.9687C199.83 44.0928 195.899 48.8755 188.299 48.8755C180.634 48.8755 176.703 44.0928 176.703 35.9687Z"></path><path d="M217.6 54.1169H224.021V14.3482L245.576 54.1169H252.608L248.058 45.1084L245.641 40.4239L224.086 0.655167H217.6V54.1169Z"></path></g><g fill=#B35724><circle cx=249.798 cy=5.202 r=5.202></circle></g></svg><h1 class="font-medium text-3xl text-center font-sans mt-6 mb-3">Log in to your account</h1><p class="text-gray-500 font-sans text-center mb-8">Don't have an account? <a href=mailto:support@photon.health class="text-teal-600 hover:underline hover:cursor-pointer font-sans font-light">Contact Support</a></p><photon-auth-button>`,!0,!1,!1);const _W=e=>{const t=Jr();return ce(()=>{t||console.error("[photon-login] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{var r=xW();return I(r,jt),r})(),(()=>{var r=kW(),n=r.firstChild,i=n.nextSibling,a=i.nextSibling,o=a.nextSibling;return o._$owner=ue(),Y(()=>o.redirectPath=e.redirectPath),r})()]};At("photon-login",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},_W);const gd=(e,t)=>{let r;const n=()=>clearTimeout(r);return ue()&&xr(n),Object.assign((...a)=>{r!==void 0&&n(),r=setTimeout(()=>e(...a),t)},{clear:n})};/**
|
|
1495
1495
|
* @license
|
|
1496
1496
|
* Copyright 2019 Google LLC
|
|
1497
1497
|
* SPDX-License-Identifier: BSD-3-Clause
|
package/dist/index.mjs
CHANGED
|
@@ -39143,7 +39143,7 @@ const Xs = {
|
|
|
39143
39143
|
preferredPharmacy: {
|
|
39144
39144
|
badgeColor: "blue",
|
|
39145
39145
|
badgeText: "Preferred Pharmacy",
|
|
39146
|
-
text: "
|
|
39146
|
+
text: "The patient can update their preferred pharmacy selection for 15 minutes. Otherwise, we'll send it to their preferred pharmacy on file."
|
|
39147
39147
|
},
|
|
39148
39148
|
coverageOptionPharmacy: {
|
|
39149
39149
|
badgeColor: "gray",
|
|
@@ -40360,7 +40360,7 @@ const L6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
40360
40360
|
function Sh(e, t) {
|
|
40361
40361
|
return e.every((r) => t.includes(r));
|
|
40362
40362
|
}
|
|
40363
|
-
const fW = "0.19.
|
|
40363
|
+
const fW = "0.19.6", pW = {
|
|
40364
40364
|
version: fW
|
|
40365
40365
|
};
|
|
40366
40366
|
var mW = /* @__PURE__ */ Q("<slot>"), gW = /* @__PURE__ */ Q("<div>");
|