@medixdeck/ui 0.1.29 → 0.1.31

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.cjs CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),U=require("react"),s=require("@chakra-ui/react"),jo=require("next-themes"),xr=require("@tiptap/react"),al=require("@tiptap/starter-kit"),sl=require("@tiptap/extension-link"),cl=require("@tiptap/extension-underline"),ul=require("@tiptap/extension-text-align"),dl=require("@tiptap/extension-placeholder"),fl=require("htmlparser2"),ye=require("framer-motion"),pl=require("sanitize-html");var et=typeof document<"u"?document.currentScript:null;const Xe=e=>e&&e.__esModule?e:{default:e},I=Xe(U),hl=Xe(al),xl=Xe(sl),gl=Xe(cl),ml=Xe(ul),bl=Xe(dl),yl=Xe(pl),_={blue:{50:{value:"#E8F3FF"},100:{value:"#D6EEFF"},200:{value:"#A8D4FF"},300:{value:"#70B6FF"},400:{value:"#3D98FF"},500:{value:"#0685FF"},600:{value:"#0066CC"},700:{value:"#004D99"},800:{value:"#003366"},900:{value:"#001A33"},gradient:{value:"#1A8FFF"}},purple:{50:{value:"#F9F0FF"},100:{value:"#EDD6FF"},200:{value:"#D9AAFF"},300:{value:"#BB77FF"},400:{value:"#9933FF"},500:{value:"#7700CC"},600:{value:"#5C00A3"},700:{value:"#44007A"},800:{value:"#2D0052"},900:{value:"#160029"}},neutralLight:{bg:{value:"#FEFEFE"},bg2:{value:"#F6F6F6"},surface:{value:"#F6F6F6"},white:{value:"#FFFFFF"},border:{value:"#E4E8F0"},muted:{value:"#9AAAB8"},heading:{value:"#111926"},body:{value:"#3D4F63"}},neutralDark:{bg:{value:"#0A1220"},bg2:{value:"#182337"},surface:{value:"#152035"},black:{value:"#000000"},border:{value:"#1E3050"},muted:{value:"#4A6480"},heading:{value:"#F0F6FF"},body:{value:"#ABC0D6"}},green:{50:{value:"#F0FDF4"},100:{value:"#DCFCE7"},500:{value:"#16A34A"},600:{value:"#166534"}},amber:{50:{value:"#FFFBEB"},100:{value:"#FEF3C7"},500:{value:"#D97706"},600:{value:"#B45309"}},red:{50:{value:"#FFF1F2"},100:{value:"#FFE4E6"},200:{value:"#FECDD3"},500:{value:"#DC2626"},600:{value:"#B91C1C"}}},ot={fonts:{heading:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},body:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},mono:{value:"'JetBrains Mono', 'Fira Code', 'Fira Mono', monospace"}},fontSizes:{"2xs":{value:"clamp(0.5625rem, 0.5rem + 0.2vw, 0.625rem)"},xs:{value:"clamp(0.625rem, 0.5625rem + 0.25vw, 0.75rem)"},sm:{value:"clamp(0.6875rem, 0.625rem + 0.3vw, 0.8125rem)"},md:{value:"clamp(0.8125rem, 0.75rem + 0.35vw, 0.9375rem)"},lg:{value:"clamp(0.9375rem, 0.875rem + 0.4vw, 1.0625rem)"},xl:{value:"clamp(1rem, 0.9375rem + 0.5vw, 1.1875rem)"},"2xl":{value:"clamp(1.125rem, 1rem + 0.6vw, 1.4375rem)"},"3xl":{value:"clamp(1.25rem, 1.125rem + 0.75vw, 1.625rem)"},"4xl":{value:"clamp(1.5rem, 1.25rem + 1vw, 2rem)"},"5xl":{value:"clamp(1.75rem, 1.5rem + 1.5vw, 2.5rem)"},"6xl":{value:"clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem)"}},fontWeights:{normal:{value:"400"},medium:{value:"500"},semibold:{value:"600"},bold:{value:"700"}},lineHeights:{none:{value:"1"},tight:{value:"1.1"},snug:{value:"1.2"},normal:{value:"1.3"},relaxed:{value:"1.4"},loose:{value:"1.6"}},letterSpacings:{tight:{value:"-0.01em"},normal:{value:"0em"},wide:{value:"0.05em"},wider:{value:"0.1em"}}},Co={display:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-6xl)",fontWeight:"var(--font-weight-bold)",lineHeight:"var(--line-height-tight)",letterSpacing:"var(--letter-spacing-tight)"}},h1:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-5xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-snug)",letterSpacing:"var(--letter-spacing-tight)"}},h2:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-normal)"}},h3:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-medium)",lineHeight:"var(--line-height-relaxed)"}},body:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-loose)"}},small:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-normal)"}},label:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-xs)",fontWeight:"var(--font-weight-medium)",letterSpacing:"var(--letter-spacing-wide)",textTransform:"uppercase"}},mono:{value:{fontFamily:"var(--font-mono)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)"}}},So={0:{value:"0px"},1:{value:"4px"},2:{value:"8px"},3:{value:"12px"},4:{value:"16px"},6:{value:"24px"},8:{value:"32px"},12:{value:"48px"},16:{value:"64px"},20:{value:"80px"},24:{value:"96px"},32:{value:"128px"},40:{value:"160px"},48:{value:"192px"}},Bo={none:{value:"0px"},badge:{value:"4px"},sm:{value:"4px"},md:{value:"8px"},card:{value:"12px"},lg:{value:"12px"},modal:{value:"16px"},xl:{value:"16px"},"2xl":{value:"20px"},"3xl":{value:"24px"},full:{value:"9999px"},circle:{value:"50%"}},Fo={xs:{value:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},sm:{value:"0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10)"},md:{value:"0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10)"},lg:{value:"0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.10)"},xl:{value:"0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.10)"},"card-dark":{value:"none"},"card-light":{value:"none"},none:{value:"none"}},Eo=s.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:_.blue,purple:_.purple,green:_.green,amber:_.amber,red:_.red,neutralLight:_.neutralLight,neutralDark:_.neutralDark}},fonts:ot.fonts,fontSizes:ot.fontSizes,fontWeights:ot.fontWeights,lineHeights:ot.lineHeights,letterSpacings:ot.letterSpacings,spacing:So,radii:Bo,shadows:Fo},semanticTokens:{colors:{"brand.solid":{value:{base:"{colors.brand.blue.500}",_dark:"{colors.brand.blue.500}"}},"brand.muted":{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},"brand.contrast":{value:{base:"#FFFFFF",_dark:"#FFFFFF"}},bg:{value:{base:"{colors.brand.neutralLight.bg}",_dark:"{colors.brand.neutralDark.bg}"}},"bg.subtle":{value:{base:"{colors.brand.neutralLight.bg2}",_dark:"{colors.brand.neutralDark.bg2}"}},"bg.surface":{value:{base:"{colors.brand.neutralLight.surface}",_dark:"{colors.brand.neutralDark.surface}"}},"text.heading":{value:{base:"{colors.brand.neutralLight.heading}",_dark:"{colors.brand.neutralDark.heading}"}},"text.body":{value:{base:"{colors.brand.neutralLight.body}",_dark:"{colors.brand.neutralDark.body}"}},"text.muted":{value:{base:"{colors.brand.neutralLight.muted}",_dark:"{colors.brand.neutralDark.muted}"}},border:{value:{base:"{colors.brand.neutralLight.border}",_dark:"{colors.brand.neutralDark.border}"}},"status.success":{value:{base:"{colors.brand.green.500}",_dark:"{colors.brand.green.500}"}},"status.success.tint":{value:{base:"{colors.brand.green.100}",_dark:"rgba(27, 122, 56, 0.2)"}},"status.warning":{value:{base:"{colors.brand.amber.500}",_dark:"{colors.brand.amber.500}"}},"status.warning.tint":{value:{base:"{colors.brand.amber.100}",_dark:"rgba(217, 119, 6, 0.2)"}},"status.error":{value:{base:"{colors.brand.red.500}",_dark:"{colors.brand.red.500}"}},"status.error.tint":{value:{base:"{colors.brand.red.100}",_dark:"rgba(220, 38, 38, 0.2)"}},blue:{50:{value:{base:"{colors.brand.blue.50}"}},100:{value:{base:"{colors.brand.blue.100}"}},200:{value:{base:"{colors.brand.blue.200}"}},300:{value:{base:"{colors.brand.blue.300}"}},400:{value:{base:"{colors.brand.blue.400}"}},500:{value:{base:"{colors.brand.blue.500}"}},600:{value:{base:"{colors.brand.blue.600}"}},700:{value:{base:"{colors.brand.blue.700}"}},800:{value:{base:"{colors.brand.blue.800}"}},900:{value:{base:"{colors.brand.blue.900}"}},solid:{value:{base:"{colors.brand.blue.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},subtle:{value:{base:"{colors.brand.blue.50}",_dark:"rgba(6, 133, 255, 0.1)"}},emphasized:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.800}"}},fg:{value:{base:"{colors.brand.blue.700}",_dark:"{colors.brand.blue.300}"}},focusRing:{value:{base:"{colors.brand.blue.500}"}}},purple:{50:{value:{base:"{colors.brand.purple.50}"}},100:{value:{base:"{colors.brand.purple.100}"}},500:{value:{base:"{colors.brand.purple.500}"}},600:{value:{base:"{colors.brand.purple.600}"}},solid:{value:{base:"{colors.brand.purple.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.purple.100}",_dark:"{colors.brand.purple.900}"}},subtle:{value:{base:"{colors.brand.purple.50}",_dark:"rgba(119, 0, 204, 0.1)"}},emphasized:{value:{base:"{colors.brand.purple.100}"}},fg:{value:{base:"{colors.brand.purple.700}",_dark:"{colors.brand.purple.300}"}},focusRing:{value:{base:"{colors.brand.purple.500}"}}}}},textStyles:Co}}),Lo=s.createSystem(s.defaultConfig,Eo),Kt={selection:10,impactLight:12,impactMedium:20,impactHeavy:[30,40,30],success:[10,30,20],warning:[20,40,20],error:[30,30,30],notification:15},tt={enabled:!0,respectReducedMotion:!0,patterns:Kt,strategy:"vibration",debug:!1};function vl(e){return e==="selection"||e==="impactLight"||e==="impactMedium"||e==="impactHeavy"||e==="success"||e==="warning"||e==="error"||e==="notification"}function gr(e){if(typeof e=="number")return!Number.isFinite(e)||e<=0?null:Math.round(e);if(!Array.isArray(e)||e.length===0)return null;const t=e.map(n=>Number.isFinite(n)?Math.max(0,Math.round(n)):0).filter((n,o,i)=>!(i.length===1&&i[0]===0));return t.length===0||!t.some(n=>n>0)?null:t}function Zt(e){return e===!1?{...tt,enabled:!1}:e===!0||e==null?{...tt}:{enabled:e.enabled??tt.enabled,respectReducedMotion:e.respectReducedMotion??tt.respectReducedMotion,patterns:{...Kt,...e.patterns??{}},strategy:e.strategy??tt.strategy,debug:e.debug??tt.debug}}function Xt(){return typeof navigator<"u"&&typeof navigator.vibrate=="function"}function Wn(){if(typeof window>"u"||typeof window.matchMedia!="function")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function Io(e,t){if(e===!1||e==null)return null;const n=To(t)?t:Zt(t);return typeof e=="string"?vl(e)?gr(n.patterns[e]??Kt[e]):null:gr(e)}function To(e){return!!e&&typeof e=="object"&&"patterns"in e&&"enabled"in e&&Array.isArray(e.patterns)===!1}function qn(){if(Xt())try{navigator.vibrate(0)}catch{}}function Vn(e,t){const n=To(t==null?void 0:t.config)?t.config:Zt(t==null?void 0:t.config);if(!n.enabled||n.strategy==="none"||typeof window>"u"||!Xt()||!(t!=null&&t.force)&&n.respectReducedMotion&&Wn())return!1;const o=Io(e,n);if(o==null)return!1;try{const i=navigator.vibrate(o);return n.debug&&typeof console<"u"&&console.debug("[medixdeck:haptics]",{input:e,pattern:o,ok:i}),!!i}catch{return!1}}function kl(e){return e==="ghost"||e==="link"?"impactLight":"impactMedium"}const mr=Zt(!0),Do=U.createContext({config:mr,trigger:e=>Vn(e,{config:mr}),cancel:qn});function wl(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};try{const t=window.matchMedia("(prefers-reduced-motion: reduce)");return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}catch{return()=>{}}}function Ao({haptics:e,children:t}){const n=U.useMemo(()=>Zt(e),[e]),o=U.useCallback(a=>Vn(a,{config:n}),[n]),i=U.useCallback(()=>qn(),[]),l=U.useMemo(()=>({config:n,trigger:o,cancel:i}),[n,o,i]);return r.jsx(Do.Provider,{value:l,children:t})}function de(){const e=U.useContext(Do),t=U.useSyncExternalStore(wl,Wn,()=>!1),n=typeof navigator<"u"&&Xt(),o=e.config.enabled&&e.config.strategy!=="none"&&n&&!(e.config.respectReducedMotion&&t);return{isSupported:n,isEnabled:o,trigger:e.trigger,cancel:e.cancel,config:e.config}}const jl={info:{bg:"rgba(6, 133, 255, 0.08)",border:"rgba(6, 133, 255, 0.3)",color:"#0685FF",icon:"ℹ"},success:{bg:"rgba(27, 122, 56, 0.08)",border:"rgba(27, 122, 56, 0.3)",color:"#1B7A38",icon:"✓"},warning:{bg:"rgba(217, 119, 6, 0.08)",border:"rgba(217, 119, 6, 0.3)",color:"#D97706",icon:"⚠"},error:{bg:"rgba(220, 38, 38, 0.08)",border:"rgba(220, 38, 38, 0.3)",color:"#DC2626",icon:"✕"}},$n=I.default.forwardRef(({status:e="info",variant:t="subtle",title:n,description:o,icon:i,onClose:l,closable:a=!1,haptic:c,disableHaptic:f=!1,children:u,...d},p)=>{const{trigger:x}=de(),h=jl[e],b=t==="solid"?h.color:h.bg,v=t==="solid"?"white":"inherit",F=t==="left-accent"?`4px solid ${h.color}`:void 0,y=t==="subtle"?`1px solid ${h.border}`:void 0;return r.jsxs(s.Box,{ref:p,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:b,border:y,borderLeft:F,color:v,...d,children:[r.jsx(s.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":h.color,color:"white",mt:"0.5",children:i??h.icon}),r.jsxs(s.Box,{flex:"1",children:[n&&r.jsx(s.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":h.color,children:n}),o&&r.jsx(s.Box,{mt:n?"0.5":"0",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"rgba(255,255,255,0.85)":"text.body",lineHeight:"1.5",children:o}),u]}),a&&r.jsx(s.Box,{as:"button",flexShrink:0,w:"6",h:"6",border:"none",bg:"transparent",cursor:"pointer",color:t==="solid"?"rgba(255,255,255,0.7)":"text.muted",fontSize:"lg",lineHeight:"1",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"sm",_hover:{color:t==="solid"?"white":"text.heading"},onClick:()=>{!f&&c!==!1&&x(c??"impactLight"),l==null||l()},"aria-label":"Dismiss alert",children:"×"})]})});$n.displayName="MedixAlert";if(typeof document<"u"){const e="medix-toast-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),U=require("react"),s=require("@chakra-ui/react"),jo=require("next-themes"),xr=require("@tiptap/react"),al=require("@tiptap/starter-kit"),sl=require("@tiptap/extension-link"),cl=require("@tiptap/extension-underline"),ul=require("@tiptap/extension-text-align"),dl=require("@tiptap/extension-placeholder"),fl=require("htmlparser2"),ye=require("framer-motion"),pl=require("sanitize-html");var et=typeof document<"u"?document.currentScript:null;const Xe=e=>e&&e.__esModule?e:{default:e},I=Xe(U),hl=Xe(al),xl=Xe(sl),gl=Xe(cl),ml=Xe(ul),bl=Xe(dl),yl=Xe(pl),_={blue:{50:{value:"#E8F3FF"},100:{value:"#D6EEFF"},200:{value:"#A8D4FF"},300:{value:"#70B6FF"},400:{value:"#3D98FF"},500:{value:"#0685FF"},600:{value:"#0066CC"},700:{value:"#004D99"},800:{value:"#003366"},900:{value:"#001A33"},gradient:{value:"#1A8FFF"}},purple:{50:{value:"#F9F0FF"},100:{value:"#EDD6FF"},200:{value:"#D9AAFF"},300:{value:"#BB77FF"},400:{value:"#9933FF"},500:{value:"#7700CC"},600:{value:"#5C00A3"},700:{value:"#44007A"},800:{value:"#2D0052"},900:{value:"#160029"}},neutralLight:{bg:{value:"#FEFEFE"},bg2:{value:"#F6F6F6"},surface:{value:"#F6F6F6"},white:{value:"#FFFFFF"},border:{value:"#E4E8F0"},muted:{value:"#9AAAB8"},heading:{value:"#111926"},body:{value:"#3D4F63"}},neutralDark:{bg:{value:"#0A1220"},bg2:{value:"#182337"},surface:{value:"#152035"},black:{value:"#000000"},border:{value:"#1E3050"},muted:{value:"#4A6480"},heading:{value:"#F0F6FF"},body:{value:"#ABC0D6"}},green:{50:{value:"#F0FDF4"},100:{value:"#DCFCE7"},500:{value:"#16A34A"},600:{value:"#166534"}},amber:{50:{value:"#FFFBEB"},100:{value:"#FEF3C7"},500:{value:"#D97706"},600:{value:"#B45309"}},red:{50:{value:"#FFF1F2"},100:{value:"#FFE4E6"},200:{value:"#FECDD3"},500:{value:"#DC2626"},600:{value:"#B91C1C"}}},ot={fonts:{heading:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},body:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},mono:{value:"'JetBrains Mono', 'Fira Code', 'Fira Mono', monospace"}},fontSizes:{"2xs":{value:"clamp(0.5625rem, 0.5rem + 0.2vw, 0.625rem)"},xs:{value:"clamp(0.625rem, 0.5625rem + 0.25vw, 0.75rem)"},sm:{value:"clamp(0.6875rem, 0.625rem + 0.3vw, 0.8125rem)"},md:{value:"clamp(0.8125rem, 0.75rem + 0.35vw, 0.9375rem)"},lg:{value:"clamp(0.9375rem, 0.875rem + 0.4vw, 1.0625rem)"},xl:{value:"clamp(1rem, 0.9375rem + 0.5vw, 1.1875rem)"},"2xl":{value:"clamp(1.125rem, 1rem + 0.6vw, 1.4375rem)"},"3xl":{value:"clamp(1.25rem, 1.125rem + 0.75vw, 1.625rem)"},"4xl":{value:"clamp(1.5rem, 1.25rem + 1vw, 2rem)"},"5xl":{value:"clamp(1.75rem, 1.5rem + 1.5vw, 2.5rem)"},"6xl":{value:"clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem)"}},fontWeights:{normal:{value:"400"},medium:{value:"500"},semibold:{value:"600"},bold:{value:"700"}},lineHeights:{none:{value:"1"},tight:{value:"1.1"},snug:{value:"1.2"},normal:{value:"1.3"},relaxed:{value:"1.4"},loose:{value:"1.6"}},letterSpacings:{tight:{value:"-0.01em"},normal:{value:"0em"},wide:{value:"0.05em"},wider:{value:"0.1em"}}},Co={display:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-6xl)",fontWeight:"var(--font-weight-bold)",lineHeight:"var(--line-height-tight)",letterSpacing:"var(--letter-spacing-tight)"}},h1:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-5xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-snug)",letterSpacing:"var(--letter-spacing-tight)"}},h2:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-normal)"}},h3:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-medium)",lineHeight:"var(--line-height-relaxed)"}},body:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-loose)"}},small:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-normal)"}},label:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-xs)",fontWeight:"var(--font-weight-medium)",letterSpacing:"var(--letter-spacing-wide)",textTransform:"uppercase"}},mono:{value:{fontFamily:"var(--font-mono)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)"}}},So={0:{value:"0px"},1:{value:"4px"},2:{value:"8px"},3:{value:"12px"},4:{value:"16px"},6:{value:"24px"},8:{value:"32px"},12:{value:"48px"},16:{value:"64px"},20:{value:"80px"},24:{value:"96px"},32:{value:"128px"},40:{value:"160px"},48:{value:"192px"}},Bo={none:{value:"0px"},badge:{value:"4px"},sm:{value:"4px"},md:{value:"8px"},card:{value:"12px"},lg:{value:"12px"},modal:{value:"16px"},xl:{value:"16px"},"2xl":{value:"20px"},"3xl":{value:"24px"},full:{value:"9999px"},circle:{value:"50%"}},Fo={xs:{value:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},sm:{value:"0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10)"},md:{value:"0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10)"},lg:{value:"0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.10)"},xl:{value:"0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.10)"},"card-dark":{value:"none"},"card-light":{value:"none"},none:{value:"none"}},Eo=s.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:_.blue,purple:_.purple,green:_.green,amber:_.amber,red:_.red,neutralLight:_.neutralLight,neutralDark:_.neutralDark}},fonts:ot.fonts,fontSizes:ot.fontSizes,fontWeights:ot.fontWeights,lineHeights:ot.lineHeights,letterSpacings:ot.letterSpacings,spacing:So,radii:Bo,shadows:Fo},semanticTokens:{colors:{"brand.solid":{value:{base:"{colors.brand.blue.500}",_dark:"{colors.brand.blue.500}"}},"brand.muted":{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},"brand.contrast":{value:{base:"#FFFFFF",_dark:"#FFFFFF"}},bg:{value:{base:"{colors.brand.neutralLight.bg}",_dark:"{colors.brand.neutralDark.bg}"}},"bg.subtle":{value:{base:"{colors.brand.neutralLight.bg2}",_dark:"{colors.brand.neutralDark.bg2}"}},"bg.surface":{value:{base:"{colors.brand.neutralLight.surface}",_dark:"{colors.brand.neutralDark.surface}"}},"text.heading":{value:{base:"{colors.brand.neutralLight.heading}",_dark:"{colors.brand.neutralDark.heading}"}},"text.body":{value:{base:"{colors.brand.neutralLight.body}",_dark:"{colors.brand.neutralDark.body}"}},"text.muted":{value:{base:"{colors.brand.neutralLight.muted}",_dark:"{colors.brand.neutralDark.muted}"}},border:{value:{base:"{colors.brand.neutralLight.border}",_dark:"{colors.brand.neutralDark.border}"}},"status.success":{value:{base:"{colors.brand.green.500}",_dark:"{colors.brand.green.500}"}},"status.success.tint":{value:{base:"{colors.brand.green.100}",_dark:"rgba(27, 122, 56, 0.2)"}},"status.warning":{value:{base:"{colors.brand.amber.500}",_dark:"{colors.brand.amber.500}"}},"status.warning.tint":{value:{base:"{colors.brand.amber.100}",_dark:"rgba(217, 119, 6, 0.2)"}},"status.error":{value:{base:"{colors.brand.red.500}",_dark:"{colors.brand.red.500}"}},"status.error.tint":{value:{base:"{colors.brand.red.100}",_dark:"rgba(220, 38, 38, 0.2)"}},blue:{50:{value:{base:"{colors.brand.blue.50}"}},100:{value:{base:"{colors.brand.blue.100}"}},200:{value:{base:"{colors.brand.blue.200}"}},300:{value:{base:"{colors.brand.blue.300}"}},400:{value:{base:"{colors.brand.blue.400}"}},500:{value:{base:"{colors.brand.blue.500}"}},600:{value:{base:"{colors.brand.blue.600}"}},700:{value:{base:"{colors.brand.blue.700}"}},800:{value:{base:"{colors.brand.blue.800}"}},900:{value:{base:"{colors.brand.blue.900}"}},solid:{value:{base:"{colors.brand.blue.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},subtle:{value:{base:"{colors.brand.blue.50}",_dark:"rgba(6, 133, 255, 0.1)"}},emphasized:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.800}"}},fg:{value:{base:"{colors.brand.blue.700}",_dark:"{colors.brand.blue.300}"}},focusRing:{value:{base:"{colors.brand.blue.500}"}}},purple:{50:{value:{base:"{colors.brand.purple.50}"}},100:{value:{base:"{colors.brand.purple.100}"}},500:{value:{base:"{colors.brand.purple.500}"}},600:{value:{base:"{colors.brand.purple.600}"}},solid:{value:{base:"{colors.brand.purple.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.purple.100}",_dark:"{colors.brand.purple.900}"}},subtle:{value:{base:"{colors.brand.purple.50}",_dark:"rgba(119, 0, 204, 0.1)"}},emphasized:{value:{base:"{colors.brand.purple.100}"}},fg:{value:{base:"{colors.brand.purple.700}",_dark:"{colors.brand.purple.300}"}},focusRing:{value:{base:"{colors.brand.purple.500}"}}}}},textStyles:Co}}),Lo=s.createSystem(s.defaultConfig,Eo),Kt={selection:10,impactLight:12,impactMedium:20,impactHeavy:[30,40,30],success:[10,30,20],warning:[20,40,20],error:[30,30,30],notification:15},tt={enabled:!0,respectReducedMotion:!0,patterns:Kt,strategy:"vibration",debug:!1};function vl(e){return e==="selection"||e==="impactLight"||e==="impactMedium"||e==="impactHeavy"||e==="success"||e==="warning"||e==="error"||e==="notification"}function gr(e){if(typeof e=="number")return!Number.isFinite(e)||e<=0?null:Math.round(e);if(!Array.isArray(e)||e.length===0)return null;const t=e.map(n=>Number.isFinite(n)?Math.max(0,Math.round(n)):0).filter((n,o,i)=>!(i.length===1&&i[0]===0));return t.length===0||!t.some(n=>n>0)?null:t}function Zt(e){return e===!1?{...tt,enabled:!1}:e===!0||e==null?{...tt}:{enabled:e.enabled??tt.enabled,respectReducedMotion:e.respectReducedMotion??tt.respectReducedMotion,patterns:{...Kt,...e.patterns??{}},strategy:e.strategy??tt.strategy,debug:e.debug??tt.debug}}function Xt(){return typeof navigator<"u"&&typeof navigator.vibrate=="function"}function Wn(){if(typeof window>"u"||typeof window.matchMedia!="function")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function Io(e,t){if(e===!1||e==null)return null;const n=To(t)?t:Zt(t);return typeof e=="string"?vl(e)?gr(n.patterns[e]??Kt[e]):null:gr(e)}function To(e){return!!e&&typeof e=="object"&&"patterns"in e&&"enabled"in e&&Array.isArray(e.patterns)===!1}function qn(){if(Xt())try{navigator.vibrate(0)}catch{}}function Vn(e,t){const n=To(t==null?void 0:t.config)?t.config:Zt(t==null?void 0:t.config);if(!n.enabled||n.strategy==="none"||typeof window>"u"||!Xt()||!(t!=null&&t.force)&&n.respectReducedMotion&&Wn())return!1;const o=Io(e,n);if(o==null)return!1;try{const i=navigator.vibrate(o);return n.debug&&typeof console<"u"&&console.debug("[medixdeck:haptics]",{input:e,pattern:o,ok:i}),!!i}catch{return!1}}function kl(e){return e==="ghost"||e==="link"?"impactLight":"impactMedium"}const mr=Zt(!0),Do=U.createContext({config:mr,trigger:e=>Vn(e,{config:mr}),cancel:qn});function wl(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};try{const t=window.matchMedia("(prefers-reduced-motion: reduce)");return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}catch{return()=>{}}}function Ao({haptics:e,children:t}){const n=U.useMemo(()=>Zt(e),[e]),o=U.useCallback(a=>Vn(a,{config:n}),[n]),i=U.useCallback(()=>qn(),[]),l=U.useMemo(()=>({config:n,trigger:o,cancel:i}),[n,o,i]);return r.jsx(Do.Provider,{value:l,children:t})}function de(){const e=U.useContext(Do),t=U.useSyncExternalStore(wl,Wn,()=>!1),n=typeof navigator<"u"&&Xt(),o=e.config.enabled&&e.config.strategy!=="none"&&n&&!(e.config.respectReducedMotion&&t);return{isSupported:n,isEnabled:o,trigger:e.trigger,cancel:e.cancel,config:e.config}}const jl={info:{bg:"rgba(6, 133, 255, 0.08)",border:"rgba(6, 133, 255, 0.3)",color:"#0685FF",icon:"ℹ"},success:{bg:"rgba(27, 122, 56, 0.08)",border:"rgba(27, 122, 56, 0.3)",color:"#1B7A38",icon:"✓"},warning:{bg:"rgba(217, 119, 6, 0.08)",border:"rgba(217, 119, 6, 0.3)",color:"#D97706",icon:"⚠"},error:{bg:"rgba(220, 38, 38, 0.08)",border:"rgba(220, 38, 38, 0.3)",color:"#DC2626",icon:"✕"}},$n=I.default.forwardRef(({status:e="info",variant:t="subtle",title:n,description:o,icon:i,onClose:l,closable:a=!1,haptic:c,disableHaptic:d=!1,children:u,...f},h)=>{const{trigger:x}=de(),p=jl[e],b=t==="solid"?p.color:p.bg,v=t==="solid"?"white":"inherit",B=t==="left-accent"?`4px solid ${p.color}`:void 0,y=t==="subtle"?`1px solid ${p.border}`:void 0;return r.jsxs(s.Box,{ref:h,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:b,border:y,borderLeft:B,color:v,...f,children:[r.jsx(s.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":p.color,color:"white",mt:"0.5",children:i??p.icon}),r.jsxs(s.Box,{flex:"1",children:[n&&r.jsx(s.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":p.color,children:n}),o&&r.jsx(s.Box,{mt:n?"0.5":"0",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"rgba(255,255,255,0.85)":"text.body",lineHeight:"1.5",children:o}),u]}),a&&r.jsx(s.Box,{as:"button",flexShrink:0,w:"6",h:"6",border:"none",bg:"transparent",cursor:"pointer",color:t==="solid"?"rgba(255,255,255,0.7)":"text.muted",fontSize:"lg",lineHeight:"1",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"sm",_hover:{color:t==="solid"?"white":"text.heading"},onClick:()=>{!d&&c!==!1&&x(c??"impactLight"),l==null||l()},"aria-label":"Dismiss alert",children:"×"})]})});$n.displayName="MedixAlert";if(typeof document<"u"){const e="medix-toast-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=`
2
2
  @keyframes medixToastProgress {
3
3
  from { transform: scaleX(1); }
4
4
  to { transform: scaleX(0); }
5
5
  }
6
- `,document.head.appendChild(t)}}const lt=s.createToaster({placement:"bottom-end",pauseOnPageIdle:!0,overlap:!0,gap:16,duration:4e3,removeDelay:200}),yt=Object.assign(e=>lt.create({title:e.title,description:e.description,type:e.type||"info",duration:e.duration??4e3,meta:{...e.haptic!==void 0?{haptic:e.haptic}:{},...e.disableHaptic!==void 0?{disableHaptic:e.disableHaptic}:{}}}),{success:(e,t)=>yt({title:e,type:"success",...t}),error:(e,t)=>yt({title:e,type:"error",...t}),info:(e,t)=>yt({title:e,type:"info",...t}),warning:(e,t)=>yt({title:e,type:"warning",...t})}),Cl=e=>lt.dismiss(e),Sl={success:"#16A34A",error:"#DC2626",warning:"#D97706",info:"#0685FF"},on=new Set;function Bl(e){switch(e){case"success":return"success";case"error":return"error";case"warning":return"warning";case"info":default:return"notification"}}function Fl({toast:e}){var d,p,x;const[t,n]=U.useState(!1),{trigger:o}=de(),i=((d=e.meta)==null?void 0:d.variant)||"subtle",l=e.duration??4e3,a=e.type||"info",c=Sl[a]||"#0685FF";U.useEffect(()=>{var F,y;const h=e==null?void 0:e.id;if(!h||on.has(h))return;const b=((F=e==null?void 0:e.meta)==null?void 0:F.disableHaptic)===!0,v=(y=e==null?void 0:e.meta)==null?void 0:y.haptic;if(b||v===!1){on.add(h);return}on.add(h),o(v??Bl(a))},[e==null?void 0:e.id,(p=e==null?void 0:e.meta)==null?void 0:p.disableHaptic,(x=e==null?void 0:e.meta)==null?void 0:x.haptic,a,o]);const f=()=>{n(!0),lt.pause(e.id)},u=()=>{n(!1),lt.resume(e.id)};return r.jsxs(s.ToastRoot,{bg:"bg.surface",p:"0",border:"none",borderRadius:"md",w:{base:"full",sm:"fit-content"},minW:{sm:"350px"},maxW:{base:"full",sm:"400px"},boxShadow:"none",pointerEvents:"auto",overflow:"hidden",position:"relative",onMouseEnter:f,onMouseLeave:u,children:[r.jsxs($n,{status:a,variant:i,title:typeof e.title=="string"?e.title:void 0,description:typeof e.description=="string"?e.description:void 0,closable:!0,onClose:()=>lt.dismiss(e.id),boxShadow:"none",w:"100%",children:[typeof e.title!="string"&&e.title,typeof e.description!="string"&&e.description]}),l!==1/0&&r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",bottom:0,left:0,height:"3px",width:"100%",backgroundColor:c,opacity:.9,transformOrigin:"left",animationName:"medixToastProgress",animationDuration:`${l}ms`,animationTimingFunction:"linear",animationFillMode:"forwards",animationPlayState:t?"paused":"running"}})]},e.id)}const zo=()=>r.jsx(s.Toaster,{toaster:lt,insetInline:{base:"4",md:"4"},insetBlock:{base:"4",md:"4"},pointerEvents:"none",children:e=>r.jsx(Fl,{toast:e},e.id)});function El(e,t){return`(function(defaultMode,forcedMode){
6
+ `,document.head.appendChild(t)}}const lt=s.createToaster({placement:"bottom-end",pauseOnPageIdle:!0,overlap:!0,gap:16,duration:4e3,removeDelay:200}),yt=Object.assign(e=>lt.create({title:e.title,description:e.description,type:e.type||"info",duration:e.duration??4e3,meta:{...e.haptic!==void 0?{haptic:e.haptic}:{},...e.disableHaptic!==void 0?{disableHaptic:e.disableHaptic}:{}}}),{success:(e,t)=>yt({title:e,type:"success",...t}),error:(e,t)=>yt({title:e,type:"error",...t}),info:(e,t)=>yt({title:e,type:"info",...t}),warning:(e,t)=>yt({title:e,type:"warning",...t})}),Cl=e=>lt.dismiss(e),Sl={success:"#16A34A",error:"#DC2626",warning:"#D97706",info:"#0685FF"},on=new Set;function Bl(e){switch(e){case"success":return"success";case"error":return"error";case"warning":return"warning";case"info":default:return"notification"}}function Fl({toast:e}){var f,h,x;const[t,n]=U.useState(!1),{trigger:o}=de(),i=((f=e.meta)==null?void 0:f.variant)||"subtle",l=e.duration??4e3,a=e.type||"info",c=Sl[a]||"#0685FF";U.useEffect(()=>{var B,y;const p=e==null?void 0:e.id;if(!p||on.has(p))return;const b=((B=e==null?void 0:e.meta)==null?void 0:B.disableHaptic)===!0,v=(y=e==null?void 0:e.meta)==null?void 0:y.haptic;if(b||v===!1){on.add(p);return}on.add(p),o(v??Bl(a))},[e==null?void 0:e.id,(h=e==null?void 0:e.meta)==null?void 0:h.disableHaptic,(x=e==null?void 0:e.meta)==null?void 0:x.haptic,a,o]);const d=()=>{n(!0),lt.pause(e.id)},u=()=>{n(!1),lt.resume(e.id)};return r.jsxs(s.ToastRoot,{bg:"bg.surface",p:"0",border:"none",borderRadius:"md",w:{base:"full",sm:"fit-content"},minW:{sm:"350px"},maxW:{base:"full",sm:"400px"},boxShadow:"none",pointerEvents:"auto",overflow:"hidden",position:"relative",onMouseEnter:d,onMouseLeave:u,children:[r.jsxs($n,{status:a,variant:i,title:typeof e.title=="string"?e.title:void 0,description:typeof e.description=="string"?e.description:void 0,closable:!0,onClose:()=>lt.dismiss(e.id),boxShadow:"none",w:"100%",children:[typeof e.title!="string"&&e.title,typeof e.description!="string"&&e.description]}),l!==1/0&&r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",bottom:0,left:0,height:"3px",width:"100%",backgroundColor:c,opacity:.9,transformOrigin:"left",animationName:"medixToastProgress",animationDuration:`${l}ms`,animationTimingFunction:"linear",animationFillMode:"forwards",animationPlayState:t?"paused":"running"}})]},e.id)}const zo=()=>r.jsx(s.Toaster,{toaster:lt,insetInline:{base:"4",md:"4"},insetBlock:{base:"4",md:"4"},pointerEvents:"none",children:e=>r.jsx(Fl,{toast:e},e.id)});function El(e,t){return`(function(defaultMode,forcedMode){
7
7
  var setting=forcedMode;
8
8
  if(!setting){
9
9
  try{setting=window.localStorage.getItem("theme");}catch(error){}
@@ -155,18 +155,18 @@
155
155
  @keyframes medix-spin {
156
156
  to { transform: rotate(360deg); }
157
157
  }
158
- `;let br=!1,yr=!1;function Tl(){if(typeof document>"u"||br)return;["https://api.fontshare.com","https://fonts.googleapis.com","https://fonts.gstatic.com"].forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="preconnect",n.href=t,t.includes("gstatic")&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}),Ll.forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="stylesheet",n.href=t,document.head.appendChild(n)}),br=!0}function Dl(){if(typeof document>"u"||yr)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=Il,document.head.insertBefore(e,document.head.firstChild),yr=!0}function Al({children:e,defaultColorMode:t="system",forcedColorMode:n,haptics:o=!0}){return I.default.useEffect(()=>{Tl(),Dl()},[]),r.jsxs(jo.ThemeProvider,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,scriptProps:{type:"text/plain",id:"medixdeck-inactive-theme-bootstrap"},children:[r.jsx("script",{"data-medixdeck":"theme-bootstrap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:El(t,n)}}),r.jsx(s.ChakraProvider,{value:Lo,children:r.jsxs(Ao,{haptics:o,children:[e,r.jsx(zo,{})]})})]})}function zl(e){if(typeof document>"u")return()=>{};const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.body&&t.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()}function Rl(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")||document.body.classList.contains("dark")}function St(){const{resolvedTheme:e,setTheme:t,theme:n}=jo.useTheme(),[o,i]=U.useState(!1),l=U.useSyncExternalStore(zl,Rl,()=>!1);U.useEffect(()=>{i(!0)},[]);const c=o&&(e==="dark"||l)?"dark":"light",f=o&&(n==="light"||n==="dark"||n==="system")?n:"system",u=U.useCallback(p=>{t(p)},[t]),d=U.useCallback(()=>{t(c==="dark"?"light":"dark")},[t,c]);return{mounted:o,themeMode:c,themeSetting:f,setThemeMode:u,toggleThemeMode:d}}function Un(){const{themeMode:e}=St();return e==="dark"}function Ml(e="blue"){const[t,n]=U.useState(e),o=U.useCallback(l=>{n(l)},[]),i=U.useCallback(()=>{n(l=>l==="blue"?"purple":"blue")},[]);return{colorScheme:t,setColorScheme:o,toggleColorScheme:i,isBlue:t==="blue",isPurple:t==="purple"}}const vr={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF",fgHover:"#0562C2"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC",fgHover:"#550099"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38",fgHover:"#125429"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626",fgHover:"#AC1919"},amber:{solid:"#D97706",solidHover:"#C26905",solidActive:"#A85B04",tint:"#FFFBEB",tintHover:"#FEF3C7",fg:"#D97706",fgHover:"#A85B04"},black:{solid:"#111926",solidHover:"#0D131D",solidActive:"#000000",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#111926",fgHover:"#000000"},gray:{solid:"#4B5563",solidHover:"#374151",solidActive:"#1F2937",tint:"#F9FAFB",tintHover:"#F3F4F6",fg:"#4B5563",fgHover:"#1F2937"}},kr={xs:{height:"28px",px:"12px",fontSize:"11px"},sm:{height:"32px",px:"14px",fontSize:"13px"},md:{height:"40px",px:"18px",fontSize:"14px"},lg:{height:"48px",px:"24px",fontSize:"16px"}},Se=I.default.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:o=!1,leftIcon:i,rightIcon:l,disabled:a,haptic:c,disableHaptic:f=!1,children:u,style:d,as:p="button",href:x,target:h,rel:b,...v},F)=>{const{trigger:y}=de(),j=vr[n]??vr.blue,C=kr[t]??kr.md,S={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:C.height,paddingLeft:C.px,paddingRight:C.px,fontSize:C.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:a||o?"not-allowed":"pointer",opacity:a||o?.55:1,outline:"none",textDecoration:"none",whiteSpace:"nowrap",userSelect:"none",WebkitTapHighlightColor:"transparent",transition:"background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease"};let B={};switch(e){case"solid":B={background:j.solid,color:"#FFFFFF"};break;case"outline":B={background:"transparent",color:j.fg,border:`1.5px solid ${j.solid}`};break;case"ghost":B={background:"transparent",color:j.fg,border:"none"};break;case"secondary":B={background:j.tint,color:j.fg,border:"none"};break;case"link":B={background:"transparent",color:j.fg,border:"none",padding:0,height:"auto",fontSize:C.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[w,D]=I.default.useState(!1),[E,A]=I.default.useState(!1);let M={};if((w||E)&&!a&&!o)switch(e){case"solid":M={background:E?j.solidActive:j.solidHover,boxShadow:"none"};break;case"outline":M={background:j.tint,color:j.fgHover};break;case"ghost":M={background:j.tint};break;case"secondary":M={background:j.tintHover};break;case"link":M={color:j.fgHover};break}const z={...S,...B,...M,...d},T=!!(a||o),W=p==="button",R=!W&&T;return r.jsx(p,{ref:F,type:W?v.type??"button":void 0,href:R?void 0:x,target:R?void 0:h,rel:R?void 0:b,tabIndex:R?-1:v.tabIndex,disabled:W?T:void 0,style:z,onMouseEnter:()=>D(!0),onMouseLeave:()=>{D(!1),A(!1)},onMouseDown:()=>A(!0),onMouseUp:()=>A(!1),onFocus:k=>{k.currentTarget.style.boxShadow="none"},onBlur:k=>{k.currentTarget.style.boxShadow="none"},...v,"aria-disabled":!W&&T?!0:v["aria-disabled"],onClick:k=>{var P;if(!W&&T){k.preventDefault(),k.stopPropagation();return}!f&&c!==!1&&!T&&y(c??kl(e)),(P=v.onClick)==null||P.call(v,k)},children:o?r.jsx(s.Box,{as:"span",display:"inline-block",w:"1em",h:"1em",borderRadius:"full",border:"2px solid currentColor",borderTopColor:"transparent",style:{animation:"medix-spin 0.65s linear infinite"}}):r.jsxs(r.Fragment,{children:[i&&r.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:i}),u,l&&r.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:l})]})})});Se.displayName="MedixButton";const Ol={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626"},gray:{solid:"#6B7280",solidHover:"#4B5563",solidActive:"#374151",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#374151"}},Nl={xs:{width:24,height:24,fontSize:12,borderRadius:6},sm:{width:28,height:28,fontSize:14,borderRadius:6},md:{width:36,height:36,fontSize:16,borderRadius:8},lg:{width:44,height:44,fontSize:18,borderRadius:8}},Ro=I.default.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:o=!1,disabled:i,haptic:l,disableHaptic:a=!1,children:c,style:f,onClick:u,...d},p)=>{const{trigger:x}=de(),h=Ol[n],b=Nl[t],[v,F]=I.default.useState(!1),[y,j]=I.default.useState(!1);let C;switch(e){case"solid":C={background:v?y?h.solidActive:h.solidHover:h.solid,color:"#fff"};break;case"outline":C={background:v?h.tint:"transparent",color:h.fg,border:`1.5px solid ${h.solid}`};break;case"ghost":default:C={background:v?h.tint:"transparent",color:h.fg};break}return r.jsx("button",{ref:p,type:d.type??"button",disabled:i,onClick:S=>{!i&&!a&&l!==!1&&x(l??"impactLight"),u==null||u(S)},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:i?"not-allowed":"pointer",opacity:i?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...b,...o?{borderRadius:"50%"}:{},...C,...f},onMouseEnter:()=>F(!0),onMouseLeave:()=>{F(!1),j(!1)},onMouseDown:()=>j(!0),onMouseUp:()=>j(!1),onFocus:S=>{S.currentTarget.style.boxShadow="none"},onBlur:S=>{S.currentTarget.style.boxShadow="none"},...d,children:c})});Ro.displayName="MedixIconButton";const Pl={success:{solid:"#1B7A38",solidText:"#fff",tint:"#DCFCE7",tintText:"#1B7A38",border:"#1B7A38"},warning:{solid:"#D97706",solidText:"#fff",tint:"#FEF3C7",tintText:"#B45309",border:"#D97706"},error:{solid:"#DC2626",solidText:"#fff",tint:"#FFE4E6",tintText:"#B91C1C",border:"#DC2626"},info:{solid:"#0685FF",solidText:"#fff",tint:"#E8F3FF",tintText:"#0562C2",border:"#0685FF"},neutral:{solid:"#6B7280",solidText:"#fff",tint:"#F3F4F6",tintText:"#374151",border:"#9CA3AF"}},_l={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px",dotSize:6,gap:4},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px",dotSize:7,gap:5},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px",dotSize:8,gap:6}},Gn=I.default.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",rounded:o,showDot:i=!0,children:l,style:a,...c},f)=>{const u=Pl[t],d=_l[n];let p,x,h="1px solid transparent";switch(e){case"solid":p=u.solid,x=u.solidText;break;case"outline":p="transparent",x=u.tintText,h=`1px solid ${u.border}`;break;case"surface":p=u.tint,x=u.tintText,h=`1px solid ${u.border}20`;break;case"subtle":default:p=u.tint,x=u.tintText;break}const b=e==="solid"?u.solidText:u.solid,v={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:i?d.gap:0,fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:o?"100px":4,border:h,background:p,color:x,whiteSpace:"nowrap",padding:d.padding,fontSize:d.fontSize,lineHeight:d.lineHeight,...a};return r.jsxs("span",{ref:f,style:v,...c,children:[i&&r.jsx("span",{"aria-hidden":"true",style:{width:d.dotSize,height:d.dotSize,borderRadius:"50%",background:b,flexShrink:0,display:"inline-block"}}),l]})});Gn.displayName="MedixBadge";const Mo={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},Jt=I.default.forwardRef(({src:e,name:t,size:n="md",showStatus:o=!1,statusColor:i="green",...l},a)=>r.jsxs(s.Avatar.Root,{ref:a,size:Mo[n],position:"relative",...l,children:[r.jsx(s.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&r.jsx(s.Avatar.Image,{src:e,alt:t??""}),o&&r.jsx(s.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));Jt.displayName="MedixAvatar";function Hl({children:e,max:t,size:n="md"}){const o=I.default.Children.toArray(e),i=t?o.slice(0,t):o,l=t?Math.max(0,o.length-t):0,a=Mo[n];return r.jsxs(s.Box,{display:"flex",alignItems:"center",children:[i.map((c,f)=>r.jsx(s.Box,{ml:f===0?"0":"-2",position:"relative",zIndex:i.length-f,children:I.default.isValidElement(c)?I.default.cloneElement(c,{size:n}):c},f)),l>0&&r.jsxs(s.Box,{ml:"-2",w:a==="sm"?"8":a==="lg"?"12":"10",h:a==="sm"?"8":a==="lg"?"12":"10",borderRadius:"full",bg:"bg.surface",border:"2px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:["+",l]})]})}function Oo({size:e="md",label:t,color:n="blue.500",...o}){return r.jsxs(s.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[r.jsx(s.Spinner,{size:e,color:n,borderWidth:"2px",...o}),t&&r.jsx(s.Text,{textStyle:"small",color:"text.muted",children:t})]})}function Wl({label:e}){return r.jsx(s.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:r.jsx(Oo,{size:"xl",label:e??"Loading…"})})}const No=I.default.forwardRef(({variant:e="subtle",colorScheme:t="blue",showDot:n=!0,onClose:o,children:i,...l},a)=>{const c=e==="solid"?"white":`${t}.500`;return r.jsxs(s.Box,{ref:a,as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:"2.5",py:"1",borderRadius:"full",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:e==="outline"?`${t}.400`:"transparent",bg:e==="solid"?`${t}.500`:e==="subtle"?`${t}.100`:"transparent",color:e==="solid"?"white":`${t}.700`,transition:"all 0.15s",cursor:o?"default":void 0,...l,children:[n&&r.jsx(s.Box,{as:"span","aria-hidden":"true",w:"6px",h:"6px",borderRadius:"full",bg:c,flexShrink:0}),i,o&&r.jsx(s.Box,{as:"button",onClick:o,ml:"0.5",opacity:.7,_hover:{opacity:1},lineHeight:"1",fontSize:"md",cursor:"pointer",border:"none",bg:"transparent",padding:"0",display:"inline-flex",alignItems:"center",children:"×"})]})});No.displayName="MedixTag";const Po=I.default.forwardRef(({orientation:e="horizontal",label:t,...n},o)=>t?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[r.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),r.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-body)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),r.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):r.jsx(s.Separator,{ref:o,orientation:e,borderColor:"border",...n}));Po.displayName="MedixDivider";const ql="M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490 225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88C178,1979.437 199.437,1958 225.88,1958L662.12,1958C688.563,1958 710,1979.437 710,2005.88L710,2229.103C705.9,2213.585 701.763,2198.117 697.603,2182.745C695.811,2176.086 692.135,2162.841 690.354,2156.167L686.684,2142.89C684.779,2136.191 679.606,2130.414 672.464,2128.176C661.192,2124.644 649.192,2130.918 645.661,2142.189C645.656,2142.2 640.542,2158.554 640.531,2158.562C621.999,2218.218 603.451,2279.044 585.808,2338.903C584.671,2342.744 583.273,2347.499 581.74,2352.732C581.67,2352.969 581.458,2353.137 581.212,2353.15C580.965,2353.163 580.736,2353.019 580.642,2352.79C564.661,2314.068 548.29,2275.087 532.023,2237.116C528.352,2226.577 513.846,2225.401 508.748,2235.524L500.846,2251.532C494.027,2265.509 486.438,2280.793 479.597,2295.008C479.597,2295.008 436.069,2383.443 431.51,2392.706C431.286,2393.161 431.413,2393.711 431.814,2394.021C433.263,2395.142 436.626,2397.742 438.275,2399.017C438.515,2399.203 438.824,2399.277 439.123,2399.222C439.422,2399.166 439.683,2398.985 439.84,2398.725C445.834,2388.818 493.319,2310.326 493.684,2309.731C500.84,2297.999 508.653,2285.339 516.051,2273.133C516.168,2272.939 516.387,2272.831 516.613,2272.856C516.838,2272.881 517.028,2273.034 517.101,2273.248C528.203,2306.041 540.617,2341.984 551.933,2374.266C556.929,2388.443 561.912,2402.625 566.966,2416.781C568.806,2421.847 572.884,2426.143 578.389,2427.989C588.248,2431.333 598.92,2425.683 601.835,2415.722L612.744,2383.232C630.147,2331.149 647.399,2278.183 664.218,2225.484C664.314,2225.186 664.593,2224.985 664.906,2224.99C665.219,2224.994 665.493,2225.203 665.579,2225.504C668.949,2237.233 672.331,2248.892 675.679,2260.287C685.796,2294.879 696.817,2331.451 707.457,2365.829C708.016,2368.018 708.889,2369.95 710,2371.619L710,2442.12C710,2468.563 688.563,2490 662.12,2490L477.453,2490C477.156,2490 476.867,2489.902 476.631,2489.722C457.299,2474.985 438.453,2459.752 421.161,2443.298C412.607,2435.236 403.479,2425.986 395.548,2417.282C379.508,2399.804 364.42,2381.572 352.559,2361.076C326.4,2316.618 312.562,2264.49 315.392,2212.886C316.216,2200.363 317.83,2187.671 320.751,2175.467C321.065,2174.238 321.893,2170.686 322.182,2169.527C322.553,2168.204 323.549,2165.048 323.922,2163.655C351.204,2075.514 443.187,2010.628 535.637,2015.16C561.342,2016.889 586.119,2025.438 609.443,2036.154C637.886,2049.35 664.476,2066.31 689.615,2085.03L693.462,2087.898L693.505,2087.932C695.324,2089.292 697.896,2089.328 699.78,2087.862C702.032,2086.104 702.434,2082.852 700.679,2080.598C686.502,2062.447 670.231,2045.755 652.687,2030.749C621.192,2004.201 584.741,1981.815 543.918,1973.331C465.886,1958.184 383.437,1988.87 327.543,2043.897C308.123,2063.018 291.777,2085.124 279.269,2109.433C278.071,2111.881 275.685,2116.914 274.502,2119.362C272.958,2122.749 271.137,2127.369 269.669,2130.806C267.99,2135.574 266.054,2140.322 264.652,2145.186L263.037,2150.496L262.236,2153.154L261.556,2155.849C260.836,2159.042 259.531,2163.44 258.978,2166.617C255.952,2180.668 254.15,2195.197 253.377,2209.543C251.4,2248.711 257.554,2288.211 270.508,2325.184C282.242,2358.498 299.504,2389.917 321.541,2417.523C328.923,2426.794 337.487,2436.055 345.675,2444.555C353.486,2452.676 362.788,2461.68 371.226,2469.229C378.696,2475.993 386.419,2482.518 394.335,2488.823Z",Vl="M46.32 25H44.016V7.648H46.32L52.296 22.24L58.272 7.648H60.624V25H58.32V18.136C58.32 14.896 58.344 13.72 58.464 12.496L53.4 25H51.192L46.152 12.544C46.272 13.384 46.32 15.16 46.32 17.584V25ZM69.3444 25.288C65.8884 25.288 63.5124 22.792 63.5124 19.144C63.5124 15.472 65.8404 12.928 69.2484 12.928C72.5844 12.928 74.7684 15.232 74.7684 18.712V19.552L65.6964 19.576C65.8644 22.048 67.1604 23.416 69.3924 23.416C71.1444 23.416 72.2964 22.696 72.6804 21.352H74.7924C74.2164 23.872 72.2484 25.288 69.3444 25.288ZM69.2484 14.824C67.2804 14.824 66.0324 16 65.7444 18.064H72.5124C72.5124 16.12 71.2404 14.824 69.2484 14.824Z M81.9922 25.288C78.5843 25.288 76.5203 22.744 76.5203 19.168C76.5203 15.568 78.6083 12.928 82.0883 12.928C83.8883 12.928 85.4003 13.72 86.1923 15.16V7.336H88.4243V25H86.4083L86.2163 22.864C85.4483 24.472 83.8643 25.288 81.9922 25.288ZM82.4483 23.248C84.7523 23.248 86.1683 21.544 86.1683 19.096C86.1683 16.696 84.7523 14.968 82.4483 14.968C80.1443 14.968 78.8003 16.696 78.8003 19.096C78.8003 21.52 80.1443 23.248 82.4483 23.248Z M92.7829 10.48C91.9669 10.48 91.2949 9.808 91.2949 8.992C91.2949 8.152 91.9669 7.504 92.7829 7.504C93.5989 7.504 94.2709 8.152 94.2709 8.992C94.2709 9.808 93.5989 10.48 92.7829 10.48Z M91.6789 25V13.264H93.9349V25H91.6789Z M98.4101 25H95.8181L99.9221 19.192L95.8421 13.264H98.4581L101.434 17.632L104.338 13.264H106.906L102.826 19.192L106.834 25H104.218L101.29 20.704L98.4101 25Z M114.908 25H109.172V7.648H114.812C119.996 7.648 123.5 11.152 123.5 16.336C123.5 21.496 120.044 25 114.908 25ZM114.644 9.808H111.524V22.816H114.74C118.604 22.816 121.052 20.32 121.052 16.336C121.052 12.304 118.604 9.808 114.644 9.808Z M131.173 25.288C127.717 25.288 125.341 22.792 125.341 19.144C125.341 15.472 127.669 12.928 131.077 12.928C134.413 12.928 136.597 15.232 136.597 18.712V19.552L127.525 19.576C127.693 22.048 128.989 23.416 131.221 23.416C132.973 23.416 134.125 22.696 134.509 21.352H136.621C136.045 23.872 134.077 25.288 131.173 25.288ZM131.077 14.824C129.109 14.824 127.861 16 127.573 18.064H134.341C134.341 16.12 133.069 14.824 131.077 14.824Z M138.348 19.144C138.348 15.472 140.676 12.928 144.108 12.928C147.06 12.928 149.124 14.608 149.532 17.224H147.276C146.892 15.736 145.692 14.944 144.18 14.944C142.044 14.944 140.58 16.576 140.58 19.12C140.58 21.64 141.948 23.272 144.084 23.272C145.692 23.272 146.892 22.432 147.3 21.04H149.556C149.1 23.584 146.916 25.288 144.084 25.288C140.628 25.288 138.348 22.84 138.348 19.144Z M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z";function $l({variant:e,type:t,height:n,markColor:o,textColor:i,downloadFileName:l}){if(typeof window>"u")return;const a=4,c=532,f=44,u=119,d=32,p=n,x=Math.round(n*.3),h=t==="full"?Math.round(u*(n/d)):0,v=(t==="full"?p+x+h:p)*a,F=n*a,y=p*a/c,j=F/d,C=`
159
- <svg xmlns="http://www.w3.org/2000/svg" width="${v}" height="${F}" viewBox="0 0 ${v} ${F}">
158
+ `;let br=!1,yr=!1;function Tl(){if(typeof document>"u"||br)return;["https://api.fontshare.com","https://fonts.googleapis.com","https://fonts.gstatic.com"].forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="preconnect",n.href=t,t.includes("gstatic")&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}),Ll.forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="stylesheet",n.href=t,document.head.appendChild(n)}),br=!0}function Dl(){if(typeof document>"u"||yr)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=Il,document.head.insertBefore(e,document.head.firstChild),yr=!0}function Al({children:e,defaultColorMode:t="system",forcedColorMode:n,haptics:o=!0}){return I.default.useEffect(()=>{Tl(),Dl()},[]),r.jsxs(jo.ThemeProvider,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,scriptProps:{type:"text/plain",id:"medixdeck-inactive-theme-bootstrap"},children:[r.jsx("script",{"data-medixdeck":"theme-bootstrap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:El(t,n)}}),r.jsx(s.ChakraProvider,{value:Lo,children:r.jsxs(Ao,{haptics:o,children:[e,r.jsx(zo,{})]})})]})}function zl(e){if(typeof document>"u")return()=>{};const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.body&&t.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()}function Rl(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")||document.body.classList.contains("dark")}function St(){const{resolvedTheme:e,setTheme:t,theme:n}=jo.useTheme(),[o,i]=U.useState(!1),l=U.useSyncExternalStore(zl,Rl,()=>!1);U.useEffect(()=>{i(!0)},[]);const c=o&&(e==="dark"||l)?"dark":"light",d=o&&(n==="light"||n==="dark"||n==="system")?n:"system",u=U.useCallback(h=>{t(h)},[t]),f=U.useCallback(()=>{t(c==="dark"?"light":"dark")},[t,c]);return{mounted:o,themeMode:c,themeSetting:d,setThemeMode:u,toggleThemeMode:f}}function Un(){const{themeMode:e}=St();return e==="dark"}function Ml(e="blue"){const[t,n]=U.useState(e),o=U.useCallback(l=>{n(l)},[]),i=U.useCallback(()=>{n(l=>l==="blue"?"purple":"blue")},[]);return{colorScheme:t,setColorScheme:o,toggleColorScheme:i,isBlue:t==="blue",isPurple:t==="purple"}}const vr={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF",fgHover:"#0562C2"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC",fgHover:"#550099"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38",fgHover:"#125429"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626",fgHover:"#AC1919"},amber:{solid:"#D97706",solidHover:"#C26905",solidActive:"#A85B04",tint:"#FFFBEB",tintHover:"#FEF3C7",fg:"#D97706",fgHover:"#A85B04"},black:{solid:"#111926",solidHover:"#0D131D",solidActive:"#000000",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#111926",fgHover:"#000000"},gray:{solid:"#4B5563",solidHover:"#374151",solidActive:"#1F2937",tint:"#F9FAFB",tintHover:"#F3F4F6",fg:"#4B5563",fgHover:"#1F2937"}},kr={xs:{height:"28px",px:"12px",fontSize:"11px"},sm:{height:"32px",px:"14px",fontSize:"13px"},md:{height:"40px",px:"18px",fontSize:"14px"},lg:{height:"48px",px:"24px",fontSize:"16px"}},Be=I.default.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:o=!1,leftIcon:i,rightIcon:l,disabled:a,haptic:c,disableHaptic:d=!1,children:u,style:f,as:h="button",href:x,target:p,rel:b,...v},B)=>{const{trigger:y}=de(),S=vr[n]??vr.blue,j=kr[t]??kr.md,C={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:j.height,paddingLeft:j.px,paddingRight:j.px,fontSize:j.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:a||o?"not-allowed":"pointer",opacity:a||o?.55:1,outline:"none",textDecoration:"none",whiteSpace:"nowrap",userSelect:"none",WebkitTapHighlightColor:"transparent",transition:"background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease"};let F={};switch(e){case"solid":F={background:S.solid,color:"#FFFFFF"};break;case"outline":F={background:"transparent",color:S.fg,border:`1.5px solid ${S.solid}`};break;case"ghost":F={background:"transparent",color:S.fg,border:"none"};break;case"secondary":F={background:S.tint,color:S.fg,border:"none"};break;case"link":F={background:"transparent",color:S.fg,border:"none",padding:0,height:"auto",fontSize:j.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[w,D]=I.default.useState(!1),[E,z]=I.default.useState(!1);let N={};if((w||E)&&!a&&!o)switch(e){case"solid":N={background:E?S.solidActive:S.solidHover,boxShadow:"none"};break;case"outline":N={background:S.tint,color:S.fgHover};break;case"ghost":N={background:S.tint};break;case"secondary":N={background:S.tintHover};break;case"link":N={color:S.fgHover};break}const R={...C,...F,...N,...f},T=!!(a||o),q=h==="button",M=!q&&T;return r.jsx(h,{ref:B,type:q?v.type??"button":void 0,href:M?void 0:x,target:M?void 0:p,rel:M?void 0:b,tabIndex:M?-1:v.tabIndex,disabled:q?T:void 0,style:R,onMouseEnter:()=>D(!0),onMouseLeave:()=>{D(!1),z(!1)},onMouseDown:()=>z(!0),onMouseUp:()=>z(!1),onFocus:k=>{k.currentTarget.style.boxShadow="none"},onBlur:k=>{k.currentTarget.style.boxShadow="none"},...v,"aria-disabled":!q&&T?!0:v["aria-disabled"],onClick:k=>{var P;if(!q&&T){k.preventDefault(),k.stopPropagation();return}!d&&c!==!1&&!T&&y(c??kl(e)),(P=v.onClick)==null||P.call(v,k)},children:o?r.jsx(s.Box,{as:"span",display:"inline-block",w:"1em",h:"1em",borderRadius:"full",border:"2px solid currentColor",borderTopColor:"transparent",style:{animation:"medix-spin 0.65s linear infinite"}}):r.jsxs(r.Fragment,{children:[i&&r.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:i}),u,l&&r.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:l})]})})});Be.displayName="MedixButton";const Ol={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626"},gray:{solid:"#6B7280",solidHover:"#4B5563",solidActive:"#374151",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#374151"}},Nl={xs:{width:24,height:24,fontSize:12,borderRadius:6},sm:{width:28,height:28,fontSize:14,borderRadius:6},md:{width:36,height:36,fontSize:16,borderRadius:8},lg:{width:44,height:44,fontSize:18,borderRadius:8}},Ro=I.default.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:o=!1,disabled:i,haptic:l,disableHaptic:a=!1,children:c,style:d,onClick:u,...f},h)=>{const{trigger:x}=de(),p=Ol[n],b=Nl[t],[v,B]=I.default.useState(!1),[y,S]=I.default.useState(!1);let j;switch(e){case"solid":j={background:v?y?p.solidActive:p.solidHover:p.solid,color:"#fff"};break;case"outline":j={background:v?p.tint:"transparent",color:p.fg,border:`1.5px solid ${p.solid}`};break;case"ghost":default:j={background:v?p.tint:"transparent",color:p.fg};break}return r.jsx("button",{ref:h,type:f.type??"button",disabled:i,onClick:C=>{!i&&!a&&l!==!1&&x(l??"impactLight"),u==null||u(C)},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:i?"not-allowed":"pointer",opacity:i?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...b,...o?{borderRadius:"50%"}:{},...j,...d},onMouseEnter:()=>B(!0),onMouseLeave:()=>{B(!1),S(!1)},onMouseDown:()=>S(!0),onMouseUp:()=>S(!1),onFocus:C=>{C.currentTarget.style.boxShadow="none"},onBlur:C=>{C.currentTarget.style.boxShadow="none"},...f,children:c})});Ro.displayName="MedixIconButton";const Pl={success:{solid:"#1B7A38",solidText:"#fff",tint:"#DCFCE7",tintText:"#1B7A38",border:"#1B7A38"},warning:{solid:"#D97706",solidText:"#fff",tint:"#FEF3C7",tintText:"#B45309",border:"#D97706"},error:{solid:"#DC2626",solidText:"#fff",tint:"#FFE4E6",tintText:"#B91C1C",border:"#DC2626"},info:{solid:"#0685FF",solidText:"#fff",tint:"#E8F3FF",tintText:"#0562C2",border:"#0685FF"},neutral:{solid:"#6B7280",solidText:"#fff",tint:"#F3F4F6",tintText:"#374151",border:"#9CA3AF"}},_l={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px",dotSize:6,gap:4},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px",dotSize:7,gap:5},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px",dotSize:8,gap:6}},Gn=I.default.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",rounded:o,showDot:i=!0,children:l,style:a,...c},d)=>{const u=Pl[t],f=_l[n];let h,x,p="1px solid transparent";switch(e){case"solid":h=u.solid,x=u.solidText;break;case"outline":h="transparent",x=u.tintText,p=`1px solid ${u.border}`;break;case"surface":h=u.tint,x=u.tintText,p=`1px solid ${u.border}20`;break;case"subtle":default:h=u.tint,x=u.tintText;break}const b=e==="solid"?u.solidText:u.solid,v={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:i?f.gap:0,fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:o?"100px":4,border:p,background:h,color:x,whiteSpace:"nowrap",padding:f.padding,fontSize:f.fontSize,lineHeight:f.lineHeight,...a};return r.jsxs("span",{ref:d,style:v,...c,children:[i&&r.jsx("span",{"aria-hidden":"true",style:{width:f.dotSize,height:f.dotSize,borderRadius:"50%",background:b,flexShrink:0,display:"inline-block"}}),l]})});Gn.displayName="MedixBadge";const Mo={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},Jt=I.default.forwardRef(({src:e,name:t,size:n="md",showStatus:o=!1,statusColor:i="green",...l},a)=>r.jsxs(s.Avatar.Root,{ref:a,size:Mo[n],position:"relative",...l,children:[r.jsx(s.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&r.jsx(s.Avatar.Image,{src:e,alt:t??""}),o&&r.jsx(s.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));Jt.displayName="MedixAvatar";function Hl({children:e,max:t,size:n="md"}){const o=I.default.Children.toArray(e),i=t?o.slice(0,t):o,l=t?Math.max(0,o.length-t):0,a=Mo[n];return r.jsxs(s.Box,{display:"flex",alignItems:"center",children:[i.map((c,d)=>r.jsx(s.Box,{ml:d===0?"0":"-2",position:"relative",zIndex:i.length-d,children:I.default.isValidElement(c)?I.default.cloneElement(c,{size:n}):c},d)),l>0&&r.jsxs(s.Box,{ml:"-2",w:a==="sm"?"8":a==="lg"?"12":"10",h:a==="sm"?"8":a==="lg"?"12":"10",borderRadius:"full",bg:"bg.surface",border:"2px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:["+",l]})]})}function Oo({size:e="md",label:t,color:n="blue.500",...o}){return r.jsxs(s.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[r.jsx(s.Spinner,{size:e,color:n,borderWidth:"2px",...o}),t&&r.jsx(s.Text,{textStyle:"small",color:"text.muted",children:t})]})}function Wl({label:e}){return r.jsx(s.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:r.jsx(Oo,{size:"xl",label:e??"Loading…"})})}const No=I.default.forwardRef(({variant:e="subtle",colorScheme:t="blue",showDot:n=!0,onClose:o,children:i,...l},a)=>{const c=e==="solid"?"white":`${t}.500`;return r.jsxs(s.Box,{ref:a,as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:"2.5",py:"1",borderRadius:"full",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:e==="outline"?`${t}.400`:"transparent",bg:e==="solid"?`${t}.500`:e==="subtle"?`${t}.100`:"transparent",color:e==="solid"?"white":`${t}.700`,transition:"all 0.15s",cursor:o?"default":void 0,...l,children:[n&&r.jsx(s.Box,{as:"span","aria-hidden":"true",w:"6px",h:"6px",borderRadius:"full",bg:c,flexShrink:0}),i,o&&r.jsx(s.Box,{as:"button",onClick:o,ml:"0.5",opacity:.7,_hover:{opacity:1},lineHeight:"1",fontSize:"md",cursor:"pointer",border:"none",bg:"transparent",padding:"0",display:"inline-flex",alignItems:"center",children:"×"})]})});No.displayName="MedixTag";const Po=I.default.forwardRef(({orientation:e="horizontal",label:t,...n},o)=>t?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[r.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),r.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-body)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),r.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):r.jsx(s.Separator,{ref:o,orientation:e,borderColor:"border",...n}));Po.displayName="MedixDivider";const ql="M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490 225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88C178,1979.437 199.437,1958 225.88,1958L662.12,1958C688.563,1958 710,1979.437 710,2005.88L710,2229.103C705.9,2213.585 701.763,2198.117 697.603,2182.745C695.811,2176.086 692.135,2162.841 690.354,2156.167L686.684,2142.89C684.779,2136.191 679.606,2130.414 672.464,2128.176C661.192,2124.644 649.192,2130.918 645.661,2142.189C645.656,2142.2 640.542,2158.554 640.531,2158.562C621.999,2218.218 603.451,2279.044 585.808,2338.903C584.671,2342.744 583.273,2347.499 581.74,2352.732C581.67,2352.969 581.458,2353.137 581.212,2353.15C580.965,2353.163 580.736,2353.019 580.642,2352.79C564.661,2314.068 548.29,2275.087 532.023,2237.116C528.352,2226.577 513.846,2225.401 508.748,2235.524L500.846,2251.532C494.027,2265.509 486.438,2280.793 479.597,2295.008C479.597,2295.008 436.069,2383.443 431.51,2392.706C431.286,2393.161 431.413,2393.711 431.814,2394.021C433.263,2395.142 436.626,2397.742 438.275,2399.017C438.515,2399.203 438.824,2399.277 439.123,2399.222C439.422,2399.166 439.683,2398.985 439.84,2398.725C445.834,2388.818 493.319,2310.326 493.684,2309.731C500.84,2297.999 508.653,2285.339 516.051,2273.133C516.168,2272.939 516.387,2272.831 516.613,2272.856C516.838,2272.881 517.028,2273.034 517.101,2273.248C528.203,2306.041 540.617,2341.984 551.933,2374.266C556.929,2388.443 561.912,2402.625 566.966,2416.781C568.806,2421.847 572.884,2426.143 578.389,2427.989C588.248,2431.333 598.92,2425.683 601.835,2415.722L612.744,2383.232C630.147,2331.149 647.399,2278.183 664.218,2225.484C664.314,2225.186 664.593,2224.985 664.906,2224.99C665.219,2224.994 665.493,2225.203 665.579,2225.504C668.949,2237.233 672.331,2248.892 675.679,2260.287C685.796,2294.879 696.817,2331.451 707.457,2365.829C708.016,2368.018 708.889,2369.95 710,2371.619L710,2442.12C710,2468.563 688.563,2490 662.12,2490L477.453,2490C477.156,2490 476.867,2489.902 476.631,2489.722C457.299,2474.985 438.453,2459.752 421.161,2443.298C412.607,2435.236 403.479,2425.986 395.548,2417.282C379.508,2399.804 364.42,2381.572 352.559,2361.076C326.4,2316.618 312.562,2264.49 315.392,2212.886C316.216,2200.363 317.83,2187.671 320.751,2175.467C321.065,2174.238 321.893,2170.686 322.182,2169.527C322.553,2168.204 323.549,2165.048 323.922,2163.655C351.204,2075.514 443.187,2010.628 535.637,2015.16C561.342,2016.889 586.119,2025.438 609.443,2036.154C637.886,2049.35 664.476,2066.31 689.615,2085.03L693.462,2087.898L693.505,2087.932C695.324,2089.292 697.896,2089.328 699.78,2087.862C702.032,2086.104 702.434,2082.852 700.679,2080.598C686.502,2062.447 670.231,2045.755 652.687,2030.749C621.192,2004.201 584.741,1981.815 543.918,1973.331C465.886,1958.184 383.437,1988.87 327.543,2043.897C308.123,2063.018 291.777,2085.124 279.269,2109.433C278.071,2111.881 275.685,2116.914 274.502,2119.362C272.958,2122.749 271.137,2127.369 269.669,2130.806C267.99,2135.574 266.054,2140.322 264.652,2145.186L263.037,2150.496L262.236,2153.154L261.556,2155.849C260.836,2159.042 259.531,2163.44 258.978,2166.617C255.952,2180.668 254.15,2195.197 253.377,2209.543C251.4,2248.711 257.554,2288.211 270.508,2325.184C282.242,2358.498 299.504,2389.917 321.541,2417.523C328.923,2426.794 337.487,2436.055 345.675,2444.555C353.486,2452.676 362.788,2461.68 371.226,2469.229C378.696,2475.993 386.419,2482.518 394.335,2488.823Z",Vl="M46.32 25H44.016V7.648H46.32L52.296 22.24L58.272 7.648H60.624V25H58.32V18.136C58.32 14.896 58.344 13.72 58.464 12.496L53.4 25H51.192L46.152 12.544C46.272 13.384 46.32 15.16 46.32 17.584V25ZM69.3444 25.288C65.8884 25.288 63.5124 22.792 63.5124 19.144C63.5124 15.472 65.8404 12.928 69.2484 12.928C72.5844 12.928 74.7684 15.232 74.7684 18.712V19.552L65.6964 19.576C65.8644 22.048 67.1604 23.416 69.3924 23.416C71.1444 23.416 72.2964 22.696 72.6804 21.352H74.7924C74.2164 23.872 72.2484 25.288 69.3444 25.288ZM69.2484 14.824C67.2804 14.824 66.0324 16 65.7444 18.064H72.5124C72.5124 16.12 71.2404 14.824 69.2484 14.824Z M81.9922 25.288C78.5843 25.288 76.5203 22.744 76.5203 19.168C76.5203 15.568 78.6083 12.928 82.0883 12.928C83.8883 12.928 85.4003 13.72 86.1923 15.16V7.336H88.4243V25H86.4083L86.2163 22.864C85.4483 24.472 83.8643 25.288 81.9922 25.288ZM82.4483 23.248C84.7523 23.248 86.1683 21.544 86.1683 19.096C86.1683 16.696 84.7523 14.968 82.4483 14.968C80.1443 14.968 78.8003 16.696 78.8003 19.096C78.8003 21.52 80.1443 23.248 82.4483 23.248Z M92.7829 10.48C91.9669 10.48 91.2949 9.808 91.2949 8.992C91.2949 8.152 91.9669 7.504 92.7829 7.504C93.5989 7.504 94.2709 8.152 94.2709 8.992C94.2709 9.808 93.5989 10.48 92.7829 10.48Z M91.6789 25V13.264H93.9349V25H91.6789Z M98.4101 25H95.8181L99.9221 19.192L95.8421 13.264H98.4581L101.434 17.632L104.338 13.264H106.906L102.826 19.192L106.834 25H104.218L101.29 20.704L98.4101 25Z M114.908 25H109.172V7.648H114.812C119.996 7.648 123.5 11.152 123.5 16.336C123.5 21.496 120.044 25 114.908 25ZM114.644 9.808H111.524V22.816H114.74C118.604 22.816 121.052 20.32 121.052 16.336C121.052 12.304 118.604 9.808 114.644 9.808Z M131.173 25.288C127.717 25.288 125.341 22.792 125.341 19.144C125.341 15.472 127.669 12.928 131.077 12.928C134.413 12.928 136.597 15.232 136.597 18.712V19.552L127.525 19.576C127.693 22.048 128.989 23.416 131.221 23.416C132.973 23.416 134.125 22.696 134.509 21.352H136.621C136.045 23.872 134.077 25.288 131.173 25.288ZM131.077 14.824C129.109 14.824 127.861 16 127.573 18.064H134.341C134.341 16.12 133.069 14.824 131.077 14.824Z M138.348 19.144C138.348 15.472 140.676 12.928 144.108 12.928C147.06 12.928 149.124 14.608 149.532 17.224H147.276C146.892 15.736 145.692 14.944 144.18 14.944C142.044 14.944 140.58 16.576 140.58 19.12C140.58 21.64 141.948 23.272 144.084 23.272C145.692 23.272 146.892 22.432 147.3 21.04H149.556C149.1 23.584 146.916 25.288 144.084 25.288C140.628 25.288 138.348 22.84 138.348 19.144Z M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z";function $l({variant:e,type:t,height:n,markColor:o,textColor:i,downloadFileName:l}){if(typeof window>"u")return;const a=4,c=532,d=44,u=119,f=32,h=n,x=Math.round(n*.3),p=t==="full"?Math.round(u*(n/f)):0,v=(t==="full"?h+x+p:h)*a,B=n*a,y=h*a/c,S=B/f,j=`
159
+ <svg xmlns="http://www.w3.org/2000/svg" width="${v}" height="${B}" viewBox="0 0 ${v} ${B}">
160
160
  <g transform="scale(${y})">
161
161
  <path d="${ql}" fill="${o}" fill-rule="evenodd" transform="translate(-178, -1958)"/>
162
162
  </g>
163
- ${t==="full"?`<g transform="translate(${(p+x)*a}, 0) scale(${j})">
164
- <svg viewBox="${f} 0 ${u} ${d}" width="${u}" height="${d}">
163
+ ${t==="full"?`<g transform="translate(${(h+x)*a}, 0) scale(${S})">
164
+ <svg viewBox="${d} 0 ${u} ${f}" width="${u}" height="${f}">
165
165
  <path d="${Vl}" fill="${i}"/>
166
166
  </svg>
167
167
  </g>`:""}
168
168
  </svg>
169
- `,S=new Blob([C],{type:"image/svg+xml;charset=utf-8"}),B=URL.createObjectURL(S),w=new Image;w.onload=()=>{const D=document.createElement("canvas");D.width=v,D.height=F;const E=D.getContext("2d");if(E){E.drawImage(w,0,0),URL.revokeObjectURL(B);const A=D.toDataURL("image/png"),M=document.createElement("a");M.href=A,M.download=l??`medixdeck-logo-${e}-${t}.png`,document.body.appendChild(M),M.click(),document.body.removeChild(M)}},w.src=B}function Ye({variant:e="blue",type:t="full",height:n=32,downloadable:o=!1,downloadFileName:i,className:l,style:a}){const{themeMode:c}=St(),f=c==="dark",u=f?Gl[e]:Ul[e],d=f?Kl[e]:Yl[e],x={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,cursor:o?"pointer":"default",transition:"transform 0.15s ease, opacity 0.15s ease",...a},h=v=>{o&&(v.stopPropagation(),b())},b=()=>{$l({variant:e,type:t,height:n,markColor:u,textColor:d,downloadFileName:i})};return r.jsxs("span",{className:l,style:x,role:o?"button":"img",tabIndex:o?0:void 0,onClick:h,onKeyDown:v=>{o&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b())},title:o?`Click to download MedixDeck logo (${e} ${t})`:void 0,"aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[r.jsx(Zl,{color:u,height:n}),t==="full"&&r.jsx(Xl,{color:d,height:n})]})}const Ul={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},Gl={blue:"#0685FF",purple:"#7700CC",black:"#FFFFFF",white:"#111926"},Yl={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},Kl={blue:"#FFFFFF",purple:"#FFFFFF",black:"#FFFFFF",white:"#111926"};function Zl({color:e,height:t}){return r.jsx("svg",{width:t,height:t,viewBox:"0 0 532 532",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:r.jsx("g",{children:r.jsx("path",{d:`
169
+ `,C=new Blob([j],{type:"image/svg+xml;charset=utf-8"}),F=URL.createObjectURL(C),w=new Image;w.onload=()=>{const D=document.createElement("canvas");D.width=v,D.height=B;const E=D.getContext("2d");if(E){E.drawImage(w,0,0),URL.revokeObjectURL(F);const z=D.toDataURL("image/png"),N=document.createElement("a");N.href=z,N.download=l??`medixdeck-logo-${e}-${t}.png`,document.body.appendChild(N),N.click(),document.body.removeChild(N)}},w.src=F}function Ye({variant:e="blue",type:t="full",height:n=32,downloadable:o=!1,downloadFileName:i,className:l,style:a}){const{themeMode:c}=St(),d=c==="dark",u=d?Gl[e]:Ul[e],f=d?Kl[e]:Yl[e],x={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,cursor:o?"pointer":"default",transition:"transform 0.15s ease, opacity 0.15s ease",...a},p=v=>{o&&(v.stopPropagation(),b())},b=()=>{$l({variant:e,type:t,height:n,markColor:u,textColor:f,downloadFileName:i})};return r.jsxs("span",{className:l,style:x,role:o?"button":"img",tabIndex:o?0:void 0,onClick:p,onKeyDown:v=>{o&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b())},title:o?`Click to download MedixDeck logo (${e} ${t})`:void 0,"aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[r.jsx(Zl,{color:u,height:n}),t==="full"&&r.jsx(Xl,{color:f,height:n})]})}const Ul={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},Gl={blue:"#0685FF",purple:"#7700CC",black:"#FFFFFF",white:"#111926"},Yl={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},Kl={blue:"#FFFFFF",purple:"#FFFFFF",black:"#FFFFFF",white:"#111926"};function Zl({color:e,height:t}){return r.jsx("svg",{width:t,height:t,viewBox:"0 0 532 532",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:r.jsx("g",{children:r.jsx("path",{d:`
170
170
  M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557
171
171
  C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490
172
172
  225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88
@@ -284,7 +284,7 @@
284
284
 
285
285
  M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281
286
286
  L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z
287
- `,fill:e})})}const ln={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Yn=I.default.forwardRef(({size:e="md",colorScheme:t="blue",leftElement:n,rightElement:o,isInvalid:i,errorMessage:l,...a},c)=>{const f=!!n,u=!!o,d=t==="purple"?"purple.500":"blue.500";return r.jsxs(s.Box,{w:"100%",children:[r.jsxs(s.Box,{position:"relative",children:[f&&r.jsx(s.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n}),r.jsx(s.Input,{ref:c,...ln[e],pl:f?"10":ln[e].px,pr:u?"10":ln[e].px,bg:"bg",border:"1px solid",borderColor:i?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:i?"red.500":d,boxShadow:"none",outline:"none"},_dark:{bg:"bg",borderColor:i?"red.500":"border",color:"text.heading"},...a}),u&&r.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:o})]}),i&&l&&r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:l})]})});Yn.displayName="MedixInput";const Kn=I.default.forwardRef(({placeholder:e="Search…",...t},n)=>r.jsx(Yn,{ref:n,type:"search",placeholder:e,leftElement:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));Kn.displayName="MedixSearchInput";const Ke="medix_textarea_draft_";function _o(e,t,n,o){if(e)return e;if(t)return`id_${t}`;if(n)return`name_${n}`;if(o){const i=o.toLowerCase().trim().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");if(i)return`ph_${i}`}return"default"}function Ho(e){if(!(typeof window>"u"))try{const t=e.startsWith(Ke)?e:`${Ke}${e}`;window.localStorage.removeItem(t)}catch{}}function Wo(e,t){if(typeof window>"u")return null;try{const n=e.startsWith(Ke)?e:`${Ke}${e}`,o=window.localStorage.getItem(n);if(!o)return null;const i=JSON.parse(o);return!i||typeof i.content!="string"?null:t&&t>0&&i.updatedAt&&Date.now()-i.updatedAt>t?(window.localStorage.removeItem(n),null):i}catch{return null}}function jn(e,t){if(!(typeof window>"u"))try{const n=e.startsWith(Ke)?e:`${Ke}${e}`;window.localStorage.setItem(n,JSON.stringify(t))}catch{}}const qo=I.default.forwardRef(({colorScheme:e="blue",isInvalid:t,errorMessage:n,maxLength:o,showCount:i=!1,onChange:l,value:a,defaultValue:c,storageKey:f,persistDraft:u=!0,debounceMs:d=400,draftMaxAgeMs:p=10080*60*1e3,showDraftStatus:x=!1,onDraftRestored:h,id:b,name:v,placeholder:F,disabled:y=!1,readOnly:j=!1,...C},S)=>{const B=a!==void 0,[w,D]=I.default.useState(()=>B&&typeof a=="string"?a:typeof c=="string"?c:""),E=B?typeof a=="string"?a:"":w,[A,M]=I.default.useState(E.length),[z,T]=I.default.useState("idle"),W=I.default.useRef(null);I.default.useImperativeHandle(S,()=>W.current);const R=I.default.useMemo(()=>_o(f,b,v,F),[f,b,v,F]),k=I.default.useRef(null),P=I.default.useRef(null),V=I.default.useRef(!1),Q=I.default.useCallback(O=>{if(!u||y||j)return;if(!O||O.trim()===""){P.current&&(clearTimeout(P.current),P.current=null),k.current=null,Ho(R),T("idle");return}k.current=O,T("saving"),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{k.current!==null&&(jn(R,{content:k.current,updatedAt:Date.now(),version:1}),k.current=null,T("saved"))},d)},[u,y,j,R,d]);I.default.useEffect(()=>{if(!u)return;const O=()=>{P.current&&(clearTimeout(P.current),P.current=null),k.current!==null&&(jn(R,{content:k.current,updatedAt:Date.now(),version:1}),k.current=null,T("saved"))};return typeof window<"u"&&(window.addEventListener("beforeunload",O),window.addEventListener("pagehide",O)),()=>{typeof window<"u"&&(window.removeEventListener("beforeunload",O),window.removeEventListener("pagehide",O)),O()}},[u,R]),I.default.useEffect(()=>{if(V.current||!u||y||j)return;V.current=!0;const O=Wo(R,p);if(!(!O||!O.content||O.content.trim()==="")&&!(B&&typeof a=="string"&&a.trim()!==""&&a===O.content)){if(B||D(O.content),M(O.content.length),W.current&&(W.current.value=O.content),l){const H={target:{value:O.content,name:v},currentTarget:{value:O.content,name:v}};l(H)}T("saved"),h==null||h(O)}},[u,y,j,R,p,B,a,v,l,h]),I.default.useEffect(()=>{B&&typeof a=="string"&&M(a.length)},[B,a]);const X=e==="purple"?"purple.500":"blue.500",g=O=>{const H=O.target.value;B||D(H),M(H.length),l==null||l(O),Q(H)};return r.jsxs(s.Box,{w:"100%",children:[r.jsx(s.Textarea,{ref:W,id:b,name:v,placeholder:F,disabled:y,readOnly:j,bg:"bg",border:"1px solid",borderColor:t?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:o,value:B?a:w,onChange:g,_placeholder:{color:"text.muted"},_focus:{borderColor:t?"red.500":X,boxShadow:"none",outline:"none"},_dark:{bg:"bg",borderColor:t?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...C}),r.jsxs(s.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[t&&n?r.jsx(s.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:n}):x&&z!=="idle"?r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",children:[r.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:z==="saving"?"orange.400":"green.500"}),r.jsx(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:z==="saving"?"Saving draft...":"Draft saved"})]}):r.jsx("span",{}),i&&o&&r.jsxs(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[A,"/",o]})]})]})});qo.displayName="MedixTextarea";const Jl={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}};function Ql(e){const{options:t=[],placeholder:n="Select option...",isInvalid:o=!1,errorMessage:i,size:l="md",colorScheme:a="blue",icon:c,value:f,defaultValue:u,onChange:d,disabled:p=!1,haptic:x,disableHaptic:h=!1,name:b,id:v,...F}=e,{trigger:y}=de(),[j,C]=I.default.useState(!1),[S,B]=I.default.useState(""),[w,D]=I.default.useState(-1),[E,A]=I.default.useState(()=>typeof u=="string"?u:Array.isArray(u)?u[0]??"":""),M=I.default.useRef(null),z=I.default.useRef(null),T=f!==void 0,W=T?typeof f=="string"?f:Array.isArray(f)?f[0]??"":"":E,R=t.find(g=>g.value===W);I.default.useEffect(()=>{function g(O){M.current&&!M.current.contains(O.target)&&C(!1)}return j&&document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[j]),I.default.useEffect(()=>{if(j){const g=setTimeout(()=>{var O;return(O=z.current)==null?void 0:O.focus()},50);return()=>clearTimeout(g)}else B("")},[j]);const k=g=>{p||(!h&&x!==!1&&g!==W&&y(x??"selection"),T||A(g),d==null||d(g),C(!1))},P=I.default.useMemo(()=>{if(!S.trim())return t;const g=S.toLowerCase().trim();return t.filter(O=>O.label.toLowerCase().includes(g))},[t,S]),V=a==="purple"?"#7700CC":"#0685FF",Q=o?"#DC2626":j?V:"var(--medix-form-border)",X=Jl[l];return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:j?1e3:void 0,ref:M,children:[b&&r.jsx("input",{type:"hidden",name:b,id:v,value:W}),r.jsxs(s.Box,{...F,role:"combobox","aria-haspopup":"listbox","aria-expanded":j,"aria-controls":v?`${v}-listbox`:void 0,"aria-invalid":o?!0:F["aria-invalid"],"aria-disabled":p||void 0,tabIndex:p?-1:0,onClick:()=>{p||(!h&&x!==!1&&y(x??"selection"),C(!j))},onKeyDown:g=>{p||(g.key==="Enter"||g.key===" "?(g.preventDefault(),!h&&x!==!1&&y(x??"selection"),C(O=>!O)):g.key==="Escape"&&j&&(g.preventDefault(),C(!1)))},display:"flex",alignItems:"center",justifyContent:"space-between",h:X.h,px:X.px,borderRadius:"md",bg:"bg",cursor:p?"not-allowed":"pointer",opacity:p?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${Q}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",flex:"1",minW:"0",children:[c&&r.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,children:c}),R?r.jsx(s.Text,{fontSize:X.fontSize,color:"text.heading",fontFamily:"var(--font-body)",truncate:!0,fontWeight:"500",children:R.label}):r.jsx(s.Text,{fontSize:X.fontSize,color:"text.muted",fontFamily:"var(--font-body)",truncate:!0,children:n})]}),r.jsx(s.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",flexShrink:0,style:{transform:j?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),j&&r.jsxs(s.Box,{id:v?`${v}-listbox`:void 0,role:"listbox",position:"absolute",top:"100%",left:"0",right:"0",mt:"1.5",maxH:"280px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[t.length>5&&r.jsx(s.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:r.jsxs(s.Box,{position:"relative",display:"flex",alignItems:"center",children:[r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),r.jsx("input",{ref:z,type:"text",placeholder:"Search...",value:S,onChange:g=>B(g.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),r.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:P.length===0?r.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):P.map((g,O)=>{const H=g.value===W,m=O===w;return r.jsxs("button",{type:"button",role:"option","aria-selected":H,disabled:g.disabled,onClick:()=>k(g.value),onMouseEnter:()=>D(O),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:m||H?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:g.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:g.disabled?.5:1,transition:"background 0.1s ease"},children:[r.jsx("span",{style:{fontWeight:H?600:400},children:g.label}),H&&r.jsx("span",{style:{color:V,fontWeight:700,fontSize:"14px"},children:"✓"})]},g.value)})})]}),o&&i&&r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})}function ea(e){const{options:t=[],placeholder:n="Select options...",isInvalid:o=!1,errorMessage:i,size:l="md",colorScheme:a="blue",icon:c,value:f,defaultValue:u,onChange:d,disabled:p=!1,haptic:x,disableHaptic:h=!1,name:b,id:v,...F}=e,[y,j]=I.default.useState(!1),[C,S]=I.default.useState(""),[B,w]=I.default.useState(-1),[D,E]=I.default.useState(()=>Array.isArray(u)?u:typeof u=="string"&&u?[u]:[]),A=I.default.useRef(null),M=I.default.useRef(null),z=f!==void 0,T=z?Array.isArray(f)?f:typeof f=="string"&&f?[f]:[]:D;I.default.useEffect(()=>{function H(m){A.current&&!A.current.contains(m.target)&&j(!1)}return y&&document.addEventListener("mousedown",H),()=>{document.removeEventListener("mousedown",H)}},[y]),I.default.useEffect(()=>{if(y){w(0);const H=setTimeout(()=>{var m;return(m=M.current)==null?void 0:m.focus()},50);return()=>clearTimeout(H)}else S(""),w(-1)},[y]);const W=H=>{if(p)return;const N=T.includes(H)?T.filter(G=>G!==H):[...T,H];!h&&x!==!1&&P(x??"selection"),z||E(N),d==null||d(N)},R=(H,m)=>{if(m.stopPropagation(),p)return;!h&&x!==!1&&P(x??"selection");const N=T.filter(G=>G!==H);z||E(N),d==null||d(N)},k=I.default.useMemo(()=>{if(!C.trim())return t;const H=C.toLowerCase().trim();return t.filter(m=>m.label.toLowerCase().includes(H))},[t,C]);I.default.useEffect(()=>{w(k.length>0?0:-1)},[k.length,C]);const{trigger:P}=de(),V=a==="purple"?"#7700CC":"#0685FF",Q=o?"#DC2626":y?V:"var(--medix-form-border)",X=a==="purple"?"purple.50":"blue.50",g=a==="purple"?"purple.700":"blue.700",O=a==="purple"?"purple.200":"blue.200";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:y?1e3:void 0,ref:A,children:[b&&r.jsx("input",{type:"hidden",name:b,id:v,value:T.join(",")}),r.jsxs(s.Box,{...F,role:"combobox","aria-haspopup":"listbox","aria-expanded":y,"aria-controls":v?`${v}-listbox`:void 0,"aria-invalid":o?!0:F["aria-invalid"],"aria-disabled":p||void 0,tabIndex:p?-1:0,onClick:()=>{p||(!h&&x!==!1&&P(x??"selection"),j(!y))},onKeyDown:H=>{if(!p){if(!y){(H.key==="Enter"||H.key===" "||H.key==="ArrowDown"||H.key==="ArrowUp")&&(H.preventDefault(),!h&&x!==!1&&P(x??"selection"),j(!0));return}if(H.key==="Escape")H.preventDefault(),j(!1);else if(H.key==="ArrowDown")H.preventDefault(),w(m=>{const N=k.length;return N===0?-1:m<0?0:(m+1)%N});else if(H.key==="ArrowUp")H.preventDefault(),w(m=>{const N=k.length;return N===0?-1:m<=0?N-1:m-1});else if(H.key==="Enter"){H.preventDefault();const m=k[B];m&&!m.disabled&&W(m.value)}}},display:"flex",alignItems:"center",justifyContent:"space-between",minH:l==="sm"?"34px":l==="lg"?"48px":"42px",py:"1.5",px:"3",borderRadius:"md",bg:"bg",cursor:p?"not-allowed":"pointer",opacity:p?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${Q}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"1.5",flex:"1",minW:"0",children:[c&&r.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",mr:"1",children:c}),T.length===0?r.jsx(s.Text,{fontSize:l==="sm"?"xs":"sm",color:"text.muted",fontFamily:"var(--font-body)",children:n}):T.map(H=>{const m=t.find(G=>G.value===H),N=m?m.label:H;return r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:"2.5",py:"0.5",borderRadius:"full",fontSize:"xs",fontWeight:"500",fontFamily:"var(--font-body)",bg:X,color:g,border:"1px solid",borderColor:O,_dark:{bg:a==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:a==="purple"?"purple.300":"blue.300",borderColor:a==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[r.jsx("span",{children:N}),!p&&r.jsx("button",{type:"button",onClick:G=>R(H,G),"aria-label":`Remove ${N}`,style:{background:"transparent",border:"none",padding:0,marginLeft:"2px",cursor:"pointer",color:"inherit",fontSize:"13px",lineHeight:1,opacity:.75},onMouseEnter:G=>G.currentTarget.style.opacity="1",onMouseLeave:G=>G.currentTarget.style.opacity="0.75",children:"×"})]},H)})]}),r.jsx(s.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",style:{transform:y?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),y&&r.jsxs(s.Box,{id:v?`${v}-listbox`:void 0,role:"listbox",position:"absolute",top:"100%",left:"0",right:"0",mt:"1.5",maxH:"280px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[t.length>5&&r.jsx(s.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:r.jsxs(s.Box,{position:"relative",display:"flex",alignItems:"center",children:[r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),r.jsx("input",{ref:M,type:"text",placeholder:"Search options...",value:C,onChange:H=>S(H.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),r.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:k.length===0?r.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):k.map((H,m)=>{const N=T.includes(H.value),G=m===B;return r.jsxs("button",{type:"button",role:"option","aria-selected":N,disabled:H.disabled,onClick:()=>W(H.value),onMouseEnter:()=>w(m),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:G||N?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:H.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:H.disabled?.5:1,transition:"background 0.1s ease"},children:[r.jsx("span",{style:{fontWeight:N?600:400},children:H.label}),N&&r.jsx("span",{style:{color:V,fontWeight:700,fontSize:"14px"},children:"✓"})]},H.value)})})]}),o&&i&&r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})}function ta(e){return e.multiple?r.jsx(ea,{...e}):r.jsx(Ql,{...e})}const Vo={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",tint:"#E8F3FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",tint:"#F9F0FF"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",tint:"#F0FDF4"}},$o=I.default.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,indeterminate:l=!1,haptic:a,disableHaptic:c=!1,children:f,description:u,name:d,value:p,id:x,"aria-label":h,"aria-labelledby":b,"aria-describedby":v,"aria-invalid":F,"aria-required":y},j)=>{const{trigger:C}=de(),S=Vo[e],B=x??I.default.useId(),[w,D]=I.default.useState(n),[E,A]=I.default.useState(!1),M=t!==void 0?t:w,z=W=>{!i&&!c&&a!==!1&&C(a??"selection"),t===void 0&&D(W.target.checked),o==null||o(W.target.checked)},T={width:18,height:18,borderRadius:4,border:`2px solid ${M||l?S.solid:"var(--medix-form-border, #CBD5E1)"}`,background:M||l?S.solid:"transparent",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:"none",pointerEvents:"none"};return r.jsxs(s.Box,{opacity:i?.55:1,children:[r.jsxs("label",{htmlFor:B,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[r.jsx("input",{ref:j,id:B,type:"checkbox",name:d,value:p,checked:M,disabled:i,"aria-label":h,"aria-labelledby":b,"aria-describedby":v,"aria-invalid":F,"aria-required":y,onChange:z,onFocus:()=>A(!0),onBlur:()=>A(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{style:T,"aria-hidden":"true",children:l?r.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:r.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):M?r.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:r.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),f&&r.jsxs(s.Box,{children:[r.jsx(s.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:f}),u&&r.jsx(s.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u})]})]}),!f&&u&&r.jsx(s.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:u})]})});$o.displayName="MedixCheckbox";function na({name:e,value:t,onChange:n,options:o,colorScheme:i="blue",direction:l="column",haptic:a,disableHaptic:c=!1,id:f,"aria-label":u,"aria-labelledby":d,"aria-describedby":p,"aria-invalid":x,"aria-required":h}){const{trigger:b}=de(),v=Vo[i],[F,y]=I.default.useState(""),j=t!==void 0?t:F,C=S=>{!c&&a!==!1&&S!==j&&b(a??"selection"),t===void 0&&y(S),n==null||n(S)};return r.jsx(s.Box,{id:f,display:"flex",flexDirection:l,gap:l==="row"?"5":"3",role:"radiogroup","aria-label":u,"aria-labelledby":d,"aria-describedby":p,"aria-invalid":x,"aria-required":h,children:o.map(S=>{const B=j===S.value;return r.jsx(ra,{option:S,name:e,isSelected:B,onChange:C,solidColor:v.solid,ring:v.ring},S.value)})})}function ra({option:e,name:t,isSelected:n,onChange:o,solidColor:i,ring:l}){const[a,c]=I.default.useState(!1);return r.jsxs("label",{style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.55:1,userSelect:"none"},children:[r.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>o(e.value),onFocus:()=>c(!0),onBlur:()=>c(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?i:"var(--medix-form-border, #CBD5E1)"}`,display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:"none",pointerEvents:"none"},children:r.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),r.jsxs(s.Box,{children:[r.jsx(s.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&r.jsx(s.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const oa={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",track:"#0685FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",track:"#7700CC"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",track:"#1B7A38"}},ia={sm:{width:32,height:18,thumbSize:12,thumbOffset:2},md:{width:42,height:24,thumbSize:16,thumbOffset:3},lg:{width:52,height:30,thumbSize:20,thumbOffset:4}},Uo=I.default.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:o=!1,onChange:i,disabled:l=!1,haptic:a,disableHaptic:c=!1,label:f,description:u,name:d,id:p,"aria-label":x,"aria-labelledby":h,"aria-describedby":b,"aria-invalid":v,"aria-required":F},y)=>{const{trigger:j}=de(),C=oa[e],S=ia[t],B=p??I.default.useId(),[w,D]=I.default.useState(o),[E,A]=I.default.useState(!1),M=n!==void 0?n:w,z=R=>{!l&&!c&&a!==!1&&j(a??"selection"),n===void 0&&D(R.target.checked),i==null||i(R.target.checked)},T={position:"relative",display:"inline-flex",alignItems:"center",width:S.width,height:S.height,borderRadius:S.height,background:M?C.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:"none",cursor:l?"not-allowed":"pointer",flexShrink:0},W={position:"absolute",width:S.thumbSize,height:S.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"none",top:S.thumbOffset,left:M?S.width-S.thumbSize-S.thumbOffset:S.thumbOffset,transition:"left 0.18s ease"};return r.jsxs(s.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:l?.55:1,children:[r.jsxs("label",{htmlFor:B,style:{display:"inline-flex",cursor:l?"not-allowed":"pointer"},children:[r.jsx("input",{ref:y,id:B,type:"checkbox",role:"switch",name:d,checked:M,disabled:l,"aria-label":x,"aria-labelledby":h,"aria-describedby":b,"aria-invalid":v,"aria-required":F,onChange:z,onFocus:()=>A(!0),onBlur:()=>A(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{style:T,"aria-hidden":"true",children:r.jsx("span",{style:W})})]}),(f||u)&&r.jsxs(s.Box,{children:[f&&r.jsx("label",{htmlFor:B,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:l?"not-allowed":"pointer",userSelect:"none"},children:f}),u&&r.jsx(s.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u})]})]})});Uo.displayName="MedixSwitch";function la({id:e,label:t,helperText:n,errorMessage:o,isRequired:i=!1,isDisabled:l=!1,children:a}){const c=I.default.useId(),f=e??`medix-field-${c.replace(/:/g,"")}`,u=!!o,d=n&&!u?`${f}-helper`:void 0,p=u&&o?`${f}-error`:void 0,x=[p,d].filter(Boolean).join(" ")||void 0;let h=a;if(I.default.isValidElement(a)){const b=a.props,F=[typeof b["aria-describedby"]=="string"?b["aria-describedby"]:void 0,x].filter(Boolean).join(" ")||void 0;h=I.default.cloneElement(a,{id:b.id??f,isInvalid:u||!!b.isInvalid||void 0,"aria-invalid":u?!0:b["aria-invalid"],"aria-required":i||b.required||b.isRequired||b["aria-required"]?!0:void 0,"aria-describedby":F})}return r.jsxs(s.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:l?.5:1,pointerEvents:l?"none":void 0,w:"100%",children:[t&&r.jsxs(s.Box,{as:"label",htmlFor:f,display:"flex",alignItems:"center",gap:"1",children:[r.jsx(s.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&r.jsx(s.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1","aria-hidden":"true",children:"*"})]}),h,d&&n&&r.jsx(s.Text,{id:d,fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),p&&o&&r.jsx(s.Text,{id:p,fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",role:"alert",children:o})]})}function Go({length:e=6,value:t,defaultValue:n="",onChange:o,onComplete:i,colorScheme:l="blue",isInvalid:a=!1,isDisabled:c=!1,mask:f=!1,haptic:u,disableHaptic:d=!1,label:p,helperText:x,errorMessage:h,id:b,"aria-label":v,"aria-labelledby":F,"aria-describedby":y,"aria-invalid":j,"aria-required":C}){const{trigger:S}=de(),[B,w]=I.default.useState(n),[D,E]=I.default.useState(null),A=t!==void 0,z=(A?t:B).split("").slice(0,e),T=I.default.useRef([]),W=a?"#DC2626":"var(--medix-form-border, var(--chakra-colors-border, #E2E8F0))",R=a?"#DC2626":l==="purple"?"#7700CC":"#0685FF",k=X=>{if(c||d||u===!1)return;const g=X.replace(/\s/g,"").length===e;S(u??(g?"success":"selection"))},P=(X,g)=>{var O,H,m;if(X.key==="Backspace"){X.preventDefault();const N=[...z];if(N[g]){N[g]="";const G=N.join("");A||w(G),k(G),o==null||o(G)}else if(g>0){(O=T.current[g-1])==null||O.focus(),N[g-1]="";const G=N.join("");A||w(G),k(G),o==null||o(G)}}else X.key==="ArrowLeft"&&g>0?(H=T.current[g-1])==null||H.focus():X.key==="ArrowRight"&&g<e-1&&((m=T.current[g+1])==null||m.focus())},V=(X,g)=>{var N;const O=X.target.value.replace(/\D/g,""),H=[...z];for(;H.length<e;)H.push("");if(!O){H[g]="";const G=H.join("");A||w(G),o==null||o(G);return}H[g]=O[0];const m=H.join("");A||w(m),k(m),o==null||o(m),g<e-1&&((N=T.current[g+1])==null||N.focus()),m.replace(/\s/g,"").length===e&&(i==null||i(m))},Q=(X,g)=>{var Z;X.preventDefault();const O=X.clipboardData.getData("text").replace(/\D/g,"");if(!O)return;const H=[...z];for(;H.length<e;)H.push("");const m=O.split("").slice(0,e-g);m.forEach((Y,K)=>{H[g+K]=Y});const N=H.join("");A||w(N),k(N),o==null||o(N);const G=N.replace(/\s/g,"").length===e?e-1:Math.min(g+m.length,e-1);(Z=T.current[G])==null||Z.focus(),N.replace(/\s/g,"").length===e&&(i==null||i(N))};return r.jsxs(s.Box,{w:"fit-content",children:[p&&r.jsx(s.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:p}),r.jsx(s.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((X,g)=>r.jsx("input",{id:g===0?b:void 0,ref:O=>{T.current[g]=O},type:f?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:z[g]??"",onChange:O=>V(O,g),onKeyDown:O=>P(O,g),onPaste:O=>Q(O,g),onFocus:O=>{O.target.select(),E(g)},onBlur:()=>E(null),disabled:c,"aria-label":v?`${v} digit ${g+1} of ${e}`:`Digit ${g+1} of ${e}`,"aria-labelledby":F,"aria-describedby":y,"aria-invalid":a||j||void 0,"aria-required":C,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${D===g?R:W}`,boxShadow:"none",background:"var(--medix-form-bg, var(--chakra-colors-bg-surface, #FFFFFF))",color:"var(--medix-form-text, var(--chakra-colors-text-heading, #0F172A))",fontSize:"20px",fontWeight:600,textAlign:"center",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"text",opacity:c?.5:1}},g))}),(x||h)&&r.jsx(s.Text,{mt:"2",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?h:x})]})}const aa=Go;function _t(){return _t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_t.apply(this,arguments)}function sa(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ca=["cdnSuffix","cdnUrl","countryCode","style","svg"],ua="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",da="svg",fa=127397,wr=function(t){var n=t.cdnSuffix,o=n===void 0?da:n,i=t.cdnUrl,l=i===void 0?ua:i,a=t.countryCode,c=t.style,f=t.svg,u=f===void 0?!1:f,d=sa(t,ca);if(typeof a!="string")return null;if(u){var p=""+l+a.toLowerCase()+"."+o;return U.createElement("img",Object.assign({},d,{src:p,style:_t({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},c)}))}var x=a.toUpperCase().replace(/./g,function(h){return String.fromCodePoint(h.charCodeAt(0)+fa)});return U.createElement("span",Object.assign({role:"img"},d,{style:_t({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},c)}),x)};const pa={"+1":"US","+7":"RU","+39":"IT","+44":"GB","+47":"NO","+212":"MA","+262":"RE","+290":"SH","+358":"FI","+590":"GP","+599":"CW"},Ve=[{country:"AF",code:"+93",name:"Afghanistan",flag:"🇦🇫"},{country:"AL",code:"+355",name:"Albania",flag:"🇦🇱"},{country:"DZ",code:"+213",name:"Algeria",flag:"🇩🇿"},{country:"AS",code:"+1",name:"American Samoa",flag:"🇦🇸"},{country:"AD",code:"+376",name:"Andorra",flag:"🇦🇩"},{country:"AO",code:"+244",name:"Angola",flag:"🇦🇴"},{country:"AI",code:"+1",name:"Anguilla",flag:"🇦🇮"},{country:"AG",code:"+1",name:"Antigua & Barbuda",flag:"🇦🇬"},{country:"AR",code:"+54",name:"Argentina",flag:"🇦🇷"},{country:"AM",code:"+374",name:"Armenia",flag:"🇦🇲"},{country:"AW",code:"+297",name:"Aruba",flag:"🇦🇼"},{country:"AU",code:"+61",name:"Australia",flag:"🇦🇺"},{country:"AT",code:"+43",name:"Austria",flag:"🇦🇹"},{country:"AZ",code:"+994",name:"Azerbaijan",flag:"🇦🇿"},{country:"BS",code:"+1",name:"Bahamas",flag:"🇧🇸"},{country:"BH",code:"+973",name:"Bahrain",flag:"🇧🇭"},{country:"BD",code:"+880",name:"Bangladesh",flag:"🇧🇩"},{country:"BB",code:"+1",name:"Barbados",flag:"🇧🇧"},{country:"BY",code:"+375",name:"Belarus",flag:"🇧🇾"},{country:"BE",code:"+32",name:"Belgium",flag:"🇧🇪"},{country:"BZ",code:"+501",name:"Belize",flag:"🇧🇿"},{country:"BJ",code:"+229",name:"Benin",flag:"🇧🇯"},{country:"BM",code:"+1",name:"Bermuda",flag:"🇧🇲"},{country:"BT",code:"+975",name:"Bhutan",flag:"🇧🇹"},{country:"BO",code:"+591",name:"Bolivia",flag:"🇧🇴"},{country:"BA",code:"+387",name:"Bosnia & Herzegovina",flag:"🇧🇦"},{country:"BW",code:"+267",name:"Botswana",flag:"🇧🇼"},{country:"BR",code:"+55",name:"Brazil",flag:"🇧🇷"},{country:"IO",code:"+246",name:"British Indian Ocean Territory",flag:"🇮🇴"},{country:"VG",code:"+1",name:"British Virgin Islands",flag:"🇻🇬"},{country:"BN",code:"+673",name:"Brunei",flag:"🇧🇳"},{country:"BG",code:"+359",name:"Bulgaria",flag:"🇧🇬"},{country:"BF",code:"+226",name:"Burkina Faso",flag:"🇧🇫"},{country:"BI",code:"+257",name:"Burundi",flag:"🇧🇮"},{country:"KH",code:"+855",name:"Cambodia",flag:"🇰🇭"},{country:"CM",code:"+237",name:"Cameroon",flag:"🇨🇲"},{country:"CA",code:"+1",name:"Canada",flag:"🇨🇦"},{country:"CV",code:"+238",name:"Cape Verde",flag:"🇨🇻"},{country:"BQ",code:"+599",name:"Caribbean Netherlands",flag:"🇧🇶"},{country:"KY",code:"+1",name:"Cayman Islands",flag:"🇰🇾"},{country:"CF",code:"+236",name:"Central African Republic",flag:"🇨🇫"},{country:"TD",code:"+235",name:"Chad",flag:"🇹🇩"},{country:"CL",code:"+56",name:"Chile",flag:"🇨🇱"},{country:"CN",code:"+86",name:"China",flag:"🇨🇳"},{country:"CO",code:"+57",name:"Colombia",flag:"🇨🇴"},{country:"KM",code:"+269",name:"Comoros",flag:"🇰🇲"},{country:"CD",code:"+243",name:"DR Congo",flag:"🇨🇩"},{country:"CG",code:"+242",name:"Congo",flag:"🇨🇬"},{country:"CK",code:"+682",name:"Cook Islands",flag:"🇨🇰"},{country:"CR",code:"+506",name:"Costa Rica",flag:"🇨🇷"},{country:"HR",code:"+385",name:"Croatia",flag:"🇭🇷"},{country:"CU",code:"+53",name:"Cuba",flag:"🇨🇺"},{country:"CW",code:"+599",name:"Curaçao",flag:"🇨🇼"},{country:"CY",code:"+357",name:"Cyprus",flag:"🇨🇾"},{country:"CZ",code:"+420",name:"Czech Republic",flag:"🇨🇿"},{country:"DK",code:"+45",name:"Denmark",flag:"🇩🇰"},{country:"DJ",code:"+253",name:"Djibouti",flag:"🇩🇯"},{country:"DM",code:"+1",name:"Dominica",flag:"🇩🇲"},{country:"DO",code:"+1",name:"Dominican Republic",flag:"🇩🇴"},{country:"EC",code:"+593",name:"Ecuador",flag:"🇪🇨"},{country:"EG",code:"+20",name:"Egypt",flag:"🇪🇬"},{country:"SV",code:"+503",name:"El Salvador",flag:"🇸🇻"},{country:"GQ",code:"+240",name:"Equatorial Guinea",flag:"🇬🇶"},{country:"ER",code:"+291",name:"Eritrea",flag:"🇪🇷"},{country:"EE",code:"+372",name:"Estonia",flag:"🇪🇪"},{country:"SZ",code:"+268",name:"Eswatini",flag:"🇸🇿"},{country:"ET",code:"+251",name:"Ethiopia",flag:"🇪🇹"},{country:"FK",code:"+500",name:"Falkland Islands",flag:"🇫🇰"},{country:"FO",code:"+298",name:"Faroe Islands",flag:"🇫🇴"},{country:"FJ",code:"+679",name:"Fiji",flag:"🇫🇯"},{country:"FI",code:"+358",name:"Finland",flag:"🇫🇮"},{country:"FR",code:"+33",name:"France",flag:"🇫🇷"},{country:"GF",code:"+594",name:"French Guiana",flag:"🇬🇫"},{country:"PF",code:"+689",name:"French Polynesia",flag:"🇵🇫"},{country:"GA",code:"+241",name:"Gabon",flag:"🇬🇦"},{country:"GM",code:"+220",name:"Gambia",flag:"🇬🇲"},{country:"GE",code:"+995",name:"Georgia",flag:"🇬🇪"},{country:"DE",code:"+49",name:"Germany",flag:"🇩🇪"},{country:"GH",code:"+233",name:"Ghana",flag:"🇬🇭"},{country:"GI",code:"+350",name:"Gibraltar",flag:"🇬🇮"},{country:"GR",code:"+30",name:"Greece",flag:"🇬🇷"},{country:"GL",code:"+299",name:"Greenland",flag:"🇬🇱"},{country:"GD",code:"+1",name:"Grenada",flag:"🇬🇩"},{country:"GP",code:"+590",name:"Guadeloupe",flag:"🇬🇵"},{country:"GU",code:"+1",name:"Guam",flag:"🇬🇺"},{country:"GT",code:"+502",name:"Guatemala",flag:"🇬🇹"},{country:"GG",code:"+44",name:"Guernsey",flag:"🇬🇬"},{country:"GN",code:"+224",name:"Guinea",flag:"🇬🇳"},{country:"GW",code:"+245",name:"Guinea-Bissau",flag:"🇬🇼"},{country:"GY",code:"+592",name:"Guyana",flag:"🇬🇾"},{country:"HT",code:"+509",name:"Haiti",flag:"🇭🇹"},{country:"HN",code:"+504",name:"Honduras",flag:"🇭🇳"},{country:"HK",code:"+852",name:"Hong Kong",flag:"🇭🇰"},{country:"HU",code:"+36",name:"Hungary",flag:"🇭🇺"},{country:"IS",code:"+354",name:"Iceland",flag:"🇮🇸"},{country:"IN",code:"+91",name:"India",flag:"🇮🇳"},{country:"ID",code:"+62",name:"Indonesia",flag:"🇮🇩"},{country:"IR",code:"+98",name:"Iran",flag:"🇮🇷"},{country:"IQ",code:"+964",name:"Iraq",flag:"🇮🇶"},{country:"IE",code:"+353",name:"Ireland",flag:"🇮🇪"},{country:"IM",code:"+44",name:"Isle of Man",flag:"🇮🇲"},{country:"IL",code:"+972",name:"Israel",flag:"🇮🇱"},{country:"IT",code:"+39",name:"Italy",flag:"🇮🇹"},{country:"CI",code:"+225",name:"Ivory Coast",flag:"🇨🇮"},{country:"JM",code:"+1",name:"Jamaica",flag:"🇯🇲"},{country:"JP",code:"+81",name:"Japan",flag:"🇯🇵"},{country:"JE",code:"+44",name:"Jersey",flag:"🇯🇪"},{country:"JO",code:"+962",name:"Jordan",flag:"🇯🇴"},{country:"KZ",code:"+7",name:"Kazakhstan",flag:"🇰🇿"},{country:"KE",code:"+254",name:"Kenya",flag:"🇰🇪"},{country:"KI",code:"+686",name:"Kiribati",flag:"🇰🇮"},{country:"XK",code:"+383",name:"Kosovo",flag:"🇽🇰"},{country:"KW",code:"+965",name:"Kuwait",flag:"🇰🇼"},{country:"KG",code:"+996",name:"Kyrgyzstan",flag:"🇰🇬"},{country:"LA",code:"+856",name:"Laos",flag:"🇱🇦"},{country:"LV",code:"+371",name:"Latvia",flag:"🇱🇻"},{country:"LB",code:"+961",name:"Lebanon",flag:"🇱🇧"},{country:"LS",code:"+266",name:"Lesotho",flag:"🇱🇸"},{country:"LR",code:"+231",name:"Liberia",flag:"🇱🇷"},{country:"LY",code:"+218",name:"Libya",flag:"🇱🇾"},{country:"LI",code:"+423",name:"Liechtenstein",flag:"🇱🇮"},{country:"LT",code:"+370",name:"Lithuania",flag:"🇱🇹"},{country:"LU",code:"+352",name:"Luxembourg",flag:"🇱🇺"},{country:"MO",code:"+853",name:"Macao",flag:"🇲🇴"},{country:"MK",code:"+389",name:"North Macedonia",flag:"🇲🇰"},{country:"MG",code:"+261",name:"Madagascar",flag:"🇲🇬"},{country:"MW",code:"+265",name:"Malawi",flag:"🇲🇼"},{country:"MY",code:"+60",name:"Malaysia",flag:"🇲🇾"},{country:"MV",code:"+960",name:"Maldives",flag:"🇲🇻"},{country:"ML",code:"+223",name:"Mali",flag:"🇲🇱"},{country:"MT",code:"+356",name:"Malta",flag:"🇲🇹"},{country:"MH",code:"+692",name:"Marshall Islands",flag:"🇲🇭"},{country:"MQ",code:"+596",name:"Martinique",flag:"🇲🇶"},{country:"MR",code:"+222",name:"Mauritania",flag:"🇲🇷"},{country:"MU",code:"+230",name:"Mauritius",flag:"🇲🇺"},{country:"YT",code:"+262",name:"Mayotte",flag:"🇾🇹"},{country:"MX",code:"+52",name:"Mexico",flag:"🇲🇽"},{country:"FM",code:"+691",name:"Micronesia",flag:"🇫🇲"},{country:"MD",code:"+373",name:"Moldova",flag:"🇲🇩"},{country:"MC",code:"+377",name:"Monaco",flag:"🇲🇨"},{country:"MN",code:"+976",name:"Mongolia",flag:"🇲🇳"},{country:"ME",code:"+382",name:"Montenegro",flag:"🇲🇪"},{country:"MS",code:"+1",name:"Montserrat",flag:"🇲🇸"},{country:"MA",code:"+212",name:"Morocco",flag:"🇲🇦"},{country:"MZ",code:"+258",name:"Mozambique",flag:"🇲🇿"},{country:"MM",code:"+95",name:"Myanmar",flag:"🇲🇲"},{country:"NA",code:"+264",name:"Namibia",flag:"🇳🇦"},{country:"NR",code:"+674",name:"Nauru",flag:"🇳🇷"},{country:"NP",code:"+977",name:"Nepal",flag:"🇳🇵"},{country:"NL",code:"+31",name:"Netherlands",flag:"🇳🇱"},{country:"NC",code:"+687",name:"New Caledonia",flag:"🇳🇨"},{country:"NZ",code:"+64",name:"New Zealand",flag:"🇳🇿"},{country:"NI",code:"+505",name:"Nicaragua",flag:"🇳🇮"},{country:"NE",code:"+227",name:"Niger",flag:"🇳🇪"},{country:"NG",code:"+234",name:"Nigeria",flag:"🇳🇬"},{country:"NU",code:"+683",name:"Niue",flag:"🇳🇺"},{country:"NF",code:"+672",name:"Norfolk Island",flag:"🇳🇫"},{country:"KP",code:"+850",name:"North Korea",flag:"🇰🇵"},{country:"MP",code:"+1",name:"Northern Mariana Islands",flag:"🇲🇵"},{country:"NO",code:"+47",name:"Norway",flag:"🇳🇴"},{country:"OM",code:"+968",name:"Oman",flag:"🇴🇲"},{country:"PK",code:"+92",name:"Pakistan",flag:"🇵🇰"},{country:"PW",code:"+680",name:"Palau",flag:"🇵🇼"},{country:"PS",code:"+970",name:"Palestine",flag:"🇵🇸"},{country:"PA",code:"+507",name:"Panama",flag:"🇵🇦"},{country:"PG",code:"+675",name:"Papua New Guinea",flag:"🇵🇬"},{country:"PY",code:"+595",name:"Paraguay",flag:"🇵🇾"},{country:"PE",code:"+51",name:"Peru",flag:"🇵🇪"},{country:"PH",code:"+63",name:"Philippines",flag:"🇵🇭"},{country:"PL",code:"+48",name:"Poland",flag:"🇵🇱"},{country:"PT",code:"+351",name:"Portugal",flag:"🇵🇹"},{country:"PR",code:"+1",name:"Puerto Rico",flag:"🇵🇷"},{country:"QA",code:"+974",name:"Qatar",flag:"🇶🇦"},{country:"RE",code:"+262",name:"Réunion",flag:"🇷🇪"},{country:"RO",code:"+40",name:"Romania",flag:"🇷🇴"},{country:"RU",code:"+7",name:"Russia",flag:"🇷🇺"},{country:"RW",code:"+250",name:"Rwanda",flag:"🇷🇼"},{country:"WS",code:"+685",name:"Samoa",flag:"🇼🇸"},{country:"SM",code:"+378",name:"San Marino",flag:"🇸🇲"},{country:"ST",code:"+239",name:"São Tomé & Príncipe",flag:"🇸🇹"},{country:"SA",code:"+966",name:"Saudi Arabia",flag:"🇸🇦"},{country:"SN",code:"+221",name:"Senegal",flag:"🇸🇳"},{country:"RS",code:"+381",name:"Serbia",flag:"🇷🇸"},{country:"SC",code:"+248",name:"Seychelles",flag:"🇸🇨"},{country:"SL",code:"+232",name:"Sierra Leone",flag:"🇸🇱"},{country:"SG",code:"+65",name:"Singapore",flag:"🇸🇬"},{country:"SX",code:"+1",name:"Sint Maarten",flag:"🇸🇽"},{country:"SK",code:"+421",name:"Slovakia",flag:"🇸🇰"},{country:"SI",code:"+386",name:"Slovenia",flag:"🇸🇮"},{country:"SB",code:"+677",name:"Solomon Islands",flag:"🇸🇧"},{country:"SO",code:"+252",name:"Somalia",flag:"🇸🇴"},{country:"ZA",code:"+27",name:"South Africa",flag:"🇿🇦"},{country:"KR",code:"+82",name:"South Korea",flag:"🇰🇷"},{country:"SS",code:"+211",name:"South Sudan",flag:"🇸🇸"},{country:"ES",code:"+34",name:"Spain",flag:"🇪🇸"},{country:"LK",code:"+94",name:"Sri Lanka",flag:"🇱🇰"},{country:"BL",code:"+590",name:"Saint Barthélemy",flag:"🇧🇱"},{country:"SH",code:"+290",name:"Saint Helena",flag:"🇸🇭"},{country:"KN",code:"+1",name:"Saint Kitts & Nevis",flag:"🇰🇳"},{country:"LC",code:"+1",name:"Saint Lucia",flag:"🇱🇨"},{country:"MF",code:"+590",name:"Saint Martin",flag:"🇲🇫"},{country:"PM",code:"+508",name:"Saint Pierre & Miquelon",flag:"🇵🇲"},{country:"VC",code:"+1",name:"Saint Vincent & Grenadines",flag:"🇻🇨"},{country:"SD",code:"+249",name:"Sudan",flag:"🇸🇩"},{country:"SR",code:"+597",name:"Suriname",flag:"🇸🇷"},{country:"SJ",code:"+47",name:"Svalbard & Jan Mayen",flag:"🇸🇯"},{country:"SE",code:"+46",name:"Sweden",flag:"🇸🇪"},{country:"CH",code:"+41",name:"Switzerland",flag:"🇨🇭"},{country:"SY",code:"+963",name:"Syria",flag:"🇸🇾"},{country:"TW",code:"+886",name:"Taiwan",flag:"🇹🇼"},{country:"TJ",code:"+992",name:"Tajikistan",flag:"🇹🇯"},{country:"TZ",code:"+255",name:"Tanzania",flag:"🇹🇿"},{country:"TH",code:"+66",name:"Thailand",flag:"🇹🇭"},{country:"TG",code:"+228",name:"Togo",flag:"🇹🇬"},{country:"TK",code:"+690",name:"Tokelau",flag:"🇹🇰"},{country:"TO",code:"+676",name:"Tonga",flag:"🇹🇴"},{country:"TT",code:"+1",name:"Trinidad & Tobago",flag:"🇹🇹"},{country:"TN",code:"+216",name:"Tunisia",flag:"🇹🇳"},{country:"TR",code:"+90",name:"Turkey",flag:"🇹🇷"},{country:"TM",code:"+993",name:"Turkmenistan",flag:"🇹🇲"},{country:"TC",code:"+1",name:"Turks & Caicos Islands",flag:"🇹🇨"},{country:"TV",code:"+688",name:"Tuvalu",flag:"🇹🇻"},{country:"VI",code:"+1",name:"US Virgin Islands",flag:"🇻🇮"},{country:"UG",code:"+256",name:"Uganda",flag:"🇺🇬"},{country:"UA",code:"+380",name:"Ukraine",flag:"🇺🇦"},{country:"AE",code:"+971",name:"United Arab Emirates",flag:"🇦🇪"},{country:"GB",code:"+44",name:"United Kingdom",flag:"🇬🇧"},{country:"US",code:"+1",name:"United States",flag:"🇺🇸"},{country:"UY",code:"+598",name:"Uruguay",flag:"🇺🇾"},{country:"UZ",code:"+998",name:"Uzbekistan",flag:"🇺🇿"},{country:"VU",code:"+678",name:"Vanuatu",flag:"🇻🇺"},{country:"VA",code:"+39",name:"Vatican City",flag:"🇻🇦"},{country:"VE",code:"+58",name:"Venezuela",flag:"🇻🇪"},{country:"VN",code:"+84",name:"Vietnam",flag:"🇻🇳"},{country:"WF",code:"+681",name:"Wallis & Futuna",flag:"🇼🇫"},{country:"EH",code:"+212",name:"Western Sahara",flag:"🇪🇭"},{country:"YE",code:"+967",name:"Yemen",flag:"🇾🇪"},{country:"ZM",code:"+260",name:"Zambia",flag:"🇿🇲"},{country:"ZW",code:"+263",name:"Zimbabwe",flag:"🇿🇼"},{country:"AX",code:"+358",name:"Åland Islands",flag:"🇦🇽"}];function ha({value:e="",onChange:t,showCountryCode:n=!0,showCountryFlag:o=!0,defaultCountryCode:i="+234",defaultCountry:l,placeholder:a="80 000 0000",colorScheme:c="blue",isInvalid:f=!1,errorMessage:u,label:d,helperText:p,isDisabled:x=!1,id:h,"aria-label":b,"aria-labelledby":v,"aria-describedby":F,"aria-invalid":y,"aria-required":j}){const C=I.default.useId(),S=h??C,B=l??(i?pa[i]:void 0),w=(B?Ve.find(Z=>Z.country===B):void 0)??Ve.find(Z=>Z.code===i)??Ve.find(Z=>Z.country==="NG")??Ve[0],[D,E]=I.default.useState(w.country),[A,M]=I.default.useState(e),[z,T]=I.default.useState(!1),[W,R]=I.default.useState(!1),[k,P]=I.default.useState(""),V=I.default.useRef(null),Q=I.default.useRef(null),X=Ve.find(Z=>Z.country===D)??w;I.default.useEffect(()=>{function Z(Y){V.current&&!V.current.contains(Y.target)&&R(!1)}return W&&document.addEventListener("mousedown",Z),()=>{document.removeEventListener("mousedown",Z)}},[W]),I.default.useEffect(()=>{if(W){const Z=setTimeout(()=>{var Y;(Y=Q.current)==null||Y.focus()},50);return()=>clearTimeout(Z)}else P("")},[W]);const g=I.default.useMemo(()=>{if(!k.trim())return Ve;const Z=k.toLowerCase().trim();return Ve.filter(Y=>Y.name.toLowerCase().includes(Z)||Y.code.toLowerCase().includes(Z)||Y.country.toLowerCase().includes(Z))},[k]),O=Z=>{const Y=Z.target.value.replace(/[^\d\s\-]/g,"");M(Y),t==null||t(`${X.code}${Y.replace(/\s/g,"")}`)},H=Z=>{E(Z.country),t==null||t(`${Z.code}${A.replace(/\s/g,"")}`),R(!1)},N=f?"#DC2626":z||W?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",children:[d&&r.jsx("label",{htmlFor:S,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:d}),r.jsxs(s.Box,{display:"flex",alignItems:"center",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:x?.5:1,pointerEvents:x?"none":void 0,position:"relative",zIndex:W?1e3:void 0,style:{border:`1.5px solid ${N}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[n&&r.jsxs(s.Box,{position:"relative",ref:V,h:"full",children:[r.jsxs("button",{id:`${S}-country`,type:"button",onClick:()=>!x&&R(!W),disabled:x,"aria-label":"Select country code","aria-expanded":W,style:{display:"flex",alignItems:"center",gap:"6px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",border:"none",borderRight:"1px solid var(--medix-form-border)",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",cursor:x?"not-allowed":"pointer",height:"100%",color:"var(--medix-form-text)",fontFamily:"var(--font-body)",fontSize:"14px",fontWeight:500},children:[o&&r.jsx(s.Box,{display:"flex",alignItems:"center",fontSize:"lg",lineHeight:"1",children:r.jsx(wr,{countryCode:X.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),r.jsx("span",{children:X.code}),r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:W?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease",opacity:.7},children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),W&&r.jsxs(s.Box,{position:"absolute",top:"100%",left:"0",mt:"2",w:"280px",maxH:"320px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[r.jsx(s.Box,{p:"2.5",color:"text.heading",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:r.jsxs(s.Box,{color:"text.heading",position:"relative",display:"flex",alignItems:"center",children:[r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),r.jsx("input",{ref:Q,type:"text",placeholder:"Search country or code...",value:k,onChange:Z=>P(Z.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),r.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:g.length===0?r.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No country found"}):g.map(Z=>{const Y=Z.country===X.country;return r.jsxs("button",{type:"button",onClick:()=>H(Z),style:{display:"flex",width:"100%",alignItems:"center",gap:"10px",padding:"8px 14px",background:Y?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",transition:"background 0.1s ease"},onMouseEnter:K=>{K.currentTarget.style.background="var(--medix-form-bg-subtle)"},onMouseLeave:K=>{K.currentTarget.style.background=Y?"var(--medix-form-bg-subtle)":"transparent"},children:[r.jsx(s.Box,{display:"flex",alignItems:"center",fontSize:"md",flexShrink:0,children:r.jsx(wr,{countryCode:Z.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),r.jsx(s.Text,{flex:"1",truncate:!0,fontWeight:Y?"600":"400",children:Z.name}),r.jsx(s.Text,{fontSize:"xs",color:"text.muted",flexShrink:0,children:Z.code})]},`${Z.country}-${Z.code}`)})})]})]}),r.jsx("input",{id:S,type:"tel",value:A,onChange:O,onFocus:()=>T(!0),onBlur:()=>T(!1),placeholder:a,disabled:x,"aria-label":b,"aria-labelledby":v,"aria-describedby":F,"aria-invalid":f||y||void 0,"aria-required":j,style:{flex:1,border:"none",outline:"none",background:"transparent",fontSize:"15px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:"10px 16px",minWidth:0}})]}),(p||u)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?u:p})]})}const xa=["MON","TUES","WED","THURS","FRI","SAT","SUN"],an=["January","February","March","April","May","June","July","August","September","October","November","December"],ga=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ht=12;function Cn(e,t){return new Date(e,t+1,0).getDate()}function ma(e,t){return new Date(e,t,1).getDay()}function ba(e){return e===0?6:e-1}function jr(e,t,n,o,i){const l=new Date(n,t,e);if(o){const a=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(l<a)return!0}if(i){const a=new Date(i.getFullYear(),i.getMonth(),i.getDate());if(l>a)return!0}return!1}function ya(e,t,n,o){const i=Cn(t,e),l=new Date(t,e,1),a=new Date(t,e,i);if(n){const c=new Date(n.getFullYear(),n.getMonth(),n.getDate());if(a<c)return!0}if(o){const c=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(l>c)return!0}return!1}function va(e,t,n){return!!(t&&e<t.getFullYear()||n&&e>n.getFullYear())}function Zn({value:e,onChange:t,minDate:n,maxDate:o,colorScheme:i="blue",haptic:l,disableHaptic:a=!1,...c}){const{trigger:f}=de(),u=()=>{!a&&l!==!1&&f(l??"selection")},d=i==="purple"?"#7700CC":"#0685FF",p=i==="purple"?"rgba(119,0,204,0.14)":"rgba(6,133,255,0.14)",[x,h]=U.useState(()=>e?new Date(e):new Date),[b,v]=U.useState("day"),[F,y]=U.useState(0);U.useEffect(()=>{e&&h(Y=>{const K=new Date(e);return Y.getFullYear()===K.getFullYear()&&Y.getMonth()===K.getMonth()?Y:K})},[e]);const j=x.getFullYear(),C=x.getMonth(),B=Math.floor(j/ht)*ht+F*ht,w=B+ht-1,D=!n||j>n.getFullYear()||j===n.getFullYear()&&C>n.getMonth(),E=!o||j<o.getFullYear()||j===o.getFullYear()&&C<o.getMonth(),A=()=>{u(),h(new Date(j,C-1,1))},M=()=>{u(),h(new Date(j,C+1,1))},z=()=>{u();const Y=new Date;h(Y),v("day"),t&&!jr(Y.getDate(),Y.getMonth(),Y.getFullYear(),n,o)&&t(Y)},T=Y=>{u(),h(new Date(j,Y,1)),v("day")},W=Y=>{u(),h(new Date(Y,C,1)),y(0),v("month")},R=I.default.useRef(null),k=Cn(j,C),P=ba(ma(j,C)),V=Cn(j,C-1),X=(P+k>35?42:35)-(P+k),g=(Y,K,le)=>e?e.getDate()===Y&&e.getMonth()===K&&e.getFullYear()===le:!1,O=new Date,H=(e&&e.getMonth()===C&&e.getFullYear()===j?e.getDate():null)??(O.getMonth()===C&&O.getFullYear()===j?O.getDate():1),m=Y=>{var xe;if(b!=="day")return;const K=Y.key;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(K))return;const le=R.current;if(!le)return;const J=Array.from(le.querySelectorAll('button[data-day-cell="true"]:not([disabled])'));if(J.length===0)return;const re=J.indexOf(document.activeElement);if(re<0)return;let ae=re;K==="ArrowLeft"&&(ae=Math.max(0,re-1)),K==="ArrowRight"&&(ae=Math.min(J.length-1,re+1)),K==="ArrowUp"&&(ae=Math.max(0,re-7)),K==="ArrowDown"&&(ae=Math.min(J.length-1,re+7)),K==="Home"&&(ae=0),K==="End"&&(ae=J.length-1),ae!==re&&(Y.preventDefault(),(xe=J[ae])==null||xe.focus())},N=()=>{const Y=[];for(let K=0;K<P;K++){const le=V-P+K+1;Y.push(r.jsx(sn,{day:le,isMuted:!0,accentColor:d,tabIndex:-1},`prev-${K}`))}for(let K=1;K<=k;K++){const le=jr(K,C,j,n,o),J=g(K,C,j),re=!le&&(J||K===H);Y.push(r.jsx(sn,{day:K,isActive:J,isDisabled:le,accentColor:d,accentLight:p,tabIndex:le?-1:re?0:-1,dataDayCell:!le,ariaLabel:`${an[C]} ${K}, ${j}`,onClick:le?void 0:()=>{u(),t==null||t(new Date(j,C,K))}},`curr-${K}`))}for(let K=1;K<=X;K++)Y.push(r.jsx(sn,{day:K,isMuted:!0,accentColor:d,tabIndex:-1},`next-${K}`));return Y},G=()=>r.jsx(s.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",mt:"2",children:ga.map((Y,K)=>{const le=K===C,J=ya(K,j,n,o);return r.jsx(Sr,{label:Y,isActive:le,isDisabled:J,accentColor:d,accentLight:p,onClick:()=>!J&&T(K)},Y)})}),Z=()=>{const Y=Array.from({length:ht},(K,le)=>B+le);return r.jsxs(r.Fragment,{children:[r.jsxs(s.Flex,{justify:"space-between",align:"center",mb:"3",children:[r.jsx(Tt,{direction:"prev",enabled:!0,accentColor:d,onClick:()=>{u(),y(K=>K-1)},ariaLabel:"Previous years"}),r.jsxs(s.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:[B," – ",w]}),r.jsx(Tt,{direction:"next",enabled:!0,accentColor:d,onClick:()=>{u(),y(K=>K+1)},ariaLabel:"Next years"})]}),r.jsx(s.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",children:Y.map(K=>{const le=K===j,J=va(K,n,o);return r.jsx(Sr,{label:String(K),isActive:le,isDisabled:J,accentColor:d,accentLight:p,onClick:()=>!J&&W(K)},K)})})]})};return r.jsxs(s.Box,{w:"100%",maxW:"360px",bg:"bg",borderRadius:"card",p:"5",fontFamily:"var(--font-body)",...c,children:[r.jsxs(s.Flex,{justify:"space-between",align:"center",mb:b==="day"?"6":"4",children:[r.jsxs(s.Flex,{align:"center",gap:"1",children:[b==="day"&&r.jsx(Tt,{direction:"prev",enabled:D,accentColor:d,onClick:A,ariaLabel:"Go to previous month"}),r.jsx(Cr,{label:an[C],isActive:b==="month",accentColor:d,accentLight:p,onClick:()=>{u(),v(Y=>Y==="month"?"day":"month"),y(0)}}),r.jsx(Cr,{label:String(j),isActive:b==="year",accentColor:d,accentLight:p,onClick:()=>{u(),v(Y=>Y==="year"?"day":"year"),y(0)}}),b==="day"&&r.jsx(Tt,{direction:"next",enabled:E,accentColor:d,onClick:M,ariaLabel:"Go to next month"})]}),r.jsx(s.chakra.button,{type:"button",onClick:z,px:"3",py:"1",fontSize:"sm",fontWeight:"medium",borderRadius:"md",border:"1px solid",borderColor:"border",color:"text.heading",bg:"transparent",cursor:"pointer",_hover:{bg:"bg.subtle"},children:"Today"})]}),b==="day"&&r.jsxs(r.Fragment,{children:[r.jsx(s.Flex,{mb:"3",children:xa.map(Y=>r.jsx(s.Box,{flex:"1",textAlign:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:Y},Y))}),r.jsx(s.Box,{ref:R,role:"grid","aria-label":`${an[C]} ${j}`,display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gapY:"2",onKeyDown:m,children:N()})]}),b==="month"&&G(),b==="year"&&Z()]})}function Tt({enabled:e,onClick:t,direction:n,accentColor:o,ariaLabel:i}){return r.jsx(s.chakra.button,{type:"button","aria-label":i??(n==="prev"?"Go to previous month":"Go to next month"),"aria-disabled":!e,disabled:!e,onClick:e?t:void 0,display:"flex",alignItems:"center",justifyContent:"center",w:"7",h:"7",borderRadius:"md",border:"none",bg:"transparent",cursor:e?"pointer":"not-allowed",color:e?"text.heading":"text.muted",opacity:e?1:.35,p:"0",flexShrink:0,_hover:e?{color:o,bg:"bg.subtle"}:void 0,transition:"all 0.15s",children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n==="prev"?r.jsx("path",{d:"M15 18l-6-6 6-6"}):r.jsx("path",{d:"M9 18l6-6-6-6"})})})}function Cr({label:e,isActive:t,accentColor:n,accentLight:o,onClick:i}){return r.jsxs(s.chakra.button,{type:"button",onClick:i,title:t?"Click to collapse":"Click to browse",display:"inline-flex",alignItems:"center",gap:"0.5",px:"2",py:"0.5",borderRadius:"md",border:"none",bg:t?o:"transparent",color:t?n:"text.heading",fontWeight:"semibold",fontSize:"15px",fontFamily:"var(--font-body)",cursor:"pointer",lineHeight:"1.4",_hover:t?void 0:{bg:o,color:n},transition:"all 0.15s",children:[e,r.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s",opacity:.7,marginTop:"1px"},children:r.jsx("path",{d:"M6 9l6 6 6-6"})})]})}function Sr({label:e,isActive:t,isDisabled:n,accentColor:o,accentLight:i,onClick:l}){return r.jsx(s.chakra.button,{type:"button",onClick:n?void 0:l,disabled:n,display:"flex",alignItems:"center",justifyContent:"center",h:"10",borderRadius:"md",border:"1.5px solid",borderColor:t?o:"transparent",bg:t?o:"transparent",color:t?"white":n?"text.muted":"text.heading",fontSize:"13px",fontWeight:t?"semibold":"medium",fontFamily:"var(--font-body)",cursor:n?"not-allowed":"pointer",opacity:n?.35:1,_hover:!n&&!t?{bg:i,color:o,borderColor:o}:void 0,transition:"all 0.15s",children:e})}function sn({day:e,isActive:t,isMuted:n,isDisabled:o,accentColor:i,accentLight:l,onClick:a,tabIndex:c,dataDayCell:f,ariaLabel:u}){const d=!n&&!o;return r.jsx(s.Flex,{justify:"center",align:"center",h:"10",role:"gridcell",children:r.jsx(s.chakra.button,{type:"button","data-day-cell":f?"true":void 0,"aria-label":u,"aria-selected":t||void 0,"aria-disabled":!d||void 0,tabIndex:c??(d?0:-1),display:"flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"full",border:"none",fontSize:"sm",fontWeight:"medium",onClick:a,disabled:n||o,cursor:n?"default":o?"not-allowed":"pointer",opacity:o?.35:1,style:{background:t?i:"transparent",color:t?"#ffffff":void 0,transition:"background 0.15s, color 0.15s"},color:t?void 0:n||o?"text.muted":"text.heading",_hover:!n&&!o&&!t?{bg:l,color:i}:void 0,transition:"all 0.2s",children:e})})}function ka({value:e,onChange:t,min:n,max:o,label:i,helperText:l,errorMessage:a,colorScheme:c="blue",isInvalid:f=!1,isDisabled:u=!1,placeholder:d="Select date",id:p,includeTime:x=!1,haptic:h,disableHaptic:b=!1,"aria-label":v,"aria-labelledby":F,"aria-describedby":y,"aria-invalid":j,"aria-required":C}){const{trigger:S}=de(),[B,w]=U.useState(!1),D=U.useRef(null),E=V=>V!=null&&V.includes("T")&&V.split("T")[1].slice(0,5)||"00:00";U.useEffect(()=>{function V(Q){D.current&&!D.current.contains(Q.target)&&w(!1)}return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[]);const M=f?"#DC2626":B?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",z="none",T=V=>{const Q=V.getFullYear(),X=String(V.getMonth()+1).padStart(2,"0"),g=String(V.getDate()).padStart(2,"0");x?t==null||t(`${Q}-${X}-${g}T${E(e)}`):(t==null||t(`${Q}-${X}-${g}`),w(!1))},W=V=>{const Q=V.target.value,X=(e==null?void 0:e.split("T")[0])??"";X&&(t==null||t(`${X}T${Q}`))},R=V=>{if(!V)return;const[Q,X,g]=V.split("-"),O=Number(Q),H=Number(X),m=Number(g==null?void 0:g.split("T")[0]);if(!Number.isInteger(O)||!Number.isInteger(H)||!Number.isInteger(m))return;const N=new Date(O,H-1,m);if(!(N.getFullYear()!==O||N.getMonth()!==H-1||N.getDate()!==m))return N},k=R(e==null?void 0:e.split("T")[0]),P=k&&!isNaN(k.getTime())?x&&(e!=null&&e.includes("T"))?`${k.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})} ${e.split("T")[1].slice(0,5)}`:k.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:B?1e3:void 0,ref:D,children:[i&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),r.jsxs(s.Box,{position:"relative",children:[r.jsx("input",{id:p,readOnly:!0,type:"text",value:P,placeholder:d,disabled:u,"aria-label":v,"aria-labelledby":F,"aria-describedby":y,"aria-invalid":f||j||void 0,"aria-required":C,"aria-haspopup":"dialog","aria-expanded":B,onClick:()=>{u||(!b&&h!==!1&&S(h??"selection"),w(!B))},onKeyDown:V=>{u||(V.key==="Enter"||V.key===" "||V.key==="ArrowDown"?(V.preventDefault(),!b&&h!==!1&&S(h??"selection"),w(!0)):V.key==="Escape"&&w(!1))},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${M}`,boxShadow:z,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:u?"not-allowed":"pointer",opacity:u?.5:1,colorScheme:"auto"}}),r.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),r.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),r.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),r.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})})]}),B&&r.jsxs(s.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",children:[r.jsx(Zn,{value:k,onChange:T,minDate:R(n),maxDate:R(o),colorScheme:c,haptic:h,disableHaptic:b}),x&&r.jsxs(s.Box,{px:"5",pb:"4",borderTop:"1px solid",borderColor:"border",children:[r.jsx(s.Text,{fontSize:"xs",fontWeight:"medium",color:"text.muted",mb:"1.5",fontFamily:"var(--font-body)",children:"Time"}),r.jsx("input",{type:"time",value:E(e),onChange:W,disabled:!k,style:{width:"100%",height:"36px",padding:"0 12px",borderRadius:"8px",border:"1.5px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"14px",fontFamily:"var(--font-body)",outline:"none",opacity:k?1:.4,cursor:k?"default":"not-allowed",colorScheme:"auto"}})]})]}),(l||a)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?a:l})]})}function wa({startValue:e,onStartChange:t,endValue:n,onEndChange:o,min:i,max:l,label:a,helperText:c,errorMessage:f,colorScheme:u="blue",isInvalid:d=!1,isDisabled:p=!1,startPlaceholder:x="Start date",endPlaceholder:h="End date",id:b,haptic:v,disableHaptic:F=!1,"aria-label":y,"aria-labelledby":j,"aria-describedby":C,"aria-invalid":S,"aria-required":B}){const{trigger:w}=de(),[D,E]=U.useState(null),A=U.useRef(null);U.useEffect(()=>{function N(G){A.current&&!A.current.contains(G.target)&&E(null)}return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const z=d?"#DC2626":D?u==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",T="none",W={flex:1,height:"100%",padding:"0 10px",background:"transparent",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",border:"none",outline:"none",cursor:p?"not-allowed":"pointer",colorScheme:"auto",width:"100%"},R=N=>{const G=N.getFullYear(),Z=String(N.getMonth()+1).padStart(2,"0"),Y=String(N.getDate()).padStart(2,"0");return`${G}-${Z}-${Y}`},k=N=>i&&N<i?i:l&&N>l?l:N,P=N=>{const G=k(R(N));D==="start"?(t==null||t(G),n&&n<G&&(o==null||o("")),E("end")):D==="end"&&(o==null||o(G),e&&e>G&&(t==null||t("")),E(null))},V=N=>{if(!N)return;const[G,Z,Y]=N.split("-").map(Number);if(!G||Z<1||Z>12||Y<1||Y>31)return;const K=new Date(G,Z-1,Y);if(!(K.getFullYear()!==G||K.getMonth()!==Z-1||K.getDate()!==Y))return K},X=V(D==="start"?e:n),g=V(e),O=V(n),H=g?g.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",m=O?O.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:D?1e3:void 0,ref:A,children:[a&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),r.jsxs(s.Box,{display:"flex",alignItems:"center",position:"relative",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${z}`,boxShadow:T,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:p?.5:1,overflow:"hidden"},children:[r.jsx("input",{id:b,readOnly:!0,type:"text",value:H,placeholder:x,disabled:p,"aria-label":y?`${y} start date`:void 0,"aria-labelledby":j,"aria-describedby":C,"aria-invalid":d||S||void 0,"aria-required":B,"aria-haspopup":"dialog","aria-expanded":D==="start",onClick:()=>{p||(!F&&v!==!1&&w(v??"selection"),E("start"))},onKeyDown:N=>{p||(N.key==="Enter"||N.key===" "||N.key==="ArrowDown"?(N.preventDefault(),!F&&v!==!1&&w(v??"selection"),E("start")):N.key==="Escape"&&E(null))},style:{...W,textAlign:"center"}}),r.jsx(s.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),r.jsx("input",{readOnly:!0,type:"text",value:m,placeholder:h,disabled:p,"aria-label":y?`${y} end date`:void 0,"aria-labelledby":j,"aria-describedby":C,"aria-invalid":d||S||void 0,"aria-required":B,"aria-haspopup":"dialog","aria-expanded":D==="end",onClick:()=>{p||(!F&&v!==!1&&w(v??"selection"),E("end"))},onKeyDown:N=>{p||(N.key==="Enter"||N.key===" "||N.key==="ArrowDown"?(N.preventDefault(),!F&&v!==!1&&w(v??"selection"),E("end")):N.key==="Escape"&&E(null))},style:{...W,textAlign:"center"}})]}),D&&r.jsx(s.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",children:r.jsx(Zn,{value:X,onChange:P,minDate:D==="end"?g??V(i):V(i),maxDate:V(l),colorScheme:u,haptic:v,disableHaptic:F})}),(c||f)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:d?"red.500":"text.muted",fontFamily:"var(--font-body)",children:d?f:c})]})}const ja=r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("polyline",{points:"6 9 12 15 18 9"})});function Ca({options:e,value:t,onChange:n,placeholder:o="Search...",label:i,helperText:l,errorMessage:a,colorScheme:c="blue",isInvalid:f=!1,isDisabled:u=!1,haptic:d,disableHaptic:p=!1,id:x,name:h,"aria-label":b,"aria-labelledby":v,"aria-describedby":F,"aria-invalid":y,"aria-required":j}){const{trigger:C}=de(),[S,B]=U.useState(!1),[w,D]=U.useState(""),[E,A]=U.useState(-1),M=U.useRef(null);U.useEffect(()=>{if(t){const k=e.find(P=>P.value===t);k&&D(k.label)}},[t,e]),U.useEffect(()=>{function k(P){if(M.current&&!M.current.contains(P.target))if(B(!1),t){const V=e.find(Q=>Q.value===t);V&&D(V.label)}else D("")}return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[t,e]);const z=e.filter(k=>k.label.toLowerCase().includes(w.toLowerCase()));U.useEffect(()=>{A(S&&z.length>0?0:-1)},[S,w,z.length]);const W=f?"#DC2626":S?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:S?1e3:void 0,ref:M,children:[i&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),r.jsxs(s.Box,{position:"relative",children:[r.jsx("input",{id:x,name:h,type:"text",value:w,placeholder:o,disabled:u,role:"combobox","aria-expanded":S,"aria-controls":x?`${x}-listbox`:void 0,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-label":b,"aria-labelledby":v,"aria-describedby":F,"aria-invalid":f||y||void 0,"aria-required":j,onChange:k=>{D(k.target.value),B(!0),k.target.value||n==null||n("")},onFocus:()=>B(!0),onKeyDown:k=>{if(k.key==="Escape")k.preventDefault(),B(!1);else if(k.key==="ArrowDown"){if(k.preventDefault(),!S){B(!0);return}A(P=>z.length===0?-1:P<0?0:(P+1)%z.length)}else if(k.key==="ArrowUp"){if(k.preventDefault(),!S){B(!0);return}A(P=>z.length===0?-1:P<=0?z.length-1:P-1)}else if(k.key==="Enter"&&S){const P=z[E];P&&(k.preventDefault(),!p&&d!==!1&&P.value!==t&&C(d??"selection"),n==null||n(P.value),D(P.label),B(!1))}},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${W}`,boxShadow:"none",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:u?"not-allowed":"text",opacity:u?.5:1}}),r.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:ja})]}),S&&!u&&r.jsx(s.Box,{id:x?`${x}-listbox`:void 0,role:"listbox",position:"absolute",zIndex:1e3,top:"100%",left:"0",right:"0",mt:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",boxShadow:"none",maxH:"200px",overflowY:"auto",py:"1",children:z.length>0?z.map((k,P)=>{const V=k.value===t,Q=P===E;return r.jsx(s.Box,{role:"option","aria-selected":V,px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",bg:Q||V?"bg.subtle":void 0,_hover:{bg:"bg.subtle"},onMouseEnter:()=>A(P),onClick:()=>{!p&&d!==!1&&k.value!==t&&C(d??"selection"),n==null||n(k.value),D(k.label),B(!1)},children:k.label},k.value)}):r.jsx(s.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(l||a)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?a:l})]})}const Sa=r.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),r.jsx("polyline",{points:"17 8 12 3 7 8"}),r.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function Ba({accept:e,multiple:t=!1,maxSize:n,label:o,helperText:i,errorMessage:l,colorScheme:a="blue",isInvalid:c=!1,isDisabled:f=!1,onChange:u,dropzoneTitle:d="Click or drag to upload",id:p,haptic:x,disableHaptic:h=!1,"aria-label":b,"aria-labelledby":v,"aria-describedby":F,"aria-invalid":y,"aria-required":j}){const{trigger:C}=de(),[S,B]=I.default.useState(!1),[w,D]=I.default.useState([]),E=I.default.useRef(null),A=g=>{g.preventDefault(),f||B(!0)},M=g=>{g.preventDefault(),f||B(!0)},z=g=>{g.preventDefault(),B(!1)},[T,W]=I.default.useState(null),R=g=>{if(!g||g.length===0)return;const O=Array.from(g);W(null);const H=O.find(N=>n&&N.size>n);if(H&&n){const N=Math.round(n/1048576);W(`File "${H.name}" exceeds the maximum limit of ${N}MB.`),!h&&x!==!1&&C(x??"error")}const m=O.filter(N=>!(n&&N.size>n));m.length>0&&(D(m.map(N=>N.name)),!h&&x!==!1&&C(x??"impactLight"),u==null||u(m))},k=g=>{g.preventDefault(),B(!1),!f&&R(g.dataTransfer.files)},P=g=>{R(g.target.files),g.target.value=""},V=a==="purple"?"purple.500":"blue.500",Q=c?"red.500":S?V:"border",X=S?"bg.subtle":"transparent";return r.jsxs(s.Box,{w:"100%",children:[o&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),r.jsxs(s.Box,{position:"relative",border:"1.5px dashed",borderColor:Q,borderRadius:"xl",bg:X,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:f?.5:1,cursor:f?"not-allowed":"pointer",_hover:f?void 0:{borderColor:V,bg:"bg.subtle"},onDragEnter:A,onDragOver:M,onDragLeave:z,onDrop:k,onClick:()=>{var g;return!f&&((g=E.current)==null?void 0:g.click())},children:[r.jsx("input",{ref:E,id:p,type:"file",accept:e,multiple:t,disabled:f,"aria-label":b,"aria-labelledby":v,"aria-describedby":F,"aria-invalid":c||y||void 0,"aria-required":j,style:{display:"none"},onChange:P}),r.jsx(s.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:Sa}),r.jsx(s.Text,{fontSize:"sm",fontWeight:"medium",color:S?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:d}),r.jsxs(s.Text,{fontSize:"xs",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:[e?`Accepts ${e}`:"All file types supported",n&&` up to ${Math.round(n/1024/1024)}MB`]}),w.length>0&&r.jsxs(s.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[r.jsxs(s.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",w.length>1?"s":"",":"]}),w.map((g,O)=>r.jsx(s.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:g},O))]})]}),(i||l||T)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:c||T?"red.500":"text.muted",fontFamily:"var(--font-body)",children:T||(c?l:i)})]})}const Br={sm:{minH:"34px",py:"1",px:"2.5",fontSize:"13px",tagPy:"1px",tagPx:"2",tagFontSize:"12px"},md:{minH:"42px",py:"1.5",px:"3",fontSize:"14px",tagPy:"2px",tagPx:"2.5",tagFontSize:"12px"},lg:{minH:"48px",py:"2",px:"4",fontSize:"15px",tagPy:"3px",tagPx:"3",tagFontSize:"13px"}},Fr={blue:{focusBorder:"#0685FF",tagBgLight:"#EBF5FF",tagBgDark:"rgba(6, 133, 255, 0.18)",tagTextLight:"#0062CC",tagTextDark:"#60A5FA",tagBorderLight:"rgba(6, 133, 255, 0.25)",tagBorderDark:"rgba(6, 133, 255, 0.35)"},purple:{focusBorder:"#7700CC",tagBgLight:"#F3E8FF",tagBgDark:"rgba(119, 0, 204, 0.18)",tagTextLight:"#5B0099",tagTextDark:"#C084FC",tagBorderLight:"rgba(119, 0, 204, 0.25)",tagBorderDark:"rgba(119, 0, 204, 0.35)"}};function Yo({value:e=[],onChange:t,placeholder:n="Add tag...",label:o,helperText:i,errorMessage:l,isInvalid:a=!1,colorScheme:c="blue",size:f="md",isDisabled:u=!1,isReadOnly:d=!1,maxTags:p,allowDuplicates:x=!1,addOnBlur:h=!1,delimiter:b=",",id:v,name:F,haptic:y,disableHaptic:j=!1,style:C,className:S,"aria-label":B,"aria-labelledby":w,"aria-describedby":D,"aria-invalid":E,"aria-required":A}){const{trigger:M}=de(),z=I.default.useId(),T=v??z,[W,R]=U.useState(""),[k,P]=U.useState(!1),V=U.useRef(null),Q=Fr[c]??Fr.blue,X=Br[f]??Br.md,g=G=>{if(u||d)return;const Z=G.trim();if(Z&&!(p!=null&&e.length>=p)){if(!x&&e.includes(Z)){R("");return}!j&&y!==!1&&M(y??"selection"),t([...e,Z]),R("")}},O=G=>{u||d||(!j&&y!==!1&&M(y??"selection"),t(e.filter((Z,Y)=>Y!==G)))},H=G=>{G.key==="Enter"||b&&G.key===b?(G.preventDefault(),g(W)):G.key==="Backspace"&&!W&&e.length>0&&O(e.length-1)},m=()=>{P(!1),h&&W.trim()&&g(W)},N=a?"#DC2626":k?Q.focusBorder:"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",style:C,className:S,children:[o&&r.jsx("label",{htmlFor:T,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:o}),r.jsxs(s.Box,{onClick:()=>{var G;return!u&&((G=V.current)==null?void 0:G.focus())},display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",minH:X.minH,py:X.py,px:X.px,borderRadius:"10px",bg:"bg",cursor:u?"not-allowed":"text",opacity:u?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${N}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[e.map((G,Z)=>r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:X.tagPx,py:X.tagPy,borderRadius:"full",fontSize:X.tagFontSize,fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",whiteSpace:"nowrap",bg:c==="purple"?"purple.50":"blue.50",color:c==="purple"?"purple.700":"blue.700",border:"1px solid",borderColor:c==="purple"?"purple.200":"blue.200",_dark:{bg:c==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:c==="purple"?"purple.300":"blue.300",borderColor:c==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[r.jsx(s.Box,{as:"span","aria-hidden":"true",w:"6px",h:"6px",borderRadius:"full",flexShrink:0,bg:c==="purple"?"purple.500":"blue.500",_dark:{bg:c==="purple"?"purple.300":"blue.300"}}),r.jsx("span",{children:G}),!u&&!d&&r.jsx("button",{type:"button",onClick:Y=>{Y.stopPropagation(),O(Z)},"aria-label":`Remove ${G}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:"transparent",border:"none",padding:"0",marginLeft:"2px",cursor:"pointer",opacity:.7,color:"inherit",fontSize:"14px",lineHeight:1,transition:"opacity 0.1s ease"},onMouseEnter:Y=>{Y.currentTarget.style.opacity="1"},onMouseLeave:Y=>{Y.currentTarget.style.opacity="0.7"},children:"×"})]},`${G}-${Z}`)),!u&&!d&&r.jsx("input",{ref:V,id:T,name:F,type:"text",value:W,onChange:G=>R(G.target.value),onKeyDown:H,onFocus:()=>P(!0),onBlur:m,placeholder:e.length===0?n:"",disabled:u,readOnly:d,"aria-label":B,"aria-labelledby":w,"aria-describedby":D,"aria-invalid":a||E||void 0,"aria-required":A,style:{flex:1,minWidth:"120px",border:"none",outline:"none",background:"transparent",fontSize:X.fontSize,fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:0}})]}),(i||l)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?l:i})]})}const Fa=Yo;function it(e){if(!e)return"";if(!/<[a-z][\s\S]*>/i.test(e))return e;function t(n){if(n.type==="text")return n.data;if(!("name"in n)||!("attribs"in n))return"";const o=n.children.map(t).join("");switch(n.name.toLowerCase()){case"h1":return`# ${o.trim()}
287
+ `,fill:e})})}const ln={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Yn=I.default.forwardRef(({size:e="md",colorScheme:t="blue",leftElement:n,rightElement:o,isInvalid:i,errorMessage:l,...a},c)=>{const d=!!n,u=!!o,f=t==="purple"?"purple.500":"blue.500";return r.jsxs(s.Box,{w:"100%",children:[r.jsxs(s.Box,{position:"relative",children:[d&&r.jsx(s.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n}),r.jsx(s.Input,{ref:c,...ln[e],pl:d?"10":ln[e].px,pr:u?"10":ln[e].px,bg:"bg",border:"1px solid",borderColor:i?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:i?"red.500":f,boxShadow:"none",outline:"none"},_dark:{bg:"bg",borderColor:i?"red.500":"border",color:"text.heading"},...a}),u&&r.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:o})]}),i&&l&&r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:l})]})});Yn.displayName="MedixInput";const Kn=I.default.forwardRef(({placeholder:e="Search…",...t},n)=>r.jsx(Yn,{ref:n,type:"search",placeholder:e,leftElement:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));Kn.displayName="MedixSearchInput";const Ke="medix_textarea_draft_";function _o(e,t,n,o){if(e)return e;if(t)return`id_${t}`;if(n)return`name_${n}`;if(o){const i=o.toLowerCase().trim().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");if(i)return`ph_${i}`}return"default"}function Ho(e){if(!(typeof window>"u"))try{const t=e.startsWith(Ke)?e:`${Ke}${e}`;window.localStorage.removeItem(t)}catch{}}function Wo(e,t){if(typeof window>"u")return null;try{const n=e.startsWith(Ke)?e:`${Ke}${e}`,o=window.localStorage.getItem(n);if(!o)return null;const i=JSON.parse(o);return!i||typeof i.content!="string"?null:t&&t>0&&i.updatedAt&&Date.now()-i.updatedAt>t?(window.localStorage.removeItem(n),null):i}catch{return null}}function jn(e,t){if(!(typeof window>"u"))try{const n=e.startsWith(Ke)?e:`${Ke}${e}`;window.localStorage.setItem(n,JSON.stringify(t))}catch{}}const qo=I.default.forwardRef(({colorScheme:e="blue",isInvalid:t,errorMessage:n,maxLength:o,showCount:i=!1,onChange:l,value:a,defaultValue:c,storageKey:d,persistDraft:u=!0,debounceMs:f=400,draftMaxAgeMs:h=10080*60*1e3,showDraftStatus:x=!1,onDraftRestored:p,id:b,name:v,placeholder:B,disabled:y=!1,readOnly:S=!1,...j},C)=>{const F=a!==void 0,[w,D]=I.default.useState(()=>F&&typeof a=="string"?a:typeof c=="string"?c:""),E=F?typeof a=="string"?a:"":w,[z,N]=I.default.useState(E.length),[R,T]=I.default.useState("idle"),q=I.default.useRef(null);I.default.useImperativeHandle(C,()=>q.current);const M=I.default.useMemo(()=>_o(d,b,v,B),[d,b,v,B]),k=I.default.useRef(null),P=I.default.useRef(null),$=I.default.useRef(!1),Q=I.default.useCallback(H=>{if(!u||y||S)return;if(!H||H.trim()===""){P.current&&(clearTimeout(P.current),P.current=null),k.current=null,Ho(M),T("idle");return}k.current=H,T("saving"),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{k.current!==null&&(jn(M,{content:k.current,updatedAt:Date.now(),version:1}),k.current=null,T("saved"))},f)},[u,y,S,M,f]);I.default.useEffect(()=>{if(!u)return;const H=()=>{P.current&&(clearTimeout(P.current),P.current=null),k.current!==null&&(jn(M,{content:k.current,updatedAt:Date.now(),version:1}),k.current=null,T("saved"))};return typeof window<"u"&&(window.addEventListener("beforeunload",H),window.addEventListener("pagehide",H)),()=>{typeof window<"u"&&(window.removeEventListener("beforeunload",H),window.removeEventListener("pagehide",H)),H()}},[u,M]),I.default.useEffect(()=>{if($.current||!u||y||S)return;$.current=!0;const H=Wo(M,h);if(!(!H||!H.content||H.content.trim()==="")&&!(F&&typeof a=="string"&&a.trim()!==""&&a===H.content)){if(F||D(H.content),N(H.content.length),q.current&&(q.current.value=H.content),l){const A={target:{value:H.content,name:v},currentTarget:{value:H.content,name:v}};l(A)}T("saved"),p==null||p(H)}},[u,y,S,M,h,F,a,v,l,p]),I.default.useEffect(()=>{F&&typeof a=="string"&&N(a.length)},[F,a]);const J=e==="purple"?"purple.500":"blue.500",g=H=>{const A=H.target.value;F||D(A),N(A.length),l==null||l(H),Q(A)};return r.jsxs(s.Box,{w:"100%",children:[r.jsx(s.Textarea,{ref:q,id:b,name:v,placeholder:B,disabled:y,readOnly:S,bg:"bg",border:"1px solid",borderColor:t?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:o,value:F?a:w,onChange:g,_placeholder:{color:"text.muted"},_focus:{borderColor:t?"red.500":J,boxShadow:"none",outline:"none"},_dark:{bg:"bg",borderColor:t?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...j}),r.jsxs(s.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[t&&n?r.jsx(s.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:n}):x&&R!=="idle"?r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",children:[r.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:R==="saving"?"orange.400":"green.500"}),r.jsx(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:R==="saving"?"Saving draft...":"Draft saved"})]}):r.jsx("span",{}),i&&o&&r.jsxs(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[z,"/",o]})]})]})});qo.displayName="MedixTextarea";const Jl={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}};function Ql(e){const{options:t=[],placeholder:n="Select option...",isInvalid:o=!1,errorMessage:i,size:l="md",colorScheme:a="blue",icon:c,value:d,defaultValue:u,onChange:f,searchOptions:h,disabled:x=!1,haptic:p,disableHaptic:b=!1,name:v,id:B,...y}=e,{trigger:S}=de(),[j,C]=I.default.useState(!1),[F,w]=I.default.useState(""),[D,E]=I.default.useState(-1),[z,N]=I.default.useState(()=>typeof u=="string"?u:Array.isArray(u)?u[0]??"":""),R=I.default.useRef(null),T=I.default.useRef(null),q=I.default.useRef(null),M=d!==void 0,k=M?typeof d=="string"?d:Array.isArray(d)?d[0]??"":"":z,P=t.find(A=>A.value===k);I.default.useEffect(()=>{function A(m){R.current&&!R.current.contains(m.target)&&C(!1)}return j&&document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[j]),I.default.useEffect(()=>{if(j){const A=setTimeout(()=>{var m;return(m=T.current)==null?void 0:m.focus()},50);return()=>clearTimeout(A)}else w("")},[j]);const $=A=>{x||(!b&&p!==!1&&A!==k&&S(p??"selection"),M||N(A),f==null||f(A),C(!1))},Q=I.default.useMemo(()=>{if(!F.trim())return t;if(h)return h(t,F);const A=F.toLowerCase().trim();return t.filter(m=>m.label.toLowerCase().includes(A))},[t,F,h]);I.default.useLayoutEffect(()=>{h&&q.current&&(q.current.scrollTop=0)},[F,h]);const J=a==="purple"?"#7700CC":"#0685FF",g=o?"#DC2626":j?J:"var(--medix-form-border)",H=Jl[l];return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:j?1e3:void 0,ref:R,children:[v&&r.jsx("input",{type:"hidden",name:v,id:B,value:k}),r.jsxs(s.Box,{...y,role:"combobox","aria-haspopup":"listbox","aria-expanded":j,"aria-controls":B?`${B}-listbox`:void 0,"aria-invalid":o?!0:y["aria-invalid"],"aria-disabled":x||void 0,tabIndex:x?-1:0,onClick:()=>{x||(!b&&p!==!1&&S(p??"selection"),C(!j))},onKeyDown:A=>{x||(A.key==="Enter"||A.key===" "?(A.preventDefault(),!b&&p!==!1&&S(p??"selection"),C(m=>!m)):A.key==="Escape"&&j&&(A.preventDefault(),C(!1)))},display:"flex",alignItems:"center",justifyContent:"space-between",h:H.h,px:H.px,borderRadius:"md",bg:"bg",cursor:x?"not-allowed":"pointer",opacity:x?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${g}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",flex:"1",minW:"0",children:[c&&r.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,children:c}),P?r.jsx(s.Text,{fontSize:H.fontSize,color:"text.heading",fontFamily:"var(--font-body)",truncate:!0,fontWeight:"500",children:P.label}):r.jsx(s.Text,{fontSize:H.fontSize,color:"text.muted",fontFamily:"var(--font-body)",truncate:!0,children:n})]}),r.jsx(s.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",flexShrink:0,style:{transform:j?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),j&&r.jsxs(s.Box,{id:B?`${B}-listbox`:void 0,role:"listbox",position:"absolute",top:"100%",left:"0",right:"0",mt:"1.5",maxH:"280px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[t.length>5&&r.jsx(s.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:r.jsxs(s.Box,{position:"relative",display:"flex",alignItems:"center",children:[r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),r.jsx("input",{ref:T,type:"text",placeholder:"Search...",value:F,onChange:A=>w(A.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),r.jsx(s.Box,{ref:q,overflowY:"auto",flex:"1",py:"1",children:Q.length===0?r.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):Q.map((A,m)=>{const O=A.value===k,G=m===D;return r.jsxs("button",{type:"button",role:"option","aria-selected":O,disabled:A.disabled,onClick:()=>$(A.value),onMouseEnter:()=>E(m),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:G||O?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:A.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:A.disabled?.5:1,transition:"background 0.1s ease"},children:[r.jsx("span",{style:{fontWeight:O?600:400},children:A.label}),O&&r.jsx("span",{style:{color:J,fontWeight:700,fontSize:"14px"},children:"✓"})]},A.value)})})]}),o&&i&&r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})}function ea(e){const{options:t=[],placeholder:n="Select options...",isInvalid:o=!1,errorMessage:i,size:l="md",colorScheme:a="blue",icon:c,value:d,defaultValue:u,onChange:f,disabled:h=!1,haptic:x,disableHaptic:p=!1,name:b,id:v,...B}=e,[y,S]=I.default.useState(!1),[j,C]=I.default.useState(""),[F,w]=I.default.useState(-1),[D,E]=I.default.useState(()=>Array.isArray(u)?u:typeof u=="string"&&u?[u]:[]),z=I.default.useRef(null),N=I.default.useRef(null),R=d!==void 0,T=R?Array.isArray(d)?d:typeof d=="string"&&d?[d]:[]:D;I.default.useEffect(()=>{function A(m){z.current&&!z.current.contains(m.target)&&S(!1)}return y&&document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[y]),I.default.useEffect(()=>{if(y){w(0);const A=setTimeout(()=>{var m;return(m=N.current)==null?void 0:m.focus()},50);return()=>clearTimeout(A)}else C(""),w(-1)},[y]);const q=A=>{if(h)return;const O=T.includes(A)?T.filter(G=>G!==A):[...T,A];!p&&x!==!1&&P(x??"selection"),R||E(O),f==null||f(O)},M=(A,m)=>{if(m.stopPropagation(),h)return;!p&&x!==!1&&P(x??"selection");const O=T.filter(G=>G!==A);R||E(O),f==null||f(O)},k=I.default.useMemo(()=>{if(!j.trim())return t;const A=j.toLowerCase().trim();return t.filter(m=>m.label.toLowerCase().includes(A))},[t,j]);I.default.useEffect(()=>{w(k.length>0?0:-1)},[k.length,j]);const{trigger:P}=de(),$=a==="purple"?"#7700CC":"#0685FF",Q=o?"#DC2626":y?$:"var(--medix-form-border)",J=a==="purple"?"purple.50":"blue.50",g=a==="purple"?"purple.700":"blue.700",H=a==="purple"?"purple.200":"blue.200";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:y?1e3:void 0,ref:z,children:[b&&r.jsx("input",{type:"hidden",name:b,id:v,value:T.join(",")}),r.jsxs(s.Box,{...B,role:"combobox","aria-haspopup":"listbox","aria-expanded":y,"aria-controls":v?`${v}-listbox`:void 0,"aria-invalid":o?!0:B["aria-invalid"],"aria-disabled":h||void 0,tabIndex:h?-1:0,onClick:()=>{h||(!p&&x!==!1&&P(x??"selection"),S(!y))},onKeyDown:A=>{if(!h){if(!y){(A.key==="Enter"||A.key===" "||A.key==="ArrowDown"||A.key==="ArrowUp")&&(A.preventDefault(),!p&&x!==!1&&P(x??"selection"),S(!0));return}if(A.key==="Escape")A.preventDefault(),S(!1);else if(A.key==="ArrowDown")A.preventDefault(),w(m=>{const O=k.length;return O===0?-1:m<0?0:(m+1)%O});else if(A.key==="ArrowUp")A.preventDefault(),w(m=>{const O=k.length;return O===0?-1:m<=0?O-1:m-1});else if(A.key==="Enter"){A.preventDefault();const m=k[F];m&&!m.disabled&&q(m.value)}}},display:"flex",alignItems:"center",justifyContent:"space-between",minH:l==="sm"?"34px":l==="lg"?"48px":"42px",py:"1.5",px:"3",borderRadius:"md",bg:"bg",cursor:h?"not-allowed":"pointer",opacity:h?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${Q}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"1.5",flex:"1",minW:"0",children:[c&&r.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",mr:"1",children:c}),T.length===0?r.jsx(s.Text,{fontSize:l==="sm"?"xs":"sm",color:"text.muted",fontFamily:"var(--font-body)",children:n}):T.map(A=>{const m=t.find(G=>G.value===A),O=m?m.label:A;return r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:"2.5",py:"0.5",borderRadius:"full",fontSize:"xs",fontWeight:"500",fontFamily:"var(--font-body)",bg:J,color:g,border:"1px solid",borderColor:H,_dark:{bg:a==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:a==="purple"?"purple.300":"blue.300",borderColor:a==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[r.jsx("span",{children:O}),!h&&r.jsx("button",{type:"button",onClick:G=>M(A,G),"aria-label":`Remove ${O}`,style:{background:"transparent",border:"none",padding:0,marginLeft:"2px",cursor:"pointer",color:"inherit",fontSize:"13px",lineHeight:1,opacity:.75},onMouseEnter:G=>G.currentTarget.style.opacity="1",onMouseLeave:G=>G.currentTarget.style.opacity="0.75",children:"×"})]},A)})]}),r.jsx(s.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",style:{transform:y?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),y&&r.jsxs(s.Box,{id:v?`${v}-listbox`:void 0,role:"listbox",position:"absolute",top:"100%",left:"0",right:"0",mt:"1.5",maxH:"280px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[t.length>5&&r.jsx(s.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:r.jsxs(s.Box,{position:"relative",display:"flex",alignItems:"center",children:[r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),r.jsx("input",{ref:N,type:"text",placeholder:"Search options...",value:j,onChange:A=>C(A.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),r.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:k.length===0?r.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):k.map((A,m)=>{const O=T.includes(A.value),G=m===F;return r.jsxs("button",{type:"button",role:"option","aria-selected":O,disabled:A.disabled,onClick:()=>q(A.value),onMouseEnter:()=>w(m),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:G||O?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:A.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:A.disabled?.5:1,transition:"background 0.1s ease"},children:[r.jsx("span",{style:{fontWeight:O?600:400},children:A.label}),O&&r.jsx("span",{style:{color:$,fontWeight:700,fontSize:"14px"},children:"✓"})]},A.value)})})]}),o&&i&&r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})}function ta(e){return e.multiple?r.jsx(ea,{...e}):r.jsx(Ql,{...e})}const Vo={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",tint:"#E8F3FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",tint:"#F9F0FF"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",tint:"#F0FDF4"}},$o=I.default.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,indeterminate:l=!1,haptic:a,disableHaptic:c=!1,children:d,description:u,name:f,value:h,id:x,"aria-label":p,"aria-labelledby":b,"aria-describedby":v,"aria-invalid":B,"aria-required":y},S)=>{const{trigger:j}=de(),C=Vo[e],F=x??I.default.useId(),[w,D]=I.default.useState(n),[E,z]=I.default.useState(!1),N=t!==void 0?t:w,R=q=>{!i&&!c&&a!==!1&&j(a??"selection"),t===void 0&&D(q.target.checked),o==null||o(q.target.checked)},T={width:18,height:18,borderRadius:4,border:`2px solid ${N||l?C.solid:"var(--medix-form-border, #CBD5E1)"}`,background:N||l?C.solid:"transparent",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:"none",pointerEvents:"none"};return r.jsxs(s.Box,{opacity:i?.55:1,children:[r.jsxs("label",{htmlFor:F,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[r.jsx("input",{ref:S,id:F,type:"checkbox",name:f,value:h,checked:N,disabled:i,"aria-label":p,"aria-labelledby":b,"aria-describedby":v,"aria-invalid":B,"aria-required":y,onChange:R,onFocus:()=>z(!0),onBlur:()=>z(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{style:T,"aria-hidden":"true",children:l?r.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:r.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):N?r.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:r.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),d&&r.jsxs(s.Box,{children:[r.jsx(s.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:d}),u&&r.jsx(s.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u})]})]}),!d&&u&&r.jsx(s.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:u})]})});$o.displayName="MedixCheckbox";function na({name:e,value:t,onChange:n,options:o,colorScheme:i="blue",direction:l="column",haptic:a,disableHaptic:c=!1,id:d,"aria-label":u,"aria-labelledby":f,"aria-describedby":h,"aria-invalid":x,"aria-required":p}){const{trigger:b}=de(),v=Vo[i],[B,y]=I.default.useState(""),S=t!==void 0?t:B,j=C=>{!c&&a!==!1&&C!==S&&b(a??"selection"),t===void 0&&y(C),n==null||n(C)};return r.jsx(s.Box,{id:d,display:"flex",flexDirection:l,gap:l==="row"?"5":"3",role:"radiogroup","aria-label":u,"aria-labelledby":f,"aria-describedby":h,"aria-invalid":x,"aria-required":p,children:o.map(C=>{const F=S===C.value;return r.jsx(ra,{option:C,name:e,isSelected:F,onChange:j,solidColor:v.solid,ring:v.ring},C.value)})})}function ra({option:e,name:t,isSelected:n,onChange:o,solidColor:i,ring:l}){const[a,c]=I.default.useState(!1);return r.jsxs("label",{style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.55:1,userSelect:"none"},children:[r.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>o(e.value),onFocus:()=>c(!0),onBlur:()=>c(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?i:"var(--medix-form-border, #CBD5E1)"}`,display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:"none",pointerEvents:"none"},children:r.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),r.jsxs(s.Box,{children:[r.jsx(s.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&r.jsx(s.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const oa={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",track:"#0685FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",track:"#7700CC"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",track:"#1B7A38"}},ia={sm:{width:32,height:18,thumbSize:12,thumbOffset:2},md:{width:42,height:24,thumbSize:16,thumbOffset:3},lg:{width:52,height:30,thumbSize:20,thumbOffset:4}},Uo=I.default.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:o=!1,onChange:i,disabled:l=!1,haptic:a,disableHaptic:c=!1,label:d,description:u,name:f,id:h,"aria-label":x,"aria-labelledby":p,"aria-describedby":b,"aria-invalid":v,"aria-required":B},y)=>{const{trigger:S}=de(),j=oa[e],C=ia[t],F=h??I.default.useId(),[w,D]=I.default.useState(o),[E,z]=I.default.useState(!1),N=n!==void 0?n:w,R=M=>{!l&&!c&&a!==!1&&S(a??"selection"),n===void 0&&D(M.target.checked),i==null||i(M.target.checked)},T={position:"relative",display:"inline-flex",alignItems:"center",width:C.width,height:C.height,borderRadius:C.height,background:N?j.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:"none",cursor:l?"not-allowed":"pointer",flexShrink:0},q={position:"absolute",width:C.thumbSize,height:C.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"none",top:C.thumbOffset,left:N?C.width-C.thumbSize-C.thumbOffset:C.thumbOffset,transition:"left 0.18s ease"};return r.jsxs(s.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:l?.55:1,children:[r.jsxs("label",{htmlFor:F,style:{display:"inline-flex",cursor:l?"not-allowed":"pointer"},children:[r.jsx("input",{ref:y,id:F,type:"checkbox",role:"switch",name:f,checked:N,disabled:l,"aria-label":x,"aria-labelledby":p,"aria-describedby":b,"aria-invalid":v,"aria-required":B,onChange:R,onFocus:()=>z(!0),onBlur:()=>z(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{style:T,"aria-hidden":"true",children:r.jsx("span",{style:q})})]}),(d||u)&&r.jsxs(s.Box,{children:[d&&r.jsx("label",{htmlFor:F,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:l?"not-allowed":"pointer",userSelect:"none"},children:d}),u&&r.jsx(s.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u})]})]})});Uo.displayName="MedixSwitch";function la({id:e,label:t,helperText:n,errorMessage:o,isRequired:i=!1,isDisabled:l=!1,children:a}){const c=I.default.useId(),d=e??`medix-field-${c.replace(/:/g,"")}`,u=!!o,f=n&&!u?`${d}-helper`:void 0,h=u&&o?`${d}-error`:void 0,x=[h,f].filter(Boolean).join(" ")||void 0;let p=a;if(I.default.isValidElement(a)){const b=a.props,B=[typeof b["aria-describedby"]=="string"?b["aria-describedby"]:void 0,x].filter(Boolean).join(" ")||void 0;p=I.default.cloneElement(a,{id:b.id??d,isInvalid:u||!!b.isInvalid||void 0,"aria-invalid":u?!0:b["aria-invalid"],"aria-required":i||b.required||b.isRequired||b["aria-required"]?!0:void 0,"aria-describedby":B})}return r.jsxs(s.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:l?.5:1,pointerEvents:l?"none":void 0,w:"100%",children:[t&&r.jsxs(s.Box,{as:"label",htmlFor:d,display:"flex",alignItems:"center",gap:"1",children:[r.jsx(s.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&r.jsx(s.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1","aria-hidden":"true",children:"*"})]}),p,f&&n&&r.jsx(s.Text,{id:f,fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),h&&o&&r.jsx(s.Text,{id:h,fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",role:"alert",children:o})]})}function Go({length:e=6,value:t,defaultValue:n="",onChange:o,onComplete:i,colorScheme:l="blue",isInvalid:a=!1,isDisabled:c=!1,mask:d=!1,haptic:u,disableHaptic:f=!1,label:h,helperText:x,errorMessage:p,id:b,"aria-label":v,"aria-labelledby":B,"aria-describedby":y,"aria-invalid":S,"aria-required":j}){const{trigger:C}=de(),[F,w]=I.default.useState(n),[D,E]=I.default.useState(null),z=t!==void 0,R=(z?t:F).split("").slice(0,e),T=I.default.useRef([]),q=a?"#DC2626":"var(--medix-form-border, var(--chakra-colors-border, #E2E8F0))",M=a?"#DC2626":l==="purple"?"#7700CC":"#0685FF",k=J=>{if(c||f||u===!1)return;const g=J.replace(/\s/g,"").length===e;C(u??(g?"success":"selection"))},P=(J,g)=>{var H,A,m;if(J.key==="Backspace"){J.preventDefault();const O=[...R];if(O[g]){O[g]="";const G=O.join("");z||w(G),k(G),o==null||o(G)}else if(g>0){(H=T.current[g-1])==null||H.focus(),O[g-1]="";const G=O.join("");z||w(G),k(G),o==null||o(G)}}else J.key==="ArrowLeft"&&g>0?(A=T.current[g-1])==null||A.focus():J.key==="ArrowRight"&&g<e-1&&((m=T.current[g+1])==null||m.focus())},$=(J,g)=>{var O;const H=J.target.value.replace(/\D/g,""),A=[...R];for(;A.length<e;)A.push("");if(!H){A[g]="";const G=A.join("");z||w(G),o==null||o(G);return}A[g]=H[0];const m=A.join("");z||w(m),k(m),o==null||o(m),g<e-1&&((O=T.current[g+1])==null||O.focus()),m.replace(/\s/g,"").length===e&&(i==null||i(m))},Q=(J,g)=>{var K;J.preventDefault();const H=J.clipboardData.getData("text").replace(/\D/g,"");if(!H)return;const A=[...R];for(;A.length<e;)A.push("");const m=H.split("").slice(0,e-g);m.forEach((Y,Z)=>{A[g+Z]=Y});const O=A.join("");z||w(O),k(O),o==null||o(O);const G=O.replace(/\s/g,"").length===e?e-1:Math.min(g+m.length,e-1);(K=T.current[G])==null||K.focus(),O.replace(/\s/g,"").length===e&&(i==null||i(O))};return r.jsxs(s.Box,{w:"fit-content",children:[h&&r.jsx(s.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:h}),r.jsx(s.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((J,g)=>r.jsx("input",{id:g===0?b:void 0,ref:H=>{T.current[g]=H},type:d?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:R[g]??"",onChange:H=>$(H,g),onKeyDown:H=>P(H,g),onPaste:H=>Q(H,g),onFocus:H=>{H.target.select(),E(g)},onBlur:()=>E(null),disabled:c,"aria-label":v?`${v} digit ${g+1} of ${e}`:`Digit ${g+1} of ${e}`,"aria-labelledby":B,"aria-describedby":y,"aria-invalid":a||S||void 0,"aria-required":j,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${D===g?M:q}`,boxShadow:"none",background:"var(--medix-form-bg, var(--chakra-colors-bg-surface, #FFFFFF))",color:"var(--medix-form-text, var(--chakra-colors-text-heading, #0F172A))",fontSize:"20px",fontWeight:600,textAlign:"center",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"text",opacity:c?.5:1}},g))}),(x||p)&&r.jsx(s.Text,{mt:"2",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?p:x})]})}const aa=Go;function _t(){return _t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_t.apply(this,arguments)}function sa(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ca=["cdnSuffix","cdnUrl","countryCode","style","svg"],ua="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",da="svg",fa=127397,wr=function(t){var n=t.cdnSuffix,o=n===void 0?da:n,i=t.cdnUrl,l=i===void 0?ua:i,a=t.countryCode,c=t.style,d=t.svg,u=d===void 0?!1:d,f=sa(t,ca);if(typeof a!="string")return null;if(u){var h=""+l+a.toLowerCase()+"."+o;return U.createElement("img",Object.assign({},f,{src:h,style:_t({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},c)}))}var x=a.toUpperCase().replace(/./g,function(p){return String.fromCodePoint(p.charCodeAt(0)+fa)});return U.createElement("span",Object.assign({role:"img"},f,{style:_t({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},c)}),x)};const pa={"+1":"US","+7":"RU","+39":"IT","+44":"GB","+47":"NO","+212":"MA","+262":"RE","+290":"SH","+358":"FI","+590":"GP","+599":"CW"},Ve=[{country:"AF",code:"+93",name:"Afghanistan",flag:"🇦🇫"},{country:"AL",code:"+355",name:"Albania",flag:"🇦🇱"},{country:"DZ",code:"+213",name:"Algeria",flag:"🇩🇿"},{country:"AS",code:"+1",name:"American Samoa",flag:"🇦🇸"},{country:"AD",code:"+376",name:"Andorra",flag:"🇦🇩"},{country:"AO",code:"+244",name:"Angola",flag:"🇦🇴"},{country:"AI",code:"+1",name:"Anguilla",flag:"🇦🇮"},{country:"AG",code:"+1",name:"Antigua & Barbuda",flag:"🇦🇬"},{country:"AR",code:"+54",name:"Argentina",flag:"🇦🇷"},{country:"AM",code:"+374",name:"Armenia",flag:"🇦🇲"},{country:"AW",code:"+297",name:"Aruba",flag:"🇦🇼"},{country:"AU",code:"+61",name:"Australia",flag:"🇦🇺"},{country:"AT",code:"+43",name:"Austria",flag:"🇦🇹"},{country:"AZ",code:"+994",name:"Azerbaijan",flag:"🇦🇿"},{country:"BS",code:"+1",name:"Bahamas",flag:"🇧🇸"},{country:"BH",code:"+973",name:"Bahrain",flag:"🇧🇭"},{country:"BD",code:"+880",name:"Bangladesh",flag:"🇧🇩"},{country:"BB",code:"+1",name:"Barbados",flag:"🇧🇧"},{country:"BY",code:"+375",name:"Belarus",flag:"🇧🇾"},{country:"BE",code:"+32",name:"Belgium",flag:"🇧🇪"},{country:"BZ",code:"+501",name:"Belize",flag:"🇧🇿"},{country:"BJ",code:"+229",name:"Benin",flag:"🇧🇯"},{country:"BM",code:"+1",name:"Bermuda",flag:"🇧🇲"},{country:"BT",code:"+975",name:"Bhutan",flag:"🇧🇹"},{country:"BO",code:"+591",name:"Bolivia",flag:"🇧🇴"},{country:"BA",code:"+387",name:"Bosnia & Herzegovina",flag:"🇧🇦"},{country:"BW",code:"+267",name:"Botswana",flag:"🇧🇼"},{country:"BR",code:"+55",name:"Brazil",flag:"🇧🇷"},{country:"IO",code:"+246",name:"British Indian Ocean Territory",flag:"🇮🇴"},{country:"VG",code:"+1",name:"British Virgin Islands",flag:"🇻🇬"},{country:"BN",code:"+673",name:"Brunei",flag:"🇧🇳"},{country:"BG",code:"+359",name:"Bulgaria",flag:"🇧🇬"},{country:"BF",code:"+226",name:"Burkina Faso",flag:"🇧🇫"},{country:"BI",code:"+257",name:"Burundi",flag:"🇧🇮"},{country:"KH",code:"+855",name:"Cambodia",flag:"🇰🇭"},{country:"CM",code:"+237",name:"Cameroon",flag:"🇨🇲"},{country:"CA",code:"+1",name:"Canada",flag:"🇨🇦"},{country:"CV",code:"+238",name:"Cape Verde",flag:"🇨🇻"},{country:"BQ",code:"+599",name:"Caribbean Netherlands",flag:"🇧🇶"},{country:"KY",code:"+1",name:"Cayman Islands",flag:"🇰🇾"},{country:"CF",code:"+236",name:"Central African Republic",flag:"🇨🇫"},{country:"TD",code:"+235",name:"Chad",flag:"🇹🇩"},{country:"CL",code:"+56",name:"Chile",flag:"🇨🇱"},{country:"CN",code:"+86",name:"China",flag:"🇨🇳"},{country:"CO",code:"+57",name:"Colombia",flag:"🇨🇴"},{country:"KM",code:"+269",name:"Comoros",flag:"🇰🇲"},{country:"CD",code:"+243",name:"DR Congo",flag:"🇨🇩"},{country:"CG",code:"+242",name:"Congo",flag:"🇨🇬"},{country:"CK",code:"+682",name:"Cook Islands",flag:"🇨🇰"},{country:"CR",code:"+506",name:"Costa Rica",flag:"🇨🇷"},{country:"HR",code:"+385",name:"Croatia",flag:"🇭🇷"},{country:"CU",code:"+53",name:"Cuba",flag:"🇨🇺"},{country:"CW",code:"+599",name:"Curaçao",flag:"🇨🇼"},{country:"CY",code:"+357",name:"Cyprus",flag:"🇨🇾"},{country:"CZ",code:"+420",name:"Czech Republic",flag:"🇨🇿"},{country:"DK",code:"+45",name:"Denmark",flag:"🇩🇰"},{country:"DJ",code:"+253",name:"Djibouti",flag:"🇩🇯"},{country:"DM",code:"+1",name:"Dominica",flag:"🇩🇲"},{country:"DO",code:"+1",name:"Dominican Republic",flag:"🇩🇴"},{country:"EC",code:"+593",name:"Ecuador",flag:"🇪🇨"},{country:"EG",code:"+20",name:"Egypt",flag:"🇪🇬"},{country:"SV",code:"+503",name:"El Salvador",flag:"🇸🇻"},{country:"GQ",code:"+240",name:"Equatorial Guinea",flag:"🇬🇶"},{country:"ER",code:"+291",name:"Eritrea",flag:"🇪🇷"},{country:"EE",code:"+372",name:"Estonia",flag:"🇪🇪"},{country:"SZ",code:"+268",name:"Eswatini",flag:"🇸🇿"},{country:"ET",code:"+251",name:"Ethiopia",flag:"🇪🇹"},{country:"FK",code:"+500",name:"Falkland Islands",flag:"🇫🇰"},{country:"FO",code:"+298",name:"Faroe Islands",flag:"🇫🇴"},{country:"FJ",code:"+679",name:"Fiji",flag:"🇫🇯"},{country:"FI",code:"+358",name:"Finland",flag:"🇫🇮"},{country:"FR",code:"+33",name:"France",flag:"🇫🇷"},{country:"GF",code:"+594",name:"French Guiana",flag:"🇬🇫"},{country:"PF",code:"+689",name:"French Polynesia",flag:"🇵🇫"},{country:"GA",code:"+241",name:"Gabon",flag:"🇬🇦"},{country:"GM",code:"+220",name:"Gambia",flag:"🇬🇲"},{country:"GE",code:"+995",name:"Georgia",flag:"🇬🇪"},{country:"DE",code:"+49",name:"Germany",flag:"🇩🇪"},{country:"GH",code:"+233",name:"Ghana",flag:"🇬🇭"},{country:"GI",code:"+350",name:"Gibraltar",flag:"🇬🇮"},{country:"GR",code:"+30",name:"Greece",flag:"🇬🇷"},{country:"GL",code:"+299",name:"Greenland",flag:"🇬🇱"},{country:"GD",code:"+1",name:"Grenada",flag:"🇬🇩"},{country:"GP",code:"+590",name:"Guadeloupe",flag:"🇬🇵"},{country:"GU",code:"+1",name:"Guam",flag:"🇬🇺"},{country:"GT",code:"+502",name:"Guatemala",flag:"🇬🇹"},{country:"GG",code:"+44",name:"Guernsey",flag:"🇬🇬"},{country:"GN",code:"+224",name:"Guinea",flag:"🇬🇳"},{country:"GW",code:"+245",name:"Guinea-Bissau",flag:"🇬🇼"},{country:"GY",code:"+592",name:"Guyana",flag:"🇬🇾"},{country:"HT",code:"+509",name:"Haiti",flag:"🇭🇹"},{country:"HN",code:"+504",name:"Honduras",flag:"🇭🇳"},{country:"HK",code:"+852",name:"Hong Kong",flag:"🇭🇰"},{country:"HU",code:"+36",name:"Hungary",flag:"🇭🇺"},{country:"IS",code:"+354",name:"Iceland",flag:"🇮🇸"},{country:"IN",code:"+91",name:"India",flag:"🇮🇳"},{country:"ID",code:"+62",name:"Indonesia",flag:"🇮🇩"},{country:"IR",code:"+98",name:"Iran",flag:"🇮🇷"},{country:"IQ",code:"+964",name:"Iraq",flag:"🇮🇶"},{country:"IE",code:"+353",name:"Ireland",flag:"🇮🇪"},{country:"IM",code:"+44",name:"Isle of Man",flag:"🇮🇲"},{country:"IL",code:"+972",name:"Israel",flag:"🇮🇱"},{country:"IT",code:"+39",name:"Italy",flag:"🇮🇹"},{country:"CI",code:"+225",name:"Ivory Coast",flag:"🇨🇮"},{country:"JM",code:"+1",name:"Jamaica",flag:"🇯🇲"},{country:"JP",code:"+81",name:"Japan",flag:"🇯🇵"},{country:"JE",code:"+44",name:"Jersey",flag:"🇯🇪"},{country:"JO",code:"+962",name:"Jordan",flag:"🇯🇴"},{country:"KZ",code:"+7",name:"Kazakhstan",flag:"🇰🇿"},{country:"KE",code:"+254",name:"Kenya",flag:"🇰🇪"},{country:"KI",code:"+686",name:"Kiribati",flag:"🇰🇮"},{country:"XK",code:"+383",name:"Kosovo",flag:"🇽🇰"},{country:"KW",code:"+965",name:"Kuwait",flag:"🇰🇼"},{country:"KG",code:"+996",name:"Kyrgyzstan",flag:"🇰🇬"},{country:"LA",code:"+856",name:"Laos",flag:"🇱🇦"},{country:"LV",code:"+371",name:"Latvia",flag:"🇱🇻"},{country:"LB",code:"+961",name:"Lebanon",flag:"🇱🇧"},{country:"LS",code:"+266",name:"Lesotho",flag:"🇱🇸"},{country:"LR",code:"+231",name:"Liberia",flag:"🇱🇷"},{country:"LY",code:"+218",name:"Libya",flag:"🇱🇾"},{country:"LI",code:"+423",name:"Liechtenstein",flag:"🇱🇮"},{country:"LT",code:"+370",name:"Lithuania",flag:"🇱🇹"},{country:"LU",code:"+352",name:"Luxembourg",flag:"🇱🇺"},{country:"MO",code:"+853",name:"Macao",flag:"🇲🇴"},{country:"MK",code:"+389",name:"North Macedonia",flag:"🇲🇰"},{country:"MG",code:"+261",name:"Madagascar",flag:"🇲🇬"},{country:"MW",code:"+265",name:"Malawi",flag:"🇲🇼"},{country:"MY",code:"+60",name:"Malaysia",flag:"🇲🇾"},{country:"MV",code:"+960",name:"Maldives",flag:"🇲🇻"},{country:"ML",code:"+223",name:"Mali",flag:"🇲🇱"},{country:"MT",code:"+356",name:"Malta",flag:"🇲🇹"},{country:"MH",code:"+692",name:"Marshall Islands",flag:"🇲🇭"},{country:"MQ",code:"+596",name:"Martinique",flag:"🇲🇶"},{country:"MR",code:"+222",name:"Mauritania",flag:"🇲🇷"},{country:"MU",code:"+230",name:"Mauritius",flag:"🇲🇺"},{country:"YT",code:"+262",name:"Mayotte",flag:"🇾🇹"},{country:"MX",code:"+52",name:"Mexico",flag:"🇲🇽"},{country:"FM",code:"+691",name:"Micronesia",flag:"🇫🇲"},{country:"MD",code:"+373",name:"Moldova",flag:"🇲🇩"},{country:"MC",code:"+377",name:"Monaco",flag:"🇲🇨"},{country:"MN",code:"+976",name:"Mongolia",flag:"🇲🇳"},{country:"ME",code:"+382",name:"Montenegro",flag:"🇲🇪"},{country:"MS",code:"+1",name:"Montserrat",flag:"🇲🇸"},{country:"MA",code:"+212",name:"Morocco",flag:"🇲🇦"},{country:"MZ",code:"+258",name:"Mozambique",flag:"🇲🇿"},{country:"MM",code:"+95",name:"Myanmar",flag:"🇲🇲"},{country:"NA",code:"+264",name:"Namibia",flag:"🇳🇦"},{country:"NR",code:"+674",name:"Nauru",flag:"🇳🇷"},{country:"NP",code:"+977",name:"Nepal",flag:"🇳🇵"},{country:"NL",code:"+31",name:"Netherlands",flag:"🇳🇱"},{country:"NC",code:"+687",name:"New Caledonia",flag:"🇳🇨"},{country:"NZ",code:"+64",name:"New Zealand",flag:"🇳🇿"},{country:"NI",code:"+505",name:"Nicaragua",flag:"🇳🇮"},{country:"NE",code:"+227",name:"Niger",flag:"🇳🇪"},{country:"NG",code:"+234",name:"Nigeria",flag:"🇳🇬"},{country:"NU",code:"+683",name:"Niue",flag:"🇳🇺"},{country:"NF",code:"+672",name:"Norfolk Island",flag:"🇳🇫"},{country:"KP",code:"+850",name:"North Korea",flag:"🇰🇵"},{country:"MP",code:"+1",name:"Northern Mariana Islands",flag:"🇲🇵"},{country:"NO",code:"+47",name:"Norway",flag:"🇳🇴"},{country:"OM",code:"+968",name:"Oman",flag:"🇴🇲"},{country:"PK",code:"+92",name:"Pakistan",flag:"🇵🇰"},{country:"PW",code:"+680",name:"Palau",flag:"🇵🇼"},{country:"PS",code:"+970",name:"Palestine",flag:"🇵🇸"},{country:"PA",code:"+507",name:"Panama",flag:"🇵🇦"},{country:"PG",code:"+675",name:"Papua New Guinea",flag:"🇵🇬"},{country:"PY",code:"+595",name:"Paraguay",flag:"🇵🇾"},{country:"PE",code:"+51",name:"Peru",flag:"🇵🇪"},{country:"PH",code:"+63",name:"Philippines",flag:"🇵🇭"},{country:"PL",code:"+48",name:"Poland",flag:"🇵🇱"},{country:"PT",code:"+351",name:"Portugal",flag:"🇵🇹"},{country:"PR",code:"+1",name:"Puerto Rico",flag:"🇵🇷"},{country:"QA",code:"+974",name:"Qatar",flag:"🇶🇦"},{country:"RE",code:"+262",name:"Réunion",flag:"🇷🇪"},{country:"RO",code:"+40",name:"Romania",flag:"🇷🇴"},{country:"RU",code:"+7",name:"Russia",flag:"🇷🇺"},{country:"RW",code:"+250",name:"Rwanda",flag:"🇷🇼"},{country:"WS",code:"+685",name:"Samoa",flag:"🇼🇸"},{country:"SM",code:"+378",name:"San Marino",flag:"🇸🇲"},{country:"ST",code:"+239",name:"São Tomé & Príncipe",flag:"🇸🇹"},{country:"SA",code:"+966",name:"Saudi Arabia",flag:"🇸🇦"},{country:"SN",code:"+221",name:"Senegal",flag:"🇸🇳"},{country:"RS",code:"+381",name:"Serbia",flag:"🇷🇸"},{country:"SC",code:"+248",name:"Seychelles",flag:"🇸🇨"},{country:"SL",code:"+232",name:"Sierra Leone",flag:"🇸🇱"},{country:"SG",code:"+65",name:"Singapore",flag:"🇸🇬"},{country:"SX",code:"+1",name:"Sint Maarten",flag:"🇸🇽"},{country:"SK",code:"+421",name:"Slovakia",flag:"🇸🇰"},{country:"SI",code:"+386",name:"Slovenia",flag:"🇸🇮"},{country:"SB",code:"+677",name:"Solomon Islands",flag:"🇸🇧"},{country:"SO",code:"+252",name:"Somalia",flag:"🇸🇴"},{country:"ZA",code:"+27",name:"South Africa",flag:"🇿🇦"},{country:"KR",code:"+82",name:"South Korea",flag:"🇰🇷"},{country:"SS",code:"+211",name:"South Sudan",flag:"🇸🇸"},{country:"ES",code:"+34",name:"Spain",flag:"🇪🇸"},{country:"LK",code:"+94",name:"Sri Lanka",flag:"🇱🇰"},{country:"BL",code:"+590",name:"Saint Barthélemy",flag:"🇧🇱"},{country:"SH",code:"+290",name:"Saint Helena",flag:"🇸🇭"},{country:"KN",code:"+1",name:"Saint Kitts & Nevis",flag:"🇰🇳"},{country:"LC",code:"+1",name:"Saint Lucia",flag:"🇱🇨"},{country:"MF",code:"+590",name:"Saint Martin",flag:"🇲🇫"},{country:"PM",code:"+508",name:"Saint Pierre & Miquelon",flag:"🇵🇲"},{country:"VC",code:"+1",name:"Saint Vincent & Grenadines",flag:"🇻🇨"},{country:"SD",code:"+249",name:"Sudan",flag:"🇸🇩"},{country:"SR",code:"+597",name:"Suriname",flag:"🇸🇷"},{country:"SJ",code:"+47",name:"Svalbard & Jan Mayen",flag:"🇸🇯"},{country:"SE",code:"+46",name:"Sweden",flag:"🇸🇪"},{country:"CH",code:"+41",name:"Switzerland",flag:"🇨🇭"},{country:"SY",code:"+963",name:"Syria",flag:"🇸🇾"},{country:"TW",code:"+886",name:"Taiwan",flag:"🇹🇼"},{country:"TJ",code:"+992",name:"Tajikistan",flag:"🇹🇯"},{country:"TZ",code:"+255",name:"Tanzania",flag:"🇹🇿"},{country:"TH",code:"+66",name:"Thailand",flag:"🇹🇭"},{country:"TG",code:"+228",name:"Togo",flag:"🇹🇬"},{country:"TK",code:"+690",name:"Tokelau",flag:"🇹🇰"},{country:"TO",code:"+676",name:"Tonga",flag:"🇹🇴"},{country:"TT",code:"+1",name:"Trinidad & Tobago",flag:"🇹🇹"},{country:"TN",code:"+216",name:"Tunisia",flag:"🇹🇳"},{country:"TR",code:"+90",name:"Turkey",flag:"🇹🇷"},{country:"TM",code:"+993",name:"Turkmenistan",flag:"🇹🇲"},{country:"TC",code:"+1",name:"Turks & Caicos Islands",flag:"🇹🇨"},{country:"TV",code:"+688",name:"Tuvalu",flag:"🇹🇻"},{country:"VI",code:"+1",name:"US Virgin Islands",flag:"🇻🇮"},{country:"UG",code:"+256",name:"Uganda",flag:"🇺🇬"},{country:"UA",code:"+380",name:"Ukraine",flag:"🇺🇦"},{country:"AE",code:"+971",name:"United Arab Emirates",flag:"🇦🇪"},{country:"GB",code:"+44",name:"United Kingdom",flag:"🇬🇧"},{country:"US",code:"+1",name:"United States",flag:"🇺🇸"},{country:"UY",code:"+598",name:"Uruguay",flag:"🇺🇾"},{country:"UZ",code:"+998",name:"Uzbekistan",flag:"🇺🇿"},{country:"VU",code:"+678",name:"Vanuatu",flag:"🇻🇺"},{country:"VA",code:"+39",name:"Vatican City",flag:"🇻🇦"},{country:"VE",code:"+58",name:"Venezuela",flag:"🇻🇪"},{country:"VN",code:"+84",name:"Vietnam",flag:"🇻🇳"},{country:"WF",code:"+681",name:"Wallis & Futuna",flag:"🇼🇫"},{country:"EH",code:"+212",name:"Western Sahara",flag:"🇪🇭"},{country:"YE",code:"+967",name:"Yemen",flag:"🇾🇪"},{country:"ZM",code:"+260",name:"Zambia",flag:"🇿🇲"},{country:"ZW",code:"+263",name:"Zimbabwe",flag:"🇿🇼"},{country:"AX",code:"+358",name:"Åland Islands",flag:"🇦🇽"}];function ha({value:e="",onChange:t,showCountryCode:n=!0,showCountryFlag:o=!0,defaultCountryCode:i="+234",defaultCountry:l,placeholder:a="80 000 0000",colorScheme:c="blue",isInvalid:d=!1,errorMessage:u,label:f,helperText:h,isDisabled:x=!1,id:p,"aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":y,"aria-required":S}){const j=I.default.useId(),C=p??j,F=l??(i?pa[i]:void 0),w=(F?Ve.find(K=>K.country===F):void 0)??Ve.find(K=>K.code===i)??Ve.find(K=>K.country==="NG")??Ve[0],[D,E]=I.default.useState(w.country),[z,N]=I.default.useState(e),[R,T]=I.default.useState(!1),[q,M]=I.default.useState(!1),[k,P]=I.default.useState(""),$=I.default.useRef(null),Q=I.default.useRef(null),J=Ve.find(K=>K.country===D)??w;I.default.useEffect(()=>{function K(Y){$.current&&!$.current.contains(Y.target)&&M(!1)}return q&&document.addEventListener("mousedown",K),()=>{document.removeEventListener("mousedown",K)}},[q]),I.default.useEffect(()=>{if(q){const K=setTimeout(()=>{var Y;(Y=Q.current)==null||Y.focus()},50);return()=>clearTimeout(K)}else P("")},[q]);const g=I.default.useMemo(()=>{if(!k.trim())return Ve;const K=k.toLowerCase().trim();return Ve.filter(Y=>Y.name.toLowerCase().includes(K)||Y.code.toLowerCase().includes(K)||Y.country.toLowerCase().includes(K))},[k]),H=K=>{const Y=K.target.value.replace(/[^\d\s\-]/g,"");N(Y),t==null||t(`${J.code}${Y.replace(/\s/g,"")}`)},A=K=>{E(K.country),t==null||t(`${K.code}${z.replace(/\s/g,"")}`),M(!1)},O=d?"#DC2626":R||q?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",children:[f&&r.jsx("label",{htmlFor:C,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:f}),r.jsxs(s.Box,{display:"flex",alignItems:"center",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:x?.5:1,pointerEvents:x?"none":void 0,position:"relative",zIndex:q?1e3:void 0,style:{border:`1.5px solid ${O}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[n&&r.jsxs(s.Box,{position:"relative",ref:$,h:"full",children:[r.jsxs("button",{id:`${C}-country`,type:"button",onClick:()=>!x&&M(!q),disabled:x,"aria-label":"Select country code","aria-expanded":q,style:{display:"flex",alignItems:"center",gap:"6px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",border:"none",borderRight:"1px solid var(--medix-form-border)",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",cursor:x?"not-allowed":"pointer",height:"100%",color:"var(--medix-form-text)",fontFamily:"var(--font-body)",fontSize:"14px",fontWeight:500},children:[o&&r.jsx(s.Box,{display:"flex",alignItems:"center",fontSize:"lg",lineHeight:"1",children:r.jsx(wr,{countryCode:J.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),r.jsx("span",{children:J.code}),r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:q?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease",opacity:.7},children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),q&&r.jsxs(s.Box,{position:"absolute",top:"100%",left:"0",mt:"2",w:"280px",maxH:"320px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[r.jsx(s.Box,{p:"2.5",color:"text.heading",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:r.jsxs(s.Box,{color:"text.heading",position:"relative",display:"flex",alignItems:"center",children:[r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),r.jsx("input",{ref:Q,type:"text",placeholder:"Search country or code...",value:k,onChange:K=>P(K.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),r.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:g.length===0?r.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No country found"}):g.map(K=>{const Y=K.country===J.country;return r.jsxs("button",{type:"button",onClick:()=>A(K),style:{display:"flex",width:"100%",alignItems:"center",gap:"10px",padding:"8px 14px",background:Y?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",transition:"background 0.1s ease"},onMouseEnter:Z=>{Z.currentTarget.style.background="var(--medix-form-bg-subtle)"},onMouseLeave:Z=>{Z.currentTarget.style.background=Y?"var(--medix-form-bg-subtle)":"transparent"},children:[r.jsx(s.Box,{display:"flex",alignItems:"center",fontSize:"md",flexShrink:0,children:r.jsx(wr,{countryCode:K.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),r.jsx(s.Text,{flex:"1",truncate:!0,fontWeight:Y?"600":"400",children:K.name}),r.jsx(s.Text,{fontSize:"xs",color:"text.muted",flexShrink:0,children:K.code})]},`${K.country}-${K.code}`)})})]})]}),r.jsx("input",{id:C,type:"tel",value:z,onChange:H,onFocus:()=>T(!0),onBlur:()=>T(!1),placeholder:a,disabled:x,"aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":d||y||void 0,"aria-required":S,style:{flex:1,border:"none",outline:"none",background:"transparent",fontSize:"15px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:"10px 16px",minWidth:0}})]}),(h||u)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:d?"red.500":"text.muted",fontFamily:"var(--font-body)",children:d?u:h})]})}const xa=["MON","TUES","WED","THURS","FRI","SAT","SUN"],an=["January","February","March","April","May","June","July","August","September","October","November","December"],ga=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ht=12;function Cn(e,t){return new Date(e,t+1,0).getDate()}function ma(e,t){return new Date(e,t,1).getDay()}function ba(e){return e===0?6:e-1}function jr(e,t,n,o,i){const l=new Date(n,t,e);if(o){const a=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(l<a)return!0}if(i){const a=new Date(i.getFullYear(),i.getMonth(),i.getDate());if(l>a)return!0}return!1}function ya(e,t,n,o){const i=Cn(t,e),l=new Date(t,e,1),a=new Date(t,e,i);if(n){const c=new Date(n.getFullYear(),n.getMonth(),n.getDate());if(a<c)return!0}if(o){const c=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(l>c)return!0}return!1}function va(e,t,n){return!!(t&&e<t.getFullYear()||n&&e>n.getFullYear())}function Zn({value:e,onChange:t,minDate:n,maxDate:o,colorScheme:i="blue",haptic:l,disableHaptic:a=!1,...c}){const{trigger:d}=de(),u=()=>{!a&&l!==!1&&d(l??"selection")},f=i==="purple"?"#7700CC":"#0685FF",h=i==="purple"?"rgba(119,0,204,0.14)":"rgba(6,133,255,0.14)",[x,p]=U.useState(()=>e?new Date(e):new Date),[b,v]=U.useState("day"),[B,y]=U.useState(0);U.useEffect(()=>{e&&p(Y=>{const Z=new Date(e);return Y.getFullYear()===Z.getFullYear()&&Y.getMonth()===Z.getMonth()?Y:Z})},[e]);const S=x.getFullYear(),j=x.getMonth(),F=Math.floor(S/ht)*ht+B*ht,w=F+ht-1,D=!n||S>n.getFullYear()||S===n.getFullYear()&&j>n.getMonth(),E=!o||S<o.getFullYear()||S===o.getFullYear()&&j<o.getMonth(),z=()=>{u(),p(new Date(S,j-1,1))},N=()=>{u(),p(new Date(S,j+1,1))},R=()=>{u();const Y=new Date;p(Y),v("day"),t&&!jr(Y.getDate(),Y.getMonth(),Y.getFullYear(),n,o)&&t(Y)},T=Y=>{u(),p(new Date(S,Y,1)),v("day")},q=Y=>{u(),p(new Date(Y,j,1)),y(0),v("month")},M=I.default.useRef(null),k=Cn(S,j),P=ba(ma(S,j)),$=Cn(S,j-1),J=(P+k>35?42:35)-(P+k),g=(Y,Z,ae)=>e?e.getDate()===Y&&e.getMonth()===Z&&e.getFullYear()===ae:!1,H=new Date,A=(e&&e.getMonth()===j&&e.getFullYear()===S?e.getDate():null)??(H.getMonth()===j&&H.getFullYear()===S?H.getDate():1),m=Y=>{var ge;if(b!=="day")return;const Z=Y.key;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(Z))return;const ae=M.current;if(!ae)return;const X=Array.from(ae.querySelectorAll('button[data-day-cell="true"]:not([disabled])'));if(X.length===0)return;const ne=X.indexOf(document.activeElement);if(ne<0)return;let le=ne;Z==="ArrowLeft"&&(le=Math.max(0,ne-1)),Z==="ArrowRight"&&(le=Math.min(X.length-1,ne+1)),Z==="ArrowUp"&&(le=Math.max(0,ne-7)),Z==="ArrowDown"&&(le=Math.min(X.length-1,ne+7)),Z==="Home"&&(le=0),Z==="End"&&(le=X.length-1),le!==ne&&(Y.preventDefault(),(ge=X[le])==null||ge.focus())},O=()=>{const Y=[];for(let Z=0;Z<P;Z++){const ae=$-P+Z+1;Y.push(r.jsx(sn,{day:ae,isMuted:!0,accentColor:f,tabIndex:-1},`prev-${Z}`))}for(let Z=1;Z<=k;Z++){const ae=jr(Z,j,S,n,o),X=g(Z,j,S),ne=!ae&&(X||Z===A);Y.push(r.jsx(sn,{day:Z,isActive:X,isDisabled:ae,accentColor:f,accentLight:h,tabIndex:ae?-1:ne?0:-1,dataDayCell:!ae,ariaLabel:`${an[j]} ${Z}, ${S}`,onClick:ae?void 0:()=>{u(),t==null||t(new Date(S,j,Z))}},`curr-${Z}`))}for(let Z=1;Z<=J;Z++)Y.push(r.jsx(sn,{day:Z,isMuted:!0,accentColor:f,tabIndex:-1},`next-${Z}`));return Y},G=()=>r.jsx(s.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",mt:"2",children:ga.map((Y,Z)=>{const ae=Z===j,X=ya(Z,S,n,o);return r.jsx(Sr,{label:Y,isActive:ae,isDisabled:X,accentColor:f,accentLight:h,onClick:()=>!X&&T(Z)},Y)})}),K=()=>{const Y=Array.from({length:ht},(Z,ae)=>F+ae);return r.jsxs(r.Fragment,{children:[r.jsxs(s.Flex,{justify:"space-between",align:"center",mb:"3",children:[r.jsx(Tt,{direction:"prev",enabled:!0,accentColor:f,onClick:()=>{u(),y(Z=>Z-1)},ariaLabel:"Previous years"}),r.jsxs(s.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:[F," – ",w]}),r.jsx(Tt,{direction:"next",enabled:!0,accentColor:f,onClick:()=>{u(),y(Z=>Z+1)},ariaLabel:"Next years"})]}),r.jsx(s.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",children:Y.map(Z=>{const ae=Z===S,X=va(Z,n,o);return r.jsx(Sr,{label:String(Z),isActive:ae,isDisabled:X,accentColor:f,accentLight:h,onClick:()=>!X&&q(Z)},Z)})})]})};return r.jsxs(s.Box,{w:"100%",maxW:"360px",bg:"bg",borderRadius:"card",p:"5",fontFamily:"var(--font-body)",...c,children:[r.jsxs(s.Flex,{justify:"space-between",align:"center",mb:b==="day"?"6":"4",children:[r.jsxs(s.Flex,{align:"center",gap:"1",children:[b==="day"&&r.jsx(Tt,{direction:"prev",enabled:D,accentColor:f,onClick:z,ariaLabel:"Go to previous month"}),r.jsx(Cr,{label:an[j],isActive:b==="month",accentColor:f,accentLight:h,onClick:()=>{u(),v(Y=>Y==="month"?"day":"month"),y(0)}}),r.jsx(Cr,{label:String(S),isActive:b==="year",accentColor:f,accentLight:h,onClick:()=>{u(),v(Y=>Y==="year"?"day":"year"),y(0)}}),b==="day"&&r.jsx(Tt,{direction:"next",enabled:E,accentColor:f,onClick:N,ariaLabel:"Go to next month"})]}),r.jsx(s.chakra.button,{type:"button",onClick:R,px:"3",py:"1",fontSize:"sm",fontWeight:"medium",borderRadius:"md",border:"1px solid",borderColor:"border",color:"text.heading",bg:"transparent",cursor:"pointer",_hover:{bg:"bg.subtle"},children:"Today"})]}),b==="day"&&r.jsxs(r.Fragment,{children:[r.jsx(s.Flex,{mb:"3",children:xa.map(Y=>r.jsx(s.Box,{flex:"1",textAlign:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:Y},Y))}),r.jsx(s.Box,{ref:M,role:"grid","aria-label":`${an[j]} ${S}`,display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gapY:"2",onKeyDown:m,children:O()})]}),b==="month"&&G(),b==="year"&&K()]})}function Tt({enabled:e,onClick:t,direction:n,accentColor:o,ariaLabel:i}){return r.jsx(s.chakra.button,{type:"button","aria-label":i??(n==="prev"?"Go to previous month":"Go to next month"),"aria-disabled":!e,disabled:!e,onClick:e?t:void 0,display:"flex",alignItems:"center",justifyContent:"center",w:"7",h:"7",borderRadius:"md",border:"none",bg:"transparent",cursor:e?"pointer":"not-allowed",color:e?"text.heading":"text.muted",opacity:e?1:.35,p:"0",flexShrink:0,_hover:e?{color:o,bg:"bg.subtle"}:void 0,transition:"all 0.15s",children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n==="prev"?r.jsx("path",{d:"M15 18l-6-6 6-6"}):r.jsx("path",{d:"M9 18l6-6-6-6"})})})}function Cr({label:e,isActive:t,accentColor:n,accentLight:o,onClick:i}){return r.jsxs(s.chakra.button,{type:"button",onClick:i,title:t?"Click to collapse":"Click to browse",display:"inline-flex",alignItems:"center",gap:"0.5",px:"2",py:"0.5",borderRadius:"md",border:"none",bg:t?o:"transparent",color:t?n:"text.heading",fontWeight:"semibold",fontSize:"15px",fontFamily:"var(--font-body)",cursor:"pointer",lineHeight:"1.4",_hover:t?void 0:{bg:o,color:n},transition:"all 0.15s",children:[e,r.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s",opacity:.7,marginTop:"1px"},children:r.jsx("path",{d:"M6 9l6 6 6-6"})})]})}function Sr({label:e,isActive:t,isDisabled:n,accentColor:o,accentLight:i,onClick:l}){return r.jsx(s.chakra.button,{type:"button",onClick:n?void 0:l,disabled:n,display:"flex",alignItems:"center",justifyContent:"center",h:"10",borderRadius:"md",border:"1.5px solid",borderColor:t?o:"transparent",bg:t?o:"transparent",color:t?"white":n?"text.muted":"text.heading",fontSize:"13px",fontWeight:t?"semibold":"medium",fontFamily:"var(--font-body)",cursor:n?"not-allowed":"pointer",opacity:n?.35:1,_hover:!n&&!t?{bg:i,color:o,borderColor:o}:void 0,transition:"all 0.15s",children:e})}function sn({day:e,isActive:t,isMuted:n,isDisabled:o,accentColor:i,accentLight:l,onClick:a,tabIndex:c,dataDayCell:d,ariaLabel:u}){const f=!n&&!o;return r.jsx(s.Flex,{justify:"center",align:"center",h:"10",role:"gridcell",children:r.jsx(s.chakra.button,{type:"button","data-day-cell":d?"true":void 0,"aria-label":u,"aria-selected":t||void 0,"aria-disabled":!f||void 0,tabIndex:c??(f?0:-1),display:"flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"full",border:"none",fontSize:"sm",fontWeight:"medium",onClick:a,disabled:n||o,cursor:n?"default":o?"not-allowed":"pointer",opacity:o?.35:1,style:{background:t?i:"transparent",color:t?"#ffffff":void 0,transition:"background 0.15s, color 0.15s"},color:t?void 0:n||o?"text.muted":"text.heading",_hover:!n&&!o&&!t?{bg:l,color:i}:void 0,transition:"all 0.2s",children:e})})}function ka({value:e,onChange:t,min:n,max:o,label:i,helperText:l,errorMessage:a,colorScheme:c="blue",isInvalid:d=!1,isDisabled:u=!1,placeholder:f="Select date",id:h,includeTime:x=!1,haptic:p,disableHaptic:b=!1,"aria-label":v,"aria-labelledby":B,"aria-describedby":y,"aria-invalid":S,"aria-required":j}){const{trigger:C}=de(),[F,w]=U.useState(!1),D=U.useRef(null),E=$=>$!=null&&$.includes("T")&&$.split("T")[1].slice(0,5)||"00:00";U.useEffect(()=>{function $(Q){D.current&&!D.current.contains(Q.target)&&w(!1)}return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[]);const N=d?"#DC2626":F?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",R="none",T=$=>{const Q=$.getFullYear(),J=String($.getMonth()+1).padStart(2,"0"),g=String($.getDate()).padStart(2,"0");x?t==null||t(`${Q}-${J}-${g}T${E(e)}`):(t==null||t(`${Q}-${J}-${g}`),w(!1))},q=$=>{const Q=$.target.value,J=(e==null?void 0:e.split("T")[0])??"";J&&(t==null||t(`${J}T${Q}`))},M=$=>{if(!$)return;const[Q,J,g]=$.split("-"),H=Number(Q),A=Number(J),m=Number(g==null?void 0:g.split("T")[0]);if(!Number.isInteger(H)||!Number.isInteger(A)||!Number.isInteger(m))return;const O=new Date(H,A-1,m);if(!(O.getFullYear()!==H||O.getMonth()!==A-1||O.getDate()!==m))return O},k=M(e==null?void 0:e.split("T")[0]),P=k&&!isNaN(k.getTime())?x&&(e!=null&&e.includes("T"))?`${k.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})} ${e.split("T")[1].slice(0,5)}`:k.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:F?1e3:void 0,ref:D,children:[i&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),r.jsxs(s.Box,{position:"relative",children:[r.jsx("input",{id:h,readOnly:!0,type:"text",value:P,placeholder:f,disabled:u,"aria-label":v,"aria-labelledby":B,"aria-describedby":y,"aria-invalid":d||S||void 0,"aria-required":j,"aria-haspopup":"dialog","aria-expanded":F,onClick:()=>{u||(!b&&p!==!1&&C(p??"selection"),w(!F))},onKeyDown:$=>{u||($.key==="Enter"||$.key===" "||$.key==="ArrowDown"?($.preventDefault(),!b&&p!==!1&&C(p??"selection"),w(!0)):$.key==="Escape"&&w(!1))},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${N}`,boxShadow:R,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:u?"not-allowed":"pointer",opacity:u?.5:1,colorScheme:"auto"}}),r.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),r.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),r.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),r.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})})]}),F&&r.jsxs(s.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",children:[r.jsx(Zn,{value:k,onChange:T,minDate:M(n),maxDate:M(o),colorScheme:c,haptic:p,disableHaptic:b}),x&&r.jsxs(s.Box,{px:"5",pb:"4",borderTop:"1px solid",borderColor:"border",children:[r.jsx(s.Text,{fontSize:"xs",fontWeight:"medium",color:"text.muted",mb:"1.5",fontFamily:"var(--font-body)",children:"Time"}),r.jsx("input",{type:"time",value:E(e),onChange:q,disabled:!k,style:{width:"100%",height:"36px",padding:"0 12px",borderRadius:"8px",border:"1.5px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"14px",fontFamily:"var(--font-body)",outline:"none",opacity:k?1:.4,cursor:k?"default":"not-allowed",colorScheme:"auto"}})]})]}),(l||a)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:d?"red.500":"text.muted",fontFamily:"var(--font-body)",children:d?a:l})]})}function wa({startValue:e,onStartChange:t,endValue:n,onEndChange:o,min:i,max:l,label:a,helperText:c,errorMessage:d,colorScheme:u="blue",isInvalid:f=!1,isDisabled:h=!1,startPlaceholder:x="Start date",endPlaceholder:p="End date",id:b,haptic:v,disableHaptic:B=!1,"aria-label":y,"aria-labelledby":S,"aria-describedby":j,"aria-invalid":C,"aria-required":F}){const{trigger:w}=de(),[D,E]=U.useState(null),z=U.useRef(null);U.useEffect(()=>{function O(G){z.current&&!z.current.contains(G.target)&&E(null)}return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[]);const R=f?"#DC2626":D?u==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",T="none",q={flex:1,height:"100%",padding:"0 10px",background:"transparent",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",border:"none",outline:"none",cursor:h?"not-allowed":"pointer",colorScheme:"auto",width:"100%"},M=O=>{const G=O.getFullYear(),K=String(O.getMonth()+1).padStart(2,"0"),Y=String(O.getDate()).padStart(2,"0");return`${G}-${K}-${Y}`},k=O=>i&&O<i?i:l&&O>l?l:O,P=O=>{const G=k(M(O));D==="start"?(t==null||t(G),n&&n<G&&(o==null||o("")),E("end")):D==="end"&&(o==null||o(G),e&&e>G&&(t==null||t("")),E(null))},$=O=>{if(!O)return;const[G,K,Y]=O.split("-").map(Number);if(!G||K<1||K>12||Y<1||Y>31)return;const Z=new Date(G,K-1,Y);if(!(Z.getFullYear()!==G||Z.getMonth()!==K-1||Z.getDate()!==Y))return Z},J=$(D==="start"?e:n),g=$(e),H=$(n),A=g?g.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",m=H?H.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:D?1e3:void 0,ref:z,children:[a&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),r.jsxs(s.Box,{display:"flex",alignItems:"center",position:"relative",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${R}`,boxShadow:T,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:h?.5:1,overflow:"hidden"},children:[r.jsx("input",{id:b,readOnly:!0,type:"text",value:A,placeholder:x,disabled:h,"aria-label":y?`${y} start date`:void 0,"aria-labelledby":S,"aria-describedby":j,"aria-invalid":f||C||void 0,"aria-required":F,"aria-haspopup":"dialog","aria-expanded":D==="start",onClick:()=>{h||(!B&&v!==!1&&w(v??"selection"),E("start"))},onKeyDown:O=>{h||(O.key==="Enter"||O.key===" "||O.key==="ArrowDown"?(O.preventDefault(),!B&&v!==!1&&w(v??"selection"),E("start")):O.key==="Escape"&&E(null))},style:{...q,textAlign:"center"}}),r.jsx(s.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),r.jsx("input",{readOnly:!0,type:"text",value:m,placeholder:p,disabled:h,"aria-label":y?`${y} end date`:void 0,"aria-labelledby":S,"aria-describedby":j,"aria-invalid":f||C||void 0,"aria-required":F,"aria-haspopup":"dialog","aria-expanded":D==="end",onClick:()=>{h||(!B&&v!==!1&&w(v??"selection"),E("end"))},onKeyDown:O=>{h||(O.key==="Enter"||O.key===" "||O.key==="ArrowDown"?(O.preventDefault(),!B&&v!==!1&&w(v??"selection"),E("end")):O.key==="Escape"&&E(null))},style:{...q,textAlign:"center"}})]}),D&&r.jsx(s.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",children:r.jsx(Zn,{value:J,onChange:P,minDate:D==="end"?g??$(i):$(i),maxDate:$(l),colorScheme:u,haptic:v,disableHaptic:B})}),(c||d)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?d:c})]})}const ja=r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("polyline",{points:"6 9 12 15 18 9"})});function Ca({options:e,value:t,onChange:n,placeholder:o="Search...",label:i,helperText:l,errorMessage:a,colorScheme:c="blue",isInvalid:d=!1,isDisabled:u=!1,haptic:f,disableHaptic:h=!1,id:x,name:p,"aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":y,"aria-required":S}){const{trigger:j}=de(),[C,F]=U.useState(!1),[w,D]=U.useState(""),[E,z]=U.useState(-1),N=U.useRef(null);U.useEffect(()=>{if(t){const k=e.find(P=>P.value===t);k&&D(k.label)}},[t,e]),U.useEffect(()=>{function k(P){if(N.current&&!N.current.contains(P.target))if(F(!1),t){const $=e.find(Q=>Q.value===t);$&&D($.label)}else D("")}return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[t,e]);const R=e.filter(k=>k.label.toLowerCase().includes(w.toLowerCase()));U.useEffect(()=>{z(C&&R.length>0?0:-1)},[C,w,R.length]);const q=d?"#DC2626":C?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:C?1e3:void 0,ref:N,children:[i&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),r.jsxs(s.Box,{position:"relative",children:[r.jsx("input",{id:x,name:p,type:"text",value:w,placeholder:o,disabled:u,role:"combobox","aria-expanded":C,"aria-controls":x?`${x}-listbox`:void 0,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":d||y||void 0,"aria-required":S,onChange:k=>{D(k.target.value),F(!0),k.target.value||n==null||n("")},onFocus:()=>F(!0),onKeyDown:k=>{if(k.key==="Escape")k.preventDefault(),F(!1);else if(k.key==="ArrowDown"){if(k.preventDefault(),!C){F(!0);return}z(P=>R.length===0?-1:P<0?0:(P+1)%R.length)}else if(k.key==="ArrowUp"){if(k.preventDefault(),!C){F(!0);return}z(P=>R.length===0?-1:P<=0?R.length-1:P-1)}else if(k.key==="Enter"&&C){const P=R[E];P&&(k.preventDefault(),!h&&f!==!1&&P.value!==t&&j(f??"selection"),n==null||n(P.value),D(P.label),F(!1))}},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${q}`,boxShadow:"none",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:u?"not-allowed":"text",opacity:u?.5:1}}),r.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:ja})]}),C&&!u&&r.jsx(s.Box,{id:x?`${x}-listbox`:void 0,role:"listbox",position:"absolute",zIndex:1e3,top:"100%",left:"0",right:"0",mt:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",boxShadow:"none",maxH:"200px",overflowY:"auto",py:"1",children:R.length>0?R.map((k,P)=>{const $=k.value===t,Q=P===E;return r.jsx(s.Box,{role:"option","aria-selected":$,px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",bg:Q||$?"bg.subtle":void 0,_hover:{bg:"bg.subtle"},onMouseEnter:()=>z(P),onClick:()=>{!h&&f!==!1&&k.value!==t&&j(f??"selection"),n==null||n(k.value),D(k.label),F(!1)},children:k.label},k.value)}):r.jsx(s.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(l||a)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:d?"red.500":"text.muted",fontFamily:"var(--font-body)",children:d?a:l})]})}const Sa=r.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),r.jsx("polyline",{points:"17 8 12 3 7 8"}),r.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function Ba({accept:e,multiple:t=!1,maxSize:n,label:o,helperText:i,errorMessage:l,colorScheme:a="blue",isInvalid:c=!1,isDisabled:d=!1,onChange:u,dropzoneTitle:f="Click or drag to upload",id:h,haptic:x,disableHaptic:p=!1,"aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":y,"aria-required":S}){const{trigger:j}=de(),[C,F]=I.default.useState(!1),[w,D]=I.default.useState([]),E=I.default.useRef(null),z=g=>{g.preventDefault(),d||F(!0)},N=g=>{g.preventDefault(),d||F(!0)},R=g=>{g.preventDefault(),F(!1)},[T,q]=I.default.useState(null),M=g=>{if(!g||g.length===0)return;const H=Array.from(g);q(null);const A=H.find(O=>n&&O.size>n);if(A&&n){const O=Math.round(n/1048576);q(`File "${A.name}" exceeds the maximum limit of ${O}MB.`),!p&&x!==!1&&j(x??"error")}const m=H.filter(O=>!(n&&O.size>n));m.length>0&&(D(m.map(O=>O.name)),!p&&x!==!1&&j(x??"impactLight"),u==null||u(m))},k=g=>{g.preventDefault(),F(!1),!d&&M(g.dataTransfer.files)},P=g=>{M(g.target.files),g.target.value=""},$=a==="purple"?"purple.500":"blue.500",Q=c?"red.500":C?$:"border",J=C?"bg.subtle":"transparent";return r.jsxs(s.Box,{w:"100%",children:[o&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),r.jsxs(s.Box,{position:"relative",border:"1.5px dashed",borderColor:Q,borderRadius:"xl",bg:J,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:d?.5:1,cursor:d?"not-allowed":"pointer",_hover:d?void 0:{borderColor:$,bg:"bg.subtle"},onDragEnter:z,onDragOver:N,onDragLeave:R,onDrop:k,onClick:()=>{var g;return!d&&((g=E.current)==null?void 0:g.click())},children:[r.jsx("input",{ref:E,id:h,type:"file",accept:e,multiple:t,disabled:d,"aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":c||y||void 0,"aria-required":S,style:{display:"none"},onChange:P}),r.jsx(s.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:Sa}),r.jsx(s.Text,{fontSize:"sm",fontWeight:"medium",color:C?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:f}),r.jsxs(s.Text,{fontSize:"xs",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:[e?`Accepts ${e}`:"All file types supported",n&&` up to ${Math.round(n/1024/1024)}MB`]}),w.length>0&&r.jsxs(s.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[r.jsxs(s.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",w.length>1?"s":"",":"]}),w.map((g,H)=>r.jsx(s.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:g},H))]})]}),(i||l||T)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:c||T?"red.500":"text.muted",fontFamily:"var(--font-body)",children:T||(c?l:i)})]})}const Br={sm:{minH:"34px",py:"1",px:"2.5",fontSize:"13px",tagPy:"1px",tagPx:"2",tagFontSize:"12px"},md:{minH:"42px",py:"1.5",px:"3",fontSize:"14px",tagPy:"2px",tagPx:"2.5",tagFontSize:"12px"},lg:{minH:"48px",py:"2",px:"4",fontSize:"15px",tagPy:"3px",tagPx:"3",tagFontSize:"13px"}},Fr={blue:{focusBorder:"#0685FF",tagBgLight:"#EBF5FF",tagBgDark:"rgba(6, 133, 255, 0.18)",tagTextLight:"#0062CC",tagTextDark:"#60A5FA",tagBorderLight:"rgba(6, 133, 255, 0.25)",tagBorderDark:"rgba(6, 133, 255, 0.35)"},purple:{focusBorder:"#7700CC",tagBgLight:"#F3E8FF",tagBgDark:"rgba(119, 0, 204, 0.18)",tagTextLight:"#5B0099",tagTextDark:"#C084FC",tagBorderLight:"rgba(119, 0, 204, 0.25)",tagBorderDark:"rgba(119, 0, 204, 0.35)"}};function Yo({value:e=[],onChange:t,placeholder:n="Add tag...",label:o,helperText:i,errorMessage:l,isInvalid:a=!1,colorScheme:c="blue",size:d="md",isDisabled:u=!1,isReadOnly:f=!1,maxTags:h,allowDuplicates:x=!1,addOnBlur:p=!1,delimiter:b=",",id:v,name:B,haptic:y,disableHaptic:S=!1,style:j,className:C,"aria-label":F,"aria-labelledby":w,"aria-describedby":D,"aria-invalid":E,"aria-required":z}){const{trigger:N}=de(),R=I.default.useId(),T=v??R,[q,M]=U.useState(""),[k,P]=U.useState(!1),$=U.useRef(null),Q=Fr[c]??Fr.blue,J=Br[d]??Br.md,g=G=>{if(u||f)return;const K=G.trim();if(K&&!(h!=null&&e.length>=h)){if(!x&&e.includes(K)){M("");return}!S&&y!==!1&&N(y??"selection"),t([...e,K]),M("")}},H=G=>{u||f||(!S&&y!==!1&&N(y??"selection"),t(e.filter((K,Y)=>Y!==G)))},A=G=>{G.key==="Enter"||b&&G.key===b?(G.preventDefault(),g(q)):G.key==="Backspace"&&!q&&e.length>0&&H(e.length-1)},m=()=>{P(!1),p&&q.trim()&&g(q)},O=a?"#DC2626":k?Q.focusBorder:"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",style:j,className:C,children:[o&&r.jsx("label",{htmlFor:T,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:o}),r.jsxs(s.Box,{onClick:()=>{var G;return!u&&((G=$.current)==null?void 0:G.focus())},display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",minH:J.minH,py:J.py,px:J.px,borderRadius:"10px",bg:"bg",cursor:u?"not-allowed":"text",opacity:u?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${O}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[e.map((G,K)=>r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:J.tagPx,py:J.tagPy,borderRadius:"full",fontSize:J.tagFontSize,fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",whiteSpace:"nowrap",bg:c==="purple"?"purple.50":"blue.50",color:c==="purple"?"purple.700":"blue.700",border:"1px solid",borderColor:c==="purple"?"purple.200":"blue.200",_dark:{bg:c==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:c==="purple"?"purple.300":"blue.300",borderColor:c==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[r.jsx(s.Box,{as:"span","aria-hidden":"true",w:"6px",h:"6px",borderRadius:"full",flexShrink:0,bg:c==="purple"?"purple.500":"blue.500",_dark:{bg:c==="purple"?"purple.300":"blue.300"}}),r.jsx("span",{children:G}),!u&&!f&&r.jsx("button",{type:"button",onClick:Y=>{Y.stopPropagation(),H(K)},"aria-label":`Remove ${G}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:"transparent",border:"none",padding:"0",marginLeft:"2px",cursor:"pointer",opacity:.7,color:"inherit",fontSize:"14px",lineHeight:1,transition:"opacity 0.1s ease"},onMouseEnter:Y=>{Y.currentTarget.style.opacity="1"},onMouseLeave:Y=>{Y.currentTarget.style.opacity="0.7"},children:"×"})]},`${G}-${K}`)),!u&&!f&&r.jsx("input",{ref:$,id:T,name:B,type:"text",value:q,onChange:G=>M(G.target.value),onKeyDown:A,onFocus:()=>P(!0),onBlur:m,placeholder:e.length===0?n:"",disabled:u,readOnly:f,"aria-label":F,"aria-labelledby":w,"aria-describedby":D,"aria-invalid":a||E||void 0,"aria-required":z,style:{flex:1,minWidth:"120px",border:"none",outline:"none",background:"transparent",fontSize:J.fontSize,fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:0}})]}),(i||l)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?l:i})]})}const Fa=Yo;function it(e){if(!e)return"";if(!/<[a-z][\s\S]*>/i.test(e))return e;function t(n){if(n.type==="text")return n.data;if(!("name"in n)||!("attribs"in n))return"";const o=n.children.map(t).join("");switch(n.name.toLowerCase()){case"h1":return`# ${o.trim()}
288
288
 
289
289
  `;case"h2":return`## ${o.trim()}
290
290
 
@@ -349,7 +349,7 @@
349
349
  .medix-rte-content .tiptap .text-center { text-align: center; }
350
350
  .medix-rte-content .tiptap .text-right { text-align: right; }
351
351
  .medix-rte-content .tiptap .text-justify { text-align: justify; }
352
- `,document.head.appendChild(e)}function be({onClick:e,isActive:t,disabled:n,title:o,accentColor:i,children:l,haptic:a,disableHaptic:c}){const{trigger:f}=de(),[u,d]=I.default.useState(!1);return r.jsx("button",{type:"button",title:o,onMouseDown:p=>{p.preventDefault(),n||(!c&&a!==!1&&f(a??"selection"),e())},onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),disabled:n,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"28px",padding:"0 8px",borderRadius:"6px",border:"none",fontSize:"12px",fontWeight:600,fontFamily:"var(--font-body)",cursor:n?"not-allowed":"pointer",background:t?i:u?"var(--medix-form-bg-subtle, #F0F4F8)":"transparent",color:t?"#fff":"var(--medix-form-text)",opacity:n?.4:1,transition:"background 0.12s ease, color 0.12s ease",flexShrink:0},children:l})}function Dt(){return r.jsx("div",{style:{width:"1px",height:"18px",background:"var(--medix-form-border)",flexShrink:0,alignSelf:"center",margin:"0 2px"}})}const Ia=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"})}),Ta=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"})}),Da=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"})}),Aa=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"})}),za=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"})}),Ra=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"})}),Ma=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"})}),Oa=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})}),Na=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.97L17.73 21 19 19.73 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"})}),Pa=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"})}),_a=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"})}),Ha=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"})});function Wa({editor:e,accentColor:t,disabled:n}){if(!e)return null;const o=e.isActive("heading",{level:1})?"h1":e.isActive("heading",{level:2})?"h2":e.isActive("heading",{level:3})?"h3":"p",i=l=>{l.preventDefault();const a=l.target.value;if(a==="p")e.chain().focus().setParagraph().run();else{const c=parseInt(a.replace("h",""),10);e.chain().focus().toggleHeading({level:c}).run()}};return r.jsxs("select",{value:o,onChange:i,disabled:n,onMouseDown:l=>l.stopPropagation(),title:"Text style",style:{height:"28px",padding:"0 6px",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"12px",fontFamily:"var(--font-body)",cursor:n?"not-allowed":"pointer",outline:"none",flexShrink:0},children:[r.jsx("option",{value:"p",children:"Paragraph"}),r.jsx("option",{value:"h1",children:"Heading 1"}),r.jsx("option",{value:"h2",children:"Heading 2"}),r.jsx("option",{value:"h3",children:"Heading 3"})]})}function qa({currentMode:e,onSelectMode:t,accentColor:n,disabled:o,haptic:i,disableHaptic:l}){const{trigger:a}=de();return r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",p:"0.5",borderRadius:"md",bg:"bg.subtle",style:{background:"var(--medix-form-bg-subtle, #F0F4F8)",border:"1px solid var(--medix-form-border)"},ml:"auto",flexShrink:0,children:[r.jsx("button",{type:"button",disabled:o,onClick:()=>{!o&&!l&&i!==!1&&a(i??"selection"),t("wysiwyg")},style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:o?"not-allowed":"pointer",background:e==="wysiwyg"?n:"transparent",color:e==="wysiwyg"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Rich Text"}),r.jsx("button",{type:"button",disabled:o,onClick:()=>{!o&&!l&&i!==!1&&a(i??"selection"),t("markdown")},style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:o?"not-allowed":"pointer",background:e==="markdown"?n:"transparent",color:e==="markdown"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Markdown"})]})}function Va({editor:e,accentColor:t,disabled:n,opts:o,mode:i,showModeToggle:l,onModeChange:a,onInsertMarkdown:c}){const f=()=>{if(!e)return;const u=e.getAttributes("link").href,d=window.prompt("Enter URL",u??"https://");if(d!==null){if(d===""){e.chain().focus().unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:d,target:"_blank"}).run()}};return r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"1",px:"2",py:"1.5",borderBottom:"1px solid",borderColor:"border",bg:"bg",style:{background:"var(--medix-form-bg)",borderBottomColor:"var(--medix-form-border)"},children:[r.jsx(s.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5",children:i==="wysiwyg"&&e?r.jsxs(r.Fragment,{children:[o.headings&&r.jsxs(r.Fragment,{children:[r.jsx(Wa,{editor:e,accentColor:t,disabled:n}),r.jsx(Dt,{})]}),o.bold&&r.jsx(be,{onClick:()=>e.chain().focus().toggleBold().run(),isActive:e.isActive("bold"),disabled:n,title:"Bold (Ctrl+B)",accentColor:t,children:r.jsx(Ia,{})}),o.italic&&r.jsx(be,{onClick:()=>e.chain().focus().toggleItalic().run(),isActive:e.isActive("italic"),disabled:n,title:"Italic (Ctrl+I)",accentColor:t,children:r.jsx(Ta,{})}),o.underline&&r.jsx(be,{onClick:()=>e.chain().focus().toggleUnderline().run(),isActive:e.isActive("underline"),disabled:n,title:"Underline (Ctrl+U)",accentColor:t,children:r.jsx(Da,{})}),o.strikethrough&&r.jsx(be,{onClick:()=>e.chain().focus().toggleStrike().run(),isActive:e.isActive("strike"),disabled:n,title:"Strikethrough",accentColor:t,children:r.jsx(Aa,{})}),(o.bulletList||o.orderedList||o.quote)&&r.jsx(Dt,{}),o.bulletList&&r.jsx(be,{onClick:()=>e.chain().focus().toggleBulletList().run(),isActive:e.isActive("bulletList"),disabled:n,title:"Bullet List",accentColor:t,children:r.jsx(za,{})}),o.orderedList&&r.jsx(be,{onClick:()=>e.chain().focus().toggleOrderedList().run(),isActive:e.isActive("orderedList"),disabled:n,title:"Ordered List",accentColor:t,children:r.jsx(Ra,{})}),o.quote&&r.jsx(be,{onClick:()=>e.chain().focus().toggleBlockquote().run(),isActive:e.isActive("blockquote"),disabled:n,title:"Blockquote",accentColor:t,children:r.jsx(Ma,{})}),o.textAlign&&r.jsxs(r.Fragment,{children:[r.jsx(Dt,{}),r.jsx(be,{onClick:()=>e.chain().focus().setTextAlign("left").run(),isActive:e.isActive({textAlign:"left"}),disabled:n,title:"Align Left",accentColor:t,children:r.jsx(Pa,{})}),r.jsx(be,{onClick:()=>e.chain().focus().setTextAlign("center").run(),isActive:e.isActive({textAlign:"center"}),disabled:n,title:"Align Center",accentColor:t,children:r.jsx(_a,{})}),r.jsx(be,{onClick:()=>e.chain().focus().setTextAlign("right").run(),isActive:e.isActive({textAlign:"right"}),disabled:n,title:"Align Right",accentColor:t,children:r.jsx(Ha,{})})]}),(o.link||o.clearFormat)&&r.jsx(Dt,{}),o.link&&r.jsx(be,{onClick:f,isActive:e.isActive("link"),disabled:n,title:"Insert / Edit Link",accentColor:t,children:r.jsx(Oa,{})}),o.clearFormat&&r.jsx(be,{onClick:()=>e.chain().focus().unsetAllMarks().clearNodes().run(),disabled:n,title:"Clear Formatting",accentColor:t,children:r.jsx(Na,{})})]}):r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",children:[r.jsx(be,{onClick:()=>c==null?void 0:c("**bold text**"),disabled:n,title:"Markdown Bold",accentColor:t,children:"**B**"}),r.jsx(be,{onClick:()=>c==null?void 0:c("*italic text*"),disabled:n,title:"Markdown Italic",accentColor:t,children:"*I*"}),r.jsx(be,{onClick:()=>c==null?void 0:c(`
352
+ `,document.head.appendChild(e)}function be({onClick:e,isActive:t,disabled:n,title:o,accentColor:i,children:l,haptic:a,disableHaptic:c}){const{trigger:d}=de(),[u,f]=I.default.useState(!1);return r.jsx("button",{type:"button",title:o,onMouseDown:h=>{h.preventDefault(),n||(!c&&a!==!1&&d(a??"selection"),e())},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),disabled:n,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"28px",padding:"0 8px",borderRadius:"6px",border:"none",fontSize:"12px",fontWeight:600,fontFamily:"var(--font-body)",cursor:n?"not-allowed":"pointer",background:t?i:u?"var(--medix-form-bg-subtle, #F0F4F8)":"transparent",color:t?"#fff":"var(--medix-form-text)",opacity:n?.4:1,transition:"background 0.12s ease, color 0.12s ease",flexShrink:0},children:l})}function Dt(){return r.jsx("div",{style:{width:"1px",height:"18px",background:"var(--medix-form-border)",flexShrink:0,alignSelf:"center",margin:"0 2px"}})}const Ia=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"})}),Ta=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"})}),Da=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"})}),Aa=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"})}),za=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"})}),Ra=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"})}),Ma=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"})}),Oa=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})}),Na=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.97L17.73 21 19 19.73 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"})}),Pa=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"})}),_a=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"})}),Ha=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"})});function Wa({editor:e,accentColor:t,disabled:n}){if(!e)return null;const o=e.isActive("heading",{level:1})?"h1":e.isActive("heading",{level:2})?"h2":e.isActive("heading",{level:3})?"h3":"p",i=l=>{l.preventDefault();const a=l.target.value;if(a==="p")e.chain().focus().setParagraph().run();else{const c=parseInt(a.replace("h",""),10);e.chain().focus().toggleHeading({level:c}).run()}};return r.jsxs("select",{value:o,onChange:i,disabled:n,onMouseDown:l=>l.stopPropagation(),title:"Text style",style:{height:"28px",padding:"0 6px",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"12px",fontFamily:"var(--font-body)",cursor:n?"not-allowed":"pointer",outline:"none",flexShrink:0},children:[r.jsx("option",{value:"p",children:"Paragraph"}),r.jsx("option",{value:"h1",children:"Heading 1"}),r.jsx("option",{value:"h2",children:"Heading 2"}),r.jsx("option",{value:"h3",children:"Heading 3"})]})}function qa({currentMode:e,onSelectMode:t,accentColor:n,disabled:o,haptic:i,disableHaptic:l}){const{trigger:a}=de();return r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",p:"0.5",borderRadius:"md",bg:"bg.subtle",style:{background:"var(--medix-form-bg-subtle, #F0F4F8)",border:"1px solid var(--medix-form-border)"},ml:"auto",flexShrink:0,children:[r.jsx("button",{type:"button",disabled:o,onClick:()=>{!o&&!l&&i!==!1&&a(i??"selection"),t("wysiwyg")},style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:o?"not-allowed":"pointer",background:e==="wysiwyg"?n:"transparent",color:e==="wysiwyg"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Rich Text"}),r.jsx("button",{type:"button",disabled:o,onClick:()=>{!o&&!l&&i!==!1&&a(i??"selection"),t("markdown")},style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:o?"not-allowed":"pointer",background:e==="markdown"?n:"transparent",color:e==="markdown"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Markdown"})]})}function Va({editor:e,accentColor:t,disabled:n,opts:o,mode:i,showModeToggle:l,onModeChange:a,onInsertMarkdown:c}){const d=()=>{if(!e)return;const u=e.getAttributes("link").href,f=window.prompt("Enter URL",u??"https://");if(f!==null){if(f===""){e.chain().focus().unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:f,target:"_blank"}).run()}};return r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"1",px:"2",py:"1.5",borderBottom:"1px solid",borderColor:"border",bg:"bg",style:{background:"var(--medix-form-bg)",borderBottomColor:"var(--medix-form-border)"},children:[r.jsx(s.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5",children:i==="wysiwyg"&&e?r.jsxs(r.Fragment,{children:[o.headings&&r.jsxs(r.Fragment,{children:[r.jsx(Wa,{editor:e,accentColor:t,disabled:n}),r.jsx(Dt,{})]}),o.bold&&r.jsx(be,{onClick:()=>e.chain().focus().toggleBold().run(),isActive:e.isActive("bold"),disabled:n,title:"Bold (Ctrl+B)",accentColor:t,children:r.jsx(Ia,{})}),o.italic&&r.jsx(be,{onClick:()=>e.chain().focus().toggleItalic().run(),isActive:e.isActive("italic"),disabled:n,title:"Italic (Ctrl+I)",accentColor:t,children:r.jsx(Ta,{})}),o.underline&&r.jsx(be,{onClick:()=>e.chain().focus().toggleUnderline().run(),isActive:e.isActive("underline"),disabled:n,title:"Underline (Ctrl+U)",accentColor:t,children:r.jsx(Da,{})}),o.strikethrough&&r.jsx(be,{onClick:()=>e.chain().focus().toggleStrike().run(),isActive:e.isActive("strike"),disabled:n,title:"Strikethrough",accentColor:t,children:r.jsx(Aa,{})}),(o.bulletList||o.orderedList||o.quote)&&r.jsx(Dt,{}),o.bulletList&&r.jsx(be,{onClick:()=>e.chain().focus().toggleBulletList().run(),isActive:e.isActive("bulletList"),disabled:n,title:"Bullet List",accentColor:t,children:r.jsx(za,{})}),o.orderedList&&r.jsx(be,{onClick:()=>e.chain().focus().toggleOrderedList().run(),isActive:e.isActive("orderedList"),disabled:n,title:"Ordered List",accentColor:t,children:r.jsx(Ra,{})}),o.quote&&r.jsx(be,{onClick:()=>e.chain().focus().toggleBlockquote().run(),isActive:e.isActive("blockquote"),disabled:n,title:"Blockquote",accentColor:t,children:r.jsx(Ma,{})}),o.textAlign&&r.jsxs(r.Fragment,{children:[r.jsx(Dt,{}),r.jsx(be,{onClick:()=>e.chain().focus().setTextAlign("left").run(),isActive:e.isActive({textAlign:"left"}),disabled:n,title:"Align Left",accentColor:t,children:r.jsx(Pa,{})}),r.jsx(be,{onClick:()=>e.chain().focus().setTextAlign("center").run(),isActive:e.isActive({textAlign:"center"}),disabled:n,title:"Align Center",accentColor:t,children:r.jsx(_a,{})}),r.jsx(be,{onClick:()=>e.chain().focus().setTextAlign("right").run(),isActive:e.isActive({textAlign:"right"}),disabled:n,title:"Align Right",accentColor:t,children:r.jsx(Ha,{})})]}),(o.link||o.clearFormat)&&r.jsx(Dt,{}),o.link&&r.jsx(be,{onClick:d,isActive:e.isActive("link"),disabled:n,title:"Insert / Edit Link",accentColor:t,children:r.jsx(Oa,{})}),o.clearFormat&&r.jsx(be,{onClick:()=>e.chain().focus().unsetAllMarks().clearNodes().run(),disabled:n,title:"Clear Formatting",accentColor:t,children:r.jsx(Na,{})})]}):r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",children:[r.jsx(be,{onClick:()=>c==null?void 0:c("**bold text**"),disabled:n,title:"Markdown Bold",accentColor:t,children:"**B**"}),r.jsx(be,{onClick:()=>c==null?void 0:c("*italic text*"),disabled:n,title:"Markdown Italic",accentColor:t,children:"*I*"}),r.jsx(be,{onClick:()=>c==null?void 0:c(`
353
353
  # Heading 1
354
354
  `),disabled:n,title:"Markdown H1",accentColor:t,children:"# H1"}),r.jsx(be,{onClick:()=>c==null?void 0:c(`
355
355
  ## Heading 2
@@ -357,12 +357,12 @@
357
357
  - List item
358
358
  `),disabled:n,title:"Markdown Bullet List",accentColor:t,children:"- List"}),r.jsx(be,{onClick:()=>c==null?void 0:c("[link text](https://example.com)"),disabled:n,title:"Markdown Link",accentColor:t,children:"[Link]"}),r.jsx(be,{onClick:()=>c==null?void 0:c(`
359
359
  > Blockquote
360
- `),disabled:n,title:"Markdown Blockquote",accentColor:t,children:"> Quote"})]})}),l&&r.jsx(qa,{currentMode:i,onSelectMode:a,accentColor:t,disabled:n})]})}const $a={bold:!0,italic:!0,underline:!0,strikethrough:!0,headings:!0,bulletList:!0,orderedList:!0,quote:!0,link:!0,textAlign:!0,clearFormat:!0};function Xn({id:e,name:t,value:n,defaultValue:o,onChange:i,onMarkdownChange:l,onHtmlChange:a,outputFormat:c="html",defaultMode:f="wysiwyg",mode:u,onModeChange:d,showModeToggle:p=!0,placeholder:x="Start typing...",label:h,helperText:b,errorMessage:v,isInvalid:F=!1,disabled:y=!1,colorScheme:j="blue",minHeight:C="180px",maxHeight:S="400px",maxLength:B,"aria-label":w,"aria-labelledby":D,"aria-describedby":E,"aria-invalid":A,"aria-required":M,showCharCount:z=!1,toolbarOptions:T,className:W,storageKey:R,persistDraft:k=!0,debounceMs:P=400,draftMaxAgeMs:V=10080*60*1e3,showDraftStatus:Q=!1,onDraftRestored:X}){const[g,O]=I.default.useState(!1),[H,m]=I.default.useState(f),N=u!==void 0?u:H,G=n!==void 0,Z=Ea[j],Y={...$a,...T},K=I.default.useMemo(()=>Ko(R,e,t,h),[R,e,t,h]),[le,J]=I.default.useState("idle"),re=I.default.useRef(null),ae=I.default.useRef(null),xe=I.default.useRef(!1),ge=I.default.useCallback((te,se,L)=>{if(!k||y)return;if(!te||te==="<p></p>"||te.trim()===""){ae.current&&(clearTimeout(ae.current),ae.current=null),re.current=null,Zo(K),J("idle");return}re.current={content:te,mode:se,format:L},J("saving"),ae.current&&clearTimeout(ae.current),ae.current=setTimeout(()=>{re.current&&(Sn(K,{content:re.current.content,mode:re.current.mode,format:re.current.format,updatedAt:Date.now(),version:1}),re.current=null,J("saved"))},P)},[k,y,K,P]);I.default.useEffect(()=>{if(!k)return;const te=()=>{ae.current&&(clearTimeout(ae.current),ae.current=null),re.current&&(Sn(K,{content:re.current.content,mode:re.current.mode,format:re.current.format,updatedAt:Date.now(),version:1}),re.current=null,J("saved"))};return typeof window<"u"&&(window.addEventListener("beforeunload",te),window.addEventListener("pagehide",te)),()=>{typeof window<"u"&&(window.removeEventListener("beforeunload",te),window.removeEventListener("pagehide",te)),te()}},[k,K]);const[ve,we]=I.default.useState(()=>{const te=G?n:o??"";return c==="markdown"?te:it(te)}),dt=I.default.useRef(null);I.default.useEffect(()=>{La()},[]);const pe=xr.useEditor({immediatelyRender:!1,extensions:[hl.default.configure({heading:{levels:[1,2,3]}}),gl.default,xl.default.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),ml.default.configure({types:["heading","paragraph"]}),bl.default.configure({placeholder:x})],content:G?c==="markdown"?He(n??""):n??"":o?c==="markdown"?He(o):o:"",editable:!y,editorProps:{attributes:{spellcheck:"true"}},onUpdate({editor:te}){const se=te.getHTML(),L=se==="<p></p>"?"":se,q=it(L);a==null||a(L),l==null||l(q);const ee=c==="markdown"?q:L;B!==void 0&&te.getText().length>B||(i==null||i(ee),ge(ee,"wysiwyg",c))},onFocus(){O(!0)},onBlur(){O(!1)}});I.default.useEffect(()=>{if(!pe||xe.current||!k||y)return;xe.current=!0;const te=Xo(K,V);if(!te||!te.content||te.content==="<p></p>"||te.content.trim()===""||G&&n&&n.trim()!==""&&n!=="<p></p>"&&n===te.content)return;const se=te.format==="markdown",L=te.content;if(se){const q=He(L);we(L),pe.commands.setContent(q,{emitUpdate:!1}),l==null||l(L),a==null||a(q),i==null||i(c==="markdown"?L:q)}else{const q=L==="<p></p>"?"":L,ee=it(q);we(ee),pe.commands.setContent(q,{emitUpdate:!1}),a==null||a(q),l==null||l(ee),i==null||i(c==="markdown"?ee:q)}te.mode&&te.mode!==N&&p&&(u===void 0&&m(te.mode),d==null||d(te.mode)),J("saved"),X==null||X(te)},[pe,k,y,K,V,G,n,c,N,p,u,i,a,l,d,X]);const Et=te=>{if(te!==N){if(te==="markdown"){const se=pe?pe.getHTML():"",L=it(se==="<p></p>"?"":se);we(L),k&&ge(c==="markdown"?L:se,"markdown",c)}else{const se=He(ve);pe&&pe.commands.setContent(se,{emitUpdate:!1}),k&&ge(c==="markdown"?ve:se,"wysiwyg",c)}u===void 0&&m(te),d==null||d(te)}},Lt=te=>{const se=te.target.value;we(se);const L=He(se);l==null||l(se),a==null||a(L);const q=c==="markdown"?se:L;B!==void 0&&se.length>B||(i==null||i(q),pe&&pe.commands.setContent(L,{emitUpdate:!1}),ge(q,"markdown",c))},nn=te=>{const se=dt.current;if(!se){we(Pe=>{const Le=Pe+te;return ge(c==="markdown"?Le:He(Le),"markdown",c),Le});return}const L=se.selectionStart,q=se.selectionEnd,ee=se.value,ie=ee.substring(0,L)+te+ee.substring(q);we(ie);const ce=He(ie);l==null||l(ie),a==null||a(ce);const je=c==="markdown"?ie:ce;i==null||i(je),pe&&pe.commands.setContent(ce,{emitUpdate:!1}),ge(je,"markdown",c),setTimeout(()=>{se.focus(),se.setSelectionRange(L+te.length,L+te.length)},50)};I.default.useEffect(()=>{if(G)if(c==="markdown"){const te=n??"";if(we(te),pe){const se=He(te);pe.getHTML()!==se&&pe.commands.setContent(se,{emitUpdate:!1})}}else{const te=n===""?"<p></p>":n??"<p></p>";pe&&pe.getHTML()!==te&&pe.commands.setContent(te,{emitUpdate:!1}),we(it(n??""))}},[pe,G,n,c]);const It=N==="markdown"?ve.length:(pe==null?void 0:pe.getText().length)??0,rn=F?"#DC2626":g?Z.base:"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",className:W,children:[h&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",color:"text.heading",children:h}),r.jsxs(s.Box,{borderRadius:"md",overflow:"hidden",bg:"bg",opacity:y?.6:1,style:{border:`1.5px solid ${rn}`,transition:"border-color 0.15s ease",boxShadow:"none",background:"var(--medix-form-bg)"},children:[r.jsx(Va,{editor:pe,accentColor:Z.base,disabled:y,opts:Y,mode:N,showModeToggle:p,onModeChange:Et,onInsertMarkdown:nn}),N==="wysiwyg"?r.jsx(s.Box,{className:"medix-rte-content",style:{minHeight:C,maxHeight:S,overflowY:"auto"},_dark:{color:"var(--medix-form-text)"},children:r.jsx(xr.EditorContent,{editor:pe})}):r.jsx("textarea",{ref:dt,value:ve,onChange:Lt,placeholder:x,disabled:y,"aria-label":w,"aria-labelledby":D,"aria-describedby":E,"aria-invalid":F||A||void 0,"aria-required":M,onFocus:()=>O(!0),onBlur:()=>O(!1),style:{width:"100%",minHeight:C,maxHeight:S,padding:"12px 16px",fontFamily:"var(--font-mono, monospace)",fontSize:"13px",lineHeight:"1.6",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",border:"none",outline:"none",resize:"vertical"}}),(z||B||Q&&le!=="idle")&&r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:Q&&le!=="idle"?"space-between":B?"flex-end":"flex-start",px:"3",py:"1.5",borderTop:"1px solid",borderColor:"border",style:{borderTopColor:"var(--medix-form-border)",background:"var(--medix-form-bg)"},children:[Q&&le!=="idle"?r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",children:[r.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:le==="saving"?"orange.400":"green.500"}),r.jsx(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:le==="saving"?"Saving draft...":"Draft saved"})]}):r.jsx(s.Box,{}),(z||B)&&r.jsxs(s.Text,{fontSize:"xs",color:B&&It>B?"red.500":"text.muted",fontFamily:"var(--font-body)",children:[It,B?` / ${B}`:""," characters"]})]})]}),b&&!F&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:b}),F&&v&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:v})]})}const Ua=Xn;Xn.displayName="MedixRichTextInput";const Jo=I.default.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...o},i)=>r.jsx(s.Box,{ref:i,bg:"bg.surface",borderRadius:"card",border:"1px solid",borderColor:"border",boxShadow:"none",_dark:{boxShadow:"none"},overflow:"hidden",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",...t&&{_hover:{transform:"translateY(-2px)",boxShadow:"none",borderColor:"blue.200"},cursor:"pointer"},...o,children:I.default.Children.map(n,l=>l||null)}));Jo.displayName="MedixCard";function Ga({title:e,subtitle:t,action:n,children:o,...i}){return r.jsxs(s.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[r.jsxs(s.Box,{flex:"1",children:[e&&r.jsx(s.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&r.jsx(s.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o]}),n&&r.jsx(s.Box,{flexShrink:0,children:n})]})}function Ya({children:e,...t}){return r.jsx(s.Box,{px:"6",py:"5",...t,children:e})}function Ka({children:e,...t}){return r.jsx(s.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Qo=I.default.forwardRef(({value:e,label:t,unit:n,change:o,trend:i,icon:l,accentColor:a="blue.500",...c},f)=>{const u=i??(o!==void 0?o>=0?"up":"down":"neutral"),d=u==="up"?"green.500":u==="down"?"red.500":"text.muted";return r.jsxs(s.Box,{ref:f,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"none",_dark:{boxShadow:"none"},...c,children:[l&&r.jsx(s.Box,{w:"10",h:"10",borderRadius:"md",bg:`${a.split(".")[0]}.100`,color:a,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:l}),r.jsxs(s.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&r.jsx(s.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),r.jsx(s.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o!==void 0&&r.jsxs(s.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:d,children:[r.jsx(s.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),r.jsxs(s.Box,{as:"span",children:[Math.abs(o),"%"]})]})]})});Qo.displayName="MedixStatCard";const Za={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},ei=I.default.forwardRef(({maxWidth:e="xl",children:t,...n},o)=>r.jsx(s.Box,{ref:o,w:"100%",maxW:Za[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));ei.displayName="MedixContainer";function Xa({eyebrow:e,title:t,description:n,align:o="center",action:i,eyebrowColor:l="blue.500",...a}){const c=o,f=o==="center"?"center":o==="right"?"flex-end":"flex-start";return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:f,textAlign:c,gap:"3",...a,children:[e&&r.jsx(s.Box,{as:"span",fontSize:"md",fontWeight:"bold",color:l,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),r.jsx(s.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:o==="center"?"720px":void 0,children:t}),n&&r.jsx(s.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:o==="center"?"640px":void 0,children:n}),i&&r.jsx(s.Box,{mt:"2",children:i})]})}const Ja=["light","dark"],Qa={light:{label:"Light mode",canvas:_.neutralLight.bg.value,surface:_.neutralLight.surface.value,border:_.neutralLight.border.value,text:_.neutralLight.heading.value,muted:_.neutralLight.body.value},dark:{label:"Dark mode",canvas:_.neutralDark.bg.value,surface:_.neutralDark.surface.value,border:_.neutralDark.border.value,text:_.neutralDark.heading.value,muted:_.neutralDark.body.value}};function $e(e,t){return Object.entries(t).map(([n,o])=>({token:`${e}.${n}`,value:o.value}))}const es=[{title:"Foundation semantics",description:"Core app backgrounds, text, borders, and brand tokens that shift with light and dark mode.",tokens:[{token:"bg",description:"Page background",preview:"fill",light:_.neutralLight.bg.value,dark:_.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:_.neutralLight.bg2.value,dark:_.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:_.neutralLight.surface.value,dark:_.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:_.neutralLight.heading.value,dark:_.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:_.neutralLight.body.value,dark:_.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:_.neutralLight.muted.value,dark:_.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:_.neutralLight.border.value,dark:_.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:_.blue[500].value,dark:_.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:_.blue[100].value,dark:_.blue[900].value},{token:"brand.contrast",description:"High-contrast brand foreground",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"}]},{title:"Status semantics",description:"System feedback colors used for success, warning, and error states.",tokens:[{token:"status.success",description:"Success foreground",preview:"fill",light:_.green[500].value,dark:_.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:_.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:_.amber[500].value,dark:_.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:_.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:_.red[500].value,dark:_.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:_.red[100].value,dark:"rgba(220, 38, 38, 0.2)"}]},{title:"Blue semantic palette",description:"Semantic blue scale and utility tokens used by Chakra-aware theme props.",tokens:[{token:"blue.50",description:"Blue scale 50",preview:"fill",light:_.blue[50].value,dark:_.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:_.blue[100].value,dark:_.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:_.blue[200].value,dark:_.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:_.blue[300].value,dark:_.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:_.blue[400].value,dark:_.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:_.blue[500].value,dark:_.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:_.blue[600].value,dark:_.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:_.blue[700].value,dark:_.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:_.blue[800].value,dark:_.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:_.blue[900].value,dark:_.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:_.blue[500].value,dark:_.blue[500].value},{token:"blue.contrast",description:"High-contrast content on blue",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"},{token:"blue.muted",description:"Muted blue background",preview:"fill",light:_.blue[100].value,dark:_.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:_.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:_.blue[100].value,dark:_.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:_.blue[700].value,dark:_.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:_.blue[500].value,dark:_.blue[500].value}]},{title:"Purple semantic palette",description:"Semantic purple scale and utility tokens used by Chakra-aware theme props.",tokens:[{token:"purple.50",description:"Purple scale 50",preview:"fill",light:_.purple[50].value,dark:_.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:_.purple[100].value,dark:_.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:_.purple[500].value,dark:_.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:_.purple[600].value,dark:_.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:_.purple[500].value,dark:_.purple[500].value},{token:"purple.contrast",description:"High-contrast content on purple",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"},{token:"purple.muted",description:"Muted purple background",preview:"fill",light:_.purple[100].value,dark:_.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:_.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:_.purple[100].value,dark:_.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:_.purple[700].value,dark:_.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:_.purple[500].value,dark:_.purple[500].value}]}],ts=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:$e("brand.blue",_.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:$e("brand.purple",_.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:$e("brand.green",_.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:$e("brand.amber",_.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:$e("brand.red",_.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:$e("brand.neutralLight",_.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:$e("brand.neutralDark",_.neutralDark)}];function ns({mode:e,token:t}){const n=Qa[e],o=e==="light"?t.light:t.dark,i={minH:"88px",borderRadius:"md",border:"1px solid",borderColor:n.border,bg:n.canvas,display:"flex",alignItems:"center",justifyContent:"center",px:"4"};return r.jsxs(s.Box,{border:"1px solid",borderColor:n.border,borderRadius:"lg",bg:n.surface,p:"3",children:[r.jsx(s.Text,{fontSize:"xs",fontWeight:"600",color:n.text,fontFamily:"var(--font-heading)",mb:"2",children:n.label}),t.preview==="text"?r.jsx(s.Box,{...i,children:r.jsx(s.Text,{color:o,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?r.jsx(s.Box,{...i,children:r.jsx(s.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:o,bg:n.canvas})}):r.jsx(s.Box,{...i,bg:o,borderColor:o===n.canvas||o==="#FFFFFF"?n.border:"transparent"}),r.jsx(s.Text,{mt:"2",fontSize:"xs",color:n.muted,fontFamily:"var(--font-mono)",children:o})]})}const ti=I.default.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...n},o)=>r.jsxs(s.Box,{ref:o,display:"flex",flexDirection:"column",gap:"8",...n,children:[r.jsx(s.Box,{children:r.jsx(s.Text,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",maxW:"4xl",children:"Browse the full MedixDeck color system in one place. Semantic tokens are rendered side by side for light and dark mode, while raw palettes expose every underlying brand and status scale used by the theme."})}),e&&r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"6",children:es.map(i=>r.jsxs(s.Box,{children:[r.jsx(s.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),r.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),r.jsx(s.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:i.tokens.map(l=>r.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[r.jsx(s.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:l.token}),r.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:l.description}),r.jsx(s.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:Ja.map(a=>r.jsx(ns,{mode:a,token:l},`${l.token}-${a}`))})]},l.token))})]},i.title))}),t&&r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"6",children:ts.map(i=>r.jsxs(s.Box,{children:[r.jsx(s.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),r.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),r.jsx(s.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:i.tokens.map(l=>r.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[r.jsx(s.Box,{h:"72px",bg:l.value,borderBottom:"1px solid",borderColor:l.value==="#FFFFFF"||l.value===_.neutralLight.bg.value?"border":"transparent"}),r.jsxs(s.Box,{p:"4",children:[r.jsx(s.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:l.token}),r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:l.value})]})]},l.token))})]},i.title))})]}));ti.displayName="MedixThemeColorPalette";function Oe({label:e,children:t,placement:n="top",toggleOnTouch:o=!0,...i}){const[l,a]=I.default.useState(!1),c=I.default.useRef(null),u=I.default.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(pointer: coarse)").matches,[])&&o;I.default.useEffect(()=>{if(!u||!l)return;const p=x=>{c.current&&!c.current.contains(x.target)&&a(!1)};return document.addEventListener("mousedown",p),document.addEventListener("touchstart",p,{passive:!0}),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("touchstart",p)}},[u,l]),I.default.useEffect(()=>{!u&&l&&a(!1)},[u,l]);const d=p=>{u&&(p.preventDefault(),p.stopPropagation(),a(x=>!x))};return r.jsxs(s.Tooltip.Root,{positioning:{placement:n},open:u?l:void 0,onOpenChange:u?p=>a(p.open):void 0,...i,children:[r.jsx(s.Tooltip.Trigger,{asChild:!0,children:r.jsx("span",{ref:c,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},onClick:d,children:t})}),r.jsx(s.Tooltip.Positioner,{children:r.jsx(s.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"gray.700",boxShadow:"none",children:e})})]})}const rs={blue:{solid:"#0685FF",hoverBgLight:"rgba(6,133,255,0.08)",hoverBgDark:"rgba(6,133,255,0.12)",activeBgLight:"rgba(6,133,255,0.10)",activeBgDark:"rgba(6,133,255,0.15)",activeBgDarkStrong:"rgba(6,133,255,0.18)",chakraToken:"blue.500"},purple:{solid:"#7700CC",hoverBgLight:"rgba(119,0,204,0.08)",hoverBgDark:"rgba(119,0,204,0.12)",activeBgLight:"rgba(119,0,204,0.10)",activeBgDark:"rgba(119,0,204,0.15)",activeBgDarkStrong:"rgba(119,0,204,0.18)",chakraToken:"purple.500"}},Re="#EF4444",Bn="rgba(239,68,68,0.08)",ni=()=>r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),r.jsx("path",{d:"M9 3v18"}),r.jsx("path",{d:"m14 9-3 3 3 3"})]}),ri=()=>r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),r.jsx("path",{d:"M9 3v18"}),r.jsx("path",{d:"m12 15 3-3-3-3"})]}),os=()=>r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),r.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),r.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),is=()=>r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),oi=({open:e})=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:e?"rotate(180deg)":"rotate(0deg)"},children:r.jsx("polyline",{points:"6 9 12 15 18 9"})}),Fn=()=>r.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),r.jsx("polyline",{points:"16 17 21 12 16 7"}),r.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),ls=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),r.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),as=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"3"}),r.jsx("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]}),ss=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"4"}),r.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),r.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),r.jsx("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),r.jsx("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),r.jsx("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),r.jsx("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),r.jsx("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),r.jsx("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),cs=()=>r.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),us=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),r.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),r.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]}),ds=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M10 2v7.31a2 2 0 0 1-.37 1.17L4.22 18A3 3 0 0 0 6.78 22h10.44a3 3 0 0 0 2.56-4l-5.41-7.52A2 2 0 0 1 14 9.31V2"}),r.jsx("line",{x1:"8.5",y1:"2",x2:"15.5",y2:"2"}),r.jsx("path",{d:"M8.5 14h7"})]}),fs=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),r.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),r.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),ps=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),r.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),r.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),hs=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),xs=(e,t)=>r.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function gs(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const Lr={warning:{bg:"#FFFBEB",border:"#FDE68A",text:"#92400E",darkBg:"rgba(245,158,11,0.12)",darkBorder:"rgba(245,158,11,0.25)",darkText:"#FDE68A",badgeBg:"#F59E0B",badgeColor:"#FFFFFF"},info:{bg:"#EFF6FF",border:"#BFDBFE",text:"#1E40AF",darkBg:"rgba(6,133,255,0.12)",darkBorder:"rgba(6,133,255,0.25)",darkText:"#93C5FD",badgeBg:"#0685FF",badgeColor:"#FFFFFF"},error:{bg:"#FEF2F2",border:"#FECACA",text:"#991B1B",darkBg:"rgba(239,68,68,0.12)",darkBorder:"rgba(239,68,68,0.25)",darkText:"#FCA5A5",badgeBg:"#EF4444",badgeColor:"#FFFFFF"},neutral:{bg:"bg.surface",border:"var(--chakra-colors-border)",text:"text.body",darkBg:"bg.surface",darkBorder:"var(--chakra-colors-border)",darkText:"text.heading",badgeBg:"#6B7280",badgeColor:"#FFFFFF"}};function ms(e){if(e&&e!=="auto")return{isNonProduction:e!=="production"&&e!=="live",detectedEnv:e};try{if(typeof process<"u"&&process&&process.env){const t=process.env.NODE_ENV,n=process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,o=process.env.MEDIX_ENV||process.env.NEXT_PUBLIC_MEDIX_ENV||process.env.PUBLIC_MEDIX_ENV,i=process.env.CONTEXT;if(o){const l=String(o).toLowerCase();if(l==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"};if(l==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(l==="test")return{isNonProduction:!0,detectedEnv:"test"};if(l==="dev"||l==="development")return{isNonProduction:!0,detectedEnv:"development"};if(l==="production"||l==="live")return{isNonProduction:!1,detectedEnv:"production"}}if(n==="preview")return{isNonProduction:!0,detectedEnv:"preview"};if(n==="development")return{isNonProduction:!0,detectedEnv:"development"};if(i==="deploy-preview"||i==="branch-deploy")return{isNonProduction:!0,detectedEnv:"preview"};if(t==="development")return{isNonProduction:!0,detectedEnv:"development"};if(t==="test")return{isNonProduction:!0,detectedEnv:"test"}}}catch{}try{const t={url:typeof document>"u"?require("url").pathToFileURL(__filename).href:et&&et.tagName.toUpperCase()==="SCRIPT"&&et.src||new URL("index.cjs",document.baseURI).href};if(typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:et&&et.tagName.toUpperCase()==="SCRIPT"&&et.src||new URL("index.cjs",document.baseURI).href}<"u"&&t.env){const n=t.env.MODE,o=t.env.VITE_MEDIX_ENV||t.env.PUBLIC_MEDIX_ENV;if(o){const i=String(o).toLowerCase();if(i==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"};if(i==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(i==="test")return{isNonProduction:!0,detectedEnv:"test"};if(i==="dev"||i==="development")return{isNonProduction:!0,detectedEnv:"development"};if(i==="production"||i==="live")return{isNonProduction:!1,detectedEnv:"production"}}if(n==="development")return{isNonProduction:!0,detectedEnv:"development"};if(n==="test")return{isNonProduction:!0,detectedEnv:"test"};if(n==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(n==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"}}}catch{}if(typeof window<"u"&&window.location&&window.location.hostname){const t=window.location.hostname.toLowerCase();if(t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="0.0.0.0"||t.endsWith(".local")||t.endsWith(".test")||t.endsWith(".internal")||t.includes(".ngrok")||t.includes(".loca.lt"))return{isNonProduction:!0,detectedEnv:"development"};if(t.endsWith(".vercel.app")||t.endsWith(".netlify.app")||t.endsWith(".pages.dev")||t.endsWith(".amplifyapp.com")||t.endsWith(".onrender.com")||t.endsWith(".fly.dev")||t.endsWith(".azurestaticapps.net"))return{isNonProduction:!0,detectedEnv:"preview"};if(t.startsWith("sandbox.")||t.includes("-sandbox."))return{isNonProduction:!0,detectedEnv:"sandbox"};if(t.startsWith("staging.")||t.startsWith("stage.")||t.includes("-staging."))return{isNonProduction:!0,detectedEnv:"staging"};if(t.startsWith("test.")||t.startsWith("test-")||t.startsWith("qa.")||t.includes("-test."))return{isNonProduction:!0,detectedEnv:"test"};if(t.startsWith("dev.")||t.includes("-dev."))return{isNonProduction:!0,detectedEnv:"development"}}return{isNonProduction:!1,detectedEnv:"production"}}function bs(e){switch(e){case"sandbox":return"SANDBOX ENVIRONMENT";case"staging":return"STAGING ENVIRONMENT";case"test":return"TEST ENVIRONMENT";case"preview":return"PREVIEW DEPLOYMENT";case"development":return"DEVELOPMENT MODE";default:return"NON-PRODUCTION ENVIRONMENT"}}function ys({detectedEnv:e,config:t,onDismiss:n}){const o=t.status??(e==="staging"||e==="preview"?"info":e==="test"?"error":"warning"),i=Lr[o]??Lr.warning,l=t.badgeLabel??bs(e),a=t.message??"You are in a non-production test/sandbox environment. Simulated patient records, transactions, and actions will not affect live data.",c=o==="info"?r.jsx(fs,{}):o==="error"?r.jsx(ps,{}):r.jsx(ds,{});return r.jsxs(s.Box,{as:"aside",role:"status","aria-live":"polite","aria-label":`${l}: ${a}`,position:"sticky",top:"0",zIndex:"banner",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"3",px:{base:"3",md:"5"},py:"2",minH:"36px",borderBottom:"1px solid",borderColor:i.border,bg:i.bg,color:i.text,_dark:{bg:i.darkBg,borderColor:i.darkBorder,color:i.darkText},transition:"background 0.2s ease, border-color 0.2s ease",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",minW:"0",flex:"1",children:[r.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:i.badgeBg,children:c}),r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"2",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",fontFamily:"var(--font-body)",lineHeight:"1",flexShrink:0,style:{background:i.badgeBg,color:i.badgeColor},children:l}),r.jsx(s.Box,{as:"span",fontSize:"xs",fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",color:"inherit",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},display:{base:"none",sm:"inline-block"},children:a})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",flexShrink:0,children:[t.action,t.dismissible&&r.jsx(s.chakra.button,{type:"button",onClick:n,"aria-label":"Dismiss environment banner",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"6",h:"6",borderRadius:"md",border:"none",bg:"transparent",color:"inherit",cursor:"pointer",opacity:.8,_hover:{opacity:1,bg:"blackAlpha.100"},_dark:{_hover:{bg:"whiteAlpha.100"}},_focusVisible:{outline:"2px solid",outlineColor:i.badgeBg,outlineOffset:"1px"},transition:"background 0.15s ease, opacity 0.15s ease",children:r.jsx(hs,{})})]})]})}const At=[{value:"light",label:"Light mode",shortLabel:"Light",icon:r.jsx(ss,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:r.jsx(cs,{})},{value:"system",label:"System theme",shortLabel:"System",icon:r.jsx(us,{})}];function vs({scheme:e}){const{mounted:t,themeMode:n,themeSetting:o,setThemeMode:i}=St(),[l,a]=U.useState(!1),c=U.useRef(null),f=t?o:void 0,u=At.find(x=>x.value===f)||At[0];U.useEffect(()=>{const x=h=>{c.current&&!c.current.contains(h.target)&&a(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);const d=r.jsx(s.Box,{display:{base:"none",md:"flex"},alignItems:"center",gap:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"full",p:"1","aria-label":"Theme mode switcher",children:At.map(x=>{const h=f===x.value,b=x.value==="dark"?e.activeBgDarkStrong:x.value==="system"?e.hoverBgDark:e.hoverBgLight;return r.jsxs(s.Box,{as:"button",onClick:()=>{t&&i(x.value)},"aria-pressed":h,"aria-label":x.label,title:t&&x.value==="system"?`System theme (currently ${n})`:x.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:h?b:"transparent",color:h?e.chakraToken:"text.muted",opacity:t?1:.6,cursor:t?"pointer":"default",transition:"background 0.18s ease, color 0.18s ease, opacity 0.18s ease",_hover:t?{bg:h?b:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[r.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:x.icon}),r.jsx(s.Box,{as:"span",fontSize:"xs",fontWeight:h?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:x.shortLabel})]},x.value)})}),p=r.jsxs(s.Box,{display:{base:"block",md:"none"},position:"relative",ref:c,children:[r.jsx(s.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:e.chakraToken,cursor:t?"pointer":"default",opacity:t?1:.6,_hover:t?{bg:"bg"}:void 0,onClick:()=>{t&&a(x=>!x)},"aria-label":"Theme mode switcher","aria-expanded":l,"aria-haspopup":"menu",children:u.icon}),l&&t&&r.jsx(s.Box,{role:"menu",position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"150px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:At.map(x=>{const h=f===x.value;return r.jsxs(s.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:h?e.hoverBgLight:"transparent",color:h?e.chakraToken:"text.body",cursor:"pointer",textAlign:"left",onClick:()=>{i(x.value),a(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:h?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[r.jsx(s.Box,{flexShrink:0,children:x.icon}),r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:h?"600":"500",fontFamily:"var(--font-body)",children:x.label})]},x.value)})})]});return r.jsxs(r.Fragment,{children:[d,p]})}function En({item:e,renderLink:t,onClick:n,scheme:o,isCollapsed:i=!1,isSubItem:l=!1,menuHaptic:a="selection",menuHapticsDisabled:c=!1}){var A;const{trigger:f}=de(),u=I.default.useCallback(()=>{c||a===!1||f(a??"selection")},[c,a,f]),[d,p]=U.useState(!1),[x,h]=U.useState(!1),[b,v]=U.useState(!1),F=U.useRef(null),y=e.isActive??!1,j=((A=e.subItems)==null?void 0:A.some(M=>M.isActive))??!1,[C,S]=U.useState(y||j),B=!!(e.subItems&&e.subItems.length>0),w=U.useId();U.useEffect(()=>{S(y||j)},[y,j]),U.useEffect(()=>{if(!b)return;const M=T=>{F.current&&!F.current.contains(T.target)&&v(!1)},z=T=>{T.key==="Escape"&&v(!1)};return document.addEventListener("mousedown",M),document.addEventListener("keydown",z),()=>{document.removeEventListener("mousedown",M),document.removeEventListener("keydown",z)}},[b]);const D=y;if(i){if(B){const z=r.jsxs(s.Box,{as:"button","aria-label":e.label,"aria-haspopup":"menu","aria-expanded":b,onClick:()=>{u(),v(T=>!T)},onFocus:T=>h(T.currentTarget.matches(":focus-visible")),onBlur:()=>h(!1),onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",cursor:"pointer",position:"relative",style:{background:y||j?o.activeBgLight:d||b?o.hoverBgLight:"transparent",outline:x?`2px solid ${o.solid}`:void 0,outlineOffset:x?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:y||j?o.activeBgDark:d||b?o.hoverBgDark:"transparent"},children:[e.icon&&r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:y||j?o.solid:void 0,opacity:y||j?1:d||b?.85:.6},color:y||j?o.chakraToken:"text.body",children:e.icon}),j&&r.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:o.solid},"aria-hidden":"true"})]});return r.jsxs(s.Box,{position:"relative",ref:F,my:"0.5",display:"flex",justifyContent:"center",style:{zIndex:b?100:1},children:[b?z:r.jsx(Oe,{label:e.label,placement:"right",toggleOnTouch:!1,children:z}),b&&r.jsx(ye.motion.div,{initial:{opacity:0,x:-6,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-4,scale:.98},transition:{duration:.16,ease:[0,0,.2,1]},style:{position:"absolute",left:"calc(100% + 8px)",top:0,zIndex:1500},children:r.jsxs(s.Box,{role:"menu","aria-label":e.label,bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",boxShadow:"none",py:"1.5",minW:"200px",maxW:"260px",children:[r.jsxs(s.Box,{px:"3.5",py:"1.5",fontSize:"xs",fontWeight:"700",color:"text.muted",fontFamily:"var(--font-heading)",borderBottom:"1px solid",borderColor:"border",mb:"1",display:"flex",alignItems:"center",gap:"2",children:[e.icon&&r.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",color:o.chakraToken,children:e.icon}),r.jsx(s.Box,{as:"span",children:e.label}),e.isNew&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",px:"1.5",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.04em",lineHeight:"1",textTransform:"uppercase",fontFamily:"var(--font-heading)",flexShrink:0,style:{background:o.solid,color:"#fff"},children:"NEW"})]}),r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"0.5",px:"1",children:e.subItems.map(T=>r.jsx(En,{item:T,renderLink:t,onClick:()=>{v(!1),n==null||n()},menuHaptic:a,menuHapticsDisabled:c,scheme:o,isCollapsed:!1,isSubItem:!0},T.href))})]})})]})}const M=r.jsx(s.Box,{display:"flex",justifyContent:"center",alignItems:"center",w:"full",children:r.jsx(Oe,{label:e.isNew?`${e.label} (NEW)`:e.label,placement:"right",toggleOnTouch:!1,children:r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",my:"0.5",borderRadius:"lg",position:"relative","aria-label":e.label,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),onClick:()=>{u(),n==null||n()},style:{background:y?o.activeBgLight:d?o.hoverBgLight:"transparent",outline:x?`2px solid ${o.solid}`:void 0,outlineOffset:x?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:y?o.activeBgDark:d?o.hoverBgDark:"transparent"},children:[e.icon&&r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:D?o.solid:void 0,opacity:D?1:d?.85:.6},color:D?o.chakraToken:"text.body",children:e.icon}),typeof e.badge=="number"&&r.jsx(s.Box,{as:"span",position:"absolute",top:"-2px",right:"-2px",minW:"16px",h:"16px",px:"1",borderRadius:"full",fontSize:"9px",fontWeight:"700",lineHeight:"1",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{background:o.solid,color:"#fff"},children:e.badge>99?"99+":e.badge}),e.hasDot&&r.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:Re},"aria-label":"New notification"}),e.isNew&&typeof e.badge!="number"&&!e.hasDot&&r.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:o.solid},"aria-label":"New feature"})]})})});return t(e,M)}const E=r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:l?"2.5":"3",px:l?"2":"3",py:l?"2":"2.5",borderRadius:"lg",borderLeftRadius:B?"lg":"none",borderTopLeftRadius:B?"lg":"none",borderBottomLeftRadius:B?"lg":"none",position:"relative",onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),onClick:B?void 0:()=>{u(),n==null||n()},style:{background:y?o.activeBgLight:d?o.hoverBgLight:"transparent",boxShadow:y&&!B?`inset 3px 0 0 ${o.solid}`:void 0,outline:x?`2px solid ${o.solid}`:void 0,outlineOffset:x?"2px":void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:y?o.activeBgDark:d?o.hoverBgDark:"transparent"},children:[e.icon&&r.jsx(s.Box,{flexShrink:0,style:{color:D?o.solid:void 0,opacity:D?1:d?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:D?o.chakraToken:"text.body",children:e.icon}),r.jsx(s.Box,{as:"span",flex:"1",minW:"0",fontSize:"sm",fontWeight:D?"600":"500",fontFamily:"var(--font-body)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",style:{color:D?o.solid:void 0,transition:"color 0.15s ease"},color:D?o.chakraToken:"text.body",children:e.label}),typeof e.badge=="number"&&!B&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"20px",h:"20px",px:"1",borderRadius:"full",fontSize:"xs",fontWeight:"700",lineHeight:"1",style:{background:o.solid,color:"#fff"},children:e.badge}),e.hasDot&&!B&&r.jsx(s.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Re},"aria-label":"New notification"}),e.isNew&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",px:"1.5",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.04em",lineHeight:"1",textTransform:"uppercase",fontFamily:"var(--font-heading)",flexShrink:0,style:{background:o.solid,color:"#fff"},children:"NEW"}),B&&r.jsx(s.Box,{flexShrink:0,color:"text.muted",children:r.jsx(oi,{open:C})})]});return r.jsxs(r.Fragment,{children:[B?r.jsx("button",{type:"button","aria-expanded":C,"aria-controls":w,onClick:()=>{u(),S(M=>!M)},onFocus:M=>{h(M.currentTarget.matches(":focus-visible"))},onBlur:()=>h(!1),style:{display:"block",width:"100%",background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:E}):t(e,E),B&&r.jsx(ye.motion.div,{id:w,initial:!1,animate:C?{height:"auto",opacity:1}:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},style:{overflow:"hidden"},"aria-hidden":!C,children:r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"3",mt:"0.5",mb:"1",children:e.subItems.map(M=>r.jsx(En,{item:M,renderLink:t,onClick:n,scheme:o,isCollapsed:!1,isSubItem:!0,menuHaptic:a,menuHapticsDisabled:c},M.href))})})]})}let Ir=!1;function ks(){if(typeof document>"u"||Ir)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
360
+ `),disabled:n,title:"Markdown Blockquote",accentColor:t,children:"> Quote"})]})}),l&&r.jsx(qa,{currentMode:i,onSelectMode:a,accentColor:t,disabled:n})]})}const $a={bold:!0,italic:!0,underline:!0,strikethrough:!0,headings:!0,bulletList:!0,orderedList:!0,quote:!0,link:!0,textAlign:!0,clearFormat:!0};function Xn({id:e,name:t,value:n,defaultValue:o,onChange:i,onMarkdownChange:l,onHtmlChange:a,outputFormat:c="html",defaultMode:d="wysiwyg",mode:u,onModeChange:f,showModeToggle:h=!0,placeholder:x="Start typing...",label:p,helperText:b,errorMessage:v,isInvalid:B=!1,disabled:y=!1,colorScheme:S="blue",minHeight:j="180px",maxHeight:C="400px",maxLength:F,"aria-label":w,"aria-labelledby":D,"aria-describedby":E,"aria-invalid":z,"aria-required":N,showCharCount:R=!1,toolbarOptions:T,className:q,storageKey:M,persistDraft:k=!0,debounceMs:P=400,draftMaxAgeMs:$=10080*60*1e3,showDraftStatus:Q=!1,onDraftRestored:J}){const[g,H]=I.default.useState(!1),[A,m]=I.default.useState(d),O=u!==void 0?u:A,G=n!==void 0,K=Ea[S],Y={...$a,...T},Z=I.default.useMemo(()=>Ko(M,e,t,p),[M,e,t,p]),[ae,X]=I.default.useState("idle"),ne=I.default.useRef(null),le=I.default.useRef(null),ge=I.default.useRef(!1),we=I.default.useCallback((te,se,L)=>{if(!k||y)return;if(!te||te==="<p></p>"||te.trim()===""){le.current&&(clearTimeout(le.current),le.current=null),ne.current=null,Zo(Z),X("idle");return}ne.current={content:te,mode:se,format:L},X("saving"),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>{ne.current&&(Sn(Z,{content:ne.current.content,mode:ne.current.mode,format:ne.current.format,updatedAt:Date.now(),version:1}),ne.current=null,X("saved"))},P)},[k,y,Z,P]);I.default.useEffect(()=>{if(!k)return;const te=()=>{le.current&&(clearTimeout(le.current),le.current=null),ne.current&&(Sn(Z,{content:ne.current.content,mode:ne.current.mode,format:ne.current.format,updatedAt:Date.now(),version:1}),ne.current=null,X("saved"))};return typeof window<"u"&&(window.addEventListener("beforeunload",te),window.addEventListener("pagehide",te)),()=>{typeof window<"u"&&(window.removeEventListener("beforeunload",te),window.removeEventListener("pagehide",te)),te()}},[k,Z]);const[xe,je]=I.default.useState(()=>{const te=G?n:o??"";return c==="markdown"?te:it(te)}),dt=I.default.useRef(null);I.default.useEffect(()=>{La()},[]);const pe=xr.useEditor({immediatelyRender:!1,extensions:[hl.default.configure({heading:{levels:[1,2,3]}}),gl.default,xl.default.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),ml.default.configure({types:["heading","paragraph"]}),bl.default.configure({placeholder:x})],content:G?c==="markdown"?He(n??""):n??"":o?c==="markdown"?He(o):o:"",editable:!y,editorProps:{attributes:{spellcheck:"true"}},onUpdate({editor:te}){const se=te.getHTML(),L=se==="<p></p>"?"":se,W=it(L);a==null||a(L),l==null||l(W);const ee=c==="markdown"?W:L;F!==void 0&&te.getText().length>F||(i==null||i(ee),we(ee,"wysiwyg",c))},onFocus(){H(!0)},onBlur(){H(!1)}});I.default.useEffect(()=>{if(!pe||ge.current||!k||y)return;ge.current=!0;const te=Xo(Z,$);if(!te||!te.content||te.content==="<p></p>"||te.content.trim()===""||G&&n&&n.trim()!==""&&n!=="<p></p>"&&n===te.content)return;const se=te.format==="markdown",L=te.content;if(se){const W=He(L);je(L),pe.commands.setContent(W,{emitUpdate:!1}),l==null||l(L),a==null||a(W),i==null||i(c==="markdown"?L:W)}else{const W=L==="<p></p>"?"":L,ee=it(W);je(ee),pe.commands.setContent(W,{emitUpdate:!1}),a==null||a(W),l==null||l(ee),i==null||i(c==="markdown"?ee:W)}te.mode&&te.mode!==O&&h&&(u===void 0&&m(te.mode),f==null||f(te.mode)),X("saved"),J==null||J(te)},[pe,k,y,Z,$,G,n,c,O,h,u,i,a,l,f,J]);const Et=te=>{if(te!==O){if(te==="markdown"){const se=pe?pe.getHTML():"",L=it(se==="<p></p>"?"":se);je(L),k&&we(c==="markdown"?L:se,"markdown",c)}else{const se=He(xe);pe&&pe.commands.setContent(se,{emitUpdate:!1}),k&&we(c==="markdown"?xe:se,"wysiwyg",c)}u===void 0&&m(te),f==null||f(te)}},Lt=te=>{const se=te.target.value;je(se);const L=He(se);l==null||l(se),a==null||a(L);const W=c==="markdown"?se:L;F!==void 0&&se.length>F||(i==null||i(W),pe&&pe.commands.setContent(L,{emitUpdate:!1}),we(W,"markdown",c))},nn=te=>{const se=dt.current;if(!se){je(Pe=>{const Le=Pe+te;return we(c==="markdown"?Le:He(Le),"markdown",c),Le});return}const L=se.selectionStart,W=se.selectionEnd,ee=se.value,ie=ee.substring(0,L)+te+ee.substring(W);je(ie);const ce=He(ie);l==null||l(ie),a==null||a(ce);const Ce=c==="markdown"?ie:ce;i==null||i(Ce),pe&&pe.commands.setContent(ce,{emitUpdate:!1}),we(Ce,"markdown",c),setTimeout(()=>{se.focus(),se.setSelectionRange(L+te.length,L+te.length)},50)};I.default.useEffect(()=>{if(G)if(c==="markdown"){const te=n??"";if(je(te),pe){const se=He(te);pe.getHTML()!==se&&pe.commands.setContent(se,{emitUpdate:!1})}}else{const te=n===""?"<p></p>":n??"<p></p>";pe&&pe.getHTML()!==te&&pe.commands.setContent(te,{emitUpdate:!1}),je(it(n??""))}},[pe,G,n,c]);const It=O==="markdown"?xe.length:(pe==null?void 0:pe.getText().length)??0,rn=B?"#DC2626":g?K.base:"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",className:q,children:[p&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",color:"text.heading",children:p}),r.jsxs(s.Box,{borderRadius:"md",overflow:"hidden",bg:"bg",opacity:y?.6:1,style:{border:`1.5px solid ${rn}`,transition:"border-color 0.15s ease",boxShadow:"none",background:"var(--medix-form-bg)"},children:[r.jsx(Va,{editor:pe,accentColor:K.base,disabled:y,opts:Y,mode:O,showModeToggle:h,onModeChange:Et,onInsertMarkdown:nn}),O==="wysiwyg"?r.jsx(s.Box,{className:"medix-rte-content",style:{minHeight:j,maxHeight:C,overflowY:"auto"},_dark:{color:"var(--medix-form-text)"},children:r.jsx(xr.EditorContent,{editor:pe})}):r.jsx("textarea",{ref:dt,value:xe,onChange:Lt,placeholder:x,disabled:y,"aria-label":w,"aria-labelledby":D,"aria-describedby":E,"aria-invalid":B||z||void 0,"aria-required":N,onFocus:()=>H(!0),onBlur:()=>H(!1),style:{width:"100%",minHeight:j,maxHeight:C,padding:"12px 16px",fontFamily:"var(--font-mono, monospace)",fontSize:"13px",lineHeight:"1.6",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",border:"none",outline:"none",resize:"vertical"}}),(R||F||Q&&ae!=="idle")&&r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:Q&&ae!=="idle"?"space-between":F?"flex-end":"flex-start",px:"3",py:"1.5",borderTop:"1px solid",borderColor:"border",style:{borderTopColor:"var(--medix-form-border)",background:"var(--medix-form-bg)"},children:[Q&&ae!=="idle"?r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",children:[r.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:ae==="saving"?"orange.400":"green.500"}),r.jsx(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:ae==="saving"?"Saving draft...":"Draft saved"})]}):r.jsx(s.Box,{}),(R||F)&&r.jsxs(s.Text,{fontSize:"xs",color:F&&It>F?"red.500":"text.muted",fontFamily:"var(--font-body)",children:[It,F?` / ${F}`:""," characters"]})]})]}),b&&!B&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:b}),B&&v&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:v})]})}const Ua=Xn;Xn.displayName="MedixRichTextInput";const Jo=I.default.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...o},i)=>r.jsx(s.Box,{ref:i,bg:"bg.surface",borderRadius:"card",border:"1px solid",borderColor:"border",boxShadow:"none",_dark:{boxShadow:"none"},overflow:"hidden",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",...t&&{_hover:{transform:"translateY(-2px)",boxShadow:"none",borderColor:"blue.200"},cursor:"pointer"},...o,children:I.default.Children.map(n,l=>l||null)}));Jo.displayName="MedixCard";function Ga({title:e,subtitle:t,action:n,children:o,...i}){return r.jsxs(s.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[r.jsxs(s.Box,{flex:"1",children:[e&&r.jsx(s.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&r.jsx(s.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o]}),n&&r.jsx(s.Box,{flexShrink:0,children:n})]})}function Ya({children:e,...t}){return r.jsx(s.Box,{px:"6",py:"5",...t,children:e})}function Ka({children:e,...t}){return r.jsx(s.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Qo=I.default.forwardRef(({value:e,label:t,unit:n,change:o,trend:i,icon:l,accentColor:a="blue.500",...c},d)=>{const u=i??(o!==void 0?o>=0?"up":"down":"neutral"),f=u==="up"?"green.500":u==="down"?"red.500":"text.muted";return r.jsxs(s.Box,{ref:d,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"none",_dark:{boxShadow:"none"},...c,children:[l&&r.jsx(s.Box,{w:"10",h:"10",borderRadius:"md",bg:`${a.split(".")[0]}.100`,color:a,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:l}),r.jsxs(s.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&r.jsx(s.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),r.jsx(s.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o!==void 0&&r.jsxs(s.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:f,children:[r.jsx(s.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),r.jsxs(s.Box,{as:"span",children:[Math.abs(o),"%"]})]})]})});Qo.displayName="MedixStatCard";const Za={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},ei=I.default.forwardRef(({maxWidth:e="xl",children:t,...n},o)=>r.jsx(s.Box,{ref:o,w:"100%",maxW:Za[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));ei.displayName="MedixContainer";function Xa({eyebrow:e,title:t,description:n,align:o="center",action:i,eyebrowColor:l="blue.500",...a}){const c=o,d=o==="center"?"center":o==="right"?"flex-end":"flex-start";return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:d,textAlign:c,gap:"3",...a,children:[e&&r.jsx(s.Box,{as:"span",fontSize:"md",fontWeight:"bold",color:l,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),r.jsx(s.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:o==="center"?"720px":void 0,children:t}),n&&r.jsx(s.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:o==="center"?"640px":void 0,children:n}),i&&r.jsx(s.Box,{mt:"2",children:i})]})}const Ja=["light","dark"],Qa={light:{label:"Light mode",canvas:_.neutralLight.bg.value,surface:_.neutralLight.surface.value,border:_.neutralLight.border.value,text:_.neutralLight.heading.value,muted:_.neutralLight.body.value},dark:{label:"Dark mode",canvas:_.neutralDark.bg.value,surface:_.neutralDark.surface.value,border:_.neutralDark.border.value,text:_.neutralDark.heading.value,muted:_.neutralDark.body.value}};function $e(e,t){return Object.entries(t).map(([n,o])=>({token:`${e}.${n}`,value:o.value}))}const es=[{title:"Foundation semantics",description:"Core app backgrounds, text, borders, and brand tokens that shift with light and dark mode.",tokens:[{token:"bg",description:"Page background",preview:"fill",light:_.neutralLight.bg.value,dark:_.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:_.neutralLight.bg2.value,dark:_.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:_.neutralLight.surface.value,dark:_.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:_.neutralLight.heading.value,dark:_.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:_.neutralLight.body.value,dark:_.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:_.neutralLight.muted.value,dark:_.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:_.neutralLight.border.value,dark:_.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:_.blue[500].value,dark:_.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:_.blue[100].value,dark:_.blue[900].value},{token:"brand.contrast",description:"High-contrast brand foreground",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"}]},{title:"Status semantics",description:"System feedback colors used for success, warning, and error states.",tokens:[{token:"status.success",description:"Success foreground",preview:"fill",light:_.green[500].value,dark:_.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:_.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:_.amber[500].value,dark:_.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:_.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:_.red[500].value,dark:_.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:_.red[100].value,dark:"rgba(220, 38, 38, 0.2)"}]},{title:"Blue semantic palette",description:"Semantic blue scale and utility tokens used by Chakra-aware theme props.",tokens:[{token:"blue.50",description:"Blue scale 50",preview:"fill",light:_.blue[50].value,dark:_.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:_.blue[100].value,dark:_.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:_.blue[200].value,dark:_.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:_.blue[300].value,dark:_.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:_.blue[400].value,dark:_.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:_.blue[500].value,dark:_.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:_.blue[600].value,dark:_.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:_.blue[700].value,dark:_.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:_.blue[800].value,dark:_.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:_.blue[900].value,dark:_.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:_.blue[500].value,dark:_.blue[500].value},{token:"blue.contrast",description:"High-contrast content on blue",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"},{token:"blue.muted",description:"Muted blue background",preview:"fill",light:_.blue[100].value,dark:_.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:_.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:_.blue[100].value,dark:_.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:_.blue[700].value,dark:_.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:_.blue[500].value,dark:_.blue[500].value}]},{title:"Purple semantic palette",description:"Semantic purple scale and utility tokens used by Chakra-aware theme props.",tokens:[{token:"purple.50",description:"Purple scale 50",preview:"fill",light:_.purple[50].value,dark:_.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:_.purple[100].value,dark:_.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:_.purple[500].value,dark:_.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:_.purple[600].value,dark:_.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:_.purple[500].value,dark:_.purple[500].value},{token:"purple.contrast",description:"High-contrast content on purple",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"},{token:"purple.muted",description:"Muted purple background",preview:"fill",light:_.purple[100].value,dark:_.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:_.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:_.purple[100].value,dark:_.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:_.purple[700].value,dark:_.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:_.purple[500].value,dark:_.purple[500].value}]}],ts=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:$e("brand.blue",_.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:$e("brand.purple",_.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:$e("brand.green",_.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:$e("brand.amber",_.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:$e("brand.red",_.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:$e("brand.neutralLight",_.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:$e("brand.neutralDark",_.neutralDark)}];function ns({mode:e,token:t}){const n=Qa[e],o=e==="light"?t.light:t.dark,i={minH:"88px",borderRadius:"md",border:"1px solid",borderColor:n.border,bg:n.canvas,display:"flex",alignItems:"center",justifyContent:"center",px:"4"};return r.jsxs(s.Box,{border:"1px solid",borderColor:n.border,borderRadius:"lg",bg:n.surface,p:"3",children:[r.jsx(s.Text,{fontSize:"xs",fontWeight:"600",color:n.text,fontFamily:"var(--font-heading)",mb:"2",children:n.label}),t.preview==="text"?r.jsx(s.Box,{...i,children:r.jsx(s.Text,{color:o,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?r.jsx(s.Box,{...i,children:r.jsx(s.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:o,bg:n.canvas})}):r.jsx(s.Box,{...i,bg:o,borderColor:o===n.canvas||o==="#FFFFFF"?n.border:"transparent"}),r.jsx(s.Text,{mt:"2",fontSize:"xs",color:n.muted,fontFamily:"var(--font-mono)",children:o})]})}const ti=I.default.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...n},o)=>r.jsxs(s.Box,{ref:o,display:"flex",flexDirection:"column",gap:"8",...n,children:[r.jsx(s.Box,{children:r.jsx(s.Text,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",maxW:"4xl",children:"Browse the full MedixDeck color system in one place. Semantic tokens are rendered side by side for light and dark mode, while raw palettes expose every underlying brand and status scale used by the theme."})}),e&&r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"6",children:es.map(i=>r.jsxs(s.Box,{children:[r.jsx(s.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),r.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),r.jsx(s.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:i.tokens.map(l=>r.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[r.jsx(s.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:l.token}),r.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:l.description}),r.jsx(s.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:Ja.map(a=>r.jsx(ns,{mode:a,token:l},`${l.token}-${a}`))})]},l.token))})]},i.title))}),t&&r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"6",children:ts.map(i=>r.jsxs(s.Box,{children:[r.jsx(s.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),r.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),r.jsx(s.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:i.tokens.map(l=>r.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[r.jsx(s.Box,{h:"72px",bg:l.value,borderBottom:"1px solid",borderColor:l.value==="#FFFFFF"||l.value===_.neutralLight.bg.value?"border":"transparent"}),r.jsxs(s.Box,{p:"4",children:[r.jsx(s.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:l.token}),r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:l.value})]})]},l.token))})]},i.title))})]}));ti.displayName="MedixThemeColorPalette";function Oe({label:e,children:t,placement:n="top",toggleOnTouch:o=!0,...i}){const[l,a]=I.default.useState(!1),c=I.default.useRef(null),u=I.default.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(pointer: coarse)").matches,[])&&o;I.default.useEffect(()=>{if(!u||!l)return;const h=x=>{c.current&&!c.current.contains(x.target)&&a(!1)};return document.addEventListener("mousedown",h),document.addEventListener("touchstart",h,{passive:!0}),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("touchstart",h)}},[u,l]),I.default.useEffect(()=>{!u&&l&&a(!1)},[u,l]);const f=h=>{u&&(h.preventDefault(),h.stopPropagation(),a(x=>!x))};return r.jsxs(s.Tooltip.Root,{positioning:{placement:n},open:u?l:void 0,onOpenChange:u?h=>a(h.open):void 0,...i,children:[r.jsx(s.Tooltip.Trigger,{asChild:!0,children:r.jsx("span",{ref:c,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},onClick:f,children:t})}),r.jsx(s.Tooltip.Positioner,{children:r.jsx(s.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"gray.700",boxShadow:"none",children:e})})]})}const rs={blue:{solid:"#0685FF",hoverBgLight:"rgba(6,133,255,0.08)",hoverBgDark:"rgba(6,133,255,0.12)",activeBgLight:"rgba(6,133,255,0.10)",activeBgDark:"rgba(6,133,255,0.15)",activeBgDarkStrong:"rgba(6,133,255,0.18)",chakraToken:"blue.500"},purple:{solid:"#7700CC",hoverBgLight:"rgba(119,0,204,0.08)",hoverBgDark:"rgba(119,0,204,0.12)",activeBgLight:"rgba(119,0,204,0.10)",activeBgDark:"rgba(119,0,204,0.15)",activeBgDarkStrong:"rgba(119,0,204,0.18)",chakraToken:"purple.500"}},Re="#EF4444",Bn="rgba(239,68,68,0.08)",ni=()=>r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),r.jsx("path",{d:"M9 3v18"}),r.jsx("path",{d:"m14 9-3 3 3 3"})]}),ri=()=>r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),r.jsx("path",{d:"M9 3v18"}),r.jsx("path",{d:"m12 15 3-3-3-3"})]}),os=()=>r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),r.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),r.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),is=()=>r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),oi=({open:e})=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:e?"rotate(180deg)":"rotate(0deg)"},children:r.jsx("polyline",{points:"6 9 12 15 18 9"})}),Fn=()=>r.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),r.jsx("polyline",{points:"16 17 21 12 16 7"}),r.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),ls=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),r.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),as=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"3"}),r.jsx("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]}),ss=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"4"}),r.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),r.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),r.jsx("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),r.jsx("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),r.jsx("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),r.jsx("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),r.jsx("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),r.jsx("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),cs=()=>r.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),us=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),r.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),r.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]}),ds=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M10 2v7.31a2 2 0 0 1-.37 1.17L4.22 18A3 3 0 0 0 6.78 22h10.44a3 3 0 0 0 2.56-4l-5.41-7.52A2 2 0 0 1 14 9.31V2"}),r.jsx("line",{x1:"8.5",y1:"2",x2:"15.5",y2:"2"}),r.jsx("path",{d:"M8.5 14h7"})]}),fs=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),r.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),r.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),ps=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),r.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),r.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),hs=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),xs=(e,t)=>r.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function gs(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const Lr={warning:{bg:"#FFFBEB",border:"#FDE68A",text:"#92400E",darkBg:"rgba(245,158,11,0.12)",darkBorder:"rgba(245,158,11,0.25)",darkText:"#FDE68A",badgeBg:"#F59E0B",badgeColor:"#FFFFFF"},info:{bg:"#EFF6FF",border:"#BFDBFE",text:"#1E40AF",darkBg:"rgba(6,133,255,0.12)",darkBorder:"rgba(6,133,255,0.25)",darkText:"#93C5FD",badgeBg:"#0685FF",badgeColor:"#FFFFFF"},error:{bg:"#FEF2F2",border:"#FECACA",text:"#991B1B",darkBg:"rgba(239,68,68,0.12)",darkBorder:"rgba(239,68,68,0.25)",darkText:"#FCA5A5",badgeBg:"#EF4444",badgeColor:"#FFFFFF"},neutral:{bg:"bg.surface",border:"var(--chakra-colors-border)",text:"text.body",darkBg:"bg.surface",darkBorder:"var(--chakra-colors-border)",darkText:"text.heading",badgeBg:"#6B7280",badgeColor:"#FFFFFF"}};function ms(e){if(e&&e!=="auto")return{isNonProduction:e!=="production"&&e!=="live",detectedEnv:e};try{if(typeof process<"u"&&process&&process.env){const t=process.env.NODE_ENV,n=process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,o=process.env.MEDIX_ENV||process.env.NEXT_PUBLIC_MEDIX_ENV||process.env.PUBLIC_MEDIX_ENV,i=process.env.CONTEXT;if(o){const l=String(o).toLowerCase();if(l==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"};if(l==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(l==="test")return{isNonProduction:!0,detectedEnv:"test"};if(l==="dev"||l==="development")return{isNonProduction:!0,detectedEnv:"development"};if(l==="production"||l==="live")return{isNonProduction:!1,detectedEnv:"production"}}if(n==="preview")return{isNonProduction:!0,detectedEnv:"preview"};if(n==="development")return{isNonProduction:!0,detectedEnv:"development"};if(i==="deploy-preview"||i==="branch-deploy")return{isNonProduction:!0,detectedEnv:"preview"};if(t==="development")return{isNonProduction:!0,detectedEnv:"development"};if(t==="test")return{isNonProduction:!0,detectedEnv:"test"}}}catch{}try{const t={url:typeof document>"u"?require("url").pathToFileURL(__filename).href:et&&et.tagName.toUpperCase()==="SCRIPT"&&et.src||new URL("index.cjs",document.baseURI).href};if(typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:et&&et.tagName.toUpperCase()==="SCRIPT"&&et.src||new URL("index.cjs",document.baseURI).href}<"u"&&t.env){const n=t.env.MODE,o=t.env.VITE_MEDIX_ENV||t.env.PUBLIC_MEDIX_ENV;if(o){const i=String(o).toLowerCase();if(i==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"};if(i==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(i==="test")return{isNonProduction:!0,detectedEnv:"test"};if(i==="dev"||i==="development")return{isNonProduction:!0,detectedEnv:"development"};if(i==="production"||i==="live")return{isNonProduction:!1,detectedEnv:"production"}}if(n==="development")return{isNonProduction:!0,detectedEnv:"development"};if(n==="test")return{isNonProduction:!0,detectedEnv:"test"};if(n==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(n==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"}}}catch{}if(typeof window<"u"&&window.location&&window.location.hostname){const t=window.location.hostname.toLowerCase();if(t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="0.0.0.0"||t.endsWith(".local")||t.endsWith(".test")||t.endsWith(".internal")||t.includes(".ngrok")||t.includes(".loca.lt"))return{isNonProduction:!0,detectedEnv:"development"};if(t.endsWith(".vercel.app")||t.endsWith(".netlify.app")||t.endsWith(".pages.dev")||t.endsWith(".amplifyapp.com")||t.endsWith(".onrender.com")||t.endsWith(".fly.dev")||t.endsWith(".azurestaticapps.net"))return{isNonProduction:!0,detectedEnv:"preview"};if(t.startsWith("sandbox.")||t.includes("-sandbox."))return{isNonProduction:!0,detectedEnv:"sandbox"};if(t.startsWith("staging.")||t.startsWith("stage.")||t.includes("-staging."))return{isNonProduction:!0,detectedEnv:"staging"};if(t.startsWith("test.")||t.startsWith("test-")||t.startsWith("qa.")||t.includes("-test."))return{isNonProduction:!0,detectedEnv:"test"};if(t.startsWith("dev.")||t.includes("-dev."))return{isNonProduction:!0,detectedEnv:"development"}}return{isNonProduction:!1,detectedEnv:"production"}}function bs(e){switch(e){case"sandbox":return"SANDBOX ENVIRONMENT";case"staging":return"STAGING ENVIRONMENT";case"test":return"TEST ENVIRONMENT";case"preview":return"PREVIEW DEPLOYMENT";case"development":return"DEVELOPMENT MODE";default:return"NON-PRODUCTION ENVIRONMENT"}}function ys({detectedEnv:e,config:t,onDismiss:n}){const o=t.status??(e==="staging"||e==="preview"?"info":e==="test"?"error":"warning"),i=Lr[o]??Lr.warning,l=t.badgeLabel??bs(e),a=t.message??"You are in a non-production test/sandbox environment. Simulated patient records, transactions, and actions will not affect live data.",c=o==="info"?r.jsx(fs,{}):o==="error"?r.jsx(ps,{}):r.jsx(ds,{});return r.jsxs(s.Box,{as:"aside",role:"status","aria-live":"polite","aria-label":`${l}: ${a}`,position:"sticky",top:"0",zIndex:"banner",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"3",px:{base:"3",md:"5"},py:"2",minH:"36px",borderBottom:"1px solid",borderColor:i.border,bg:i.bg,color:i.text,_dark:{bg:i.darkBg,borderColor:i.darkBorder,color:i.darkText},transition:"background 0.2s ease, border-color 0.2s ease",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",minW:"0",flex:"1",children:[r.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:i.badgeBg,children:c}),r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"2",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",fontFamily:"var(--font-body)",lineHeight:"1",flexShrink:0,style:{background:i.badgeBg,color:i.badgeColor},children:l}),r.jsx(s.Box,{as:"span",fontSize:"xs",fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",color:"inherit",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},display:{base:"none",sm:"inline-block"},children:a})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",flexShrink:0,children:[t.action,t.dismissible&&r.jsx(s.chakra.button,{type:"button",onClick:n,"aria-label":"Dismiss environment banner",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"6",h:"6",borderRadius:"md",border:"none",bg:"transparent",color:"inherit",cursor:"pointer",opacity:.8,_hover:{opacity:1,bg:"blackAlpha.100"},_dark:{_hover:{bg:"whiteAlpha.100"}},_focusVisible:{outline:"2px solid",outlineColor:i.badgeBg,outlineOffset:"1px"},transition:"background 0.15s ease, opacity 0.15s ease",children:r.jsx(hs,{})})]})]})}const At=[{value:"light",label:"Light mode",shortLabel:"Light",icon:r.jsx(ss,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:r.jsx(cs,{})},{value:"system",label:"System theme",shortLabel:"System",icon:r.jsx(us,{})}];function vs({scheme:e}){const{mounted:t,themeMode:n,themeSetting:o,setThemeMode:i}=St(),[l,a]=U.useState(!1),c=U.useRef(null),d=t?o:void 0,u=At.find(x=>x.value===d)||At[0];U.useEffect(()=>{const x=p=>{c.current&&!c.current.contains(p.target)&&a(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);const f=r.jsx(s.Box,{display:{base:"none",md:"flex"},alignItems:"center",gap:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"full",p:"1","aria-label":"Theme mode switcher",children:At.map(x=>{const p=d===x.value,b=x.value==="dark"?e.activeBgDarkStrong:x.value==="system"?e.hoverBgDark:e.hoverBgLight;return r.jsxs(s.Box,{as:"button",onClick:()=>{t&&i(x.value)},"aria-pressed":p,"aria-label":x.label,title:t&&x.value==="system"?`System theme (currently ${n})`:x.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:p?b:"transparent",color:p?e.chakraToken:"text.muted",opacity:t?1:.6,cursor:t?"pointer":"default",transition:"background 0.18s ease, color 0.18s ease, opacity 0.18s ease",_hover:t?{bg:p?b:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[r.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:x.icon}),r.jsx(s.Box,{as:"span",fontSize:"xs",fontWeight:p?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:x.shortLabel})]},x.value)})}),h=r.jsxs(s.Box,{display:{base:"block",md:"none"},position:"relative",ref:c,children:[r.jsx(s.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:e.chakraToken,cursor:t?"pointer":"default",opacity:t?1:.6,_hover:t?{bg:"bg"}:void 0,onClick:()=>{t&&a(x=>!x)},"aria-label":"Theme mode switcher","aria-expanded":l,"aria-haspopup":"menu",children:u.icon}),l&&t&&r.jsx(s.Box,{role:"menu",position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"150px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:At.map(x=>{const p=d===x.value;return r.jsxs(s.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:p?e.hoverBgLight:"transparent",color:p?e.chakraToken:"text.body",cursor:"pointer",textAlign:"left",onClick:()=>{i(x.value),a(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:p?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[r.jsx(s.Box,{flexShrink:0,children:x.icon}),r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:p?"600":"500",fontFamily:"var(--font-body)",children:x.label})]},x.value)})})]});return r.jsxs(r.Fragment,{children:[f,h]})}function En({item:e,renderLink:t,onClick:n,scheme:o,isCollapsed:i=!1,isSubItem:l=!1,menuHaptic:a="selection",menuHapticsDisabled:c=!1}){var z;const{trigger:d}=de(),u=I.default.useCallback(()=>{c||a===!1||d(a??"selection")},[c,a,d]),[f,h]=U.useState(!1),[x,p]=U.useState(!1),[b,v]=U.useState(!1),B=U.useRef(null),y=e.isActive??!1,S=((z=e.subItems)==null?void 0:z.some(N=>N.isActive))??!1,[j,C]=U.useState(y||S),F=!!(e.subItems&&e.subItems.length>0),w=U.useId();U.useEffect(()=>{C(y||S)},[y,S]),U.useEffect(()=>{if(!b)return;const N=T=>{B.current&&!B.current.contains(T.target)&&v(!1)},R=T=>{T.key==="Escape"&&v(!1)};return document.addEventListener("mousedown",N),document.addEventListener("keydown",R),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",R)}},[b]);const D=y;if(i){if(F){const R=r.jsxs(s.Box,{as:"button","aria-label":e.label,"aria-haspopup":"menu","aria-expanded":b,onClick:()=>{u(),v(T=>!T)},onFocus:T=>p(T.currentTarget.matches(":focus-visible")),onBlur:()=>p(!1),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",cursor:"pointer",position:"relative",style:{background:y||S?o.activeBgLight:f||b?o.hoverBgLight:"transparent",outline:x?`2px solid ${o.solid}`:void 0,outlineOffset:x?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:y||S?o.activeBgDark:f||b?o.hoverBgDark:"transparent"},children:[e.icon&&r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:y||S?o.solid:void 0,opacity:y||S?1:f||b?.85:.6},color:y||S?o.chakraToken:"text.body",children:e.icon}),S&&r.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:o.solid},"aria-hidden":"true"})]});return r.jsxs(s.Box,{position:"relative",ref:B,my:"0.5",display:"flex",justifyContent:"center",style:{zIndex:b?100:1},children:[b?R:r.jsx(Oe,{label:e.label,placement:"right",toggleOnTouch:!1,children:R}),b&&r.jsx(ye.motion.div,{initial:{opacity:0,x:-6,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-4,scale:.98},transition:{duration:.16,ease:[0,0,.2,1]},style:{position:"absolute",left:"calc(100% + 8px)",top:0,zIndex:1500},children:r.jsxs(s.Box,{role:"menu","aria-label":e.label,bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",boxShadow:"none",py:"1.5",minW:"200px",maxW:"260px",children:[r.jsxs(s.Box,{px:"3.5",py:"1.5",fontSize:"xs",fontWeight:"700",color:"text.muted",fontFamily:"var(--font-heading)",borderBottom:"1px solid",borderColor:"border",mb:"1",display:"flex",alignItems:"center",gap:"2",children:[e.icon&&r.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",color:o.chakraToken,children:e.icon}),r.jsx(s.Box,{as:"span",children:e.label}),e.isNew&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",px:"1.5",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.04em",lineHeight:"1",textTransform:"uppercase",fontFamily:"var(--font-heading)",flexShrink:0,style:{background:o.solid,color:"#fff"},children:"NEW"})]}),r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"0.5",px:"1",children:e.subItems.map(T=>r.jsx(En,{item:T,renderLink:t,onClick:()=>{v(!1),n==null||n()},menuHaptic:a,menuHapticsDisabled:c,scheme:o,isCollapsed:!1,isSubItem:!0},T.href))})]})})]})}const N=r.jsx(s.Box,{display:"flex",justifyContent:"center",alignItems:"center",w:"full",children:r.jsx(Oe,{label:e.isNew?`${e.label} (NEW)`:e.label,placement:"right",toggleOnTouch:!1,children:r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",my:"0.5",borderRadius:"lg",position:"relative","aria-label":e.label,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:()=>{u(),n==null||n()},style:{background:y?o.activeBgLight:f?o.hoverBgLight:"transparent",outline:x?`2px solid ${o.solid}`:void 0,outlineOffset:x?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:y?o.activeBgDark:f?o.hoverBgDark:"transparent"},children:[e.icon&&r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:D?o.solid:void 0,opacity:D?1:f?.85:.6},color:D?o.chakraToken:"text.body",children:e.icon}),typeof e.badge=="number"&&r.jsx(s.Box,{as:"span",position:"absolute",top:"-2px",right:"-2px",minW:"16px",h:"16px",px:"1",borderRadius:"full",fontSize:"9px",fontWeight:"700",lineHeight:"1",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{background:o.solid,color:"#fff"},children:e.badge>99?"99+":e.badge}),e.hasDot&&r.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:Re},"aria-label":"New notification"}),e.isNew&&typeof e.badge!="number"&&!e.hasDot&&r.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:o.solid},"aria-label":"New feature"})]})})});return t(e,N)}const E=r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:l?"2.5":"3",px:l?"2":"3",py:l?"2":"2.5",borderRadius:"lg",borderLeftRadius:F?"lg":"none",borderTopLeftRadius:F?"lg":"none",borderBottomLeftRadius:F?"lg":"none",position:"relative",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:F?void 0:()=>{u(),n==null||n()},style:{background:y?o.activeBgLight:f?o.hoverBgLight:"transparent",boxShadow:y&&!F?`inset 3px 0 0 ${o.solid}`:void 0,outline:x?`2px solid ${o.solid}`:void 0,outlineOffset:x?"2px":void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:y?o.activeBgDark:f?o.hoverBgDark:"transparent"},children:[e.icon&&r.jsx(s.Box,{flexShrink:0,style:{color:D?o.solid:void 0,opacity:D?1:f?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:D?o.chakraToken:"text.body",children:e.icon}),r.jsx(s.Box,{as:"span",flex:"1",minW:"0",fontSize:"sm",fontWeight:D?"600":"500",fontFamily:"var(--font-body)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",style:{color:D?o.solid:void 0,transition:"color 0.15s ease"},color:D?o.chakraToken:"text.body",children:e.label}),typeof e.badge=="number"&&!F&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"20px",h:"20px",px:"1",borderRadius:"full",fontSize:"xs",fontWeight:"700",lineHeight:"1",style:{background:o.solid,color:"#fff"},children:e.badge}),e.hasDot&&!F&&r.jsx(s.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Re},"aria-label":"New notification"}),e.isNew&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",px:"1.5",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.04em",lineHeight:"1",textTransform:"uppercase",fontFamily:"var(--font-heading)",flexShrink:0,style:{background:o.solid,color:"#fff"},children:"NEW"}),F&&r.jsx(s.Box,{flexShrink:0,color:"text.muted",children:r.jsx(oi,{open:j})})]});return r.jsxs(r.Fragment,{children:[F?r.jsx("button",{type:"button","aria-expanded":j,"aria-controls":w,onClick:()=>{u(),C(N=>!N)},onFocus:N=>{p(N.currentTarget.matches(":focus-visible"))},onBlur:()=>p(!1),style:{display:"block",width:"100%",background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:E}):t(e,E),F&&r.jsx(ye.motion.div,{id:w,initial:!1,animate:j?{height:"auto",opacity:1}:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},style:{overflow:"hidden"},"aria-hidden":!j,children:r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"3",mt:"0.5",mb:"1",children:e.subItems.map(N=>r.jsx(En,{item:N,renderLink:t,onClick:n,scheme:o,isCollapsed:!1,isSubItem:!0,menuHaptic:a,menuHapticsDisabled:c},N.href))})})]})}let Ir=!1;function ks(){if(typeof document>"u"||Ir)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
361
361
  @keyframes medixMobileNavIn {
362
362
  from { transform: translateY(100%); opacity: 0; }
363
363
  to { transform: translateY(0); opacity: 1; }
364
364
  }
365
- `,document.head.appendChild(e),Ir=!0}function ws({items:e,renderLink:t,scheme:n,menuHaptic:o="selection",menuHapticsDisabled:i=!1}){const{trigger:l}=de();I.default.useEffect(()=>{ks()},[]);const a=I.default.useCallback(()=>{i||o===!1||l(o??"selection")},[i,o,l]);return r.jsx(s.Box,{as:"nav","aria-label":"Mobile bottom navigation",display:{base:"flex",md:"none"},position:"fixed",bottom:"0",left:"0",right:"0",zIndex:"docked",bg:"bg",borderTop:"1px solid",borderColor:"border",alignItems:"center",style:{minHeight:64,paddingBottom:"env(safe-area-inset-bottom, 0px)",boxShadow:"none",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",animation:"medixMobileNavIn 0.42s cubic-bezier(0.22,1,0.36,1) both"},children:e.slice(0,5).map(c=>{const f=c.isActive??!1,u=r.jsxs(ye.motion.div,{whileTap:{scale:.82},transition:{type:"spring",stiffness:500,damping:30,mass:.7},style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,height:"100%",padding:"6px 4px 4px",cursor:"pointer",position:"relative",gap:4,textDecoration:"none",WebkitTapHighlightColor:"transparent"},children:[r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:7,left:"50%",width:44,height:28,borderRadius:14,background:n.activeBgLight,transform:`translateX(-50%) scaleX(${f?1:0})`,opacity:f?1:0,transition:"transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease",pointerEvents:"none"}}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",zIndex:1,color:f?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",opacity:f?1:.6},children:[c.icon,typeof c.badge=="number"&&c.badge>0&&r.jsx("span",{"aria-label":`${c.badge} unread`,style:{position:"absolute",top:-5,right:-6,minWidth:16,height:16,borderRadius:8,background:n.solid,color:"#fff",fontSize:9,fontWeight:700,fontFamily:"var(--font-body)",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0 3px",lineHeight:1,boxShadow:"0 0 0 2px var(--chakra-colors-bg, #fff)",pointerEvents:"none"},children:c.badge>99?"99+":c.badge}),c.isNew&&(!c.badge||c.badge<=0)&&r.jsx("span",{"aria-label":"New feature",style:{position:"absolute",top:-2,right:-2,width:6,height:6,borderRadius:3,background:n.solid,boxShadow:"0 0 0 2px var(--chakra-colors-bg, #fff)",pointerEvents:"none"}})]}),r.jsx(s.Box,{as:"span",fontSize:"2xs",fontWeight:f?"700":"500",fontFamily:"var(--font-body)",textAlign:"center",lineHeight:"1",position:"relative",zIndex:1,color:f?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",letterSpacing:f?"-0.01em":"0"},children:c.label})]}),d={label:c.label,href:c.href,isActive:c.isActive};return r.jsx(s.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},onClick:a,children:t(d,u)},c.href)})})}const Ht={bronze:{label:"Bronze Clinician",level:1,minScore:0,maxScore:999,color:"#92400E",ring:"#D97706",bg:"rgba(217,119,6,0.10)"},silver:{label:"Silver Clinician",level:2,minScore:1e3,maxScore:4999,color:"#475569",ring:"#94A3B8",bg:"rgba(148,163,184,0.10)"},gold:{label:"Gold Clinician",level:3,minScore:5e3,maxScore:14999,color:"#D97706",ring:"#F59E0B",bg:"rgba(245,158,11,0.10)"},platinum:{label:"Platinum Clinician",level:4,minScore:15e3,maxScore:39999,color:"#0284C7",ring:"#38BDF8",bg:"rgba(56,189,248,0.10)"},"elite-i":{label:"Elite I",level:5,minScore:4e4,maxScore:59999,color:"#6D28D9",ring:"#8B5CF6",bg:"rgba(139,92,246,0.12)"},"elite-ii":{label:"Elite II",level:6,minScore:6e4,maxScore:79999,color:"#7C3AED",ring:"#A78BFA",bg:"rgba(167,139,250,0.12)"},"elite-iii":{label:"Elite III",level:7,minScore:8e4,maxScore:119999,color:"#7700CC",ring:"#A855F7",bg:"rgba(119,0,204,0.12)"},"elite-iv":{label:"Elite IV",level:8,minScore:12e4,maxScore:199999,color:"#5B21B6",ring:"#7C3AED",bg:"rgba(124,58,237,0.12)"},"elite-v":{label:"Elite V",level:9,minScore:2e5,maxScore:null,color:"#4C1D95",ring:"#6D28D9",bg:"rgba(109,40,217,0.14)"}},ii=["bronze","silver","gold","platinum","elite-i","elite-ii","elite-iii","elite-iv","elite-v"];function js(e){const t=typeof e=="number"&&Number.isFinite(e)?Math.floor(e):0;if(t<0)return"bronze";for(const n of ii){const o=Ht[n];if(o.maxScore===null?t>=o.minScore:t<=o.maxScore)return n}return"elite-v"}function li(e){return Ht[e]??Ht.bronze}const Cs=({color:e})=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"8",r:"6"}),r.jsx("path",{d:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11"})]}),Ss=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("polyline",{points:"9 18 15 12 9 6"})});function Bs({data:e,renderLink:t,isCollapsed:n=!1,menuHaptic:o="selection",menuHapticsDisabled:i=!1}){const{trigger:l}=de(),a=I.default.useCallback(()=>{i||o===!1||e.link&&l(o??"selection")},[i,o,l,e.link]),c=li(e.tier),f=e.name.split(" ").map(d=>d[0]).join("").slice(0,2).toUpperCase();if(n){const d=r.jsx(s.Box,{display:"flex",justifyContent:"center",alignItems:"center",w:"full",my:"2",children:r.jsx(Oe,{label:`${e.role} — ${e.name} (${c.label}, ${e.medixScore} pts)`,placement:"right",toggleOnTouch:!1,children:r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"36px",h:"36px",mx:"auto","aria-label":`${e.role} ${e.name}`,cursor:e.link?"pointer":"default",onClick:a,children:r.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${c.ring}, ${c.color})`},children:e.avatarSrc?r.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx("div",{style:{width:36,height:36,borderRadius:"50%",background:c.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:c.color,fontFamily:"var(--font-heading)"},children:f})})})})});return e.link?r.jsx(r.Fragment,{children:t({label:e.role,href:e.link},d)}):r.jsx(r.Fragment,{children:d})}const u=r.jsxs(s.Box,{mx:"3",my:"4",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",style:{cursor:e.link?"pointer":"default"},onClick:a,_hover:e.link?{borderColor:c.ring,boxShadow:`0 0 0 1px ${c.ring}40`}:void 0,transition:"border-color 0.15s ease, box-shadow 0.15s ease",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",pt:"3",pb:"2.5",children:[r.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${c.ring}, ${c.color})`},children:e.avatarSrc?r.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:c.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:c.color,fontFamily:"var(--font-heading)"},children:f})}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",color:"text.heading",lineHeight:"1.2",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.role}),r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",lineHeight:"1.3",mt:"0.5",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name})]}),e.link&&r.jsx(s.Box,{color:"text.muted",flexShrink:0,children:r.jsx(Ss,{})})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border"}),r.jsxs(s.Box,{px:"3",pt:"2",pb:"2.5",children:[r.jsx(s.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[r.jsx(Cs,{color:c.color}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:c.color,whiteSpace:"nowrap"},children:c.label}),r.jsxs(s.Box,{fontSize:"sm",fontWeight:"500",color:"text.heading",fontFamily:"var(--font-body)",ml:"1",style:{whiteSpace:"nowrap"},children:[e.medixScore.toLocaleString()," ",Number(e.medixScore)===1?"pt":"pts"]})]})]})]});return e.link?r.jsx(r.Fragment,{children:t({label:e.role,href:e.link},u)}):r.jsx(r.Fragment,{children:u})}function Fs({logo:e,collapsedLogo:t,navGroups:n,isOpen:o,onClose:i,onLogout:l,renderLink:a,sidebarWidth:c,collapsedSidebarWidth:f,isCollapsed:u,collapsible:d,onToggleCollapse:p,collapseTogglePlacement:x,scheme:h,scoreCard:b,menuHaptic:v="selection",menuHapticsDisabled:F=!1}){const[y,j]=U.useState(!1),{trigger:C}=de(),S=I.default.useCallback(()=>{F||v===!1||C(v??"selection")},[F,v,C]);return r.jsxs(r.Fragment,{children:[o&&r.jsx(s.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:{base:1999,md:"overlay"},bg:"blackAlpha.500",onClick:i,"aria-hidden":"true"}),r.jsxs(s.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:{base:`${c}px`,md:`${u?f:c}px`},zIndex:{base:2e3,md:u?1200:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:o?"translateX(0)":`translateX(-${c+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1), width 0.22s cubic-bezier(0.2,0,0,1)",children:[r.jsxs(s.Box,{h:u?{base:"16",md:"auto"}:"16",minH:u?{base:"16",md:"84px"}:"16",px:u?{base:"5",md:"2"}:"5",py:u?{base:"0",md:"3"}:"0",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",children:[r.jsxs(s.Box,{display:{base:"none",md:u?"flex":"none"},flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2",w:"full",children:[r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:t??r.jsx(Ye,{type:"icon",variant:h.chakraToken==="blue.500"?"blue":"purple",height:26})}),d&&(x==="sidebar-header"||x==="both")&&r.jsx(Oe,{label:"Expand sidebar",placement:"right",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:()=>{S(),p==null||p()},"aria-label":"Expand sidebar",transition:"background 0.15s ease, color 0.15s ease",children:r.jsx(ri,{})})})]}),r.jsxs(s.Box,{display:{base:"flex",md:u?"none":"flex"},alignItems:"center",justifyContent:"space-between",w:"full",minW:"0",children:[r.jsx(s.Box,{flex:"1",minW:"0",overflow:"hidden",children:e}),d&&(x==="sidebar-header"||x==="both")&&r.jsx(Oe,{label:"Collapse sidebar",placement:"bottom",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:()=>{S(),p==null||p()},"aria-label":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:r.jsx(ni,{})})})]})]}),b&&r.jsx(s.Box,{display:{base:"none",md:u?"flex":"block"},justifyContent:u?"center":void 0,alignItems:u?"center":void 0,w:"full",flexShrink:0,pt:u?"1":"3",children:r.jsx(Bs,{data:b,renderLink:a,isCollapsed:u,menuHaptic:v,menuHapticsDisabled:F})}),r.jsx(s.Box,{flex:"1",overflowY:u?"visible":"auto",overflowX:u?"visible":"hidden",position:"relative",py:"3",px:u?"2":"3",children:n.map((B,w)=>r.jsxs(s.Box,{mb:u?"2":"4",children:[B.groupLabel&&(u?w>0?r.jsx(s.Box,{h:"1px",bg:"border",mx:"2",my:"2"}):null:r.jsx(s.Box,{px:"3",pb:"2",pt:w>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:B.groupLabel})),r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:u?"1.5":"0.5",children:B.items.map(D=>r.jsx(En,{item:D,renderLink:a,onClick:i,scheme:h,isCollapsed:u,menuHaptic:v,menuHapticsDisabled:F},D.href))})]},w))}),r.jsx(s.Box,{px:u?"2":"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",display:u?"flex":"block",justifyContent:u?"center":void 0,alignItems:u?"center":void 0,w:"full",children:u?r.jsx(Oe,{label:"Log out",placement:"right",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),onClick:()=>{S(),i(),l==null||l()},style:{background:y?Bn:"transparent",color:Re,transition:"background 0.15s ease"},children:r.jsx(s.Box,{flexShrink:0,style:{color:Re},children:r.jsx(Fn,{})})})}):r.jsxs(s.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),onClick:()=>{S(),i(),l==null||l()},style:{background:y?Bn:"transparent",color:Re,transition:"background 0.15s ease"},children:[r.jsx(s.Box,{flexShrink:0,style:{color:Re},children:r.jsx(Fn,{})}),r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Re},children:"Log out"})]})})]})]})}function Es({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:o,onMenuToggle:i,sidebarWidth:l,topBarSlot:a,dropdownItems:c,onLogout:f,scheme:u,collapsible:d=!0,isCollapsed:p=!1,onToggleCollapse:x,collapseTogglePlacement:h="sidebar-header",menuHaptic:b="selection",menuHapticsDisabled:v=!1}){const[F,y]=U.useState(!1),{trigger:j}=de(),C=I.default.useCallback(()=>{v||b===!1||j(b??"selection")},[v,b,j]),S=U.useRef(null),B=U.useId(),w=`user-menu-button-${B}`,D=`user-menu-dropdown-${B}`;return U.useEffect(()=>{const E=A=>{S.current&&!S.current.contains(A.target)&&y(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]),r.jsxs(s.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",minH:"16",maxH:"16",flexShrink:0,display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[r.jsx(s.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"1",cursor:"pointer",color:"text.body",borderRadius:"md",_hover:{bg:"bg.subtle"},onClick:()=>{C(),i()},"aria-label":o?"Close navigation menu":"Open navigation menu","aria-expanded":o,children:o?r.jsx(is,{}):r.jsx(os,{})}),d&&(h==="topbar"||h==="both")&&r.jsx(Oe,{label:p?"Expand sidebar":"Collapse sidebar",placement:"bottom",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:()=>{C(),x==null||x()},"aria-label":p?"Expand sidebar":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:p?r.jsx(ri,{}):r.jsx(ni,{})})}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",r.jsx(s.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&r.jsx(s.Box,{as:"p",fontSize:{base:"2xs",md:"xs"},fontWeight:"400",fontFamily:"var(--font-body)",color:"text.heading",mt:"0.5",lineHeight:"1.4",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n})]}),a,r.jsx(vs,{scheme:u}),r.jsxs(s.Box,{position:"relative",ref:S,children:[r.jsxs(s.Box,{as:"button",id:w,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>y(E=>!E),"aria-haspopup":"menu","aria-expanded":F,"aria-controls":F?D:void 0,"aria-label":"User menu",children:[r.jsx(Jt,{name:e.name,src:e.avatarSrc,size:"sm"}),r.jsx(s.Box,{color:"text.muted",children:r.jsx(oi,{open:F})})]}),F&&r.jsxs(s.Box,{role:"menu","aria-labelledby":w,id:D,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:[r.jsxs(s.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!c&&r.jsxs(r.Fragment,{children:[r.jsx(zt,{icon:r.jsx(ls,{}),label:"My Profile",onClick:()=>y(!1),scheme:u}),r.jsx(zt,{icon:r.jsx(as,{}),label:"Settings",onClick:()=>y(!1),scheme:u})]}),c==null?void 0:c.map((E,A)=>r.jsx(zt,{icon:E.icon,label:E.label,isDanger:E.isDanger,onClick:()=>{var M;y(!1),(M=E.onClick)==null||M.call(E)},scheme:u},A)),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsx(zt,{icon:r.jsx(Fn,{}),label:"Log out",isDanger:!0,onClick:()=>{y(!1),f==null||f()},scheme:u})]})]})]})}function zt({icon:e,label:t,isDanger:n,onClick:o,scheme:i}){const[l,a]=U.useState(!1);return r.jsxs(s.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:"transparent",cursor:"pointer",textAlign:"left",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:o,style:{background:l?n?Bn:i.hoverBgLight:"transparent",color:n?Re:void 0,transition:"background 0.12s ease"},children:[e&&r.jsx(s.Box,{flexShrink:0,style:{color:n?Re:void 0},color:"text.muted",children:e}),r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Re:void 0},color:n?void 0:"text.body",children:t})]})}function ai({children:e,logo:t,navGroups:n,user:o,greeting:i,greetingSubtext:l,onLogout:a,renderLink:c=xs,dropdownItems:f,topBarSlot:u,sidebarWidth:d=220,collapsedSidebarWidth:p=68,collapsible:x=!0,defaultCollapsed:h=!1,isCollapsed:b,onCollapseChange:v,collapsedLogo:F,collapseTogglePlacement:y="sidebar-header",colorScheme:j="blue",mobileNavItems:C,scoreCard:S,environment:B="auto",showEnvironmentBanner:w,environmentBanner:D,environmentBannerSlot:E,haptic:A,disableHaptic:M=!1,...z}){const[T,W]=U.useState(!1),[R,k]=U.useState(h),[P,V]=U.useState(!1),[Q,X]=U.useState(!1);U.useEffect(()=>{X(!0)},[]);const g=x&&(b!==void 0?b:R),O=()=>{if(!x)return;const ge=!g;b===void 0&&k(ge),v==null||v(ge)},H=rs[j],m=!!(C&&C.length>0),N=A??"selection",G=!!M,Z=i??gs(),Y=t??r.jsx(Ye,{variant:j,height:26}),K=F??r.jsx(Ye,{type:"icon",variant:j,height:26}),le=D||{},J=le.environment||B,{isNonProduction:re,detectedEnv:ae}=ms(J),xe=!P&&(w!==void 0?w:Q?re:J!=="production"&&J!=="live");return r.jsxs(s.Box,{display:"flex",minH:"100vh",bg:"bg",...z,children:[r.jsx(Fs,{logo:Y,collapsedLogo:K,navGroups:n,isOpen:T,onClose:()=>W(!1),onLogout:a,renderLink:c,sidebarWidth:d,collapsedSidebarWidth:p,isCollapsed:g,collapsible:x,onToggleCollapse:O,collapseTogglePlacement:y,scheme:H,scoreCard:S,menuHaptic:N,menuHapticsDisabled:G}),r.jsxs(s.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${g?p:d}px`},transition:"margin-left 0.22s cubic-bezier(0.2,0,0,1)",children:[xe&&(E??r.jsx(ys,{detectedEnv:ae,config:le,onDismiss:()=>{var ge;V(!0),(ge=le.onDismiss)==null||ge.call(le)}})),r.jsx(Es,{user:o,greeting:Z,greetingSubtext:l,isSidebarOpen:T,onMenuToggle:()=>W(ge=>!ge),sidebarWidth:d,topBarSlot:u,dropdownItems:f,onLogout:a,scheme:H,collapsible:x,isCollapsed:g,onToggleCollapse:O,collapseTogglePlacement:y,menuHaptic:N,menuHapticsDisabled:G}),r.jsx(s.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:m?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),m&&r.jsx(ws,{items:C,renderLink:c,scheme:H,menuHaptic:N,menuHapticsDisabled:G})]})}ai.displayName="MedixDashboardLayout";const Wt=[0,0,.2,1],Jn=[.4,0,1,1],Qn=[.22,1,.36,1],Ls={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Qn}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Jn}}},Is={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Tr={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Wt}}},Ts={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Wt,delay:.18}}},Ds={hidden:{opacity:0,y:-6,scale:.98,transformOrigin:"top"},visible:{opacity:1,y:0,scale:1,transformOrigin:"top",transition:{duration:.18,ease:Qn}},exit:{opacity:0,y:-4,scale:.98,transformOrigin:"top",transition:{duration:.12,ease:Jn}}},As={hidden:{opacity:0,height:0,overflow:"hidden"},visible:{opacity:1,height:"auto",overflow:"hidden",transition:{duration:.22,ease:Qn}},exit:{opacity:0,height:0,overflow:"hidden",transition:{duration:.16,ease:Jn}}},zs={blue:{solid:"#0685FF",hover:"#0685FF",hoverBg:"blue.50",hoverBgDark:"rgba(6,133,255,0.12)",badgeBg:"#EFF6FF",badgeColor:"#0685FF",badgeBgDark:"rgba(6,133,255,0.20)",badgeColorDark:"#60A5FA"},purple:{solid:"#7700CC",hover:"#7700CC",hoverBg:"purple.50",hoverBgDark:"rgba(119,0,204,0.12)",badgeBg:"#FAF5FF",badgeColor:"#7700CC",badgeBgDark:"rgba(119,0,204,0.20)",badgeColorDark:"#C084FC"}},Rs=()=>r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),r.jsx("polyline",{points:"7 7 17 7 17 17"})]});function si({isOpen:e}){return r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s cubic-bezier(0.22, 1, 0.36, 1)",transform:e?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})}function qt(){return r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.65,flexShrink:0},children:[r.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),r.jsx("polyline",{points:"15 3 21 3 21 9"}),r.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function Ms({color:e}){return r.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),r.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Os({color:e}){return r.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),r.jsx("path",{d:"M13.8801 16.71L8.93005 21.66L10.3401 23.07L13.1701 20.24L16.0001 17.41L18.1201 19.54L21.6601 23.07L23.0701 21.66L18.1201 16.71L17.4101 16L23.0701 10.34L21.6601 8.92999L16.0001 14.59L10.3401 8.92999L8.93005 10.34L14.5901 16L13.8801 16.71Z",fill:"white"})]})}const Ns=(e,t)=>{const n=e.href??"#",o=e.target??(e.isExternal?"_blank":void 0),i=e.rel??(e.isExternal?"noopener noreferrer":void 0);return n==="#"&&!e.onClick?r.jsx("span",{style:{textDecoration:"none",display:"contents"},children:t}):r.jsx("a",{href:n,target:o,rel:i,onClick:e.onClick,style:{textDecoration:"none",display:"contents"},children:t})};function at({badge:e,scheme:t}){return e?I.default.isValidElement(e)?e:r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"1.5",py:"0.5",fontSize:"10px",fontWeight:"semibold",lineHeight:"1",borderRadius:"badge",bg:t.badgeBg,color:t.badgeColor,_dark:{bg:t.badgeBgDark,color:t.badgeColorDark},border:"1px solid",borderColor:t.badgeColor,style:{borderColor:"currentColor",opacity:.9},children:e}):null}function Ps({item:e,scheme:t,renderLink:n}){var d;const[o,i]=U.useState(!1),l=U.useRef(null),a=U.useRef(null),c=!!(e.children&&e.children.length>0);U.useEffect(()=>{if(!o)return;function p(h){l.current&&!l.current.contains(h.target)&&i(!1)}function x(h){h.key==="Escape"&&i(!1)}return document.addEventListener("mousedown",p),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",x)}},[o]);const f=()=>{a.current&&(clearTimeout(a.current),a.current=null),c&&i(!0)},u=()=>{c&&(a.current=setTimeout(()=>{i(!1)},150))};return c?r.jsxs(s.Box,{as:"li",ref:l,listStyleType:"none",position:"relative",onMouseEnter:f,onMouseLeave:u,children:[r.jsxs(s.Box,{as:"button","aria-haspopup":"menu","aria-expanded":o,onClick:()=>i(!o),display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||o?t.hover:"text.body",bg:o?t.hoverBg:"transparent",_dark:{color:e.isActive||o?t.hover:"text.body",bg:o?t.hoverBgDark:"transparent",_hover:{color:t.hover,bg:t.hoverBgDark}},borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),r.jsx("span",{children:e.label}),r.jsx(at,{badge:e.badge,scheme:t}),r.jsx(si,{isOpen:o})]}),r.jsx(ye.AnimatePresence,{children:o&&r.jsx(ye.motion.div,{variants:Ds,initial:"hidden",animate:"visible",exit:"exit",style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:1e3},children:r.jsx(s.Box,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",p:"2",minW:"260px",maxW:"380px",display:"flex",flexDirection:"column",gap:"1",role:"menu","aria-label":e.label,children:(d=e.children)==null?void 0:d.map((p,x)=>r.jsx(s.Box,{as:"div",role:"none",children:n(p,r.jsxs(s.Box,{as:"span",role:"menuitem",display:"flex",alignItems:"flex-start",gap:"3",p:"2.5",borderRadius:"md",cursor:"pointer",transition:"all 0.15s ease",color:"text.heading",_hover:{bg:t.hoverBg,color:t.hover},_dark:{color:"text.heading",_hover:{bg:t.hoverBgDark,color:t.hover}},onClick:()=>i(!1),children:[p.icon&&r.jsx(s.Box,{as:"span",w:"8",h:"8",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:p.icon}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",justifyContent:"space-between",children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",children:[r.jsx("span",{children:p.label}),p.isExternal&&r.jsx(qt,{})]}),r.jsx(at,{badge:p.badge,scheme:t})]}),p.description&&r.jsx(s.Box,{as:"span",display:"block",fontSize:"xs",color:"text.body",_dark:{color:"text.body"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.4",children:p.description})]})]}))},p.href||`${p.label}-${x}`))})})})]}):r.jsx(s.Box,{as:"li",listStyleType:"none",children:n(e,r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{bg:t.hoverBgDark,color:t.hover}},borderRadius:"md",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},cursor:"pointer",children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),r.jsx("span",{children:e.label}),r.jsx(at,{badge:e.badge,scheme:t}),e.isExternal&&r.jsx(qt,{})]}))})}function _s({item:e,scheme:t,renderLink:n,onCloseMenu:o}){var c;const[i,l]=U.useState(!1);return!(e.children&&e.children.length>0)?r.jsx(ye.motion.li,{variants:Tr,children:n(e,r.jsxs(s.Box,{as:"span",display:"flex",alignItems:"center",justifyContent:"space-between",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:o,children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),r.jsx("span",{children:e.label})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[r.jsx(at,{badge:e.badge,scheme:t}),e.isExternal&&r.jsx(qt,{})]})]}))}):r.jsxs(ye.motion.li,{variants:Tr,style:{listStyle:"none"},children:[r.jsxs(s.Box,{as:"button",onClick:()=>l(!i),"aria-expanded":i,display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||i?t.hover:"text.body",bg:i?"bg.subtle":"transparent",_dark:{color:e.isActive||i?t.hover:"text.body",bg:i?"bg.subtle":"transparent",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",border:"none",cursor:"pointer",textAlign:"left",transition:"background 0.15s ease, color 0.15s ease",_hover:{color:t.hover,bg:"bg.subtle"},children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),r.jsx("span",{children:e.label})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[r.jsx(at,{badge:e.badge,scheme:t}),r.jsx(si,{isOpen:i})]})]}),r.jsx(ye.AnimatePresence,{children:i&&r.jsx(ye.motion.div,{variants:As,initial:"hidden",animate:"visible",exit:"exit",children:r.jsx(s.Box,{pl:"4",pr:"2",py:"1.5",display:"flex",flexDirection:"column",gap:"1",borderLeft:"2px solid",borderColor:"border",ml:"4",my:"1",children:(c=e.children)==null?void 0:c.map((f,u)=>r.jsx(s.Box,{as:"div",children:n(f,r.jsxs(s.Box,{as:"span",display:"flex",alignItems:"flex-start",gap:"2.5",px:"2.5",py:"2",borderRadius:"md",color:"text.body",_dark:{color:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:o,children:[f.icon&&r.jsx(s.Box,{as:"span",w:"6",h:"6",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:f.icon}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1",children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-heading)",children:[r.jsx("span",{children:f.label}),f.isExternal&&r.jsx(qt,{})]}),r.jsx(at,{badge:f.badge,scheme:t})]}),f.description&&r.jsx(s.Box,{as:"span",display:"block",fontSize:"xs",color:"text.muted",_dark:{color:"text.muted"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.3",children:f.description})]})]}))},f.href||`${f.label}-${u}`))})})})]})}function Hs({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:o="Get Started",ctaHref:i,onCtaClick:l,ctaIconHref:a,onCtaIconClick:c,secondaryCtaLabel:f,secondaryCtaHref:u,onSecondaryCtaClick:d,ctaSlot:p,renderLink:x=Ns,isSticky:h=!1,colorScheme:b="blue",variant:v="solid",...F}){const[y,j]=U.useState(!1),C=zs[b],S=a??i,B=c??l,w=v==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},D=({mobile:E=!1})=>r.jsxs(s.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:E?"column":"row",children:[f&&r.jsx(Se,{as:u?"a":"button",href:u,variant:E?"outline":"ghost",colorScheme:b,size:E?"md":"sm",onClick:()=>{d==null||d(),E&&j(!1)},style:E?{width:"100%"}:void 0,children:f}),r.jsx(Se,{as:i?"a":"button",href:i,variant:"solid",colorScheme:b,size:E?"md":"sm",onClick:()=>{l==null||l(),E&&j(!1)},style:E?{width:"100%"}:void 0,children:o}),!E&&r.jsx(Se,{as:S?"a":"button",href:S,target:S&&S!==i?"_blank":void 0,rel:S&&S!==i?"noopener noreferrer":void 0,variant:"solid",colorScheme:b,size:"sm",onClick:B,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:r.jsx(Rs,{})})]});return r.jsxs(s.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:h?"sticky":"relative",top:h?"0":void 0,zIndex:h?"sticky":40,bg:v==="transparent"?"transparent":v==="blur"?void 0:"bg",style:w,borderBottom:"1px solid",borderColor:v==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...F,children:[r.jsxs(s.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[r.jsx(s.Box,{flexShrink:0,children:e??r.jsx(Ye,{variant:b==="blue"?"blue":"purple",height:28})}),r.jsx(s.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map((E,A)=>r.jsx(Ps,{item:E,scheme:C,renderLink:x},E.href||`${E.label}-${A}`))}),r.jsx(s.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:p??r.jsx(D,{})}),r.jsx(s.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>j(!y),"aria-label":y?"Close menu":"Open menu","aria-expanded":y,position:"relative",width:"32px",height:"32px",flexShrink:0,children:r.jsx(ye.AnimatePresence,{mode:"wait",initial:!1,children:y?r.jsx(ye.motion.span,{initial:{opacity:0,rotate:-45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:45,scale:.7},transition:{duration:.18,ease:Wt},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(Os,{color:C.solid})},"close"):r.jsx(ye.motion.span,{initial:{opacity:0,rotate:45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:-45,scale:.7},transition:{duration:.18,ease:Wt},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(Ms,{color:C.solid})},"hamburger")})})]}),r.jsx(ye.AnimatePresence,{children:y&&r.jsx(ye.motion.div,{variants:Ls,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:r.jsxs(s.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[r.jsx(ye.motion.ul,{variants:Is,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map((E,A)=>r.jsx(_s,{item:E,scheme:C,renderLink:x,onCloseMenu:()=>j(!1)},E.href||`${E.label}-${A}`))}),r.jsx(ye.motion.div,{variants:Ts,initial:"hidden",animate:"visible",children:r.jsx(s.Box,{mt:"4",children:p??r.jsx(D,{mobile:!0})})})]})},"mobile-menu")})]})}const cn={},Ws={blue:{solid:"#0685FF",solidHover:"#0066CC",token:"blue.500",focusRing:"var(--chakra-colors-blue-500)"},purple:{solid:"#7700CC",solidHover:"#5C00A3",token:"purple.500",focusRing:"var(--chakra-colors-purple-500)"}},qs=e=>({facebook:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_192)",children:r.jsx("path",{d:"M11.0972 21V13.4923H9.112V10.7892H11.0972V8.4804C11.0972 6.66611 12.2698 5 14.9719 5C16.0659 5 16.8749 5.10488 16.8749 5.10488L16.8111 7.62914C16.8111 7.62914 15.9861 7.6211 15.0858 7.6211C14.1114 7.6211 13.9553 8.07014 13.9553 8.81544V10.7892H16.8886L16.761 13.4923H13.9553V21H11.0972Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_192",children:r.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_186)",children:r.jsx("path",{d:"M14.8963 11.3512L20.3606 5H19.0656L14.3213 10.515L10.5319 5H6.16125L11.8913 13.3394L6.16125 20H7.45625L12.4663 14.1763L16.4681 20H20.8388L14.8963 11.3512ZM13.1231 13.4131L12.5425 12.5825L7.9225 5.975H9.91125L13.6394 11.3075L14.22 12.1381L19.0663 19.0694H17.0775L13.1231 13.4131Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_186",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_198)",children:r.jsx("path",{d:"M18.4298 5.31982H7.57025C6.97368 5.32059 6.40177 5.55791 5.97993 5.97975C5.55809 6.40158 5.32077 6.9735 5.32001 7.57006V18.4296C5.32077 19.0262 5.55809 19.5981 5.97993 20.0199C6.40177 20.4417 6.97368 20.6791 7.57025 20.6798H18.4298C19.0263 20.6791 19.5982 20.4417 20.0201 20.0199C20.4419 19.5981 20.6792 19.0262 20.68 18.4296V7.57006C20.6792 6.9735 20.4419 6.40158 20.0201 5.97975C19.5982 5.55791 19.0263 5.32059 18.4298 5.31982ZM10.7498 17.5003H8.94977V11.1998H10.7498V17.5003ZM10.7498 10.3003H8.94977V8.5003H10.7498V10.3003ZM17.0502 17.5003H15.2502V13.9003C15.2372 13.6704 15.1367 13.4542 14.9694 13.2961C14.802 13.1379 14.5805 13.0498 14.3502 13.0498C14.12 13.0498 13.8985 13.1379 13.7311 13.2961C13.5637 13.4542 13.4633 13.6704 13.4502 13.9003V17.5003H11.6502V11.1998H13.4502V11.5387C13.9216 11.3928 14.2278 11.1998 14.8 11.1998C16.0211 11.2008 17.0502 12.2961 17.0502 13.5902V17.5003Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_198",children:r.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_183)",children:r.jsx("path",{d:"M10.3938 5.05251C9.5958 5.09014 9.05086 5.21751 8.57443 5.40464C8.08143 5.59682 7.66349 5.85464 7.24768 6.27195C6.83193 6.68926 6.5758 7.10745 6.38505 7.60132C6.20043 8.0787 6.0753 8.62414 6.04005 9.42257C6.0048 10.221 5.99699 10.4777 6.00093 12.5144C6.0048 14.5511 6.0138 14.8064 6.05249 15.6065C6.09061 16.4043 6.21749 16.9491 6.40468 17.4257C6.59718 17.9188 6.85468 18.3365 7.27218 18.7524C7.68961 19.1684 8.10749 19.4239 8.60249 19.6149C9.07949 19.7993 9.62505 19.925 10.4234 19.9599C11.2217 19.9949 11.4786 20.0031 13.5147 19.9991C15.5509 19.9953 15.8072 19.9862 16.6071 19.9483C17.4071 19.9103 17.949 19.7825 18.4257 19.5962C18.9188 19.4033 19.3369 19.1462 19.7525 18.7286C20.1681 18.311 20.4241 17.8925 20.6147 17.3984C20.7995 16.9214 20.925 16.3759 20.9597 15.5781C20.9947 14.7776 21.0029 14.522 20.9991 12.4856C20.9951 10.4492 20.9859 10.1939 20.948 9.39407C20.9101 8.59426 20.783 8.05114 20.5959 7.57426C20.4032 7.0812 20.1459 6.66376 19.7287 6.24751C19.3114 5.83126 18.8925 5.57551 18.3986 5.38532C17.9212 5.20064 17.3761 5.07482 16.5777 5.04032C15.7794 5.00582 15.5225 4.99689 13.4856 5.00089C11.4487 5.00476 11.1937 5.01351 10.3938 5.05251ZM10.4814 18.6107C9.75018 18.5789 9.35311 18.4574 9.08849 18.3557C8.73811 18.2207 8.48849 18.0575 8.2248 17.7963C7.96105 17.5352 7.79911 17.2847 7.6623 16.9351C7.55955 16.6704 7.4358 16.2738 7.40161 15.5426C7.36443 14.7523 7.35661 14.5149 7.35224 12.5126C7.34786 10.5103 7.35555 10.2732 7.39018 9.48257C7.42143 8.75195 7.54368 8.35445 7.64518 8.08995C7.78018 7.73914 7.9428 7.48995 8.20455 7.22645C8.4663 6.96289 8.71605 6.80057 9.06599 6.66376C9.33036 6.56057 9.72693 6.43789 10.4579 6.40307C11.2488 6.36557 11.4858 6.35807 13.4879 6.3537C15.4899 6.34932 15.7275 6.35682 16.5188 6.3917C17.2494 6.42345 17.6471 6.54451 17.9113 6.6467C18.2618 6.7817 18.5113 6.94382 18.7748 7.20607C19.0384 7.4682 19.2008 7.71707 19.3376 8.06776C19.4409 8.33132 19.5637 8.72776 19.5982 9.4592C19.6358 10.2501 19.6444 10.4873 19.6479 12.4892C19.6516 14.4911 19.6445 14.7288 19.6098 15.5192C19.5779 16.2504 19.4567 16.6476 19.3548 16.9126C19.2198 17.2628 19.0571 17.5126 18.7952 17.7759C18.5333 18.0394 18.2839 18.2016 17.9337 18.3384C17.6697 18.4415 17.2727 18.5645 16.5424 18.5993C15.7514 18.6365 15.5144 18.6443 13.5116 18.6487C11.5087 18.6531 11.2724 18.6449 10.4814 18.6107ZM16.5956 8.49151C16.5959 8.66953 16.649 8.84346 16.7481 8.99131C16.8473 9.13916 16.9881 9.25428 17.1527 9.32211C17.3173 9.38994 17.4983 9.40744 17.6728 9.37239C17.8473 9.33735 18.0076 9.25132 18.1332 9.12521C18.2588 8.9991 18.3443 8.83855 18.3787 8.66389C18.413 8.48922 18.3949 8.30828 18.3264 8.14395C18.258 7.97962 18.1423 7.83927 17.9941 7.74067C17.8459 7.64207 17.6718 7.58964 17.4937 7.59001C17.2551 7.59051 17.0264 7.68575 16.858 7.85481C16.6896 8.02386 16.5952 8.25288 16.5956 8.49151ZM9.64905 12.5075C9.65324 14.6345 11.3807 16.3548 13.5072 16.3508C15.6338 16.3468 17.3553 14.6195 17.3513 12.4925C17.3472 10.3655 15.6194 8.6447 13.4926 8.64889C11.3657 8.65307 9.64505 10.3808 9.64905 12.5075ZM11 12.5048C10.999 12.0104 11.1447 11.5267 11.4186 11.1151C11.6925 10.7034 12.0823 10.3822 12.5387 10.1921C12.9951 10.002 13.4977 9.95146 13.9828 10.047C14.468 10.1425 14.9139 10.3797 15.2642 10.7286C15.6146 11.0775 15.8535 11.5225 15.951 12.0073C16.0484 12.492 15.9999 12.9948 15.8116 13.452C15.6233 13.9092 15.3036 14.3003 14.8931 14.5758C14.4825 14.8513 13.9994 14.9989 13.505 14.9999C13.1767 15.0006 12.8514 14.9366 12.5478 14.8116C12.2443 14.6865 11.9683 14.5029 11.7357 14.2712C11.503 14.0395 11.3183 13.7643 11.1921 13.4612C11.0659 13.1581 11.0006 12.8331 11 12.5048Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_183",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_195)",children:r.jsx("path",{d:"M20.6653 9.12395C20.5749 8.78346 20.3967 8.47271 20.1484 8.22279C19.9001 7.97287 19.5905 7.79258 19.2507 7.69995C18.0033 7.36328 13 7.36328 13 7.36328C13 7.36328 7.99667 7.36328 6.74867 7.69995C6.40894 7.79274 6.09953 7.9731 5.85139 8.223C5.60324 8.4729 5.42506 8.78357 5.33467 9.12395C5 10.3799 5 12.9999 5 12.9999C5 12.9999 5 15.6199 5.33467 16.8759C5.42506 17.2164 5.60332 17.5272 5.85159 17.7771C6.09987 18.027 6.40945 18.2073 6.74933 18.2999C7.99667 18.6366 13 18.6366 13 18.6366C13 18.6366 18.0033 18.6366 19.2513 18.2999C19.5912 18.2074 19.9009 18.0271 20.1491 17.7772C20.3974 17.5273 20.5757 17.2165 20.666 16.8759C21 15.6199 21 12.9999 21 12.9999C21 12.9999 21 10.3799 20.6653 9.12395ZM11.3633 15.3786V10.6213L15.5453 12.9999L11.3633 15.3786Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_195",children:r.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_189)",children:r.jsx("path",{d:"M13.6162 20H13.6119C11.3737 19.985 9.65312 19.2469 8.49687 17.8069C7.46875 16.525 6.9375 14.7413 6.92 12.5063V12.4956C6.93875 10.2587 7.46937 8.47688 8.49812 7.19438C9.65312 5.75312 11.375 5.015 13.6125 5H13.6212C15.3375 5.0125 16.7731 5.45312 17.8875 6.31125C18.9356 7.1175 19.6737 8.2675 20.0806 9.72813L18.8056 10.0837C18.1156 7.60875 16.3694 6.34375 13.6156 6.32437C11.7969 6.33812 10.4219 6.90937 9.52812 8.0225C8.69187 9.065 8.26 10.5712 8.24312 12.5C8.26 14.4288 8.69187 15.935 9.52875 16.9775C10.4225 18.0919 11.7981 18.6638 13.6162 18.6756C15.2556 18.6631 16.34 18.2812 17.2412 17.3975C18.2706 16.3894 18.2525 15.1519 17.9225 14.3988C17.7287 13.955 17.3769 13.5863 16.9012 13.305C16.7812 14.15 16.5125 14.8337 16.0987 15.35C15.545 16.0387 14.7612 16.415 13.7675 16.4688C13.0162 16.5094 12.2919 16.3325 11.7306 15.9681C11.0662 15.5375 10.6775 14.8806 10.6356 14.1156C10.595 13.3719 10.8906 12.6875 11.4669 12.1894C12.0169 11.7144 12.7912 11.435 13.7062 11.3825C14.3368 11.3431 14.9697 11.3729 15.5937 11.4713C15.515 11.0075 15.3594 10.6388 15.125 10.3731C14.8044 10.0069 14.3075 9.82125 13.6506 9.81687H13.6325C13.105 9.81687 12.3875 9.96188 11.9319 10.6419L10.8337 9.90438C11.4462 8.99563 12.4387 8.49437 13.6325 8.49437H13.66C15.6562 8.50688 16.8456 9.72875 16.9644 11.8619C17.0319 11.8906 17.0994 11.9206 17.165 11.9506C18.0962 12.3881 18.7775 13.0513 19.1362 13.8694C19.6344 15.0069 19.6806 16.8631 18.1687 18.3431C17.0125 19.4744 15.61 19.9856 13.6206 19.9994L13.6162 20ZM14.2431 12.6938C14.0919 12.6938 13.9387 12.6981 13.7812 12.7069C12.6337 12.7713 11.9187 13.2981 11.9587 14.0463C12.0006 14.8313 12.8662 15.1956 13.6987 15.1506C14.4637 15.11 15.46 14.8112 15.6275 12.8319C15.1722 12.7369 14.7082 12.6906 14.2431 12.6938Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_189",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),whatsapp:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:r.jsx("path",{d:"M13.601 2.326A10.454 10.454 0 0 0 3.17 12.784c0 1.896.496 3.743 1.442 5.378L3 24l5.968-1.564a10.428 10.428 0 0 0 4.633 1.082c5.76 0 10.44-4.683 10.44-10.446a10.45 10.45 0 0 0-10.44-10.746zm0 17.584c-1.579 0-3.125-.425-4.48-1.228l-.322-.191-3.332.874.887-3.25-.21-.334A8.75 8.75 0 0 1 4.843 12.78c0-4.832 3.93-8.766 8.761-8.766 2.342 0 4.542.912 6.196 2.569 1.654 1.657 2.566 3.86 2.566 6.205 0 4.836-3.931 8.769-8.765 8.769zm4.811-6.577c-.264-.132-1.564-.772-1.807-.86-.242-.088-.419-.132-.596.132-.176.264-.683.86-.838 1.036-.154.176-.309.198-.573.066-1.545-.774-2.73-1.874-3.593-3.32-.11-.186.11-.176.368-.693.088-.176.044-.33-.022-.462-.066-.132-.596-1.436-.816-1.966-.214-.515-.433-.445-.596-.453-.154-.008-.33-.01-.507-.01-.176 0-.463.066-.705.33-.242.264-.925.904-.925 2.204 0 1.3.947 2.556 1.08 2.732.132.176 1.862 2.844 4.512 3.987 1.84.795 2.52.848 3.424.717.925-.134 2.835-1.157 3.232-2.274.396-1.117.396-2.072.275-2.274-.12-.202-.44-.323-.705-.455z",fill:"white"})})]}),tiktok:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:r.jsx("path",{d:"M19.589 6.686a4.793 4.793 0 0 1-3.77-4.245V2h-3.445v13.672a2.896 2.896 0 0 1-2.891 2.89 2.895 2.895 0 0 1-2.892-2.89 2.895 2.895 0 0 1 2.892-2.89 2.87 2.87 0 0 1 1.002.18V9.45a6.335 6.335 0 0 0-1.002-.08 6.336 6.336 0 0 0-6.336 6.336 6.336 6.336 0 0 0 6.336 6.336 6.336 6.336 0 0 0 6.336-6.336V8.514a8.216 8.216 0 0 0 4.768 1.512V6.581a4.819 4.819 0 0 1-.998.105z",fill:"white"})})]})}),Vs="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",$s=[{title:"COMPANY",links:[{label:"About",href:"/about"},{label:"Team",href:"/team"},{label:"Careers",href:"/careers"},{label:"Contact",href:"/contact"}]},{title:"PRODUCT",links:[{label:"For Doctors",href:"/doctors"},{label:"For Businesses",href:"/business"},{label:"For Patients",href:"/patients"},{label:"Homecare",href:"/homecare"}]},{title:"RESOURCES",links:[{label:"Blog",href:"/blog"}]}],Us=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"whatsapp",href:(cn==null?void 0:cn.VITE_WHATSAPP_COMMUNITY_LINK)??"https://medixdeck.com/whatsapp"},{platform:"threads",href:"https://threads.net/@medixdeck"},{platform:"facebook",href:"https://facebook.com/medixdeck"},{platform:"youtube",href:"https://youtube.com/@medixdeck"},{platform:"tiktok",href:"https://tiktok.com/@medixdeck"},{platform:"linkedin",href:"https://linkedin.com/company/medixdeck"}],Gs=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],Ys=(e,t)=>r.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function ci({description:e=Vs,logo:t,sections:n=$s,socialLinks:o=Us,copyright:i,bottomLinks:l=Gs,newsletter:a,renderLink:c=Ys,colorScheme:f="blue",certifications:u,...d}){const p=new Date().getFullYear(),x=i??`© ${p} MedixDeck Health Solutions Ltd. All Rights Reserved.`,[h,b]=U.useState(""),[v,F]=U.useState(!1),[y,j]=U.useState(!1),C=Ws[f],{mounted:S,themeMode:B,toggleThemeMode:w}=St(),D=E=>{E.preventDefault(),a!=null&&a.onSubmit&&h&&(a.onSubmit(h),b(""))};return r.jsx(s.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...d,children:r.jsxs(s.Container,{maxWidth:"7xl",children:[r.jsxs(s.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[r.jsxs(s.Box,{children:[r.jsx(s.Box,{mb:4,children:r.jsx(s.Link,{href:"/",children:t??r.jsx(Ye,{variant:f==="blue"?"blue":"purple",height:28})})}),r.jsx(s.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),r.jsx(s.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const E=qs(C.solid);return o.map(A=>r.jsx(s.Link,{href:A.href,target:"_blank",rel:"noopener noreferrer",display:"inline-flex",transition:"transform 0.2s ease, opacity 0.2s ease",_hover:{transform:"translateY(-2px)",opacity:.9},title:A.platform,"aria-label":A.platform,children:E[A.platform]},A.platform))})()})]}),r.jsx(s.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(E=>r.jsxs(s.Box,{children:[r.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:E.title}),r.jsx(s.VStack,{align:"flex-start",gap:3,children:E.links.map(A=>r.jsx(s.Box,{w:"full",children:c(A,r.jsx(s.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:C.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:A.label}))},A.label))})]},E.title))}),!(a!=null&&a.hide)&&r.jsx(s.Box,{children:r.jsxs(s.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[r.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(a==null?void 0:a.title)??"Newsletter"}),r.jsx(s.Text,{fontSize:"sm",color:"text.body",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(a==null?void 0:a.description)??"Get monthly health tips from our verified specialists."}),r.jsxs(s.Box,{as:"form",onSubmit:D,position:"relative",display:"flex",children:[r.jsx(s.Box,{as:"input",type:"email",value:h,onChange:E=>b(E.target.value),placeholder:(a==null?void 0:a.placeholder)??"email@address.com",required:!0,w:"full",h:"44px",pl:4,pr:"50px",borderRadius:"lg",border:"1px solid",borderColor:"border",bg:"bg.surface",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",_placeholder:{color:"text.body"},_focus:{outline:"none",borderColor:C.token,boxShadow:`0 0 0 1px ${C.solid}`},transition:"all 0.2s"}),r.jsx("button",{type:"submit",style:{position:"absolute",right:"4px",top:"4px",bottom:"4px",width:"36px",height:"36px",padding:0,background:v?C.solidHover:C.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:y?`0 0 0 3px ${C.focusRing}`:"none",transition:"background 0.2s ease, box-shadow 0.2s ease"},onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),onFocus:()=>j(!0),onBlur:()=>j(!1),"aria-label":"Subscribe",children:(a==null?void 0:a.buttonIcon)??r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),r.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:r.jsxs(s.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[r.jsx(s.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:x}),r.jsxs(s.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[l.map(E=>r.jsx(s.Box,{children:c(E,r.jsx(s.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:E.label}))},E.label)),S&&r.jsx(s.Box,{as:"button",onClick:w,display:"inline-flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:"text.body",_hover:{color:"text.heading",bg:"bg"},cursor:"pointer",transition:"all 0.2s","aria-label":"Toggle theme",ml:2,children:B==="dark"?r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"5"}),r.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),r.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),r.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),r.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),r.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),r.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),r.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),r.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})}),u&&u.length>0&&r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:r.jsx(s.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:u.map(E=>{const A=r.jsxs(s.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:E.href?"pointer":"default"},children:[E.imageSrc?r.jsx("img",{src:E.imageSrc,alt:E.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):r.jsx(s.Box,{color:"text.muted",flexShrink:0,children:r.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}),r.jsx(s.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:E.name})]},E.name);return E.href?r.jsx(s.Box,{children:c({href:E.href,isExternal:E.isExternal??!0},A)},E.name):r.jsx(s.Box,{children:A},E.name)})})})]})})}ci.displayName="MedixFooter";const Ks=r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{d:"m9 18 6-6-6-6"})}),Zs=(e,t)=>e.href?r.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):r.jsx(r.Fragment,{children:t}),Xs={blue:{hoverColor:"blue.500"},purple:{hoverColor:"#7700CC"}};function Js({items:e,separator:t=Ks,colorScheme:n="blue",renderLink:o=Zs,...i}){const l=Xs[n];return r.jsx(s.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",...i,children:e.map((a,c)=>{const f=c===e.length-1;return r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[o(a,r.jsx(s.Box,{as:"span",display:"inline-block",lineHeight:"1.2",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:f?"medium":"normal",color:f?"text.heading":"text.muted",_hover:f?void 0:{color:l.hoverColor},cursor:!f&&a.href?"pointer":"default",transition:"color 0.15s",wordBreak:"break-word",whiteSpace:f?"normal":"nowrap",children:a.label})),!f&&r.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},c)})})}const Qs={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}},ec={blue:{activeText:"blue.500",indicator:"blue.500",focusOutline:"blue.500",hoverText:"blue.500",badgeActiveBg:"blue.100",badgeActiveColor:"blue.700"},purple:{activeText:"#7700CC",indicator:"#7700CC",focusOutline:"#7700CC",hoverText:"#7700CC",badgeActiveBg:"#F3E8FF",badgeActiveColor:"#6B21A8"}};function tc({tabs:e,defaultActiveId:t,activeId:n,onChange:o,variant:i="line",size:l="md",renderContent:a=!0,colorScheme:c="blue",haptic:f,disableHaptic:u=!1,...d}){var C;const{trigger:p}=de(),[x,h]=I.default.useState(t??((C=e[0])==null?void 0:C.id)),b=n??x,v=ec[c],F=S=>{S!==b&&!u&&f!==!1&&p(f??"selection"),h(S),o==null||o(S)},y=e.find(S=>S.id===b),j=Qs[l];return r.jsxs(s.Box,{...d,children:[r.jsx(s.Box,{role:"tablist",display:"flex",gap:i==="pill"?"1":"0",borderBottom:i==="line"?"1px solid":"none",border:i==="pill"?"1px solid":"none",borderColor:"border",bg:i==="pill"?"bg.subtle":"transparent",p:i==="pill"?"1":"0",borderRadius:i==="pill"?"full":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(S=>{const B=S.id===b;return r.jsxs(s.Box,{role:"tab","aria-selected":B,"aria-disabled":S.disabled,tabIndex:S.disabled?-1:0,onClick:()=>!S.disabled&&F(S.id),onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&!S.disabled&&F(S.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:i==="pill"?"4":j.px,py:i==="pill"?"3":j.py,fontFamily:"var(--font-body)",fontWeight:B?"semibold":"medium",fontSize:i==="pill"?"sm":j.fontSize,color:S.disabled?"text.muted":i==="pill"?B?"text.heading":"text.body":B?v.activeText:"text.body",cursor:S.disabled?"not-allowed":"pointer",opacity:S.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:i==="pill"?"1":void 0,flexShrink:i==="pill"?1:0,bg:i==="pill"?B?"bg":"bg.surface":"transparent",borderRadius:i==="pill"?"full":"none",boxShadow:"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?B?v.indicator:"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:S.disabled?void 0:i==="line"?{color:v.hoverText}:{bg:B?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:v.focusOutline,outlineOffset:"2px",borderRadius:i==="pill"?"full":"sm"},children:[r.jsx(s.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:S.label}),S.badge!==void 0&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:i==="pill"?B?"bg.subtle":"bg":B?v.badgeActiveBg:"bg.subtle",color:i==="pill"?B?"text.heading":"text.muted":B?v.badgeActiveColor:"text.muted",children:S.badge})]},S.id)})}),a&&(y==null?void 0:y.content)&&r.jsx(s.Box,{role:"tabpanel",mt:"4",children:y.content})]})}const nc={blue:{activeBg:"blue.500",activeColor:"white",inactiveBg:"blue.100",inactiveColor:"blue.500",inactiveBgDark:"rgba(6, 133, 255, 0.12)",inactiveColorDark:"blue.200",hoverBg:"blue.200",hoverBgDark:"rgba(6, 133, 255, 0.2)",navHoverColor:"blue.500"},purple:{activeBg:"#7700CC",activeColor:"white",inactiveBg:"#F3E8FF",inactiveColor:"#7700CC",inactiveBgDark:"rgba(119, 0, 204, 0.18)",inactiveColorDark:"#D8B4FE",hoverBg:"#E9D5FF",hoverBgDark:"rgba(119, 0, 204, 0.28)",navHoverColor:"#7700CC"}};function rc(e,t,n){if(n*2+5>=t)return Array.from({length:t},(f,u)=>u+1);const i=Math.max(e-n,1),l=Math.min(e+n,t),a=i>2,c=l<t-2;if(!a&&c){const f=3+2*n;return[...Array.from({length:f},(u,d)=>d+1),"...",t]}if(a&&!c){const f=3+2*n;return[1,"...",...Array.from({length:f},(u,d)=>t-f+1+d)]}return[1,"...",...Array.from({length:l-i+1},(f,u)=>i+u),"...",t]}function ui({total:e,pageSize:t=10,currentPage:n=1,onChange:o,siblingCount:i=1,showEdges:l=!0,compact:a=!1,colorScheme:c="blue",haptic:f,disableHaptic:u=!1,...d}){const{trigger:p}=de(),x=Math.ceil(e/t),h=nc[c];if(x<=1)return null;const b=rc(n,x,i),v=S=>{S===n||S<1||S>x||(!u&&f!==!1&&p(f??"selection"),o==null||o(S))},F={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"semibold",cursor:"pointer",transition:"all 0.15s",border:"none",userSelect:"none"},y=({children:S,disabled:B,onClick:w,label:D,icon:E,isNext:A})=>r.jsxs(s.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"1.5",h:"8",px:"2",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",userSelect:"none",border:"none",bg:"transparent",color:"text.muted",opacity:B?.4:1,pointerEvents:B?"none":void 0,onClick:w,"aria-label":D,_hover:{color:h.navHoverColor},children:[!A&&E&&r.jsx(s.Box,{as:"span",display:"flex",alignItems:"center",children:E}),S,A&&E&&r.jsx(s.Box,{as:"span",display:"flex",alignItems:"center",children:E})]}),j=r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M15 18l-6-6 6-6"})}),C=r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M9 18l6-6-6-6"})});return r.jsxs(s.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...d,children:[l&&r.jsx(y,{disabled:n===1,onClick:()=>v(1),label:"First page",icon:j,children:"First"}),r.jsx(y,{disabled:n===1,onClick:()=>v(n-1),label:"Previous page",icon:j,children:"Prev"}),!a&&b.map((S,B)=>S==="..."?r.jsx(s.Box,{...F,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${B}`):r.jsx(s.Box,{as:"button",...F,bg:n===S?h.activeBg:h.inactiveBg,color:n===S?h.activeColor:h.inactiveColor,_dark:{bg:n===S?h.activeBg:h.inactiveBgDark,color:n===S?h.activeColor:h.inactiveColorDark},onClick:()=>v(S),"aria-label":`Page ${S}`,"aria-current":n===S?"page":void 0,_hover:n!==S?{bg:h.hoverBg,_dark:{bg:h.hoverBgDark}}:void 0,children:S},S)),a&&r.jsxs(s.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",x]}),r.jsx(y,{disabled:n===x,onClick:()=>v(n+1),label:"Next page",icon:C,isNext:!0,children:"Next"}),l&&r.jsx(y,{disabled:n===x,onClick:()=>v(x),label:"Last page",icon:C,isNext:!0,children:"Last"})]})}const Dr=r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:r.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function oc({steps:e,currentStep:t,variant:n="default",orientation:o="horizontal",colorScheme:i="blue",...l}){const a=i==="blue"?"#0685FF":"#7700CC",c=i==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return o==="vertical"?r.jsx(s.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...l,children:e.map((u,d)=>{const p=d+1<t,x=d+1===t,h=d===e.length-1,b=p||x?a:"var(--chakra-colors-border, #E2E8F0)";return r.jsxs(s.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:p||x?a:"bg.subtle",border:"2px solid",borderColor:b,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:p?Dr:u.icon??d+1}),!h&&r.jsx(s.Box,{w:"2px",flex:"1",minH:"8",bg:p?a:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&r.jsxs(s.Box,{pt:"1",pb:h?"0":"8",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:x?"semibold":"medium",color:p||x?a:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:u.title}),u.description&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u.description})]})]},u.id)})}):r.jsx(s.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...l,children:e.map((u,d)=>{const p=d+1<t,x=d+1===t,h=d+1>t,b=d===e.length-1,v=h?"bg.subtle":a,F=p?Dr:u.icon?u.icon:r.jsx(s.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:h?"text.muted":"white",lineHeight:"1",children:d+1}),y=!h&&n!=="compact",j=h?"text.muted":a;return r.jsxs(I.default.Fragment,{children:[r.jsx(s.Box,{role:"listitem","aria-current":x?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:y?"2":"0",py:y?"1.5":"0",bg:y?c:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[r.jsx(s.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:v,border:h?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:F}),n!=="compact"&&r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:x||p?"semibold":"medium",fontFamily:"var(--font-body)",color:j,whiteSpace:"nowrap",transition:"color 0.25s",children:u.title})]})}),!b&&r.jsx(s.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:r.jsx(s.Box,{h:"1.5px",w:"10",bg:p?a:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},u.id)})})}const ic=`
365
+ `,document.head.appendChild(e),Ir=!0}function ws({items:e,renderLink:t,scheme:n,menuHaptic:o="selection",menuHapticsDisabled:i=!1}){const{trigger:l}=de();I.default.useEffect(()=>{ks()},[]);const a=I.default.useCallback(()=>{i||o===!1||l(o??"selection")},[i,o,l]);return r.jsx(s.Box,{as:"nav","aria-label":"Mobile bottom navigation",display:{base:"flex",md:"none"},position:"fixed",bottom:"0",left:"0",right:"0",zIndex:"docked",bg:"bg",borderTop:"1px solid",borderColor:"border",alignItems:"center",style:{minHeight:64,paddingBottom:"env(safe-area-inset-bottom, 0px)",boxShadow:"none",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",animation:"medixMobileNavIn 0.42s cubic-bezier(0.22,1,0.36,1) both"},children:e.slice(0,5).map(c=>{const d=c.isActive??!1,u=r.jsxs(ye.motion.div,{whileTap:{scale:.82},transition:{type:"spring",stiffness:500,damping:30,mass:.7},style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,height:"100%",padding:"6px 4px 4px",cursor:"pointer",position:"relative",gap:4,textDecoration:"none",WebkitTapHighlightColor:"transparent"},children:[r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:7,left:"50%",width:44,height:28,borderRadius:14,background:n.activeBgLight,transform:`translateX(-50%) scaleX(${d?1:0})`,opacity:d?1:0,transition:"transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease",pointerEvents:"none"}}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",zIndex:1,color:d?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",opacity:d?1:.6},children:[c.icon,typeof c.badge=="number"&&c.badge>0&&r.jsx("span",{"aria-label":`${c.badge} unread`,style:{position:"absolute",top:-5,right:-6,minWidth:16,height:16,borderRadius:8,background:n.solid,color:"#fff",fontSize:9,fontWeight:700,fontFamily:"var(--font-body)",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0 3px",lineHeight:1,boxShadow:"0 0 0 2px var(--chakra-colors-bg, #fff)",pointerEvents:"none"},children:c.badge>99?"99+":c.badge}),c.isNew&&(!c.badge||c.badge<=0)&&r.jsx("span",{"aria-label":"New feature",style:{position:"absolute",top:-2,right:-2,width:6,height:6,borderRadius:3,background:n.solid,boxShadow:"0 0 0 2px var(--chakra-colors-bg, #fff)",pointerEvents:"none"}})]}),r.jsx(s.Box,{as:"span",fontSize:"2xs",fontWeight:d?"700":"500",fontFamily:"var(--font-body)",textAlign:"center",lineHeight:"1",position:"relative",zIndex:1,color:d?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",letterSpacing:d?"-0.01em":"0"},children:c.label})]}),f={label:c.label,href:c.href,isActive:c.isActive};return r.jsx(s.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},onClick:a,children:t(f,u)},c.href)})})}const Ht={bronze:{label:"Bronze Clinician",level:1,minScore:0,maxScore:999,color:"#92400E",ring:"#D97706",bg:"rgba(217,119,6,0.10)"},silver:{label:"Silver Clinician",level:2,minScore:1e3,maxScore:4999,color:"#475569",ring:"#94A3B8",bg:"rgba(148,163,184,0.10)"},gold:{label:"Gold Clinician",level:3,minScore:5e3,maxScore:14999,color:"#D97706",ring:"#F59E0B",bg:"rgba(245,158,11,0.10)"},platinum:{label:"Platinum Clinician",level:4,minScore:15e3,maxScore:39999,color:"#0284C7",ring:"#38BDF8",bg:"rgba(56,189,248,0.10)"},"elite-i":{label:"Elite I",level:5,minScore:4e4,maxScore:59999,color:"#6D28D9",ring:"#8B5CF6",bg:"rgba(139,92,246,0.12)"},"elite-ii":{label:"Elite II",level:6,minScore:6e4,maxScore:79999,color:"#7C3AED",ring:"#A78BFA",bg:"rgba(167,139,250,0.12)"},"elite-iii":{label:"Elite III",level:7,minScore:8e4,maxScore:119999,color:"#7700CC",ring:"#A855F7",bg:"rgba(119,0,204,0.12)"},"elite-iv":{label:"Elite IV",level:8,minScore:12e4,maxScore:199999,color:"#5B21B6",ring:"#7C3AED",bg:"rgba(124,58,237,0.12)"},"elite-v":{label:"Elite V",level:9,minScore:2e5,maxScore:null,color:"#4C1D95",ring:"#6D28D9",bg:"rgba(109,40,217,0.14)"}},ii=["bronze","silver","gold","platinum","elite-i","elite-ii","elite-iii","elite-iv","elite-v"];function js(e){const t=typeof e=="number"&&Number.isFinite(e)?Math.floor(e):0;if(t<0)return"bronze";for(const n of ii){const o=Ht[n];if(o.maxScore===null?t>=o.minScore:t<=o.maxScore)return n}return"elite-v"}function li(e){return Ht[e]??Ht.bronze}const Cs=({color:e})=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"8",r:"6"}),r.jsx("path",{d:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11"})]}),Ss=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("polyline",{points:"9 18 15 12 9 6"})});function Bs({data:e,renderLink:t,isCollapsed:n=!1,menuHaptic:o="selection",menuHapticsDisabled:i=!1}){const{trigger:l}=de(),a=I.default.useCallback(()=>{i||o===!1||e.link&&l(o??"selection")},[i,o,l,e.link]),c=li(e.tier),d=e.name.split(" ").map(f=>f[0]).join("").slice(0,2).toUpperCase();if(n){const f=r.jsx(s.Box,{display:"flex",justifyContent:"center",alignItems:"center",w:"full",my:"2",children:r.jsx(Oe,{label:`${e.role} — ${e.name} (${c.label}, ${e.medixScore} pts)`,placement:"right",toggleOnTouch:!1,children:r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"36px",h:"36px",mx:"auto","aria-label":`${e.role} ${e.name}`,cursor:e.link?"pointer":"default",onClick:a,children:r.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${c.ring}, ${c.color})`},children:e.avatarSrc?r.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx("div",{style:{width:36,height:36,borderRadius:"50%",background:c.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:c.color,fontFamily:"var(--font-heading)"},children:d})})})})});return e.link?r.jsx(r.Fragment,{children:t({label:e.role,href:e.link},f)}):r.jsx(r.Fragment,{children:f})}const u=r.jsxs(s.Box,{mx:"3",my:"4",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",style:{cursor:e.link?"pointer":"default"},onClick:a,_hover:e.link?{borderColor:c.ring,boxShadow:`0 0 0 1px ${c.ring}40`}:void 0,transition:"border-color 0.15s ease, box-shadow 0.15s ease",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",pt:"3",pb:"2.5",children:[r.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${c.ring}, ${c.color})`},children:e.avatarSrc?r.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:c.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:c.color,fontFamily:"var(--font-heading)"},children:d})}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",color:"text.heading",lineHeight:"1.2",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.role}),r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",lineHeight:"1.3",mt:"0.5",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name})]}),e.link&&r.jsx(s.Box,{color:"text.muted",flexShrink:0,children:r.jsx(Ss,{})})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border"}),r.jsxs(s.Box,{px:"3",pt:"2",pb:"2.5",children:[r.jsx(s.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[r.jsx(Cs,{color:c.color}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:c.color,whiteSpace:"nowrap"},children:c.label}),r.jsxs(s.Box,{fontSize:"sm",fontWeight:"500",color:"text.heading",fontFamily:"var(--font-body)",ml:"1",style:{whiteSpace:"nowrap"},children:[e.medixScore.toLocaleString()," ",Number(e.medixScore)===1?"pt":"pts"]})]})]})]});return e.link?r.jsx(r.Fragment,{children:t({label:e.role,href:e.link},u)}):r.jsx(r.Fragment,{children:u})}function Fs({logo:e,collapsedLogo:t,navGroups:n,isOpen:o,onClose:i,onLogout:l,renderLink:a,sidebarWidth:c,collapsedSidebarWidth:d,isCollapsed:u,collapsible:f,onToggleCollapse:h,collapseTogglePlacement:x,scheme:p,scoreCard:b,menuHaptic:v="selection",menuHapticsDisabled:B=!1}){const[y,S]=U.useState(!1),{trigger:j}=de(),C=I.default.useCallback(()=>{B||v===!1||j(v??"selection")},[B,v,j]);return r.jsxs(r.Fragment,{children:[o&&r.jsx(s.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:{base:1999,md:"overlay"},bg:"blackAlpha.500",onClick:i,"aria-hidden":"true"}),r.jsxs(s.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:{base:`${c}px`,md:`${u?d:c}px`},zIndex:{base:2e3,md:u?1200:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:o?"translateX(0)":`translateX(-${c+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1), width 0.22s cubic-bezier(0.2,0,0,1)",children:[r.jsxs(s.Box,{h:u?{base:"16",md:"auto"}:"16",minH:u?{base:"16",md:"84px"}:"16",px:u?{base:"5",md:"2"}:"5",py:u?{base:"0",md:"3"}:"0",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",children:[r.jsxs(s.Box,{display:{base:"none",md:u?"flex":"none"},flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2",w:"full",children:[r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:t??r.jsx(Ye,{type:"icon",variant:p.chakraToken==="blue.500"?"blue":"purple",height:26})}),f&&(x==="sidebar-header"||x==="both")&&r.jsx(Oe,{label:"Expand sidebar",placement:"right",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:()=>{C(),h==null||h()},"aria-label":"Expand sidebar",transition:"background 0.15s ease, color 0.15s ease",children:r.jsx(ri,{})})})]}),r.jsxs(s.Box,{display:{base:"flex",md:u?"none":"flex"},alignItems:"center",justifyContent:"space-between",w:"full",minW:"0",children:[r.jsx(s.Box,{flex:"1",minW:"0",overflow:"hidden",children:e}),f&&(x==="sidebar-header"||x==="both")&&r.jsx(Oe,{label:"Collapse sidebar",placement:"bottom",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:()=>{C(),h==null||h()},"aria-label":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:r.jsx(ni,{})})})]})]}),b&&r.jsx(s.Box,{display:{base:"none",md:u?"flex":"block"},justifyContent:u?"center":void 0,alignItems:u?"center":void 0,w:"full",flexShrink:0,pt:u?"1":"3",children:r.jsx(Bs,{data:b,renderLink:a,isCollapsed:u,menuHaptic:v,menuHapticsDisabled:B})}),r.jsx(s.Box,{flex:"1",overflowY:u?"visible":"auto",overflowX:u?"visible":"hidden",position:"relative",py:"3",px:u?"2":"3",children:n.map((F,w)=>r.jsxs(s.Box,{mb:u?"2":"4",children:[F.groupLabel&&(u?w>0?r.jsx(s.Box,{h:"1px",bg:"border",mx:"2",my:"2"}):null:r.jsx(s.Box,{px:"3",pb:"2",pt:w>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:F.groupLabel})),r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:u?"1.5":"0.5",children:F.items.map(D=>r.jsx(En,{item:D,renderLink:a,onClick:i,scheme:p,isCollapsed:u,menuHaptic:v,menuHapticsDisabled:B},D.href))})]},w))}),r.jsx(s.Box,{px:u?"2":"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",display:u?"flex":"block",justifyContent:u?"center":void 0,alignItems:u?"center":void 0,w:"full",children:u?r.jsx(Oe,{label:"Log out",placement:"right",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),onClick:()=>{C(),i(),l==null||l()},style:{background:y?Bn:"transparent",color:Re,transition:"background 0.15s ease"},children:r.jsx(s.Box,{flexShrink:0,style:{color:Re},children:r.jsx(Fn,{})})})}):r.jsxs(s.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),onClick:()=>{C(),i(),l==null||l()},style:{background:y?Bn:"transparent",color:Re,transition:"background 0.15s ease"},children:[r.jsx(s.Box,{flexShrink:0,style:{color:Re},children:r.jsx(Fn,{})}),r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Re},children:"Log out"})]})})]})]})}function Es({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:o,onMenuToggle:i,sidebarWidth:l,topBarSlot:a,dropdownItems:c,onLogout:d,scheme:u,collapsible:f=!0,isCollapsed:h=!1,onToggleCollapse:x,collapseTogglePlacement:p="sidebar-header",menuHaptic:b="selection",menuHapticsDisabled:v=!1}){const[B,y]=U.useState(!1),{trigger:S}=de(),j=I.default.useCallback(()=>{v||b===!1||S(b??"selection")},[v,b,S]),C=U.useRef(null),F=U.useId(),w=`user-menu-button-${F}`,D=`user-menu-dropdown-${F}`;return U.useEffect(()=>{const E=z=>{C.current&&!C.current.contains(z.target)&&y(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]),r.jsxs(s.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",minH:"16",maxH:"16",flexShrink:0,display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[r.jsx(s.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"1",cursor:"pointer",color:"text.body",borderRadius:"md",_hover:{bg:"bg.subtle"},onClick:()=>{j(),i()},"aria-label":o?"Close navigation menu":"Open navigation menu","aria-expanded":o,children:o?r.jsx(is,{}):r.jsx(os,{})}),f&&(p==="topbar"||p==="both")&&r.jsx(Oe,{label:h?"Expand sidebar":"Collapse sidebar",placement:"bottom",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:()=>{j(),x==null||x()},"aria-label":h?"Expand sidebar":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:h?r.jsx(ri,{}):r.jsx(ni,{})})}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",r.jsx(s.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&r.jsx(s.Box,{as:"p",fontSize:{base:"2xs",md:"xs"},fontWeight:"400",fontFamily:"var(--font-body)",color:"text.heading",mt:"0.5",lineHeight:"1.4",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n})]}),a,r.jsx(vs,{scheme:u}),r.jsxs(s.Box,{position:"relative",ref:C,children:[r.jsxs(s.Box,{as:"button",id:w,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>y(E=>!E),"aria-haspopup":"menu","aria-expanded":B,"aria-controls":B?D:void 0,"aria-label":"User menu",children:[r.jsx(Jt,{name:e.name,src:e.avatarSrc,size:"sm"}),r.jsx(s.Box,{color:"text.muted",children:r.jsx(oi,{open:B})})]}),B&&r.jsxs(s.Box,{role:"menu","aria-labelledby":w,id:D,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:[r.jsxs(s.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!c&&r.jsxs(r.Fragment,{children:[r.jsx(zt,{icon:r.jsx(ls,{}),label:"My Profile",onClick:()=>y(!1),scheme:u}),r.jsx(zt,{icon:r.jsx(as,{}),label:"Settings",onClick:()=>y(!1),scheme:u})]}),c==null?void 0:c.map((E,z)=>r.jsx(zt,{icon:E.icon,label:E.label,isDanger:E.isDanger,onClick:()=>{var N;y(!1),(N=E.onClick)==null||N.call(E)},scheme:u},z)),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsx(zt,{icon:r.jsx(Fn,{}),label:"Log out",isDanger:!0,onClick:()=>{y(!1),d==null||d()},scheme:u})]})]})]})}function zt({icon:e,label:t,isDanger:n,onClick:o,scheme:i}){const[l,a]=U.useState(!1);return r.jsxs(s.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:"transparent",cursor:"pointer",textAlign:"left",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:o,style:{background:l?n?Bn:i.hoverBgLight:"transparent",color:n?Re:void 0,transition:"background 0.12s ease"},children:[e&&r.jsx(s.Box,{flexShrink:0,style:{color:n?Re:void 0},color:"text.muted",children:e}),r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Re:void 0},color:n?void 0:"text.body",children:t})]})}function ai({children:e,contentBanner:t,logo:n,navGroups:o,user:i,greeting:l,greetingSubtext:a,onLogout:c,renderLink:d=xs,dropdownItems:u,topBarSlot:f,sidebarWidth:h=220,collapsedSidebarWidth:x=68,collapsible:p=!0,defaultCollapsed:b=!1,isCollapsed:v,onCollapseChange:B,collapsedLogo:y,collapseTogglePlacement:S="sidebar-header",colorScheme:j="blue",mobileNavItems:C,scoreCard:F,environment:w="auto",showEnvironmentBanner:D,environmentBanner:E,environmentBannerSlot:z,haptic:N,disableHaptic:R=!1,...T}){const[q,M]=U.useState(!1),[k,P]=U.useState(b),[$,Q]=U.useState(!1),[J,g]=U.useState(!1);U.useEffect(()=>{g(!0)},[]);const H=p&&(v!==void 0?v:k),A=()=>{if(!p)return;const xe=!H;v===void 0&&P(xe),B==null||B(xe)},m=rs[j],O=!!(C&&C.length>0),G=N??"selection",K=!!R,Y=l??gs(),Z=n??r.jsx(Ye,{variant:j,height:26}),ae=y??r.jsx(Ye,{type:"icon",variant:j,height:26}),X=E||{},ne=X.environment||w,{isNonProduction:le,detectedEnv:ge}=ms(ne),we=!$&&(D!==void 0?D:J?le:ne!=="production"&&ne!=="live");return r.jsxs(s.Box,{display:"flex",minH:"100vh",bg:"bg",...T,children:[r.jsx(Fs,{logo:Z,collapsedLogo:ae,navGroups:o,isOpen:q,onClose:()=>M(!1),onLogout:c,renderLink:d,sidebarWidth:h,collapsedSidebarWidth:x,isCollapsed:H,collapsible:p,onToggleCollapse:A,collapseTogglePlacement:S,scheme:m,scoreCard:F,menuHaptic:G,menuHapticsDisabled:K}),r.jsxs(s.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${H?x:h}px`},transition:"margin-left 0.22s cubic-bezier(0.2,0,0,1)",children:[we&&(z??r.jsx(ys,{detectedEnv:ge,config:X,onDismiss:()=>{var xe;Q(!0),(xe=X.onDismiss)==null||xe.call(X)}})),r.jsx(Es,{user:i,greeting:Y,greetingSubtext:a,isSidebarOpen:q,onMenuToggle:()=>M(xe=>!xe),sidebarWidth:h,topBarSlot:f,dropdownItems:u,onLogout:c,scheme:m,collapsible:p,isCollapsed:H,onToggleCollapse:A,collapseTogglePlacement:S,menuHaptic:G,menuHapticsDisabled:K}),r.jsxs(s.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:O?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:[t,e]})]}),O&&r.jsx(ws,{items:C,renderLink:d,scheme:m,menuHaptic:G,menuHapticsDisabled:K})]})}ai.displayName="MedixDashboardLayout";const Wt=[0,0,.2,1],Jn=[.4,0,1,1],Qn=[.22,1,.36,1],Ls={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Qn}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Jn}}},Is={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Tr={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Wt}}},Ts={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Wt,delay:.18}}},Ds={hidden:{opacity:0,y:-6,scale:.98,transformOrigin:"top"},visible:{opacity:1,y:0,scale:1,transformOrigin:"top",transition:{duration:.18,ease:Qn}},exit:{opacity:0,y:-4,scale:.98,transformOrigin:"top",transition:{duration:.12,ease:Jn}}},As={hidden:{opacity:0,height:0,overflow:"hidden"},visible:{opacity:1,height:"auto",overflow:"hidden",transition:{duration:.22,ease:Qn}},exit:{opacity:0,height:0,overflow:"hidden",transition:{duration:.16,ease:Jn}}},zs={blue:{solid:"#0685FF",hover:"#0685FF",hoverBg:"blue.50",hoverBgDark:"rgba(6,133,255,0.12)",badgeBg:"#EFF6FF",badgeColor:"#0685FF",badgeBgDark:"rgba(6,133,255,0.20)",badgeColorDark:"#60A5FA"},purple:{solid:"#7700CC",hover:"#7700CC",hoverBg:"purple.50",hoverBgDark:"rgba(119,0,204,0.12)",badgeBg:"#FAF5FF",badgeColor:"#7700CC",badgeBgDark:"rgba(119,0,204,0.20)",badgeColorDark:"#C084FC"}},Rs=()=>r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),r.jsx("polyline",{points:"7 7 17 7 17 17"})]});function si({isOpen:e}){return r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s cubic-bezier(0.22, 1, 0.36, 1)",transform:e?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})}function qt(){return r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.65,flexShrink:0},children:[r.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),r.jsx("polyline",{points:"15 3 21 3 21 9"}),r.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function Ms({color:e}){return r.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),r.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Os({color:e}){return r.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),r.jsx("path",{d:"M13.8801 16.71L8.93005 21.66L10.3401 23.07L13.1701 20.24L16.0001 17.41L18.1201 19.54L21.6601 23.07L23.0701 21.66L18.1201 16.71L17.4101 16L23.0701 10.34L21.6601 8.92999L16.0001 14.59L10.3401 8.92999L8.93005 10.34L14.5901 16L13.8801 16.71Z",fill:"white"})]})}const Ns=(e,t)=>{const n=e.href??"#",o=e.target??(e.isExternal?"_blank":void 0),i=e.rel??(e.isExternal?"noopener noreferrer":void 0);return n==="#"&&!e.onClick?r.jsx("span",{style:{textDecoration:"none",display:"contents"},children:t}):r.jsx("a",{href:n,target:o,rel:i,onClick:e.onClick,style:{textDecoration:"none",display:"contents"},children:t})};function at({badge:e,scheme:t}){return e?I.default.isValidElement(e)?e:r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"1.5",py:"0.5",fontSize:"10px",fontWeight:"semibold",lineHeight:"1",borderRadius:"badge",bg:t.badgeBg,color:t.badgeColor,_dark:{bg:t.badgeBgDark,color:t.badgeColorDark},border:"1px solid",borderColor:t.badgeColor,style:{borderColor:"currentColor",opacity:.9},children:e}):null}function Ps({item:e,scheme:t,renderLink:n}){var f;const[o,i]=U.useState(!1),l=U.useRef(null),a=U.useRef(null),c=!!(e.children&&e.children.length>0);U.useEffect(()=>{if(!o)return;function h(p){l.current&&!l.current.contains(p.target)&&i(!1)}function x(p){p.key==="Escape"&&i(!1)}return document.addEventListener("mousedown",h),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",x)}},[o]);const d=()=>{a.current&&(clearTimeout(a.current),a.current=null),c&&i(!0)},u=()=>{c&&(a.current=setTimeout(()=>{i(!1)},150))};return c?r.jsxs(s.Box,{as:"li",ref:l,listStyleType:"none",position:"relative",onMouseEnter:d,onMouseLeave:u,children:[r.jsxs(s.Box,{as:"button","aria-haspopup":"menu","aria-expanded":o,onClick:()=>i(!o),display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||o?t.hover:"text.body",bg:o?t.hoverBg:"transparent",_dark:{color:e.isActive||o?t.hover:"text.body",bg:o?t.hoverBgDark:"transparent",_hover:{color:t.hover,bg:t.hoverBgDark}},borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),r.jsx("span",{children:e.label}),r.jsx(at,{badge:e.badge,scheme:t}),r.jsx(si,{isOpen:o})]}),r.jsx(ye.AnimatePresence,{children:o&&r.jsx(ye.motion.div,{variants:Ds,initial:"hidden",animate:"visible",exit:"exit",style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:1e3},children:r.jsx(s.Box,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",p:"2",minW:"260px",maxW:"380px",display:"flex",flexDirection:"column",gap:"1",role:"menu","aria-label":e.label,children:(f=e.children)==null?void 0:f.map((h,x)=>r.jsx(s.Box,{as:"div",role:"none",children:n(h,r.jsxs(s.Box,{as:"span",role:"menuitem",display:"flex",alignItems:"flex-start",gap:"3",p:"2.5",borderRadius:"md",cursor:"pointer",transition:"all 0.15s ease",color:"text.heading",_hover:{bg:t.hoverBg,color:t.hover},_dark:{color:"text.heading",_hover:{bg:t.hoverBgDark,color:t.hover}},onClick:()=>i(!1),children:[h.icon&&r.jsx(s.Box,{as:"span",w:"8",h:"8",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:h.icon}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",justifyContent:"space-between",children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",children:[r.jsx("span",{children:h.label}),h.isExternal&&r.jsx(qt,{})]}),r.jsx(at,{badge:h.badge,scheme:t})]}),h.description&&r.jsx(s.Box,{as:"span",display:"block",fontSize:"xs",color:"text.body",_dark:{color:"text.body"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.4",children:h.description})]})]}))},h.href||`${h.label}-${x}`))})})})]}):r.jsx(s.Box,{as:"li",listStyleType:"none",children:n(e,r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{bg:t.hoverBgDark,color:t.hover}},borderRadius:"md",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},cursor:"pointer",children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),r.jsx("span",{children:e.label}),r.jsx(at,{badge:e.badge,scheme:t}),e.isExternal&&r.jsx(qt,{})]}))})}function _s({item:e,scheme:t,renderLink:n,onCloseMenu:o}){var c;const[i,l]=U.useState(!1);return!(e.children&&e.children.length>0)?r.jsx(ye.motion.li,{variants:Tr,children:n(e,r.jsxs(s.Box,{as:"span",display:"flex",alignItems:"center",justifyContent:"space-between",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:o,children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),r.jsx("span",{children:e.label})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[r.jsx(at,{badge:e.badge,scheme:t}),e.isExternal&&r.jsx(qt,{})]})]}))}):r.jsxs(ye.motion.li,{variants:Tr,style:{listStyle:"none"},children:[r.jsxs(s.Box,{as:"button",onClick:()=>l(!i),"aria-expanded":i,display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||i?t.hover:"text.body",bg:i?"bg.subtle":"transparent",_dark:{color:e.isActive||i?t.hover:"text.body",bg:i?"bg.subtle":"transparent",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",border:"none",cursor:"pointer",textAlign:"left",transition:"background 0.15s ease, color 0.15s ease",_hover:{color:t.hover,bg:"bg.subtle"},children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),r.jsx("span",{children:e.label})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[r.jsx(at,{badge:e.badge,scheme:t}),r.jsx(si,{isOpen:i})]})]}),r.jsx(ye.AnimatePresence,{children:i&&r.jsx(ye.motion.div,{variants:As,initial:"hidden",animate:"visible",exit:"exit",children:r.jsx(s.Box,{pl:"4",pr:"2",py:"1.5",display:"flex",flexDirection:"column",gap:"1",borderLeft:"2px solid",borderColor:"border",ml:"4",my:"1",children:(c=e.children)==null?void 0:c.map((d,u)=>r.jsx(s.Box,{as:"div",children:n(d,r.jsxs(s.Box,{as:"span",display:"flex",alignItems:"flex-start",gap:"2.5",px:"2.5",py:"2",borderRadius:"md",color:"text.body",_dark:{color:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:o,children:[d.icon&&r.jsx(s.Box,{as:"span",w:"6",h:"6",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:d.icon}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1",children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-heading)",children:[r.jsx("span",{children:d.label}),d.isExternal&&r.jsx(qt,{})]}),r.jsx(at,{badge:d.badge,scheme:t})]}),d.description&&r.jsx(s.Box,{as:"span",display:"block",fontSize:"xs",color:"text.muted",_dark:{color:"text.muted"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.3",children:d.description})]})]}))},d.href||`${d.label}-${u}`))})})})]})}function Hs({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:o="Get Started",ctaHref:i,onCtaClick:l,ctaIconHref:a,onCtaIconClick:c,secondaryCtaLabel:d,secondaryCtaHref:u,onSecondaryCtaClick:f,ctaSlot:h,renderLink:x=Ns,isSticky:p=!1,colorScheme:b="blue",variant:v="solid",...B}){const[y,S]=U.useState(!1),j=zs[b],C=a??i,F=c??l,w=v==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},D=({mobile:E=!1})=>r.jsxs(s.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:E?"column":"row",children:[d&&r.jsx(Be,{as:u?"a":"button",href:u,variant:E?"outline":"ghost",colorScheme:b,size:E?"md":"sm",onClick:()=>{f==null||f(),E&&S(!1)},style:E?{width:"100%"}:void 0,children:d}),r.jsx(Be,{as:i?"a":"button",href:i,variant:"solid",colorScheme:b,size:E?"md":"sm",onClick:()=>{l==null||l(),E&&S(!1)},style:E?{width:"100%"}:void 0,children:o}),!E&&r.jsx(Be,{as:C?"a":"button",href:C,target:C&&C!==i?"_blank":void 0,rel:C&&C!==i?"noopener noreferrer":void 0,variant:"solid",colorScheme:b,size:"sm",onClick:F,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:r.jsx(Rs,{})})]});return r.jsxs(s.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:p?"sticky":"relative",top:p?"0":void 0,zIndex:p?"sticky":40,bg:v==="transparent"?"transparent":v==="blur"?void 0:"bg",style:w,borderBottom:"1px solid",borderColor:v==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...B,children:[r.jsxs(s.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[r.jsx(s.Box,{flexShrink:0,children:e??r.jsx(Ye,{variant:b==="blue"?"blue":"purple",height:28})}),r.jsx(s.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map((E,z)=>r.jsx(Ps,{item:E,scheme:j,renderLink:x},E.href||`${E.label}-${z}`))}),r.jsx(s.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:h??r.jsx(D,{})}),r.jsx(s.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>S(!y),"aria-label":y?"Close menu":"Open menu","aria-expanded":y,position:"relative",width:"32px",height:"32px",flexShrink:0,children:r.jsx(ye.AnimatePresence,{mode:"wait",initial:!1,children:y?r.jsx(ye.motion.span,{initial:{opacity:0,rotate:-45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:45,scale:.7},transition:{duration:.18,ease:Wt},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(Os,{color:j.solid})},"close"):r.jsx(ye.motion.span,{initial:{opacity:0,rotate:45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:-45,scale:.7},transition:{duration:.18,ease:Wt},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(Ms,{color:j.solid})},"hamburger")})})]}),r.jsx(ye.AnimatePresence,{children:y&&r.jsx(ye.motion.div,{variants:Ls,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:r.jsxs(s.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[r.jsx(ye.motion.ul,{variants:Is,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map((E,z)=>r.jsx(_s,{item:E,scheme:j,renderLink:x,onCloseMenu:()=>S(!1)},E.href||`${E.label}-${z}`))}),r.jsx(ye.motion.div,{variants:Ts,initial:"hidden",animate:"visible",children:r.jsx(s.Box,{mt:"4",children:h??r.jsx(D,{mobile:!0})})})]})},"mobile-menu")})]})}const cn={},Ws={blue:{solid:"#0685FF",solidHover:"#0066CC",token:"blue.500",focusRing:"var(--chakra-colors-blue-500)"},purple:{solid:"#7700CC",solidHover:"#5C00A3",token:"purple.500",focusRing:"var(--chakra-colors-purple-500)"}},qs=e=>({facebook:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_192)",children:r.jsx("path",{d:"M11.0972 21V13.4923H9.112V10.7892H11.0972V8.4804C11.0972 6.66611 12.2698 5 14.9719 5C16.0659 5 16.8749 5.10488 16.8749 5.10488L16.8111 7.62914C16.8111 7.62914 15.9861 7.6211 15.0858 7.6211C14.1114 7.6211 13.9553 8.07014 13.9553 8.81544V10.7892H16.8886L16.761 13.4923H13.9553V21H11.0972Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_192",children:r.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_186)",children:r.jsx("path",{d:"M14.8963 11.3512L20.3606 5H19.0656L14.3213 10.515L10.5319 5H6.16125L11.8913 13.3394L6.16125 20H7.45625L12.4663 14.1763L16.4681 20H20.8388L14.8963 11.3512ZM13.1231 13.4131L12.5425 12.5825L7.9225 5.975H9.91125L13.6394 11.3075L14.22 12.1381L19.0663 19.0694H17.0775L13.1231 13.4131Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_186",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_198)",children:r.jsx("path",{d:"M18.4298 5.31982H7.57025C6.97368 5.32059 6.40177 5.55791 5.97993 5.97975C5.55809 6.40158 5.32077 6.9735 5.32001 7.57006V18.4296C5.32077 19.0262 5.55809 19.5981 5.97993 20.0199C6.40177 20.4417 6.97368 20.6791 7.57025 20.6798H18.4298C19.0263 20.6791 19.5982 20.4417 20.0201 20.0199C20.4419 19.5981 20.6792 19.0262 20.68 18.4296V7.57006C20.6792 6.9735 20.4419 6.40158 20.0201 5.97975C19.5982 5.55791 19.0263 5.32059 18.4298 5.31982ZM10.7498 17.5003H8.94977V11.1998H10.7498V17.5003ZM10.7498 10.3003H8.94977V8.5003H10.7498V10.3003ZM17.0502 17.5003H15.2502V13.9003C15.2372 13.6704 15.1367 13.4542 14.9694 13.2961C14.802 13.1379 14.5805 13.0498 14.3502 13.0498C14.12 13.0498 13.8985 13.1379 13.7311 13.2961C13.5637 13.4542 13.4633 13.6704 13.4502 13.9003V17.5003H11.6502V11.1998H13.4502V11.5387C13.9216 11.3928 14.2278 11.1998 14.8 11.1998C16.0211 11.2008 17.0502 12.2961 17.0502 13.5902V17.5003Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_198",children:r.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_183)",children:r.jsx("path",{d:"M10.3938 5.05251C9.5958 5.09014 9.05086 5.21751 8.57443 5.40464C8.08143 5.59682 7.66349 5.85464 7.24768 6.27195C6.83193 6.68926 6.5758 7.10745 6.38505 7.60132C6.20043 8.0787 6.0753 8.62414 6.04005 9.42257C6.0048 10.221 5.99699 10.4777 6.00093 12.5144C6.0048 14.5511 6.0138 14.8064 6.05249 15.6065C6.09061 16.4043 6.21749 16.9491 6.40468 17.4257C6.59718 17.9188 6.85468 18.3365 7.27218 18.7524C7.68961 19.1684 8.10749 19.4239 8.60249 19.6149C9.07949 19.7993 9.62505 19.925 10.4234 19.9599C11.2217 19.9949 11.4786 20.0031 13.5147 19.9991C15.5509 19.9953 15.8072 19.9862 16.6071 19.9483C17.4071 19.9103 17.949 19.7825 18.4257 19.5962C18.9188 19.4033 19.3369 19.1462 19.7525 18.7286C20.1681 18.311 20.4241 17.8925 20.6147 17.3984C20.7995 16.9214 20.925 16.3759 20.9597 15.5781C20.9947 14.7776 21.0029 14.522 20.9991 12.4856C20.9951 10.4492 20.9859 10.1939 20.948 9.39407C20.9101 8.59426 20.783 8.05114 20.5959 7.57426C20.4032 7.0812 20.1459 6.66376 19.7287 6.24751C19.3114 5.83126 18.8925 5.57551 18.3986 5.38532C17.9212 5.20064 17.3761 5.07482 16.5777 5.04032C15.7794 5.00582 15.5225 4.99689 13.4856 5.00089C11.4487 5.00476 11.1937 5.01351 10.3938 5.05251ZM10.4814 18.6107C9.75018 18.5789 9.35311 18.4574 9.08849 18.3557C8.73811 18.2207 8.48849 18.0575 8.2248 17.7963C7.96105 17.5352 7.79911 17.2847 7.6623 16.9351C7.55955 16.6704 7.4358 16.2738 7.40161 15.5426C7.36443 14.7523 7.35661 14.5149 7.35224 12.5126C7.34786 10.5103 7.35555 10.2732 7.39018 9.48257C7.42143 8.75195 7.54368 8.35445 7.64518 8.08995C7.78018 7.73914 7.9428 7.48995 8.20455 7.22645C8.4663 6.96289 8.71605 6.80057 9.06599 6.66376C9.33036 6.56057 9.72693 6.43789 10.4579 6.40307C11.2488 6.36557 11.4858 6.35807 13.4879 6.3537C15.4899 6.34932 15.7275 6.35682 16.5188 6.3917C17.2494 6.42345 17.6471 6.54451 17.9113 6.6467C18.2618 6.7817 18.5113 6.94382 18.7748 7.20607C19.0384 7.4682 19.2008 7.71707 19.3376 8.06776C19.4409 8.33132 19.5637 8.72776 19.5982 9.4592C19.6358 10.2501 19.6444 10.4873 19.6479 12.4892C19.6516 14.4911 19.6445 14.7288 19.6098 15.5192C19.5779 16.2504 19.4567 16.6476 19.3548 16.9126C19.2198 17.2628 19.0571 17.5126 18.7952 17.7759C18.5333 18.0394 18.2839 18.2016 17.9337 18.3384C17.6697 18.4415 17.2727 18.5645 16.5424 18.5993C15.7514 18.6365 15.5144 18.6443 13.5116 18.6487C11.5087 18.6531 11.2724 18.6449 10.4814 18.6107ZM16.5956 8.49151C16.5959 8.66953 16.649 8.84346 16.7481 8.99131C16.8473 9.13916 16.9881 9.25428 17.1527 9.32211C17.3173 9.38994 17.4983 9.40744 17.6728 9.37239C17.8473 9.33735 18.0076 9.25132 18.1332 9.12521C18.2588 8.9991 18.3443 8.83855 18.3787 8.66389C18.413 8.48922 18.3949 8.30828 18.3264 8.14395C18.258 7.97962 18.1423 7.83927 17.9941 7.74067C17.8459 7.64207 17.6718 7.58964 17.4937 7.59001C17.2551 7.59051 17.0264 7.68575 16.858 7.85481C16.6896 8.02386 16.5952 8.25288 16.5956 8.49151ZM9.64905 12.5075C9.65324 14.6345 11.3807 16.3548 13.5072 16.3508C15.6338 16.3468 17.3553 14.6195 17.3513 12.4925C17.3472 10.3655 15.6194 8.6447 13.4926 8.64889C11.3657 8.65307 9.64505 10.3808 9.64905 12.5075ZM11 12.5048C10.999 12.0104 11.1447 11.5267 11.4186 11.1151C11.6925 10.7034 12.0823 10.3822 12.5387 10.1921C12.9951 10.002 13.4977 9.95146 13.9828 10.047C14.468 10.1425 14.9139 10.3797 15.2642 10.7286C15.6146 11.0775 15.8535 11.5225 15.951 12.0073C16.0484 12.492 15.9999 12.9948 15.8116 13.452C15.6233 13.9092 15.3036 14.3003 14.8931 14.5758C14.4825 14.8513 13.9994 14.9989 13.505 14.9999C13.1767 15.0006 12.8514 14.9366 12.5478 14.8116C12.2443 14.6865 11.9683 14.5029 11.7357 14.2712C11.503 14.0395 11.3183 13.7643 11.1921 13.4612C11.0659 13.1581 11.0006 12.8331 11 12.5048Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_183",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_195)",children:r.jsx("path",{d:"M20.6653 9.12395C20.5749 8.78346 20.3967 8.47271 20.1484 8.22279C19.9001 7.97287 19.5905 7.79258 19.2507 7.69995C18.0033 7.36328 13 7.36328 13 7.36328C13 7.36328 7.99667 7.36328 6.74867 7.69995C6.40894 7.79274 6.09953 7.9731 5.85139 8.223C5.60324 8.4729 5.42506 8.78357 5.33467 9.12395C5 10.3799 5 12.9999 5 12.9999C5 12.9999 5 15.6199 5.33467 16.8759C5.42506 17.2164 5.60332 17.5272 5.85159 17.7771C6.09987 18.027 6.40945 18.2073 6.74933 18.2999C7.99667 18.6366 13 18.6366 13 18.6366C13 18.6366 18.0033 18.6366 19.2513 18.2999C19.5912 18.2074 19.9009 18.0271 20.1491 17.7772C20.3974 17.5273 20.5757 17.2165 20.666 16.8759C21 15.6199 21 12.9999 21 12.9999C21 12.9999 21 10.3799 20.6653 9.12395ZM11.3633 15.3786V10.6213L15.5453 12.9999L11.3633 15.3786Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_195",children:r.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_189)",children:r.jsx("path",{d:"M13.6162 20H13.6119C11.3737 19.985 9.65312 19.2469 8.49687 17.8069C7.46875 16.525 6.9375 14.7413 6.92 12.5063V12.4956C6.93875 10.2587 7.46937 8.47688 8.49812 7.19438C9.65312 5.75312 11.375 5.015 13.6125 5H13.6212C15.3375 5.0125 16.7731 5.45312 17.8875 6.31125C18.9356 7.1175 19.6737 8.2675 20.0806 9.72813L18.8056 10.0837C18.1156 7.60875 16.3694 6.34375 13.6156 6.32437C11.7969 6.33812 10.4219 6.90937 9.52812 8.0225C8.69187 9.065 8.26 10.5712 8.24312 12.5C8.26 14.4288 8.69187 15.935 9.52875 16.9775C10.4225 18.0919 11.7981 18.6638 13.6162 18.6756C15.2556 18.6631 16.34 18.2812 17.2412 17.3975C18.2706 16.3894 18.2525 15.1519 17.9225 14.3988C17.7287 13.955 17.3769 13.5863 16.9012 13.305C16.7812 14.15 16.5125 14.8337 16.0987 15.35C15.545 16.0387 14.7612 16.415 13.7675 16.4688C13.0162 16.5094 12.2919 16.3325 11.7306 15.9681C11.0662 15.5375 10.6775 14.8806 10.6356 14.1156C10.595 13.3719 10.8906 12.6875 11.4669 12.1894C12.0169 11.7144 12.7912 11.435 13.7062 11.3825C14.3368 11.3431 14.9697 11.3729 15.5937 11.4713C15.515 11.0075 15.3594 10.6388 15.125 10.3731C14.8044 10.0069 14.3075 9.82125 13.6506 9.81687H13.6325C13.105 9.81687 12.3875 9.96188 11.9319 10.6419L10.8337 9.90438C11.4462 8.99563 12.4387 8.49437 13.6325 8.49437H13.66C15.6562 8.50688 16.8456 9.72875 16.9644 11.8619C17.0319 11.8906 17.0994 11.9206 17.165 11.9506C18.0962 12.3881 18.7775 13.0513 19.1362 13.8694C19.6344 15.0069 19.6806 16.8631 18.1687 18.3431C17.0125 19.4744 15.61 19.9856 13.6206 19.9994L13.6162 20ZM14.2431 12.6938C14.0919 12.6938 13.9387 12.6981 13.7812 12.7069C12.6337 12.7713 11.9187 13.2981 11.9587 14.0463C12.0006 14.8313 12.8662 15.1956 13.6987 15.1506C14.4637 15.11 15.46 14.8112 15.6275 12.8319C15.1722 12.7369 14.7082 12.6906 14.2431 12.6938Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_189",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),whatsapp:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:r.jsx("path",{d:"M13.601 2.326A10.454 10.454 0 0 0 3.17 12.784c0 1.896.496 3.743 1.442 5.378L3 24l5.968-1.564a10.428 10.428 0 0 0 4.633 1.082c5.76 0 10.44-4.683 10.44-10.446a10.45 10.45 0 0 0-10.44-10.746zm0 17.584c-1.579 0-3.125-.425-4.48-1.228l-.322-.191-3.332.874.887-3.25-.21-.334A8.75 8.75 0 0 1 4.843 12.78c0-4.832 3.93-8.766 8.761-8.766 2.342 0 4.542.912 6.196 2.569 1.654 1.657 2.566 3.86 2.566 6.205 0 4.836-3.931 8.769-8.765 8.769zm4.811-6.577c-.264-.132-1.564-.772-1.807-.86-.242-.088-.419-.132-.596.132-.176.264-.683.86-.838 1.036-.154.176-.309.198-.573.066-1.545-.774-2.73-1.874-3.593-3.32-.11-.186.11-.176.368-.693.088-.176.044-.33-.022-.462-.066-.132-.596-1.436-.816-1.966-.214-.515-.433-.445-.596-.453-.154-.008-.33-.01-.507-.01-.176 0-.463.066-.705.33-.242.264-.925.904-.925 2.204 0 1.3.947 2.556 1.08 2.732.132.176 1.862 2.844 4.512 3.987 1.84.795 2.52.848 3.424.717.925-.134 2.835-1.157 3.232-2.274.396-1.117.396-2.072.275-2.274-.12-.202-.44-.323-.705-.455z",fill:"white"})})]}),tiktok:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:r.jsx("path",{d:"M19.589 6.686a4.793 4.793 0 0 1-3.77-4.245V2h-3.445v13.672a2.896 2.896 0 0 1-2.891 2.89 2.895 2.895 0 0 1-2.892-2.89 2.895 2.895 0 0 1 2.892-2.89 2.87 2.87 0 0 1 1.002.18V9.45a6.335 6.335 0 0 0-1.002-.08 6.336 6.336 0 0 0-6.336 6.336 6.336 6.336 0 0 0 6.336 6.336 6.336 6.336 0 0 0 6.336-6.336V8.514a8.216 8.216 0 0 0 4.768 1.512V6.581a4.819 4.819 0 0 1-.998.105z",fill:"white"})})]})}),Vs="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",$s=[{title:"COMPANY",links:[{label:"About",href:"/about"},{label:"Team",href:"/team"},{label:"Careers",href:"/careers"},{label:"Contact",href:"/contact"}]},{title:"PRODUCT",links:[{label:"For Doctors",href:"/doctors"},{label:"For Businesses",href:"/business"},{label:"For Patients",href:"/patients"},{label:"Homecare",href:"/homecare"}]},{title:"RESOURCES",links:[{label:"Blog",href:"/blog"}]}],Us=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"whatsapp",href:(cn==null?void 0:cn.VITE_WHATSAPP_COMMUNITY_LINK)??"https://medixdeck.com/whatsapp"},{platform:"threads",href:"https://threads.net/@medixdeck"},{platform:"facebook",href:"https://facebook.com/medixdeck"},{platform:"youtube",href:"https://youtube.com/@medixdeck"},{platform:"tiktok",href:"https://tiktok.com/@medixdeck"},{platform:"linkedin",href:"https://linkedin.com/company/medixdeck"}],Gs=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],Ys=(e,t)=>r.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function ci({description:e=Vs,logo:t,sections:n=$s,socialLinks:o=Us,copyright:i,bottomLinks:l=Gs,newsletter:a,renderLink:c=Ys,colorScheme:d="blue",certifications:u,...f}){const h=new Date().getFullYear(),x=i??`© ${h} MedixDeck Health Solutions Ltd. All Rights Reserved.`,[p,b]=U.useState(""),[v,B]=U.useState(!1),[y,S]=U.useState(!1),j=Ws[d],{mounted:C,themeMode:F,toggleThemeMode:w}=St(),D=E=>{E.preventDefault(),a!=null&&a.onSubmit&&p&&(a.onSubmit(p),b(""))};return r.jsx(s.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...f,children:r.jsxs(s.Container,{maxWidth:"7xl",children:[r.jsxs(s.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[r.jsxs(s.Box,{children:[r.jsx(s.Box,{mb:4,children:r.jsx(s.Link,{href:"/",children:t??r.jsx(Ye,{variant:d==="blue"?"blue":"purple",height:28})})}),r.jsx(s.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),r.jsx(s.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const E=qs(j.solid);return o.map(z=>r.jsx(s.Link,{href:z.href,target:"_blank",rel:"noopener noreferrer",display:"inline-flex",transition:"transform 0.2s ease, opacity 0.2s ease",_hover:{transform:"translateY(-2px)",opacity:.9},title:z.platform,"aria-label":z.platform,children:E[z.platform]},z.platform))})()})]}),r.jsx(s.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(E=>r.jsxs(s.Box,{children:[r.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:E.title}),r.jsx(s.VStack,{align:"flex-start",gap:3,children:E.links.map(z=>r.jsx(s.Box,{w:"full",children:c(z,r.jsx(s.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:j.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:z.label}))},z.label))})]},E.title))}),!(a!=null&&a.hide)&&r.jsx(s.Box,{children:r.jsxs(s.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[r.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(a==null?void 0:a.title)??"Newsletter"}),r.jsx(s.Text,{fontSize:"sm",color:"text.body",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(a==null?void 0:a.description)??"Get monthly health tips from our verified specialists."}),r.jsxs(s.Box,{as:"form",onSubmit:D,position:"relative",display:"flex",children:[r.jsx(s.Box,{as:"input",type:"email",value:p,onChange:E=>b(E.target.value),placeholder:(a==null?void 0:a.placeholder)??"email@address.com",required:!0,w:"full",h:"44px",pl:4,pr:"50px",borderRadius:"lg",border:"1px solid",borderColor:"border",bg:"bg.surface",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",_placeholder:{color:"text.body"},_focus:{outline:"none",borderColor:j.token,boxShadow:`0 0 0 1px ${j.solid}`},transition:"all 0.2s"}),r.jsx("button",{type:"submit",style:{position:"absolute",right:"4px",top:"4px",bottom:"4px",width:"36px",height:"36px",padding:0,background:v?j.solidHover:j.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:y?`0 0 0 3px ${j.focusRing}`:"none",transition:"background 0.2s ease, box-shadow 0.2s ease"},onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),onFocus:()=>S(!0),onBlur:()=>S(!1),"aria-label":"Subscribe",children:(a==null?void 0:a.buttonIcon)??r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),r.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:r.jsxs(s.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[r.jsx(s.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:x}),r.jsxs(s.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[l.map(E=>r.jsx(s.Box,{children:c(E,r.jsx(s.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:E.label}))},E.label)),C&&r.jsx(s.Box,{as:"button",onClick:w,display:"inline-flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:"text.body",_hover:{color:"text.heading",bg:"bg"},cursor:"pointer",transition:"all 0.2s","aria-label":"Toggle theme",ml:2,children:F==="dark"?r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"5"}),r.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),r.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),r.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),r.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),r.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),r.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),r.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),r.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})}),u&&u.length>0&&r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:r.jsx(s.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:u.map(E=>{const z=r.jsxs(s.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:E.href?"pointer":"default"},children:[E.imageSrc?r.jsx("img",{src:E.imageSrc,alt:E.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):r.jsx(s.Box,{color:"text.muted",flexShrink:0,children:r.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}),r.jsx(s.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:E.name})]},E.name);return E.href?r.jsx(s.Box,{children:c({href:E.href,isExternal:E.isExternal??!0},z)},E.name):r.jsx(s.Box,{children:z},E.name)})})})]})})}ci.displayName="MedixFooter";const Ks=r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{d:"m9 18 6-6-6-6"})}),Zs=(e,t)=>e.href?r.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):r.jsx(r.Fragment,{children:t}),Xs={blue:{hoverColor:"blue.500"},purple:{hoverColor:"#7700CC"}};function Js({items:e,separator:t=Ks,colorScheme:n="blue",renderLink:o=Zs,...i}){const l=Xs[n];return r.jsx(s.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",...i,children:e.map((a,c)=>{const d=c===e.length-1;return r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[o(a,r.jsx(s.Box,{as:"span",display:"inline-block",lineHeight:"1.2",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:d?"medium":"normal",color:d?"text.heading":"text.muted",_hover:d?void 0:{color:l.hoverColor},cursor:!d&&a.href?"pointer":"default",transition:"color 0.15s",wordBreak:"break-word",whiteSpace:d?"normal":"nowrap",children:a.label})),!d&&r.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},c)})})}const Qs={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}},ec={blue:{activeText:"blue.500",indicator:"blue.500",focusOutline:"blue.500",hoverText:"blue.500",badgeActiveBg:"blue.100",badgeActiveColor:"blue.700"},purple:{activeText:"#7700CC",indicator:"#7700CC",focusOutline:"#7700CC",hoverText:"#7700CC",badgeActiveBg:"#F3E8FF",badgeActiveColor:"#6B21A8"}};function tc({tabs:e,defaultActiveId:t,activeId:n,onChange:o,variant:i="line",size:l="md",renderContent:a=!0,colorScheme:c="blue",haptic:d,disableHaptic:u=!1,...f}){var j;const{trigger:h}=de(),[x,p]=I.default.useState(t??((j=e[0])==null?void 0:j.id)),b=n??x,v=ec[c],B=C=>{C!==b&&!u&&d!==!1&&h(d??"selection"),p(C),o==null||o(C)},y=e.find(C=>C.id===b),S=Qs[l];return r.jsxs(s.Box,{...f,children:[r.jsx(s.Box,{role:"tablist",display:"flex",gap:i==="pill"?"1":"0",borderBottom:i==="line"?"1px solid":"none",border:i==="pill"?"1px solid":"none",borderColor:"border",bg:i==="pill"?"bg.subtle":"transparent",p:i==="pill"?"1":"0",borderRadius:i==="pill"?"full":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(C=>{const F=C.id===b;return r.jsxs(s.Box,{role:"tab","aria-selected":F,"aria-disabled":C.disabled,tabIndex:C.disabled?-1:0,onClick:()=>!C.disabled&&B(C.id),onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&!C.disabled&&B(C.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:i==="pill"?"4":S.px,py:i==="pill"?"3":S.py,fontFamily:"var(--font-body)",fontWeight:F?"semibold":"medium",fontSize:i==="pill"?"sm":S.fontSize,color:C.disabled?"text.muted":i==="pill"?F?"text.heading":"text.body":F?v.activeText:"text.body",cursor:C.disabled?"not-allowed":"pointer",opacity:C.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:i==="pill"?"1":void 0,flexShrink:i==="pill"?1:0,bg:i==="pill"?F?"bg":"bg.surface":"transparent",borderRadius:i==="pill"?"full":"none",boxShadow:"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?F?v.indicator:"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:C.disabled?void 0:i==="line"?{color:v.hoverText}:{bg:F?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:v.focusOutline,outlineOffset:"2px",borderRadius:i==="pill"?"full":"sm"},children:[r.jsx(s.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:C.label}),C.badge!==void 0&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:i==="pill"?F?"bg.subtle":"bg":F?v.badgeActiveBg:"bg.subtle",color:i==="pill"?F?"text.heading":"text.muted":F?v.badgeActiveColor:"text.muted",children:C.badge})]},C.id)})}),a&&(y==null?void 0:y.content)&&r.jsx(s.Box,{role:"tabpanel",mt:"4",children:y.content})]})}const nc={blue:{activeBg:"blue.500",activeColor:"white",inactiveBg:"blue.100",inactiveColor:"blue.500",inactiveBgDark:"rgba(6, 133, 255, 0.12)",inactiveColorDark:"blue.200",hoverBg:"blue.200",hoverBgDark:"rgba(6, 133, 255, 0.2)",navHoverColor:"blue.500"},purple:{activeBg:"#7700CC",activeColor:"white",inactiveBg:"#F3E8FF",inactiveColor:"#7700CC",inactiveBgDark:"rgba(119, 0, 204, 0.18)",inactiveColorDark:"#D8B4FE",hoverBg:"#E9D5FF",hoverBgDark:"rgba(119, 0, 204, 0.28)",navHoverColor:"#7700CC"}};function rc(e,t,n){if(n*2+5>=t)return Array.from({length:t},(d,u)=>u+1);const i=Math.max(e-n,1),l=Math.min(e+n,t),a=i>2,c=l<t-2;if(!a&&c){const d=3+2*n;return[...Array.from({length:d},(u,f)=>f+1),"...",t]}if(a&&!c){const d=3+2*n;return[1,"...",...Array.from({length:d},(u,f)=>t-d+1+f)]}return[1,"...",...Array.from({length:l-i+1},(d,u)=>i+u),"...",t]}function ui({total:e,pageSize:t=10,currentPage:n=1,onChange:o,siblingCount:i=1,showEdges:l=!0,compact:a=!1,colorScheme:c="blue",haptic:d,disableHaptic:u=!1,...f}){const{trigger:h}=de(),x=Math.ceil(e/t),p=nc[c];if(x<=1)return null;const b=rc(n,x,i),v=C=>{C===n||C<1||C>x||(!u&&d!==!1&&h(d??"selection"),o==null||o(C))},B={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"semibold",cursor:"pointer",transition:"all 0.15s",border:"none",userSelect:"none"},y=({children:C,disabled:F,onClick:w,label:D,icon:E,isNext:z})=>r.jsxs(s.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"1.5",h:"8",px:"2",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",userSelect:"none",border:"none",bg:"transparent",color:"text.muted",opacity:F?.4:1,pointerEvents:F?"none":void 0,onClick:w,"aria-label":D,_hover:{color:p.navHoverColor},children:[!z&&E&&r.jsx(s.Box,{as:"span",display:"flex",alignItems:"center",children:E}),C,z&&E&&r.jsx(s.Box,{as:"span",display:"flex",alignItems:"center",children:E})]}),S=r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M15 18l-6-6 6-6"})}),j=r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M9 18l6-6-6-6"})});return r.jsxs(s.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...f,children:[l&&r.jsx(y,{disabled:n===1,onClick:()=>v(1),label:"First page",icon:S,children:"First"}),r.jsx(y,{disabled:n===1,onClick:()=>v(n-1),label:"Previous page",icon:S,children:"Prev"}),!a&&b.map((C,F)=>C==="..."?r.jsx(s.Box,{...B,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${F}`):r.jsx(s.Box,{as:"button",...B,bg:n===C?p.activeBg:p.inactiveBg,color:n===C?p.activeColor:p.inactiveColor,_dark:{bg:n===C?p.activeBg:p.inactiveBgDark,color:n===C?p.activeColor:p.inactiveColorDark},onClick:()=>v(C),"aria-label":`Page ${C}`,"aria-current":n===C?"page":void 0,_hover:n!==C?{bg:p.hoverBg,_dark:{bg:p.hoverBgDark}}:void 0,children:C},C)),a&&r.jsxs(s.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",x]}),r.jsx(y,{disabled:n===x,onClick:()=>v(n+1),label:"Next page",icon:j,isNext:!0,children:"Next"}),l&&r.jsx(y,{disabled:n===x,onClick:()=>v(x),label:"Last page",icon:j,isNext:!0,children:"Last"})]})}const Dr=r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:r.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function oc({steps:e,currentStep:t,maxSelectableStep:n=t,onStepClick:o,variant:i="default",orientation:l="horizontal",colorScheme:a="blue",...c}){const d=a==="blue"?"#0685FF":"#7700CC",u=a==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)",f=l==="vertical",h=(x,p)=>!o||p>n?{}:{role:"button",tabIndex:0,"aria-label":x.title,cursor:"pointer",_focusVisible:{outline:"2px solid",outlineColor:d,outlineOffset:"2px"},onClick:()=>o(p),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),b.repeat||o(p))}};return f?r.jsx(s.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...c,children:e.map((x,p)=>{const b=p+1<t,v=p+1===t,B=p===e.length-1,y=b||v?d:"var(--chakra-colors-border, #E2E8F0)";return r.jsxs(s.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3","aria-current":o&&v?"step":void 0,...h(x,p+1),children:[r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:b||v?d:"bg.subtle",border:"2px solid",borderColor:y,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:b?Dr:x.icon??p+1}),!B&&r.jsx(s.Box,{w:"2px",flex:"1",minH:"8",bg:b?d:"border",my:"1",transition:"background 0.25s"})]}),i!=="compact"&&r.jsxs(s.Box,{pt:"1",pb:B?"0":"8",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:v?"semibold":"medium",color:b||v?d:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:x.title}),x.description&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:x.description})]})]},x.id)})}):r.jsx(s.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...c,children:e.map((x,p)=>{const b=p+1<t,v=p+1===t,B=p+1>t,y=p===e.length-1,S=B?"bg.subtle":d,j=b?Dr:x.icon?x.icon:r.jsx(s.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:B?"text.muted":"white",lineHeight:"1",children:p+1}),C=!B&&i!=="compact",F=B?"text.muted":d;return r.jsxs(I.default.Fragment,{children:[r.jsx(s.Box,{role:"listitem","aria-current":v?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:C?"2":"0",py:C?"1.5":"0",bg:C?u:"transparent",borderRadius:"full",transition:"all 0.25s ease",...h(x,p+1),children:[r.jsx(s.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:S,border:B?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:j}),i!=="compact"&&r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:v||b?"semibold":"medium",fontFamily:"var(--font-body)",color:F,whiteSpace:"nowrap",transition:"color 0.25s",children:x.title})]})}),!y&&r.jsx(s.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:r.jsx(s.Box,{h:"1.5px",w:"10",bg:b?d:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},x.id)})})}const ic=`
366
366
  @keyframes medix-shimmer {
367
367
  0% { transform: translateX(-100%); }
368
368
  100% { transform: translateX(100%); }
@@ -372,7 +372,7 @@
372
372
  0% { left: -40%; }
373
373
  100% { left: 100%; }
374
374
  }
375
- `,document.head.appendChild(t)}}const fi=I.default.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:o=!1,animated:i=!0,isIndeterminate:l=!1,...a},c)=>{const f=Math.min(100,Math.max(0,e)),u=ac[t],d=sc[n];return r.jsxs(s.Box,{ref:c,w:"100%",...a,children:[o&&r.jsxs(s.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx("span",{children:"Progress"}),r.jsxs("span",{children:[f,"%"]})]}),r.jsx(s.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:l?r.jsx(s.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):r.jsx(s.Box,{h:"100%",w:`${f}%`,bg:u,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});fi.displayName="MedixProgress";const cc={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};let Ar=!1;function uc(){if(typeof document>"u"||Ar)return;const e=document.createElement("style");e.textContent=`
375
+ `,document.head.appendChild(t)}}const fi=I.default.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:o=!1,animated:i=!0,isIndeterminate:l=!1,...a},c)=>{const d=Math.min(100,Math.max(0,e)),u=ac[t],f=sc[n];return r.jsxs(s.Box,{ref:c,w:"100%",...a,children:[o&&r.jsxs(s.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx("span",{children:"Progress"}),r.jsxs("span",{children:[d,"%"]})]}),r.jsx(s.Box,{w:"100%",h:f,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:l?r.jsx(s.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):r.jsx(s.Box,{h:"100%",w:`${d}%`,bg:u,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});fi.displayName="MedixProgress";const cc={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};let Ar=!1;function uc(){if(typeof document>"u"||Ar)return;const e=document.createElement("style");e.textContent=`
376
376
  @keyframes medixBottomSheetIn {
377
377
  from { transform: translateY(100%); }
378
378
  to { transform: translateY(0); }
@@ -381,10 +381,10 @@
381
381
  from { transform: translateY(0); }
382
382
  to { transform: translateY(100%); }
383
383
  }
384
- `,document.head.appendChild(e),Ar=!0}function dc({isOpen:e,onClose:t,title:n,description:o,size:i="md",closeOnOverlayClick:l=!0,closeOnEscape:a=!0,footer:c,children:f,mobileVariant:u="bottom-sheet",haptic:d,disableHaptic:p=!1}){const{trigger:x}=de(),h=!!(n||o);I.default.useEffect(()=>{uc()},[]);const b=u==="bottom-sheet";return r.jsxs(s.DialogRoot,{open:e,onOpenChange:v=>{v.open||(!p&&d!==!1&&x(d??"impactLight"),t())},closeOnInteractOutside:l,closeOnEscape:a,size:cc[i],children:[r.jsx(s.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),r.jsx(s.DialogPositioner,{display:"flex",alignItems:b?{base:"flex-end",md:"center"}:"center",justifyContent:"center",p:b?{base:"0",md:"4"}:{base:"4",md:"6"},children:r.jsxs(s.DialogContent,{display:"flex",flexDirection:"column",overflow:"hidden",bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",borderRadius:{base:b?"none":"modal",md:"modal"},w:{base:b?"full":void 0,md:void 0},borderTopRadius:b?{base:"modal",md:"modal"}:"modal",maxH:b?{base:"calc(100dvh - env(safe-area-inset-top, 0px) - 0.5rem)",md:"calc(100dvh - 3rem)"}:{base:"calc(100dvh - 2rem)",md:"calc(100dvh - 3rem)"},style:b?{"--bottom-sheet-animation":e?"medixBottomSheetIn 0.35s cubic-bezier(0.32,0.72,0,1) both":void 0}:void 0,children:[r.jsxs(s.DialogHeader,{flexShrink:0,borderBottom:h?"1px solid":"none",borderColor:"border",px:"6",py:"4",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",position:"relative",minH:h?void 0:"12",children:[b&&r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:10,left:"50%",transform:"translateX(-50%)",width:36,height:4,borderRadius:2,background:"var(--chakra-colors-border, #E2E8F0)",display:"none"},className:"medix-bs-handle"}),h&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&r.jsx(s.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),o&&r.jsx(s.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o})]}),r.jsx(s.DialogCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s","aria-label":"Close modal",type:"button",cursor:"pointer",children:r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),r.jsx(s.DialogBody,{px:"6",py:"5",flex:"1",minH:"0",overflowY:"auto",style:{overscrollBehavior:"contain",WebkitOverflowScrolling:"touch"},children:f}),c&&r.jsx(s.DialogFooter,{flexShrink:0,borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",marginY:"1rem",style:b?{paddingBottom:"max(env(safe-area-inset-bottom, 16px), 16px)"}:void 0,children:c})]})})]})}function fc({icon:e,title:t,description:n,actionLabel:o,onAction:i,secondaryLabel:l,onSecondaryAction:a,...c}){return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...c,children:[e&&r.jsx(s.Box,{w:"16",h:"16",borderRadius:"full",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"3xl",color:"text.muted",mb:"2",children:e}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&r.jsx(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(o||l)&&r.jsxs(s.Box,{display:"flex",gap:"3",mt:"2",children:[o&&r.jsx(Se,{variant:"solid",colorScheme:"blue",onClick:i,children:o}),l&&r.jsx(Se,{variant:"ghost",colorScheme:"blue",onClick:a,children:l})]})]})}function pc({title:e="Page Not Found",description:t="The page you are looking for doesn't exist or has been moved.",errorMessage:n,actionLabel:o="Go back home",onAction:i,secondaryLabel:l,onSecondaryAction:a,colorScheme:c="blue",...f}){return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...f,children:[r.jsx(s.Box,{fontSize:"8xl",fontWeight:"bold",color:c==="blue"?"blue.500":"purple.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),r.jsx(s.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),r.jsx(s.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&r.jsx(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),r.jsxs(s.Box,{display:"flex",gap:"4",children:[o&&r.jsx(Se,{variant:"solid",colorScheme:c,onClick:i,children:o}),l&&r.jsx(Se,{variant:"outline",colorScheme:c,onClick:a,children:l})]})]})}function hc({title:e="Something went wrong",description:t="An unexpected error occurred on our end. Please try again later.",errorMessage:n,actionLabel:o="Try again",onAction:i,secondaryLabel:l,onSecondaryAction:a,colorScheme:c="blue",...f}){return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...f,children:[r.jsx(s.Box,{w:"20",h:"20",borderRadius:"full",bg:"red.50",_dark:{bg:"rgba(220, 38, 38, 0.1)"},display:"flex",alignItems:"center",justifyContent:"center",color:"red.500",mb:"6",children:r.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),r.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),r.jsx(s.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),r.jsx(s.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&r.jsx(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),r.jsxs(s.Box,{display:"flex",gap:"4",children:[o&&r.jsx(Se,{variant:"solid",colorScheme:c,onClick:i,children:o}),l&&r.jsx(Se,{variant:"outline",colorScheme:c,onClick:a,children:l})]})]})}const xc={left:"start",right:"end",top:"top",bottom:"bottom"};function gc({isOpen:e,onClose:t,title:n,placement:o="right",size:i="md",closeOnOverlayClick:l=!0,closeOnEscape:a=!0,footer:c,children:f,haptic:u,disableHaptic:d=!1}){const{trigger:p}=de(),x=xc[o]??"end";return r.jsxs(s.DrawerRoot,{open:e,onOpenChange:h=>{h.open||(!d&&u!==!1&&p(u??"impactLight"),t())},placement:x,size:i,closeOnInteractOutside:l,closeOnEscape:a,children:[r.jsx(s.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),r.jsx(s.DrawerPositioner,{children:r.jsxs(s.DrawerContent,{display:"flex",flexDirection:"column",overflow:"hidden",bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",maxH:"100dvh",h:x==="start"||x==="end"?"100dvh":void 0,children:[r.jsxs(s.DrawerHeader,{flexShrink:0,borderBottom:n?"1px solid":"none",borderColor:"border",px:"6",py:"4",position:"relative",minH:n?void 0:"12",children:[n&&r.jsx(s.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",pr:"8",children:n}),r.jsx(s.DrawerCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s","aria-label":"Close drawer",type:"button",cursor:"pointer",children:r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),r.jsx(s.DrawerBody,{px:"6",py:"5",flex:"1",minH:"0",overflowY:"auto",style:{overscrollBehavior:"contain",WebkitOverflowScrolling:"touch"},children:f}),c&&r.jsx(s.DrawerFooter,{flexShrink:0,borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",style:x==="bottom"?{paddingBottom:"max(env(safe-area-inset-bottom, 16px), 16px)"}:void 0,children:c})]})})]})}/*! js-cookie v3.0.5 | MIT */function Rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var mc={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ln(e,t){function n(i,l,a){if(!(typeof document>"u")){a=Rt({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var f in a)a[f]&&(c+="; "+f,a[f]!==!0&&(c+="="+a[f].split(";")[0]));return document.cookie=i+"="+e.write(l,i)+c}}function o(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var l=document.cookie?document.cookie.split("; "):[],a={},c=0;c<l.length;c++){var f=l[c].split("="),u=f.slice(1).join("=");try{var d=decodeURIComponent(f[0]);if(a[d]=e.read(u,d),i===d)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:o,remove:function(i,l){n(i,"",Rt({},l,{expires:-1}))},withAttributes:function(i){return Ln(this.converter,Rt({},this.attributes,i))},withConverter:function(i){return Ln(Rt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Vt=Ln(mc,{path:"/"});const bc=({condition:e,wrapper:t,children:n})=>e?t(n):n,In={TOP:"top",BOTTOM:"bottom"};var er=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(er||{});const Tn={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},pi="CookieConsent",yc=({children:e,...t})=>I.default.createElement("button",{...t},e),vt={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:In.BOTTOM,visible:Tn.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:pi,cookieValue:"true",declineCookieValue:"false",setDeclineCookie:!0,buttonText:"I understand",declineButtonText:"I decline",debug:!1,expires:365,containerClasses:"CookieConsent",contentClasses:"",buttonClasses:"",buttonWrapperClasses:"",declineButtonClasses:"",buttonId:"rcc-confirm-button",declineButtonId:"rcc-decline-button",extraCookieOptions:{},disableButtonStyles:!1,enableDeclineButton:!1,flipButtons:!1,sameSite:er.LAX,ButtonComponent:yc,overlay:!1,overlayClasses:"",onOverlayClick:()=>{},acceptOnOverlayClick:!1,ariaAcceptLabel:"Accept cookies",ariaDeclineLabel:"Decline cookies",acceptOnScroll:!1,acceptOnScrollPercentage:25,customContentAttributes:{},customContainerAttributes:{},customButtonProps:{},customDeclineButtonProps:{},customButtonWrapperAttributes:{},style:{},buttonStyle:{},declineButtonStyle:{},contentStyle:{},overlayStyle:{}},vc={visible:!1,style:{alignItems:"baseline",background:"#353535",color:"white",display:"flex",flexWrap:"wrap",justifyContent:"space-between",left:"0",position:"fixed",width:"100%",zIndex:"999"},buttonStyle:{background:"#ffd42d",border:"0",borderRadius:"0px",boxShadow:"none",color:"black",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},declineButtonStyle:{background:"#c12a2a",border:"0",borderRadius:"0px",boxShadow:"none",color:"#e5e5e5",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},contentStyle:{flex:"1 0 300px",margin:"15px"},overlayStyle:{position:"fixed",left:0,top:0,width:"100%",height:"100%",zIndex:"999",backgroundColor:"rgba(0,0,0,0.3)"}},kc=(e=pi)=>{const t=Vt.get(e);return t===void 0?Vt.get(hi(e)):t},hi=e=>`${e}-legacy`,xi=class extends U.Component{constructor(){super(...arguments),this.state=vc,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...vt,...this.props},n=document.documentElement,o=document.body,i="scrollTop",l="scrollHeight";(n[i]||o[i])/((n[l]||o[l])-n.clientHeight)*100>t&&this.accept(!0)},this.removeScrollListener=()=>{const{acceptOnScroll:t}=this.props;t&&globalThis.removeEventListener("scroll",this.handleScroll)}}componentDidMount(){const{debug:t}=this.props;(this.getCookieValue()===void 0||t)&&(this.setState({visible:!0}),this.props.acceptOnScroll&&globalThis.addEventListener("scroll",this.handleScroll,{passive:!0}))}componentWillUnmount(){this.removeScrollListener()}accept(t=!1){const{cookieName:n,cookieValue:o,hideOnAccept:i,onAccept:l}={...vt,...this.props};this.setCookie(n,o),l(t??!1),i&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...vt,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:o,onDecline:i,setDeclineCookie:l}={...vt,...this.props};l&&this.setCookie(t,n),i(),o&&this.setState({visible:!1})}setCookie(t,n){const{extraCookieOptions:o,expires:i,sameSite:l}=this.props;let{cookieSecurity:a}=this.props;a===void 0&&(a=globalThis.location?globalThis.location.protocol==="https:":!0);const c={expires:i,...o,sameSite:l,secure:a};l===er.NONE&&Vt.set(hi(t),n,c),Vt.set(t,n,c)}getCookieValue(){const{cookieName:t}=this.props;return kc(t)}render(){switch(this.props.visible){case Tn.HIDDEN:return null;case Tn.BY_COOKIE_VALUE:if(!this.state.visible)return null;break}const{location:t,style:n,buttonStyle:o,declineButtonStyle:i,contentStyle:l,disableStyles:a,buttonText:c,declineButtonText:f,containerClasses:u,contentClasses:d,buttonClasses:p,buttonWrapperClasses:x,declineButtonClasses:h,buttonId:b,declineButtonId:v,disableButtonStyles:F,enableDeclineButton:y,flipButtons:j,ButtonComponent:C,overlay:S,overlayClasses:B,overlayStyle:w,ariaAcceptLabel:D,ariaDeclineLabel:E,customContainerAttributes:A,customContentAttributes:M,customButtonProps:z,customDeclineButtonProps:T,customButtonWrapperAttributes:W}=this.props;let R={},k={},P={},V={},Q={};switch(a?(R=Object.assign({},n),k=Object.assign({},o),P=Object.assign({},i),V=Object.assign({},l),Q=Object.assign({},w)):(R=Object.assign({},{...this.state.style,...n}),V=Object.assign({},{...this.state.contentStyle,...l}),Q=Object.assign({},{...this.state.overlayStyle,...w}),F?(k=Object.assign({},o),P=Object.assign({},i)):(k=Object.assign({},{...this.state.buttonStyle,...o}),P=Object.assign({},{...this.state.declineButtonStyle,...i}))),t){case In.TOP:R.top="0";break;case In.BOTTOM:R.bottom="0";break}const X=[];return y&&X.push(I.default.createElement(C,{key:"declineButton",style:P,className:h,id:v,"aria-label":E,onClick:()=>{this.decline()},...T},f)),X.push(I.default.createElement(C,{key:"acceptButton",style:k,className:p,id:b,"aria-label":D,onClick:()=>{this.accept()},...z},c)),j&&X.reverse(),I.default.createElement(bc,{condition:S,wrapper:g=>I.default.createElement("div",{style:Q,className:B,onClick:()=>{this.overlayClick()},onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},g)},I.default.createElement("div",{className:`${u}`,style:R,...A},I.default.createElement("div",{style:V,className:d,...M},this.props.children),I.default.createElement("div",{className:`${x}`,...W},X.map(g=>g))))}};xi.defaultProps=vt;let wc=xi;function gi({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:o=!0,children:i,...l}){const a=Un(),c=a?"#152035":"#F6F6F6",f=a?"#ABC0D6":"#3D4F63",u=a?"#1E3050":"#E4E8F0";return r.jsxs(r.Fragment,{children:[r.jsx("style",{children:`
384
+ `,document.head.appendChild(e),Ar=!0}function dc({isOpen:e,onClose:t,title:n,description:o,size:i="md",closeOnOverlayClick:l=!0,closeOnEscape:a=!0,footer:c,children:d,mobileVariant:u="bottom-sheet",haptic:f,disableHaptic:h=!1}){const{trigger:x}=de(),p=!!(n||o);I.default.useEffect(()=>{uc()},[]);const b=u==="bottom-sheet";return r.jsxs(s.DialogRoot,{open:e,onOpenChange:v=>{v.open||(!h&&f!==!1&&x(f??"impactLight"),t())},closeOnInteractOutside:l,closeOnEscape:a,size:cc[i],children:[r.jsx(s.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),r.jsx(s.DialogPositioner,{display:"flex",alignItems:b?{base:"flex-end",md:"center"}:"center",justifyContent:"center",p:b?{base:"0",md:"4"}:{base:"4",md:"6"},children:r.jsxs(s.DialogContent,{display:"flex",flexDirection:"column",overflow:"hidden",bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",borderRadius:{base:b?"none":"modal",md:"modal"},w:{base:b?"full":void 0,md:void 0},borderTopRadius:b?{base:"modal",md:"modal"}:"modal",maxH:b?{base:"calc(100dvh - env(safe-area-inset-top, 0px) - 0.5rem)",md:"calc(100dvh - 3rem)"}:{base:"calc(100dvh - 2rem)",md:"calc(100dvh - 3rem)"},style:b?{"--bottom-sheet-animation":e?"medixBottomSheetIn 0.35s cubic-bezier(0.32,0.72,0,1) both":void 0}:void 0,children:[r.jsxs(s.DialogHeader,{flexShrink:0,borderBottom:p?"1px solid":"none",borderColor:"border",px:"6",py:"4",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",position:"relative",minH:p?void 0:"12",children:[b&&r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:10,left:"50%",transform:"translateX(-50%)",width:36,height:4,borderRadius:2,background:"var(--chakra-colors-border, #E2E8F0)",display:"none"},className:"medix-bs-handle"}),p&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&r.jsx(s.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),o&&r.jsx(s.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o})]}),r.jsx(s.DialogCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s","aria-label":"Close modal",type:"button",cursor:"pointer",children:r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),r.jsx(s.DialogBody,{px:"6",py:"5",flex:"1",minH:"0",overflowY:"auto",style:{overscrollBehavior:"contain",WebkitOverflowScrolling:"touch"},children:d}),c&&r.jsx(s.DialogFooter,{flexShrink:0,borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",marginY:"1rem",style:b?{paddingBottom:"max(env(safe-area-inset-bottom, 16px), 16px)"}:void 0,children:c})]})})]})}function fc({icon:e,title:t,description:n,actionLabel:o,onAction:i,secondaryLabel:l,onSecondaryAction:a,...c}){return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...c,children:[e&&r.jsx(s.Box,{w:"16",h:"16",borderRadius:"full",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"3xl",color:"text.muted",mb:"2",children:e}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&r.jsx(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(o||l)&&r.jsxs(s.Box,{display:"flex",gap:"3",mt:"2",children:[o&&r.jsx(Be,{variant:"solid",colorScheme:"blue",onClick:i,children:o}),l&&r.jsx(Be,{variant:"ghost",colorScheme:"blue",onClick:a,children:l})]})]})}function pc({title:e="Page Not Found",description:t="The page you are looking for doesn't exist or has been moved.",errorMessage:n,actionLabel:o="Go back home",onAction:i,secondaryLabel:l,onSecondaryAction:a,colorScheme:c="blue",...d}){return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...d,children:[r.jsx(s.Box,{fontSize:"8xl",fontWeight:"bold",color:c==="blue"?"blue.500":"purple.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),r.jsx(s.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),r.jsx(s.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&r.jsx(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),r.jsxs(s.Box,{display:"flex",gap:"4",children:[o&&r.jsx(Be,{variant:"solid",colorScheme:c,onClick:i,children:o}),l&&r.jsx(Be,{variant:"outline",colorScheme:c,onClick:a,children:l})]})]})}function hc({title:e="Something went wrong",description:t="An unexpected error occurred on our end. Please try again later.",errorMessage:n,actionLabel:o="Try again",onAction:i,secondaryLabel:l,onSecondaryAction:a,colorScheme:c="blue",...d}){return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...d,children:[r.jsx(s.Box,{w:"20",h:"20",borderRadius:"full",bg:"red.50",_dark:{bg:"rgba(220, 38, 38, 0.1)"},display:"flex",alignItems:"center",justifyContent:"center",color:"red.500",mb:"6",children:r.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),r.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),r.jsx(s.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),r.jsx(s.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&r.jsx(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),r.jsxs(s.Box,{display:"flex",gap:"4",children:[o&&r.jsx(Be,{variant:"solid",colorScheme:c,onClick:i,children:o}),l&&r.jsx(Be,{variant:"outline",colorScheme:c,onClick:a,children:l})]})]})}const xc={left:"start",right:"end",top:"top",bottom:"bottom"};function gc({isOpen:e,onClose:t,title:n,placement:o="right",size:i="md",closeOnOverlayClick:l=!0,closeOnEscape:a=!0,footer:c,children:d,haptic:u,disableHaptic:f=!1}){const{trigger:h}=de(),x=xc[o]??"end";return r.jsxs(s.DrawerRoot,{open:e,onOpenChange:p=>{p.open||(!f&&u!==!1&&h(u??"impactLight"),t())},placement:x,size:i,closeOnInteractOutside:l,closeOnEscape:a,children:[r.jsx(s.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),r.jsx(s.DrawerPositioner,{children:r.jsxs(s.DrawerContent,{display:"flex",flexDirection:"column",overflow:"hidden",bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",maxH:"100dvh",h:x==="start"||x==="end"?"100dvh":void 0,children:[r.jsxs(s.DrawerHeader,{flexShrink:0,borderBottom:n?"1px solid":"none",borderColor:"border",px:"6",py:"4",position:"relative",minH:n?void 0:"12",children:[n&&r.jsx(s.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",pr:"8",children:n}),r.jsx(s.DrawerCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s","aria-label":"Close drawer",type:"button",cursor:"pointer",children:r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),r.jsx(s.DrawerBody,{px:"6",py:"5",flex:"1",minH:"0",overflowY:"auto",style:{overscrollBehavior:"contain",WebkitOverflowScrolling:"touch"},children:d}),c&&r.jsx(s.DrawerFooter,{flexShrink:0,borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",style:x==="bottom"?{paddingBottom:"max(env(safe-area-inset-bottom, 16px), 16px)"}:void 0,children:c})]})})]})}/*! js-cookie v3.0.5 | MIT */function Rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var mc={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ln(e,t){function n(i,l,a){if(!(typeof document>"u")){a=Rt({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var d in a)a[d]&&(c+="; "+d,a[d]!==!0&&(c+="="+a[d].split(";")[0]));return document.cookie=i+"="+e.write(l,i)+c}}function o(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var l=document.cookie?document.cookie.split("; "):[],a={},c=0;c<l.length;c++){var d=l[c].split("="),u=d.slice(1).join("=");try{var f=decodeURIComponent(d[0]);if(a[f]=e.read(u,f),i===f)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:o,remove:function(i,l){n(i,"",Rt({},l,{expires:-1}))},withAttributes:function(i){return Ln(this.converter,Rt({},this.attributes,i))},withConverter:function(i){return Ln(Rt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Vt=Ln(mc,{path:"/"});const bc=({condition:e,wrapper:t,children:n})=>e?t(n):n,In={TOP:"top",BOTTOM:"bottom"};var er=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(er||{});const Tn={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},pi="CookieConsent",yc=({children:e,...t})=>I.default.createElement("button",{...t},e),vt={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:In.BOTTOM,visible:Tn.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:pi,cookieValue:"true",declineCookieValue:"false",setDeclineCookie:!0,buttonText:"I understand",declineButtonText:"I decline",debug:!1,expires:365,containerClasses:"CookieConsent",contentClasses:"",buttonClasses:"",buttonWrapperClasses:"",declineButtonClasses:"",buttonId:"rcc-confirm-button",declineButtonId:"rcc-decline-button",extraCookieOptions:{},disableButtonStyles:!1,enableDeclineButton:!1,flipButtons:!1,sameSite:er.LAX,ButtonComponent:yc,overlay:!1,overlayClasses:"",onOverlayClick:()=>{},acceptOnOverlayClick:!1,ariaAcceptLabel:"Accept cookies",ariaDeclineLabel:"Decline cookies",acceptOnScroll:!1,acceptOnScrollPercentage:25,customContentAttributes:{},customContainerAttributes:{},customButtonProps:{},customDeclineButtonProps:{},customButtonWrapperAttributes:{},style:{},buttonStyle:{},declineButtonStyle:{},contentStyle:{},overlayStyle:{}},vc={visible:!1,style:{alignItems:"baseline",background:"#353535",color:"white",display:"flex",flexWrap:"wrap",justifyContent:"space-between",left:"0",position:"fixed",width:"100%",zIndex:"999"},buttonStyle:{background:"#ffd42d",border:"0",borderRadius:"0px",boxShadow:"none",color:"black",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},declineButtonStyle:{background:"#c12a2a",border:"0",borderRadius:"0px",boxShadow:"none",color:"#e5e5e5",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},contentStyle:{flex:"1 0 300px",margin:"15px"},overlayStyle:{position:"fixed",left:0,top:0,width:"100%",height:"100%",zIndex:"999",backgroundColor:"rgba(0,0,0,0.3)"}},kc=(e=pi)=>{const t=Vt.get(e);return t===void 0?Vt.get(hi(e)):t},hi=e=>`${e}-legacy`,xi=class extends U.Component{constructor(){super(...arguments),this.state=vc,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...vt,...this.props},n=document.documentElement,o=document.body,i="scrollTop",l="scrollHeight";(n[i]||o[i])/((n[l]||o[l])-n.clientHeight)*100>t&&this.accept(!0)},this.removeScrollListener=()=>{const{acceptOnScroll:t}=this.props;t&&globalThis.removeEventListener("scroll",this.handleScroll)}}componentDidMount(){const{debug:t}=this.props;(this.getCookieValue()===void 0||t)&&(this.setState({visible:!0}),this.props.acceptOnScroll&&globalThis.addEventListener("scroll",this.handleScroll,{passive:!0}))}componentWillUnmount(){this.removeScrollListener()}accept(t=!1){const{cookieName:n,cookieValue:o,hideOnAccept:i,onAccept:l}={...vt,...this.props};this.setCookie(n,o),l(t??!1),i&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...vt,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:o,onDecline:i,setDeclineCookie:l}={...vt,...this.props};l&&this.setCookie(t,n),i(),o&&this.setState({visible:!1})}setCookie(t,n){const{extraCookieOptions:o,expires:i,sameSite:l}=this.props;let{cookieSecurity:a}=this.props;a===void 0&&(a=globalThis.location?globalThis.location.protocol==="https:":!0);const c={expires:i,...o,sameSite:l,secure:a};l===er.NONE&&Vt.set(hi(t),n,c),Vt.set(t,n,c)}getCookieValue(){const{cookieName:t}=this.props;return kc(t)}render(){switch(this.props.visible){case Tn.HIDDEN:return null;case Tn.BY_COOKIE_VALUE:if(!this.state.visible)return null;break}const{location:t,style:n,buttonStyle:o,declineButtonStyle:i,contentStyle:l,disableStyles:a,buttonText:c,declineButtonText:d,containerClasses:u,contentClasses:f,buttonClasses:h,buttonWrapperClasses:x,declineButtonClasses:p,buttonId:b,declineButtonId:v,disableButtonStyles:B,enableDeclineButton:y,flipButtons:S,ButtonComponent:j,overlay:C,overlayClasses:F,overlayStyle:w,ariaAcceptLabel:D,ariaDeclineLabel:E,customContainerAttributes:z,customContentAttributes:N,customButtonProps:R,customDeclineButtonProps:T,customButtonWrapperAttributes:q}=this.props;let M={},k={},P={},$={},Q={};switch(a?(M=Object.assign({},n),k=Object.assign({},o),P=Object.assign({},i),$=Object.assign({},l),Q=Object.assign({},w)):(M=Object.assign({},{...this.state.style,...n}),$=Object.assign({},{...this.state.contentStyle,...l}),Q=Object.assign({},{...this.state.overlayStyle,...w}),B?(k=Object.assign({},o),P=Object.assign({},i)):(k=Object.assign({},{...this.state.buttonStyle,...o}),P=Object.assign({},{...this.state.declineButtonStyle,...i}))),t){case In.TOP:M.top="0";break;case In.BOTTOM:M.bottom="0";break}const J=[];return y&&J.push(I.default.createElement(j,{key:"declineButton",style:P,className:p,id:v,"aria-label":E,onClick:()=>{this.decline()},...T},d)),J.push(I.default.createElement(j,{key:"acceptButton",style:k,className:h,id:b,"aria-label":D,onClick:()=>{this.accept()},...R},c)),S&&J.reverse(),I.default.createElement(bc,{condition:C,wrapper:g=>I.default.createElement("div",{style:Q,className:F,onClick:()=>{this.overlayClick()},onKeyDown:H=>{(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},g)},I.default.createElement("div",{className:`${u}`,style:M,...z},I.default.createElement("div",{style:$,className:f,...N},this.props.children),I.default.createElement("div",{className:`${x}`,...q},J.map(g=>g))))}};xi.defaultProps=vt;let wc=xi;function gi({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:o=!0,children:i,...l}){const a=Un(),c=a?"#152035":"#F6F6F6",d=a?"#ABC0D6":"#3D4F63",u=a?"#1E3050":"#E4E8F0";return r.jsxs(r.Fragment,{children:[r.jsx("style",{children:`
385
385
  .medixdeck-cookie-banner {
386
386
  background-color: ${c} !important;
387
- color: ${f} !important;
387
+ color: ${d} !important;
388
388
  border-top: 1px solid ${u} !important;
389
389
  padding: 1rem 1.5rem !important;
390
390
  display: flex !important;
@@ -418,19 +418,19 @@
418
418
  align-items: center !important;
419
419
  flex-wrap: wrap !important;
420
420
  }
421
- `}),r.jsx(wc,{location:"bottom",buttonText:t,declineButtonText:n,enableDeclineButton:o,disableStyles:!0,containerClasses:"medixdeck-cookie-banner",contentClasses:"medixdeck-cookie-content",buttonWrapperClasses:"medixdeck-cookie-buttons",ButtonComponent:d=>r.jsx(Se,{variant:"solid",colorScheme:"blue",size:"sm",onClick:d.onClick,id:d.id,children:d.children}),...l,children:r.jsxs(s.Box,{children:[e&&r.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:1,fontFamily:"var(--font-heading)",children:e}),r.jsx(s.Text,{fontSize:"sm",color:"text.heading",lineHeight:"1.5",children:i||`We use cookies to securely manage your session, enhance your browsing experience, and analyze our platform's performance. By clicking "Accept All", you consent to our use of cookies.`})]})})]})}gi.displayName="MedixCookieConsentBanner";const mi="medixdeck_pwa_dismissed",jc=14,Cc=[.4,0,.2,1];function Sc(){if(typeof window>"u")return!1;const e=window.matchMedia("(display-mode: standalone)").matches,t=window.navigator.standalone===!0;return e||t}function Bc(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)&&!("MSStream"in window)}function Fc(e){try{const t=localStorage.getItem(mi);if(!t)return!1;const n=e*24*60*60*1e3;return Date.now()-Number(t)<n}catch{return!1}}function Ec(){try{localStorage.setItem(mi,String(Date.now()))}catch{}}function Lc({size:e=18,color:t="#0685FF"}){return r.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),r.jsx("polyline",{points:"16 6 12 2 8 6"}),r.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function Ic(){return r.jsx(s.Box,{flexShrink:0,children:r.jsx(Ye,{type:"icon",height:44})})}function bi({title:e="Install this app",description:t="Add this app to your home screen for faster access and a better experience.",installLabel:n="Install",dismissLabel:o="Not now",cooldownDays:i=jc,onInstall:l,onDismiss:a,appName:c="this app",icon:f,position:u="bottom",colorScheme:d="blue",delaySeconds:p=0,forceVisible:x,forceIOS:h}){const b=Un(),[v,F]=U.useState(!1),[y,j]=U.useState(!1),C=U.useRef(null),S=U.useRef(null),B=U.useRef(null),w=U.useRef(!1),D=U.useRef(!1),E=U.useCallback(()=>{S.current!==null&&(clearTimeout(S.current),S.current=null)},[]);U.useEffect(()=>{const k=()=>{const g=B.current!==null&&Date.now()-B.current<i*24*60*60*1e3;return!w.current&&!D.current&&!Sc()&&!g&&!Fc(i)},P=()=>{E(),!(!x&&!k())&&(p>0?S.current=setTimeout(()=>{S.current=null,(x||k())&&F(!0)},p*1e3):F(!0))};if(x)return j(!!h),P(),E;const V=Bc();j(V);const Q=g=>{g.preventDefault(),k()&&(C.current=g,P())};V?P():window.addEventListener("beforeinstallprompt",Q);const X=()=>{w.current=!0,C.current=null,E(),F(!1)};return window.addEventListener("appinstalled",X),()=>{window.removeEventListener("beforeinstallprompt",Q),window.removeEventListener("appinstalled",X),E()}},[i,p,x,h,E]);const A=U.useCallback(()=>{B.current=Date.now(),Ec(),E(),C.current=null,F(!1),a==null||a()},[E,a]),M=U.useCallback(async()=>{const k=C.current;if(D.current||(E(),F(!1),!k))return;C.current=null,D.current=!0;let P;try{await k.prompt(),P=await k.userChoice}catch{return}finally{D.current=!1}P.outcome==="accepted"?(w.current=!0,l==null||l()):A()},[E,A,l]),z=b?"#152035":"#FFFFFF",T=b?"#1E3050":"#E4E8F0",W=d==="blue"?"#0685FF":"#7700CC",R=b?d==="blue"?"#70B6FF":"#C084FC":W;return r.jsx(ye.AnimatePresence,{children:v&&r.jsx(ye.motion.div,{initial:{opacity:0,y:u==="bottom"?80:-80,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:u==="bottom"?80:-80,x:"-50%"},transition:{duration:.35,ease:Cc},style:{position:"fixed",[u]:16,left:"50%",zIndex:1e3,width:"calc(100% - 32px)",maxWidth:480,pointerEvents:"auto"},children:r.jsx(s.Box,{borderRadius:"16px",p:{base:"4",md:"5"},style:{background:z,border:`1px solid ${T}`,boxShadow:"none"},children:r.jsxs(s.Flex,{gap:"4",align:"flex-start",children:[f??r.jsx(Ic,{}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsx(s.Text,{fontWeight:"700",fontSize:"md",color:"text.heading",fontFamily:"var(--font-heading)",mb:"1",children:e}),y?r.jsxs(s.Box,{children:[r.jsxs(s.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:["To install ",c,", tap the"," ",r.jsx("span",{style:{display:"inline-flex",verticalAlign:"middle",margin:"0 2px"},children:r.jsx(Lc,{size:16,color:R})})," ","Share button in Safari, then select"," ",r.jsx("span",{style:{fontWeight:700,color:b?"#F0F6FF":"#111926"},children:'"Add to Home Screen"'}),"."]}),r.jsx(s.Flex,{gap:"3",mb:"3",flexWrap:"wrap",children:[{step:"1",text:"Tap Share"},{step:"2",text:"Add to Home Screen"}].map(k=>r.jsxs(s.Flex,{align:"center",gap:"2",px:"3",py:"1.5",borderRadius:"8px",bg:"bg.subtle",children:[r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"20px",h:"20px",borderRadius:"full",flexShrink:0,style:{background:W,color:"#FFFFFF",fontSize:"11px",fontWeight:700,fontFamily:"var(--font-body)"},children:k.step}),r.jsx(s.Text,{fontSize:"xs",fontWeight:"600",color:"text.body",fontFamily:"var(--font-body)",children:k.text})]},k.step))})]}):r.jsx(s.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:t}),r.jsxs(s.Flex,{gap:"3",align:"center",children:[!y&&r.jsx(Se,{variant:"solid",colorScheme:d,size:"sm",onClick:M,children:n}),r.jsx(Se,{variant:"ghost",colorScheme:"gray",size:"sm",onClick:A,children:y?"Got it":o})]})]}),r.jsx(s.Box,{as:"button","aria-label":"Close install prompt",onClick:A,display:"flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.subtle",color:"text.muted",flexShrink:0,cursor:"pointer",_hover:{color:"text.heading",bg:"bg.surface"},style:{border:"none",transition:"all 0.2s ease"},mt:"-1",children:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})})})}bi.displayName="MedixPWAInstallPrompt";const Tc=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","switch","symbol","text","textpath","title","tref","tspan","view","vkern","feblend","fecolormatrix","fecomponenttransfer","fecomposite","feconvolvematrix","fediffuselighting","fedisplacementmap","fedistantlight","fedropshadow","feflood","fefunca","fefuncb","fefuncg","fefuncr","fegaussianblur","feimage","femerge","femergenode","femorphology","feoffset","fepointlight","fespecularlighting","fespotlight","fetile","feturbulence","math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"],Dc=["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","clip","clippathunits","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","mask","mask-type","mode","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","surfacescale","systemlanguage","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xchannelselector","ychannelselector","x","x1","x2","y","y1","y2","z","zoomandpan","accent","accentunder","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","displaystyle","encoding","fence","frame","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","rowalign","rowlines","rowspacing","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"],Ac=new Set(["ATTRIBUTE_NODE","CDATA_SECTION_NODE","COMMENT_NODE","DOCUMENT_FRAGMENT_NODE","DOCUMENT_NODE","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_CONTAINS","DOCUMENT_POSITION_DISCONNECTED","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC","DOCUMENT_POSITION_PRECEDING","DOCUMENT_TYPE_NODE","ELEMENT_NODE","ENTITY_NODE","ENTITY_REFERENCE_NODE","NOTATION_NODE","PROCESSING_INSTRUCTION_NODE","TEXT_NODE","URL","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","acceptCharset","accessKey","action","activeElement","addEventListener","adoptNode","after","anchors","append","appendChild","applets","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColIndexText","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRelevant","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowIndexText","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText","assignedSlot","attachInternals","attachShadow","attributes","baseURI","before","blur","body","captureEvents","characterSet","charset","checkValidity","childElementCount","childNodes","children","classList","className","clear","click","clientHeight","clientLeft","clientTop","clientWidth","cloneNode","close","closest","compareDocumentPosition","compatMode","constructor","contains","contentType","cookie","createAttribute","createAttributeNS","createCDATASection","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createExpression","createNSResolver","createNodeIterator","createProcessingInstruction","createRange","createTextNode","createTreeWalker","currentScript","dataset","defaultView","dir","dispatchEvent","doctype","documentElement","documentURI","draggable","elements","embeds","enctype","evaluate","firstChild","firstElementChild","focus","forms","getAttribute","getAttributeNS","getAttributeNames","getAttributeNode","getAttributeNodeNS","getBoundingClientRect","getClientRects","getElementById","getElementsByClassName","getElementsByName","getElementsByTagName","getElementsByTagNameNS","getRootNode","getSelection","hasAttribute","hasAttributeNS","hasAttributes","hasChildNodes","hasFocus","hasOwnProperty","head","hidden","id","images","implementation","importNode","innerHTML","inputEncoding","insertAdjacentElement","insertAdjacentHTML","insertAdjacentText","insertBefore","isConnected","isDefaultNamespace","isEqualNode","isPrototypeOf","isSameNode","lang","lastChild","lastElementChild","lastModified","length","links","localName","location","lookupNamespaceURI","lookupPrefix","matches","method","name","namespaceURI","nextElementSibling","nextSibling","noValidate","nodeName","nodeType","nodeValue","nonce","normalize","offsetHeight","offsetLeft","offsetParent","offsetTop","offsetWidth","onabort","onauxclick","onbeforeinput","onbeforematch","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerrawupdate","onpointerup","onprogress","onratechange","onreadystatechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","onvisibilitychange","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel","open","outerHTML","ownerDocument","parentElement","parentNode","plugins","prefix","prepend","previousElementSibling","previousSibling","propertyIsEnumerable","querySelector","querySelectorAll","readyState","referrer","releaseEvents","remove","removeAttribute","removeAttributeNS","removeAttributeNode","removeChild","removeEventListener","replaceChild","replaceChildren","replaceWith","reportValidity","requestSubmit","reset","role","scripts","scrollHeight","scrollLeft","scrollTop","scrollWidth","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","shadowRoot","slot","style","styleSheets","submit","tabIndex","tagName","target","textContent","title","toLocaleString","toString","toggleAttribute","translate","valueOf","visibilityState","webkitMatchesSelector","write","writeln"]),yi=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp","matrix"],zc=[...yi,"data"];function Rc(e){return yl.default(e,{allowedTags:Tc.filter(t=>!["html","head","body"].includes(t)),allowedAttributes:{"*":[...Dc,"aria-*","data-*"]},transformTags:{"*":(t,n)=>{for(const o of["id","name"])Ac.has(n[o])&&delete n[o];return{tagName:t.toLowerCase(),attribs:n}}},parseStyleAttributes:!1,allowVulnerableTags:!0,allowedSchemes:yi,allowedSchemesByTag:Object.fromEntries(["audio","video","img","source","image","track"].map(t=>[t,zc])),allowedSchemesAppliedToAttributes:["href","src","srcset","xlink:href","action","background","cite","poster"],allowProtocolRelative:!0,nonTextTags:["script","iframe","noembed","noframes","noscript","plaintext","xmp"]})}function Mc(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Oc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pc={};function zr(e,t){return(Pc.jsx?Nc:Oc).test(e)}const _c=/[ \t\n\f\r]/g;function Hc(e){return typeof e=="object"?e.type==="text"?Rr(e.value):!1:Rr(e)}function Rr(e){return e.replace(_c,"")===""}class Bt{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}}Bt.prototype.normal={};Bt.prototype.property={};Bt.prototype.space=void 0;function vi(e,t){const n={},o={};for(const i of e)Object.assign(n,i.property),Object.assign(o,i.normal);return new Bt(n,o,t)}function Dn(e){return e.toLowerCase()}class Fe{constructor(t,n){this.attribute=n,this.property=t}}Fe.prototype.attribute="";Fe.prototype.booleanish=!1;Fe.prototype.boolean=!1;Fe.prototype.commaOrSpaceSeparated=!1;Fe.prototype.commaSeparated=!1;Fe.prototype.defined=!1;Fe.prototype.mustUseProperty=!1;Fe.prototype.number=!1;Fe.prototype.overloadedBoolean=!1;Fe.prototype.property="";Fe.prototype.spaceSeparated=!1;Fe.prototype.space=void 0;let Wc=0;const oe=Je(),me=Je(),An=Je(),$=Je(),fe=Je(),Ge=Je(),Te=Je();function Je(){return 2**++Wc}const zn=Object.freeze(Object.defineProperty({__proto__:null,boolean:oe,booleanish:me,commaOrSpaceSeparated:Te,commaSeparated:Ge,number:$,overloadedBoolean:An,spaceSeparated:fe},Symbol.toStringTag,{value:"Module"})),un=Object.keys(zn);class tr extends Fe{constructor(t,n,o,i){let l=-1;if(super(t,n),Mr(this,"space",i),typeof o=="number")for(;++l<un.length;){const a=un[l];Mr(this,un[l],(o&zn[a])===zn[a])}}}tr.prototype.defined=!0;function Mr(e,t,n){n&&(e[t]=n)}function ct(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const l=new tr(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(l.mustUseProperty=!0),t[o]=l,n[Dn(o)]=o,n[Dn(l.attribute)]=o}return new Bt(t,n,e.space)}const ki=ct({properties:{ariaActiveDescendant:null,ariaAtomic:me,ariaAutoComplete:null,ariaBusy:me,ariaChecked:me,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:fe,ariaCurrent:null,ariaDescribedBy:fe,ariaDetails:null,ariaDisabled:me,ariaDropEffect:fe,ariaErrorMessage:null,ariaExpanded:me,ariaFlowTo:fe,ariaGrabbed:me,ariaHasPopup:null,ariaHidden:me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fe,ariaLevel:$,ariaLive:null,ariaModal:me,ariaMultiLine:me,ariaMultiSelectable:me,ariaOrientation:null,ariaOwns:fe,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:me,ariaReadOnly:me,ariaRelevant:null,ariaRequired:me,ariaRoleDescription:fe,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:me,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function wi(e,t){return t in e?e[t]:t}function ji(e,t){return wi(e,t.toLowerCase())}const qc=ct({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ge,acceptCharset:fe,accessKey:fe,action:null,allow:null,allowFullScreen:oe,allowPaymentRequest:oe,allowUserMedia:oe,alpha:oe,alt:null,as:null,async:oe,autoCapitalize:null,autoComplete:fe,autoFocus:oe,autoPlay:oe,blocking:fe,capture:null,charSet:null,checked:oe,cite:null,className:fe,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:me,controls:oe,controlsList:fe,coords:$|Ge,crossOrigin:null,data:null,dateTime:null,decoding:null,default:oe,defer:oe,dir:null,dirName:null,disabled:oe,download:An,draggable:me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:oe,formTarget:null,headers:fe,height:$,hidden:An,high:$,href:null,hrefLang:null,htmlFor:fe,httpEquiv:fe,id:null,imageSizes:null,imageSrcSet:null,inert:oe,inputMode:null,integrity:null,is:null,isMap:oe,itemId:null,itemProp:fe,itemRef:fe,itemScope:oe,itemType:fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:oe,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:oe,muted:oe,name:null,nonce:null,noModule:oe,noValidate:oe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:oe,optimum:$,pattern:null,ping:fe,placeholder:null,playsInline:oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:oe,referrerPolicy:null,rel:fe,required:oe,reversed:oe,rows:$,rowSpan:$,sandbox:fe,scope:null,scoped:oe,seamless:oe,selected:oe,shadowRootClonable:oe,shadowRootCustomElementRegistry:oe,shadowRootDelegatesFocus:oe,shadowRootMode:null,shadowRootSerializable:oe,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:oe,useMap:null,value:me,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fe,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:oe,declare:oe,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:oe,noHref:oe,noShade:oe,noWrap:oe,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:me,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:oe,disablePictureInPicture:oe,disableRemotePlayback:oe,exportParts:Ge,part:fe,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:ji}),Vc=ct({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Te,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:fe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ge,g2:Ge,glyphName:Ge,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:Te,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Te,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Te,rev:Te,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Te,requiredFeatures:Te,requiredFonts:Te,requiredFormats:Te,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:Te,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Te,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Te,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wi}),Ci=ct({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Si=ct({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ji}),Bi=ct({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$c={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Uc=/[A-Z]/g,Or=/-[a-z]/g,Gc=/^data[-\w.:]+$/i;function Yc(e,t){const n=Dn(t);let o=t,i=Fe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Gc.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Or,Zc);o="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Or.test(l)){let a=l.replace(Uc,Kc);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=tr}return new i(o,t)}function Kc(e){return"-"+e.toLowerCase()}function Zc(e){return e.charAt(1).toUpperCase()}const Xc=vi([ki,qc,Ci,Si,Bi],"html"),nr=vi([ki,Vc,Ci,Si,Bi],"svg");function Jc(e){return e.join(" ").trim()}function Fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nt={},dn,Nr;function Qc(){if(Nr)return dn;Nr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
422
- `,u="/",d="*",p="",x="comment",h="declaration";function b(F,y){if(typeof F!="string")throw new TypeError("First argument must be a string");if(!F)return[];y=y||{};var j=1,C=1;function S(R){var k=R.match(t);k&&(j+=k.length);var P=R.lastIndexOf(f);C=~P?R.length-P:C+R.length}function B(){var R={line:j,column:C};return function(k){return k.position=new w(R),A(),k}}function w(R){this.start=R,this.end={line:j,column:C},this.source=y.source}w.prototype.content=F;function D(R){var k=new Error(y.source+":"+j+":"+C+": "+R);if(k.reason=R,k.filename=y.source,k.line=j,k.column=C,k.source=F,!y.silent)throw k}function E(R){var k=R.exec(F);if(k){var P=k[0];return S(P),F=F.slice(P.length),k}}function A(){E(n)}function M(R){var k;for(R=R||[];k=z();)k!==!1&&R.push(k);return R}function z(){var R=B();if(!(u!=F.charAt(0)||d!=F.charAt(1))){for(var k=2;p!=F.charAt(k)&&(d!=F.charAt(k)||u!=F.charAt(k+1));)++k;if(k+=2,p===F.charAt(k-1))return D("End of comment missing");var P=F.slice(2,k-2);return C+=2,S(P),F=F.slice(k),C+=2,R({type:x,comment:P})}}function T(){var R=B(),k=E(o);if(k){if(z(),!E(i))return D("property missing ':'");var P=E(l),V=R({type:h,property:v(k[0].replace(e,p)),value:P?v(P[0].replace(e,p)):p});return E(a),V}}function W(){var R=[];M(R);for(var k;k=T();)k!==!1&&(R.push(k),M(R));return R}return A(),W()}function v(F){return F?F.replace(c,p):p}return dn=b,dn}var Pr;function eu(){if(Pr)return nt;Pr=1;var e=nt&&nt.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=n;const t=e(Qc());function n(o,i){let l=null;if(!o||typeof o!="string")return l;const a=(0,t.default)(o),c=typeof i=="function";return a.forEach(f=>{if(f.type!=="declaration")return;const{property:u,value:d}=f;c?i(u,d,f):d&&(l=l||{},l[u]=d)}),l}return nt}var xt={},_r;function tu(){if(_r)return xt;_r=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||n.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},c=function(u,d){return"".concat(d,"-")},f=function(u,d){return d===void 0&&(d={}),l(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,c):u=u.replace(o,c),u.replace(t,a))};return xt.camelCase=f,xt}var gt,Hr;function nu(){if(Hr)return gt;Hr=1;var e=gt&&gt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(eu()),n=tu();function o(i,l){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(c,f){c&&f&&(a[(0,n.camelCase)(c,l)]=f)}),a}return o.default=o,gt=o,gt}var ru=nu();const ou=Fi(ru),Ei=Li("end"),rr=Li("start");function Li(e){return t;function t(n){const o=n&&n.position&&n.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function iu(e){const t=rr(e),n=Ei(e);if(t&&n)return{start:t,end:n}}function kt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Wr(e.position):"start"in e||"end"in e?Wr(e):"line"in e||"column"in e?Rn(e):""}function Rn(e){return qr(e&&e.line)+":"+qr(e&&e.column)}function Wr(e){return Rn(e&&e.start)+"-"+Rn(e&&e.end)}function qr(e){return e&&typeof e=="number"?e:1}class ke extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let i="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(a=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof o=="string"){const f=o.indexOf(":");f===-1?l.ruleId=o:(l.source=o.slice(0,f),l.ruleId=o.slice(f+1))}if(!l.place&&l.ancestors&&l.ancestors){const f=l.ancestors[l.ancestors.length-1];f&&(l.place=f.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=kt(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ke.prototype.file="";ke.prototype.name="";ke.prototype.reason="";ke.prototype.message="";ke.prototype.stack="";ke.prototype.column=void 0;ke.prototype.line=void 0;ke.prototype.ancestors=void 0;ke.prototype.cause=void 0;ke.prototype.fatal=void 0;ke.prototype.place=void 0;ke.prototype.ruleId=void 0;ke.prototype.source=void 0;const or={}.hasOwnProperty,lu=new Map,au=/[A-Z]/g,su=new Set(["table","tbody","thead","tfoot","tr"]),cu=new Set(["td","th"]),Ii="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function uu(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=bu(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=mu(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?nr:Xc,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Ti(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Ti(e,t,n){if(t.type==="element")return du(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return fu(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return hu(e,t,n);if(t.type==="mdxjsEsm")return pu(e,t);if(t.type==="root")return xu(e,t,n);if(t.type==="text")return gu(e,t)}function du(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=nr,e.schema=i),e.ancestors.push(t);const l=Ai(e,t.tagName,!1),a=yu(e,t);let c=lr(e,t);return su.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!Hc(f):!0})),Di(e,a,l,t),ir(a,c),e.ancestors.pop(),e.schema=o,e.create(t,l,a,n)}function fu(e,t){if(t.data&&t.data.estree&&e.evaluater){const o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}Ct(e,t.position)}function pu(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ct(e,t.position)}function hu(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=nr,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Ai(e,t.name,!0),a=vu(e,t),c=lr(e,t);return Di(e,a,l,t),ir(a,c),e.ancestors.pop(),e.schema=o,e.create(t,l,a,n)}function xu(e,t,n){const o={};return ir(o,lr(e,t)),e.create(t,e.Fragment,o,n)}function gu(e,t){return t.value}function Di(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function ir(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mu(e,t,n){return o;function o(i,l,a,c){const u=Array.isArray(a.children)?n:t;return c?u(l,a,c):u(l,a)}}function bu(e,t){return n;function n(o,i,l,a){const c=Array.isArray(l.children),f=rr(o);return t(i,l,a,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function yu(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&or.call(t.properties,i)){const l=ku(e,i,t.properties[i]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&cu.has(t.tagName)?o=c:n[a]=c}}if(o){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return n}function vu(e,t){const n={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const l=o.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Ct(e,t.position);else{const i=o.name;let l;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){const c=o.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else Ct(e,t.position);else l=o.value===null?!0:o.value;n[i]=l}return n}function lr(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:lu;for(;++o<t.children.length;){const l=t.children[o];let a;if(e.passKeys){const f=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(f){const u=i.get(f)||0;a=f+"-"+u,i.set(f,u+1)}}const c=Ti(e,l,a);c!==void 0&&n.push(c)}return n}function ku(e,t,n){const o=Yc(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?Mc(n):Jc(n)),o.property==="style"){let i=typeof n=="object"?n:wu(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ju(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?$c[o.property]||o.property:o.attribute,n]}}function wu(e,t){try{return ou(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new ke("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ii+"#cannot-parse-style-attribute",i}}function Ai(e,t,n){let o;if(!n)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,a;for(;++l<i.length;){const c=zr(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}o=a}else o=zr(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return or.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);Ct(e)}function Ct(e,t){const n=new ke("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ii+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ju(e){const t={};let n;for(n in e)or.call(e,n)&&(t[Cu(n)]=e[n]);return t}function Cu(e){let t=e.replace(au,Su);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Su(e){return"-"+e.toLowerCase()}const fn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Bu={};function Fu(e,t){const n=Bu,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return zi(e,o,i)}function zi(e,t,n){if(Eu(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Vr(e.children,t,n)}return Array.isArray(e)?Vr(e,t,n):""}function Vr(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=zi(e[i],t,n);return o.join("")}function Eu(e){return!!(e&&typeof e=="object")}const $r={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
423
- `,Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},Lu={}.hasOwnProperty;function ar(e){return Lu.call($r,e)?$r[e]:!1}function Ne(e,t,n,o){const i=e.length;let l=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,o.length<1e4)a=Array.from(o),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<o.length;)a=o.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function Ae(e,t){return e.length>0?(Ne(e,e.length,0,t),e):t}const Ur={}.hasOwnProperty;function Iu(e){const t={};let n=-1;for(;++n<e.length;)Tu(t,e[n]);return t}function Tu(e,t){let n;for(n in t){const i=(Ur.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){Ur.call(i,a)||(i[a]=[]);const c=l[a];Du(i[a],Array.isArray(c)?c:c?[c]:[])}}}function Du(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Ne(e,0,0,o)}function Ri(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function st(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Me=qe(/[A-Za-z]/),De=qe(/[\dA-Za-z]/),Au=qe(/[#-'*+\--9=?A-Z^-~]/);function Mn(e){return e!==null&&(e<32||e===127)}const On=qe(/\d/),zu=qe(/[\dA-Fa-f]/),Ru=qe(/[!-/:-@[-`{-~]/);function ne(e){return e!==null&&e<-2}function Be(e){return e!==null&&(e<0||e===32)}function ue(e){return e===-2||e===-1||e===32}const Mu=qe(new RegExp("\\p{P}|\\p{S}","u")),Ou=qe(/\s/);function qe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ut(e){const t=[];let n=-1,o=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&De(e.charCodeAt(n+1))&&De(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),i=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(o,n),encodeURIComponent(a)),o=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(o)}function he(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(f){return ue(f)?(e.enter(n),c(f)):t(f)}function c(f){return ue(f)&&l++<i?(e.consume(f),c):(e.exit(n),t(f))}}const Nu={tokenize:Pu};function Pu(e){const t=e.attempt(this.parser.constructs.contentInitial,o,i);let n;return t;function o(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),he(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),l(c)}function l(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return ne(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const _u={tokenize:Hu},Gr={tokenize:Wu};function Hu(e){const t=this,n=[];let o=0,i,l,a;return c;function c(C){if(o<n.length){const S=n[o];return t.containerState=S[1],e.attempt(S[0].continuation,f,u)(C)}return u(C)}function f(C){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&j();const S=t.events.length;let B=S,w;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){w=t.events[B][1].end;break}y(o);let D=S;for(;D<t.events.length;)t.events[D][1].end={...w},D++;return Ne(t.events,B+1,0,t.events.slice(S)),t.events.length=D,u(C)}return c(C)}function u(C){if(o===n.length){if(!i)return x(C);if(i.currentConstruct&&i.currentConstruct.concrete)return b(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Gr,d,p)(C)}function d(C){return i&&j(),y(o),x(C)}function p(C){return t.parser.lazy[t.now().line]=o!==n.length,a=t.now().offset,b(C)}function x(C){return t.containerState={},e.attempt(Gr,h,b)(C)}function h(C){return o++,n.push([t.currentConstruct,t.containerState]),x(C)}function b(C){if(C===null){i&&j(),y(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),v(C)}function v(C){if(C===null){F(e.exit("chunkFlow"),!0),y(0),e.consume(C);return}return ne(C)?(e.consume(C),F(e.exit("chunkFlow")),o=0,t.interrupt=void 0,c):(e.consume(C),v)}function F(C,S){const B=t.sliceStream(C);if(S&&B.push(null),C.previous=l,l&&(l.next=C),l=C,i.defineSkip(C.start),i.write(B),t.parser.lazy[C.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<a&&(!i.events[w][1].end||i.events[w][1].end.offset>a))return;const D=t.events.length;let E=D,A,M;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(A){M=t.events[E][1].end;break}A=!0}for(y(o),w=D;w<t.events.length;)t.events[w][1].end={...M},w++;Ne(t.events,E+1,0,t.events.slice(D)),t.events.length=w}}function y(C){let S=n.length;for(;S-- >C;){const B=n[S];t.containerState=B[1],B[0].exit.call(t,e)}n.length=C}function j(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Wu(e,t,n){return he(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yr(e){if(e===null||Be(e)||Ou(e))return 1;if(Mu(e))return 2}function sr(e,t,n){const o=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!o.includes(l)&&(t=l(t,n),o.push(l))}return t}const Nn={name:"attention",resolveAll:qu,tokenize:Vu};function qu(e,t){let n=-1,o,i,l,a,c,f,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(o=n;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[o][1].end},x={...e[n][1].start};Kr(p,-f),Kr(x,f),a={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...e[o][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},l={type:f>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},i={type:f>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[o][1].end={...a.start},e[n][1].start={...c.end},u=[],e[o][1].end.offset-e[o][1].start.offset&&(u=Ae(u,[["enter",e[o][1],t],["exit",e[o][1],t]])),u=Ae(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",l,t]]),u=Ae(u,sr(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),u=Ae(u,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Ae(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ne(e,o-1,n-o+3,u),n=o+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Vu(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=Yr(o);let l;return a;function a(f){return l=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===l)return e.consume(f),c;const u=e.exit("attentionSequence"),d=Yr(f),p=!d||d===2&&i||n.includes(f),x=!i||i===2&&d||n.includes(o);return u._open=!!(l===42?p:p&&(i||!x)),u._close=!!(l===42?x:x&&(d||!p)),t(f)}}function Kr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $u={name:"autolink",tokenize:Uu};function Uu(e,t,n){let o=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(h){return Me(h)?(e.consume(h),a):h===64?n(h):u(h)}function a(h){return h===43||h===45||h===46||De(h)?(o=1,c(h)):u(h)}function c(h){return h===58?(e.consume(h),o=0,f):(h===43||h===45||h===46||De(h))&&o++<32?(e.consume(h),c):(o=0,u(h))}function f(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Mn(h)?n(h):(e.consume(h),f)}function u(h){return h===64?(e.consume(h),d):Au(h)?(e.consume(h),u):n(h)}function d(h){return De(h)?p(h):n(h)}function p(h){return h===46?(e.consume(h),o=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):x(h)}function x(h){if((h===45||De(h))&&o++<63){const b=h===45?x:p;return e.consume(h),b}return n(h)}}const Qt={partial:!0,tokenize:Gu};function Gu(e,t,n){return o;function o(l){return ue(l)?he(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||ne(l)?t(l):n(l)}}const Mi={continuation:{tokenize:Ku},exit:Zu,name:"blockQuote",tokenize:Yu};function Yu(e,t,n){const o=this;return i;function i(a){if(a===62){const c=o.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return ue(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Ku(e,t,n){const o=this;return i;function i(a){return ue(a)?he(e,l,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(Mi,t,n)(a)}}function Zu(e){e.exit("blockQuote")}const Oi={name:"characterEscape",tokenize:Xu};function Xu(e,t,n){return o;function o(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Ru(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Ni={name:"characterReference",tokenize:Ju};function Ju(e,t,n){const o=this;let i=0,l,a;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),f}function f(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,a=De,d(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=zu,d):(e.enter("characterReferenceValue"),l=7,a=On,d(p))}function d(p){if(p===59&&i){const x=e.exit("characterReferenceValue");return a===De&&!ar(o.sliceSerialize(x))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&i++<l?(e.consume(p),d):n(p)}}const Zr={partial:!0,tokenize:ed},Xr={concrete:!0,name:"codeFenced",tokenize:Qu};function Qu(e,t,n){const o=this,i={partial:!0,tokenize:B};let l=0,a=0,c;return f;function f(w){return u(w)}function u(w){const D=o.events[o.events.length-1];return l=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,c=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(w)}function d(w){return w===c?(a++,e.consume(w),d):a<3?n(w):(e.exit("codeFencedFenceSequence"),ue(w)?he(e,p,"whitespace")(w):p(w))}function p(w){return w===null||ne(w)?(e.exit("codeFencedFence"),o.interrupt?t(w):e.check(Zr,v,S)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(w))}function x(w){return w===null||ne(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(w)):ue(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),he(e,h,"whitespace")(w)):w===96&&w===c?n(w):(e.consume(w),x)}function h(w){return w===null||ne(w)?p(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===null||ne(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(w)):w===96&&w===c?n(w):(e.consume(w),b)}function v(w){return e.attempt(i,S,F)(w)}function F(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return l>0&&ue(w)?he(e,j,"linePrefix",l+1)(w):j(w)}function j(w){return w===null||ne(w)?e.check(Zr,v,S)(w):(e.enter("codeFlowValue"),C(w))}function C(w){return w===null||ne(w)?(e.exit("codeFlowValue"),j(w)):(e.consume(w),C)}function S(w){return e.exit("codeFenced"),t(w)}function B(w,D,E){let A=0;return M;function M(k){return w.enter("lineEnding"),w.consume(k),w.exit("lineEnding"),z}function z(k){return w.enter("codeFencedFence"),ue(k)?he(w,T,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):T(k)}function T(k){return k===c?(w.enter("codeFencedFenceSequence"),W(k)):E(k)}function W(k){return k===c?(A++,w.consume(k),W):A>=a?(w.exit("codeFencedFenceSequence"),ue(k)?he(w,R,"whitespace")(k):R(k)):E(k)}function R(k){return k===null||ne(k)?(w.exit("codeFencedFence"),D(k)):E(k)}}}function ed(e,t,n){const o=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return o.parser.lazy[o.now().line]?n(a):t(a)}}const pn={name:"codeIndented",tokenize:nd},td={partial:!0,tokenize:rd};function nd(e,t,n){const o=this;return i;function i(u){return e.enter("codeIndented"),he(e,l,"linePrefix",5)(u)}function l(u){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?f(u):ne(u)?e.attempt(td,a,f)(u):(e.enter("codeFlowValue"),c(u))}function c(u){return u===null||ne(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),c)}function f(u){return e.exit("codeIndented"),t(u)}}function rd(e,t,n){const o=this;return i;function i(a){return o.parser.lazy[o.now().line]?n(a):ne(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):he(e,l,"linePrefix",5)(a)}function l(a){const c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):ne(a)?i(a):n(a)}}const od={name:"codeText",previous:ld,resolve:id,tokenize:ad};function id(e){let t=e.length-4,n=3,o,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=n;++o<t;)if(e[o][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(o=n-1,t++;++o<=t;)i===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(i=o):(o===t||e[o][1].type==="lineEnding")&&(e[i][1].type="codeTextData",o!==i+2&&(e[i][1].end=e[o-1][1].end,e.splice(i+2,o-i-2),t-=o-i-2,o=i+2),i=void 0);return e}function ld(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ad(e,t,n){let o=0,i,l;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),o++,c):(e.exit("codeTextSequence"),f(p))}function f(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),f):p===96?(l=e.enter("codeTextSequence"),i=0,d(p)):ne(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("codeTextData"),u(p))}function u(p){return p===null||p===32||p===96||ne(p)?(e.exit("codeTextData"),f(p)):(e.consume(p),u)}function d(p){return p===96?(e.consume(p),i++,d):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(l.type="codeTextData",u(p))}}class sd{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const o=n??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,n,o){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return o&&mt(this.left,o),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),mt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),mt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);mt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);mt(this.left,n.reverse())}}}function mt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Pi(e){const t={};let n=-1,o,i,l,a,c,f,u;const d=new sd(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(o=d.get(n),n&&o[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(f=o[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,cd(d,n)),n=t[n],u=!0);else if(o[1]._container){for(l=n,i=void 0;l--;)if(a=d.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(o[1].end={...d.get(i)[1].start},c=d.slice(i,n),c.unshift(o),d.splice(i,n-i+1,c))}}return Ne(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function cd(e,t){const n=e.get(t)[1],o=e.get(t)[2];let i=t-1;const l=[];let a=n._tokenizer;a||(a=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,f=[],u={};let d,p,x=-1,h=n,b=0,v=0;const F=[v];for(;h;){for(;e.get(++i)[1]!==h;);l.push(i),h._tokenizer||(d=o.sliceStream(h),h.next||d.push(null),p&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=h,h=h.next}for(h=n;++x<c.length;)c[x][0]==="exit"&&c[x-1][0]==="enter"&&c[x][1].type===c[x-1][1].type&&c[x][1].start.line!==c[x][1].end.line&&(v=x+1,F.push(v),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):F.pop(),x=F.length;x--;){const y=c.slice(F[x],F[x+1]),j=l.pop();f.push([j,j+y.length-1]),e.splice(j,2,y)}for(f.reverse(),x=-1;++x<f.length;)u[b+f[x][0]]=b+f[x][1],b+=f[x][1]-f[x][0]-1;return u}const ud={resolve:fd,tokenize:pd},dd={partial:!0,tokenize:hd};function fd(e){return Pi(e),e}function pd(e,t){let n;return o;function o(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?l(c):ne(c)?e.check(dd,a,l)(c):(e.consume(c),i)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function hd(e,t,n){const o=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),he(e,l,"linePrefix")}function l(a){if(a===null||ne(a))return n(a);const c=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(o.parser.constructs.flow,n,t)(a)}}function _i(e,t,n,o,i,l,a,c,f){const u=f||Number.POSITIVE_INFINITY;let d=0;return p;function p(y){return y===60?(e.enter(o),e.enter(i),e.enter(l),e.consume(y),e.exit(l),x):y===null||y===32||y===41||Mn(y)?n(y):(e.enter(o),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(y))}function x(y){return y===62?(e.enter(l),e.consume(y),e.exit(l),e.exit(i),e.exit(o),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(c),x(y)):y===null||y===60||ne(y)?n(y):(e.consume(y),y===92?b:h)}function b(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function v(y){return!d&&(y===null||y===41||Be(y))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(o),t(y)):d<u&&y===40?(e.consume(y),d++,v):y===41?(e.consume(y),d--,v):y===null||y===32||y===40||Mn(y)?n(y):(e.consume(y),y===92?F:v)}function F(y){return y===40||y===41||y===92?(e.consume(y),v):v(y)}}function Hi(e,t,n,o,i,l){const a=this;let c=0,f;return u;function u(h){return e.enter(o),e.enter(i),e.consume(h),e.exit(i),e.enter(l),d}function d(h){return c>999||h===null||h===91||h===93&&!f||h===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(o),t):ne(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===null||h===91||h===93||ne(h)||c++>999?(e.exit("chunkString"),d(h)):(e.consume(h),f||(f=!ue(h)),h===92?x:p)}function x(h){return h===91||h===92||h===93?(e.consume(h),c++,p):p(h)}}function Wi(e,t,n,o,i,l){let a;return c;function c(x){return x===34||x===39||x===40?(e.enter(o),e.enter(i),e.consume(x),e.exit(i),a=x===40?41:x,f):n(x)}function f(x){return x===a?(e.enter(i),e.consume(x),e.exit(i),e.exit(o),t):(e.enter(l),u(x))}function u(x){return x===a?(e.exit(l),f(a)):x===null?n(x):ne(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),he(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===a||x===null||ne(x)?(e.exit("chunkString"),u(x)):(e.consume(x),x===92?p:d)}function p(x){return x===a||x===92?(e.consume(x),d):d(x)}}function wt(e,t){let n;return o;function o(i){return ne(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,o):ue(i)?he(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const xd={name:"definition",tokenize:md},gd={partial:!0,tokenize:bd};function md(e,t,n){const o=this;let i;return l;function l(h){return e.enter("definition"),a(h)}function a(h){return Hi.call(o,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function c(h){return i=st(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),f):n(h)}function f(h){return Be(h)?wt(e,u)(h):u(h)}function u(h){return _i(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(gd,p,p)(h)}function p(h){return ue(h)?he(e,x,"whitespace")(h):x(h)}function x(h){return h===null||ne(h)?(e.exit("definition"),o.parser.defined.push(i),t(h)):n(h)}}function bd(e,t,n){return o;function o(c){return Be(c)?wt(e,i)(c):n(c)}function i(c){return Wi(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return ue(c)?he(e,a,"whitespace")(c):a(c)}function a(c){return c===null||ne(c)?t(c):n(c)}}const yd={name:"hardBreakEscape",tokenize:vd};function vd(e,t,n){return o;function o(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return ne(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const kd={name:"headingAtx",resolve:wd,tokenize:jd};function wd(e,t){let n=e.length-2,o=3,i,l;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(i={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},l={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Ne(e,o,n-o+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function jd(e,t,n){let o=0;return i;function i(d){return e.enter("atxHeading"),l(d)}function l(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&o++<6?(e.consume(d),a):d===null||Be(d)?(e.exit("atxHeadingSequence"),c(d)):n(d)}function c(d){return d===35?(e.enter("atxHeadingSequence"),f(d)):d===null||ne(d)?(e.exit("atxHeading"),t(d)):ue(d)?he(e,c,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function f(d){return d===35?(e.consume(d),f):(e.exit("atxHeadingSequence"),c(d))}function u(d){return d===null||d===35||Be(d)?(e.exit("atxHeadingText"),c(d)):(e.consume(d),u)}}const Cd=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jr=["pre","script","style","textarea"],Sd={concrete:!0,name:"htmlFlow",resolveTo:Ed,tokenize:Ld},Bd={partial:!0,tokenize:Td},Fd={partial:!0,tokenize:Id};function Ed(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ld(e,t,n){const o=this;let i,l,a,c,f;return u;function u(m){return d(m)}function d(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),p}function p(m){return m===33?(e.consume(m),x):m===47?(e.consume(m),l=!0,v):m===63?(e.consume(m),i=3,o.interrupt?t:g):Me(m)?(e.consume(m),a=String.fromCharCode(m),F):n(m)}function x(m){return m===45?(e.consume(m),i=2,h):m===91?(e.consume(m),i=5,c=0,b):Me(m)?(e.consume(m),i=4,o.interrupt?t:g):n(m)}function h(m){return m===45?(e.consume(m),o.interrupt?t:g):n(m)}function b(m){const N="CDATA[";return m===N.charCodeAt(c++)?(e.consume(m),c===N.length?o.interrupt?t:T:b):n(m)}function v(m){return Me(m)?(e.consume(m),a=String.fromCharCode(m),F):n(m)}function F(m){if(m===null||m===47||m===62||Be(m)){const N=m===47,G=a.toLowerCase();return!N&&!l&&Jr.includes(G)?(i=1,o.interrupt?t(m):T(m)):Cd.includes(a.toLowerCase())?(i=6,N?(e.consume(m),y):o.interrupt?t(m):T(m)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(m):l?j(m):C(m))}return m===45||De(m)?(e.consume(m),a+=String.fromCharCode(m),F):n(m)}function y(m){return m===62?(e.consume(m),o.interrupt?t:T):n(m)}function j(m){return ue(m)?(e.consume(m),j):M(m)}function C(m){return m===47?(e.consume(m),M):m===58||m===95||Me(m)?(e.consume(m),S):ue(m)?(e.consume(m),C):M(m)}function S(m){return m===45||m===46||m===58||m===95||De(m)?(e.consume(m),S):B(m)}function B(m){return m===61?(e.consume(m),w):ue(m)?(e.consume(m),B):C(m)}function w(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),f=m,D):ue(m)?(e.consume(m),w):E(m)}function D(m){return m===f?(e.consume(m),f=null,A):m===null||ne(m)?n(m):(e.consume(m),D)}function E(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||Be(m)?B(m):(e.consume(m),E)}function A(m){return m===47||m===62||ue(m)?C(m):n(m)}function M(m){return m===62?(e.consume(m),z):n(m)}function z(m){return m===null||ne(m)?T(m):ue(m)?(e.consume(m),z):n(m)}function T(m){return m===45&&i===2?(e.consume(m),P):m===60&&i===1?(e.consume(m),V):m===62&&i===4?(e.consume(m),O):m===63&&i===3?(e.consume(m),g):m===93&&i===5?(e.consume(m),X):ne(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Bd,H,W)(m)):m===null||ne(m)?(e.exit("htmlFlowData"),W(m)):(e.consume(m),T)}function W(m){return e.check(Fd,R,H)(m)}function R(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),k}function k(m){return m===null||ne(m)?W(m):(e.enter("htmlFlowData"),T(m))}function P(m){return m===45?(e.consume(m),g):T(m)}function V(m){return m===47?(e.consume(m),a="",Q):T(m)}function Q(m){if(m===62){const N=a.toLowerCase();return Jr.includes(N)?(e.consume(m),O):T(m)}return Me(m)&&a.length<8?(e.consume(m),a+=String.fromCharCode(m),Q):T(m)}function X(m){return m===93?(e.consume(m),g):T(m)}function g(m){return m===62?(e.consume(m),O):m===45&&i===2?(e.consume(m),g):T(m)}function O(m){return m===null||ne(m)?(e.exit("htmlFlowData"),H(m)):(e.consume(m),O)}function H(m){return e.exit("htmlFlow"),t(m)}}function Id(e,t,n){const o=this;return i;function i(a){return ne(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return o.parser.lazy[o.now().line]?n(a):t(a)}}function Td(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qt,t,n)}}const Dd={name:"htmlText",tokenize:Ad};function Ad(e,t,n){const o=this;let i,l,a;return c;function c(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),B):g===63?(e.consume(g),C):Me(g)?(e.consume(g),E):n(g)}function u(g){return g===45?(e.consume(g),d):g===91?(e.consume(g),l=0,b):Me(g)?(e.consume(g),j):n(g)}function d(g){return g===45?(e.consume(g),h):n(g)}function p(g){return g===null?n(g):g===45?(e.consume(g),x):ne(g)?(a=p,V(g)):(e.consume(g),p)}function x(g){return g===45?(e.consume(g),h):p(g)}function h(g){return g===62?P(g):g===45?x(g):p(g)}function b(g){const O="CDATA[";return g===O.charCodeAt(l++)?(e.consume(g),l===O.length?v:b):n(g)}function v(g){return g===null?n(g):g===93?(e.consume(g),F):ne(g)?(a=v,V(g)):(e.consume(g),v)}function F(g){return g===93?(e.consume(g),y):v(g)}function y(g){return g===62?P(g):g===93?(e.consume(g),y):v(g)}function j(g){return g===null||g===62?P(g):ne(g)?(a=j,V(g)):(e.consume(g),j)}function C(g){return g===null?n(g):g===63?(e.consume(g),S):ne(g)?(a=C,V(g)):(e.consume(g),C)}function S(g){return g===62?P(g):C(g)}function B(g){return Me(g)?(e.consume(g),w):n(g)}function w(g){return g===45||De(g)?(e.consume(g),w):D(g)}function D(g){return ne(g)?(a=D,V(g)):ue(g)?(e.consume(g),D):P(g)}function E(g){return g===45||De(g)?(e.consume(g),E):g===47||g===62||Be(g)?A(g):n(g)}function A(g){return g===47?(e.consume(g),P):g===58||g===95||Me(g)?(e.consume(g),M):ne(g)?(a=A,V(g)):ue(g)?(e.consume(g),A):P(g)}function M(g){return g===45||g===46||g===58||g===95||De(g)?(e.consume(g),M):z(g)}function z(g){return g===61?(e.consume(g),T):ne(g)?(a=z,V(g)):ue(g)?(e.consume(g),z):A(g)}function T(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,W):ne(g)?(a=T,V(g)):ue(g)?(e.consume(g),T):(e.consume(g),R)}function W(g){return g===i?(e.consume(g),i=void 0,k):g===null?n(g):ne(g)?(a=W,V(g)):(e.consume(g),W)}function R(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||Be(g)?A(g):(e.consume(g),R)}function k(g){return g===47||g===62||Be(g)?A(g):n(g)}function P(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function V(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Q}function Q(g){return ue(g)?he(e,X,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):X(g)}function X(g){return e.enter("htmlTextData"),a(g)}}const cr={name:"labelEnd",resolveAll:Od,resolveTo:Nd,tokenize:Pd},zd={tokenize:_d},Rd={tokenize:Hd},Md={tokenize:Wd};function Od(e){let t=-1;const n=[];for(;++t<e.length;){const o=e[t][1];if(n.push(e[t]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const i=o.type==="labelImage"?4:2;o.type="data",t+=i}}return e.length!==n.length&&Ne(e,0,e.length,n),e}function Nd(e,t){let n=e.length,o=0,i,l,a,c;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(a=n);const f={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[l+o+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",f,t],["enter",u,t]],c=Ae(c,e.slice(l+1,l+o+3)),c=Ae(c,[["enter",d,t]]),c=Ae(c,sr(t.parser.constructs.insideSpan.null,e.slice(l+o+4,a-3),t)),c=Ae(c,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),c=Ae(c,e.slice(a+1)),c=Ae(c,[["exit",f,t]]),Ne(e,l,e.length,c),e}function Pd(e,t,n){const o=this;let i=o.events.length,l,a;for(;i--;)if((o.events[i][1].type==="labelImage"||o.events[i][1].type==="labelLink")&&!o.events[i][1]._balanced){l=o.events[i][1];break}return c;function c(x){return l?l._inactive?p(x):(a=o.parser.defined.includes(st(o.sliceSerialize({start:l.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),f):n(x)}function f(x){return x===40?e.attempt(zd,d,a?d:p)(x):x===91?e.attempt(Rd,d,a?u:p)(x):a?d(x):p(x)}function u(x){return e.attempt(Md,d,p)(x)}function d(x){return t(x)}function p(x){return l._balanced=!0,n(x)}}function _d(e,t,n){return o;function o(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return Be(p)?wt(e,l)(p):l(p)}function l(p){return p===41?d(p):_i(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Be(p)?wt(e,f)(p):d(p)}function c(p){return n(p)}function f(p){return p===34||p===39||p===40?Wi(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function u(p){return Be(p)?wt(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Hd(e,t,n){const o=this;return i;function i(c){return Hi.call(o,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return o.parser.defined.includes(st(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function Wd(e,t,n){return o;function o(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const qd={name:"labelStartImage",resolveAll:cr.resolveAll,tokenize:Vd};function Vd(e,t,n){const o=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(c):t(c)}}const $d={name:"labelStartLink",resolveAll:cr.resolveAll,tokenize:Ud};function Ud(e,t,n){const o=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(a):t(a)}}const hn={name:"lineEnding",tokenize:Gd};function Gd(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),he(e,t,"linePrefix")}}const Pt={name:"thematicBreak",tokenize:Yd};function Yd(e,t,n){let o=0,i;return l;function l(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,c(u)}function c(u){return u===i?(e.enter("thematicBreakSequence"),f(u)):o>=3&&(u===null||ne(u))?(e.exit("thematicBreak"),t(u)):n(u)}function f(u){return u===i?(e.consume(u),o++,f):(e.exit("thematicBreakSequence"),ue(u)?he(e,c,"whitespace")(u):c(u))}}const Ce={continuation:{tokenize:Jd},exit:ef,name:"list",tokenize:Xd},Kd={partial:!0,tokenize:tf},Zd={partial:!0,tokenize:Qd};function Xd(e,t,n){const o=this,i=o.events[o.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return c;function c(h){const b=o.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!o.containerState.marker||h===o.containerState.marker:On(h)){if(o.containerState.type||(o.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Pt,n,u)(h):u(h);if(!o.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(h)}return n(h)}function f(h){return On(h)&&++a<10?(e.consume(h),f):(!o.interrupt||a<2)&&(o.containerState.marker?h===o.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||h,e.check(Qt,o.interrupt?n:d,e.attempt(Kd,x,p))}function d(h){return o.containerState.initialBlankLine=!0,l++,x(h)}function p(h){return ue(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),x):n(h)}function x(h){return o.containerState.size=l+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Jd(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(Qt,i,l);function i(c){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,he(e,t,"listItemIndent",o.containerState.size+1)(c)}function l(c){return o.containerState.furtherBlankLines||!ue(c)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,a(c)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Zd,t,a)(c))}function a(c){return o.containerState._closeFlow=!0,o.interrupt=void 0,he(e,e.attempt(Ce,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Qd(e,t,n){const o=this;return he(e,i,"listItemIndent",o.containerState.size+1);function i(l){const a=o.events[o.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===o.containerState.size?t(l):n(l)}}function ef(e){e.exit(this.containerState.type)}function tf(e,t,n){const o=this;return he(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const a=o.events[o.events.length-1];return!ue(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Qr={name:"setextUnderline",resolveTo:nf,tokenize:rf};function nf(e,t){let n=e.length,o,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",a,t]),e.splice(l+1,0,["exit",e[o][1],t]),e[o][1].end={...e[l][1].end}):e[o][1]=a,e.push(["exit",a,t]),e}function rf(e,t,n){const o=this;let i;return l;function l(u){let d=o.events.length,p;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){p=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||p)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),c(u)}function c(u){return u===i?(e.consume(u),c):(e.exit("setextHeadingLineSequence"),ue(u)?he(e,f,"lineSuffix")(u):f(u))}function f(u){return u===null||ne(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const of={tokenize:lf};function lf(e){const t=this,n=e.attempt(Qt,o,e.attempt(this.parser.constructs.flowInitial,i,he(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ud,i)),"linePrefix")));return n;function o(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const af={resolveAll:Vi()},sf=qi("string"),cf=qi("text");function qi(e){return{resolveAll:Vi(e==="text"?uf:void 0),tokenize:t};function t(n){const o=this,i=this.parser.constructs[e],l=n.attempt(i,a,c);return a;function a(d){return u(d)?l(d):c(d)}function c(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),f}function f(d){return u(d)?(n.exit("data"),l(d)):(n.consume(d),f)}function u(d){if(d===null)return!0;const p=i[d];let x=-1;if(p)for(;++x<p.length;){const h=p[x];if(!h.previous||h.previous.call(o,o.previous))return!0}return!1}}}function Vi(e){return t;function t(n,o){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,o):n}}function uf(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const o=e[n-1][1],i=t.sliceStream(o);let l=i.length,a=-1,c=0,f;for(;l--;){const u=i[l];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(u===-2)f=!0,c++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const u={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:o.start._bufferIndex+a,_index:o.start._index+l,line:o.end.line,column:o.end.column-c,offset:o.end.offset-c},end:{...o.end}};o.end={...u.start},o.start.offset===o.end.offset?Object.assign(o,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const df={42:Ce,43:Ce,45:Ce,48:Ce,49:Ce,50:Ce,51:Ce,52:Ce,53:Ce,54:Ce,55:Ce,56:Ce,57:Ce,62:Mi},ff={91:xd},pf={[-2]:pn,[-1]:pn,32:pn},hf={35:kd,42:Pt,45:[Qr,Pt],60:Sd,61:Qr,95:Pt,96:Xr,126:Xr},xf={38:Ni,92:Oi},gf={[-5]:hn,[-4]:hn,[-3]:hn,33:qd,38:Ni,42:Nn,60:[$u,Dd],91:$d,92:[yd,Oi],93:cr,95:Nn,96:od},mf={null:[Nn,af]},bf={null:[42,95]},yf={null:[]},vf=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bf,contentInitial:ff,disable:yf,document:df,flow:hf,flowInitial:pf,insideSpan:mf,string:xf,text:gf},Symbol.toStringTag,{value:"Module"}));function kf(e,t,n){let o={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let a=[],c=[];const f={attempt:D(B),check:D(w),consume:j,enter:C,exit:S,interrupt:D(w,{interrupt:!0})},u={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:x,sliceStream:h,write:p};let d=t.tokenize.call(u,f);return t.resolveAll&&l.push(t),u;function p(z){return a=Ae(a,z),F(),a[a.length-1]!==null?[]:(E(t,0),u.events=sr(l,u.events,u),u.events)}function x(z,T){return jf(h(z),T)}function h(z){return wf(a,z)}function b(){const{_bufferIndex:z,_index:T,line:W,column:R,offset:k}=o;return{_bufferIndex:z,_index:T,line:W,column:R,offset:k}}function v(z){i[z.line]=z.column,M()}function F(){let z;for(;o._index<a.length;){const T=a[o._index];if(typeof T=="string")for(z=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===z&&o._bufferIndex<T.length;)y(T.charCodeAt(o._bufferIndex));else y(T)}}function y(z){d=d(z)}function j(z){ne(z)?(o.line++,o.column=1,o.offset+=z===-3?2:1,M()):z!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===a[o._index].length&&(o._bufferIndex=-1,o._index++)),u.previous=z}function C(z,T){const W=T||{};return W.type=z,W.start=b(),u.events.push(["enter",W,u]),c.push(W),W}function S(z){const T=c.pop();return T.end=b(),u.events.push(["exit",T,u]),T}function B(z,T){E(z,T.from)}function w(z,T){T.restore()}function D(z,T){return W;function W(R,k,P){let V,Q,X,g;return Array.isArray(R)?H(R):"tokenize"in R?H([R]):O(R);function O(Z){return Y;function Y(K){const le=K!==null&&Z[K],J=K!==null&&Z.null,re=[...Array.isArray(le)?le:le?[le]:[],...Array.isArray(J)?J:J?[J]:[]];return H(re)(K)}}function H(Z){return V=Z,Q=0,Z.length===0?P:m(Z[Q])}function m(Z){return Y;function Y(K){return g=A(),X=Z,Z.partial||(u.currentConstruct=Z),Z.name&&u.parser.constructs.disable.null.includes(Z.name)?G():Z.tokenize.call(T?Object.assign(Object.create(u),T):u,f,N,G)(K)}}function N(Z){return z(X,g),k}function G(Z){return g.restore(),++Q<V.length?m(V[Q]):P}}}function E(z,T){z.resolveAll&&!l.includes(z)&&l.push(z),z.resolve&&Ne(u.events,T,u.events.length-T,z.resolve(u.events.slice(T),u)),z.resolveTo&&(u.events=z.resolveTo(u.events,u))}function A(){const z=b(),T=u.previous,W=u.currentConstruct,R=u.events.length,k=Array.from(c);return{from:R,restore:P};function P(){o=z,u.previous=T,u.currentConstruct=W,u.events.length=R,c=k,M()}}function M(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function wf(e,t){const n=t.start._index,o=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(o,l)];else{if(a=e.slice(n,i),o>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(o):a.shift()}l>0&&a.push(e[i].slice(0,l))}return a}function jf(e,t){let n=-1;const o=[];let i;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
421
+ `}),r.jsx(wc,{location:"bottom",buttonText:t,declineButtonText:n,enableDeclineButton:o,disableStyles:!0,containerClasses:"medixdeck-cookie-banner",contentClasses:"medixdeck-cookie-content",buttonWrapperClasses:"medixdeck-cookie-buttons",ButtonComponent:f=>r.jsx(Be,{variant:"solid",colorScheme:"blue",size:"sm",onClick:f.onClick,id:f.id,children:f.children}),...l,children:r.jsxs(s.Box,{children:[e&&r.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:1,fontFamily:"var(--font-heading)",children:e}),r.jsx(s.Text,{fontSize:"sm",color:"text.heading",lineHeight:"1.5",children:i||`We use cookies to securely manage your session, enhance your browsing experience, and analyze our platform's performance. By clicking "Accept All", you consent to our use of cookies.`})]})})]})}gi.displayName="MedixCookieConsentBanner";const mi="medixdeck_pwa_dismissed",jc=14,Cc=[.4,0,.2,1];function Sc(){if(typeof window>"u")return!1;const e=window.matchMedia("(display-mode: standalone)").matches,t=window.navigator.standalone===!0;return e||t}function Bc(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)&&!("MSStream"in window)}function Fc(e){try{const t=localStorage.getItem(mi);if(!t)return!1;const n=e*24*60*60*1e3;return Date.now()-Number(t)<n}catch{return!1}}function Ec(){try{localStorage.setItem(mi,String(Date.now()))}catch{}}function Lc({size:e=18,color:t="#0685FF"}){return r.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),r.jsx("polyline",{points:"16 6 12 2 8 6"}),r.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function Ic(){return r.jsx(s.Box,{flexShrink:0,children:r.jsx(Ye,{type:"icon",height:44})})}function bi({title:e="Install this app",description:t="Add this app to your home screen for faster access and a better experience.",installLabel:n="Install",dismissLabel:o="Not now",cooldownDays:i=jc,onInstall:l,onDismiss:a,appName:c="this app",icon:d,position:u="bottom",colorScheme:f="blue",delaySeconds:h=0,forceVisible:x,forceIOS:p}){const b=Un(),[v,B]=U.useState(!1),[y,S]=U.useState(!1),j=U.useRef(null),C=U.useRef(null),F=U.useRef(null),w=U.useRef(!1),D=U.useRef(!1),E=U.useCallback(()=>{C.current!==null&&(clearTimeout(C.current),C.current=null)},[]);U.useEffect(()=>{const k=()=>{const g=F.current!==null&&Date.now()-F.current<i*24*60*60*1e3;return!w.current&&!D.current&&!Sc()&&!g&&!Fc(i)},P=()=>{E(),!(!x&&!k())&&(h>0?C.current=setTimeout(()=>{C.current=null,(x||k())&&B(!0)},h*1e3):B(!0))};if(x)return S(!!p),P(),E;const $=Bc();S($);const Q=g=>{g.preventDefault(),k()&&(j.current=g,P())};$?P():window.addEventListener("beforeinstallprompt",Q);const J=()=>{w.current=!0,j.current=null,E(),B(!1)};return window.addEventListener("appinstalled",J),()=>{window.removeEventListener("beforeinstallprompt",Q),window.removeEventListener("appinstalled",J),E()}},[i,h,x,p,E]);const z=U.useCallback(()=>{F.current=Date.now(),Ec(),E(),j.current=null,B(!1),a==null||a()},[E,a]),N=U.useCallback(async()=>{const k=j.current;if(D.current||(E(),B(!1),!k))return;j.current=null,D.current=!0;let P;try{await k.prompt(),P=await k.userChoice}catch{return}finally{D.current=!1}P.outcome==="accepted"?(w.current=!0,l==null||l()):z()},[E,z,l]),R=b?"#152035":"#FFFFFF",T=b?"#1E3050":"#E4E8F0",q=f==="blue"?"#0685FF":"#7700CC",M=b?f==="blue"?"#70B6FF":"#C084FC":q;return r.jsx(ye.AnimatePresence,{children:v&&r.jsx(ye.motion.div,{initial:{opacity:0,y:u==="bottom"?80:-80,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:u==="bottom"?80:-80,x:"-50%"},transition:{duration:.35,ease:Cc},style:{position:"fixed",[u]:16,left:"50%",zIndex:1e3,width:"calc(100% - 32px)",maxWidth:480,pointerEvents:"auto"},children:r.jsx(s.Box,{borderRadius:"16px",p:{base:"4",md:"5"},style:{background:R,border:`1px solid ${T}`,boxShadow:"none"},children:r.jsxs(s.Flex,{gap:"4",align:"flex-start",children:[d??r.jsx(Ic,{}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsx(s.Text,{fontWeight:"700",fontSize:"md",color:"text.heading",fontFamily:"var(--font-heading)",mb:"1",children:e}),y?r.jsxs(s.Box,{children:[r.jsxs(s.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:["To install ",c,", tap the"," ",r.jsx("span",{style:{display:"inline-flex",verticalAlign:"middle",margin:"0 2px"},children:r.jsx(Lc,{size:16,color:M})})," ","Share button in Safari, then select"," ",r.jsx("span",{style:{fontWeight:700,color:b?"#F0F6FF":"#111926"},children:'"Add to Home Screen"'}),"."]}),r.jsx(s.Flex,{gap:"3",mb:"3",flexWrap:"wrap",children:[{step:"1",text:"Tap Share"},{step:"2",text:"Add to Home Screen"}].map(k=>r.jsxs(s.Flex,{align:"center",gap:"2",px:"3",py:"1.5",borderRadius:"8px",bg:"bg.subtle",children:[r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"20px",h:"20px",borderRadius:"full",flexShrink:0,style:{background:q,color:"#FFFFFF",fontSize:"11px",fontWeight:700,fontFamily:"var(--font-body)"},children:k.step}),r.jsx(s.Text,{fontSize:"xs",fontWeight:"600",color:"text.body",fontFamily:"var(--font-body)",children:k.text})]},k.step))})]}):r.jsx(s.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:t}),r.jsxs(s.Flex,{gap:"3",align:"center",children:[!y&&r.jsx(Be,{variant:"solid",colorScheme:f,size:"sm",onClick:N,children:n}),r.jsx(Be,{variant:"ghost",colorScheme:"gray",size:"sm",onClick:z,children:y?"Got it":o})]})]}),r.jsx(s.Box,{as:"button","aria-label":"Close install prompt",onClick:z,display:"flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.subtle",color:"text.muted",flexShrink:0,cursor:"pointer",_hover:{color:"text.heading",bg:"bg.surface"},style:{border:"none",transition:"all 0.2s ease"},mt:"-1",children:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})})})}bi.displayName="MedixPWAInstallPrompt";const Tc=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","switch","symbol","text","textpath","title","tref","tspan","view","vkern","feblend","fecolormatrix","fecomponenttransfer","fecomposite","feconvolvematrix","fediffuselighting","fedisplacementmap","fedistantlight","fedropshadow","feflood","fefunca","fefuncb","fefuncg","fefuncr","fegaussianblur","feimage","femerge","femergenode","femorphology","feoffset","fepointlight","fespecularlighting","fespotlight","fetile","feturbulence","math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"],Dc=["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","clip","clippathunits","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","mask","mask-type","mode","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","surfacescale","systemlanguage","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xchannelselector","ychannelselector","x","x1","x2","y","y1","y2","z","zoomandpan","accent","accentunder","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","displaystyle","encoding","fence","frame","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","rowalign","rowlines","rowspacing","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"],Ac=new Set(["ATTRIBUTE_NODE","CDATA_SECTION_NODE","COMMENT_NODE","DOCUMENT_FRAGMENT_NODE","DOCUMENT_NODE","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_CONTAINS","DOCUMENT_POSITION_DISCONNECTED","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC","DOCUMENT_POSITION_PRECEDING","DOCUMENT_TYPE_NODE","ELEMENT_NODE","ENTITY_NODE","ENTITY_REFERENCE_NODE","NOTATION_NODE","PROCESSING_INSTRUCTION_NODE","TEXT_NODE","URL","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","acceptCharset","accessKey","action","activeElement","addEventListener","adoptNode","after","anchors","append","appendChild","applets","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColIndexText","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRelevant","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowIndexText","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText","assignedSlot","attachInternals","attachShadow","attributes","baseURI","before","blur","body","captureEvents","characterSet","charset","checkValidity","childElementCount","childNodes","children","classList","className","clear","click","clientHeight","clientLeft","clientTop","clientWidth","cloneNode","close","closest","compareDocumentPosition","compatMode","constructor","contains","contentType","cookie","createAttribute","createAttributeNS","createCDATASection","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createExpression","createNSResolver","createNodeIterator","createProcessingInstruction","createRange","createTextNode","createTreeWalker","currentScript","dataset","defaultView","dir","dispatchEvent","doctype","documentElement","documentURI","draggable","elements","embeds","enctype","evaluate","firstChild","firstElementChild","focus","forms","getAttribute","getAttributeNS","getAttributeNames","getAttributeNode","getAttributeNodeNS","getBoundingClientRect","getClientRects","getElementById","getElementsByClassName","getElementsByName","getElementsByTagName","getElementsByTagNameNS","getRootNode","getSelection","hasAttribute","hasAttributeNS","hasAttributes","hasChildNodes","hasFocus","hasOwnProperty","head","hidden","id","images","implementation","importNode","innerHTML","inputEncoding","insertAdjacentElement","insertAdjacentHTML","insertAdjacentText","insertBefore","isConnected","isDefaultNamespace","isEqualNode","isPrototypeOf","isSameNode","lang","lastChild","lastElementChild","lastModified","length","links","localName","location","lookupNamespaceURI","lookupPrefix","matches","method","name","namespaceURI","nextElementSibling","nextSibling","noValidate","nodeName","nodeType","nodeValue","nonce","normalize","offsetHeight","offsetLeft","offsetParent","offsetTop","offsetWidth","onabort","onauxclick","onbeforeinput","onbeforematch","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerrawupdate","onpointerup","onprogress","onratechange","onreadystatechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","onvisibilitychange","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel","open","outerHTML","ownerDocument","parentElement","parentNode","plugins","prefix","prepend","previousElementSibling","previousSibling","propertyIsEnumerable","querySelector","querySelectorAll","readyState","referrer","releaseEvents","remove","removeAttribute","removeAttributeNS","removeAttributeNode","removeChild","removeEventListener","replaceChild","replaceChildren","replaceWith","reportValidity","requestSubmit","reset","role","scripts","scrollHeight","scrollLeft","scrollTop","scrollWidth","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","shadowRoot","slot","style","styleSheets","submit","tabIndex","tagName","target","textContent","title","toLocaleString","toString","toggleAttribute","translate","valueOf","visibilityState","webkitMatchesSelector","write","writeln"]),yi=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp","matrix"],zc=[...yi,"data"];function Rc(e){return yl.default(e,{allowedTags:Tc.filter(t=>!["html","head","body"].includes(t)),allowedAttributes:{"*":[...Dc,"aria-*","data-*"]},transformTags:{"*":(t,n)=>{for(const o of["id","name"])Ac.has(n[o])&&delete n[o];return{tagName:t.toLowerCase(),attribs:n}}},parseStyleAttributes:!1,allowVulnerableTags:!0,allowedSchemes:yi,allowedSchemesByTag:Object.fromEntries(["audio","video","img","source","image","track"].map(t=>[t,zc])),allowedSchemesAppliedToAttributes:["href","src","srcset","xlink:href","action","background","cite","poster"],allowProtocolRelative:!0,nonTextTags:["script","iframe","noembed","noframes","noscript","plaintext","xmp"]})}function Mc(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Oc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pc={};function zr(e,t){return(Pc.jsx?Nc:Oc).test(e)}const _c=/[ \t\n\f\r]/g;function Hc(e){return typeof e=="object"?e.type==="text"?Rr(e.value):!1:Rr(e)}function Rr(e){return e.replace(_c,"")===""}class Bt{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}}Bt.prototype.normal={};Bt.prototype.property={};Bt.prototype.space=void 0;function vi(e,t){const n={},o={};for(const i of e)Object.assign(n,i.property),Object.assign(o,i.normal);return new Bt(n,o,t)}function Dn(e){return e.toLowerCase()}class Ee{constructor(t,n){this.attribute=n,this.property=t}}Ee.prototype.attribute="";Ee.prototype.booleanish=!1;Ee.prototype.boolean=!1;Ee.prototype.commaOrSpaceSeparated=!1;Ee.prototype.commaSeparated=!1;Ee.prototype.defined=!1;Ee.prototype.mustUseProperty=!1;Ee.prototype.number=!1;Ee.prototype.overloadedBoolean=!1;Ee.prototype.property="";Ee.prototype.spaceSeparated=!1;Ee.prototype.space=void 0;let Wc=0;const oe=Je(),me=Je(),An=Je(),V=Je(),fe=Je(),Ge=Je(),Te=Je();function Je(){return 2**++Wc}const zn=Object.freeze(Object.defineProperty({__proto__:null,boolean:oe,booleanish:me,commaOrSpaceSeparated:Te,commaSeparated:Ge,number:V,overloadedBoolean:An,spaceSeparated:fe},Symbol.toStringTag,{value:"Module"})),un=Object.keys(zn);class tr extends Ee{constructor(t,n,o,i){let l=-1;if(super(t,n),Mr(this,"space",i),typeof o=="number")for(;++l<un.length;){const a=un[l];Mr(this,un[l],(o&zn[a])===zn[a])}}}tr.prototype.defined=!0;function Mr(e,t,n){n&&(e[t]=n)}function ct(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const l=new tr(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(l.mustUseProperty=!0),t[o]=l,n[Dn(o)]=o,n[Dn(l.attribute)]=o}return new Bt(t,n,e.space)}const ki=ct({properties:{ariaActiveDescendant:null,ariaAtomic:me,ariaAutoComplete:null,ariaBusy:me,ariaChecked:me,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:fe,ariaCurrent:null,ariaDescribedBy:fe,ariaDetails:null,ariaDisabled:me,ariaDropEffect:fe,ariaErrorMessage:null,ariaExpanded:me,ariaFlowTo:fe,ariaGrabbed:me,ariaHasPopup:null,ariaHidden:me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fe,ariaLevel:V,ariaLive:null,ariaModal:me,ariaMultiLine:me,ariaMultiSelectable:me,ariaOrientation:null,ariaOwns:fe,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:me,ariaReadOnly:me,ariaRelevant:null,ariaRequired:me,ariaRoleDescription:fe,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:me,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function wi(e,t){return t in e?e[t]:t}function ji(e,t){return wi(e,t.toLowerCase())}const qc=ct({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ge,acceptCharset:fe,accessKey:fe,action:null,allow:null,allowFullScreen:oe,allowPaymentRequest:oe,allowUserMedia:oe,alpha:oe,alt:null,as:null,async:oe,autoCapitalize:null,autoComplete:fe,autoFocus:oe,autoPlay:oe,blocking:fe,capture:null,charSet:null,checked:oe,cite:null,className:fe,closedBy:null,colorSpace:null,cols:V,colSpan:V,command:null,commandFor:null,content:null,contentEditable:me,controls:oe,controlsList:fe,coords:V|Ge,crossOrigin:null,data:null,dateTime:null,decoding:null,default:oe,defer:oe,dir:null,dirName:null,disabled:oe,download:An,draggable:me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:oe,formTarget:null,headers:fe,height:V,hidden:An,high:V,href:null,hrefLang:null,htmlFor:fe,httpEquiv:fe,id:null,imageSizes:null,imageSrcSet:null,inert:oe,inputMode:null,integrity:null,is:null,isMap:oe,itemId:null,itemProp:fe,itemRef:fe,itemScope:oe,itemType:fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:oe,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:oe,muted:oe,name:null,nonce:null,noModule:oe,noValidate:oe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:oe,optimum:V,pattern:null,ping:fe,placeholder:null,playsInline:oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:oe,referrerPolicy:null,rel:fe,required:oe,reversed:oe,rows:V,rowSpan:V,sandbox:fe,scope:null,scoped:oe,seamless:oe,selected:oe,shadowRootClonable:oe,shadowRootCustomElementRegistry:oe,shadowRootDelegatesFocus:oe,shadowRootMode:null,shadowRootSerializable:oe,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:oe,useMap:null,value:me,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fe,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:oe,declare:oe,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:oe,noHref:oe,noShade:oe,noWrap:oe,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:me,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:oe,disablePictureInPicture:oe,disableRemotePlayback:oe,exportParts:Ge,part:fe,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:ji}),Vc=ct({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Te,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:fe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ge,g2:Ge,glyphName:Ge,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Te,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Te,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Te,rev:Te,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Te,requiredFeatures:Te,requiredFonts:Te,requiredFormats:Te,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Te,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Te,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Te,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wi}),Ci=ct({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Si=ct({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ji}),Bi=ct({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$c={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Uc=/[A-Z]/g,Or=/-[a-z]/g,Gc=/^data[-\w.:]+$/i;function Yc(e,t){const n=Dn(t);let o=t,i=Ee;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Gc.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Or,Zc);o="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Or.test(l)){let a=l.replace(Uc,Kc);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=tr}return new i(o,t)}function Kc(e){return"-"+e.toLowerCase()}function Zc(e){return e.charAt(1).toUpperCase()}const Xc=vi([ki,qc,Ci,Si,Bi],"html"),nr=vi([ki,Vc,Ci,Si,Bi],"svg");function Jc(e){return e.join(" ").trim()}function Fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nt={},dn,Nr;function Qc(){if(Nr)return dn;Nr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
422
+ `,u="/",f="*",h="",x="comment",p="declaration";function b(B,y){if(typeof B!="string")throw new TypeError("First argument must be a string");if(!B)return[];y=y||{};var S=1,j=1;function C(M){var k=M.match(t);k&&(S+=k.length);var P=M.lastIndexOf(d);j=~P?M.length-P:j+M.length}function F(){var M={line:S,column:j};return function(k){return k.position=new w(M),z(),k}}function w(M){this.start=M,this.end={line:S,column:j},this.source=y.source}w.prototype.content=B;function D(M){var k=new Error(y.source+":"+S+":"+j+": "+M);if(k.reason=M,k.filename=y.source,k.line=S,k.column=j,k.source=B,!y.silent)throw k}function E(M){var k=M.exec(B);if(k){var P=k[0];return C(P),B=B.slice(P.length),k}}function z(){E(n)}function N(M){var k;for(M=M||[];k=R();)k!==!1&&M.push(k);return M}function R(){var M=F();if(!(u!=B.charAt(0)||f!=B.charAt(1))){for(var k=2;h!=B.charAt(k)&&(f!=B.charAt(k)||u!=B.charAt(k+1));)++k;if(k+=2,h===B.charAt(k-1))return D("End of comment missing");var P=B.slice(2,k-2);return j+=2,C(P),B=B.slice(k),j+=2,M({type:x,comment:P})}}function T(){var M=F(),k=E(o);if(k){if(R(),!E(i))return D("property missing ':'");var P=E(l),$=M({type:p,property:v(k[0].replace(e,h)),value:P?v(P[0].replace(e,h)):h});return E(a),$}}function q(){var M=[];N(M);for(var k;k=T();)k!==!1&&(M.push(k),N(M));return M}return z(),q()}function v(B){return B?B.replace(c,h):h}return dn=b,dn}var Pr;function eu(){if(Pr)return nt;Pr=1;var e=nt&&nt.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=n;const t=e(Qc());function n(o,i){let l=null;if(!o||typeof o!="string")return l;const a=(0,t.default)(o),c=typeof i=="function";return a.forEach(d=>{if(d.type!=="declaration")return;const{property:u,value:f}=d;c?i(u,f,d):f&&(l=l||{},l[u]=f)}),l}return nt}var xt={},_r;function tu(){if(_r)return xt;_r=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||n.test(u)||e.test(u)},a=function(u,f){return f.toUpperCase()},c=function(u,f){return"".concat(f,"-")},d=function(u,f){return f===void 0&&(f={}),l(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,c):u=u.replace(o,c),u.replace(t,a))};return xt.camelCase=d,xt}var gt,Hr;function nu(){if(Hr)return gt;Hr=1;var e=gt&&gt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(eu()),n=tu();function o(i,l){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(c,d){c&&d&&(a[(0,n.camelCase)(c,l)]=d)}),a}return o.default=o,gt=o,gt}var ru=nu();const ou=Fi(ru),Ei=Li("end"),rr=Li("start");function Li(e){return t;function t(n){const o=n&&n.position&&n.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function iu(e){const t=rr(e),n=Ei(e);if(t&&n)return{start:t,end:n}}function kt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Wr(e.position):"start"in e||"end"in e?Wr(e):"line"in e||"column"in e?Rn(e):""}function Rn(e){return qr(e&&e.line)+":"+qr(e&&e.column)}function Wr(e){return Rn(e&&e.start)+"-"+Rn(e&&e.end)}function qr(e){return e&&typeof e=="number"?e:1}class ve extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let i="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(a=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof o=="string"){const d=o.indexOf(":");d===-1?l.ruleId=o:(l.source=o.slice(0,d),l.ruleId=o.slice(d+1))}if(!l.place&&l.ancestors&&l.ancestors){const d=l.ancestors[l.ancestors.length-1];d&&(l.place=d.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=kt(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ve.prototype.file="";ve.prototype.name="";ve.prototype.reason="";ve.prototype.message="";ve.prototype.stack="";ve.prototype.column=void 0;ve.prototype.line=void 0;ve.prototype.ancestors=void 0;ve.prototype.cause=void 0;ve.prototype.fatal=void 0;ve.prototype.place=void 0;ve.prototype.ruleId=void 0;ve.prototype.source=void 0;const or={}.hasOwnProperty,lu=new Map,au=/[A-Z]/g,su=new Set(["table","tbody","thead","tfoot","tr"]),cu=new Set(["td","th"]),Ii="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function uu(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=bu(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=mu(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?nr:Xc,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Ti(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Ti(e,t,n){if(t.type==="element")return du(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return fu(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return hu(e,t,n);if(t.type==="mdxjsEsm")return pu(e,t);if(t.type==="root")return xu(e,t,n);if(t.type==="text")return gu(e,t)}function du(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=nr,e.schema=i),e.ancestors.push(t);const l=Ai(e,t.tagName,!1),a=yu(e,t);let c=lr(e,t);return su.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Hc(d):!0})),Di(e,a,l,t),ir(a,c),e.ancestors.pop(),e.schema=o,e.create(t,l,a,n)}function fu(e,t){if(t.data&&t.data.estree&&e.evaluater){const o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}Ct(e,t.position)}function pu(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ct(e,t.position)}function hu(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=nr,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Ai(e,t.name,!0),a=vu(e,t),c=lr(e,t);return Di(e,a,l,t),ir(a,c),e.ancestors.pop(),e.schema=o,e.create(t,l,a,n)}function xu(e,t,n){const o={};return ir(o,lr(e,t)),e.create(t,e.Fragment,o,n)}function gu(e,t){return t.value}function Di(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function ir(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mu(e,t,n){return o;function o(i,l,a,c){const u=Array.isArray(a.children)?n:t;return c?u(l,a,c):u(l,a)}}function bu(e,t){return n;function n(o,i,l,a){const c=Array.isArray(l.children),d=rr(o);return t(i,l,a,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function yu(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&or.call(t.properties,i)){const l=ku(e,i,t.properties[i]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&cu.has(t.tagName)?o=c:n[a]=c}}if(o){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return n}function vu(e,t){const n={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const l=o.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Ct(e,t.position);else{const i=o.name;let l;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){const c=o.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else Ct(e,t.position);else l=o.value===null?!0:o.value;n[i]=l}return n}function lr(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:lu;for(;++o<t.children.length;){const l=t.children[o];let a;if(e.passKeys){const d=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(d){const u=i.get(d)||0;a=d+"-"+u,i.set(d,u+1)}}const c=Ti(e,l,a);c!==void 0&&n.push(c)}return n}function ku(e,t,n){const o=Yc(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?Mc(n):Jc(n)),o.property==="style"){let i=typeof n=="object"?n:wu(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ju(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?$c[o.property]||o.property:o.attribute,n]}}function wu(e,t){try{return ou(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new ve("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ii+"#cannot-parse-style-attribute",i}}function Ai(e,t,n){let o;if(!n)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,a;for(;++l<i.length;){const c=zr(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}o=a}else o=zr(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return or.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);Ct(e)}function Ct(e,t){const n=new ve("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ii+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ju(e){const t={};let n;for(n in e)or.call(e,n)&&(t[Cu(n)]=e[n]);return t}function Cu(e){let t=e.replace(au,Su);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Su(e){return"-"+e.toLowerCase()}const fn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Bu={};function Fu(e,t){const n=Bu,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return zi(e,o,i)}function zi(e,t,n){if(Eu(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Vr(e.children,t,n)}return Array.isArray(e)?Vr(e,t,n):""}function Vr(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=zi(e[i],t,n);return o.join("")}function Eu(e){return!!(e&&typeof e=="object")}const $r={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
423
+ `,Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},Lu={}.hasOwnProperty;function ar(e){return Lu.call($r,e)?$r[e]:!1}function Ne(e,t,n,o){const i=e.length;let l=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,o.length<1e4)a=Array.from(o),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<o.length;)a=o.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function Ae(e,t){return e.length>0?(Ne(e,e.length,0,t),e):t}const Ur={}.hasOwnProperty;function Iu(e){const t={};let n=-1;for(;++n<e.length;)Tu(t,e[n]);return t}function Tu(e,t){let n;for(n in t){const i=(Ur.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){Ur.call(i,a)||(i[a]=[]);const c=l[a];Du(i[a],Array.isArray(c)?c:c?[c]:[])}}}function Du(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Ne(e,0,0,o)}function Ri(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function st(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Me=qe(/[A-Za-z]/),De=qe(/[\dA-Za-z]/),Au=qe(/[#-'*+\--9=?A-Z^-~]/);function Mn(e){return e!==null&&(e<32||e===127)}const On=qe(/\d/),zu=qe(/[\dA-Fa-f]/),Ru=qe(/[!-/:-@[-`{-~]/);function re(e){return e!==null&&e<-2}function Fe(e){return e!==null&&(e<0||e===32)}function ue(e){return e===-2||e===-1||e===32}const Mu=qe(new RegExp("\\p{P}|\\p{S}","u")),Ou=qe(/\s/);function qe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ut(e){const t=[];let n=-1,o=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&De(e.charCodeAt(n+1))&&De(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),i=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(o,n),encodeURIComponent(a)),o=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(o)}function he(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(d){return ue(d)?(e.enter(n),c(d)):t(d)}function c(d){return ue(d)&&l++<i?(e.consume(d),c):(e.exit(n),t(d))}}const Nu={tokenize:Pu};function Pu(e){const t=e.attempt(this.parser.constructs.contentInitial,o,i);let n;return t;function o(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),he(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),l(c)}function l(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return re(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const _u={tokenize:Hu},Gr={tokenize:Wu};function Hu(e){const t=this,n=[];let o=0,i,l,a;return c;function c(j){if(o<n.length){const C=n[o];return t.containerState=C[1],e.attempt(C[0].continuation,d,u)(j)}return u(j)}function d(j){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const C=t.events.length;let F=C,w;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){w=t.events[F][1].end;break}y(o);let D=C;for(;D<t.events.length;)t.events[D][1].end={...w},D++;return Ne(t.events,F+1,0,t.events.slice(C)),t.events.length=D,u(j)}return c(j)}function u(j){if(o===n.length){if(!i)return x(j);if(i.currentConstruct&&i.currentConstruct.concrete)return b(j);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Gr,f,h)(j)}function f(j){return i&&S(),y(o),x(j)}function h(j){return t.parser.lazy[t.now().line]=o!==n.length,a=t.now().offset,b(j)}function x(j){return t.containerState={},e.attempt(Gr,p,b)(j)}function p(j){return o++,n.push([t.currentConstruct,t.containerState]),x(j)}function b(j){if(j===null){i&&S(),y(0),e.consume(j);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),v(j)}function v(j){if(j===null){B(e.exit("chunkFlow"),!0),y(0),e.consume(j);return}return re(j)?(e.consume(j),B(e.exit("chunkFlow")),o=0,t.interrupt=void 0,c):(e.consume(j),v)}function B(j,C){const F=t.sliceStream(j);if(C&&F.push(null),j.previous=l,l&&(l.next=j),l=j,i.defineSkip(j.start),i.write(F),t.parser.lazy[j.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<a&&(!i.events[w][1].end||i.events[w][1].end.offset>a))return;const D=t.events.length;let E=D,z,N;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(z){N=t.events[E][1].end;break}z=!0}for(y(o),w=D;w<t.events.length;)t.events[w][1].end={...N},w++;Ne(t.events,E+1,0,t.events.slice(D)),t.events.length=w}}function y(j){let C=n.length;for(;C-- >j;){const F=n[C];t.containerState=F[1],F[0].exit.call(t,e)}n.length=j}function S(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Wu(e,t,n){return he(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yr(e){if(e===null||Fe(e)||Ou(e))return 1;if(Mu(e))return 2}function sr(e,t,n){const o=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!o.includes(l)&&(t=l(t,n),o.push(l))}return t}const Nn={name:"attention",resolveAll:qu,tokenize:Vu};function qu(e,t){let n=-1,o,i,l,a,c,d,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(o=n;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[o][1].end},x={...e[n][1].start};Kr(h,-d),Kr(x,d),a={type:d>1?"strongSequence":"emphasisSequence",start:h,end:{...e[o][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},l={type:d>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},i={type:d>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[o][1].end={...a.start},e[n][1].start={...c.end},u=[],e[o][1].end.offset-e[o][1].start.offset&&(u=Ae(u,[["enter",e[o][1],t],["exit",e[o][1],t]])),u=Ae(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",l,t]]),u=Ae(u,sr(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),u=Ae(u,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=Ae(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Ne(e,o-1,n-o+3,u),n=o+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Vu(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=Yr(o);let l;return a;function a(d){return l=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===l)return e.consume(d),c;const u=e.exit("attentionSequence"),f=Yr(d),h=!f||f===2&&i||n.includes(d),x=!i||i===2&&f||n.includes(o);return u._open=!!(l===42?h:h&&(i||!x)),u._close=!!(l===42?x:x&&(f||!h)),t(d)}}function Kr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $u={name:"autolink",tokenize:Uu};function Uu(e,t,n){let o=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return Me(p)?(e.consume(p),a):p===64?n(p):u(p)}function a(p){return p===43||p===45||p===46||De(p)?(o=1,c(p)):u(p)}function c(p){return p===58?(e.consume(p),o=0,d):(p===43||p===45||p===46||De(p))&&o++<32?(e.consume(p),c):(o=0,u(p))}function d(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Mn(p)?n(p):(e.consume(p),d)}function u(p){return p===64?(e.consume(p),f):Au(p)?(e.consume(p),u):n(p)}function f(p){return De(p)?h(p):n(p)}function h(p){return p===46?(e.consume(p),o=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):x(p)}function x(p){if((p===45||De(p))&&o++<63){const b=p===45?x:h;return e.consume(p),b}return n(p)}}const Qt={partial:!0,tokenize:Gu};function Gu(e,t,n){return o;function o(l){return ue(l)?he(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||re(l)?t(l):n(l)}}const Mi={continuation:{tokenize:Ku},exit:Zu,name:"blockQuote",tokenize:Yu};function Yu(e,t,n){const o=this;return i;function i(a){if(a===62){const c=o.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return ue(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Ku(e,t,n){const o=this;return i;function i(a){return ue(a)?he(e,l,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(Mi,t,n)(a)}}function Zu(e){e.exit("blockQuote")}const Oi={name:"characterEscape",tokenize:Xu};function Xu(e,t,n){return o;function o(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Ru(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Ni={name:"characterReference",tokenize:Ju};function Ju(e,t,n){const o=this;let i=0,l,a;return c;function c(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),d}function d(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,a=De,f(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=zu,f):(e.enter("characterReferenceValue"),l=7,a=On,f(h))}function f(h){if(h===59&&i){const x=e.exit("characterReferenceValue");return a===De&&!ar(o.sliceSerialize(x))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&i++<l?(e.consume(h),f):n(h)}}const Zr={partial:!0,tokenize:ed},Xr={concrete:!0,name:"codeFenced",tokenize:Qu};function Qu(e,t,n){const o=this,i={partial:!0,tokenize:F};let l=0,a=0,c;return d;function d(w){return u(w)}function u(w){const D=o.events[o.events.length-1];return l=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,c=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===c?(a++,e.consume(w),f):a<3?n(w):(e.exit("codeFencedFenceSequence"),ue(w)?he(e,h,"whitespace")(w):h(w))}function h(w){return w===null||re(w)?(e.exit("codeFencedFence"),o.interrupt?t(w):e.check(Zr,v,C)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(w))}function x(w){return w===null||re(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(w)):ue(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),he(e,p,"whitespace")(w)):w===96&&w===c?n(w):(e.consume(w),x)}function p(w){return w===null||re(w)?h(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===null||re(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(w)):w===96&&w===c?n(w):(e.consume(w),b)}function v(w){return e.attempt(i,C,B)(w)}function B(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return l>0&&ue(w)?he(e,S,"linePrefix",l+1)(w):S(w)}function S(w){return w===null||re(w)?e.check(Zr,v,C)(w):(e.enter("codeFlowValue"),j(w))}function j(w){return w===null||re(w)?(e.exit("codeFlowValue"),S(w)):(e.consume(w),j)}function C(w){return e.exit("codeFenced"),t(w)}function F(w,D,E){let z=0;return N;function N(k){return w.enter("lineEnding"),w.consume(k),w.exit("lineEnding"),R}function R(k){return w.enter("codeFencedFence"),ue(k)?he(w,T,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):T(k)}function T(k){return k===c?(w.enter("codeFencedFenceSequence"),q(k)):E(k)}function q(k){return k===c?(z++,w.consume(k),q):z>=a?(w.exit("codeFencedFenceSequence"),ue(k)?he(w,M,"whitespace")(k):M(k)):E(k)}function M(k){return k===null||re(k)?(w.exit("codeFencedFence"),D(k)):E(k)}}}function ed(e,t,n){const o=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return o.parser.lazy[o.now().line]?n(a):t(a)}}const pn={name:"codeIndented",tokenize:nd},td={partial:!0,tokenize:rd};function nd(e,t,n){const o=this;return i;function i(u){return e.enter("codeIndented"),he(e,l,"linePrefix",5)(u)}function l(u){const f=o.events[o.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?d(u):re(u)?e.attempt(td,a,d)(u):(e.enter("codeFlowValue"),c(u))}function c(u){return u===null||re(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),c)}function d(u){return e.exit("codeIndented"),t(u)}}function rd(e,t,n){const o=this;return i;function i(a){return o.parser.lazy[o.now().line]?n(a):re(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):he(e,l,"linePrefix",5)(a)}function l(a){const c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):re(a)?i(a):n(a)}}const od={name:"codeText",previous:ld,resolve:id,tokenize:ad};function id(e){let t=e.length-4,n=3,o,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=n;++o<t;)if(e[o][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(o=n-1,t++;++o<=t;)i===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(i=o):(o===t||e[o][1].type==="lineEnding")&&(e[i][1].type="codeTextData",o!==i+2&&(e[i][1].end=e[o-1][1].end,e.splice(i+2,o-i-2),t-=o-i-2,o=i+2),i=void 0);return e}function ld(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ad(e,t,n){let o=0,i,l;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),c(h)}function c(h){return h===96?(e.consume(h),o++,c):(e.exit("codeTextSequence"),d(h))}function d(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),d):h===96?(l=e.enter("codeTextSequence"),i=0,f(h)):re(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||re(h)?(e.exit("codeTextData"),d(h)):(e.consume(h),u)}function f(h){return h===96?(e.consume(h),i++,f):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(l.type="codeTextData",u(h))}}class sd{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const o=n??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,n,o){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return o&&mt(this.left,o),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),mt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),mt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);mt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);mt(this.left,n.reverse())}}}function mt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Pi(e){const t={};let n=-1,o,i,l,a,c,d,u;const f=new sd(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(o=f.get(n),n&&o[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(d=o[1]._tokenizer.events,l=0,l<d.length&&d[l][1].type==="lineEndingBlank"&&(l+=2),l<d.length&&d[l][1].type==="content"))for(;++l<d.length&&d[l][1].type!=="content";)d[l][1].type==="chunkText"&&(d[l][1]._isInFirstContentOfListItem=!0,l++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,cd(f,n)),n=t[n],u=!0);else if(o[1]._container){for(l=n,i=void 0;l--;)if(a=f.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(o[1].end={...f.get(i)[1].start},c=f.slice(i,n),c.unshift(o),f.splice(i,n-i+1,c))}}return Ne(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function cd(e,t){const n=e.get(t)[1],o=e.get(t)[2];let i=t-1;const l=[];let a=n._tokenizer;a||(a=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,d=[],u={};let f,h,x=-1,p=n,b=0,v=0;const B=[v];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(f=o.sliceStream(p),p.next||f.push(null),h&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=n;++x<c.length;)c[x][0]==="exit"&&c[x-1][0]==="enter"&&c[x][1].type===c[x-1][1].type&&c[x][1].start.line!==c[x][1].end.line&&(v=x+1,B.push(v),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):B.pop(),x=B.length;x--;){const y=c.slice(B[x],B[x+1]),S=l.pop();d.push([S,S+y.length-1]),e.splice(S,2,y)}for(d.reverse(),x=-1;++x<d.length;)u[b+d[x][0]]=b+d[x][1],b+=d[x][1]-d[x][0]-1;return u}const ud={resolve:fd,tokenize:pd},dd={partial:!0,tokenize:hd};function fd(e){return Pi(e),e}function pd(e,t){let n;return o;function o(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?l(c):re(c)?e.check(dd,a,l)(c):(e.consume(c),i)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function hd(e,t,n){const o=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),he(e,l,"linePrefix")}function l(a){if(a===null||re(a))return n(a);const c=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(o.parser.constructs.flow,n,t)(a)}}function _i(e,t,n,o,i,l,a,c,d){const u=d||Number.POSITIVE_INFINITY;let f=0;return h;function h(y){return y===60?(e.enter(o),e.enter(i),e.enter(l),e.consume(y),e.exit(l),x):y===null||y===32||y===41||Mn(y)?n(y):(e.enter(o),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(y))}function x(y){return y===62?(e.enter(l),e.consume(y),e.exit(l),e.exit(i),e.exit(o),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(c),x(y)):y===null||y===60||re(y)?n(y):(e.consume(y),y===92?b:p)}function b(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function v(y){return!f&&(y===null||y===41||Fe(y))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(o),t(y)):f<u&&y===40?(e.consume(y),f++,v):y===41?(e.consume(y),f--,v):y===null||y===32||y===40||Mn(y)?n(y):(e.consume(y),y===92?B:v)}function B(y){return y===40||y===41||y===92?(e.consume(y),v):v(y)}}function Hi(e,t,n,o,i,l){const a=this;let c=0,d;return u;function u(p){return e.enter(o),e.enter(i),e.consume(p),e.exit(i),e.enter(l),f}function f(p){return c>999||p===null||p===91||p===93&&!d||p===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(o),t):re(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||re(p)||c++>999?(e.exit("chunkString"),f(p)):(e.consume(p),d||(d=!ue(p)),p===92?x:h)}function x(p){return p===91||p===92||p===93?(e.consume(p),c++,h):h(p)}}function Wi(e,t,n,o,i,l){let a;return c;function c(x){return x===34||x===39||x===40?(e.enter(o),e.enter(i),e.consume(x),e.exit(i),a=x===40?41:x,d):n(x)}function d(x){return x===a?(e.enter(i),e.consume(x),e.exit(i),e.exit(o),t):(e.enter(l),u(x))}function u(x){return x===a?(e.exit(l),d(a)):x===null?n(x):re(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),he(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(x))}function f(x){return x===a||x===null||re(x)?(e.exit("chunkString"),u(x)):(e.consume(x),x===92?h:f)}function h(x){return x===a||x===92?(e.consume(x),f):f(x)}}function wt(e,t){let n;return o;function o(i){return re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,o):ue(i)?he(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const xd={name:"definition",tokenize:md},gd={partial:!0,tokenize:bd};function md(e,t,n){const o=this;let i;return l;function l(p){return e.enter("definition"),a(p)}function a(p){return Hi.call(o,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function c(p){return i=st(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),d):n(p)}function d(p){return Fe(p)?wt(e,u)(p):u(p)}function u(p){return _i(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(gd,h,h)(p)}function h(p){return ue(p)?he(e,x,"whitespace")(p):x(p)}function x(p){return p===null||re(p)?(e.exit("definition"),o.parser.defined.push(i),t(p)):n(p)}}function bd(e,t,n){return o;function o(c){return Fe(c)?wt(e,i)(c):n(c)}function i(c){return Wi(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return ue(c)?he(e,a,"whitespace")(c):a(c)}function a(c){return c===null||re(c)?t(c):n(c)}}const yd={name:"hardBreakEscape",tokenize:vd};function vd(e,t,n){return o;function o(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return re(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const kd={name:"headingAtx",resolve:wd,tokenize:jd};function wd(e,t){let n=e.length-2,o=3,i,l;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(i={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},l={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Ne(e,o,n-o+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function jd(e,t,n){let o=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&o++<6?(e.consume(f),a):f===null||Fe(f)?(e.exit("atxHeadingSequence"),c(f)):n(f)}function c(f){return f===35?(e.enter("atxHeadingSequence"),d(f)):f===null||re(f)?(e.exit("atxHeading"),t(f)):ue(f)?he(e,c,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function d(f){return f===35?(e.consume(f),d):(e.exit("atxHeadingSequence"),c(f))}function u(f){return f===null||f===35||Fe(f)?(e.exit("atxHeadingText"),c(f)):(e.consume(f),u)}}const Cd=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jr=["pre","script","style","textarea"],Sd={concrete:!0,name:"htmlFlow",resolveTo:Ed,tokenize:Ld},Bd={partial:!0,tokenize:Td},Fd={partial:!0,tokenize:Id};function Ed(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ld(e,t,n){const o=this;let i,l,a,c,d;return u;function u(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),h}function h(m){return m===33?(e.consume(m),x):m===47?(e.consume(m),l=!0,v):m===63?(e.consume(m),i=3,o.interrupt?t:g):Me(m)?(e.consume(m),a=String.fromCharCode(m),B):n(m)}function x(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,c=0,b):Me(m)?(e.consume(m),i=4,o.interrupt?t:g):n(m)}function p(m){return m===45?(e.consume(m),o.interrupt?t:g):n(m)}function b(m){const O="CDATA[";return m===O.charCodeAt(c++)?(e.consume(m),c===O.length?o.interrupt?t:T:b):n(m)}function v(m){return Me(m)?(e.consume(m),a=String.fromCharCode(m),B):n(m)}function B(m){if(m===null||m===47||m===62||Fe(m)){const O=m===47,G=a.toLowerCase();return!O&&!l&&Jr.includes(G)?(i=1,o.interrupt?t(m):T(m)):Cd.includes(a.toLowerCase())?(i=6,O?(e.consume(m),y):o.interrupt?t(m):T(m)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(m):l?S(m):j(m))}return m===45||De(m)?(e.consume(m),a+=String.fromCharCode(m),B):n(m)}function y(m){return m===62?(e.consume(m),o.interrupt?t:T):n(m)}function S(m){return ue(m)?(e.consume(m),S):N(m)}function j(m){return m===47?(e.consume(m),N):m===58||m===95||Me(m)?(e.consume(m),C):ue(m)?(e.consume(m),j):N(m)}function C(m){return m===45||m===46||m===58||m===95||De(m)?(e.consume(m),C):F(m)}function F(m){return m===61?(e.consume(m),w):ue(m)?(e.consume(m),F):j(m)}function w(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),d=m,D):ue(m)?(e.consume(m),w):E(m)}function D(m){return m===d?(e.consume(m),d=null,z):m===null||re(m)?n(m):(e.consume(m),D)}function E(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||Fe(m)?F(m):(e.consume(m),E)}function z(m){return m===47||m===62||ue(m)?j(m):n(m)}function N(m){return m===62?(e.consume(m),R):n(m)}function R(m){return m===null||re(m)?T(m):ue(m)?(e.consume(m),R):n(m)}function T(m){return m===45&&i===2?(e.consume(m),P):m===60&&i===1?(e.consume(m),$):m===62&&i===4?(e.consume(m),H):m===63&&i===3?(e.consume(m),g):m===93&&i===5?(e.consume(m),J):re(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Bd,A,q)(m)):m===null||re(m)?(e.exit("htmlFlowData"),q(m)):(e.consume(m),T)}function q(m){return e.check(Fd,M,A)(m)}function M(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),k}function k(m){return m===null||re(m)?q(m):(e.enter("htmlFlowData"),T(m))}function P(m){return m===45?(e.consume(m),g):T(m)}function $(m){return m===47?(e.consume(m),a="",Q):T(m)}function Q(m){if(m===62){const O=a.toLowerCase();return Jr.includes(O)?(e.consume(m),H):T(m)}return Me(m)&&a.length<8?(e.consume(m),a+=String.fromCharCode(m),Q):T(m)}function J(m){return m===93?(e.consume(m),g):T(m)}function g(m){return m===62?(e.consume(m),H):m===45&&i===2?(e.consume(m),g):T(m)}function H(m){return m===null||re(m)?(e.exit("htmlFlowData"),A(m)):(e.consume(m),H)}function A(m){return e.exit("htmlFlow"),t(m)}}function Id(e,t,n){const o=this;return i;function i(a){return re(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return o.parser.lazy[o.now().line]?n(a):t(a)}}function Td(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qt,t,n)}}const Dd={name:"htmlText",tokenize:Ad};function Ad(e,t,n){const o=this;let i,l,a;return c;function c(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),d}function d(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),F):g===63?(e.consume(g),j):Me(g)?(e.consume(g),E):n(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),l=0,b):Me(g)?(e.consume(g),S):n(g)}function f(g){return g===45?(e.consume(g),p):n(g)}function h(g){return g===null?n(g):g===45?(e.consume(g),x):re(g)?(a=h,$(g)):(e.consume(g),h)}function x(g){return g===45?(e.consume(g),p):h(g)}function p(g){return g===62?P(g):g===45?x(g):h(g)}function b(g){const H="CDATA[";return g===H.charCodeAt(l++)?(e.consume(g),l===H.length?v:b):n(g)}function v(g){return g===null?n(g):g===93?(e.consume(g),B):re(g)?(a=v,$(g)):(e.consume(g),v)}function B(g){return g===93?(e.consume(g),y):v(g)}function y(g){return g===62?P(g):g===93?(e.consume(g),y):v(g)}function S(g){return g===null||g===62?P(g):re(g)?(a=S,$(g)):(e.consume(g),S)}function j(g){return g===null?n(g):g===63?(e.consume(g),C):re(g)?(a=j,$(g)):(e.consume(g),j)}function C(g){return g===62?P(g):j(g)}function F(g){return Me(g)?(e.consume(g),w):n(g)}function w(g){return g===45||De(g)?(e.consume(g),w):D(g)}function D(g){return re(g)?(a=D,$(g)):ue(g)?(e.consume(g),D):P(g)}function E(g){return g===45||De(g)?(e.consume(g),E):g===47||g===62||Fe(g)?z(g):n(g)}function z(g){return g===47?(e.consume(g),P):g===58||g===95||Me(g)?(e.consume(g),N):re(g)?(a=z,$(g)):ue(g)?(e.consume(g),z):P(g)}function N(g){return g===45||g===46||g===58||g===95||De(g)?(e.consume(g),N):R(g)}function R(g){return g===61?(e.consume(g),T):re(g)?(a=R,$(g)):ue(g)?(e.consume(g),R):z(g)}function T(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,q):re(g)?(a=T,$(g)):ue(g)?(e.consume(g),T):(e.consume(g),M)}function q(g){return g===i?(e.consume(g),i=void 0,k):g===null?n(g):re(g)?(a=q,$(g)):(e.consume(g),q)}function M(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||Fe(g)?z(g):(e.consume(g),M)}function k(g){return g===47||g===62||Fe(g)?z(g):n(g)}function P(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function $(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Q}function Q(g){return ue(g)?he(e,J,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):J(g)}function J(g){return e.enter("htmlTextData"),a(g)}}const cr={name:"labelEnd",resolveAll:Od,resolveTo:Nd,tokenize:Pd},zd={tokenize:_d},Rd={tokenize:Hd},Md={tokenize:Wd};function Od(e){let t=-1;const n=[];for(;++t<e.length;){const o=e[t][1];if(n.push(e[t]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const i=o.type==="labelImage"?4:2;o.type="data",t+=i}}return e.length!==n.length&&Ne(e,0,e.length,n),e}function Nd(e,t){let n=e.length,o=0,i,l,a,c;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(a=n);const d={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},f={type:"labelText",start:{...e[l+o+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",d,t],["enter",u,t]],c=Ae(c,e.slice(l+1,l+o+3)),c=Ae(c,[["enter",f,t]]),c=Ae(c,sr(t.parser.constructs.insideSpan.null,e.slice(l+o+4,a-3),t)),c=Ae(c,[["exit",f,t],e[a-2],e[a-1],["exit",u,t]]),c=Ae(c,e.slice(a+1)),c=Ae(c,[["exit",d,t]]),Ne(e,l,e.length,c),e}function Pd(e,t,n){const o=this;let i=o.events.length,l,a;for(;i--;)if((o.events[i][1].type==="labelImage"||o.events[i][1].type==="labelLink")&&!o.events[i][1]._balanced){l=o.events[i][1];break}return c;function c(x){return l?l._inactive?h(x):(a=o.parser.defined.includes(st(o.sliceSerialize({start:l.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(zd,f,a?f:h)(x):x===91?e.attempt(Rd,f,a?u:h)(x):a?f(x):h(x)}function u(x){return e.attempt(Md,f,h)(x)}function f(x){return t(x)}function h(x){return l._balanced=!0,n(x)}}function _d(e,t,n){return o;function o(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Fe(h)?wt(e,l)(h):l(h)}function l(h){return h===41?f(h):_i(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Fe(h)?wt(e,d)(h):f(h)}function c(h){return n(h)}function d(h){return h===34||h===39||h===40?Wi(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function u(h){return Fe(h)?wt(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function Hd(e,t,n){const o=this;return i;function i(c){return Hi.call(o,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return o.parser.defined.includes(st(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function Wd(e,t,n){return o;function o(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const qd={name:"labelStartImage",resolveAll:cr.resolveAll,tokenize:Vd};function Vd(e,t,n){const o=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(c):t(c)}}const $d={name:"labelStartLink",resolveAll:cr.resolveAll,tokenize:Ud};function Ud(e,t,n){const o=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(a):t(a)}}const hn={name:"lineEnding",tokenize:Gd};function Gd(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),he(e,t,"linePrefix")}}const Pt={name:"thematicBreak",tokenize:Yd};function Yd(e,t,n){let o=0,i;return l;function l(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,c(u)}function c(u){return u===i?(e.enter("thematicBreakSequence"),d(u)):o>=3&&(u===null||re(u))?(e.exit("thematicBreak"),t(u)):n(u)}function d(u){return u===i?(e.consume(u),o++,d):(e.exit("thematicBreakSequence"),ue(u)?he(e,c,"whitespace")(u):c(u))}}const Se={continuation:{tokenize:Jd},exit:ef,name:"list",tokenize:Xd},Kd={partial:!0,tokenize:tf},Zd={partial:!0,tokenize:Qd};function Xd(e,t,n){const o=this,i=o.events[o.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return c;function c(p){const b=o.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!o.containerState.marker||p===o.containerState.marker:On(p)){if(o.containerState.type||(o.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Pt,n,u)(p):u(p);if(!o.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(p)}return n(p)}function d(p){return On(p)&&++a<10?(e.consume(p),d):(!o.interrupt||a<2)&&(o.containerState.marker?p===o.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||p,e.check(Qt,o.interrupt?n:f,e.attempt(Kd,x,h))}function f(p){return o.containerState.initialBlankLine=!0,l++,x(p)}function h(p){return ue(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),x):n(p)}function x(p){return o.containerState.size=l+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Jd(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(Qt,i,l);function i(c){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,he(e,t,"listItemIndent",o.containerState.size+1)(c)}function l(c){return o.containerState.furtherBlankLines||!ue(c)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,a(c)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Zd,t,a)(c))}function a(c){return o.containerState._closeFlow=!0,o.interrupt=void 0,he(e,e.attempt(Se,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Qd(e,t,n){const o=this;return he(e,i,"listItemIndent",o.containerState.size+1);function i(l){const a=o.events[o.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===o.containerState.size?t(l):n(l)}}function ef(e){e.exit(this.containerState.type)}function tf(e,t,n){const o=this;return he(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const a=o.events[o.events.length-1];return!ue(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Qr={name:"setextUnderline",resolveTo:nf,tokenize:rf};function nf(e,t){let n=e.length,o,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",a,t]),e.splice(l+1,0,["exit",e[o][1],t]),e[o][1].end={...e[l][1].end}):e[o][1]=a,e.push(["exit",a,t]),e}function rf(e,t,n){const o=this;let i;return l;function l(u){let f=o.events.length,h;for(;f--;)if(o.events[f][1].type!=="lineEnding"&&o.events[f][1].type!=="linePrefix"&&o.events[f][1].type!=="content"){h=o.events[f][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||h)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),c(u)}function c(u){return u===i?(e.consume(u),c):(e.exit("setextHeadingLineSequence"),ue(u)?he(e,d,"lineSuffix")(u):d(u))}function d(u){return u===null||re(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const of={tokenize:lf};function lf(e){const t=this,n=e.attempt(Qt,o,e.attempt(this.parser.constructs.flowInitial,i,he(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ud,i)),"linePrefix")));return n;function o(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const af={resolveAll:Vi()},sf=qi("string"),cf=qi("text");function qi(e){return{resolveAll:Vi(e==="text"?uf:void 0),tokenize:t};function t(n){const o=this,i=this.parser.constructs[e],l=n.attempt(i,a,c);return a;function a(f){return u(f)?l(f):c(f)}function c(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),d}function d(f){return u(f)?(n.exit("data"),l(f)):(n.consume(f),d)}function u(f){if(f===null)return!0;const h=i[f];let x=-1;if(h)for(;++x<h.length;){const p=h[x];if(!p.previous||p.previous.call(o,o.previous))return!0}return!1}}}function Vi(e){return t;function t(n,o){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,o):n}}function uf(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const o=e[n-1][1],i=t.sliceStream(o);let l=i.length,a=-1,c=0,d;for(;l--;){const u=i[l];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(u===-2)d=!0,c++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const u={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:o.start._bufferIndex+a,_index:o.start._index+l,line:o.end.line,column:o.end.column-c,offset:o.end.offset-c},end:{...o.end}};o.end={...u.start},o.start.offset===o.end.offset?Object.assign(o,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const df={42:Se,43:Se,45:Se,48:Se,49:Se,50:Se,51:Se,52:Se,53:Se,54:Se,55:Se,56:Se,57:Se,62:Mi},ff={91:xd},pf={[-2]:pn,[-1]:pn,32:pn},hf={35:kd,42:Pt,45:[Qr,Pt],60:Sd,61:Qr,95:Pt,96:Xr,126:Xr},xf={38:Ni,92:Oi},gf={[-5]:hn,[-4]:hn,[-3]:hn,33:qd,38:Ni,42:Nn,60:[$u,Dd],91:$d,92:[yd,Oi],93:cr,95:Nn,96:od},mf={null:[Nn,af]},bf={null:[42,95]},yf={null:[]},vf=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bf,contentInitial:ff,disable:yf,document:df,flow:hf,flowInitial:pf,insideSpan:mf,string:xf,text:gf},Symbol.toStringTag,{value:"Module"}));function kf(e,t,n){let o={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let a=[],c=[];const d={attempt:D(F),check:D(w),consume:S,enter:j,exit:C,interrupt:D(w,{interrupt:!0})},u={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:x,sliceStream:p,write:h};let f=t.tokenize.call(u,d);return t.resolveAll&&l.push(t),u;function h(R){return a=Ae(a,R),B(),a[a.length-1]!==null?[]:(E(t,0),u.events=sr(l,u.events,u),u.events)}function x(R,T){return jf(p(R),T)}function p(R){return wf(a,R)}function b(){const{_bufferIndex:R,_index:T,line:q,column:M,offset:k}=o;return{_bufferIndex:R,_index:T,line:q,column:M,offset:k}}function v(R){i[R.line]=R.column,N()}function B(){let R;for(;o._index<a.length;){const T=a[o._index];if(typeof T=="string")for(R=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===R&&o._bufferIndex<T.length;)y(T.charCodeAt(o._bufferIndex));else y(T)}}function y(R){f=f(R)}function S(R){re(R)?(o.line++,o.column=1,o.offset+=R===-3?2:1,N()):R!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===a[o._index].length&&(o._bufferIndex=-1,o._index++)),u.previous=R}function j(R,T){const q=T||{};return q.type=R,q.start=b(),u.events.push(["enter",q,u]),c.push(q),q}function C(R){const T=c.pop();return T.end=b(),u.events.push(["exit",T,u]),T}function F(R,T){E(R,T.from)}function w(R,T){T.restore()}function D(R,T){return q;function q(M,k,P){let $,Q,J,g;return Array.isArray(M)?A(M):"tokenize"in M?A([M]):H(M);function H(K){return Y;function Y(Z){const ae=Z!==null&&K[Z],X=Z!==null&&K.null,ne=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(X)?X:X?[X]:[]];return A(ne)(Z)}}function A(K){return $=K,Q=0,K.length===0?P:m(K[Q])}function m(K){return Y;function Y(Z){return g=z(),J=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?G():K.tokenize.call(T?Object.assign(Object.create(u),T):u,d,O,G)(Z)}}function O(K){return R(J,g),k}function G(K){return g.restore(),++Q<$.length?m($[Q]):P}}}function E(R,T){R.resolveAll&&!l.includes(R)&&l.push(R),R.resolve&&Ne(u.events,T,u.events.length-T,R.resolve(u.events.slice(T),u)),R.resolveTo&&(u.events=R.resolveTo(u.events,u))}function z(){const R=b(),T=u.previous,q=u.currentConstruct,M=u.events.length,k=Array.from(c);return{from:M,restore:P};function P(){o=R,u.previous=T,u.currentConstruct=q,u.events.length=M,c=k,N()}}function N(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function wf(e,t){const n=t.start._index,o=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(o,l)];else{if(a=e.slice(n,i),o>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(o):a.shift()}l>0&&a.push(e[i].slice(0,l))}return a}function jf(e,t){let n=-1;const o=[];let i;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
424
424
  `;break}case-3:{a=`\r
425
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(l)}i=l===-2,o.push(a)}return o.join("")}function Cf(e){const o={constructs:Iu([vf,...(e||{}).extensions||[]]),content:i(Nu),defined:[],document:i(_u),flow:i(of),lazy:{},string:i(sf),text:i(cf)};return o;function i(l){return a;function a(c){return kf(o,l,c)}}}function Sf(e){for(;!Pi(e););return e}const eo=/[\0\t\n\r]/g;function Bf(){let e=1,t="",n=!0,o;return i;function i(l,a,c){const f=[];let u,d,p,x,h;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),p=0,t="",n&&(l.charCodeAt(0)===65279&&p++,n=void 0);p<l.length;){if(eo.lastIndex=p,u=eo.exec(l),x=u&&u.index!==void 0?u.index:l.length,h=l.charCodeAt(x),!u){t=l.slice(p);break}if(h===10&&p===x&&o)f.push(-3),o=void 0;else switch(o&&(f.push(-5),o=void 0),p<x&&(f.push(l.slice(p,x)),e+=x-p),h){case 0:{f.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,f.push(-2);e++<d;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:o=!0,e=1}p=x+1}return c&&(o&&f.push(-5),t&&f.push(t),f.push(null)),f}}const Ff=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ef(e){return e.replace(Ff,Lf)}function Lf(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return Ri(n.slice(l?2:1),l?16:10)}return ar(n)||e}const $i={}.hasOwnProperty;function If(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Tf(n)(Sf(Cf(n).document().write(Bf()(e,t,!0))))}function Tf(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Et),autolinkProtocol:A,autolinkEmail:A,atxHeading:l(ve),blockQuote:l(J),characterEscape:A,characterReference:A,codeFenced:l(re),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(re,a),codeText:l(ae,a),codeTextData:A,data:A,codeFlowValue:A,definition:l(xe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(ge),hardBreakEscape:l(we),hardBreakTrailing:l(we),htmlFlow:l(dt,a),htmlFlowData:A,htmlText:l(dt,a),htmlTextData:A,image:l(pe),label:a,link:l(Et),listItem:l(nn),listItemValue:x,listOrdered:l(Lt,p),listUnordered:l(Lt),paragraph:l(It),reference:m,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(ve),strong:l(rn),thematicBreak:l(se)},exit:{atxHeading:f(),atxHeadingSequence:B,autolink:f(),autolinkEmail:le,autolinkProtocol:K,blockQuote:f(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:Z,characterReference:Y,codeFenced:f(F),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:M,codeIndented:f(y),codeText:f(k),codeTextData:M,data:M,definition:f(),definitionDestinationString:S,definitionLabelString:j,definitionTitleString:C,emphasis:f(),hardBreakEscape:f(T),hardBreakTrailing:f(T),htmlFlow:f(W),htmlFlowData:M,htmlText:f(R),htmlTextData:M,image:f(V),label:X,labelText:Q,lineEnding:z,link:f(P),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:N,resourceDestinationString:g,resourceTitleString:O,resource:H,setextHeading:f(E),setextHeadingLineSequence:D,setextHeadingText:w,strong:f(),thematicBreak:f()}};Ui(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(L){let q={type:"root",children:[]};const ee={stack:[q],tokenStack:[],config:t,enter:c,exit:u,buffer:a,resume:d,data:n},ie=[];let ce=-1;for(;++ce<L.length;)if(L[ce][1].type==="listOrdered"||L[ce][1].type==="listUnordered")if(L[ce][0]==="enter")ie.push(ce);else{const je=ie.pop();ce=i(L,je,ce)}for(ce=-1;++ce<L.length;){const je=t[L[ce][0]];$i.call(je,L[ce][1].type)&&je[L[ce][1].type].call(Object.assign({sliceSerialize:L[ce][2].sliceSerialize},ee),L[ce][1])}if(ee.tokenStack.length>0){const je=ee.tokenStack[ee.tokenStack.length-1];(je[1]||to).call(ee,void 0,je[0])}for(q.position={start:We(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:We(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)q=t.transforms[ce](q)||q;return q}function i(L,q,ee){let ie=q-1,ce=-1,je=!1,Pe,Le,ft,pt;for(;++ie<=ee;){const Ie=L[ie];switch(Ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ie[0]==="enter"?ce++:ce--,pt=void 0;break}case"lineEndingBlank":{Ie[0]==="enter"&&(Pe&&!pt&&!ce&&!ft&&(ft=ie),pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:pt=void 0}if(!ce&&Ie[0]==="enter"&&Ie[1].type==="listItemPrefix"||ce===-1&&Ie[0]==="exit"&&(Ie[1].type==="listUnordered"||Ie[1].type==="listOrdered")){if(Pe){let Qe=ie;for(Le=void 0;Qe--;){const _e=L[Qe];if(_e[1].type==="lineEnding"||_e[1].type==="lineEndingBlank"){if(_e[0]==="exit")continue;Le&&(L[Le][1].type="lineEndingBlank",je=!0),_e[1].type="lineEnding",Le=Qe}else if(!(_e[1].type==="linePrefix"||_e[1].type==="blockQuotePrefix"||_e[1].type==="blockQuotePrefixWhitespace"||_e[1].type==="blockQuoteMarker"||_e[1].type==="listItemIndent"))break}ft&&(!Le||ft<Le)&&(Pe._spread=!0),Pe.end=Object.assign({},Le?L[Le][1].start:Ie[1].end),L.splice(Le||ie,0,["exit",Pe,Ie[2]]),ie++,ee++}if(Ie[1].type==="listItemPrefix"){const Qe={type:"listItem",_spread:!1,start:Object.assign({},Ie[1].start),end:void 0};Pe=Qe,L.splice(ie,0,["enter",Qe,Ie[2]]),ie++,ee++,ft=void 0,pt=!0}}}return L[q][1]._spread=je,ee}function l(L,q){return ee;function ee(ie){c.call(this,L(ie),ie),q&&q.call(this,ie)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(L,q,ee){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([q,ee||void 0]),L.position={start:We(q.start),end:void 0}}function f(L){return q;function q(ee){L&&L.call(this,ee),u.call(this,ee)}}function u(L,q){const ee=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==L.type&&(q?q.call(this,L,ie[0]):(ie[1]||to).call(this,L,ie[0]));else throw new Error("Cannot close `"+L.type+"` ("+kt({start:L.start,end:L.end})+"): it’s not open");ee.position.end=We(L.end)}function d(){return Fu(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function x(L){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function h(){const L=this.resume(),q=this.stack[this.stack.length-1];q.lang=L}function b(){const L=this.resume(),q=this.stack[this.stack.length-1];q.meta=L}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function F(){const L=this.resume(),q=this.stack[this.stack.length-1];q.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const L=this.resume(),q=this.stack[this.stack.length-1];q.value=L.replace(/(\r?\n|\r)$/g,"")}function j(L){const q=this.resume(),ee=this.stack[this.stack.length-1];ee.label=q,ee.identifier=st(this.sliceSerialize(L)).toLowerCase()}function C(){const L=this.resume(),q=this.stack[this.stack.length-1];q.title=L}function S(){const L=this.resume(),q=this.stack[this.stack.length-1];q.url=L}function B(L){const q=this.stack[this.stack.length-1];if(!q.depth){const ee=this.sliceSerialize(L).length;q.depth=ee}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function D(L){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function A(L){const ee=this.stack[this.stack.length-1].children;let ie=ee[ee.length-1];(!ie||ie.type!=="text")&&(ie=te(),ie.position={start:We(L.start),end:void 0},ee.push(ie)),this.stack.push(ie)}function M(L){const q=this.stack.pop();q.value+=this.sliceSerialize(L),q.position.end=We(L.end)}function z(L){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ee=q.children[q.children.length-1];ee.position.end=We(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(A.call(this,L),M.call(this,L))}function T(){this.data.atHardBreak=!0}function W(){const L=this.resume(),q=this.stack[this.stack.length-1];q.value=L}function R(){const L=this.resume(),q=this.stack[this.stack.length-1];q.value=L}function k(){const L=this.resume(),q=this.stack[this.stack.length-1];q.value=L}function P(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=q,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function V(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=q,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function Q(L){const q=this.sliceSerialize(L),ee=this.stack[this.stack.length-2];ee.label=Ef(q),ee.identifier=st(q).toLowerCase()}function X(){const L=this.stack[this.stack.length-1],q=this.resume(),ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,ee.type==="link"){const ie=L.children;ee.children=ie}else ee.alt=q}function g(){const L=this.resume(),q=this.stack[this.stack.length-1];q.url=L}function O(){const L=this.resume(),q=this.stack[this.stack.length-1];q.title=L}function H(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function N(L){const q=this.resume(),ee=this.stack[this.stack.length-1];ee.label=q,ee.identifier=st(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function G(L){this.data.characterReferenceType=L.type}function Z(L){const q=this.sliceSerialize(L),ee=this.data.characterReferenceType;let ie;ee?(ie=Ri(q,ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=ar(q);const ce=this.stack[this.stack.length-1];ce.value+=ie}function Y(L){const q=this.stack.pop();q.position.end=We(L.end)}function K(L){M.call(this,L);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(L)}function le(L){M.call(this,L);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(L)}function J(){return{type:"blockquote",children:[]}}function re(){return{type:"code",lang:null,meta:null,value:""}}function ae(){return{type:"inlineCode",value:""}}function xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ge(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function we(){return{type:"break"}}function dt(){return{type:"html",value:""}}function pe(){return{type:"image",title:null,url:"",alt:null}}function Et(){return{type:"link",title:null,url:"",children:[]}}function Lt(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function nn(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function It(){return{type:"paragraph",children:[]}}function rn(){return{type:"strong",children:[]}}function te(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}function We(e){return{line:e.line,column:e.column,offset:e.offset}}function Ui(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?Ui(e,o):Df(e,o)}}function Df(e,t){let n;for(n in t)if($i.call(t,n))switch(n){case"canContainEols":{const o=t[n];o&&e[n].push(...o);break}case"transforms":{const o=t[n];o&&e[n].push(...o);break}case"enter":case"exit":{const o=t[n];o&&Object.assign(e[n],o);break}}}function to(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+kt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+kt({start:t.start,end:t.end})+") is still open")}function Af(e){const t=this;t.parser=n;function n(o){return If(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function zf(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Rf(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
425
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(l)}i=l===-2,o.push(a)}return o.join("")}function Cf(e){const o={constructs:Iu([vf,...(e||{}).extensions||[]]),content:i(Nu),defined:[],document:i(_u),flow:i(of),lazy:{},string:i(sf),text:i(cf)};return o;function i(l){return a;function a(c){return kf(o,l,c)}}}function Sf(e){for(;!Pi(e););return e}const eo=/[\0\t\n\r]/g;function Bf(){let e=1,t="",n=!0,o;return i;function i(l,a,c){const d=[];let u,f,h,x,p;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),h=0,t="",n&&(l.charCodeAt(0)===65279&&h++,n=void 0);h<l.length;){if(eo.lastIndex=h,u=eo.exec(l),x=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(x),!u){t=l.slice(h);break}if(p===10&&h===x&&o)d.push(-3),o=void 0;else switch(o&&(d.push(-5),o=void 0),h<x&&(d.push(l.slice(h,x)),e+=x-h),p){case 0:{d.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,d.push(-2);e++<f;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:o=!0,e=1}h=x+1}return c&&(o&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Ff=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ef(e){return e.replace(Ff,Lf)}function Lf(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return Ri(n.slice(l?2:1),l?16:10)}return ar(n)||e}const $i={}.hasOwnProperty;function If(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Tf(n)(Sf(Cf(n).document().write(Bf()(e,t,!0))))}function Tf(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Et),autolinkProtocol:z,autolinkEmail:z,atxHeading:l(xe),blockQuote:l(X),characterEscape:z,characterReference:z,codeFenced:l(ne),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(ne,a),codeText:l(le,a),codeTextData:z,data:z,codeFlowValue:z,definition:l(ge),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(we),hardBreakEscape:l(je),hardBreakTrailing:l(je),htmlFlow:l(dt,a),htmlFlowData:z,htmlText:l(dt,a),htmlTextData:z,image:l(pe),label:a,link:l(Et),listItem:l(nn),listItemValue:x,listOrdered:l(Lt,h),listUnordered:l(Lt),paragraph:l(It),reference:m,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(xe),strong:l(rn),thematicBreak:l(se)},exit:{atxHeading:d(),atxHeadingSequence:F,autolink:d(),autolinkEmail:ae,autolinkProtocol:Z,blockQuote:d(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:K,characterReference:Y,codeFenced:d(B),codeFencedFence:v,codeFencedFenceInfo:p,codeFencedFenceMeta:b,codeFlowValue:N,codeIndented:d(y),codeText:d(k),codeTextData:N,data:N,definition:d(),definitionDestinationString:C,definitionLabelString:S,definitionTitleString:j,emphasis:d(),hardBreakEscape:d(T),hardBreakTrailing:d(T),htmlFlow:d(q),htmlFlowData:N,htmlText:d(M),htmlTextData:N,image:d($),label:J,labelText:Q,lineEnding:R,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:O,resourceDestinationString:g,resourceTitleString:H,resource:A,setextHeading:d(E),setextHeadingLineSequence:D,setextHeadingText:w,strong:d(),thematicBreak:d()}};Ui(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(L){let W={type:"root",children:[]};const ee={stack:[W],tokenStack:[],config:t,enter:c,exit:u,buffer:a,resume:f,data:n},ie=[];let ce=-1;for(;++ce<L.length;)if(L[ce][1].type==="listOrdered"||L[ce][1].type==="listUnordered")if(L[ce][0]==="enter")ie.push(ce);else{const Ce=ie.pop();ce=i(L,Ce,ce)}for(ce=-1;++ce<L.length;){const Ce=t[L[ce][0]];$i.call(Ce,L[ce][1].type)&&Ce[L[ce][1].type].call(Object.assign({sliceSerialize:L[ce][2].sliceSerialize},ee),L[ce][1])}if(ee.tokenStack.length>0){const Ce=ee.tokenStack[ee.tokenStack.length-1];(Ce[1]||to).call(ee,void 0,Ce[0])}for(W.position={start:We(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:We(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)W=t.transforms[ce](W)||W;return W}function i(L,W,ee){let ie=W-1,ce=-1,Ce=!1,Pe,Le,ft,pt;for(;++ie<=ee;){const Ie=L[ie];switch(Ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ie[0]==="enter"?ce++:ce--,pt=void 0;break}case"lineEndingBlank":{Ie[0]==="enter"&&(Pe&&!pt&&!ce&&!ft&&(ft=ie),pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:pt=void 0}if(!ce&&Ie[0]==="enter"&&Ie[1].type==="listItemPrefix"||ce===-1&&Ie[0]==="exit"&&(Ie[1].type==="listUnordered"||Ie[1].type==="listOrdered")){if(Pe){let Qe=ie;for(Le=void 0;Qe--;){const _e=L[Qe];if(_e[1].type==="lineEnding"||_e[1].type==="lineEndingBlank"){if(_e[0]==="exit")continue;Le&&(L[Le][1].type="lineEndingBlank",Ce=!0),_e[1].type="lineEnding",Le=Qe}else if(!(_e[1].type==="linePrefix"||_e[1].type==="blockQuotePrefix"||_e[1].type==="blockQuotePrefixWhitespace"||_e[1].type==="blockQuoteMarker"||_e[1].type==="listItemIndent"))break}ft&&(!Le||ft<Le)&&(Pe._spread=!0),Pe.end=Object.assign({},Le?L[Le][1].start:Ie[1].end),L.splice(Le||ie,0,["exit",Pe,Ie[2]]),ie++,ee++}if(Ie[1].type==="listItemPrefix"){const Qe={type:"listItem",_spread:!1,start:Object.assign({},Ie[1].start),end:void 0};Pe=Qe,L.splice(ie,0,["enter",Qe,Ie[2]]),ie++,ee++,ft=void 0,pt=!0}}}return L[W][1]._spread=Ce,ee}function l(L,W){return ee;function ee(ie){c.call(this,L(ie),ie),W&&W.call(this,ie)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(L,W,ee){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([W,ee||void 0]),L.position={start:We(W.start),end:void 0}}function d(L){return W;function W(ee){L&&L.call(this,ee),u.call(this,ee)}}function u(L,W){const ee=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==L.type&&(W?W.call(this,L,ie[0]):(ie[1]||to).call(this,L,ie[0]));else throw new Error("Cannot close `"+L.type+"` ("+kt({start:L.start,end:L.end})+"): it’s not open");ee.position.end=We(L.end)}function f(){return Fu(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function x(L){if(this.data.expectingFirstListItemValue){const W=this.stack[this.stack.length-2];W.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function p(){const L=this.resume(),W=this.stack[this.stack.length-1];W.lang=L}function b(){const L=this.resume(),W=this.stack[this.stack.length-1];W.meta=L}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function B(){const L=this.resume(),W=this.stack[this.stack.length-1];W.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const L=this.resume(),W=this.stack[this.stack.length-1];W.value=L.replace(/(\r?\n|\r)$/g,"")}function S(L){const W=this.resume(),ee=this.stack[this.stack.length-1];ee.label=W,ee.identifier=st(this.sliceSerialize(L)).toLowerCase()}function j(){const L=this.resume(),W=this.stack[this.stack.length-1];W.title=L}function C(){const L=this.resume(),W=this.stack[this.stack.length-1];W.url=L}function F(L){const W=this.stack[this.stack.length-1];if(!W.depth){const ee=this.sliceSerialize(L).length;W.depth=ee}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function D(L){const W=this.stack[this.stack.length-1];W.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function z(L){const ee=this.stack[this.stack.length-1].children;let ie=ee[ee.length-1];(!ie||ie.type!=="text")&&(ie=te(),ie.position={start:We(L.start),end:void 0},ee.push(ie)),this.stack.push(ie)}function N(L){const W=this.stack.pop();W.value+=this.sliceSerialize(L),W.position.end=We(L.end)}function R(L){const W=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ee=W.children[W.children.length-1];ee.position.end=We(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(W.type)&&(z.call(this,L),N.call(this,L))}function T(){this.data.atHardBreak=!0}function q(){const L=this.resume(),W=this.stack[this.stack.length-1];W.value=L}function M(){const L=this.resume(),W=this.stack[this.stack.length-1];W.value=L}function k(){const L=this.resume(),W=this.stack[this.stack.length-1];W.value=L}function P(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=W,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function $(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=W,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function Q(L){const W=this.sliceSerialize(L),ee=this.stack[this.stack.length-2];ee.label=Ef(W),ee.identifier=st(W).toLowerCase()}function J(){const L=this.stack[this.stack.length-1],W=this.resume(),ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,ee.type==="link"){const ie=L.children;ee.children=ie}else ee.alt=W}function g(){const L=this.resume(),W=this.stack[this.stack.length-1];W.url=L}function H(){const L=this.resume(),W=this.stack[this.stack.length-1];W.title=L}function A(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function O(L){const W=this.resume(),ee=this.stack[this.stack.length-1];ee.label=W,ee.identifier=st(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function G(L){this.data.characterReferenceType=L.type}function K(L){const W=this.sliceSerialize(L),ee=this.data.characterReferenceType;let ie;ee?(ie=Ri(W,ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=ar(W);const ce=this.stack[this.stack.length-1];ce.value+=ie}function Y(L){const W=this.stack.pop();W.position.end=We(L.end)}function Z(L){N.call(this,L);const W=this.stack[this.stack.length-1];W.url=this.sliceSerialize(L)}function ae(L){N.call(this,L);const W=this.stack[this.stack.length-1];W.url="mailto:"+this.sliceSerialize(L)}function X(){return{type:"blockquote",children:[]}}function ne(){return{type:"code",lang:null,meta:null,value:""}}function le(){return{type:"inlineCode",value:""}}function ge(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function je(){return{type:"break"}}function dt(){return{type:"html",value:""}}function pe(){return{type:"image",title:null,url:"",alt:null}}function Et(){return{type:"link",title:null,url:"",children:[]}}function Lt(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function nn(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function It(){return{type:"paragraph",children:[]}}function rn(){return{type:"strong",children:[]}}function te(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}function We(e){return{line:e.line,column:e.column,offset:e.offset}}function Ui(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?Ui(e,o):Df(e,o)}}function Df(e,t){let n;for(n in t)if($i.call(t,n))switch(n){case"canContainEols":{const o=t[n];o&&e[n].push(...o);break}case"transforms":{const o=t[n];o&&e[n].push(...o);break}case"enter":case"exit":{const o=t[n];o&&Object.assign(e[n],o);break}}}function to(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+kt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+kt({start:t.start,end:t.end})+") is still open")}function Af(e){const t=this;t.parser=n;function n(o){return If(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function zf(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Rf(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
426
426
  `}]}function Mf(e,t){const n=t.value?t.value+`
427
- `:"",o={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(o.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function Of(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nf(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pf(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=ut(o.toLowerCase()),l=e.footnoteOrder.indexOf(o);let a,c=e.footnoteCounts.get(o);c===void 0?(c=0,e.footnoteOrder.push(o),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(o,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,f);const u={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,u),e.applyData(t,u)}function _f(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hf(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Gi(e,t){const n=t.referenceType;let o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+o}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=o:i.push({type:"text",value:o}),i}function Wf(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Gi(e,t);const i={src:ut(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function qf(e,t){const n={src:ut(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,o),e.applyData(t,o)}function Vf(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,o),e.applyData(t,o)}function $f(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Gi(e,t);const i={href:ut(o.url||"")};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Uf(e,t){const n={href:ut(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const o={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Gf(e,t,n){const o=e.all(t),i=n?Yf(n):Yi(t),l={},a=[];if(typeof t.checked=="boolean"){const d=o[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},o.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<o.length;){const d=o[c];(i||c!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
428
- `}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const f=o[o.length-1];f&&(i||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
429
- `});const u={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,u),e.applyData(t,u)}function Yf(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let o=-1;for(;!t&&++o<n.length;)t=Yi(n[o])}return t}function Yi(e){const t=e.spread;return t??e.children.length>1}function Kf(e,t){const n={},o=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<o.length;){const a=o[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function Zf(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xf(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Jf(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qf(e,t){const n=e.all(t),o=n.shift(),i=[];if(o){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=rr(t.children[1]),f=Ei(t.children[t.children.length-1]);c&&f&&(a.position={start:c,end:f}),i.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function ep(e,t,n){const o=n?n.children:void 0,l=(o?o.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let f=-1;const u=[];for(;++f<c;){const p=t.children[f],x={},h=a?a[f]:void 0;h&&(x.align=h);let b={type:"element",tagName:l,properties:x,children:[]};p&&(b.children=e.all(p),e.patch(p,b),b=e.applyData(p,b)),u.push(b)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function tp(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const no=9,ro=32;function np(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const l=[];for(;o;)l.push(oo(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return l.push(oo(t.slice(i),i>0,!1)),l.join("")}function oo(e,t,n){let o=0,i=e.length;if(t){let l=e.codePointAt(o);for(;l===no||l===ro;)o++,l=e.codePointAt(o)}if(n){let l=e.codePointAt(i-1);for(;l===no||l===ro;)i--,l=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function rp(e,t){const n={type:"text",value:np(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function op(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ip={blockquote:zf,break:Rf,code:Mf,delete:Of,emphasis:Nf,footnoteReference:Pf,heading:_f,html:Hf,imageReference:Wf,image:qf,inlineCode:Vf,linkReference:$f,link:Uf,listItem:Gf,list:Kf,paragraph:Zf,root:Xf,strong:Jf,table:Qf,tableCell:tp,tableRow:ep,text:rp,thematicBreak:op,toml:Mt,yaml:Mt,definition:Mt,footnoteDefinition:Mt};function Mt(){}const Ki=-1,en=0,jt=1,$t=2,ur=3,dr=4,fr=5,pr=6,Zi=7,Xi=8,lp=typeof self=="object"?self:globalThis,io=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new lp[e](t)},ap=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),o=i=>{if(e.has(i))return e.get(i);const[l,a]=t[i];switch(l){case en:case Ki:return n(a,i);case jt:{const c=n([],i);for(const f of a)c.push(o(f));return c}case $t:{const c=n({},i);for(const[f,u]of a)c[o(f)]=o(u);return c}case ur:return n(new Date(a),i);case dr:{const{source:c,flags:f}=a;return n(new RegExp(c,f),i)}case fr:{const c=n(new Map,i);for(const[f,u]of a)c.set(o(f),o(u));return c}case pr:{const c=n(new Set,i);for(const f of a)c.add(o(f));return c}case Zi:{const{name:c,message:f}=a;return n(io(c,f),i)}case Xi:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}}return n(io(l,a),i)};return o},lo=e=>ap(new Map,e)(0),rt="",{toString:sp}={},{keys:cp}=Object,bt=e=>{const t=typeof e;if(t!=="object"||!e)return[en,t];const n=sp.call(e).slice(8,-1);switch(n){case"Array":return[jt,rt];case"Object":return[$t,rt];case"Date":return[ur,rt];case"RegExp":return[dr,rt];case"Map":return[fr,rt];case"Set":return[pr,rt];case"DataView":return[jt,n]}return n.includes("Array")?[jt,n]:n.includes("Error")?[Zi,n]:[$t,n]},Ot=([e,t])=>e===en&&(t==="function"||t==="symbol"),up=(e,t,n,o)=>{const i=(a,c)=>{const f=o.push(a)-1;return n.set(c,f),f},l=a=>{if(n.has(a))return n.get(a);let[c,f]=bt(a);switch(c){case en:{let d=a;switch(f){case"bigint":c=Xi,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);d=null;break;case"undefined":return i([Ki],a)}return i([c,d],a)}case jt:{if(f){let x=a;return f==="DataView"?x=new Uint8Array(a.buffer):f==="ArrayBuffer"&&(x=new Uint8Array(a)),i([f,[...x]],a)}const d=[],p=i([c,d],a);for(const x of a)d.push(l(x));return p}case $t:{if(f)switch(f){case"BigInt":return i([f,a.toString()],a);case"Boolean":case"Number":case"String":return i([f,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const d=[],p=i([c,d],a);for(const x of cp(a))(e||!Ot(bt(a[x])))&&d.push([l(x),l(a[x])]);return p}case ur:return i([c,a.toISOString()],a);case dr:{const{source:d,flags:p}=a;return i([c,{source:d,flags:p}],a)}case fr:{const d=[],p=i([c,d],a);for(const[x,h]of a)(e||!(Ot(bt(x))||Ot(bt(h))))&&d.push([l(x),l(h)]);return p}case pr:{const d=[],p=i([c,d],a);for(const x of a)(e||!Ot(bt(x)))&&d.push(l(x));return p}}const{message:u}=a;return i([c,{name:f,message:u}],a)};return l},ao=(e,{json:t,lossy:n}={})=>{const o=[];return up(!(t||n),!!t,new Map,o)(e),o},Ut=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?lo(ao(e,t)):structuredClone(e):(e,t)=>lo(ao(e,t));function dp(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function fp(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function pp(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||dp,o=e.options.footnoteBackLabel||fp,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[f]);if(!u)continue;const d=e.all(u),p=String(u.identifier).toUpperCase(),x=ut(p.toLowerCase());let h=0;const b=[],v=e.footnoteCounts.get(p);for(;v!==void 0&&++h<=v;){b.length>0&&b.push({type:"text",value:" "});let j=typeof n=="string"?n:n(f,h);typeof j=="string"&&(j={type:"text",value:j}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(f,h),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const F=d[d.length-1];if(F&&F.type==="element"&&F.tagName==="p"){const j=F.children[F.children.length-1];j&&j.type==="text"?j.value+=" ":F.children.push({type:"text",value:" "}),F.children.push(...b)}else d.push(...b);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(d,!0)};e.patch(u,y),c.push(y)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ut(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
427
+ `:"",o={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(o.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function Of(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nf(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pf(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=ut(o.toLowerCase()),l=e.footnoteOrder.indexOf(o);let a,c=e.footnoteCounts.get(o);c===void 0?(c=0,e.footnoteOrder.push(o),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(o,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,d);const u={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,u),e.applyData(t,u)}function _f(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hf(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Gi(e,t){const n=t.referenceType;let o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+o}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=o:i.push({type:"text",value:o}),i}function Wf(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Gi(e,t);const i={src:ut(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function qf(e,t){const n={src:ut(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,o),e.applyData(t,o)}function Vf(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,o),e.applyData(t,o)}function $f(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Gi(e,t);const i={href:ut(o.url||"")};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Uf(e,t){const n={href:ut(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const o={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Gf(e,t,n){const o=e.all(t),i=n?Yf(n):Yi(t),l={},a=[];if(typeof t.checked=="boolean"){const f=o[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(h={type:"element",tagName:"p",properties:{},children:[]},o.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<o.length;){const f=o[c];(i||c!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
428
+ `}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}const d=o[o.length-1];d&&(i||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
429
+ `});const u={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,u),e.applyData(t,u)}function Yf(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let o=-1;for(;!t&&++o<n.length;)t=Yi(n[o])}return t}function Yi(e){const t=e.spread;return t??e.children.length>1}function Kf(e,t){const n={},o=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<o.length;){const a=o[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function Zf(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xf(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Jf(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qf(e,t){const n=e.all(t),o=n.shift(),i=[];if(o){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=rr(t.children[1]),d=Ei(t.children[t.children.length-1]);c&&d&&(a.position={start:c,end:d}),i.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function ep(e,t,n){const o=n?n.children:void 0,l=(o?o.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let d=-1;const u=[];for(;++d<c;){const h=t.children[d],x={},p=a?a[d]:void 0;p&&(x.align=p);let b={type:"element",tagName:l,properties:x,children:[]};h&&(b.children=e.all(h),e.patch(h,b),b=e.applyData(h,b)),u.push(b)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function tp(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const no=9,ro=32;function np(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const l=[];for(;o;)l.push(oo(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return l.push(oo(t.slice(i),i>0,!1)),l.join("")}function oo(e,t,n){let o=0,i=e.length;if(t){let l=e.codePointAt(o);for(;l===no||l===ro;)o++,l=e.codePointAt(o)}if(n){let l=e.codePointAt(i-1);for(;l===no||l===ro;)i--,l=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function rp(e,t){const n={type:"text",value:np(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function op(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ip={blockquote:zf,break:Rf,code:Mf,delete:Of,emphasis:Nf,footnoteReference:Pf,heading:_f,html:Hf,imageReference:Wf,image:qf,inlineCode:Vf,linkReference:$f,link:Uf,listItem:Gf,list:Kf,paragraph:Zf,root:Xf,strong:Jf,table:Qf,tableCell:tp,tableRow:ep,text:rp,thematicBreak:op,toml:Mt,yaml:Mt,definition:Mt,footnoteDefinition:Mt};function Mt(){}const Ki=-1,en=0,jt=1,$t=2,ur=3,dr=4,fr=5,pr=6,Zi=7,Xi=8,lp=typeof self=="object"?self:globalThis,io=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new lp[e](t)},ap=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),o=i=>{if(e.has(i))return e.get(i);const[l,a]=t[i];switch(l){case en:case Ki:return n(a,i);case jt:{const c=n([],i);for(const d of a)c.push(o(d));return c}case $t:{const c=n({},i);for(const[d,u]of a)c[o(d)]=o(u);return c}case ur:return n(new Date(a),i);case dr:{const{source:c,flags:d}=a;return n(new RegExp(c,d),i)}case fr:{const c=n(new Map,i);for(const[d,u]of a)c.set(o(d),o(u));return c}case pr:{const c=n(new Set,i);for(const d of a)c.add(o(d));return c}case Zi:{const{name:c,message:d}=a;return n(io(c,d),i)}case Xi:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}}return n(io(l,a),i)};return o},lo=e=>ap(new Map,e)(0),rt="",{toString:sp}={},{keys:cp}=Object,bt=e=>{const t=typeof e;if(t!=="object"||!e)return[en,t];const n=sp.call(e).slice(8,-1);switch(n){case"Array":return[jt,rt];case"Object":return[$t,rt];case"Date":return[ur,rt];case"RegExp":return[dr,rt];case"Map":return[fr,rt];case"Set":return[pr,rt];case"DataView":return[jt,n]}return n.includes("Array")?[jt,n]:n.includes("Error")?[Zi,n]:[$t,n]},Ot=([e,t])=>e===en&&(t==="function"||t==="symbol"),up=(e,t,n,o)=>{const i=(a,c)=>{const d=o.push(a)-1;return n.set(c,d),d},l=a=>{if(n.has(a))return n.get(a);let[c,d]=bt(a);switch(c){case en:{let f=a;switch(d){case"bigint":c=Xi,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);f=null;break;case"undefined":return i([Ki],a)}return i([c,f],a)}case jt:{if(d){let x=a;return d==="DataView"?x=new Uint8Array(a.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(a)),i([d,[...x]],a)}const f=[],h=i([c,f],a);for(const x of a)f.push(l(x));return h}case $t:{if(d)switch(d){case"BigInt":return i([d,a.toString()],a);case"Boolean":case"Number":case"String":return i([d,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const f=[],h=i([c,f],a);for(const x of cp(a))(e||!Ot(bt(a[x])))&&f.push([l(x),l(a[x])]);return h}case ur:return i([c,a.toISOString()],a);case dr:{const{source:f,flags:h}=a;return i([c,{source:f,flags:h}],a)}case fr:{const f=[],h=i([c,f],a);for(const[x,p]of a)(e||!(Ot(bt(x))||Ot(bt(p))))&&f.push([l(x),l(p)]);return h}case pr:{const f=[],h=i([c,f],a);for(const x of a)(e||!Ot(bt(x)))&&f.push(l(x));return h}}const{message:u}=a;return i([c,{name:d,message:u}],a)};return l},ao=(e,{json:t,lossy:n}={})=>{const o=[];return up(!(t||n),!!t,new Map,o)(e),o},Ut=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?lo(ao(e,t)):structuredClone(e):(e,t)=>lo(ao(e,t));function dp(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function fp(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function pp(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||dp,o=e.options.footnoteBackLabel||fp,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[d]);if(!u)continue;const f=e.all(u),h=String(u.identifier).toUpperCase(),x=ut(h.toLowerCase());let p=0;const b=[],v=e.footnoteCounts.get(h);for(;v!==void 0&&++p<=v;){b.length>0&&b.push({type:"text",value:" "});let S=typeof n=="string"?n:n(d,p);typeof S=="string"&&(S={type:"text",value:S}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(d,p),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const B=f[f.length-1];if(B&&B.type==="element"&&B.tagName==="p"){const S=B.children[B.children.length-1];S&&S.type==="text"?S.value+=" ":B.children.push({type:"text",value:" "}),B.children.push(...b)}else f.push(...b);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(f,!0)};e.patch(u,y),c.push(y)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ut(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
430
430
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
431
- `}]}}const Ji=(function(e){if(e==null)return mp;if(typeof e=="function")return tn(e);if(typeof e=="object")return Array.isArray(e)?hp(e):xp(e);if(typeof e=="string")return gp(e);throw new Error("Expected function, string, or object as test")});function hp(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ji(e[n]);return tn(o);function o(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function xp(e){const t=e;return tn(n);function n(o){const i=o;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function gp(e){return tn(t);function t(n){return n&&n.type===e}}function tn(e){return t;function t(n,o,i){return!!(bp(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function mp(){return!0}function bp(e){return e!==null&&typeof e=="object"&&"type"in e}const Qi=[],yp=!0,so=!1,vp="skip";function kp(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const l=Ji(i),a=o?-1:1;c(e,void 0,[])();function c(f,u,d){const p=f&&typeof f=="object"?f:{};if(typeof p.type=="string"){const h=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(f.type+(h?"<"+h+">":""))+")"})}return x;function x(){let h=Qi,b,v,F;if((!t||l(f,u,d[d.length-1]||void 0))&&(h=wp(n(f,d)),h[0]===so))return h;if("children"in f&&f.children){const y=f;if(y.children&&h[0]!==vp)for(v=(o?y.children.length:-1)+a,F=d.concat(y);v>-1&&v<y.children.length;){const j=y.children[v];if(b=c(j,v,F)(),b[0]===so)return b;v=typeof b[1]=="number"?b[1]:v+a}}return h}}}function wp(e){return Array.isArray(e)?e:typeof e=="number"?[yp,e]:e==null?Qi:[e]}function el(e,t,n,o){let i,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,i=n):(l=t,a=n,i=o),kp(e,l,c,i);function c(f,u){const d=u[u.length-1],p=d?d.children.indexOf(f):void 0;return a(f,p,d)}}const Pn={}.hasOwnProperty,jp={};function Cp(e,t){const n=t||jp,o=new Map,i=new Map,l=new Map,a={...ip,...n.handlers},c={all:u,applyData:Bp,definitionById:o,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:a,one:f,options:n,patch:Sp,wrap:Ep};return el(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const p=d.type==="definition"?o:i,x=String(d.identifier).toUpperCase();p.has(x)||p.set(x,d)}}),c;function f(d,p){const x=d.type,h=c.handlers[x];if(Pn.call(c.handlers,x)&&h)return h(c,d,p);if(c.options.passThrough&&c.options.passThrough.includes(x)){if("children"in d){const{children:v,...F}=d,y=Ut(F);return y.children=c.all(d),y}return Ut(d)}return(c.options.unknownHandler||Fp)(c,d,p)}function u(d){const p=[];if("children"in d){const x=d.children;let h=-1;for(;++h<x.length;){const b=c.one(x[h],d);if(b){if(h&&x[h-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=co(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=co(v.value))}Array.isArray(b)?p.push(...b):p.push(b)}}}return p}}function Sp(e,t){e.position&&(t.position=iu(e))}function Bp(e,t){let n=t;if(e&&e.data){const o=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof o=="string")if(n.type==="element")n.tagName=o;else{const a="children"in n?n.children:[n];n={type:"element",tagName:o,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,Ut(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Fp(e,t){const n=t.data||{},o="value"in t&&!(Pn.call(n,"hProperties")||Pn.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Ep(e,t){const n=[];let o=-1;for(t&&n.push({type:"text",value:`
431
+ `}]}}const Ji=(function(e){if(e==null)return mp;if(typeof e=="function")return tn(e);if(typeof e=="object")return Array.isArray(e)?hp(e):xp(e);if(typeof e=="string")return gp(e);throw new Error("Expected function, string, or object as test")});function hp(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ji(e[n]);return tn(o);function o(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function xp(e){const t=e;return tn(n);function n(o){const i=o;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function gp(e){return tn(t);function t(n){return n&&n.type===e}}function tn(e){return t;function t(n,o,i){return!!(bp(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function mp(){return!0}function bp(e){return e!==null&&typeof e=="object"&&"type"in e}const Qi=[],yp=!0,so=!1,vp="skip";function kp(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const l=Ji(i),a=o?-1:1;c(e,void 0,[])();function c(d,u,f){const h=d&&typeof d=="object"?d:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(p?"<"+p+">":""))+")"})}return x;function x(){let p=Qi,b,v,B;if((!t||l(d,u,f[f.length-1]||void 0))&&(p=wp(n(d,f)),p[0]===so))return p;if("children"in d&&d.children){const y=d;if(y.children&&p[0]!==vp)for(v=(o?y.children.length:-1)+a,B=f.concat(y);v>-1&&v<y.children.length;){const S=y.children[v];if(b=c(S,v,B)(),b[0]===so)return b;v=typeof b[1]=="number"?b[1]:v+a}}return p}}}function wp(e){return Array.isArray(e)?e:typeof e=="number"?[yp,e]:e==null?Qi:[e]}function el(e,t,n,o){let i,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,i=n):(l=t,a=n,i=o),kp(e,l,c,i);function c(d,u){const f=u[u.length-1],h=f?f.children.indexOf(d):void 0;return a(d,h,f)}}const Pn={}.hasOwnProperty,jp={};function Cp(e,t){const n=t||jp,o=new Map,i=new Map,l=new Map,a={...ip,...n.handlers},c={all:u,applyData:Bp,definitionById:o,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:a,one:d,options:n,patch:Sp,wrap:Ep};return el(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?o:i,x=String(f.identifier).toUpperCase();h.has(x)||h.set(x,f)}}),c;function d(f,h){const x=f.type,p=c.handlers[x];if(Pn.call(c.handlers,x)&&p)return p(c,f,h);if(c.options.passThrough&&c.options.passThrough.includes(x)){if("children"in f){const{children:v,...B}=f,y=Ut(B);return y.children=c.all(f),y}return Ut(f)}return(c.options.unknownHandler||Fp)(c,f,h)}function u(f){const h=[];if("children"in f){const x=f.children;let p=-1;for(;++p<x.length;){const b=c.one(x[p],f);if(b){if(p&&x[p-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=co(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=co(v.value))}Array.isArray(b)?h.push(...b):h.push(b)}}}return h}}function Sp(e,t){e.position&&(t.position=iu(e))}function Bp(e,t){let n=t;if(e&&e.data){const o=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof o=="string")if(n.type==="element")n.tagName=o;else{const a="children"in n?n.children:[n];n={type:"element",tagName:o,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,Ut(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Fp(e,t){const n=t.data||{},o="value"in t&&!(Pn.call(n,"hProperties")||Pn.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Ep(e,t){const n=[];let o=-1;for(t&&n.push({type:"text",value:`
432
432
  `});++o<e.length;)o&&n.push({type:"text",value:`
433
433
  `}),n.push(e[o]);return t&&e.length>0&&n.push({type:"text",value:`
434
434
  `}),n}function co(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function uo(e,t){const n=Cp(e,t),o=n.one(e,void 0),i=pp(n),l=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
435
- `},i),l}function Lp(e,t){return e&&"run"in e?async function(n,o){const i=uo(n,{file:o,...t});await e.run(i,o)}:function(n,o){return uo(n,{file:o,...e||t})}}function fo(e){if(e)throw e}var xn,po;function Ip(){if(po)return xn;po=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},l=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),p=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!p)return!1;var x;for(x in u);return typeof x>"u"||e.call(u,x)},a=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},c=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(o)return o(u,d).value}else return;return u[d]};return xn=function f(){var u,d,p,x,h,b,v=arguments[0],F=1,y=arguments.length,j=!1;for(typeof v=="boolean"&&(j=v,v=arguments[1]||{},F=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});F<y;++F)if(u=arguments[F],u!=null)for(d in u)p=c(v,d),x=c(u,d),v!==x&&(j&&x&&(l(x)||(h=i(x)))?(h?(h=!1,b=p&&i(p)?p:[]):b=p&&l(p)?p:{},a(v,{name:d,newValue:f(j,b,x)})):typeof x<"u"&&a(v,{name:d,newValue:x}));return v},xn}var Tp=Ip();const gn=Fi(Tp);function _n(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Dp(){const e=[],t={run:n,use:o};return t;function n(...i){let l=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...i);function c(f,...u){const d=e[++l];let p=-1;if(f){a(f);return}for(;++p<i.length;)(u[p]===null||u[p]===void 0)&&(u[p]=i[p]);i=u,d?Ap(d,c)(...u):a(null,...u)}}function o(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ap(e,t){let n;return o;function o(...a){const c=e.length>a.length;let f;c&&a.push(i);try{f=e.apply(this,a)}catch(u){const d=u;if(c&&n)throw d;return i(d)}c||(f&&f.then&&typeof f.then=="function"?f.then(l,i):f instanceof Error?i(f):l(f))}function i(a,...c){n||(n=!0,t(a,...c))}function l(a){i(null,a)}}const ze={basename:zp,dirname:Rp,extname:Mp,join:Op,sep:"/"};function zp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ft(e);let n=0,o=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let a=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else a<0&&(l=!0,a=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(o=i):(c=-1,o=a));return n===o?o=a:o<0&&(o=e.length),e.slice(n,o)}function Rp(e){if(Ft(e),e.length===0)return".";let t=-1,n=e.length,o;for(;--n;)if(e.codePointAt(n)===47){if(o){t=n;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Mp(e){Ft(e);let t=e.length,n=-1,o=0,i=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){o=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===o+1?"":e.slice(i,n)}function Op(...e){let t=-1,n;for(;++t<e.length;)Ft(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Np(n)}function Np(e){Ft(e);const t=e.codePointAt(0)===47;let n=Pp(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Pp(e,t){let n="",o=0,i=-1,l=0,a=-1,c,f;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(i===a-1||l===1))if(i!==a-1&&l===2){if(n.length<2||o!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",o=0):(n=n.slice(0,f),o=n.length-1-n.lastIndexOf("/")),i=a,l=0;continue}}else if(n.length>0){n="",o=0,i=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),o=a-i-1;i=a,l=0}else c===46&&l>-1?l++:l=-1}return n}function Ft(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _p={cwd:Hp};function Hp(){return"/"}function Hn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Wp(e){if(typeof e=="string")e=new URL(e);else if(!Hn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return qp(e)}function qp(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const o=t.codePointAt(n+2);if(o===70||o===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const mn=["history","path","basename","stem","extname","dirname"];class tl{constructor(t){let n;t?Hn(t)?n={path:t}:typeof t=="string"||Vp(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_p.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<mn.length;){const l=mn[o];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)mn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ze.basename(this.path):void 0}set basename(t){yn(t,"basename"),bn(t,"basename"),this.path=ze.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ze.dirname(this.path):void 0}set dirname(t){ho(this.basename,"dirname"),this.path=ze.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ze.extname(this.path):void 0}set extname(t){if(bn(t,"extname"),ho(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ze.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Hn(t)&&(t=Wp(t)),yn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ze.basename(this.path,this.extname):void 0}set stem(t){yn(t,"stem"),bn(t,"stem"),this.path=ze.join(this.dirname||"",t+(this.extname||""))}fail(t,n,o){const i=this.message(t,n,o);throw i.fatal=!0,i}info(t,n,o){const i=this.message(t,n,o);return i.fatal=void 0,i}message(t,n,o){const i=new ke(t,n,o);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function bn(e,t){if(e&&e.includes(ze.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ze.sep+"`")}function yn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ho(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Vp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $p=(function(e){const o=this.constructor.prototype,i=o[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,o),l}),Up={}.hasOwnProperty;class hr extends $p{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Dp()}copy(){const t=new hr;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(gn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(wn("data",this.frozen),this.namespace[t]=n,this):Up.call(this.namespace,t)&&this.namespace[t]||void 0:t?(wn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const i=n.call(t,...o);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Nt(t),o=this.parser||this.Parser;return vn("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),vn("process",this.parser||this.Parser),kn("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,a){const c=Nt(t),f=o.parse(c);o.run(f,c,function(d,p,x){if(d||!p||!x)return u(d);const h=p,b=o.stringify(h,x);Kp(b)?x.value=b:x.result=b,u(d,x)});function u(d,p){d||!p?a(d):l?l(p):n(void 0,p)}}}processSync(t){let n=!1,o;return this.freeze(),vn("processSync",this.parser||this.Parser),kn("processSync",this.compiler||this.Compiler),this.process(t,i),go("processSync","process",n),o;function i(l,a){n=!0,fo(l),o=a}}run(t,n,o){xo(t),this.freeze();const i=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?l(void 0,o):new Promise(l);function l(a,c){const f=Nt(n);i.run(t,f,u);function u(d,p,x){const h=p||t;d?c(d):a?a(h):o(void 0,h,x)}}}runSync(t,n){let o=!1,i;return this.run(t,n,l),go("runSync","run",o),i;function l(a,c){fo(a),i=c,o=!0}}stringify(t,n){this.freeze();const o=Nt(n),i=this.compiler||this.Compiler;return kn("stringify",i),xo(t),i(t,o)}use(t,...n){const o=this.attachers,i=this.namespace;if(wn("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")f(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...p]=u;f(d,p)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(u.plugins),u.settings&&(i.settings=gn(!0,i.settings,u.settings))}function c(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const p=u[d];l(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function f(u,d){let p=-1,x=-1;for(;++p<o.length;)if(o[p][0]===u){x=p;break}if(x===-1)o.push([u,...d]);else if(d.length>0){let[h,...b]=d;const v=o[x][1];_n(v)&&_n(h)&&(h=gn(!0,v,h)),o[x]=[u,h,...b]}}}}const Gp=new hr().freeze();function vn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function kn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function wn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xo(e){if(!_n(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function go(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Nt(e){return Yp(e)?e:new tl(e)}function Yp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Kp(e){return typeof e=="string"||Zp(e)}function Zp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xp="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",mo=[],bo={allowDangerousHtml:!0},Jp=/^(https?|ircs?|mailto|xmpp)$/i,Qp=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function e1(e){const t=t1(e),n=n1(e);return r1(t.runSync(t.parse(n),n),e)}function t1(e){const t=e.rehypePlugins||mo,n=e.remarkPlugins||mo,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...bo}:bo;return Gp().use(Af).use(n).use(Lp,o).use(t)}function n1(e){const t=e.children||"",n=new tl;return typeof t=="string"&&(n.value=t),n}function r1(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||o1;for(const d of Qp)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+Xp+d.id,void 0);return el(e,u),uu(e,{Fragment:r.Fragment,components:i,ignoreInvalidStyle:!0,jsx:r.jsx,jsxs:r.jsxs,passKeys:!0,passNode:!0});function u(d,p,x){if(d.type==="raw"&&x&&typeof p=="number")return a?x.children.splice(p,1):x.children[p]={type:"text",value:d.value},p;if(d.type==="element"){let h;for(h in fn)if(Object.hasOwn(fn,h)&&Object.hasOwn(d.properties,h)){const b=d.properties[h],v=fn[h];(v===null||v.includes(d.tagName))&&(d.properties[h]=f(String(b||""),h,d))}}if(d.type==="element"){let h=n?!n.includes(d.tagName):l?l.includes(d.tagName):!1;if(!h&&o&&typeof p=="number"&&(h=!o(d,p,x)),h&&x&&typeof p=="number")return c&&d.children?x.children.splice(p,1,...d.children):x.children.splice(p,1),p}}}function o1(e){const t=e.indexOf(":"),n=e.indexOf("?"),o=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||o!==-1&&t>o||Jp.test(e.slice(0,t))?e:""}const i1={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function l1({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:o="blue",answerType:i="HTML",haptic:l,disableHaptic:a=!1,...c}){const{trigger:f}=de(),u=i1[o],[d,p]=I.default.useState(new Set(n)),x=h=>{!a&&l!==!1&&f(l??"selection"),p(b=>{const v=new Set(b);return v.has(h)?v.delete(h):(t||v.clear(),v.add(h)),v})};return r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"4",...c,children:e.map(h=>{const b=d.has(h.id);return r.jsxs(s.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:b?u.ring:"border"},children:[r.jsxs(s.Box,{as:"button",w:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4",px:"6",py:"5",bg:"transparent",border:"none",cursor:"pointer",textAlign:"left",onClick:()=>x(h.id),"aria-expanded":b,children:[r.jsx(s.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:h.question}),r.jsx(s.Box,{flexShrink:0,w:"10",h:"10",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s, border-color 0.2s, color 0.2s","aria-hidden":"true",style:{border:b?"none":"1.5px solid var(--medix-form-text)",background:b?u.solid:"transparent",color:b?"#ffffff":"inherit",flexShrink:0},children:b?r.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:r.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),r.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),r.jsx(s.Box,{overflow:"hidden",maxH:b?"800px":"0px",opacity:b?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:r.jsx(s.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:typeof h.answer=="string"?i==="MD"?r.jsx(e1,{children:h.answer}):r.jsx("span",{dangerouslySetInnerHTML:{__html:Rc(h.answer)}}):h.answer})})]},h.id)})})}function a1({quote:e,authorName:t,authorTitle:n,authorAvatar:o,rating:i,...l}){return r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"none",_dark:{boxShadow:"none"},...l,children:[i!==void 0&&r.jsx(s.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((a,c)=>r.jsx(s.Box,{as:"span",fontSize:"sm",color:c<i?"#F59E0B":"text.muted",children:"★"},c))}),r.jsxs(s.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[o?r.jsx("img",{src:o,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):r.jsx(s.Box,{w:"9",h:"9",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"sm",fontWeight:"semibold",color:"white",flexShrink:0,children:t.charAt(0).toUpperCase()}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const s1={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function c1(e){if(!e)return null;try{const t=new Date(e);return isNaN(t.getTime())?null:{day:String(t.getUTCDate()),weekday:t.toLocaleDateString("en-US",{weekday:"short",timeZone:"UTC"}).toUpperCase()}}catch{return null}}function u1({title:e,excerpt:t,category:n,date:o,coverImage:i,href:l,onClick:a,colorScheme:c="blue",...f}){const u=!!(l||a),d=c1(o),p=s1[c],x={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:u?"pointer":"default",textAlign:"left"},h=r.jsxs(s.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:u?{transform:"translateY(-4px)"}:void 0,...f,children:[r.jsxs(s.Box,{position:"relative",overflow:"hidden",children:[i?r.jsx("img",{src:i,alt:e,style:{width:"100%",height:300,objectFit:"cover",display:"block",borderRadius:"20px"}}):r.jsx(s.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),d&&r.jsxs(s.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",border:"1px solid",borderColor:"border",boxShadow:"none",children:[r.jsx(s.Box,{style:{fontSize:22,fontWeight:700,color:p.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:d.day}),r.jsx(s.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:d.weekday})]})]}),r.jsxs(s.Box,{px:"0",pt:"3",pb:"4",children:[n&&r.jsx(s.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:p.token,color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),r.jsx(s.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&r.jsx(s.Box,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"relaxed",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t})]})]});return l?r.jsx("a",{href:l,style:x,onClick:a,children:h}):a?r.jsx("button",{type:"button",style:x,onClick:a,children:h}):h}function d1({columns:e,data:t,rowKey:n="id",isLoading:o=!1,emptyMessage:i="No data available",sortable:l=!1,sortKey:a,sortDirection:c="asc",onSort:f,striped:u=!0,onRowClick:d,caption:p,enablePagination:x=!1,pageSize:h=10,page:b,onPageChange:v,enableSearch:F=!1,searchPlaceholder:y="Search table...",searchQuery:j,onSearchChange:C,style:S,className:B,stickyFirstColumn:w=!1,haptic:D,disableHaptic:E=!1}){const{trigger:A}=de(),[M,z]=U.useState(""),T=j??M,[W,R]=U.useState(1),k=b??W,[P,V]=U.useState(a),[Q,X]=U.useState(c),g=a??P,O=a?c:Q,H=J=>{z(J),R(1),C==null||C(J)},m=J=>{!E&&D!==!1&&A(D??"selection");const re=g===J&&O==="asc"?"desc":"asc";V(J),X(re),f==null||f(J,re)},N=J=>{R(J),v==null||v(J)},G=U.useMemo(()=>{if(!T.trim())return t;const J=T.toLowerCase().trim();return t.filter(re=>e.some(ae=>{const xe=re[ae.key];return xe==null?!1:String(xe).toLowerCase().includes(J)}))},[t,e,T]),Z=U.useMemo(()=>!g||f?G:[...G].sort((J,re)=>{const ae=J[g],xe=re[g],ge=String(ae??""),ve=String(xe??""),we=ge.localeCompare(ve,void 0,{numeric:!0,sensitivity:"base"});return O==="asc"?we:-we}),[G,g,O,f]),Y=Z.length,K=U.useMemo(()=>{if(!x)return Z;const J=(k-1)*h;return Z.slice(J,J+h)},[Z,x,k,h]),le=({colKey:J})=>g!==J?r.jsx(s.Text,{as:"span",opacity:.3,ml:"1",fontSize:"xs",children:"↕"}):r.jsx(s.Text,{as:"span",ml:"1",color:"text.heading",fontSize:"xs",children:O==="asc"?"↑":"↓"});return r.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg",boxShadow:"none",_dark:{boxShadow:"none"},style:S,className:B,children:[F&&r.jsx(s.Box,{p:"4",borderBottom:"1px solid",borderColor:"border",bg:"bg",children:r.jsx(Kn,{placeholder:y,value:T,onChange:J=>H(J.target.value),maxW:"360px"})}),r.jsx(s.Box,{overflowX:"auto",children:r.jsxs(s.Box,{as:"table",w:"full",style:{borderCollapse:"collapse"},"aria-label":p,children:[p&&r.jsx("caption",{style:{display:"none"},children:p}),r.jsx(s.Box,{as:"thead",children:r.jsx(s.Box,{as:"tr",bg:"bg.subtle",borderBottom:"1px solid",borderColor:"border",children:e.map((J,re)=>{const ae=w&&re===0;return r.jsx(s.Box,{as:"th",py:"3",px:"4",textAlign:J.align??"left",minW:J.minWidth,fontSize:"xs",fontWeight:"600",letterSpacing:"0.05em",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",whiteSpace:"nowrap",userSelect:"none",cursor:J.sortable||l?"pointer":"default",_hover:J.sortable||l?{color:"text.heading"}:void 0,onClick:()=>J.sortable||l?m(J.key):void 0,"aria-sort":g===J.key?O==="asc"?"ascending":"descending":void 0,position:ae?"sticky":void 0,left:ae?0:void 0,zIndex:ae?3:void 0,bg:ae?"bg.subtle":void 0,borderRight:ae?"1px solid":void 0,borderColor:ae?"border":void 0,boxShadow:ae?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:r.jsxs(s.Flex,{as:"span",align:"center",justify:J.align==="right"?"flex-end":J.align==="center"?"center":"flex-start",children:[J.label,(J.sortable||l)&&r.jsx(le,{colKey:J.key})]})},J.key)})})}),r.jsx(s.Box,{as:"tbody",children:o?Array.from({length:5}).map((J,re)=>r.jsx(s.Box,{as:"tr",borderBottom:"1px solid",borderColor:"border",children:e.map(ae=>r.jsx(s.Box,{as:"td",py:"3.5",px:"4",children:r.jsx(s.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},ae.key))},re)):K.length===0?r.jsx(s.Box,{as:"tr",children:r.jsx("td",{colSpan:e.length,style:{textAlign:"center",padding:"48px 16px"},children:r.jsx(s.Text,{color:"text.muted",fontFamily:"var(--font-body)",fontSize:"sm",children:i})})}):K.map((J,re)=>{const ae=String(J[n]??re);return r.jsx(s.Box,{as:"tr",onClick:()=>{d&&!E&&D!==!1&&A(D??"selection"),d==null||d(J,re)},bg:u&&re%2===1?"bg.subtle":"transparent",borderBottom:"1px solid",borderColor:"border",cursor:d?"pointer":"default",transition:"background 0.15s ease",_hover:{bg:"bg.subtle"},children:e.map((xe,ge)=>{const ve=w&&ge===0;return r.jsx(s.Box,{as:"td",py:"3.5",px:"4",textAlign:xe.align??"left",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",verticalAlign:"middle",position:ve?"sticky":void 0,left:ve?0:void 0,zIndex:ve?2:void 0,bg:ve?u&&re%2===1?"bg.subtle":"bg":void 0,borderRight:ve?"1px solid":void 0,borderColor:ve?"border":void 0,boxShadow:ve?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:xe.render?xe.render(J[xe.key],J,re):String(J[xe.key]??"—")},xe.key)})},ae)})})]})}),x&&r.jsxs(s.Flex,{p:"4",borderTop:"1px solid",borderColor:"border",bg:"bg",align:"center",justify:"space-between",flexWrap:"wrap",gap:"4",children:[r.jsxs(s.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:["Showing ",Y===0?0:(k-1)*h+1," to"," ",Math.min(k*h,Y)," of ",Y," entries"]}),r.jsx(ui,{total:Y,pageSize:h,currentPage:k,onChange:N,compact:!0,haptic:D,disableHaptic:E})]})]})}function f1({name:e,specialty:t,location:n,avatar:o,rating:i,reviewCount:l,experience:a,consultationFee:c,isVerified:f=!1,isAvailable:u=!1,availabilityLabel:d="Available",onBookClick:p,onViewClick:x,variant:h="standard",...b}){return h==="featured"?r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},display:"flex",flexDirection:"column",...b,children:[o?r.jsx("img",{src:o,alt:e,style:{width:"100%",height:240,objectFit:"cover",display:"block"}}):r.jsx(s.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:r.jsx(s.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),r.jsxs(s.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[r.jsxs(s.Box,{children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),f&&r.jsx(Oe,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},children:[r.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),r.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})})]}),r.jsxs(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[u&&r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[r.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),u&&a&&r.jsx(s.Box,{w:"1px",h:"20px",bg:"border"}),a&&r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),r.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[c&&r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),r.jsxs(s.Box,{display:"flex",gap:"3",alignItems:"center",children:[x&&r.jsx(s.Box,{as:"button",px:"3",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.body",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:"blue.500"},onClick:x,children:"view"}),p&&r.jsx(s.Box,{as:"button",px:"5",py:"2.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:p,children:"Consult Now"})]})]})]})]}):h==="compact"?r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...b,children:[r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[r.jsxs(s.Box,{display:"flex",gap:"4",children:[r.jsx(s.Box,{flexShrink:0,children:o?r.jsx("img",{src:o,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx(s.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),r.jsxs(s.Box,{pt:"1",children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),r.jsxs(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&h!=="compact"?` • ${n}`:""]})]})]}),x&&r.jsx(s.Box,{as:"button",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"none",cursor:"pointer",_hover:{color:"blue.500"},onClick:x,pt:"1",children:"View"})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx(s.Box,{as:"span",color:"status.warning",mt:"-2px",children:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),r.jsxs(s.Box,{as:"span",color:"text.heading",mr:"1",children:[(i==null?void 0:i.toFixed(1))||"New"," ",l?`(${l})`:""]}),n&&r.jsxs(s.Box,{as:"span",children:[" • ",n]}),a&&r.jsxs(s.Box,{as:"span",children:[" • ",a]})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[c&&r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),p&&r.jsx(s.Box,{as:"button",px:"5",py:"2.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:p,children:"Consult Now"})]})]}):r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...b,children:[r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[r.jsxs(s.Box,{display:"flex",gap:"4",minW:"0",flex:"1",children:[r.jsx(s.Box,{flexShrink:0,children:o?r.jsx("img",{src:o,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx(s.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),r.jsxs(s.Box,{pt:"1",minW:"0",flex:"1",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",minW:"0",children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minW:"0",flex:"1",children:e}),f&&r.jsx(Oe,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},children:[r.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),r.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})})]}),r.jsxs(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:[t,n?` • ${n}`:""]})]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[r.jsx(s.Box,{as:"span",color:"status.warning",mt:"-2px",children:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),(i==null?void 0:i.toFixed(1))||"New"," ",l?r.jsxs(s.Box,{as:"span",color:"text.muted",children:["(",l,")"]}):null]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[u&&r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[r.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),u&&a&&r.jsx(s.Box,{w:"1px",h:"20px",bg:"border"}),a&&r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),r.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[c&&r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),r.jsxs(s.Box,{display:"flex",gap:"3",alignItems:"center",children:[x&&r.jsx(s.Box,{as:"button",px:"4",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"1px solid",borderColor:"border",borderRadius:"md",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:x,children:"view"}),p&&r.jsx(s.Box,{as:"button",px:"5",py:"2.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:p,children:"Consult Now"})]})]})]})}const p1={normal:{bg:"color-mix(in srgb, var(--chakra-colors-status-success) 8%, transparent)",indicator:"status.success",border:"color-mix(in srgb, var(--chakra-colors-status-success) 20%, transparent)",text:"status.success",ariaLabel:"Normal",icon:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[r.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"var(--chakra-colors-status-success)"}),r.jsx("path",{d:"M7 12.5l3.5 3.5 6.5-7",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]})},warning:{bg:"color-mix(in srgb, var(--chakra-colors-status-warning) 8%, transparent)",indicator:"status.warning",border:"color-mix(in srgb, var(--chakra-colors-status-warning) 20%, transparent)",text:"status.warning",ariaLabel:"Warning",icon:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[r.jsx("path",{d:"M12 2L2 21h20L12 2z",fill:"var(--chakra-colors-status-warning)"}),r.jsx("path",{d:"M12 9v5",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),r.jsx("circle",{cx:"12",cy:"17",r:"1",fill:"white"})]})},critical:{bg:"color-mix(in srgb, var(--chakra-colors-status-error) 8%, transparent)",indicator:"status.error",border:"color-mix(in srgb, var(--chakra-colors-status-error) 20%, transparent)",text:"status.error",ariaLabel:"Critical",icon:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[r.jsx("path",{d:"M8.5 2h7l6.5 6.5v7L15.5 22h-7L2 15.5v-7L8.5 2z",fill:"var(--chakra-colors-status-error)"}),r.jsx("path",{d:"M12 7v6",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),r.jsx("circle",{cx:"12",cy:"16.5",r:"1",fill:"white"})]})}};function h1({label:e,value:t,unit:n,status:o="normal",...i}){const l=p1[o];return r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:l.bg,border:"1px solid",borderColor:l.border,...i,children:[r.jsx("span",{"aria-label":l.ariaLabel,style:{display:"inline-flex",alignItems:"center",flexShrink:0},children:l.icon}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),r.jsxs(s.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[r.jsx(s.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&r.jsx(s.Box,{fontSize:"xs",color:l.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const x1={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function g1({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:o,time:i,type:l="video",status:a="upcoming",onCancel:c,onReschedule:f,onJoin:u,...d}){const p=x1[a];return r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?r.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx(s.Box,{w:"10",h:"10",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"md",fontWeight:"bold",color:"white",children:e.charAt(0)}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),r.jsx(Gn,{status:p.color,size:"sm",children:p.label})]}),r.jsxs(s.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:l==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),a==="upcoming"&&r.jsxs(s.Box,{display:"flex",gap:"2",children:[u&&r.jsx(s.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),f&&r.jsx(s.Box,{as:"button",flex:"1",py:"2",bg:"transparent",color:"text.body",border:"1px solid",borderColor:"border",borderRadius:"md",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{borderColor:"blue.400",color:"blue.500"},transition:"all 0.15s",onClick:f,children:"Reschedule"}),c&&r.jsx(s.Box,{as:"button",py:"2",px:"3",bg:"transparent",color:"red.500",border:"1px solid",borderColor:"red.200",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"red.50"},transition:"all 0.15s",onClick:c,children:"Cancel"})]})]})}const m1={active:{label:"Active",bg:"color-mix(in srgb, var(--chakra-colors-status-success) 12%, transparent)",color:"var(--chakra-colors-status-success)"},expired:{label:"Expired",bg:"color-mix(in srgb, var(--chakra-colors-status-error) 10%, transparent)",color:"var(--chakra-colors-status-error)"},dispensed:{label:"Dispensed",bg:"color-mix(in srgb, var(--chakra-colors-blue-500) 10%, transparent)",color:"var(--chakra-colors-blue-500)"}},b1=()=>r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("path",{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"}),r.jsx("path",{d:"m8.5 8.5 7 7"})]}),y1=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),r.jsx("polyline",{points:"7 10 12 15 17 10"}),r.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),yo=()=>r.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),r.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),r.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),r.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]});function v1({rxId:e,doctorName:t,doctorSpecialty:n,issuedDate:o,expiryDate:i,drugs:l,refillsRemaining:a,status:c="active",colorScheme:f="blue",onDownload:u,...d}){const p=m1[c],x=f==="purple"?"#7700CC":"#0685FF",h=f==="purple"?"color-mix(in srgb, #7700CC 8%, transparent)":"color-mix(in srgb, #0685FF 8%, transparent)";return r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",...d,children:[r.jsxs(s.Box,{px:"5",py:"3.5",display:"flex",alignItems:"center",justifyContent:"space-between",style:{borderBottom:"1px solid var(--chakra-colors-border)",background:h},children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[r.jsx(s.Box,{style:{color:x},children:r.jsx(b1,{})}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",style:{color:x},children:"Prescription"}),e&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:e})]}),r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:p.bg,color:p.color},children:[r.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:p.color,display:"inline-block"}}),p.label]})]}),r.jsxs(s.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"border",flexWrap:"wrap",gap:"2",children:[r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:t}),n&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]}),r.jsxs(s.Box,{display:"flex",gap:"4",children:[r.jsxs(s.Box,{children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[r.jsx(yo,{}),r.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Issued"})]}),r.jsx(s.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),i&&r.jsxs(s.Box,{children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[r.jsx(yo,{}),r.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Expires"})]}),r.jsx(s.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]})]})]}),r.jsx(s.Box,{px:"5",py:"4",display:"flex",flexDirection:"column",gap:"3",children:l.map((b,v)=>r.jsxs(s.Box,{display:"flex",alignItems:"flex-start",gap:"3",p:"3",borderRadius:"md",bg:"bg.subtle",border:"1px solid",borderColor:"border",children:[r.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:"50%",background:h,color:x,fontSize:11,fontWeight:700,fontFamily:"var(--font-heading)",flexShrink:0,marginTop:1},children:v+1}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:b.name}),r.jsx("span",{style:{padding:"1px 6px",borderRadius:4,fontSize:11,fontWeight:600,background:h,color:x,fontFamily:"var(--font-body)"},children:b.dosage})]}),r.jsxs(s.Box,{display:"flex",gap:"3",mt:"1",flexWrap:"wrap",children:[r.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["🕐 ",b.frequency]}),b.duration&&r.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["📅 ",b.duration]}),b.instructions&&r.jsxs(s.Box,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",fontStyle:"italic",children:["ℹ️ ",b.instructions]})]})]})]},v))}),r.jsxs(s.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderTop:"1px solid",borderColor:"border",children:[a!==void 0?r.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx(s.Box,{as:"span",fontWeight:"semibold",color:"text.heading",children:a})," ","refill",a!==1?"s":""," remaining"]}):r.jsx(s.Box,{}),u&&r.jsxs("button",{onClick:u,"aria-label":"Download prescription",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:8,fontSize:12,fontWeight:600,fontFamily:"var(--font-body)",color:x,background:h,border:"none",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:b=>{b.currentTarget.style.opacity="0.8"},onMouseLeave:b=>{b.currentTarget.style.opacity="1"},children:[r.jsx(y1,{}),"Download"]})]})]})}const k1={primary:{label:"Primary",bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",border:"color-mix(in srgb, #0685FF 25%, transparent)"},secondary:{label:"Secondary",bg:"color-mix(in srgb, #64748B 10%, transparent)",color:"#64748B",border:"color-mix(in srgb, #64748B 25%, transparent)"},chronic:{label:"Chronic",bg:"color-mix(in srgb, #F59E0B 10%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 25%, transparent)"},acute:{label:"Acute",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 25%, transparent)"}};function nl({code:e,description:t,category:n="primary",...o}){const i=k1[n];return r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",...o,children:[r.jsx("span",{title:t,"aria-label":`ICD-10 code ${e}${t?`: ${t}`:""}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:700,fontFamily:"var(--font-mono, monospace)",background:i.bg,color:i.color,border:`1px solid ${i.border}`,cursor:t?"help":"default",whiteSpace:"nowrap"},children:e}),t&&r.jsx(s.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]})}function rl({bloodType:e,...t}){return r.jsx(s.Box,{display:"inline-flex",alignItems:"center",...t,children:r.jsxs("span",{"aria-label":`Blood type ${e}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 10px",borderRadius:4,fontSize:12,fontWeight:800,fontFamily:"var(--font-heading)",background:"color-mix(in srgb, #DC2626 12%, transparent)",color:"#DC2626",border:"1px solid color-mix(in srgb, #DC2626 30%, transparent)",letterSpacing:"0.02em"},children:[r.jsx("svg",{width:"10",height:"12",viewBox:"0 0 12 16",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M6 0C6 0 0 7.5 0 11a6 6 0 0 0 12 0C12 7.5 6 0 6 0z"})}),e]})})}const w1={mild:{label:"Mild",bg:"color-mix(in srgb, #F59E0B 8%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 30%, transparent)",icon:"⚠"},moderate:{label:"Moderate",bg:"color-mix(in srgb, #F97316 10%, transparent)",color:"#C2410C",border:"color-mix(in srgb, #F97316 30%, transparent)",icon:"⚠"},severe:{label:"Severe",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 30%, transparent)",icon:"🚫"},"life-threatening":{label:"Life-threatening",bg:"color-mix(in srgb, #7F1D1D 15%, transparent)",color:"#991B1B",border:"#DC2626",icon:"⛔"}};function ol({allergen:e,severity:t="mild",...n}){const o=w1[t];return r.jsx(s.Box,{display:"inline-flex",alignItems:"center",...n,children:r.jsxs("span",{"aria-label":`Allergy: ${e} — ${o.label} severity`,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:o.bg,color:o.color,border:`1px solid ${o.border}`,borderLeftWidth:t==="life-threatening"?3:1,whiteSpace:"nowrap"},children:[r.jsx("span",{"aria-hidden":"true",children:o.icon}),e,r.jsxs("span",{style:{opacity:.7,fontSize:10},children:["· ",o.label]})]})})}function j1({diagnoses:e,bloodType:t,allergies:n,direction:o="row",...i}){return r.jsxs(s.Box,{display:"flex",flexDirection:o,flexWrap:"wrap",gap:"2",alignItems:o==="row"?"center":"flex-start",...i,children:[t&&r.jsx(rl,{bloodType:t}),e==null?void 0:e.map((l,a)=>r.jsx(nl,{code:l.code,description:l.description,category:l.category},a)),n==null?void 0:n.map((l,a)=>r.jsx(ol,{allergen:l.allergen,severity:l.severity},a))]})}var il={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vo=I.default.createContext&&I.default.createContext(il),C1=["attr","size","title"];function S1(e,t){if(e==null)return{};var n,o,i=B1(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function B1(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function Gt(){return Gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Gt.apply(null,arguments)}function ko(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,o)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ko(Object(n),!0).forEach(function(o){F1(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ko(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function F1(e,t,n){return(t=E1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E1(e){var t=L1(e,"string");return typeof t=="symbol"?t:t+""}function L1(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ll(e){return e&&e.map((t,n)=>I.default.createElement(t.tag,Yt({key:n},t.attr),ll(t.child)))}function Ee(e){return t=>I.default.createElement(I1,Gt({attr:Yt({},e.attr)},t),ll(e.child))}function I1(e){var t=n=>{var{attr:o,size:i,title:l}=e,a=S1(e,C1),c=i||n.size||"1em",f;return n.className&&(f=n.className),e.className&&(f=(f?f+" ":"")+e.className),I.default.createElement("svg",Gt({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,o,a,{className:f,style:Yt(Yt({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),l&&I.default.createElement("title",null,l),e.children)};return vo!==void 0?I.default.createElement(vo.Consumer,null,n=>t(n)):t(il)}function T1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"},child:[]},{tag:"rect",attr:{x:"2",y:"6",width:"14",height:"12",rx:"2"},child:[]}]})(e)}function D1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196"},child:[]},{tag:"path",attr:{d:"M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"m2 2 20 20"},child:[]}]})(e)}function A1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3"},child:[]},{tag:"path",attr:{d:"M8 21h8"},child:[]},{tag:"path",attr:{d:"M12 17v4"},child:[]},{tag:"path",attr:{d:"m17 8 5-5"},child:[]},{tag:"path",attr:{d:"M17 3h5v5"},child:[]}]})(e)}function z1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"},child:[]},{tag:"path",attr:{d:"m8.5 8.5 7 7"},child:[]}]})(e)}function R1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"},child:[]},{tag:"line",attr:{x1:"22",x2:"2",y1:"2",y2:"22"},child:[]}]})(e)}function M1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]},{tag:"path",attr:{d:"M14.05 2a9 9 0 0 1 8 7.94"},child:[]},{tag:"path",attr:{d:"M14.05 6A5 5 0 0 1 18 10"},child:[]}]})(e)}function O1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"},child:[]},{tag:"path",attr:{d:"M19 10v2a7 7 0 0 1-14 0v-2"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function N1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"2",x2:"22",y1:"2",y2:"22"},child:[]},{tag:"path",attr:{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"},child:[]},{tag:"path",attr:{d:"M5 10v2a7 7 0 0 0 12 5"},child:[]},{tag:"path",attr:{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"},child:[]},{tag:"path",attr:{d:"M9 9v3a3 3 0 0 0 5.12 2.12"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function P1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",x2:"9",y1:"12",y2:"12"},child:[]}]})(e)}function _1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 6v4"},child:[]},{tag:"path",attr:{d:"M14 14h-4"},child:[]},{tag:"path",attr:{d:"M14 18h-4"},child:[]},{tag:"path",attr:{d:"M14 8h-4"},child:[]},{tag:"path",attr:{d:"M18 12h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"M18 22V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v18"},child:[]}]})(e)}function H1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"},child:[]},{tag:"path",attr:{d:"M8.5 2h7"},child:[]},{tag:"path",attr:{d:"M7 16h10"},child:[]}]})(e)}function W1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"M10 9H8"},child:[]},{tag:"path",attr:{d:"M16 13H8"},child:[]},{tag:"path",attr:{d:"M16 17H8"},child:[]}]})(e)}function q1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]}]})(e)}function V1(e){return Ee({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"},child:[]}]})(e)}const $1=({muted:e})=>e?r.jsx(N1,{size:18,"aria-hidden":"true"}):r.jsx(O1,{size:18,"aria-hidden":"true"}),U1=({off:e})=>e?r.jsx(D1,{size:18,"aria-hidden":"true"}):r.jsx(T1,{size:18,"aria-hidden":"true"}),G1=({active:e})=>r.jsx(A1,{size:18,color:e?"var(--chakra-colors-status-success, #16A34A)":"currentColor","aria-hidden":"true"}),Y1=()=>r.jsx(R1,{size:18,"aria-hidden":"true"});function K1({participantName:e,participantRole:t,participantAvatar:n,duration:o,isMuted:i=!1,isCameraOff:l=!1,isSharingScreen:a=!1,onToggleMute:c,onToggleCamera:f,onEndCall:u,onShareScreen:d,position:p="bottom",variant:x="adaptive",...h}){const[b,v]=I.default.useState(i),[F,y]=I.default.useState(l),j=x==="dark",C=()=>{v(w=>!w),c==null||c()},S=()=>{y(w=>!w),f==null||f()},B=({onClick:w,ariaLabel:D,active:E,isEndCall:A=!1,children:M})=>{let z=j?"rgba(255,255,255,0.1)":"var(--chakra-colors-bg-subtle, #F0F4F8)",T=j?"white":"var(--chakra-colors-text-heading, #111926)",W=j?"rgba(255,255,255,0.2)":"var(--chakra-colors-border, #E2E8F0)";return A?(z="var(--chakra-colors-status-error, #DC2626)",T="white",W="color-mix(in srgb, var(--chakra-colors-status-error, #DC2626) 85%, black)"):E&&(z="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",T="var(--chakra-colors-status-error, #DC2626)",W="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.25))"),r.jsx("button",{onClick:w,"aria-label":D,"aria-pressed":E,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:44,height:44,borderRadius:"50%",border:E?"1px solid var(--chakra-colors-status-error)":"1px solid transparent",cursor:"pointer",transition:"all 0.15s ease",background:z,color:T,WebkitTapHighlightColor:"transparent"},onMouseEnter:R=>{const k=R.currentTarget;k.style.background=W,k.style.transform="scale(1.06)"},onMouseLeave:R=>{const k=R.currentTarget;k.style.background=z,k.style.transform="scale(1)"},children:M})};return r.jsxs(s.Box,{position:"fixed",...p==="bottom"?{bottom:"0"}:{top:"0"},left:"0",right:"0",zIndex:"overlay",display:"flex",alignItems:"center",justifyContent:"space-between",px:{base:"4",md:"8"},flexWrap:"wrap",gap:"4",bg:j?void 0:"bg.surface",borderColor:"border",style:{minHeight:72,paddingTop:12,paddingBottom:p==="bottom"?"calc(12px + env(safe-area-inset-bottom, 0px))":12,background:j?"linear-gradient(135deg, #0A1220 0%, #0F1C2E 100%)":void 0,borderTop:p==="bottom"?"1px solid var(--chakra-colors-border)":"none",borderBottom:p==="top"?"1px solid var(--chakra-colors-border)":"none",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",transition:"background 0.2s ease, border-color 0.2s ease"},...h,children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",children:[r.jsx(Jt,{src:n,name:e,size:"md"}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",color:j?"white":"text.heading",children:e}),t&&r.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",color:j?"rgba(255,255,255,0.6)":"text.muted",children:t})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",ml:"2",children:[r.jsxs("span",{"aria-label":"Live call",style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:700,background:"var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",color:"var(--chakra-colors-status-error, #DC2626)",fontFamily:"var(--font-body)",letterSpacing:"0.05em"},children:[r.jsx("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:"var(--chakra-colors-status-error, #DC2626)",display:"inline-block",animation:"medixPulse 1.5s ease-in-out infinite"}}),"LIVE"]}),o&&r.jsx(s.Box,{fontSize:"sm",fontFamily:"var(--font-mono, monospace)",fontWeight:"600",color:j?"rgba(255,255,255,0.8)":"text.heading",style:{letterSpacing:"0.05em"},children:o})]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[c&&r.jsx(B,{onClick:C,ariaLabel:b?"Unmute microphone":"Mute microphone",active:b,children:r.jsx($1,{muted:b})}),f&&r.jsx(B,{onClick:S,ariaLabel:F?"Turn camera on":"Turn camera off",active:F,children:r.jsx(U1,{off:F})}),d&&r.jsx(B,{onClick:d,ariaLabel:a?"Stop sharing screen":"Share screen",active:a,children:r.jsx(G1,{active:a})}),u&&r.jsx(B,{onClick:u,ariaLabel:"End call",isEndCall:!0,children:r.jsx(Y1,{})})]})]})}const Z1={consultation:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF",icon:r.jsx(M1,{size:14,"aria-hidden":"true"})},lab:{bg:"color-mix(in srgb, #7700CC 12%, transparent)",color:"#7700CC",icon:r.jsx(H1,{size:14,"aria-hidden":"true"})},prescription:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:r.jsx(z1,{size:14,"aria-hidden":"true"})},vitals:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706",icon:r.jsx(V1,{size:14,"aria-hidden":"true"})},note:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B",icon:r.jsx(W1,{size:14,"aria-hidden":"true"})},admission:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444",icon:r.jsx(_1,{size:14,"aria-hidden":"true"})},discharge:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:r.jsx(P1,{size:14,"aria-hidden":"true"})},custom:{bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",icon:r.jsx(q1,{size:14,"aria-hidden":"true"})}},wo={success:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981"},warning:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706"},error:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444"},info:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF"},neutral:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B"}};function X1(){return r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",children:[r.jsxs(s.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",bg:"bg.subtle",style:{animation:"medix-shimmer 1.5s infinite"}}),r.jsx(s.Box,{w:"px",flex:"1",minH:"8",bg:"border",mt:"2"})]}),r.jsxs(s.Box,{flex:"1",pb:"6",children:[r.jsx(s.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:"40%",mb:"2",style:{animation:"medix-shimmer 1.5s infinite"}}),r.jsx(s.Box,{h:"3",bg:"bg.subtle",borderRadius:"full",w:"65%",style:{animation:"medix-shimmer 1.5s infinite"}})]})]})}function J1({events:e,compact:t=!1,isLoading:n=!1,loadingCount:o=4,colorScheme:i="blue",...l}){const a=i==="purple"?"var(--chakra-colors-purple-200, rgba(119,0,204,0.2))":"var(--chakra-colors-blue-200, rgba(6,133,255,0.2))";return n?r.jsx(s.Box,{...l,children:Array.from({length:o}).map((c,f)=>r.jsx(X1,{},f))}):r.jsx(s.Box,{...l,role:"feed","aria-label":"Patient medical timeline",children:e.map((c,f)=>{const u=Z1[c.type],d=f===e.length-1;return r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",role:"article","aria-label":`${c.title} on ${c.date}`,children:[r.jsxs(s.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",style:{background:u.bg,color:u.color,border:`1.5px solid ${u.color}40`,cursor:c.onClick?"pointer":"default",transition:"transform 0.15s, box-shadow 0.15s",flexShrink:0},onClick:c.onClick,role:c.onClick?"button":void 0,tabIndex:c.onClick?0:void 0,onKeyDown:c.onClick?p=>{(p.key==="Enter"||p.key===" ")&&c.onClick()}:void 0,_hover:c.onClick?{transform:"scale(1.1)"}:void 0,children:c.icon??u.icon}),!d&&r.jsx(s.Box,{w:"1px",flex:"1",minH:"8",mt:"1",style:{background:a}})]}),r.jsxs(s.Box,{flex:"1",pb:d?"0":"5",cursor:c.onClick?"pointer":"default",onClick:c.onClick,_hover:c.onClick?{opacity:.85}:void 0,transition:"opacity 0.15s",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:c.title}),c.badgeLabel&&c.badgeStatus&&r.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"1px 7px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:wo[c.badgeStatus].bg,color:wo[c.badgeStatus].color},children:c.badgeLabel})]}),!t&&c.description&&r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:c.description}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",mt:"1",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:c.date}),c.provider&&r.jsxs(r.Fragment,{children:[r.jsx(s.Box,{w:"1px",h:"3",style:{background:"var(--chakra-colors-border)"}}),r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:c.provider})]})]})]})]},c.id)})})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>s.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>s.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>s.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>s.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>s.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>s.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>s.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>s.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>s.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>s.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>s.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>s.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>s.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>s.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>s.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>s.WrapItem});exports.Accordion=l1;exports.Alert=$n;exports.AllergyBadge=ol;exports.AppointmentCard=g1;exports.Avatar=Jt;exports.AvatarGroup=Hl;exports.Badge=Gn;exports.BlogCard=u1;exports.BloodTypeBadge=rl;exports.Breadcrumb=Js;exports.Button=Se;exports.Calendar=Zn;exports.Card=Jo;exports.CardBody=Ya;exports.CardFooter=Ka;exports.CardHeader=Ga;exports.Checkbox=$o;exports.Combobox=Ca;exports.Container=ei;exports.CookieConsentBanner=gi;exports.DASHBOARD_MEDIX_TIER_CONFIG=Ht;exports.DASHBOARD_MEDIX_TIER_ORDER=ii;exports.DEFAULT_HAPTIC_PATTERNS=Kt;exports.DRAFT_STORAGE_PREFIX=Ze;exports.DashboardLayout=ai;exports.DataTable=d1;exports.DatePicker=ka;exports.DateRangePicker=wa;exports.Divider=Po;exports.DoctorCard=f1;exports.Drawer=gc;exports.EmptyState=fc;exports.FileUpload=Ba;exports.Footer=ci;exports.FormControl=la;exports.FullPageSpinner=Wl;exports.HapticsProvider=Ao;exports.ICD10Badge=nl;exports.IconButton=Ro;exports.Input=Yn;exports.Logo=Ye;exports.MedicalRecordBadge=j1;exports.MedixProvider=Al;exports.Modal=dc;exports.Navbar=Hs;exports.NotFoundPage=pc;exports.OTPInput=Go;exports.PWAInstallPrompt=bi;exports.Pagination=ui;exports.PatientTimeline=J1;exports.PhoneInput=ha;exports.PinInput=aa;exports.PrescriptionCard=v1;exports.Progress=fi;exports.RadioGroup=na;exports.RichTextEditor=Ua;exports.RichTextInput=Xn;exports.SearchInput=Kn;exports.SectionHeader=Xa;exports.Select=ta;exports.ServerErrorPage=hc;exports.Skeleton=Ue;exports.SkeletonCard=lc;exports.SkeletonText=di;exports.Spinner=Oo;exports.StatCard=Qo;exports.Stepper=oc;exports.Switch=Uo;exports.TEXTAREA_DRAFT_PREFIX=Ke;exports.Tabs=tc;exports.Tag=No;exports.TagInput=Fa;exports.TagsInput=Yo;exports.TelehealthCallBar=K1;exports.TestimonialCard=a1;exports.Textarea=qo;exports.ThemeColorPalette=ti;exports.Toaster=zo;exports.Tooltip=Oe;exports.VitalBadge=h1;exports.canUseHaptics=Xt;exports.cancelHaptic=qn;exports.clearRichTextDraft=Zo;exports.clearTextareaDraft=Ho;exports.colorTokens=_;exports.dismissToast=Cl;exports.getEffectiveStorageKey=Ko;exports.getEffectiveTextareaStorageKey=_o;exports.getMedixScoreTierForScore=js;exports.getMedixScoreTierMeta=li;exports.getRichTextDraft=Xo;exports.getTextareaDraft=Wo;exports.htmlToMarkdown=it;exports.isReducedMotionPreferred=Wn;exports.markdownToHtml=He;exports.medixConfig=Eo;exports.radiiTokens=Bo;exports.resolveHapticPattern=Io;exports.saveRichTextDraft=Sn;exports.saveTextareaDraft=jn;exports.shadowTokens=Fo;exports.spacingTokens=So;exports.system=Lo;exports.textStyleTokens=Co;exports.toast=yt;exports.triggerHaptic=Vn;exports.typographyTokens=ot;exports.useColorScheme=Ml;exports.useHaptics=de;exports.useIsDarkMode=Un;exports.useThemeMode=St;
435
+ `},i),l}function Lp(e,t){return e&&"run"in e?async function(n,o){const i=uo(n,{file:o,...t});await e.run(i,o)}:function(n,o){return uo(n,{file:o,...e||t})}}function fo(e){if(e)throw e}var xn,po;function Ip(){if(po)return xn;po=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},l=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!h)return!1;var x;for(x in u);return typeof x>"u"||e.call(u,x)},a=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},c=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(o)return o(u,f).value}else return;return u[f]};return xn=function d(){var u,f,h,x,p,b,v=arguments[0],B=1,y=arguments.length,S=!1;for(typeof v=="boolean"&&(S=v,v=arguments[1]||{},B=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});B<y;++B)if(u=arguments[B],u!=null)for(f in u)h=c(v,f),x=c(u,f),v!==x&&(S&&x&&(l(x)||(p=i(x)))?(p?(p=!1,b=h&&i(h)?h:[]):b=h&&l(h)?h:{},a(v,{name:f,newValue:d(S,b,x)})):typeof x<"u"&&a(v,{name:f,newValue:x}));return v},xn}var Tp=Ip();const gn=Fi(Tp);function _n(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Dp(){const e=[],t={run:n,use:o};return t;function n(...i){let l=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...i);function c(d,...u){const f=e[++l];let h=-1;if(d){a(d);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,f?Ap(f,c)(...u):a(null,...u)}}function o(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ap(e,t){let n;return o;function o(...a){const c=e.length>a.length;let d;c&&a.push(i);try{d=e.apply(this,a)}catch(u){const f=u;if(c&&n)throw f;return i(f)}c||(d&&d.then&&typeof d.then=="function"?d.then(l,i):d instanceof Error?i(d):l(d))}function i(a,...c){n||(n=!0,t(a,...c))}function l(a){i(null,a)}}const ze={basename:zp,dirname:Rp,extname:Mp,join:Op,sep:"/"};function zp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ft(e);let n=0,o=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let a=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else a<0&&(l=!0,a=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(o=i):(c=-1,o=a));return n===o?o=a:o<0&&(o=e.length),e.slice(n,o)}function Rp(e){if(Ft(e),e.length===0)return".";let t=-1,n=e.length,o;for(;--n;)if(e.codePointAt(n)===47){if(o){t=n;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Mp(e){Ft(e);let t=e.length,n=-1,o=0,i=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){o=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===o+1?"":e.slice(i,n)}function Op(...e){let t=-1,n;for(;++t<e.length;)Ft(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Np(n)}function Np(e){Ft(e);const t=e.codePointAt(0)===47;let n=Pp(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Pp(e,t){let n="",o=0,i=-1,l=0,a=-1,c,d;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(i===a-1||l===1))if(i!==a-1&&l===2){if(n.length<2||o!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",o=0):(n=n.slice(0,d),o=n.length-1-n.lastIndexOf("/")),i=a,l=0;continue}}else if(n.length>0){n="",o=0,i=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),o=a-i-1;i=a,l=0}else c===46&&l>-1?l++:l=-1}return n}function Ft(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _p={cwd:Hp};function Hp(){return"/"}function Hn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Wp(e){if(typeof e=="string")e=new URL(e);else if(!Hn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return qp(e)}function qp(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const o=t.codePointAt(n+2);if(o===70||o===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const mn=["history","path","basename","stem","extname","dirname"];class tl{constructor(t){let n;t?Hn(t)?n={path:t}:typeof t=="string"||Vp(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_p.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<mn.length;){const l=mn[o];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)mn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ze.basename(this.path):void 0}set basename(t){yn(t,"basename"),bn(t,"basename"),this.path=ze.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ze.dirname(this.path):void 0}set dirname(t){ho(this.basename,"dirname"),this.path=ze.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ze.extname(this.path):void 0}set extname(t){if(bn(t,"extname"),ho(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ze.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Hn(t)&&(t=Wp(t)),yn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ze.basename(this.path,this.extname):void 0}set stem(t){yn(t,"stem"),bn(t,"stem"),this.path=ze.join(this.dirname||"",t+(this.extname||""))}fail(t,n,o){const i=this.message(t,n,o);throw i.fatal=!0,i}info(t,n,o){const i=this.message(t,n,o);return i.fatal=void 0,i}message(t,n,o){const i=new ve(t,n,o);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function bn(e,t){if(e&&e.includes(ze.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ze.sep+"`")}function yn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ho(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Vp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $p=(function(e){const o=this.constructor.prototype,i=o[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,o),l}),Up={}.hasOwnProperty;class hr extends $p{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Dp()}copy(){const t=new hr;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(gn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(wn("data",this.frozen),this.namespace[t]=n,this):Up.call(this.namespace,t)&&this.namespace[t]||void 0:t?(wn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const i=n.call(t,...o);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Nt(t),o=this.parser||this.Parser;return vn("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),vn("process",this.parser||this.Parser),kn("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,a){const c=Nt(t),d=o.parse(c);o.run(d,c,function(f,h,x){if(f||!h||!x)return u(f);const p=h,b=o.stringify(p,x);Kp(b)?x.value=b:x.result=b,u(f,x)});function u(f,h){f||!h?a(f):l?l(h):n(void 0,h)}}}processSync(t){let n=!1,o;return this.freeze(),vn("processSync",this.parser||this.Parser),kn("processSync",this.compiler||this.Compiler),this.process(t,i),go("processSync","process",n),o;function i(l,a){n=!0,fo(l),o=a}}run(t,n,o){xo(t),this.freeze();const i=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?l(void 0,o):new Promise(l);function l(a,c){const d=Nt(n);i.run(t,d,u);function u(f,h,x){const p=h||t;f?c(f):a?a(p):o(void 0,p,x)}}}runSync(t,n){let o=!1,i;return this.run(t,n,l),go("runSync","run",o),i;function l(a,c){fo(a),i=c,o=!0}}stringify(t,n){this.freeze();const o=Nt(n),i=this.compiler||this.Compiler;return kn("stringify",i),xo(t),i(t,o)}use(t,...n){const o=this.attachers,i=this.namespace;if(wn("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")d(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...h]=u;d(f,h)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(u.plugins),u.settings&&(i.settings=gn(!0,i.settings,u.settings))}function c(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const h=u[f];l(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function d(u,f){let h=-1,x=-1;for(;++h<o.length;)if(o[h][0]===u){x=h;break}if(x===-1)o.push([u,...f]);else if(f.length>0){let[p,...b]=f;const v=o[x][1];_n(v)&&_n(p)&&(p=gn(!0,v,p)),o[x]=[u,p,...b]}}}}const Gp=new hr().freeze();function vn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function kn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function wn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xo(e){if(!_n(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function go(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Nt(e){return Yp(e)?e:new tl(e)}function Yp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Kp(e){return typeof e=="string"||Zp(e)}function Zp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xp="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",mo=[],bo={allowDangerousHtml:!0},Jp=/^(https?|ircs?|mailto|xmpp)$/i,Qp=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function e1(e){const t=t1(e),n=n1(e);return r1(t.runSync(t.parse(n),n),e)}function t1(e){const t=e.rehypePlugins||mo,n=e.remarkPlugins||mo,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...bo}:bo;return Gp().use(Af).use(n).use(Lp,o).use(t)}function n1(e){const t=e.children||"",n=new tl;return typeof t=="string"&&(n.value=t),n}function r1(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||o1;for(const f of Qp)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Xp+f.id,void 0);return el(e,u),uu(e,{Fragment:r.Fragment,components:i,ignoreInvalidStyle:!0,jsx:r.jsx,jsxs:r.jsxs,passKeys:!0,passNode:!0});function u(f,h,x){if(f.type==="raw"&&x&&typeof h=="number")return a?x.children.splice(h,1):x.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let p;for(p in fn)if(Object.hasOwn(fn,p)&&Object.hasOwn(f.properties,p)){const b=f.properties[p],v=fn[p];(v===null||v.includes(f.tagName))&&(f.properties[p]=d(String(b||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):l?l.includes(f.tagName):!1;if(!p&&o&&typeof h=="number"&&(p=!o(f,h,x)),p&&x&&typeof h=="number")return c&&f.children?x.children.splice(h,1,...f.children):x.children.splice(h,1),h}}}function o1(e){const t=e.indexOf(":"),n=e.indexOf("?"),o=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||o!==-1&&t>o||Jp.test(e.slice(0,t))?e:""}const i1={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function l1({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:o="blue",answerType:i="HTML",haptic:l,disableHaptic:a=!1,...c}){const{trigger:d}=de(),u=i1[o],[f,h]=I.default.useState(new Set(n)),x=p=>{!a&&l!==!1&&d(l??"selection"),h(b=>{const v=new Set(b);return v.has(p)?v.delete(p):(t||v.clear(),v.add(p)),v})};return r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"4",...c,children:e.map(p=>{const b=f.has(p.id);return r.jsxs(s.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:b?u.ring:"border"},children:[r.jsxs(s.Box,{as:"button",w:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4",px:"6",py:"5",bg:"transparent",border:"none",cursor:"pointer",textAlign:"left",onClick:()=>x(p.id),"aria-expanded":b,children:[r.jsx(s.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:p.question}),r.jsx(s.Box,{flexShrink:0,w:"10",h:"10",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s, border-color 0.2s, color 0.2s","aria-hidden":"true",style:{border:b?"none":"1.5px solid var(--medix-form-text)",background:b?u.solid:"transparent",color:b?"#ffffff":"inherit",flexShrink:0},children:b?r.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:r.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),r.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),r.jsx(s.Box,{overflow:"hidden",maxH:b?"800px":"0px",opacity:b?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:r.jsx(s.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:typeof p.answer=="string"?i==="MD"?r.jsx(e1,{children:p.answer}):r.jsx("span",{dangerouslySetInnerHTML:{__html:Rc(p.answer)}}):p.answer})})]},p.id)})})}function a1({quote:e,authorName:t,authorTitle:n,authorAvatar:o,rating:i,...l}){return r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"none",_dark:{boxShadow:"none"},...l,children:[i!==void 0&&r.jsx(s.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((a,c)=>r.jsx(s.Box,{as:"span",fontSize:"sm",color:c<i?"#F59E0B":"text.muted",children:"★"},c))}),r.jsxs(s.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[o?r.jsx("img",{src:o,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):r.jsx(s.Box,{w:"9",h:"9",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"sm",fontWeight:"semibold",color:"white",flexShrink:0,children:t.charAt(0).toUpperCase()}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const s1={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function c1(e){if(!e)return null;try{const t=new Date(e);return isNaN(t.getTime())?null:{day:String(t.getUTCDate()),weekday:t.toLocaleDateString("en-US",{weekday:"short",timeZone:"UTC"}).toUpperCase()}}catch{return null}}function u1({title:e,excerpt:t,category:n,date:o,coverImage:i,href:l,onClick:a,colorScheme:c="blue",...d}){const u=!!(l||a),f=c1(o),h=s1[c],x={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:u?"pointer":"default",textAlign:"left"},p=r.jsxs(s.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:u?{transform:"translateY(-4px)"}:void 0,...d,children:[r.jsxs(s.Box,{position:"relative",overflow:"hidden",children:[i?r.jsx("img",{src:i,alt:e,style:{width:"100%",height:300,objectFit:"cover",display:"block",borderRadius:"20px"}}):r.jsx(s.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),f&&r.jsxs(s.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",border:"1px solid",borderColor:"border",boxShadow:"none",children:[r.jsx(s.Box,{style:{fontSize:22,fontWeight:700,color:h.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:f.day}),r.jsx(s.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:f.weekday})]})]}),r.jsxs(s.Box,{px:"0",pt:"3",pb:"4",children:[n&&r.jsx(s.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:h.token,color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),r.jsx(s.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&r.jsx(s.Box,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"relaxed",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t})]})]});return l?r.jsx("a",{href:l,style:x,onClick:a,children:p}):a?r.jsx("button",{type:"button",style:x,onClick:a,children:p}):p}function d1({columns:e,data:t,rowKey:n="id",isLoading:o=!1,emptyMessage:i="No data available",sortable:l=!1,sortKey:a,sortDirection:c="asc",onSort:d,striped:u=!0,onRowClick:f,caption:h,enablePagination:x=!1,pageSize:p=10,page:b,onPageChange:v,enableSearch:B=!1,searchPlaceholder:y="Search table...",searchQuery:S,onSearchChange:j,style:C,className:F,stickyFirstColumn:w=!1,haptic:D,disableHaptic:E=!1}){const{trigger:z}=de(),[N,R]=U.useState(""),T=S??N,[q,M]=U.useState(1),k=b??q,[P,$]=U.useState(a),[Q,J]=U.useState(c),g=a??P,H=a?c:Q,A=X=>{R(X),M(1),j==null||j(X)},m=X=>{!E&&D!==!1&&z(D??"selection");const ne=g===X&&H==="asc"?"desc":"asc";$(X),J(ne),d==null||d(X,ne)},O=X=>{M(X),v==null||v(X)},G=U.useMemo(()=>{if(!T.trim())return t;const X=T.toLowerCase().trim();return t.filter(ne=>e.some(le=>{const ge=ne[le.key];return ge==null?!1:String(ge).toLowerCase().includes(X)}))},[t,e,T]),K=U.useMemo(()=>!g||d?G:[...G].sort((X,ne)=>{const le=X[g],ge=ne[g],we=String(le??""),xe=String(ge??""),je=we.localeCompare(xe,void 0,{numeric:!0,sensitivity:"base"});return H==="asc"?je:-je}),[G,g,H,d]),Y=K.length,Z=U.useMemo(()=>{if(!x)return K;const X=(k-1)*p;return K.slice(X,X+p)},[K,x,k,p]),ae=({colKey:X})=>g!==X?r.jsx(s.Text,{as:"span",opacity:.3,ml:"1",fontSize:"xs",children:"↕"}):r.jsx(s.Text,{as:"span",ml:"1",color:"text.heading",fontSize:"xs",children:H==="asc"?"↑":"↓"});return r.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg",boxShadow:"none",_dark:{boxShadow:"none"},style:C,className:F,children:[B&&r.jsx(s.Box,{p:"4",borderBottom:"1px solid",borderColor:"border",bg:"bg",children:r.jsx(Kn,{placeholder:y,value:T,onChange:X=>A(X.target.value),maxW:"360px"})}),r.jsx(s.Box,{overflowX:"auto",children:r.jsxs(s.Box,{as:"table",w:"full",style:{borderCollapse:"collapse"},"aria-label":h,children:[h&&r.jsx("caption",{style:{display:"none"},children:h}),r.jsx(s.Box,{as:"thead",children:r.jsx(s.Box,{as:"tr",bg:"bg.subtle",borderBottom:"1px solid",borderColor:"border",children:e.map((X,ne)=>{const le=w&&ne===0;return r.jsx(s.Box,{as:"th",py:"3",px:"4",textAlign:X.align??"left",minW:X.minWidth,fontSize:"xs",fontWeight:"600",letterSpacing:"0.05em",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",whiteSpace:"nowrap",userSelect:"none",cursor:X.sortable||l?"pointer":"default",_hover:X.sortable||l?{color:"text.heading"}:void 0,onClick:()=>X.sortable||l?m(X.key):void 0,"aria-sort":g===X.key?H==="asc"?"ascending":"descending":void 0,position:le?"sticky":void 0,left:le?0:void 0,zIndex:le?3:void 0,bg:le?"bg.subtle":void 0,borderRight:le?"1px solid":void 0,borderColor:le?"border":void 0,boxShadow:le?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:r.jsxs(s.Flex,{as:"span",align:"center",justify:X.align==="right"?"flex-end":X.align==="center"?"center":"flex-start",children:[X.label,(X.sortable||l)&&r.jsx(ae,{colKey:X.key})]})},X.key)})})}),r.jsx(s.Box,{as:"tbody",children:o?Array.from({length:5}).map((X,ne)=>r.jsx(s.Box,{as:"tr",borderBottom:"1px solid",borderColor:"border",children:e.map(le=>r.jsx(s.Box,{as:"td",py:"3.5",px:"4",children:r.jsx(s.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},le.key))},ne)):Z.length===0?r.jsx(s.Box,{as:"tr",children:r.jsx("td",{colSpan:e.length,style:{textAlign:"center",padding:"48px 16px"},children:r.jsx(s.Text,{color:"text.muted",fontFamily:"var(--font-body)",fontSize:"sm",children:i})})}):Z.map((X,ne)=>{const le=String(X[n]??ne);return r.jsx(s.Box,{as:"tr",onClick:()=>{f&&!E&&D!==!1&&z(D??"selection"),f==null||f(X,ne)},bg:u&&ne%2===1?"bg.subtle":"transparent",borderBottom:"1px solid",borderColor:"border",cursor:f?"pointer":"default",transition:"background 0.15s ease",_hover:{bg:"bg.subtle"},children:e.map((ge,we)=>{const xe=w&&we===0;return r.jsx(s.Box,{as:"td",py:"3.5",px:"4",textAlign:ge.align??"left",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",verticalAlign:"middle",position:xe?"sticky":void 0,left:xe?0:void 0,zIndex:xe?2:void 0,bg:xe?u&&ne%2===1?"bg.subtle":"bg":void 0,borderRight:xe?"1px solid":void 0,borderColor:xe?"border":void 0,boxShadow:xe?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:ge.render?ge.render(X[ge.key],X,ne):String(X[ge.key]??"—")},ge.key)})},le)})})]})}),x&&r.jsxs(s.Flex,{p:"4",borderTop:"1px solid",borderColor:"border",bg:"bg",align:"center",justify:"space-between",flexWrap:"wrap",gap:"4",children:[r.jsxs(s.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:["Showing ",Y===0?0:(k-1)*p+1," to"," ",Math.min(k*p,Y)," of ",Y," entries"]}),r.jsx(ui,{total:Y,pageSize:p,currentPage:k,onChange:O,compact:!0,haptic:D,disableHaptic:E})]})]})}function f1({name:e,specialty:t,location:n,avatar:o,rating:i,reviewCount:l,experience:a,consultationFee:c,isVerified:d=!1,isAvailable:u=!1,availabilityLabel:f="Available",onBookClick:h,onViewClick:x,variant:p="standard",...b}){return p==="featured"?r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},display:"flex",flexDirection:"column",...b,children:[o?r.jsx("img",{src:o,alt:e,style:{width:"100%",height:240,objectFit:"cover",display:"block"}}):r.jsx(s.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:r.jsx(s.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),r.jsxs(s.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[r.jsxs(s.Box,{children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),d&&r.jsx(Oe,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},children:[r.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),r.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})})]}),r.jsxs(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[u&&r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[r.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),f]}),u&&a&&r.jsx(s.Box,{w:"1px",h:"20px",bg:"border"}),a&&r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),r.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[c&&r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),r.jsxs(s.Box,{display:"flex",gap:"3",alignItems:"center",children:[x&&r.jsx(s.Box,{as:"button",px:"3",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.body",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:"blue.500"},onClick:x,children:"view"}),h&&r.jsx(s.Box,{as:"button",px:"5",py:"2.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:h,children:"Consult Now"})]})]})]})]}):p==="compact"?r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...b,children:[r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[r.jsxs(s.Box,{display:"flex",gap:"4",children:[r.jsx(s.Box,{flexShrink:0,children:o?r.jsx("img",{src:o,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx(s.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),r.jsxs(s.Box,{pt:"1",children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),r.jsxs(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&p!=="compact"?` • ${n}`:""]})]})]}),x&&r.jsx(s.Box,{as:"button",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"none",cursor:"pointer",_hover:{color:"blue.500"},onClick:x,pt:"1",children:"View"})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx(s.Box,{as:"span",color:"status.warning",mt:"-2px",children:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),r.jsxs(s.Box,{as:"span",color:"text.heading",mr:"1",children:[(i==null?void 0:i.toFixed(1))||"New"," ",l?`(${l})`:""]}),n&&r.jsxs(s.Box,{as:"span",children:[" • ",n]}),a&&r.jsxs(s.Box,{as:"span",children:[" • ",a]})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[c&&r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),h&&r.jsx(s.Box,{as:"button",px:"5",py:"2.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:h,children:"Consult Now"})]})]}):r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...b,children:[r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[r.jsxs(s.Box,{display:"flex",gap:"4",minW:"0",flex:"1",children:[r.jsx(s.Box,{flexShrink:0,children:o?r.jsx("img",{src:o,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx(s.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),r.jsxs(s.Box,{pt:"1",minW:"0",flex:"1",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",minW:"0",children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minW:"0",flex:"1",children:e}),d&&r.jsx(Oe,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},children:[r.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),r.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})})]}),r.jsxs(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:[t,n?` • ${n}`:""]})]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[r.jsx(s.Box,{as:"span",color:"status.warning",mt:"-2px",children:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),(i==null?void 0:i.toFixed(1))||"New"," ",l?r.jsxs(s.Box,{as:"span",color:"text.muted",children:["(",l,")"]}):null]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[u&&r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[r.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),f]}),u&&a&&r.jsx(s.Box,{w:"1px",h:"20px",bg:"border"}),a&&r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),r.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[c&&r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),r.jsxs(s.Box,{display:"flex",gap:"3",alignItems:"center",children:[x&&r.jsx(s.Box,{as:"button",px:"4",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"1px solid",borderColor:"border",borderRadius:"md",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:x,children:"view"}),h&&r.jsx(s.Box,{as:"button",px:"5",py:"2.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:h,children:"Consult Now"})]})]})]})}const p1={normal:{bg:"color-mix(in srgb, var(--chakra-colors-status-success) 8%, transparent)",indicator:"status.success",border:"color-mix(in srgb, var(--chakra-colors-status-success) 20%, transparent)",text:"status.success",ariaLabel:"Normal",icon:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[r.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"var(--chakra-colors-status-success)"}),r.jsx("path",{d:"M7 12.5l3.5 3.5 6.5-7",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]})},warning:{bg:"color-mix(in srgb, var(--chakra-colors-status-warning) 8%, transparent)",indicator:"status.warning",border:"color-mix(in srgb, var(--chakra-colors-status-warning) 20%, transparent)",text:"status.warning",ariaLabel:"Warning",icon:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[r.jsx("path",{d:"M12 2L2 21h20L12 2z",fill:"var(--chakra-colors-status-warning)"}),r.jsx("path",{d:"M12 9v5",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),r.jsx("circle",{cx:"12",cy:"17",r:"1",fill:"white"})]})},critical:{bg:"color-mix(in srgb, var(--chakra-colors-status-error) 8%, transparent)",indicator:"status.error",border:"color-mix(in srgb, var(--chakra-colors-status-error) 20%, transparent)",text:"status.error",ariaLabel:"Critical",icon:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[r.jsx("path",{d:"M8.5 2h7l6.5 6.5v7L15.5 22h-7L2 15.5v-7L8.5 2z",fill:"var(--chakra-colors-status-error)"}),r.jsx("path",{d:"M12 7v6",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),r.jsx("circle",{cx:"12",cy:"16.5",r:"1",fill:"white"})]})}};function h1({label:e,value:t,unit:n,status:o="normal",...i}){const l=p1[o];return r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:l.bg,border:"1px solid",borderColor:l.border,...i,children:[r.jsx("span",{"aria-label":l.ariaLabel,style:{display:"inline-flex",alignItems:"center",flexShrink:0},children:l.icon}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),r.jsxs(s.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[r.jsx(s.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&r.jsx(s.Box,{fontSize:"xs",color:l.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const x1={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function g1({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:o,time:i,type:l="video",status:a="upcoming",onCancel:c,onReschedule:d,onJoin:u,...f}){const h=x1[a];return r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...f,children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?r.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx(s.Box,{w:"10",h:"10",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"md",fontWeight:"bold",color:"white",children:e.charAt(0)}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),r.jsx(Gn,{status:h.color,size:"sm",children:h.label})]}),r.jsxs(s.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:l==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),a==="upcoming"&&r.jsxs(s.Box,{display:"flex",gap:"2",children:[u&&r.jsx(s.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),d&&r.jsx(s.Box,{as:"button",flex:"1",py:"2",bg:"transparent",color:"text.body",border:"1px solid",borderColor:"border",borderRadius:"md",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{borderColor:"blue.400",color:"blue.500"},transition:"all 0.15s",onClick:d,children:"Reschedule"}),c&&r.jsx(s.Box,{as:"button",py:"2",px:"3",bg:"transparent",color:"red.500",border:"1px solid",borderColor:"red.200",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"red.50"},transition:"all 0.15s",onClick:c,children:"Cancel"})]})]})}const m1={active:{label:"Active",bg:"color-mix(in srgb, var(--chakra-colors-status-success) 12%, transparent)",color:"var(--chakra-colors-status-success)"},expired:{label:"Expired",bg:"color-mix(in srgb, var(--chakra-colors-status-error) 10%, transparent)",color:"var(--chakra-colors-status-error)"},dispensed:{label:"Dispensed",bg:"color-mix(in srgb, var(--chakra-colors-blue-500) 10%, transparent)",color:"var(--chakra-colors-blue-500)"}},b1=()=>r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("path",{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"}),r.jsx("path",{d:"m8.5 8.5 7 7"})]}),y1=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),r.jsx("polyline",{points:"7 10 12 15 17 10"}),r.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),yo=()=>r.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),r.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),r.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),r.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]});function v1({rxId:e,doctorName:t,doctorSpecialty:n,issuedDate:o,expiryDate:i,drugs:l,refillsRemaining:a,status:c="active",colorScheme:d="blue",onDownload:u,...f}){const h=m1[c],x=d==="purple"?"#7700CC":"#0685FF",p=d==="purple"?"color-mix(in srgb, #7700CC 8%, transparent)":"color-mix(in srgb, #0685FF 8%, transparent)";return r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",...f,children:[r.jsxs(s.Box,{px:"5",py:"3.5",display:"flex",alignItems:"center",justifyContent:"space-between",style:{borderBottom:"1px solid var(--chakra-colors-border)",background:p},children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[r.jsx(s.Box,{style:{color:x},children:r.jsx(b1,{})}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",style:{color:x},children:"Prescription"}),e&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:e})]}),r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:h.bg,color:h.color},children:[r.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:h.color,display:"inline-block"}}),h.label]})]}),r.jsxs(s.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"border",flexWrap:"wrap",gap:"2",children:[r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:t}),n&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]}),r.jsxs(s.Box,{display:"flex",gap:"4",children:[r.jsxs(s.Box,{children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[r.jsx(yo,{}),r.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Issued"})]}),r.jsx(s.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),i&&r.jsxs(s.Box,{children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[r.jsx(yo,{}),r.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Expires"})]}),r.jsx(s.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]})]})]}),r.jsx(s.Box,{px:"5",py:"4",display:"flex",flexDirection:"column",gap:"3",children:l.map((b,v)=>r.jsxs(s.Box,{display:"flex",alignItems:"flex-start",gap:"3",p:"3",borderRadius:"md",bg:"bg.subtle",border:"1px solid",borderColor:"border",children:[r.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:"50%",background:p,color:x,fontSize:11,fontWeight:700,fontFamily:"var(--font-heading)",flexShrink:0,marginTop:1},children:v+1}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:b.name}),r.jsx("span",{style:{padding:"1px 6px",borderRadius:4,fontSize:11,fontWeight:600,background:p,color:x,fontFamily:"var(--font-body)"},children:b.dosage})]}),r.jsxs(s.Box,{display:"flex",gap:"3",mt:"1",flexWrap:"wrap",children:[r.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["🕐 ",b.frequency]}),b.duration&&r.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["📅 ",b.duration]}),b.instructions&&r.jsxs(s.Box,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",fontStyle:"italic",children:["ℹ️ ",b.instructions]})]})]})]},v))}),r.jsxs(s.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderTop:"1px solid",borderColor:"border",children:[a!==void 0?r.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx(s.Box,{as:"span",fontWeight:"semibold",color:"text.heading",children:a})," ","refill",a!==1?"s":""," remaining"]}):r.jsx(s.Box,{}),u&&r.jsxs("button",{onClick:u,"aria-label":"Download prescription",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:8,fontSize:12,fontWeight:600,fontFamily:"var(--font-body)",color:x,background:p,border:"none",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:b=>{b.currentTarget.style.opacity="0.8"},onMouseLeave:b=>{b.currentTarget.style.opacity="1"},children:[r.jsx(y1,{}),"Download"]})]})]})}const k1={primary:{label:"Primary",bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",border:"color-mix(in srgb, #0685FF 25%, transparent)"},secondary:{label:"Secondary",bg:"color-mix(in srgb, #64748B 10%, transparent)",color:"#64748B",border:"color-mix(in srgb, #64748B 25%, transparent)"},chronic:{label:"Chronic",bg:"color-mix(in srgb, #F59E0B 10%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 25%, transparent)"},acute:{label:"Acute",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 25%, transparent)"}};function nl({code:e,description:t,category:n="primary",...o}){const i=k1[n];return r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",...o,children:[r.jsx("span",{title:t,"aria-label":`ICD-10 code ${e}${t?`: ${t}`:""}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:700,fontFamily:"var(--font-mono, monospace)",background:i.bg,color:i.color,border:`1px solid ${i.border}`,cursor:t?"help":"default",whiteSpace:"nowrap"},children:e}),t&&r.jsx(s.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]})}function rl({bloodType:e,...t}){return r.jsx(s.Box,{display:"inline-flex",alignItems:"center",...t,children:r.jsxs("span",{"aria-label":`Blood type ${e}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 10px",borderRadius:4,fontSize:12,fontWeight:800,fontFamily:"var(--font-heading)",background:"color-mix(in srgb, #DC2626 12%, transparent)",color:"#DC2626",border:"1px solid color-mix(in srgb, #DC2626 30%, transparent)",letterSpacing:"0.02em"},children:[r.jsx("svg",{width:"10",height:"12",viewBox:"0 0 12 16",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M6 0C6 0 0 7.5 0 11a6 6 0 0 0 12 0C12 7.5 6 0 6 0z"})}),e]})})}const w1={mild:{label:"Mild",bg:"color-mix(in srgb, #F59E0B 8%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 30%, transparent)",icon:"⚠"},moderate:{label:"Moderate",bg:"color-mix(in srgb, #F97316 10%, transparent)",color:"#C2410C",border:"color-mix(in srgb, #F97316 30%, transparent)",icon:"⚠"},severe:{label:"Severe",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 30%, transparent)",icon:"🚫"},"life-threatening":{label:"Life-threatening",bg:"color-mix(in srgb, #7F1D1D 15%, transparent)",color:"#991B1B",border:"#DC2626",icon:"⛔"}};function ol({allergen:e,severity:t="mild",...n}){const o=w1[t];return r.jsx(s.Box,{display:"inline-flex",alignItems:"center",...n,children:r.jsxs("span",{"aria-label":`Allergy: ${e} — ${o.label} severity`,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:o.bg,color:o.color,border:`1px solid ${o.border}`,borderLeftWidth:t==="life-threatening"?3:1,whiteSpace:"nowrap"},children:[r.jsx("span",{"aria-hidden":"true",children:o.icon}),e,r.jsxs("span",{style:{opacity:.7,fontSize:10},children:["· ",o.label]})]})})}function j1({diagnoses:e,bloodType:t,allergies:n,direction:o="row",...i}){return r.jsxs(s.Box,{display:"flex",flexDirection:o,flexWrap:"wrap",gap:"2",alignItems:o==="row"?"center":"flex-start",...i,children:[t&&r.jsx(rl,{bloodType:t}),e==null?void 0:e.map((l,a)=>r.jsx(nl,{code:l.code,description:l.description,category:l.category},a)),n==null?void 0:n.map((l,a)=>r.jsx(ol,{allergen:l.allergen,severity:l.severity},a))]})}var il={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vo=I.default.createContext&&I.default.createContext(il),C1=["attr","size","title"];function S1(e,t){if(e==null)return{};var n,o,i=B1(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function B1(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function Gt(){return Gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Gt.apply(null,arguments)}function ko(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,o)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ko(Object(n),!0).forEach(function(o){F1(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ko(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function F1(e,t,n){return(t=E1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E1(e){var t=L1(e,"string");return typeof t=="symbol"?t:t+""}function L1(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ll(e){return e&&e.map((t,n)=>I.default.createElement(t.tag,Yt({key:n},t.attr),ll(t.child)))}function ke(e){return t=>I.default.createElement(I1,Gt({attr:Yt({},e.attr)},t),ll(e.child))}function I1(e){var t=n=>{var{attr:o,size:i,title:l}=e,a=S1(e,C1),c=i||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),I.default.createElement("svg",Gt({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,o,a,{className:d,style:Yt(Yt({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),l&&I.default.createElement("title",null,l),e.children)};return vo!==void 0?I.default.createElement(vo.Consumer,null,n=>t(n)):t(il)}function T1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 6 6 18"},child:[]},{tag:"path",attr:{d:"m6 6 12 12"},child:[]}]})(e)}function D1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"},child:[]},{tag:"rect",attr:{x:"2",y:"6",width:"14",height:"12",rx:"2"},child:[]}]})(e)}function A1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196"},child:[]},{tag:"path",attr:{d:"M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"m2 2 20 20"},child:[]}]})(e)}function z1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3"},child:[]},{tag:"path",attr:{d:"M8 21h8"},child:[]},{tag:"path",attr:{d:"M12 17v4"},child:[]},{tag:"path",attr:{d:"m17 8 5-5"},child:[]},{tag:"path",attr:{d:"M17 3h5v5"},child:[]}]})(e)}function R1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"},child:[]},{tag:"path",attr:{d:"m8.5 8.5 7 7"},child:[]}]})(e)}function M1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"},child:[]},{tag:"line",attr:{x1:"22",x2:"2",y1:"2",y2:"22"},child:[]}]})(e)}function O1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]},{tag:"path",attr:{d:"M14.05 2a9 9 0 0 1 8 7.94"},child:[]},{tag:"path",attr:{d:"M14.05 6A5 5 0 0 1 18 10"},child:[]}]})(e)}function N1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"},child:[]},{tag:"path",attr:{d:"M19 10v2a7 7 0 0 1-14 0v-2"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function P1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"2",x2:"22",y1:"2",y2:"22"},child:[]},{tag:"path",attr:{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"},child:[]},{tag:"path",attr:{d:"M5 10v2a7 7 0 0 0 12 5"},child:[]},{tag:"path",attr:{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"},child:[]},{tag:"path",attr:{d:"M9 9v3a3 3 0 0 0 5.12 2.12"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function _1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",x2:"9",y1:"12",y2:"12"},child:[]}]})(e)}function H1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 6v4"},child:[]},{tag:"path",attr:{d:"M14 14h-4"},child:[]},{tag:"path",attr:{d:"M14 18h-4"},child:[]},{tag:"path",attr:{d:"M14 8h-4"},child:[]},{tag:"path",attr:{d:"M18 12h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"M18 22V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v18"},child:[]}]})(e)}function W1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"},child:[]},{tag:"path",attr:{d:"M8.5 2h7"},child:[]},{tag:"path",attr:{d:"M7 16h10"},child:[]}]})(e)}function q1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"M10 9H8"},child:[]},{tag:"path",attr:{d:"M16 13H8"},child:[]},{tag:"path",attr:{d:"M16 17H8"},child:[]}]})(e)}function V1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]}]})(e)}function $1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"},child:[]},{tag:"path",attr:{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"},child:[]},{tag:"path",attr:{d:"M4 2C2.8 3.7 2 5.7 2 8"},child:[]},{tag:"path",attr:{d:"M22 8c0-2.3-.8-4.3-2-6"},child:[]}]})(e)}function U1(e){return ke({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"},child:[]}]})(e)}const G1=({muted:e})=>e?r.jsx(P1,{size:18,"aria-hidden":"true"}):r.jsx(N1,{size:18,"aria-hidden":"true"}),Y1=({off:e})=>e?r.jsx(A1,{size:18,"aria-hidden":"true"}):r.jsx(D1,{size:18,"aria-hidden":"true"}),K1=({active:e})=>r.jsx(z1,{size:18,color:e?"var(--chakra-colors-status-success, #16A34A)":"currentColor","aria-hidden":"true"}),Z1=()=>r.jsx(M1,{size:18,"aria-hidden":"true"});function X1({participantName:e,participantRole:t,participantAvatar:n,duration:o,isMuted:i=!1,isCameraOff:l=!1,isSharingScreen:a=!1,onToggleMute:c,onToggleCamera:d,onEndCall:u,onShareScreen:f,position:h="bottom",variant:x="adaptive",...p}){const[b,v]=I.default.useState(i),[B,y]=I.default.useState(l),S=x==="dark",j=()=>{v(w=>!w),c==null||c()},C=()=>{y(w=>!w),d==null||d()},F=({onClick:w,ariaLabel:D,active:E,isEndCall:z=!1,children:N})=>{let R=S?"rgba(255,255,255,0.1)":"var(--chakra-colors-bg-subtle, #F0F4F8)",T=S?"white":"var(--chakra-colors-text-heading, #111926)",q=S?"rgba(255,255,255,0.2)":"var(--chakra-colors-border, #E2E8F0)";return z?(R="var(--chakra-colors-status-error, #DC2626)",T="white",q="color-mix(in srgb, var(--chakra-colors-status-error, #DC2626) 85%, black)"):E&&(R="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",T="var(--chakra-colors-status-error, #DC2626)",q="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.25))"),r.jsx("button",{onClick:w,"aria-label":D,"aria-pressed":E,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:44,height:44,borderRadius:"50%",border:E?"1px solid var(--chakra-colors-status-error)":"1px solid transparent",cursor:"pointer",transition:"all 0.15s ease",background:R,color:T,WebkitTapHighlightColor:"transparent"},onMouseEnter:M=>{const k=M.currentTarget;k.style.background=q,k.style.transform="scale(1.06)"},onMouseLeave:M=>{const k=M.currentTarget;k.style.background=R,k.style.transform="scale(1)"},children:N})};return r.jsxs(s.Box,{position:"fixed",...h==="bottom"?{bottom:"0"}:{top:"0"},left:"0",right:"0",zIndex:"overlay",display:"flex",alignItems:"center",justifyContent:"space-between",px:{base:"4",md:"8"},flexWrap:"wrap",gap:"4",bg:S?void 0:"bg.surface",borderColor:"border",style:{minHeight:72,paddingTop:12,paddingBottom:h==="bottom"?"calc(12px + env(safe-area-inset-bottom, 0px))":12,background:S?"linear-gradient(135deg, #0A1220 0%, #0F1C2E 100%)":void 0,borderTop:h==="bottom"?"1px solid var(--chakra-colors-border)":"none",borderBottom:h==="top"?"1px solid var(--chakra-colors-border)":"none",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",transition:"background 0.2s ease, border-color 0.2s ease"},...p,children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",children:[r.jsx(Jt,{src:n,name:e,size:"md"}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",color:S?"white":"text.heading",children:e}),t&&r.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",color:S?"rgba(255,255,255,0.6)":"text.muted",children:t})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",ml:"2",children:[r.jsxs("span",{"aria-label":"Live call",style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:700,background:"var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",color:"var(--chakra-colors-status-error, #DC2626)",fontFamily:"var(--font-body)",letterSpacing:"0.05em"},children:[r.jsx("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:"var(--chakra-colors-status-error, #DC2626)",display:"inline-block",animation:"medixPulse 1.5s ease-in-out infinite"}}),"LIVE"]}),o&&r.jsx(s.Box,{fontSize:"sm",fontFamily:"var(--font-mono, monospace)",fontWeight:"600",color:S?"rgba(255,255,255,0.8)":"text.heading",style:{letterSpacing:"0.05em"},children:o})]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[c&&r.jsx(F,{onClick:j,ariaLabel:b?"Unmute microphone":"Mute microphone",active:b,children:r.jsx(G1,{muted:b})}),d&&r.jsx(F,{onClick:C,ariaLabel:B?"Turn camera on":"Turn camera off",active:B,children:r.jsx(Y1,{off:B})}),f&&r.jsx(F,{onClick:f,ariaLabel:a?"Stop sharing screen":"Share screen",active:a,children:r.jsx(K1,{active:a})}),u&&r.jsx(F,{onClick:u,ariaLabel:"End call",isEndCall:!0,children:r.jsx(Z1,{})})]})]})}const J1={consultation:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF",icon:r.jsx(O1,{size:14,"aria-hidden":"true"})},lab:{bg:"color-mix(in srgb, #7700CC 12%, transparent)",color:"#7700CC",icon:r.jsx(W1,{size:14,"aria-hidden":"true"})},prescription:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:r.jsx(R1,{size:14,"aria-hidden":"true"})},vitals:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706",icon:r.jsx(U1,{size:14,"aria-hidden":"true"})},note:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B",icon:r.jsx(q1,{size:14,"aria-hidden":"true"})},admission:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444",icon:r.jsx(H1,{size:14,"aria-hidden":"true"})},discharge:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:r.jsx(_1,{size:14,"aria-hidden":"true"})},custom:{bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",icon:r.jsx(V1,{size:14,"aria-hidden":"true"})}},wo={success:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981"},warning:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706"},error:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444"},info:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF"},neutral:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B"}};function Q1(){return r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",children:[r.jsxs(s.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",bg:"bg.subtle",style:{animation:"medix-shimmer 1.5s infinite"}}),r.jsx(s.Box,{w:"px",flex:"1",minH:"8",bg:"border",mt:"2"})]}),r.jsxs(s.Box,{flex:"1",pb:"6",children:[r.jsx(s.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:"40%",mb:"2",style:{animation:"medix-shimmer 1.5s infinite"}}),r.jsx(s.Box,{h:"3",bg:"bg.subtle",borderRadius:"full",w:"65%",style:{animation:"medix-shimmer 1.5s infinite"}})]})]})}function eh({events:e,compact:t=!1,isLoading:n=!1,loadingCount:o=4,colorScheme:i="blue",...l}){const a=i==="purple"?"var(--chakra-colors-purple-200, rgba(119,0,204,0.2))":"var(--chakra-colors-blue-200, rgba(6,133,255,0.2))";return n?r.jsx(s.Box,{...l,children:Array.from({length:o}).map((c,d)=>r.jsx(Q1,{},d))}):r.jsx(s.Box,{...l,role:"feed","aria-label":"Patient medical timeline",children:e.map((c,d)=>{const u=J1[c.type],f=d===e.length-1;return r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",role:"article","aria-label":`${c.title} on ${c.date}`,children:[r.jsxs(s.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",style:{background:u.bg,color:u.color,border:`1.5px solid ${u.color}40`,cursor:c.onClick?"pointer":"default",transition:"transform 0.15s, box-shadow 0.15s",flexShrink:0},onClick:c.onClick,role:c.onClick?"button":void 0,tabIndex:c.onClick?0:void 0,onKeyDown:c.onClick?h=>{(h.key==="Enter"||h.key===" ")&&c.onClick()}:void 0,_hover:c.onClick?{transform:"scale(1.1)"}:void 0,children:c.icon??u.icon}),!f&&r.jsx(s.Box,{w:"1px",flex:"1",minH:"8",mt:"1",style:{background:a}})]}),r.jsxs(s.Box,{flex:"1",pb:f?"0":"5",cursor:c.onClick?"pointer":"default",onClick:c.onClick,_hover:c.onClick?{opacity:.85}:void 0,transition:"opacity 0.15s",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:c.title}),c.badgeLabel&&c.badgeStatus&&r.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"1px 7px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:wo[c.badgeStatus].bg,color:wo[c.badgeStatus].color},children:c.badgeLabel})]}),!t&&c.description&&r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:c.description}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",mt:"1",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:c.date}),c.provider&&r.jsxs(r.Fragment,{children:[r.jsx(s.Box,{w:"1px",h:"3",style:{background:"var(--chakra-colors-border)"}}),r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:c.provider})]})]})]})]},c.id)})})}function th({title:e="Get notifications in this browser",description:t,actionLabel:n="Turn on notifications",busy:o,error:i,onAction:l,onDismiss:a}){return r.jsxs(s.Flex,{as:"section","aria-label":e,align:{base:"start",md:"center"},gap:"4",p:"4",mb:"4",bg:"bg.panel",borderWidth:"1px",borderColor:"border",borderRadius:"xl",boxShadow:"sm",children:[r.jsx(s.Flex,{"aria-hidden":"true",align:"center",justify:"center",boxSize:"11",flexShrink:"0",borderRadius:"lg",bg:"green.subtle",color:"green.fg",children:r.jsx($1,{size:22})}),r.jsxs(s.Flex,{flex:"1",minW:"0",gap:"3",align:{base:"start",md:"center"},direction:{base:"column",md:"row"},children:[r.jsxs(s.Box,{flex:"1",children:[r.jsx(s.Text,{fontWeight:"semibold",children:e}),r.jsx(s.Text,{fontSize:"sm",color:"fg.muted",children:t}),i&&r.jsx(s.Text,{role:"status",fontSize:"sm",color:"red.fg",mt:"1",children:i})]}),r.jsx(s.chakra.button,{type:"button",onClick:l,disabled:o,"aria-busy":o,bg:"green.solid",color:"green.contrast",borderRadius:"lg",px:"4",py:"3",fontWeight:"semibold",cursor:"pointer",_disabled:{opacity:.65},focusVisibleRing:"outside",children:o?"Turning on…":n})]}),r.jsx(s.IconButton,{type:"button",variant:"ghost",size:"sm","aria-label":"Dismiss notification prompt",onClick:a,children:r.jsx(T1,{})})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>s.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>s.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>s.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>s.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>s.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>s.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>s.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>s.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>s.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>s.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>s.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>s.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>s.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>s.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>s.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>s.WrapItem});exports.Accordion=l1;exports.Alert=$n;exports.AllergyBadge=ol;exports.AppointmentCard=g1;exports.Avatar=Jt;exports.AvatarGroup=Hl;exports.Badge=Gn;exports.BlogCard=u1;exports.BloodTypeBadge=rl;exports.Breadcrumb=Js;exports.BrowserNotificationBanner=th;exports.Button=Be;exports.Calendar=Zn;exports.Card=Jo;exports.CardBody=Ya;exports.CardFooter=Ka;exports.CardHeader=Ga;exports.Checkbox=$o;exports.Combobox=Ca;exports.Container=ei;exports.CookieConsentBanner=gi;exports.DASHBOARD_MEDIX_TIER_CONFIG=Ht;exports.DASHBOARD_MEDIX_TIER_ORDER=ii;exports.DEFAULT_HAPTIC_PATTERNS=Kt;exports.DRAFT_STORAGE_PREFIX=Ze;exports.DashboardLayout=ai;exports.DataTable=d1;exports.DatePicker=ka;exports.DateRangePicker=wa;exports.Divider=Po;exports.DoctorCard=f1;exports.Drawer=gc;exports.EmptyState=fc;exports.FileUpload=Ba;exports.Footer=ci;exports.FormControl=la;exports.FullPageSpinner=Wl;exports.HapticsProvider=Ao;exports.ICD10Badge=nl;exports.IconButton=Ro;exports.Input=Yn;exports.Logo=Ye;exports.MedicalRecordBadge=j1;exports.MedixProvider=Al;exports.Modal=dc;exports.Navbar=Hs;exports.NotFoundPage=pc;exports.OTPInput=Go;exports.PWAInstallPrompt=bi;exports.Pagination=ui;exports.PatientTimeline=eh;exports.PhoneInput=ha;exports.PinInput=aa;exports.PrescriptionCard=v1;exports.Progress=fi;exports.RadioGroup=na;exports.RichTextEditor=Ua;exports.RichTextInput=Xn;exports.SearchInput=Kn;exports.SectionHeader=Xa;exports.Select=ta;exports.ServerErrorPage=hc;exports.Skeleton=Ue;exports.SkeletonCard=lc;exports.SkeletonText=di;exports.Spinner=Oo;exports.StatCard=Qo;exports.Stepper=oc;exports.Switch=Uo;exports.TEXTAREA_DRAFT_PREFIX=Ke;exports.Tabs=tc;exports.Tag=No;exports.TagInput=Fa;exports.TagsInput=Yo;exports.TelehealthCallBar=X1;exports.TestimonialCard=a1;exports.Textarea=qo;exports.ThemeColorPalette=ti;exports.Toaster=zo;exports.Tooltip=Oe;exports.VitalBadge=h1;exports.canUseHaptics=Xt;exports.cancelHaptic=qn;exports.clearRichTextDraft=Zo;exports.clearTextareaDraft=Ho;exports.colorTokens=_;exports.dismissToast=Cl;exports.getEffectiveStorageKey=Ko;exports.getEffectiveTextareaStorageKey=_o;exports.getMedixScoreTierForScore=js;exports.getMedixScoreTierMeta=li;exports.getRichTextDraft=Xo;exports.getTextareaDraft=Wo;exports.htmlToMarkdown=it;exports.isReducedMotionPreferred=Wn;exports.markdownToHtml=He;exports.medixConfig=Eo;exports.radiiTokens=Bo;exports.resolveHapticPattern=Io;exports.saveRichTextDraft=Sn;exports.saveTextareaDraft=jn;exports.shadowTokens=Fo;exports.spacingTokens=So;exports.system=Lo;exports.textStyleTokens=Co;exports.toast=yt;exports.triggerHaptic=Vn;exports.typographyTokens=ot;exports.useColorScheme=Ml;exports.useHaptics=de;exports.useIsDarkMode=Un;exports.useThemeMode=St;
436
436
  //# sourceMappingURL=index.cjs.map