1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[708],{70040:function(e,t,n){n.d(t,{Ac:function(){return d},FO:function(){return p},FU:function(){return l},dD:function(){return f},od:function(){return u},uz:function(){return s},yp:function(){return c}});var i=n(57437),a=n(92369),r=n(29374),o=n(13041);let s=["Male","Female","Nonbinary","Intersex","Other"],l=["Anesthetic","Critical Care","Dermatology","Emergency Medicine","Neurology","Obgyn","Oncology","Ophthalmology","Pain Medicine","Pathology","Pediatrics - General Pediatrics","Pediatrics - Neonatology","Pediatrics - Other","Pediatrics - Specialist Pediatrics","Primary Care","Psychiatry","Radiology","Rehab Medicine","Remote Medicine","Specialist Medicine - Cardiology","Specialist Medicine - Endocrinology","Specialist Medicine - Gastroenterology","Specialist Medicine - Geriatrics","Specialist Medicine - Hematology","Specialist Medicine - Infectious Diseases","Specialist Medicine - Nephrology","Specialist Medicine - Neurology","Specialist Medicine - Oncology","Specialist Medicine - Other","Specialist Medicine - Palliative Care","Specialist Medicine - Respiratory","Specialist Medicine - Rheumatology","Surgery - Cardiothoracics","Surgery - ENT/Head Neck","Surgery - General Surgery","Surgery - Neurosurgery","Surgery - Orthopedics","Surgery - Other","Surgery - Pediatric","Surgery - Plastic/Reconstructive","Surgery - Urology","Surgery - Vascular","Other"],u=["Australia","Canada","United Kingdom","United States"],d="d2553058-92d3-4913-a1b1-95ed0ace637b",c="Reloading the page will cause your notes to be lost. Are you sure you want to continue?",f="12yo recent fall during PE; running\notherwise well\ncracked tooth\n# scaphoid - now in plaster\nnose bleed post fall - ? broken nose / deviated septum\nneeds ENT review to evaluate septum",p=[{id:"1",mode:"in-person",note:"",icon:(0,i.jsx)(a.Z,{height:20,width:20})},{id:"2",mode:"video",note:"mention consultation mode as ( Consultation conducted as telehealth (video))/n",icon:(0,i.jsx)(r.Z,{height:20,width:20})},{id:"3",mode:"phone",note:"mention consultation mode as ( Consultation conducted as telehealth over the phone )/n",icon:(0,i.jsx)(o.Z,{height:20,width:20})}]},38854:function(e,t,n){n.d(t,{d:function(){return i}}),n(83079);var i=(0,n(12119).$)("80260be9c13e03cc705b0f794b549336363422ea")},99142:function(e,t,n){n.d(t,{k:function(){return i}}),n(83079);var i=(0,n(12119).$)("93616fc1391bc405d41be50ea92521689241faa5")},7326:function(e,t,n){let i;var a=n(93561),r=n(69398);t.Z=function(){if(i)return i;let e="https://vslhifiikggljevxjuiu.supabase.co",t="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZzbGhpZmlpa2dnbGpldn
1hqdWl1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDI0Mjc0NjksImV4cCI6MjAxODAwMzQ2OX0.iH_e3F_q-Eq2pFnlTen0M1tHUsXs0a4B1-O2GUJcyF8";return(0,r.Z)(e,"Supabase URL was not provided"),(0,r.Z)(t,"Supabase Anon key was not provided"),i=(0,a.AY)(e,t,{cookieOptions:{path:"/"}})}},12381:function(e,t,n){n.d(t,{d:function(){return l},z:function(){return u}});var i=n(57437),a=n(2265),r=n(98482),o=n(77712),s=n(93448);let l=(0,o.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"bg-[#2d9967] text-white hover:bg-[#008001]/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),u=a.forwardRef((e,t)=>{let{className:n,variant:a,size:o,asChild:u=!1,type:d="button",...c}=e,f=u?r.g7:"button";return(0,i.jsx)(f,{type:d,className:(0,s.cn)(l({variant:a,size:o,className:n})),ref:t,...c})});u.displayName="Button"},40279:function(e,t,n){n.d(t,{I:function(){return o}});var i=n(57437),a=n(2265),r=n(93448);let o=a.forwardRef((e,t)=>{let{className:n,type:a,...o}=e;return(0,i.jsx)("input",{type:a,className:(0,r.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...o})});o.displayName="Input"},26358:function(e,t,n){n.d(t,{$:function(){return o}});var i=n(57437),a=n(93448);let r={sm:"w-4 h-4",md:"w-6 h-6",xl:"w-12 h-12"},o=e=>{let{size:t="md",className:n,id:o}=e;return(0,i.jsxs)("svg",{id:o,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:(0,a.cn)("animate-spin",r[t],n),"aria-hidden":"true",children:[(0,i.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,i.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}},84004:function(e,t,n){n.d(t,{O:function(){return o}});var i=n(5264),a=n(31229),r=n(25566);let o=(0,i.D)({server:{MAILGUN_API_KEY:a.z.string().min(1).optional(),MAILGUN_DOMAIN:a.z.string().min(1).optional(),DEEPGRAM_API_KEY:a.z.string().min(1).optional(),SERVICE_API_KEY_ADMIN:a.z.string().min(1).optional(),SERVICE_API_BASE_URL:a.z.string().min(1).optional()},client:{NEXT_PUBLIC_SUPABASE_KEY:a.z.string().min(1).optional(),NEXT_PUBLIC_SUPABASE_URL:a.z.string().min(1).optional(),NEXT_PUBLIC_NODE_ENV:a.z.enum(["development","production","test"]).optional(),NEXT_PUBLIC_MIXPANEL_TOKEN:a.z.string().min(1).optional(),NEXT_PUBLIC_SERVICE_API_BASE_URL_STREAM:a.z.string().min(1).optional()},runtimeEnv:{NEXT_PUBLIC_SUPABASE_KEY:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZzbGhpZmlpa2dnbGpldn
1hqdWl1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDI0Mjc0NjksImV4cCI6MjAxODAwMzQ2OX0.iH_e3F_q-Eq2pFnlTen0M1tHUsXs0a4B1-O2GUJcyF8",SERVICE_API_BASE_URL:r.env.SERVICE_API_BASE_URL,NEXT_PUBLIC_SERVICE_API_BASE_URL_STREAM:"https://staging.api.mednotes.ai",NEXT_PUBLIC_SUPABASE_URL:"https://vslhifiikggljevxjuiu.supabase.co",NEXT_PUBLIC_NODE_ENV:"production",NEXT_PUBLIC_MIXPANEL_TOKEN:"8fa7176e178555916d978551603254e1",MAILGUN_API_KEY:r.env.MAILGUN_API_KEY,MAILGUN_DOMAIN:r.env.MAILGUN_DOMAIN,DEEPGRAM_API_KEY:r.env.DEEPGRAM_API_KEY,SERVICE_API_KEY_ADMIN:r.env.SERVICE_API_KEY_ADMIN}})},89802:function(e,t,n){n.d(t,{Gn:function(){return m},Oj:function(){return y},xb:function(){return E}});var i,a,r=n(38854),o=n(99142),s=n(36976),l=n(95108),u=n(76496),d=n(16593),c=n(29827),f=n(21770),p=n(2265),g=n(71931);(i=a||(a={})).SuccessMessage="Profile updated successfully",i.ErrorMessage="Failed to update profile";let E=function(){let{initialData:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,l.Z)(),{data:n}=(0,s.pg)();return(0,d.a)({queryKey:["userProfile"],queryFn:async()=>{var e;let n=await t.auth.getUser();if(!(null===(e=n.data.user)||void 0===e?void 0:e.id))return null;let{data:i,error:a}=await (0,r.d)(n.data.user.id);if(a)throw Error(a);return i},staleTime:3e5,enabled:!!t&&!!n,initialData:e})},m=function(){let{errorMessage:e,successMessage:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,c.NL)(),{toast:i}=(0,u.p)();return(0,f.D)({mutationFn:async e=>{let{updateData:t}=e;if(!t)throw Error("Update data missing");return await (0,o.k)(t)},onError:(t,n)=>{i({title:t.message||n.errorMessage||e||"Failed to update profile",description:"Failed to update profile",open:!0})},onSuccess:(e,a)=>{n.setQueryData(["userProfile"],e=>e?{...e,...a.updateData}:null);let r=Object.keys(a.updateData||{}),o=!1;if(r.length&&e&&"object"==typeof e){for(let t of r)if(void 0!==e[t]&&null!==e[t]&&""!==e[t]){o=!0;break}}o&&i({title:a.successMessage||t||"Profile updated successfully"}),n.invalidateQueries({queryKey:["userWorkspaces","workspaceTemplates"]})},retryDelay:e=>Math.min(1e3*e,3e3)})},y=(e,t,n)=>{var i,a,r;let{data:o}=E(),{mutate:s,isError:l,isPending:u,reset:d}=m(),[c,f]=(0,p.useState)(!1),[y,v]=(0,p.useState)(!1),[_,I]=(0,p.useState)(null!==(r=null==o?void 0:o[e])&&void 0!==r?r:t),[N]=(0,g.Nr)(_,300);return(0,p.useEffect)(()=>{if(N===_&&c&&!y){var t,i;return f(!1),v(!0),s({updateData:{[e]:N},errorMessage:(null==n?void 0:null===(t=n[e])||void 0===t?void 0:t.errorMessage)||(null==n?void 0:n.errorMessage)||"Failed to update profile",successMessage:(null==n?void 0:null===(i=n[e])||void 0===i?void 0:i.successMessage)||(null==n?void 0:n.successMessage)||"Profile updated successfully"})}N!==_&&v(!1)},[N,_,s,null==n?void 0:null===(i=n[e])||void 0===i?void 0:i.errorMessage,null==n?void 0:n.errorMessage,"Failed to update profile",null==n?void 0:null===(a=n[e])||void 0===a?void 0:a.successMessage,null==n?void 0:n.successMessage,"Profile updated successfully",e,c,y]),(0,p.useEffect)(()=>{if(l){var n;d(),I(null!==(n=null==o?void 0:o[e])&&void 0!==n?n:t)}},[l,o]),(0,p.useEffect)(()=>{_!==N&&f(!0)},[_,N]),[_,I,u]}},36976:function(e,t,n){n.d(t,{pg:function(){return m},QJ:function(){return y}}),n(83079);var i,a,r=n(12119);(0,r.$)("075ef3aa8c5b94a921bfbf60ff9b2935897c00be");var o=(0,r.$)("d662c9f4952dd04d12884be4cce3e2ea2d34064c");(0,r.$)("d1b1bf9df7f51e72452c34abd0ecc496b9bd1ccb"),(0,r.$)("9e5a617971c18ce6a461898031b7bfd9540ba03f"),(0,r.$)("2d1b8473708e03b34dae37a71c6ba86377531647"),(0,r.$)("952b68d2421422e9f864f1143dcda7d97b80e5ee");var s=(0,r.$)("370d860c21a27782259de77f4f1bb4ac9c9d27d5");(0,r.$)("9ba24d550dc95e982de89dea47275fc402be04dd"),(0,r.$)("93c7cec8feb3952f00d8d5a84c3c542c2f199db0"),(0,r.$)("7b64643a859340a782f710db24178a6c6ecacf34");var l=n(95108),u=n(76496),d=n(75934),c=n(16219),f=n(9442),p=n(16593),g=n(29827),E=n(21770);(i=a||(a={})).SIGN_IN_SUCCESS="Sign in link sent! Check your email :)",i.UPDATE_USER_SUCCESS="User updated successfully",i.DELETE_USER_SUCCESS="User deleted successfully",i.SIGN_OUT_SUCCESS="Sign out successful";let m=function(){let{initialData:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,p.a)({queryKey:["user"],queryFn:async()=>{let{data:e}=await o();return(null==e?void 0:e.user)||null},staleTime:3e5,initialData:e})},y=function(){let{errorMessage:e,successMessage:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,g.NL)(),{toast:i}=(0,u.p)(),a=(0,l.Z)(),r=(0,d.N4)(),o=(0,c.s)(e=>
1e.isNotesDirty),p=(0,E.D)({mutationFn:async e=>(a.auth.signOut(),await s()),onSuccess:(e,a,r)=>{n.invalidateQueries({queryKey:["user"]}),f.nT.track(f.w$.LOGOUT),i({title:(null!=a?a:{}).successMessage||t||"Sign out successful"})},onError:(t,n,a)=>{i({title:(null!=n?n:{}).errorMessage||e||t.message,description:"Failed to sign out",open:!0})}}),m=async e=>{(!o||await r({title:"Sign out will cause your notes to be lost.",body:"Are you sure you want to continue?"}))&&p.mutate(e)};return{...p,mutate:m}}},95108:function(e,t,n){var i=n(7326),a=n(2265);t.Z=function(){return(0,a.useMemo)(i.Z,[])}},76496:function(e,t,n){n.d(t,{p:function(){return l}});var i=n(29827),a=n(16593),r=n(21770);n(2265);let o=["toasts"],s=[];function l(){let e=(0,i.NL)(),{data:t=s}=(0,a.a)({queryKey:o,initialData:()=>s,staleTime:1/0}),n=(0,r.D)({mutationFn:e=>Promise.resolve([...t,e].slice(0,3)),onMutate:t=>{e.setQueryData(o,e=>[t,...e||[]].slice(0,3))}}),l=(0,r.D)({mutationFn:e=>Promise.resolve(t.map(t=>t.id===e?{...t,open:!1}:t)),onMutate:t=>{e.setQueryData(o,e=>null==e?void 0:e.map(e=>e.id===t?{...e,open:!1}:e))}}),u=e=>{e?l.mutate(e):t.forEach(e=>u(e.id))};return{toasts:t,toast:t=>{let i="".concat(Date.now(),"-").concat(Math.random()),a={...t,id:i,open:!0,onOpenChange:e=>{e||u(i)}};return n.mutate(a),{id:i,dismiss:()=>u(i),update:t=>{e.setQueryData(o,e=>null==e?void 0:e.map(e=>e.id===i?{...e,...t}:e))}}},dismiss:u}}},93448:function(e,t,n){n.d(t,{C:function(){return s},cn:function(){return o}});var i=n(61994),a=n(2265),r=n(53335);function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.m6)((0,i.W)(t))}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:768,[t,n]=(0,a.useState)(null);return(0,a.useEffect)(()=>{let t=window.matchMedia("(min-width: ".concat(e,"px)")),i=()=>n(t.matches);return i(),t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[e]),t}},75934:function(e,t,n){n.d(t,{AlertDialogProvider:function(){return _},N4:function(){return I}});var i=n(57437),a=n(2265),r=n(70928),o=n(93448),s=n(12381);let l=r.fC;r.xz;let u=r.h_,d=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,i.jsx)(r.aV,{className:(0,o.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...a,ref:t})});d.displayName=r.aV.displayName;let c=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,i.jsxs)(u,{children:[(0,i.jsx)(d,{}),(0,i.jsx)(r.VY,{ref:t,className:(0,o.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n),...a}
1)]})});c.displayName=r.VY.displayName;let f=e=>{let{className:t,...n}=e;return(0,i.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...n})};f.displayName="AlertDialogHeader";let p=e=>{let{className:t,...n}=e;return(0,i.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...n})};p.displayName="AlertDialogFooter";let g=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,i.jsx)(r.Dx,{ref:t,className:(0,o.cn)("text-lg font-semibold",n),...a})});g.displayName=r.Dx.displayName;let E=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,i.jsx)(r.dk,{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",n),...a})});E.displayName=r.dk.displayName,a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,i.jsx)(r.aU,{ref:t,className:(0,o.cn)((0,s.d)(),n),...a})}).displayName=r.aU.displayName,a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,i.jsx)(r.$j,{ref:t,className:(0,o.cn)((0,s.d)({variant:"outline"}),"mt-2 sm:mt-0",n),...a})}).displayName=r.$j.displayName;var m=n(40279);let y=a.createContext(()=>null);function v(e,t){switch(t.type){case"close":return{...e,open:!1};case"alert":case"confirm":case"prompt":return{...e,open:!0,...t,cancelButton:t.cancelButton||("alert"===t.type?"Okay":"Cancel"),actionButton:"actionButton"in t&&t.actionButton||"Okay"};default:return e}}function _(e){let{children:t}=e,[n,r]=a.useReducer(v,{open:!1,title:"",body:"",type:"alert",cancelButton:"Cancel",actionButton:"Okay"}),o=a.useRef();function u(){var e;r({type:"close"}),null===(e=o.current)||void 0===e||e.call(o,!1)}let d=a.useCallback(async e=>(r(e),new Promise(e=>{o.current=e})),[]);return(0,i.jsxs)(y.Provider,{value:d,children:[t,(0,i.jsx)(l,{open:n.open,onOpenChange:e=>{e||u()},children:(0,i.jsx)(c,{children:(0,i.jsxs)("form",{onSubmit:e=>{var t,n,i;e.preventDefault(),n=null===(t=e.currentTarget.prompt)||void 0===t?void 0:t.value,r({type:"close"}),null===(i=o.current)||void 0===i||i.call(o,null==n||n)},children:[(0,i.jsxs)(f,{children:[(0,i.jsx)(g,{children:n.title}),n.body?(0,i.jsx)(E,{children:n.body}):null]}),"prompt"===n.type&&(0,i.jsx)(m.I,{name:"prompt",defaultValue:n.defaultValue,...n.inputProps}),(0,i.jsxs)(p,{children:[(0,i.jsx)(s.z,{type:"button",variant:"outline",onClick:u,children:n.cancelButton}),"alert"===n.type?null:(0,i.jsx)(s.z,{type:"submit",children:n.actionButton})]})]})})})]})}function I(){let e=a.useContext(y);return a.useCallback(t=>e({..."string"==typeof t?{title:t}:t,type:"confirm"}),[e])}},16219:function(e,t,n){n.d(t,{q:function(){return o},s:function(){return r}});var i=n(70040),a=n(3011);let r=(0,a.U)(e=>({notes:"",isNotesDirty:!1,currentTemplateIds:[],setNotes:t=>{e({notes:t,isNotesDirty:t!==i.dD&&""!==t})},setCurrentTemplateIds:t=>e({currentTemplateIds:t})})),o=(0,a.U)(e=>({landingDialogOpen:!1,landingDialogInitialSlide:0,setLandingDialogOpen:t=>e({landingDialogOpen:t}),setLandingDialogInitialSlide:t=>e({landingDialogInitialSlide:t}),openLandingDialogWithSlide:t=>e({landingDialogOpen:!0,landingDialogInitialSlide:t})}))},9442:function(e,t,n){n.d(t,{j7:function(){return c},nT:function(){return u},w$:function(){return d}});var i=n(29734),a=n.n(i),r=n(84004);let o=r.O.NEXT_PUBLIC_MIXPANEL_TOKEN,s=!1,l=()=>{o&&!s&&"production"===r.O.NEXT_PUBLIC_NODE_ENV&&(a().init(o,{ignore_dnt:!0}),s=!0)},u={track:(e,t)=>{"production"===r.O.NEXT_PUBLIC_NODE_ENV&&(s||l(),o&&a().track(e,{...t}))},identify:e=>{"production"===r.O.NEXT_PUBLIC_NODE_ENV&&(s||l(),a().identify(e))},setProfile:e=>{"production"===r.O.NEXT_PUBLIC_NODE_ENV&&(s||l(),a().people.set(e))}},d={OPENED_EMAIL_DIALOG:"OPENED_EMAIL_DIALOG",EMAIL_SENT:"EMAIL_SENT",EMR:"EMR",COPY:"COPY",SETTINGS:"SETTINGS",LOGOUT:"LOGOUT",CLICKED_GENERATE:"CLICKED_GENERATE",CLICKED_UPLOAD:"CLICKED_UPLOAD",UPLOAD_SUCCESS:"UPLOAD_SUCCESS",LOGGED_IN:"LOGGED_IN",TEMPLATE_ADDED:"TEMPLATE_ADDED",WORKSPACE_ADDED:"WORKSPACE_ADDED"},c={NEXT_CLICKED:"NEXT_CLICKED",PREVIOUS_CLICKED:"PREVIOUS_CLICKED",CLOSE_CLICKED:"CLOSE_CLICKED",RATING_GIVEN:"RATING_GIVEN"}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.