@medixdeck/ui 0.1.21 → 0.1.22

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 a=require("react/jsx-runtime"),S=require("react"),f=require("@chakra-ui/react"),ea=require("@tiptap/react"),oh=require("@tiptap/starter-kit"),sh=require("@tiptap/extension-link"),ah=require("@tiptap/extension-underline"),lh=require("@tiptap/extension-text-align"),ch=require("@tiptap/extension-placeholder");function uh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const be=uh(S);var dh=(e,t,n,r,i,o,s,l)=>{let u=document.documentElement,d=["light","dark"];function c(m){(Array.isArray(e)?e:[e]).forEach(g=>{let x=g==="class",y=x&&o?i.map(b=>o[b]||b):i;x?(u.classList.remove(...y),u.classList.add(o&&o[m]?o[m]:m)):u.setAttribute(g,m)}),h(m)}function h(m){l&&d.includes(m)&&(u.style.colorScheme=m)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)c(r);else try{let m=localStorage.getItem(t)||n,g=s&&m==="system"?p():m;c(g)}catch{}},ta=["light","dark"],Pc="(prefers-color-scheme: dark)",fh=typeof window>"u",$o=be.createContext(void 0),hh={setTheme:e=>{},themes:[]},ph=()=>{var e;return(e=be.useContext($o))!=null?e:hh},mh=e=>be.useContext($o)?be.createElement(be.Fragment,null,e.children):be.createElement(xh,{...e}),gh=["light","dark"],xh=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:o=gh,defaultTheme:s=n?"system":"light",attribute:l="data-theme",value:u,children:d,nonce:c,scriptProps:h})=>{let[p,m]=be.useState(()=>bh(i,s)),[g,x]=be.useState(()=>p==="system"?yi():p),y=u?Object.values(u):o,b=be.useCallback(E=>{let C=E;if(!C)return;E==="system"&&n&&(C=yi());let O=u?u[C]:C,B=t?vh(c):null,F=document.documentElement,L=R=>{R==="class"?(F.classList.remove(...y),O&&F.classList.add(O)):R.startsWith("data-")&&(O?F.setAttribute(R,O):F.removeAttribute(R))};if(Array.isArray(l)?l.forEach(L):L(l),r){let R=ta.includes(s)?s:null,D=ta.includes(C)?C:R;F.style.colorScheme=D}B==null||B()},[c]),T=be.useCallback(E=>{let C=typeof E=="function"?E(p):E;m(C);try{localStorage.setItem(i,C)}catch{}},[p]),w=be.useCallback(E=>{let C=yi(E);x(C),p==="system"&&n&&!e&&b("system")},[p,e]);be.useEffect(()=>{let E=window.matchMedia(Pc);return E.addListener(w),w(E),()=>E.removeListener(w)},[w]),be.useEffect(()=>{let E=C=>{C.key===i&&(C.newValue?m(C.newValue):T(s))};return window.addEventListener("storage",E),()=>window.removeEventListener("storage",E)},[T]),be.useEffect(()=>{b(e??p)},[e,p]);let A=be.useMemo(()=>({theme:p,setTheme:T,forcedTheme:e,resolvedTheme:p==="system"?g:p,themes:n?[...o,"system"]:o,systemTheme:n?g:void 0}),[p,T,e,g,n,o]);return be.createElement($o.Provider,{value:A},be.createElement(yh,{forcedTheme:e,storageKey:i,attribute:l,enableSystem:n,enableColorScheme:r,defaultTheme:s,value:u,themes:o,nonce:c,scriptProps:h}),d)},yh=be.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:s,themes:l,nonce:u,scriptProps:d})=>{let c=JSON.stringify([n,t,o,e,l,s,r,i]).slice(1,-1);return be.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${dh.toString()})(${c})`}})}),bh=(e,t)=>{if(fh)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},vh=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},yi=e=>(e||(e=window.matchMedia(Pc)),e.matches?"dark":"light");const V={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"}}},pn={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"}}},Oc={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)"}}},zc={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"}},_c={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%"}},Nc={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"}},Vc=f.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:V.blue,purple:V.purple,green:V.green,amber:V.amber,red:V.red,neutralLight:V.neutralLight,neutralDark:V.neutralDark}},fonts:pn.fonts,fontSizes:pn.fontSizes,fontWeights:pn.fontWeights,lineHeights:pn.lineHeights,letterSpacings:pn.letterSpacings,spacing:zc,radii:_c,shadows:Nc},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:Oc}}),Hc=f.createSystem(f.defaultConfig,Vc),kh={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:"✕"}},Go=S.forwardRef(({status:e="info",variant:t="subtle",title:n,description:r,icon:i,onClose:o,closable:s=!1,children:l,...u},d)=>{const c=kh[e],h=t==="solid"?c.color:c.bg,p=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${c.color}`:void 0,g=t==="subtle"?`1px solid ${c.border}`:void 0;return a.jsxs(f.Box,{ref:d,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:h,border:g,borderLeft:m,color:p,...u,children:[a.jsx(f.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)":c.color,color:"white",mt:"0.5",children:i??c.icon}),a.jsxs(f.Box,{flex:"1",children:[n&&a.jsx(f.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":c.color,children:n}),r&&a.jsx(f.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:r}),l]}),s&&a.jsx(f.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:o,"aria-label":"Dismiss alert",children:"×"})]})});Go.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 i=require("react/jsx-runtime"),S=require("react"),f=require("@chakra-ui/react"),ca=require("@tiptap/react"),mh=require("@tiptap/starter-kit"),gh=require("@tiptap/extension-link"),xh=require("@tiptap/extension-underline"),yh=require("@tiptap/extension-text-align"),bh=require("@tiptap/extension-placeholder");var dn=typeof document<"u"?document.currentScript:null;function vh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const be=vh(S);var kh=(e,t,n,r,o,s,a,l)=>{let u=document.documentElement,c=["light","dark"];function d(m){(Array.isArray(e)?e:[e]).forEach(g=>{let x=g==="class",y=x&&s?o.map(v=>s[v]||v):o;x?(u.classList.remove(...y),u.classList.add(s&&s[m]?s[m]:m)):u.setAttribute(g,m)}),h(m)}function h(m){l&&c.includes(m)&&(u.style.colorScheme=m)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)d(r);else try{let m=localStorage.getItem(t)||n,g=a&&m==="system"?p():m;d(g)}catch{}},ua=["light","dark"],Yc="(prefers-color-scheme: dark)",wh=typeof window>"u",Ji=be.createContext(void 0),Sh={setTheme:e=>{},themes:[]},Ch=()=>{var e;return(e=be.useContext(Ji))!=null?e:Sh},jh=e=>be.useContext(Ji)?be.createElement(be.Fragment,null,e.children):be.createElement(Bh,{...e}),Th=["light","dark"],Bh=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:s=Th,defaultTheme:a=n?"system":"light",attribute:l="data-theme",value:u,children:c,nonce:d,scriptProps:h})=>{let[p,m]=be.useState(()=>Fh(o,a)),[g,x]=be.useState(()=>p==="system"?jo():p),y=u?Object.values(u):s,v=be.useCallback(B=>{let C=B;if(!C)return;B==="system"&&n&&(C=jo());let P=u?u[C]:C,A=t?Ah(d):null,E=document.documentElement,L=R=>{R==="class"?(E.classList.remove(...y),P&&E.classList.add(P)):R.startsWith("data-")&&(P?E.setAttribute(R,P):E.removeAttribute(R))};if(Array.isArray(l)?l.forEach(L):L(l),r){let R=ua.includes(a)?a:null,D=ua.includes(C)?C:R;E.style.colorScheme=D}A==null||A()},[d]),j=be.useCallback(B=>{let C=typeof B=="function"?B(p):B;m(C);try{localStorage.setItem(o,C)}catch{}},[p]),w=be.useCallback(B=>{let C=jo(B);x(C),p==="system"&&n&&!e&&v("system")},[p,e]);be.useEffect(()=>{let B=window.matchMedia(Yc);return B.addListener(w),w(B),()=>B.removeListener(w)},[w]),be.useEffect(()=>{let B=C=>{C.key===o&&(C.newValue?m(C.newValue):j(a))};return window.addEventListener("storage",B),()=>window.removeEventListener("storage",B)},[j]),be.useEffect(()=>{v(e??p)},[e,p]);let F=be.useMemo(()=>({theme:p,setTheme:j,forcedTheme:e,resolvedTheme:p==="system"?g:p,themes:n?[...s,"system"]:s,systemTheme:n?g:void 0}),[p,j,e,g,n,s]);return be.createElement(Ji.Provider,{value:F},be.createElement(Eh,{forcedTheme:e,storageKey:o,attribute:l,enableSystem:n,enableColorScheme:r,defaultTheme:a,value:u,themes:s,nonce:d,scriptProps:h}),c)},Eh=be.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:a,themes:l,nonce:u,scriptProps:c})=>{let d=JSON.stringify([n,t,s,e,l,a,r,o]).slice(1,-1);return be.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${kh.toString()})(${d})`}})}),Fh=(e,t)=>{if(wh)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},Ah=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},jo=e=>(e||(e=window.matchMedia(Yc)),e.matches?"dark":"light");const V={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"}}},xn={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"}}},Kc={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)"}}},qc={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"}},Xc={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%"}},Zc={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"}},Jc=f.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:V.blue,purple:V.purple,green:V.green,amber:V.amber,red:V.red,neutralLight:V.neutralLight,neutralDark:V.neutralDark}},fonts:xn.fonts,fontSizes:xn.fontSizes,fontWeights:xn.fontWeights,lineHeights:xn.lineHeights,letterSpacings:xn.letterSpacings,spacing:qc,radii:Xc,shadows:Zc},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:Kc}}),Qc=f.createSystem(f.defaultConfig,Jc),Lh={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:"✕"}},Qi=S.forwardRef(({status:e="info",variant:t="subtle",title:n,description:r,icon:o,onClose:s,closable:a=!1,children:l,...u},c)=>{const d=Lh[e],h=t==="solid"?d.color:d.bg,p=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${d.color}`:void 0,g=t==="subtle"?`1px solid ${d.border}`:void 0;return i.jsxs(f.Box,{ref:c,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:h,border:g,borderLeft:m,color:p,...u,children:[i.jsx(f.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)":d.color,color:"white",mt:"0.5",children:o??d.icon}),i.jsxs(f.Box,{flex:"1",children:[n&&i.jsx(f.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":d.color,children:n}),r&&i.jsx(f.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:r}),l]}),a&&i.jsx(f.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:s,"aria-label":"Dismiss alert",children:"×"})]})});Qi.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 kn=f.createToaster({placement:"bottom-end",pauseOnPageIdle:!0,overlap:!0,gap:16,duration:4e3,removeDelay:200}),Wn=Object.assign(e=>kn.create({title:e.title,description:e.description,type:e.type||"info",duration:e.duration??4e3}),{success:(e,t)=>Wn({title:e,type:"success",...t}),error:(e,t)=>Wn({title:e,type:"error",...t}),info:(e,t)=>Wn({title:e,type:"info",...t}),warning:(e,t)=>Wn({title:e,type:"warning",...t})}),wh=e=>kn.dismiss(e),Sh={success:"#16A34A",error:"#DC2626",warning:"#D97706",info:"#0685FF"};function Ch({toast:e}){var d;const[t,n]=S.useState(!1),r=((d=e.meta)==null?void 0:d.variant)||"subtle",i=e.duration??4e3,o=e.type||"info",s=Sh[o]||"#0685FF",l=()=>{n(!0),kn.pause(e.id)},u=()=>{n(!1),kn.resume(e.id)};return a.jsxs(f.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:l,onMouseLeave:u,children:[a.jsxs(Go,{status:o,variant:r,title:typeof e.title=="string"?e.title:void 0,description:typeof e.description=="string"?e.description:void 0,closable:!0,onClose:()=>kn.dismiss(e.id),boxShadow:"none",w:"100%",children:[typeof e.title!="string"&&e.title,typeof e.description!="string"&&e.description]}),i!==1/0&&a.jsx("div",{"aria-hidden":"true",style:{position:"absolute",bottom:0,left:0,height:"3px",width:"100%",backgroundColor:s,opacity:.9,transformOrigin:"left",animationName:"medixToastProgress",animationDuration:`${i}ms`,animationTimingFunction:"linear",animationFillMode:"forwards",animationPlayState:t?"paused":"running"}})]},e.id)}const Wc=()=>a.jsx(f.Toaster,{toaster:kn,insetInline:{base:"4",md:"4"},insetBlock:{base:"4",md:"4"},pointerEvents:"none",children:e=>a.jsx(Ch,{toast:e},e.id)}),jh=["https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600,700&display=swap","https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"],Th=`
6
+ `,document.head.appendChild(t)}}const Cn=f.createToaster({placement:"bottom-end",pauseOnPageIdle:!0,overlap:!0,gap:16,duration:4e3,removeDelay:200}),Yn=Object.assign(e=>Cn.create({title:e.title,description:e.description,type:e.type||"info",duration:e.duration??4e3}),{success:(e,t)=>Yn({title:e,type:"success",...t}),error:(e,t)=>Yn({title:e,type:"error",...t}),info:(e,t)=>Yn({title:e,type:"info",...t}),warning:(e,t)=>Yn({title:e,type:"warning",...t})}),Ih=e=>Cn.dismiss(e),Dh={success:"#16A34A",error:"#DC2626",warning:"#D97706",info:"#0685FF"};function Rh({toast:e}){var c;const[t,n]=S.useState(!1),r=((c=e.meta)==null?void 0:c.variant)||"subtle",o=e.duration??4e3,s=e.type||"info",a=Dh[s]||"#0685FF",l=()=>{n(!0),Cn.pause(e.id)},u=()=>{n(!1),Cn.resume(e.id)};return i.jsxs(f.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:l,onMouseLeave:u,children:[i.jsxs(Qi,{status:s,variant:r,title:typeof e.title=="string"?e.title:void 0,description:typeof e.description=="string"?e.description:void 0,closable:!0,onClose:()=>Cn.dismiss(e.id),boxShadow:"none",w:"100%",children:[typeof e.title!="string"&&e.title,typeof e.description!="string"&&e.description]}),o!==1/0&&i.jsx("div",{"aria-hidden":"true",style:{position:"absolute",bottom:0,left:0,height:"3px",width:"100%",backgroundColor:a,opacity:.9,transformOrigin:"left",animationName:"medixToastProgress",animationDuration:`${o}ms`,animationTimingFunction:"linear",animationFillMode:"forwards",animationPlayState:t?"paused":"running"}})]},e.id)}const eu=()=>i.jsx(f.Toaster,{toaster:Cn,insetInline:{base:"4",md:"4"},insetBlock:{base:"4",md:"4"},pointerEvents:"none",children:e=>i.jsx(Rh,{toast:e},e.id)}),Mh=["https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600,700&display=swap","https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"],Ph=`
7
7
  /* ── Fluid typography base ───────────────────────────────────────────────── */
8
8
  /* font-size: 100% keeps 1rem = user's browser preference (default 16px). */
9
9
  /* All token font sizes use clamp() so they scale fluidly between mobile and */
@@ -138,18 +138,18 @@
138
138
  @keyframes medix-spin {
139
139
  to { transform: rotate(360deg); }
140
140
  }
141
- `;let na=!1,ra=!1;function Bh(){if(typeof document>"u"||na)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)}),jh.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)}),na=!0}function Fh(){if(typeof document>"u"||ra)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=Th,document.head.insertBefore(e,document.head.firstChild),ra=!0}function Eh({children:e,defaultColorMode:t="system",forcedColorMode:n}){return S.useEffect(()=>{Bh(),Fh()},[]),a.jsx(mh,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:a.jsxs(f.ChakraProvider,{value:Hc,children:[e,a.jsx(Wc,{})]})})}function Ah(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 Lh(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")||document.body.classList.contains("dark")}function or(){const{resolvedTheme:e,setTheme:t,theme:n}=ph(),[r,i]=S.useState(!1),o=S.useSyncExternalStore(Ah,Lh,()=>!1);S.useEffect(()=>{i(!0)},[]);const l=e==="dark"||o?"dark":"light",u=n==="light"||n==="dark"||n==="system"?n:"system",d=S.useCallback(h=>{t(h)},[t]),c=S.useCallback(()=>{t(l==="dark"?"light":"dark")},[t,l]);return{mounted:r,themeMode:l,themeSetting:u,setThemeMode:d,toggleThemeMode:c}}function Yo(){const{themeMode:e}=or();return e==="dark"}function Ih(e="blue"){const[t,n]=S.useState(e),r=S.useCallback(o=>{n(o)},[]),i=S.useCallback(()=>{n(o=>o==="blue"?"purple":"blue")},[]);return{colorScheme:t,setColorScheme:r,toggleColorScheme:i,isBlue:t==="blue",isPurple:t==="purple"}}const ia={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"}},oa={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"}},Ye=S.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:r=!1,leftIcon:i,rightIcon:o,disabled:s,children:l,style:u,as:d="button",href:c,target:h,rel:p,...m},g)=>{const x=ia[n]||ia.blue,y=oa[t]||oa.md,b={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:y.height,paddingLeft:y.px,paddingRight:y.px,fontSize:y.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:s||r?"not-allowed":"pointer",opacity:s||r?.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 T={};switch(e){case"solid":T={background:x.solid,color:"#FFFFFF"};break;case"outline":T={background:"transparent",color:x.fg,border:`1.5px solid ${x.solid}`};break;case"ghost":T={background:"transparent",color:x.fg,border:"none"};break;case"secondary":T={background:x.tint,color:x.fg,border:"none"};break;case"link":T={background:"transparent",color:x.fg,border:"none",padding:0,height:"auto",fontSize:y.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[w,A]=S.useState(!1),[E,C]=S.useState(!1);let O={};if((w||E)&&!s&&!r)switch(e){case"solid":O={background:E?x.solidActive:x.solidHover,boxShadow:"none"};break;case"outline":O={background:x.tint,color:x.fgHover};break;case"ghost":O={background:x.tint};break;case"secondary":O={background:x.tintHover};break;case"link":O={color:x.fgHover};break}const B={...b,...T,...O,...u};return a.jsx(d,{ref:g,type:d==="button"?m.type??"button":void 0,href:c,target:h,rel:p,disabled:d==="button"?s||r:void 0,style:B,onMouseEnter:()=>A(!0),onMouseLeave:()=>{A(!1),C(!1)},onMouseDown:()=>C(!0),onMouseUp:()=>C(!1),onFocus:F=>{F.currentTarget.style.boxShadow="none"},onBlur:F=>{F.currentTarget.style.boxShadow="none"},...m,"aria-disabled":d!=="button"&&(s||r)?!0:m["aria-disabled"],onClick:F=>{var L;if(d!=="button"&&(s||r)){F.preventDefault();return}(L=m.onClick)==null||L.call(m,F)},children:r?a.jsx(f.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"}}):a.jsxs(a.Fragment,{children:[i&&a.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:i}),l,o&&a.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:o})]})})});Ye.displayName="MedixButton";const Dh={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"}},Rh={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}},Uc=S.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:r=!1,disabled:i,children:o,style:s,...l},u)=>{const d=Dh[n],c=Rh[t],[h,p]=S.useState(!1),[m,g]=S.useState(!1);let x;switch(e){case"solid":x={background:h?m?d.solidActive:d.solidHover:d.solid,color:"#fff"};break;case"outline":x={background:h?d.tint:"transparent",color:d.fg,border:`1.5px solid ${d.solid}`};break;case"ghost":default:x={background:h?d.tint:"transparent",color:d.fg};break}return a.jsx("button",{ref:u,type:l.type??"button",disabled:i,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",...c,...r?{borderRadius:"50%"}:{},...x,...s},onMouseEnter:()=>p(!0),onMouseLeave:()=>{p(!1),g(!1)},onMouseDown:()=>g(!0),onMouseUp:()=>g(!1),onFocus:y=>{y.currentTarget.style.boxShadow="none"},onBlur:y=>{y.currentTarget.style.boxShadow="none"},...l,children:o})});Uc.displayName="MedixIconButton";const Mh={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"}},Ph={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},Ko=S.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",rounded:r,children:i,style:o,...s},l)=>{const u=Mh[t],d=Ph[n];let c,h,p="1px solid transparent";switch(e){case"solid":c=u.solid,h=u.solidText;break;case"outline":c="transparent",h=u.tintText,p=`1px solid ${u.border}`;break;case"surface":c=u.tint,h=u.tintText,p=`1px solid ${u.border}20`;break;case"subtle":default:c=u.tint,h=u.tintText;break}const m={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:r?"100px":4,border:p,background:c,color:h,whiteSpace:"nowrap",...d,...o};return a.jsx("span",{ref:l,style:m,...s,children:i})});Ko.displayName="MedixBadge";const $c={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},ni=S.forwardRef(({src:e,name:t,size:n="md",showStatus:r=!1,statusColor:i="green",...o},s)=>a.jsxs(f.Avatar.Root,{ref:s,size:$c[n],position:"relative",...o,children:[a.jsx(f.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&a.jsx(f.Avatar.Image,{src:e,alt:t??""}),r&&a.jsx(f.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));ni.displayName="MedixAvatar";function Oh({children:e,max:t,size:n="md"}){const r=S.Children.toArray(e),i=t?r.slice(0,t):r,o=t?Math.max(0,r.length-t):0,s=$c[n];return a.jsxs(f.Box,{display:"flex",alignItems:"center",children:[i.map((l,u)=>a.jsx(f.Box,{ml:u===0?"0":"-2",position:"relative",zIndex:i.length-u,children:S.isValidElement(l)?S.cloneElement(l,{size:n}):l},u)),o>0&&a.jsxs(f.Box,{ml:"-2",w:s==="sm"?"8":s==="lg"?"12":"10",h:s==="sm"?"8":s==="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:["+",o]})]})}function Gc({size:e="md",label:t,color:n="blue.500",...r}){return a.jsxs(f.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[a.jsx(f.Spinner,{size:e,color:n,borderWidth:"2px",...r}),t&&a.jsx(f.Text,{textStyle:"small",color:"text.muted",children:t})]})}function zh({label:e}){return a.jsx(f.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:a.jsx(Gc,{size:"xl",label:e??"Loading…"})})}const Yc=S.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:r,...i},o)=>a.jsxs(f.Box,{ref:o,as:"span",display:"inline-flex",alignItems:"center",gap:"1",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:n?"default":void 0,...i,children:[r,n&&a.jsx(f.Box,{as:"button",onClick:n,ml:"1",opacity:.7,_hover:{opacity:1},lineHeight:"1",fontSize:"md",cursor:"pointer",border:"none",bg:"transparent",padding:"0",display:"inline-flex",alignItems:"center",children:"×"})]}));Yc.displayName="MedixTag";const Kc=S.forwardRef(({orientation:e="horizontal",label:t,...n},r)=>t?a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[a.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),a.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-body)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),a.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):a.jsx(f.Separator,{ref:r,orientation:e,borderColor:"border",...n}));Kc.displayName="MedixDivider";const _h="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",Nh="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 Vh({variant:e,type:t,height:n,markColor:r,textColor:i,downloadFileName:o}){if(typeof window>"u")return;const s=4,l=532,u=44,d=119,c=32,h=n,p=Math.round(n*.3),m=t==="full"?Math.round(d*(n/c)):0,x=(t==="full"?h+p+m:h)*s,y=n*s,b=h*s/l,T=y/c,w=`
141
+ `;let da=!1,fa=!1;function Oh(){if(typeof document>"u"||da)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)}),Mh.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)}),da=!0}function zh(){if(typeof document>"u"||fa)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=Ph,document.head.insertBefore(e,document.head.firstChild),fa=!0}function _h({children:e,defaultColorMode:t="system",forcedColorMode:n}){return S.useEffect(()=>{Oh(),zh()},[]),i.jsx(jh,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:i.jsxs(f.ChakraProvider,{value:Qc,children:[e,i.jsx(eu,{})]})})}function Nh(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 Vh(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")||document.body.classList.contains("dark")}function ur(){const{resolvedTheme:e,setTheme:t,theme:n}=Ch(),[r,o]=S.useState(!1),s=S.useSyncExternalStore(Nh,Vh,()=>!1);S.useEffect(()=>{o(!0)},[]);const l=e==="dark"||s?"dark":"light",u=n==="light"||n==="dark"||n==="system"?n:"system",c=S.useCallback(h=>{t(h)},[t]),d=S.useCallback(()=>{t(l==="dark"?"light":"dark")},[t,l]);return{mounted:r,themeMode:l,themeSetting:u,setThemeMode:c,toggleThemeMode:d}}function es(){const{themeMode:e}=ur();return e==="dark"}function Wh(e="blue"){const[t,n]=S.useState(e),r=S.useCallback(s=>{n(s)},[]),o=S.useCallback(()=>{n(s=>s==="blue"?"purple":"blue")},[]);return{colorScheme:t,setColorScheme:r,toggleColorScheme:o,isBlue:t==="blue",isPurple:t==="purple"}}const ha={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"}},pa={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"}},Ye=S.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:r=!1,leftIcon:o,rightIcon:s,disabled:a,children:l,style:u,as:c="button",href:d,target:h,rel:p,...m},g)=>{const x=ha[n]||ha.blue,y=pa[t]||pa.md,v={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:y.height,paddingLeft:y.px,paddingRight:y.px,fontSize:y.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:a||r?"not-allowed":"pointer",opacity:a||r?.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 j={};switch(e){case"solid":j={background:x.solid,color:"#FFFFFF"};break;case"outline":j={background:"transparent",color:x.fg,border:`1.5px solid ${x.solid}`};break;case"ghost":j={background:"transparent",color:x.fg,border:"none"};break;case"secondary":j={background:x.tint,color:x.fg,border:"none"};break;case"link":j={background:"transparent",color:x.fg,border:"none",padding:0,height:"auto",fontSize:y.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[w,F]=S.useState(!1),[B,C]=S.useState(!1);let P={};if((w||B)&&!a&&!r)switch(e){case"solid":P={background:B?x.solidActive:x.solidHover,boxShadow:"none"};break;case"outline":P={background:x.tint,color:x.fgHover};break;case"ghost":P={background:x.tint};break;case"secondary":P={background:x.tintHover};break;case"link":P={color:x.fgHover};break}const A={...v,...j,...P,...u};return i.jsx(c,{ref:g,type:c==="button"?m.type??"button":void 0,href:d,target:h,rel:p,disabled:c==="button"?a||r:void 0,style:A,onMouseEnter:()=>F(!0),onMouseLeave:()=>{F(!1),C(!1)},onMouseDown:()=>C(!0),onMouseUp:()=>C(!1),onFocus:E=>{E.currentTarget.style.boxShadow="none"},onBlur:E=>{E.currentTarget.style.boxShadow="none"},...m,"aria-disabled":c!=="button"&&(a||r)?!0:m["aria-disabled"],onClick:E=>{var L;if(c!=="button"&&(a||r)){E.preventDefault();return}(L=m.onClick)==null||L.call(m,E)},children:r?i.jsx(f.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"}}):i.jsxs(i.Fragment,{children:[o&&i.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:o}),l,s&&i.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:s})]})})});Ye.displayName="MedixButton";const Hh={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"}},Uh={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}},tu=S.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:r=!1,disabled:o,children:s,style:a,...l},u)=>{const c=Hh[n],d=Uh[t],[h,p]=S.useState(!1),[m,g]=S.useState(!1);let x;switch(e){case"solid":x={background:h?m?c.solidActive:c.solidHover:c.solid,color:"#fff"};break;case"outline":x={background:h?c.tint:"transparent",color:c.fg,border:`1.5px solid ${c.solid}`};break;case"ghost":default:x={background:h?c.tint:"transparent",color:c.fg};break}return i.jsx("button",{ref:u,type:l.type??"button",disabled:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:o?"not-allowed":"pointer",opacity:o?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...d,...r?{borderRadius:"50%"}:{},...x,...a},onMouseEnter:()=>p(!0),onMouseLeave:()=>{p(!1),g(!1)},onMouseDown:()=>g(!0),onMouseUp:()=>g(!1),onFocus:y=>{y.currentTarget.style.boxShadow="none"},onBlur:y=>{y.currentTarget.style.boxShadow="none"},...l,children:s})});tu.displayName="MedixIconButton";const $h={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"}},Gh={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},ts=S.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",rounded:r,children:o,style:s,...a},l)=>{const u=$h[t],c=Gh[n];let d,h,p="1px solid transparent";switch(e){case"solid":d=u.solid,h=u.solidText;break;case"outline":d="transparent",h=u.tintText,p=`1px solid ${u.border}`;break;case"surface":d=u.tint,h=u.tintText,p=`1px solid ${u.border}20`;break;case"subtle":default:d=u.tint,h=u.tintText;break}const m={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:r?"100px":4,border:p,background:d,color:h,whiteSpace:"nowrap",...c,...s};return i.jsx("span",{ref:l,style:m,...a,children:o})});ts.displayName="MedixBadge";const nu={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},lo=S.forwardRef(({src:e,name:t,size:n="md",showStatus:r=!1,statusColor:o="green",...s},a)=>i.jsxs(f.Avatar.Root,{ref:a,size:nu[n],position:"relative",...s,children:[i.jsx(f.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&i.jsx(f.Avatar.Image,{src:e,alt:t??""}),r&&i.jsx(f.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:o,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));lo.displayName="MedixAvatar";function Yh({children:e,max:t,size:n="md"}){const r=S.Children.toArray(e),o=t?r.slice(0,t):r,s=t?Math.max(0,r.length-t):0,a=nu[n];return i.jsxs(f.Box,{display:"flex",alignItems:"center",children:[o.map((l,u)=>i.jsx(f.Box,{ml:u===0?"0":"-2",position:"relative",zIndex:o.length-u,children:S.isValidElement(l)?S.cloneElement(l,{size:n}):l},u)),s>0&&i.jsxs(f.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:["+",s]})]})}function ru({size:e="md",label:t,color:n="blue.500",...r}){return i.jsxs(f.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[i.jsx(f.Spinner,{size:e,color:n,borderWidth:"2px",...r}),t&&i.jsx(f.Text,{textStyle:"small",color:"text.muted",children:t})]})}function Kh({label:e}){return i.jsx(f.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:i.jsx(ru,{size:"xl",label:e??"Loading…"})})}const ou=S.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:r,...o},s)=>i.jsxs(f.Box,{ref:s,as:"span",display:"inline-flex",alignItems:"center",gap:"1",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:n?"default":void 0,...o,children:[r,n&&i.jsx(f.Box,{as:"button",onClick:n,ml:"1",opacity:.7,_hover:{opacity:1},lineHeight:"1",fontSize:"md",cursor:"pointer",border:"none",bg:"transparent",padding:"0",display:"inline-flex",alignItems:"center",children:"×"})]}));ou.displayName="MedixTag";const iu=S.forwardRef(({orientation:e="horizontal",label:t,...n},r)=>t?i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[i.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),i.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-body)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),i.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):i.jsx(f.Separator,{ref:r,orientation:e,borderColor:"border",...n}));iu.displayName="MedixDivider";const qh="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",Xh="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 Zh({variant:e,type:t,height:n,markColor:r,textColor:o,downloadFileName:s}){if(typeof window>"u")return;const a=4,l=532,u=44,c=119,d=32,h=n,p=Math.round(n*.3),m=t==="full"?Math.round(c*(n/d)):0,x=(t==="full"?h+p+m:h)*a,y=n*a,v=h*a/l,j=y/d,w=`
142
142
  <svg xmlns="http://www.w3.org/2000/svg" width="${x}" height="${y}" viewBox="0 0 ${x} ${y}">
143
- <g transform="scale(${b})">
144
- <path d="${_h}" fill="${r}" fill-rule="evenodd" transform="translate(-178, -1958)"/>
143
+ <g transform="scale(${v})">
144
+ <path d="${qh}" fill="${r}" fill-rule="evenodd" transform="translate(-178, -1958)"/>
145
145
  </g>
146
- ${t==="full"?`<g transform="translate(${(h+p)*s}, 0) scale(${T})">
147
- <svg viewBox="${u} 0 ${d} ${c}" width="${d}" height="${c}">
148
- <path d="${Nh}" fill="${i}"/>
146
+ ${t==="full"?`<g transform="translate(${(h+p)*a}, 0) scale(${j})">
147
+ <svg viewBox="${u} 0 ${c} ${d}" width="${c}" height="${d}">
148
+ <path d="${Xh}" fill="${o}"/>
149
149
  </svg>
150
150
  </g>`:""}
151
151
  </svg>
152
- `,A=new Blob([w],{type:"image/svg+xml;charset=utf-8"}),E=URL.createObjectURL(A),C=new Image;C.onload=()=>{const O=document.createElement("canvas");O.width=x,O.height=y;const B=O.getContext("2d");if(B){B.drawImage(C,0,0),URL.revokeObjectURL(E);const F=O.toDataURL("image/png"),L=document.createElement("a");L.href=F,L.download=o??`medixdeck-logo-${e}-${t}.png`,document.body.appendChild(L),L.click(),document.body.removeChild(L)}},C.src=E}function sr({variant:e="blue",type:t="full",height:n=32,downloadable:r=!1,downloadFileName:i,className:o,style:s}){const{themeMode:l}=or(),u=l==="dark",d=u?Wh[e]:Hh[e],c=u?$h[e]:Uh[e],p={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,cursor:r?"pointer":"default",transition:"transform 0.15s ease, opacity 0.15s ease",...s},m=x=>{r&&(x.stopPropagation(),g())},g=()=>{Vh({variant:e,type:t,height:n,markColor:d,textColor:c,downloadFileName:i})};return a.jsxs("span",{className:o,style:p,role:r?"button":"img",tabIndex:r?0:void 0,onClick:m,onKeyDown:x=>{r&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),g())},title:r?`Click to download MedixDeck logo (${e} ${t})`:void 0,"aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[a.jsx(Gh,{color:d,height:n}),t==="full"&&a.jsx(Yh,{color:c,height:n})]})}const Hh={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},Wh={blue:"#0685FF",purple:"#7700CC",black:"#FFFFFF",white:"#111926"},Uh={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},$h={blue:"#FFFFFF",purple:"#FFFFFF",black:"#FFFFFF",white:"#111926"};function Gh({color:e,height:t}){return a.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:a.jsx("g",{children:a.jsx("path",{d:`
152
+ `,F=new Blob([w],{type:"image/svg+xml;charset=utf-8"}),B=URL.createObjectURL(F),C=new Image;C.onload=()=>{const P=document.createElement("canvas");P.width=x,P.height=y;const A=P.getContext("2d");if(A){A.drawImage(C,0,0),URL.revokeObjectURL(B);const E=P.toDataURL("image/png"),L=document.createElement("a");L.href=E,L.download=s??`medixdeck-logo-${e}-${t}.png`,document.body.appendChild(L),L.click(),document.body.removeChild(L)}},C.src=B}function tn({variant:e="blue",type:t="full",height:n=32,downloadable:r=!1,downloadFileName:o,className:s,style:a}){const{themeMode:l}=ur(),u=l==="dark",c=u?Qh[e]:Jh[e],d=u?tp[e]:ep[e],p={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,cursor:r?"pointer":"default",transition:"transform 0.15s ease, opacity 0.15s ease",...a},m=x=>{r&&(x.stopPropagation(),g())},g=()=>{Zh({variant:e,type:t,height:n,markColor:c,textColor:d,downloadFileName:o})};return i.jsxs("span",{className:s,style:p,role:r?"button":"img",tabIndex:r?0:void 0,onClick:m,onKeyDown:x=>{r&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),g())},title:r?`Click to download MedixDeck logo (${e} ${t})`:void 0,"aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[i.jsx(np,{color:c,height:n}),t==="full"&&i.jsx(rp,{color:d,height:n})]})}const Jh={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},Qh={blue:"#0685FF",purple:"#7700CC",black:"#FFFFFF",white:"#111926"},ep={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},tp={blue:"#FFFFFF",purple:"#FFFFFF",black:"#FFFFFF",white:"#111926"};function np({color:e,height:t}){return i.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:i.jsx("g",{children:i.jsx("path",{d:`
153
153
  M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557
154
154
  C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490
155
155
  225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88
@@ -214,7 +214,7 @@
214
214
  C328.923,2426.794 337.487,2436.055 345.675,2444.555
215
215
  C353.486,2452.676 362.788,2461.68 371.226,2469.229
216
216
  C378.696,2475.993 386.419,2482.518 394.335,2488.823Z
217
- `,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function Yh({color:e,height:t}){const s=t/32,l=Math.round(119*s);return a.jsx("svg",{width:l,height:t,viewBox:"44 0 119 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:a.jsx("path",{d:`
217
+ `,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function rp({color:e,height:t}){const a=t/32,l=Math.round(119*a);return i.jsx("svg",{width:l,height:t,viewBox:"44 0 119 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:i.jsx("path",{d:`
218
218
  M46.32 25H44.016V7.648H46.32L52.296 22.24L58.272 7.648H60.624V25H58.32
219
219
  V18.136C58.32 14.896 58.344 13.72 58.464 12.496L53.4 25H51.192L46.152
220
220
  12.544C46.272 13.384 46.32 15.16 46.32 17.584V25Z
@@ -267,25 +267,25 @@
267
267
 
268
268
  M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281
269
269
  L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z
270
- `,fill:e})})}const bi={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},qo=S.forwardRef(({size:e="md",colorScheme:t="blue",leftElement:n,rightElement:r,isInvalid:i,errorMessage:o,...s},l)=>{const u=!!n,d=!!r,c=t==="purple"?"purple.500":"blue.500";return a.jsxs(f.Box,{w:"100%",children:[a.jsxs(f.Box,{position:"relative",children:[u&&a.jsx(f.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n}),a.jsx(f.Input,{ref:l,...bi[e],pl:u?"10":bi[e].px,pr:d?"10":bi[e].px,bg:"bg.surface",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":c,boxShadow:"none",outline:"none"},_dark:{bg:"bg.surface",borderColor:i?"red.500":"border",color:"text.heading"},...s}),d&&a.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:r})]}),i&&o&&a.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})});qo.displayName="MedixInput";const Xo=S.forwardRef(({placeholder:e="Search…",...t},n)=>a.jsx(qo,{ref:n,type:"search",placeholder:e,leftElement:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));Xo.displayName="MedixSearchInput";const qc=S.forwardRef(({colorScheme:e="blue",isInvalid:t,errorMessage:n,maxLength:r,showCount:i=!1,onChange:o,value:s,...l},u)=>{const[d,c]=S.useState(typeof s=="string"?s.length:0),h=e==="purple"?"purple.500":"blue.500",p=m=>{c(m.target.value.length),o==null||o(m)};return a.jsxs(f.Box,{w:"100%",children:[a.jsx(f.Textarea,{ref:u,bg:"bg.surface",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:r,value:s,onChange:p,_placeholder:{color:"text.muted"},_focus:{borderColor:t?"red.500":h,boxShadow:"none",outline:"none"},_dark:{bg:"bg.surface",borderColor:t?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...l}),a.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[t&&n?a.jsx(f.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:n}):a.jsx("span",{}),i&&r&&a.jsxs(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[d,"/",r]})]})]})});qc.displayName="MedixTextarea";const Kh={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}};function qh({options:e=[],placeholder:t="Select option...",isInvalid:n=!1,errorMessage:r,size:i="md",colorScheme:o="blue",icon:s,value:l,defaultValue:u,onChange:d,disabled:c=!1,name:h,id:p}){const[m,g]=S.useState(!1),[x,y]=S.useState(""),[b,T]=S.useState(()=>typeof u=="string"?u:Array.isArray(u)&&u.length>0?u[0]:""),w=S.useRef(null),A=S.useRef(null),E=l!==void 0,C=E?typeof l=="string"?l:Array.isArray(l)&&l.length>0?l[0]:"":b,O=e.find(N=>N.value===C);S.useEffect(()=>{function N(P){w.current&&!w.current.contains(P.target)&&g(!1)}return m&&document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[m]),S.useEffect(()=>{if(m){const N=setTimeout(()=>{var P;return(P=A.current)==null?void 0:P.focus()},50);return()=>clearTimeout(N)}else y("")},[m]);const B=N=>{c||(E||T(N),d==null||d(N),g(!1))},F=S.useMemo(()=>{if(!x.trim())return e;const N=x.toLowerCase().trim();return e.filter(P=>P.label.toLowerCase().includes(N))},[e,x]),L=o==="purple"?"#7700CC":"#0685FF",R=n?"#DC2626":m?L:"var(--medix-form-border)",D=Kh[i];return a.jsxs(f.Box,{w:"100%",position:"relative",zIndex:m?1e3:void 0,ref:w,children:[h&&a.jsx("input",{type:"hidden",name:h,id:p,value:C}),a.jsxs(f.Box,{onClick:()=>!c&&g(!m),display:"flex",alignItems:"center",justifyContent:"space-between",h:D.h,px:D.px,borderRadius:"md",bg:"bg.surface",cursor:c?"not-allowed":"pointer",opacity:c?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${R}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2.5",flex:"1",minW:"0",children:[s&&a.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,children:s}),O?a.jsx(f.Text,{fontSize:D.fontSize,color:"text.heading",fontFamily:"var(--font-body)",truncate:!0,fontWeight:"500",children:O.label}):a.jsx(f.Text,{fontSize:D.fontSize,color:"text.muted",fontFamily:"var(--font-body)",truncate:!0,children:t})]}),a.jsx(f.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",flexShrink:0,style:{transform:m?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),m&&a.jsxs(f.Box,{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:[e.length>5&&a.jsx(f.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsxs(f.Box,{position:"relative",display:"flex",alignItems:"center",children:[a.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:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("path",{d:"m21 21-4.35-4.35"})]}),a.jsx("input",{ref:A,type:"text",placeholder:"Search...",value:x,onChange:N=>y(N.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"}})]})}),a.jsx(f.Box,{overflowY:"auto",flex:"1",py:"1",children:F.length===0?a.jsx(f.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):F.map(N=>{const P=N.value===C;return a.jsxs("button",{type:"button",disabled:N.disabled,onClick:()=>B(N.value),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:P?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:N.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:N.disabled?.5:1,transition:"background 0.1s ease"},onMouseEnter:I=>{N.disabled||(I.currentTarget.style.background="var(--medix-form-bg-subtle)")},onMouseLeave:I=>{N.disabled||(I.currentTarget.style.background=P?"var(--medix-form-bg-subtle)":"transparent")},children:[a.jsx("span",{style:{fontWeight:P?600:400},children:N.label}),P&&a.jsx("span",{style:{color:L,fontWeight:700,fontSize:"14px"},children:"✓"})]},N.value)})})]}),n&&r&&a.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function Xh({options:e=[],placeholder:t="Select options...",isInvalid:n=!1,errorMessage:r,size:i="md",colorScheme:o="blue",icon:s,value:l,defaultValue:u,onChange:d,disabled:c=!1,name:h,id:p}){const[m,g]=S.useState(!1),[x,y]=S.useState(""),[b,T]=S.useState(()=>Array.isArray(u)?u:typeof u=="string"&&u?[u]:[]),w=S.useRef(null),A=S.useRef(null),E=l!==void 0,C=E?Array.isArray(l)?l:typeof l=="string"&&l?[l]:[]:b;S.useEffect(()=>{function I(M){w.current&&!w.current.contains(M.target)&&g(!1)}return m&&document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[m]),S.useEffect(()=>{if(m){const I=setTimeout(()=>{var M;return(M=A.current)==null?void 0:M.focus()},50);return()=>clearTimeout(I)}else y("")},[m]);const O=I=>{if(c)return;const U=C.includes(I)?C.filter(H=>H!==I):[...C,I];E||T(U),d==null||d(U)},B=(I,M)=>{if(M.stopPropagation(),c)return;const U=C.filter(H=>H!==I);E||T(U),d==null||d(U)},F=S.useMemo(()=>{if(!x.trim())return e;const I=x.toLowerCase().trim();return e.filter(M=>M.label.toLowerCase().includes(I))},[e,x]),L=o==="purple"?"#7700CC":"#0685FF",R=n?"#DC2626":m?L:"var(--medix-form-border)",D=o==="purple"?"purple.50":"blue.50",N=o==="purple"?"purple.700":"blue.700",P=o==="purple"?"purple.200":"blue.200";return a.jsxs(f.Box,{w:"100%",position:"relative",zIndex:m?1e3:void 0,ref:w,children:[h&&a.jsx("input",{type:"hidden",name:h,id:p,value:C.join(",")}),a.jsxs(f.Box,{onClick:()=>!c&&g(!m),display:"flex",alignItems:"center",justifyContent:"space-between",minH:i==="sm"?"34px":i==="lg"?"48px":"42px",py:"1.5",px:"3",borderRadius:"md",bg:"bg.surface",cursor:c?"not-allowed":"pointer",opacity:c?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${R}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"1.5",flex:"1",minW:"0",children:[s&&a.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",mr:"1",children:s}),C.length===0?a.jsx(f.Text,{fontSize:i==="sm"?"xs":"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}):C.map(I=>{const M=e.find(H=>H.value===I),U=M?M.label:I;return a.jsxs(f.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:D,color:N,border:"1px solid",borderColor:P,_dark:{bg:o==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:o==="purple"?"purple.300":"blue.300",borderColor:o==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[a.jsx("span",{children:U}),!c&&a.jsx("button",{type:"button",onClick:H=>B(I,H),"aria-label":`Remove ${U}`,style:{background:"transparent",border:"none",padding:0,marginLeft:"2px",cursor:"pointer",color:"inherit",fontSize:"13px",lineHeight:1,opacity:.75},onMouseEnter:H=>H.currentTarget.style.opacity="1",onMouseLeave:H=>H.currentTarget.style.opacity="0.75",children:"×"})]},I)})]}),a.jsx(f.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",style:{transform:m?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),m&&a.jsxs(f.Box,{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:[e.length>5&&a.jsx(f.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsxs(f.Box,{position:"relative",display:"flex",alignItems:"center",children:[a.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:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("path",{d:"m21 21-4.35-4.35"})]}),a.jsx("input",{ref:A,type:"text",placeholder:"Search options...",value:x,onChange:I=>y(I.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"}})]})}),a.jsx(f.Box,{overflowY:"auto",flex:"1",py:"1",children:F.length===0?a.jsx(f.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):F.map(I=>{const M=C.includes(I.value);return a.jsxs("button",{type:"button",disabled:I.disabled,onClick:()=>O(I.value),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:M?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:I.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:I.disabled?.5:1,transition:"background 0.1s ease"},onMouseEnter:U=>{I.disabled||(U.currentTarget.style.background="var(--medix-form-bg-subtle)")},onMouseLeave:U=>{I.disabled||(U.currentTarget.style.background=M?"var(--medix-form-bg-subtle)":"transparent")},children:[a.jsx("span",{style:{fontWeight:M?600:400},children:I.label}),M&&a.jsx("span",{style:{color:L,fontWeight:700,fontSize:"14px"},children:"✓"})]},I.value)})})]}),n&&r&&a.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function Zh(e){return e.multiple?a.jsx(Xh,{...e}):a.jsx(qh,{...e})}const Xc={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"}},Zc=S.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:r,disabled:i=!1,indeterminate:o=!1,children:s,description:l,name:u,value:d,id:c},h)=>{const p=Xc[e],m=c??S.useId(),[g,x]=S.useState(n),[y,b]=S.useState(!1),T=t!==void 0?t:g,w=E=>{t===void 0&&x(E.target.checked),r==null||r(E.target.checked)},A={width:18,height:18,borderRadius:4,border:`2px solid ${T||o?p.solid:"var(--medix-form-border, #CBD5E1)"}`,background:T||o?p.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 a.jsxs(f.Box,{opacity:i?.55:1,children:[a.jsxs("label",{htmlFor:m,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[a.jsx("input",{ref:h,id:m,type:"checkbox",name:u,value:d,checked:T,disabled:i,onChange:w,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),a.jsx("span",{style:A,"aria-hidden":"true",children:o?a.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:a.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):T?a.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:a.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),s&&a.jsxs(f.Box,{children:[a.jsx(f.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:s}),l&&a.jsx(f.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]}),!s&&l&&a.jsx(f.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l})]})});Zc.displayName="MedixCheckbox";function Jh({name:e,value:t,onChange:n,options:r,colorScheme:i="blue",direction:o="column"}){const s=Xc[i],[l,u]=S.useState(""),d=t!==void 0?t:l,c=h=>{t===void 0&&u(h),n==null||n(h)};return a.jsx(f.Box,{display:"flex",flexDirection:o,gap:o==="row"?"5":"3",role:"radiogroup",children:r.map(h=>{const p=d===h.value;return a.jsx(Qh,{option:h,name:e,isSelected:p,onChange:c,solidColor:s.solid,ring:s.ring},h.value)})})}function Qh({option:e,name:t,isSelected:n,onChange:r,solidColor:i,ring:o}){const[s,l]=S.useState(!1);return a.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:[a.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>r(e.value),onFocus:()=>l(!0),onBlur:()=>l(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),a.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:a.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),a.jsxs(f.Box,{children:[a.jsx(f.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&a.jsx(f.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const ep={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"}},tp={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}},Jc=S.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:r=!1,onChange:i,disabled:o=!1,label:s,description:l,name:u,id:d},c)=>{const h=ep[e],p=tp[t],m=d??S.useId(),[g,x]=S.useState(r),[y,b]=S.useState(!1),T=n!==void 0?n:g,w=C=>{n===void 0&&x(C.target.checked),i==null||i(C.target.checked)},A={position:"relative",display:"inline-flex",alignItems:"center",width:p.width,height:p.height,borderRadius:p.height,background:T?h.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:"none",cursor:o?"not-allowed":"pointer",flexShrink:0},E={position:"absolute",width:p.thumbSize,height:p.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"none",top:p.thumbOffset,left:T?p.width-p.thumbSize-p.thumbOffset:p.thumbOffset,transition:"left 0.18s ease"};return a.jsxs(f.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:o?.55:1,children:[a.jsxs("label",{htmlFor:m,style:{display:"inline-flex",cursor:o?"not-allowed":"pointer"},children:[a.jsx("input",{ref:c,id:m,type:"checkbox",role:"switch",name:u,checked:T,disabled:o,onChange:w,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),a.jsx("span",{style:A,"aria-hidden":"true",children:a.jsx("span",{style:E})})]}),(s||l)&&a.jsxs(f.Box,{children:[s&&a.jsx("label",{htmlFor:m,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:o?"not-allowed":"pointer",userSelect:"none"},children:s}),l&&a.jsx(f.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]})});Jc.displayName="MedixSwitch";function np({id:e,label:t,helperText:n,errorMessage:r,isRequired:i=!1,isDisabled:o=!1,children:s}){const l=!!r;return a.jsxs(f.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:o?.5:1,pointerEvents:o?"none":void 0,w:"100%",children:[t&&a.jsxs(f.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[a.jsx(f.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&a.jsx(f.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),S.cloneElement(s,{id:e,isInvalid:l||void 0}),n&&!l&&a.jsx(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),l&&r&&a.jsx(f.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function Qc({length:e=6,value:t,defaultValue:n="",onChange:r,onComplete:i,colorScheme:o="blue",isInvalid:s=!1,isDisabled:l=!1,mask:u=!1,label:d,helperText:c,errorMessage:h}){const[p,m]=S.useState(n),[g,x]=S.useState(null),y=t!==void 0,T=(y?t:p).split("").slice(0,e),w=S.useRef([]),A=s?"#DC2626":"var(--medix-form-border, var(--chakra-colors-border, #E2E8F0))",E=s?"#DC2626":o==="purple"?"#7700CC":"#0685FF",C=(F,L)=>{var R,D,N;if(F.key==="Backspace"){F.preventDefault();const P=[...T];if(P[L]){P[L]="";const I=P.join("");y||m(I),r==null||r(I)}else if(L>0){(R=w.current[L-1])==null||R.focus(),P[L-1]="";const I=P.join("");y||m(I),r==null||r(I)}}else F.key==="ArrowLeft"&&L>0?(D=w.current[L-1])==null||D.focus():F.key==="ArrowRight"&&L<e-1&&((N=w.current[L+1])==null||N.focus())},O=(F,L)=>{var P;const R=F.target.value.replace(/\D/g,""),D=[...T];for(;D.length<e;)D.push("");if(!R){D[L]="";const I=D.join("");y||m(I),r==null||r(I);return}D[L]=R[0];const N=D.join("");y||m(N),r==null||r(N),L<e-1&&((P=w.current[L+1])==null||P.focus()),N.replace(/\s/g,"").length===e&&(i==null||i(N))},B=(F,L)=>{var M;F.preventDefault();const R=F.clipboardData.getData("text").replace(/\D/g,"");if(!R)return;const D=[...T];for(;D.length<e;)D.push("");const N=R.split("").slice(0,e-L);N.forEach((U,H)=>{D[L+H]=U});const P=D.join("");y||m(P),r==null||r(P);const I=P.replace(/\s/g,"").length===e?e-1:Math.min(L+N.length,e-1);(M=w.current[I])==null||M.focus(),P.replace(/\s/g,"").length===e&&(i==null||i(P))};return a.jsxs(f.Box,{w:"fit-content",children:[d&&a.jsx(f.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:d}),a.jsx(f.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((F,L)=>a.jsx("input",{ref:R=>{w.current[L]=R},type:u?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:T[L]??"",onChange:R=>O(R,L),onKeyDown:R=>C(R,L),onPaste:R=>B(R,L),onFocus:R=>{R.target.select(),x(L)},onBlur:()=>x(null),disabled:l,"aria-label":`Digit ${L+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${g===L?E:A}`,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:l?"not-allowed":"text",opacity:l?.5:1}},L))}),(c||h)&&a.jsx(f.Text,{mt:"2",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?h:c})]})}const rp=Qc;function Vr(){return Vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vr.apply(this,arguments)}function ip(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var op=["cdnSuffix","cdnUrl","countryCode","style","svg"],sp="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",ap="svg",lp=127397,sa=function(t){var n=t.cdnSuffix,r=n===void 0?ap:n,i=t.cdnUrl,o=i===void 0?sp:i,s=t.countryCode,l=t.style,u=t.svg,d=u===void 0?!1:u,c=ip(t,op);if(typeof s!="string")return null;if(d){var h=""+o+s.toLowerCase()+"."+r;return S.createElement("img",Object.assign({},c,{src:h,style:Vr({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},l)}))}var p=s.toUpperCase().replace(/./g,function(m){return String.fromCodePoint(m.charCodeAt(0)+lp)});return S.createElement("span",Object.assign({role:"img"},c,{style:Vr({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},l)}),p)};const cp={"+1":"US","+7":"RU","+39":"IT","+44":"GB","+47":"NO","+212":"MA","+262":"RE","+290":"SH","+358":"FI","+590":"GP","+599":"CW"},Vt=[{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 up({value:e="",onChange:t,showCountryCode:n=!0,showCountryFlag:r=!0,defaultCountryCode:i="+234",defaultCountry:o,placeholder:s="80 000 0000",colorScheme:l="blue",isInvalid:u=!1,errorMessage:d,label:c,helperText:h,isDisabled:p=!1,id:m}){const g=S.useId(),x=m??g,y=o??(i?cp[i]:void 0),b=(y?Vt.find(Y=>Y.country===y):void 0)??Vt.find(Y=>Y.code===i)??Vt.find(Y=>Y.country==="NG")??Vt[0],[T,w]=S.useState(b.country),[A,E]=S.useState(e),[C,O]=S.useState(!1),[B,F]=S.useState(!1),[L,R]=S.useState(""),D=S.useRef(null),N=S.useRef(null),P=Vt.find(Y=>Y.country===T)??b;S.useEffect(()=>{function Y(ie){D.current&&!D.current.contains(ie.target)&&F(!1)}return B&&document.addEventListener("mousedown",Y),()=>{document.removeEventListener("mousedown",Y)}},[B]),S.useEffect(()=>{if(B){const Y=setTimeout(()=>{var ie;(ie=N.current)==null||ie.focus()},50);return()=>clearTimeout(Y)}else R("")},[B]);const I=S.useMemo(()=>{if(!L.trim())return Vt;const Y=L.toLowerCase().trim();return Vt.filter(ie=>ie.name.toLowerCase().includes(Y)||ie.code.toLowerCase().includes(Y)||ie.country.toLowerCase().includes(Y))},[L]),M=Y=>{const ie=Y.target.value.replace(/[^\d\s\-]/g,"");E(ie),t==null||t(`${P.code}${ie.replace(/\s/g,"")}`)},U=Y=>{w(Y.country),t==null||t(`${Y.code}${A.replace(/\s/g,"")}`),F(!1)},$=u?"#DC2626":C||B?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return a.jsxs(f.Box,{w:"100%",children:[c&&a.jsx("label",{htmlFor:x,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:c}),a.jsxs(f.Box,{display:"flex",alignItems:"center",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:p?.5:1,pointerEvents:p?"none":void 0,position:"relative",zIndex:B?1e3:void 0,style:{border:`1.5px solid ${$}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[n&&a.jsxs(f.Box,{position:"relative",ref:D,h:"full",children:[a.jsxs("button",{id:`${x}-country`,type:"button",onClick:()=>!p&&F(!B),disabled:p,"aria-label":"Select country code","aria-expanded":B,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:p?"not-allowed":"pointer",height:"100%",color:"var(--medix-form-text)",fontFamily:"var(--font-body)",fontSize:"14px",fontWeight:500},children:[r&&a.jsx(f.Box,{display:"flex",alignItems:"center",fontSize:"lg",lineHeight:"1",children:a.jsx(sa,{countryCode:P.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),a.jsx("span",{children:P.code}),a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:B?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease",opacity:.7},children:a.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),B&&a.jsxs(f.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:[a.jsx(f.Box,{p:"2.5",color:"text.heading",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsxs(f.Box,{color:"text.heading",position:"relative",display:"flex",alignItems:"center",children:[a.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:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("path",{d:"m21 21-4.35-4.35"})]}),a.jsx("input",{ref:N,type:"text",placeholder:"Search country or code...",value:L,onChange:Y=>R(Y.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"}})]})}),a.jsx(f.Box,{overflowY:"auto",flex:"1",py:"1",children:I.length===0?a.jsx(f.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No country found"}):I.map(Y=>{const ie=Y.country===P.country;return a.jsxs("button",{type:"button",onClick:()=>U(Y),style:{display:"flex",width:"100%",alignItems:"center",gap:"10px",padding:"8px 14px",background:ie?"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:j=>{j.currentTarget.style.background="var(--medix-form-bg-subtle)"},onMouseLeave:j=>{j.currentTarget.style.background=ie?"var(--medix-form-bg-subtle)":"transparent"},children:[a.jsx(f.Box,{display:"flex",alignItems:"center",fontSize:"md",flexShrink:0,children:a.jsx(sa,{countryCode:Y.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),a.jsx(f.Text,{flex:"1",truncate:!0,fontWeight:ie?"600":"400",children:Y.name}),a.jsx(f.Text,{fontSize:"xs",color:"text.muted",flexShrink:0,children:Y.code})]},`${Y.country}-${Y.code}`)})})]})]}),a.jsx("input",{id:x,type:"tel",value:A,onChange:M,onFocus:()=>O(!0),onBlur:()=>O(!1),placeholder:s,disabled:p,"aria-invalid":u,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||d)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?d:h})]})}const dp=["MON","TUES","WED","THURS","FRI","SAT","SUN"],fp=["January","February","March","April","May","June","July","August","September","October","November","December"],hp=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Pn=12;function to(e,t){return new Date(e,t+1,0).getDate()}function pp(e,t){return new Date(e,t,1).getDay()}function mp(e){return e===0?6:e-1}function aa(e,t,n,r,i){const o=new Date(n,t,e);if(r){const s=new Date(r.getFullYear(),r.getMonth(),r.getDate());if(o<s)return!0}if(i){const s=new Date(i.getFullYear(),i.getMonth(),i.getDate());if(o>s)return!0}return!1}function gp(e,t,n,r){const i=to(t,e),o=new Date(t,e,1),s=new Date(t,e,i);if(n){const l=new Date(n.getFullYear(),n.getMonth(),n.getDate());if(s<l)return!0}if(r){const l=new Date(r.getFullYear(),r.getMonth(),r.getDate());if(o>l)return!0}return!1}function xp(e,t,n){return!!(t&&e<t.getFullYear()||n&&e>n.getFullYear())}function Zo({value:e,onChange:t,minDate:n,maxDate:r,colorScheme:i="blue",...o}){const s=i==="purple"?"#7700CC":"#0685FF",l=i==="purple"?"rgba(119,0,204,0.14)":"rgba(6,133,255,0.14)",[u,d]=S.useState(()=>e?new Date(e):new Date),[c,h]=S.useState("day"),[p,m]=S.useState(0);S.useEffect(()=>{e&&d($=>{const v=new Date(e);return $.getFullYear()===v.getFullYear()&&$.getMonth()===v.getMonth()?$:v})},[e]);const g=u.getFullYear(),x=u.getMonth(),b=Math.floor(g/Pn)*Pn+p*Pn,T=b+Pn-1,w=!n||g>n.getFullYear()||g===n.getFullYear()&&x>n.getMonth(),A=!r||g<r.getFullYear()||g===r.getFullYear()&&x<r.getMonth(),E=()=>{d(new Date(g,x-1,1))},C=()=>{d(new Date(g,x+1,1))},O=()=>{const $=new Date;d($),h("day"),t&&!aa($.getDate(),$.getMonth(),$.getFullYear(),n,r)&&t($)},B=$=>{d(new Date(g,$,1)),h("day")},F=$=>{d(new Date($,x,1)),m(0),h("month")},L=to(g,x),R=mp(pp(g,x)),D=to(g,x-1),P=(R+L>35?42:35)-(R+L),I=($,v,Y)=>e?e.getDate()===$&&e.getMonth()===v&&e.getFullYear()===Y:!1,M=()=>{const $=[];for(let v=0;v<R;v++){const Y=D-R+v+1;$.push(a.jsx(vi,{day:Y,isMuted:!0,accentColor:s},`prev-${v}`))}for(let v=1;v<=L;v++){const Y=aa(v,x,g,n,r);$.push(a.jsx(vi,{day:v,isActive:I(v,x,g),isDisabled:Y,accentColor:s,accentLight:l,onClick:Y?void 0:()=>t==null?void 0:t(new Date(g,x,v))},`curr-${v}`))}for(let v=1;v<=P;v++)$.push(a.jsx(vi,{day:v,isMuted:!0,accentColor:s},`next-${v}`));return $},U=()=>a.jsx(f.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",mt:"2",children:hp.map(($,v)=>{const Y=v===x,ie=gp(v,g,n,r);return a.jsx(ca,{label:$,isActive:Y,isDisabled:ie,accentColor:s,accentLight:l,onClick:()=>!ie&&B(v)},$)})}),H=()=>{const $=Array.from({length:Pn},(v,Y)=>b+Y);return a.jsxs(a.Fragment,{children:[a.jsxs(f.Flex,{justify:"space-between",align:"center",mb:"3",children:[a.jsx(yr,{direction:"prev",enabled:!0,accentColor:s,onClick:()=>m(v=>v-1),ariaLabel:"Previous years"}),a.jsxs(f.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:[b," – ",T]}),a.jsx(yr,{direction:"next",enabled:!0,accentColor:s,onClick:()=>m(v=>v+1),ariaLabel:"Next years"})]}),a.jsx(f.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",children:$.map(v=>{const Y=v===g,ie=xp(v,n,r);return a.jsx(ca,{label:String(v),isActive:Y,isDisabled:ie,accentColor:s,accentLight:l,onClick:()=>!ie&&F(v)},v)})})]})};return a.jsxs(f.Box,{w:"100%",maxW:"360px",bg:"bg.surface",borderRadius:"card",p:"5",fontFamily:"var(--font-body)",...o,children:[a.jsxs(f.Flex,{justify:"space-between",align:"center",mb:c==="day"?"6":"4",children:[a.jsxs(f.Flex,{align:"center",gap:"1",children:[c==="day"&&a.jsx(yr,{direction:"prev",enabled:w,accentColor:s,onClick:E,ariaLabel:"Go to previous month"}),a.jsx(la,{label:fp[x],isActive:c==="month",accentColor:s,accentLight:l,onClick:()=>{h($=>$==="month"?"day":"month"),m(0)}}),a.jsx(la,{label:String(g),isActive:c==="year",accentColor:s,accentLight:l,onClick:()=>{h($=>$==="year"?"day":"year"),m(0)}}),c==="day"&&a.jsx(yr,{direction:"next",enabled:A,accentColor:s,onClick:C,ariaLabel:"Go to next month"})]}),a.jsx(f.Box,{as:"button",type:"button",onClick:O,px:"3",py:"1",fontSize:"sm",fontWeight:"medium",borderRadius:"md",border:"1px solid",borderColor:"border",color:"text.heading",_hover:{bg:"bg.subtle"},children:"Today"})]}),c==="day"&&a.jsxs(a.Fragment,{children:[a.jsx(f.Flex,{mb:"3",children:dp.map($=>a.jsx(f.Box,{flex:"1",textAlign:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:$},$))}),a.jsx(f.Box,{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gapY:"2",children:M()})]}),c==="month"&&U(),c==="year"&&H()]})}function yr({enabled:e,onClick:t,direction:n,accentColor:r,ariaLabel:i}){return a.jsx(f.Box,{as:"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",cursor:e?"pointer":"not-allowed",color:e?"text.heading":"text.muted",opacity:e?1:.35,p:"0",flexShrink:0,_hover:e?{color:r,bg:"bg.subtle"}:void 0,transition:"all 0.15s",children:a.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"?a.jsx("path",{d:"M15 18l-6-6 6-6"}):a.jsx("path",{d:"M9 18l6-6-6-6"})})})}function la({label:e,isActive:t,accentColor:n,accentLight:r,onClick:i}){return a.jsxs(f.Box,{as:"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",bg:t?r:"transparent",color:t?n:"text.heading",fontWeight:"semibold",fontSize:"15px",fontFamily:"var(--font-body)",cursor:"pointer",lineHeight:"1.4",_hover:t?void 0:{bg:r,color:n},transition:"all 0.15s",children:[e,a.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:a.jsx("path",{d:"M6 9l6 6 6-6"})})]})}function ca({label:e,isActive:t,isDisabled:n,accentColor:r,accentLight:i,onClick:o}){return a.jsx(f.Box,{as:"button",type:"button",onClick:n?void 0:o,disabled:n,display:"flex",alignItems:"center",justifyContent:"center",h:"10",borderRadius:"md",border:"1.5px solid",borderColor:t?r:"transparent",bg:t?r:"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:r,borderColor:r}:void 0,transition:"all 0.15s",children:e})}function vi({day:e,isActive:t,isMuted:n,isDisabled:r,accentColor:i,accentLight:o,onClick:s}){return a.jsx(f.Flex,{justify:"center",align:"center",h:"10",children:a.jsx(f.Box,{as:"button",type:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"full",fontSize:"sm",fontWeight:"medium",onClick:s,disabled:n||r,cursor:n?"default":r?"not-allowed":"pointer",opacity:r?.35:1,style:{background:t?i:"transparent",color:t?"#ffffff":void 0,transition:"background 0.15s, color 0.15s"},color:t?void 0:n||r?"text.muted":"text.heading",_hover:!n&&!r&&!t?{bg:o,color:i}:void 0,transition:"all 0.2s",children:e})})}function yp({value:e,onChange:t,min:n,max:r,label:i,helperText:o,errorMessage:s,colorScheme:l="blue",isInvalid:u=!1,isDisabled:d=!1,placeholder:c="Select date",id:h,includeTime:p=!1}){const[m,g]=S.useState(!1),x=S.useRef(null),y=F=>F!=null&&F.includes("T")&&F.split("T")[1].slice(0,5)||"00:00";S.useEffect(()=>{function F(L){x.current&&!x.current.contains(L.target)&&g(!1)}return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[]);const T=u?"#DC2626":m?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",w="none",A=F=>{const L=F.getFullYear(),R=String(F.getMonth()+1).padStart(2,"0"),D=String(F.getDate()).padStart(2,"0");p?t==null||t(`${L}-${R}-${D}T${y(e)}`):(t==null||t(`${L}-${R}-${D}`),g(!1))},E=F=>{const L=F.target.value,R=(e==null?void 0:e.split("T")[0])??"";R&&(t==null||t(`${R}T${L}`))},C=F=>{if(!F)return;const[L,R,D]=F.split("-"),N=Number(L),P=Number(R),I=Number(D==null?void 0:D.split("T")[0]);if(!Number.isInteger(N)||!Number.isInteger(P)||!Number.isInteger(I))return;const M=new Date(N,P-1,I);if(!(M.getFullYear()!==N||M.getMonth()!==P-1||M.getDate()!==I))return M},O=C(e==null?void 0:e.split("T")[0]),B=O&&!isNaN(O.getTime())?p&&(e!=null&&e.includes("T"))?`${O.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})} ${e.split("T")[1].slice(0,5)}`:O.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return a.jsxs(f.Box,{w:"100%",position:"relative",zIndex:m?1e3:void 0,ref:x,children:[i&&a.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),a.jsxs(f.Box,{position:"relative",children:[a.jsx("input",{id:h,readOnly:!0,type:"text",value:B,placeholder:c,disabled:d,"aria-invalid":u,"aria-haspopup":"dialog","aria-expanded":m,onClick:()=>!d&&g(!m),onKeyDown:F=>{d||(F.key==="Enter"||F.key===" "||F.key==="ArrowDown"?(F.preventDefault(),g(!0)):F.key==="Escape"&&g(!1))},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${T}`,boxShadow:w,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:d?"not-allowed":"pointer",opacity:d?.5:1,colorScheme:"auto"}}),a.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:a.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),a.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),a.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),a.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})})]}),m&&a.jsxs(f.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:[a.jsx(Zo,{value:O,onChange:A,minDate:C(n),maxDate:C(r),colorScheme:l}),p&&a.jsxs(f.Box,{px:"5",pb:"4",borderTop:"1px solid",borderColor:"border",children:[a.jsx(f.Text,{fontSize:"xs",fontWeight:"medium",color:"text.muted",mb:"1.5",fontFamily:"var(--font-body)",children:"Time"}),a.jsx("input",{type:"time",value:y(e),onChange:E,disabled:!O,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:O?1:.4,cursor:O?"default":"not-allowed",colorScheme:"auto"}})]})]}),(o||s)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?s:o})]})}function bp({startValue:e,onStartChange:t,endValue:n,onEndChange:r,min:i,max:o,label:s,helperText:l,errorMessage:u,colorScheme:d="blue",isInvalid:c=!1,isDisabled:h=!1,startPlaceholder:p="Start date",endPlaceholder:m="End date",id:g}){const[x,y]=S.useState(null),b=S.useRef(null);S.useEffect(()=>{function M(U){b.current&&!b.current.contains(U.target)&&y(null)}return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]);const w=c?"#DC2626":x?d==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",A="none",E={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%"},C=M=>{const U=M.getFullYear(),H=String(M.getMonth()+1).padStart(2,"0"),$=String(M.getDate()).padStart(2,"0");return`${U}-${H}-${$}`},O=M=>i&&M<i?i:o&&M>o?o:M,B=M=>{const U=O(C(M));x==="start"?(t==null||t(U),n&&n<U&&(r==null||r("")),y("end")):x==="end"&&(r==null||r(U),e&&e>U&&(t==null||t("")),y(null))},F=M=>{if(!M)return;const[U,H,$]=M.split("-").map(Number);if(!U||H<1||H>12||$<1||$>31)return;const v=new Date(U,H-1,$);if(!(v.getFullYear()!==U||v.getMonth()!==H-1||v.getDate()!==$))return v},R=F(x==="start"?e:n),D=F(e),N=F(n),P=D?D.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",I=N?N.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return a.jsxs(f.Box,{w:"100%",position:"relative",zIndex:x?1e3:void 0,ref:b,children:[s&&a.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s}),a.jsxs(f.Box,{display:"flex",alignItems:"center",position:"relative",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${w}`,boxShadow:A,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:h?.5:1,overflow:"hidden"},children:[a.jsx("input",{id:g,readOnly:!0,type:"text",value:P,placeholder:p,disabled:h,"aria-invalid":c,"aria-haspopup":"dialog","aria-expanded":x==="start",onClick:()=>!h&&y("start"),onKeyDown:M=>{h||(M.key==="Enter"||M.key===" "||M.key==="ArrowDown"?(M.preventDefault(),y("start")):M.key==="Escape"&&y(null))},style:{...E,textAlign:"center"}}),a.jsx(f.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),a.jsx("input",{readOnly:!0,type:"text",value:I,placeholder:m,disabled:h,"aria-invalid":c,"aria-haspopup":"dialog","aria-expanded":x==="end",onClick:()=>!h&&y("end"),onKeyDown:M=>{h||(M.key==="Enter"||M.key===" "||M.key==="ArrowDown"?(M.preventDefault(),y("end")):M.key==="Escape"&&y(null))},style:{...E,textAlign:"center"}})]}),x&&a.jsx(f.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:a.jsx(Zo,{value:R,onChange:B,minDate:x==="end"?D??F(i):F(i),maxDate:F(o),colorScheme:d})}),(l||u)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:c?"red.500":"text.muted",fontFamily:"var(--font-body)",children:c?u:l})]})}const vp=a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"6 9 12 15 18 9"})});function kp({options:e,value:t,onChange:n,placeholder:r="Search...",label:i,helperText:o,errorMessage:s,colorScheme:l="blue",isInvalid:u=!1,isDisabled:d=!1}){const[c,h]=S.useState(!1),[p,m]=S.useState(""),g=S.useRef(null);S.useEffect(()=>{if(t){const w=e.find(A=>A.value===t);w&&m(w.label)}},[t,e]),S.useEffect(()=>{function w(A){if(g.current&&!g.current.contains(A.target))if(h(!1),t){const E=e.find(C=>C.value===t);E&&m(E.label)}else m("")}return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[t,e]);const x=e.filter(w=>w.label.toLowerCase().includes(p.toLowerCase())),b=u?"#DC2626":c?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return a.jsxs(f.Box,{w:"100%",position:"relative",zIndex:c?1e3:void 0,ref:g,children:[i&&a.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),a.jsxs(f.Box,{position:"relative",children:[a.jsx("input",{type:"text",value:p,placeholder:r,disabled:d,onChange:w=>{m(w.target.value),h(!0),w.target.value||n==null||n("")},onFocus:()=>h(!0),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${b}`,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:d?"not-allowed":"text",opacity:d?.5:1}}),a.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:vp})]}),c&&!d&&a.jsx(f.Box,{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:x.length>0?x.map(w=>a.jsx(f.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{n==null||n(w.value),m(w.label),h(!1)},children:w.label},w.value)):a.jsx(f.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(o||s)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?s:o})]})}const wp=a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),a.jsx("polyline",{points:"17 8 12 3 7 8"}),a.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function Sp({accept:e,multiple:t=!1,maxSize:n,label:r,helperText:i,errorMessage:o,colorScheme:s="blue",isInvalid:l=!1,isDisabled:u=!1,onChange:d,dropzoneTitle:c="Click or drag to upload",id:h}){const[p,m]=S.useState(!1),[g,x]=S.useState([]),y=S.useRef(null),b=D=>{D.preventDefault(),u||m(!0)},T=D=>{D.preventDefault(),u||m(!0)},w=D=>{D.preventDefault(),m(!1)},[A,E]=S.useState(null),C=D=>{if(!D||D.length===0)return;const N=Array.from(D);E(null);const P=N.find(M=>n&&M.size>n);if(P&&n){const M=Math.round(n/1048576);E(`File "${P.name}" exceeds the maximum limit of ${M}MB.`)}const I=N.filter(M=>!(n&&M.size>n));I.length>0&&(x(I.map(M=>M.name)),d==null||d(I))},O=D=>{D.preventDefault(),m(!1),!u&&C(D.dataTransfer.files)},B=D=>{C(D.target.files),D.target.value=""},F=s==="purple"?"purple.500":"blue.500",L=l?"red.500":p?F:"border",R=p?"bg.subtle":"transparent";return a.jsxs(f.Box,{w:"100%",children:[r&&a.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r}),a.jsxs(f.Box,{position:"relative",border:"1.5px dashed",borderColor:L,borderRadius:"xl",bg:R,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:u?.5:1,cursor:u?"not-allowed":"pointer",_hover:u?void 0:{borderColor:F,bg:"bg.subtle"},onDragEnter:b,onDragOver:T,onDragLeave:w,onDrop:O,onClick:()=>{var D;return!u&&((D=y.current)==null?void 0:D.click())},children:[a.jsx("input",{ref:y,id:h,type:"file",accept:e,multiple:t,disabled:u,style:{display:"none"},onChange:B}),a.jsx(f.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:wp}),a.jsx(f.Text,{fontSize:"sm",fontWeight:"medium",color:p?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:c}),a.jsxs(f.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`]}),g.length>0&&a.jsxs(f.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[a.jsxs(f.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",g.length>1?"s":"",":"]}),g.map((D,N)=>a.jsx(f.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:D},N))]})]}),(i||o||A)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:l||A?"red.500":"text.muted",fontFamily:"var(--font-body)",children:A||(l?o:i)})]})}const ua={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"}},da={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 eu({value:e=[],onChange:t,placeholder:n="Add tag...",label:r,helperText:i,errorMessage:o,isInvalid:s=!1,colorScheme:l="blue",size:u="md",isDisabled:d=!1,isReadOnly:c=!1,maxTags:h,allowDuplicates:p=!1,addOnBlur:m=!1,delimiter:g=",",id:x,name:y,style:b,className:T}){const w=S.useId(),A=x??w,[E,C]=S.useState(""),[O,B]=S.useState(!1),F=S.useRef(null),L=da[l]??da.blue,R=ua[u]??ua.md,D=U=>{if(d||c)return;const H=U.trim();if(H&&!(h!=null&&e.length>=h)){if(!p&&e.includes(H)){C("");return}t([...e,H]),C("")}},N=U=>{d||c||t(e.filter((H,$)=>$!==U))},P=U=>{U.key==="Enter"||g&&U.key===g?(U.preventDefault(),D(E)):U.key==="Backspace"&&!E&&e.length>0&&N(e.length-1)},I=()=>{B(!1),m&&E.trim()&&D(E)},M=s?"#DC2626":O?L.focusBorder:"var(--medix-form-border)";return a.jsxs(f.Box,{w:"100%",style:b,className:T,children:[r&&a.jsx("label",{htmlFor:A,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:r}),a.jsxs(f.Box,{onClick:()=>{var U;return!d&&((U=F.current)==null?void 0:U.focus())},display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",minH:R.minH,py:R.py,px:R.px,borderRadius:"10px",bg:"bg.surface",cursor:d?"not-allowed":"text",opacity:d?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${M}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[e.map((U,H)=>a.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:R.tagPx,py:R.tagPy,borderRadius:"full",fontSize:R.tagFontSize,fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",whiteSpace:"nowrap",bg:l==="purple"?"purple.50":"blue.50",color:l==="purple"?"purple.700":"blue.700",border:"1px solid",borderColor:l==="purple"?"purple.200":"blue.200",_dark:{bg:l==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:l==="purple"?"purple.300":"blue.300",borderColor:l==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[a.jsx("span",{children:U}),!d&&!c&&a.jsx("button",{type:"button",onClick:$=>{$.stopPropagation(),N(H)},"aria-label":`Remove ${U}`,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:$=>{$.currentTarget.style.opacity="1"},onMouseLeave:$=>{$.currentTarget.style.opacity="0.7"},children:"×"})]},`${U}-${H}`)),!d&&!c&&a.jsx("input",{ref:F,id:A,name:y,type:"text",value:E,onChange:U=>C(U.target.value),onKeyDown:P,onFocus:()=>B(!0),onBlur:I,placeholder:e.length===0?n:"",disabled:d,readOnly:c,style:{flex:1,minWidth:"120px",border:"none",outline:"none",background:"transparent",fontSize:R.fontSize,fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:0}})]}),(i||o)&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?o:i})]})}const Cp=eu;function Un(e){if(!e||typeof document>"u")return e||"";if(!/<[a-z][\s\S]*>/i.test(e))return e;const t=document.createElement("div");t.innerHTML=e;function n(r){if(r.nodeType===Node.TEXT_NODE)return r.textContent||"";if(r.nodeType!==Node.ELEMENT_NODE)return"";const i=r,o=i.tagName.toLowerCase(),s=Array.from(i.childNodes).map(n).join("");switch(o){case"h1":return`# ${s.trim()}
270
+ `,fill:e})})}const To={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},ns=S.forwardRef(({size:e="md",colorScheme:t="blue",leftElement:n,rightElement:r,isInvalid:o,errorMessage:s,...a},l)=>{const u=!!n,c=!!r,d=t==="purple"?"purple.500":"blue.500";return i.jsxs(f.Box,{w:"100%",children:[i.jsxs(f.Box,{position:"relative",children:[u&&i.jsx(f.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n}),i.jsx(f.Input,{ref:l,...To[e],pl:u?"10":To[e].px,pr:c?"10":To[e].px,bg:"bg.surface",border:"1px solid",borderColor:o?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:o?"red.500":d,boxShadow:"none",outline:"none"},_dark:{bg:"bg.surface",borderColor:o?"red.500":"border",color:"text.heading"},...a}),c&&i.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:r})]}),o&&s&&i.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:s})]})});ns.displayName="MedixInput";const rs=S.forwardRef(({placeholder:e="Search…",...t},n)=>i.jsx(ns,{ref:n,type:"search",placeholder:e,leftElement:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[i.jsx("circle",{cx:"11",cy:"11",r:"8"}),i.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));rs.displayName="MedixSearchInput";const su=S.forwardRef(({colorScheme:e="blue",isInvalid:t,errorMessage:n,maxLength:r,showCount:o=!1,onChange:s,value:a,...l},u)=>{const[c,d]=S.useState(typeof a=="string"?a.length:0),h=e==="purple"?"purple.500":"blue.500",p=m=>{d(m.target.value.length),s==null||s(m)};return i.jsxs(f.Box,{w:"100%",children:[i.jsx(f.Textarea,{ref:u,bg:"bg.surface",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:r,value:a,onChange:p,_placeholder:{color:"text.muted"},_focus:{borderColor:t?"red.500":h,boxShadow:"none",outline:"none"},_dark:{bg:"bg.surface",borderColor:t?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...l}),i.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[t&&n?i.jsx(f.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:n}):i.jsx("span",{}),o&&r&&i.jsxs(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[c,"/",r]})]})]})});su.displayName="MedixTextarea";const op={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}};function ip({options:e=[],placeholder:t="Select option...",isInvalid:n=!1,errorMessage:r,size:o="md",colorScheme:s="blue",icon:a,value:l,defaultValue:u,onChange:c,disabled:d=!1,name:h,id:p}){const[m,g]=S.useState(!1),[x,y]=S.useState(""),[v,j]=S.useState(()=>typeof u=="string"?u:Array.isArray(u)&&u.length>0?u[0]:""),w=S.useRef(null),F=S.useRef(null),B=l!==void 0,C=B?typeof l=="string"?l:Array.isArray(l)&&l.length>0?l[0]:"":v,P=e.find(N=>N.value===C);S.useEffect(()=>{function N(O){w.current&&!w.current.contains(O.target)&&g(!1)}return m&&document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[m]),S.useEffect(()=>{if(m){const N=setTimeout(()=>{var O;return(O=F.current)==null?void 0:O.focus()},50);return()=>clearTimeout(N)}else y("")},[m]);const A=N=>{d||(B||j(N),c==null||c(N),g(!1))},E=S.useMemo(()=>{if(!x.trim())return e;const N=x.toLowerCase().trim();return e.filter(O=>O.label.toLowerCase().includes(N))},[e,x]),L=s==="purple"?"#7700CC":"#0685FF",R=n?"#DC2626":m?L:"var(--medix-form-border)",D=op[o];return i.jsxs(f.Box,{w:"100%",position:"relative",zIndex:m?1e3:void 0,ref:w,children:[h&&i.jsx("input",{type:"hidden",name:h,id:p,value:C}),i.jsxs(f.Box,{onClick:()=>!d&&g(!m),display:"flex",alignItems:"center",justifyContent:"space-between",h:D.h,px:D.px,borderRadius:"md",bg:"bg.surface",cursor:d?"not-allowed":"pointer",opacity:d?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${R}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2.5",flex:"1",minW:"0",children:[a&&i.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,children:a}),P?i.jsx(f.Text,{fontSize:D.fontSize,color:"text.heading",fontFamily:"var(--font-body)",truncate:!0,fontWeight:"500",children:P.label}):i.jsx(f.Text,{fontSize:D.fontSize,color:"text.muted",fontFamily:"var(--font-body)",truncate:!0,children:t})]}),i.jsx(f.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",flexShrink:0,style:{transform:m?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:i.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),m&&i.jsxs(f.Box,{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:[e.length>5&&i.jsx(f.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:i.jsxs(f.Box,{position:"relative",display:"flex",alignItems:"center",children:[i.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:[i.jsx("circle",{cx:"11",cy:"11",r:"8"}),i.jsx("path",{d:"m21 21-4.35-4.35"})]}),i.jsx("input",{ref:F,type:"text",placeholder:"Search...",value:x,onChange:N=>y(N.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"}})]})}),i.jsx(f.Box,{overflowY:"auto",flex:"1",py:"1",children:E.length===0?i.jsx(f.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):E.map(N=>{const O=N.value===C;return i.jsxs("button",{type:"button",disabled:N.disabled,onClick:()=>A(N.value),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:O?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:N.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:N.disabled?.5:1,transition:"background 0.1s ease"},onMouseEnter:I=>{N.disabled||(I.currentTarget.style.background="var(--medix-form-bg-subtle)")},onMouseLeave:I=>{N.disabled||(I.currentTarget.style.background=O?"var(--medix-form-bg-subtle)":"transparent")},children:[i.jsx("span",{style:{fontWeight:O?600:400},children:N.label}),O&&i.jsx("span",{style:{color:L,fontWeight:700,fontSize:"14px"},children:"✓"})]},N.value)})})]}),n&&r&&i.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function sp({options:e=[],placeholder:t="Select options...",isInvalid:n=!1,errorMessage:r,size:o="md",colorScheme:s="blue",icon:a,value:l,defaultValue:u,onChange:c,disabled:d=!1,name:h,id:p}){const[m,g]=S.useState(!1),[x,y]=S.useState(""),[v,j]=S.useState(()=>Array.isArray(u)?u:typeof u=="string"&&u?[u]:[]),w=S.useRef(null),F=S.useRef(null),B=l!==void 0,C=B?Array.isArray(l)?l:typeof l=="string"&&l?[l]:[]:v;S.useEffect(()=>{function I(M){w.current&&!w.current.contains(M.target)&&g(!1)}return m&&document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[m]),S.useEffect(()=>{if(m){const I=setTimeout(()=>{var M;return(M=F.current)==null?void 0:M.focus()},50);return()=>clearTimeout(I)}else y("")},[m]);const P=I=>{if(d)return;const H=C.includes(I)?C.filter(W=>W!==I):[...C,I];B||j(H),c==null||c(H)},A=(I,M)=>{if(M.stopPropagation(),d)return;const H=C.filter(W=>W!==I);B||j(H),c==null||c(H)},E=S.useMemo(()=>{if(!x.trim())return e;const I=x.toLowerCase().trim();return e.filter(M=>M.label.toLowerCase().includes(I))},[e,x]),L=s==="purple"?"#7700CC":"#0685FF",R=n?"#DC2626":m?L:"var(--medix-form-border)",D=s==="purple"?"purple.50":"blue.50",N=s==="purple"?"purple.700":"blue.700",O=s==="purple"?"purple.200":"blue.200";return i.jsxs(f.Box,{w:"100%",position:"relative",zIndex:m?1e3:void 0,ref:w,children:[h&&i.jsx("input",{type:"hidden",name:h,id:p,value:C.join(",")}),i.jsxs(f.Box,{onClick:()=>!d&&g(!m),display:"flex",alignItems:"center",justifyContent:"space-between",minH:o==="sm"?"34px":o==="lg"?"48px":"42px",py:"1.5",px:"3",borderRadius:"md",bg:"bg.surface",cursor:d?"not-allowed":"pointer",opacity:d?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${R}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"1.5",flex:"1",minW:"0",children:[a&&i.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",mr:"1",children:a}),C.length===0?i.jsx(f.Text,{fontSize:o==="sm"?"xs":"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}):C.map(I=>{const M=e.find(W=>W.value===I),H=M?M.label:I;return i.jsxs(f.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:D,color:N,border:"1px solid",borderColor:O,_dark:{bg:s==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:s==="purple"?"purple.300":"blue.300",borderColor:s==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[i.jsx("span",{children:H}),!d&&i.jsx("button",{type:"button",onClick:W=>A(I,W),"aria-label":`Remove ${H}`,style:{background:"transparent",border:"none",padding:0,marginLeft:"2px",cursor:"pointer",color:"inherit",fontSize:"13px",lineHeight:1,opacity:.75},onMouseEnter:W=>W.currentTarget.style.opacity="1",onMouseLeave:W=>W.currentTarget.style.opacity="0.75",children:"×"})]},I)})]}),i.jsx(f.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",style:{transform:m?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:i.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),m&&i.jsxs(f.Box,{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:[e.length>5&&i.jsx(f.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:i.jsxs(f.Box,{position:"relative",display:"flex",alignItems:"center",children:[i.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:[i.jsx("circle",{cx:"11",cy:"11",r:"8"}),i.jsx("path",{d:"m21 21-4.35-4.35"})]}),i.jsx("input",{ref:F,type:"text",placeholder:"Search options...",value:x,onChange:I=>y(I.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"}})]})}),i.jsx(f.Box,{overflowY:"auto",flex:"1",py:"1",children:E.length===0?i.jsx(f.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):E.map(I=>{const M=C.includes(I.value);return i.jsxs("button",{type:"button",disabled:I.disabled,onClick:()=>P(I.value),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:M?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:I.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:I.disabled?.5:1,transition:"background 0.1s ease"},onMouseEnter:H=>{I.disabled||(H.currentTarget.style.background="var(--medix-form-bg-subtle)")},onMouseLeave:H=>{I.disabled||(H.currentTarget.style.background=M?"var(--medix-form-bg-subtle)":"transparent")},children:[i.jsx("span",{style:{fontWeight:M?600:400},children:I.label}),M&&i.jsx("span",{style:{color:L,fontWeight:700,fontSize:"14px"},children:"✓"})]},I.value)})})]}),n&&r&&i.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function ap(e){return e.multiple?i.jsx(sp,{...e}):i.jsx(ip,{...e})}const au={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"}},lu=S.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:r,disabled:o=!1,indeterminate:s=!1,children:a,description:l,name:u,value:c,id:d},h)=>{const p=au[e],m=d??S.useId(),[g,x]=S.useState(n),[y,v]=S.useState(!1),j=t!==void 0?t:g,w=B=>{t===void 0&&x(B.target.checked),r==null||r(B.target.checked)},F={width:18,height:18,borderRadius:4,border:`2px solid ${j||s?p.solid:"var(--medix-form-border, #CBD5E1)"}`,background:j||s?p.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 i.jsxs(f.Box,{opacity:o?.55:1,children:[i.jsxs("label",{htmlFor:m,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:o?"not-allowed":"pointer",userSelect:"none"},children:[i.jsx("input",{ref:h,id:m,type:"checkbox",name:u,value:c,checked:j,disabled:o,onChange:w,onFocus:()=>v(!0),onBlur:()=>v(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),i.jsx("span",{style:F,"aria-hidden":"true",children:s?i.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:i.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):j?i.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:i.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),a&&i.jsxs(f.Box,{children:[i.jsx(f.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:a}),l&&i.jsx(f.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]}),!a&&l&&i.jsx(f.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l})]})});lu.displayName="MedixCheckbox";function lp({name:e,value:t,onChange:n,options:r,colorScheme:o="blue",direction:s="column"}){const a=au[o],[l,u]=S.useState(""),c=t!==void 0?t:l,d=h=>{t===void 0&&u(h),n==null||n(h)};return i.jsx(f.Box,{display:"flex",flexDirection:s,gap:s==="row"?"5":"3",role:"radiogroup",children:r.map(h=>{const p=c===h.value;return i.jsx(cp,{option:h,name:e,isSelected:p,onChange:d,solidColor:a.solid,ring:a.ring},h.value)})})}function cp({option:e,name:t,isSelected:n,onChange:r,solidColor:o,ring:s}){const[a,l]=S.useState(!1);return i.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:[i.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>r(e.value),onFocus:()=>l(!0),onBlur:()=>l(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),i.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?o:"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:i.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:o,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),i.jsxs(f.Box,{children:[i.jsx(f.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&i.jsx(f.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const up={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"}},dp={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}},cu=S.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:r=!1,onChange:o,disabled:s=!1,label:a,description:l,name:u,id:c},d)=>{const h=up[e],p=dp[t],m=c??S.useId(),[g,x]=S.useState(r),[y,v]=S.useState(!1),j=n!==void 0?n:g,w=C=>{n===void 0&&x(C.target.checked),o==null||o(C.target.checked)},F={position:"relative",display:"inline-flex",alignItems:"center",width:p.width,height:p.height,borderRadius:p.height,background:j?h.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:"none",cursor:s?"not-allowed":"pointer",flexShrink:0},B={position:"absolute",width:p.thumbSize,height:p.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"none",top:p.thumbOffset,left:j?p.width-p.thumbSize-p.thumbOffset:p.thumbOffset,transition:"left 0.18s ease"};return i.jsxs(f.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:s?.55:1,children:[i.jsxs("label",{htmlFor:m,style:{display:"inline-flex",cursor:s?"not-allowed":"pointer"},children:[i.jsx("input",{ref:d,id:m,type:"checkbox",role:"switch",name:u,checked:j,disabled:s,onChange:w,onFocus:()=>v(!0),onBlur:()=>v(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),i.jsx("span",{style:F,"aria-hidden":"true",children:i.jsx("span",{style:B})})]}),(a||l)&&i.jsxs(f.Box,{children:[a&&i.jsx("label",{htmlFor:m,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:s?"not-allowed":"pointer",userSelect:"none"},children:a}),l&&i.jsx(f.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]})});cu.displayName="MedixSwitch";function fp({id:e,label:t,helperText:n,errorMessage:r,isRequired:o=!1,isDisabled:s=!1,children:a}){const l=!!r;return i.jsxs(f.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:s?.5:1,pointerEvents:s?"none":void 0,w:"100%",children:[t&&i.jsxs(f.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[i.jsx(f.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),o&&i.jsx(f.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),S.cloneElement(a,{id:e,isInvalid:l||void 0}),n&&!l&&i.jsx(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),l&&r&&i.jsx(f.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function uu({length:e=6,value:t,defaultValue:n="",onChange:r,onComplete:o,colorScheme:s="blue",isInvalid:a=!1,isDisabled:l=!1,mask:u=!1,label:c,helperText:d,errorMessage:h}){const[p,m]=S.useState(n),[g,x]=S.useState(null),y=t!==void 0,j=(y?t:p).split("").slice(0,e),w=S.useRef([]),F=a?"#DC2626":"var(--medix-form-border, var(--chakra-colors-border, #E2E8F0))",B=a?"#DC2626":s==="purple"?"#7700CC":"#0685FF",C=(E,L)=>{var R,D,N;if(E.key==="Backspace"){E.preventDefault();const O=[...j];if(O[L]){O[L]="";const I=O.join("");y||m(I),r==null||r(I)}else if(L>0){(R=w.current[L-1])==null||R.focus(),O[L-1]="";const I=O.join("");y||m(I),r==null||r(I)}}else E.key==="ArrowLeft"&&L>0?(D=w.current[L-1])==null||D.focus():E.key==="ArrowRight"&&L<e-1&&((N=w.current[L+1])==null||N.focus())},P=(E,L)=>{var O;const R=E.target.value.replace(/\D/g,""),D=[...j];for(;D.length<e;)D.push("");if(!R){D[L]="";const I=D.join("");y||m(I),r==null||r(I);return}D[L]=R[0];const N=D.join("");y||m(N),r==null||r(N),L<e-1&&((O=w.current[L+1])==null||O.focus()),N.replace(/\s/g,"").length===e&&(o==null||o(N))},A=(E,L)=>{var M;E.preventDefault();const R=E.clipboardData.getData("text").replace(/\D/g,"");if(!R)return;const D=[...j];for(;D.length<e;)D.push("");const N=R.split("").slice(0,e-L);N.forEach((H,W)=>{D[L+W]=H});const O=D.join("");y||m(O),r==null||r(O);const I=O.replace(/\s/g,"").length===e?e-1:Math.min(L+N.length,e-1);(M=w.current[I])==null||M.focus(),O.replace(/\s/g,"").length===e&&(o==null||o(O))};return i.jsxs(f.Box,{w:"fit-content",children:[c&&i.jsx(f.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:c}),i.jsx(f.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((E,L)=>i.jsx("input",{ref:R=>{w.current[L]=R},type:u?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:j[L]??"",onChange:R=>P(R,L),onKeyDown:R=>C(R,L),onPaste:R=>A(R,L),onFocus:R=>{R.target.select(),x(L)},onBlur:()=>x(null),disabled:l,"aria-label":`Digit ${L+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${g===L?B:F}`,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:l?"not-allowed":"text",opacity:l?.5:1}},L))}),(d||h)&&i.jsx(f.Text,{mt:"2",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?h:d})]})}const hp=uu;function $r(){return $r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$r.apply(this,arguments)}function pp(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var mp=["cdnSuffix","cdnUrl","countryCode","style","svg"],gp="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",xp="svg",yp=127397,ma=function(t){var n=t.cdnSuffix,r=n===void 0?xp:n,o=t.cdnUrl,s=o===void 0?gp:o,a=t.countryCode,l=t.style,u=t.svg,c=u===void 0?!1:u,d=pp(t,mp);if(typeof a!="string")return null;if(c){var h=""+s+a.toLowerCase()+"."+r;return S.createElement("img",Object.assign({},d,{src:h,style:$r({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},l)}))}var p=a.toUpperCase().replace(/./g,function(m){return String.fromCodePoint(m.charCodeAt(0)+yp)});return S.createElement("span",Object.assign({role:"img"},d,{style:$r({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},l)}),p)};const bp={"+1":"US","+7":"RU","+39":"IT","+44":"GB","+47":"NO","+212":"MA","+262":"RE","+290":"SH","+358":"FI","+590":"GP","+599":"CW"},Ht=[{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 vp({value:e="",onChange:t,showCountryCode:n=!0,showCountryFlag:r=!0,defaultCountryCode:o="+234",defaultCountry:s,placeholder:a="80 000 0000",colorScheme:l="blue",isInvalid:u=!1,errorMessage:c,label:d,helperText:h,isDisabled:p=!1,id:m}){const g=S.useId(),x=m??g,y=s??(o?bp[o]:void 0),v=(y?Ht.find(Y=>Y.country===y):void 0)??Ht.find(Y=>Y.code===o)??Ht.find(Y=>Y.country==="NG")??Ht[0],[j,w]=S.useState(v.country),[F,B]=S.useState(e),[C,P]=S.useState(!1),[A,E]=S.useState(!1),[L,R]=S.useState(""),D=S.useRef(null),N=S.useRef(null),O=Ht.find(Y=>Y.country===j)??v;S.useEffect(()=>{function Y(oe){D.current&&!D.current.contains(oe.target)&&E(!1)}return A&&document.addEventListener("mousedown",Y),()=>{document.removeEventListener("mousedown",Y)}},[A]),S.useEffect(()=>{if(A){const Y=setTimeout(()=>{var oe;(oe=N.current)==null||oe.focus()},50);return()=>clearTimeout(Y)}else R("")},[A]);const I=S.useMemo(()=>{if(!L.trim())return Ht;const Y=L.toLowerCase().trim();return Ht.filter(oe=>oe.name.toLowerCase().includes(Y)||oe.code.toLowerCase().includes(Y)||oe.country.toLowerCase().includes(Y))},[L]),M=Y=>{const oe=Y.target.value.replace(/[^\d\s\-]/g,"");B(oe),t==null||t(`${O.code}${oe.replace(/\s/g,"")}`)},H=Y=>{w(Y.country),t==null||t(`${Y.code}${F.replace(/\s/g,"")}`),E(!1)},$=u?"#DC2626":C||A?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return i.jsxs(f.Box,{w:"100%",children:[d&&i.jsx("label",{htmlFor:x,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:d}),i.jsxs(f.Box,{display:"flex",alignItems:"center",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:p?.5:1,pointerEvents:p?"none":void 0,position:"relative",zIndex:A?1e3:void 0,style:{border:`1.5px solid ${$}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[n&&i.jsxs(f.Box,{position:"relative",ref:D,h:"full",children:[i.jsxs("button",{id:`${x}-country`,type:"button",onClick:()=>!p&&E(!A),disabled:p,"aria-label":"Select country code","aria-expanded":A,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:p?"not-allowed":"pointer",height:"100%",color:"var(--medix-form-text)",fontFamily:"var(--font-body)",fontSize:"14px",fontWeight:500},children:[r&&i.jsx(f.Box,{display:"flex",alignItems:"center",fontSize:"lg",lineHeight:"1",children:i.jsx(ma,{countryCode:O.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),i.jsx("span",{children:O.code}),i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:A?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease",opacity:.7},children:i.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),A&&i.jsxs(f.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:[i.jsx(f.Box,{p:"2.5",color:"text.heading",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:i.jsxs(f.Box,{color:"text.heading",position:"relative",display:"flex",alignItems:"center",children:[i.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:[i.jsx("circle",{cx:"11",cy:"11",r:"8"}),i.jsx("path",{d:"m21 21-4.35-4.35"})]}),i.jsx("input",{ref:N,type:"text",placeholder:"Search country or code...",value:L,onChange:Y=>R(Y.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"}})]})}),i.jsx(f.Box,{overflowY:"auto",flex:"1",py:"1",children:I.length===0?i.jsx(f.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No country found"}):I.map(Y=>{const oe=Y.country===O.country;return i.jsxs("button",{type:"button",onClick:()=>H(Y),style:{display:"flex",width:"100%",alignItems:"center",gap:"10px",padding:"8px 14px",background:oe?"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:T=>{T.currentTarget.style.background="var(--medix-form-bg-subtle)"},onMouseLeave:T=>{T.currentTarget.style.background=oe?"var(--medix-form-bg-subtle)":"transparent"},children:[i.jsx(f.Box,{display:"flex",alignItems:"center",fontSize:"md",flexShrink:0,children:i.jsx(ma,{countryCode:Y.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),i.jsx(f.Text,{flex:"1",truncate:!0,fontWeight:oe?"600":"400",children:Y.name}),i.jsx(f.Text,{fontSize:"xs",color:"text.muted",flexShrink:0,children:Y.code})]},`${Y.country}-${Y.code}`)})})]})]}),i.jsx("input",{id:x,type:"tel",value:F,onChange:M,onFocus:()=>P(!0),onBlur:()=>P(!1),placeholder:a,disabled:p,"aria-invalid":u,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||c)&&i.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?c:h})]})}const kp=["MON","TUES","WED","THURS","FRI","SAT","SUN"],wp=["January","February","March","April","May","June","July","August","September","October","November","December"],Sp=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Nn=12;function li(e,t){return new Date(e,t+1,0).getDate()}function Cp(e,t){return new Date(e,t,1).getDay()}function jp(e){return e===0?6:e-1}function ga(e,t,n,r,o){const s=new Date(n,t,e);if(r){const a=new Date(r.getFullYear(),r.getMonth(),r.getDate());if(s<a)return!0}if(o){const a=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(s>a)return!0}return!1}function Tp(e,t,n,r){const o=li(t,e),s=new Date(t,e,1),a=new Date(t,e,o);if(n){const l=new Date(n.getFullYear(),n.getMonth(),n.getDate());if(a<l)return!0}if(r){const l=new Date(r.getFullYear(),r.getMonth(),r.getDate());if(s>l)return!0}return!1}function Bp(e,t,n){return!!(t&&e<t.getFullYear()||n&&e>n.getFullYear())}function os({value:e,onChange:t,minDate:n,maxDate:r,colorScheme:o="blue",...s}){const a=o==="purple"?"#7700CC":"#0685FF",l=o==="purple"?"rgba(119,0,204,0.14)":"rgba(6,133,255,0.14)",[u,c]=S.useState(()=>e?new Date(e):new Date),[d,h]=S.useState("day"),[p,m]=S.useState(0);S.useEffect(()=>{e&&c($=>{const b=new Date(e);return $.getFullYear()===b.getFullYear()&&$.getMonth()===b.getMonth()?$:b})},[e]);const g=u.getFullYear(),x=u.getMonth(),v=Math.floor(g/Nn)*Nn+p*Nn,j=v+Nn-1,w=!n||g>n.getFullYear()||g===n.getFullYear()&&x>n.getMonth(),F=!r||g<r.getFullYear()||g===r.getFullYear()&&x<r.getMonth(),B=()=>{c(new Date(g,x-1,1))},C=()=>{c(new Date(g,x+1,1))},P=()=>{const $=new Date;c($),h("day"),t&&!ga($.getDate(),$.getMonth(),$.getFullYear(),n,r)&&t($)},A=$=>{c(new Date(g,$,1)),h("day")},E=$=>{c(new Date($,x,1)),m(0),h("month")},L=li(g,x),R=jp(Cp(g,x)),D=li(g,x-1),O=(R+L>35?42:35)-(R+L),I=($,b,Y)=>e?e.getDate()===$&&e.getMonth()===b&&e.getFullYear()===Y:!1,M=()=>{const $=[];for(let b=0;b<R;b++){const Y=D-R+b+1;$.push(i.jsx(Bo,{day:Y,isMuted:!0,accentColor:a},`prev-${b}`))}for(let b=1;b<=L;b++){const Y=ga(b,x,g,n,r);$.push(i.jsx(Bo,{day:b,isActive:I(b,x,g),isDisabled:Y,accentColor:a,accentLight:l,onClick:Y?void 0:()=>t==null?void 0:t(new Date(g,x,b))},`curr-${b}`))}for(let b=1;b<=O;b++)$.push(i.jsx(Bo,{day:b,isMuted:!0,accentColor:a},`next-${b}`));return $},H=()=>i.jsx(f.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",mt:"2",children:Sp.map(($,b)=>{const Y=b===x,oe=Tp(b,g,n,r);return i.jsx(ya,{label:$,isActive:Y,isDisabled:oe,accentColor:a,accentLight:l,onClick:()=>!oe&&A(b)},$)})}),W=()=>{const $=Array.from({length:Nn},(b,Y)=>v+Y);return i.jsxs(i.Fragment,{children:[i.jsxs(f.Flex,{justify:"space-between",align:"center",mb:"3",children:[i.jsx(wr,{direction:"prev",enabled:!0,accentColor:a,onClick:()=>m(b=>b-1),ariaLabel:"Previous years"}),i.jsxs(f.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:[v," – ",j]}),i.jsx(wr,{direction:"next",enabled:!0,accentColor:a,onClick:()=>m(b=>b+1),ariaLabel:"Next years"})]}),i.jsx(f.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",children:$.map(b=>{const Y=b===g,oe=Bp(b,n,r);return i.jsx(ya,{label:String(b),isActive:Y,isDisabled:oe,accentColor:a,accentLight:l,onClick:()=>!oe&&E(b)},b)})})]})};return i.jsxs(f.Box,{w:"100%",maxW:"360px",bg:"bg.surface",borderRadius:"card",p:"5",fontFamily:"var(--font-body)",...s,children:[i.jsxs(f.Flex,{justify:"space-between",align:"center",mb:d==="day"?"6":"4",children:[i.jsxs(f.Flex,{align:"center",gap:"1",children:[d==="day"&&i.jsx(wr,{direction:"prev",enabled:w,accentColor:a,onClick:B,ariaLabel:"Go to previous month"}),i.jsx(xa,{label:wp[x],isActive:d==="month",accentColor:a,accentLight:l,onClick:()=>{h($=>$==="month"?"day":"month"),m(0)}}),i.jsx(xa,{label:String(g),isActive:d==="year",accentColor:a,accentLight:l,onClick:()=>{h($=>$==="year"?"day":"year"),m(0)}}),d==="day"&&i.jsx(wr,{direction:"next",enabled:F,accentColor:a,onClick:C,ariaLabel:"Go to next month"})]}),i.jsx(f.Box,{as:"button",type:"button",onClick:P,px:"3",py:"1",fontSize:"sm",fontWeight:"medium",borderRadius:"md",border:"1px solid",borderColor:"border",color:"text.heading",_hover:{bg:"bg.subtle"},children:"Today"})]}),d==="day"&&i.jsxs(i.Fragment,{children:[i.jsx(f.Flex,{mb:"3",children:kp.map($=>i.jsx(f.Box,{flex:"1",textAlign:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:$},$))}),i.jsx(f.Box,{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gapY:"2",children:M()})]}),d==="month"&&H(),d==="year"&&W()]})}function wr({enabled:e,onClick:t,direction:n,accentColor:r,ariaLabel:o}){return i.jsx(f.Box,{as:"button",type:"button","aria-label":o??(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",cursor:e?"pointer":"not-allowed",color:e?"text.heading":"text.muted",opacity:e?1:.35,p:"0",flexShrink:0,_hover:e?{color:r,bg:"bg.subtle"}:void 0,transition:"all 0.15s",children:i.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"?i.jsx("path",{d:"M15 18l-6-6 6-6"}):i.jsx("path",{d:"M9 18l6-6-6-6"})})})}function xa({label:e,isActive:t,accentColor:n,accentLight:r,onClick:o}){return i.jsxs(f.Box,{as:"button",type:"button",onClick:o,title:t?"Click to collapse":"Click to browse",display:"inline-flex",alignItems:"center",gap:"0.5",px:"2",py:"0.5",borderRadius:"md",bg:t?r:"transparent",color:t?n:"text.heading",fontWeight:"semibold",fontSize:"15px",fontFamily:"var(--font-body)",cursor:"pointer",lineHeight:"1.4",_hover:t?void 0:{bg:r,color:n},transition:"all 0.15s",children:[e,i.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:i.jsx("path",{d:"M6 9l6 6 6-6"})})]})}function ya({label:e,isActive:t,isDisabled:n,accentColor:r,accentLight:o,onClick:s}){return i.jsx(f.Box,{as:"button",type:"button",onClick:n?void 0:s,disabled:n,display:"flex",alignItems:"center",justifyContent:"center",h:"10",borderRadius:"md",border:"1.5px solid",borderColor:t?r:"transparent",bg:t?r:"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:o,color:r,borderColor:r}:void 0,transition:"all 0.15s",children:e})}function Bo({day:e,isActive:t,isMuted:n,isDisabled:r,accentColor:o,accentLight:s,onClick:a}){return i.jsx(f.Flex,{justify:"center",align:"center",h:"10",children:i.jsx(f.Box,{as:"button",type:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"full",fontSize:"sm",fontWeight:"medium",onClick:a,disabled:n||r,cursor:n?"default":r?"not-allowed":"pointer",opacity:r?.35:1,style:{background:t?o:"transparent",color:t?"#ffffff":void 0,transition:"background 0.15s, color 0.15s"},color:t?void 0:n||r?"text.muted":"text.heading",_hover:!n&&!r&&!t?{bg:s,color:o}:void 0,transition:"all 0.2s",children:e})})}function Ep({value:e,onChange:t,min:n,max:r,label:o,helperText:s,errorMessage:a,colorScheme:l="blue",isInvalid:u=!1,isDisabled:c=!1,placeholder:d="Select date",id:h,includeTime:p=!1}){const[m,g]=S.useState(!1),x=S.useRef(null),y=E=>E!=null&&E.includes("T")&&E.split("T")[1].slice(0,5)||"00:00";S.useEffect(()=>{function E(L){x.current&&!x.current.contains(L.target)&&g(!1)}return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]);const j=u?"#DC2626":m?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",w="none",F=E=>{const L=E.getFullYear(),R=String(E.getMonth()+1).padStart(2,"0"),D=String(E.getDate()).padStart(2,"0");p?t==null||t(`${L}-${R}-${D}T${y(e)}`):(t==null||t(`${L}-${R}-${D}`),g(!1))},B=E=>{const L=E.target.value,R=(e==null?void 0:e.split("T")[0])??"";R&&(t==null||t(`${R}T${L}`))},C=E=>{if(!E)return;const[L,R,D]=E.split("-"),N=Number(L),O=Number(R),I=Number(D==null?void 0:D.split("T")[0]);if(!Number.isInteger(N)||!Number.isInteger(O)||!Number.isInteger(I))return;const M=new Date(N,O-1,I);if(!(M.getFullYear()!==N||M.getMonth()!==O-1||M.getDate()!==I))return M},P=C(e==null?void 0:e.split("T")[0]),A=P&&!isNaN(P.getTime())?p&&(e!=null&&e.includes("T"))?`${P.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})} ${e.split("T")[1].slice(0,5)}`:P.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return i.jsxs(f.Box,{w:"100%",position:"relative",zIndex:m?1e3:void 0,ref:x,children:[o&&i.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),i.jsxs(f.Box,{position:"relative",children:[i.jsx("input",{id:h,readOnly:!0,type:"text",value:A,placeholder:d,disabled:c,"aria-invalid":u,"aria-haspopup":"dialog","aria-expanded":m,onClick:()=>!c&&g(!m),onKeyDown:E=>{c||(E.key==="Enter"||E.key===" "||E.key==="ArrowDown"?(E.preventDefault(),g(!0)):E.key==="Escape"&&g(!1))},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${j}`,boxShadow:w,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:c?"not-allowed":"pointer",opacity:c?.5:1,colorScheme:"auto"}}),i.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),i.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),i.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),i.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})})]}),m&&i.jsxs(f.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:[i.jsx(os,{value:P,onChange:F,minDate:C(n),maxDate:C(r),colorScheme:l}),p&&i.jsxs(f.Box,{px:"5",pb:"4",borderTop:"1px solid",borderColor:"border",children:[i.jsx(f.Text,{fontSize:"xs",fontWeight:"medium",color:"text.muted",mb:"1.5",fontFamily:"var(--font-body)",children:"Time"}),i.jsx("input",{type:"time",value:y(e),onChange:B,disabled:!P,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:P?1:.4,cursor:P?"default":"not-allowed",colorScheme:"auto"}})]})]}),(s||a)&&i.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?a:s})]})}function Fp({startValue:e,onStartChange:t,endValue:n,onEndChange:r,min:o,max:s,label:a,helperText:l,errorMessage:u,colorScheme:c="blue",isInvalid:d=!1,isDisabled:h=!1,startPlaceholder:p="Start date",endPlaceholder:m="End date",id:g}){const[x,y]=S.useState(null),v=S.useRef(null);S.useEffect(()=>{function M(H){v.current&&!v.current.contains(H.target)&&y(null)}return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]);const w=d?"#DC2626":x?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",F="none",B={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%"},C=M=>{const H=M.getFullYear(),W=String(M.getMonth()+1).padStart(2,"0"),$=String(M.getDate()).padStart(2,"0");return`${H}-${W}-${$}`},P=M=>o&&M<o?o:s&&M>s?s:M,A=M=>{const H=P(C(M));x==="start"?(t==null||t(H),n&&n<H&&(r==null||r("")),y("end")):x==="end"&&(r==null||r(H),e&&e>H&&(t==null||t("")),y(null))},E=M=>{if(!M)return;const[H,W,$]=M.split("-").map(Number);if(!H||W<1||W>12||$<1||$>31)return;const b=new Date(H,W-1,$);if(!(b.getFullYear()!==H||b.getMonth()!==W-1||b.getDate()!==$))return b},R=E(x==="start"?e:n),D=E(e),N=E(n),O=D?D.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",I=N?N.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return i.jsxs(f.Box,{w:"100%",position:"relative",zIndex:x?1e3:void 0,ref:v,children:[a&&i.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),i.jsxs(f.Box,{display:"flex",alignItems:"center",position:"relative",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${w}`,boxShadow:F,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:h?.5:1,overflow:"hidden"},children:[i.jsx("input",{id:g,readOnly:!0,type:"text",value:O,placeholder:p,disabled:h,"aria-invalid":d,"aria-haspopup":"dialog","aria-expanded":x==="start",onClick:()=>!h&&y("start"),onKeyDown:M=>{h||(M.key==="Enter"||M.key===" "||M.key==="ArrowDown"?(M.preventDefault(),y("start")):M.key==="Escape"&&y(null))},style:{...B,textAlign:"center"}}),i.jsx(f.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),i.jsx("input",{readOnly:!0,type:"text",value:I,placeholder:m,disabled:h,"aria-invalid":d,"aria-haspopup":"dialog","aria-expanded":x==="end",onClick:()=>!h&&y("end"),onKeyDown:M=>{h||(M.key==="Enter"||M.key===" "||M.key==="ArrowDown"?(M.preventDefault(),y("end")):M.key==="Escape"&&y(null))},style:{...B,textAlign:"center"}})]}),x&&i.jsx(f.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:i.jsx(os,{value:R,onChange:A,minDate:x==="end"?D??E(o):E(o),maxDate:E(s),colorScheme:c})}),(l||u)&&i.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:d?"red.500":"text.muted",fontFamily:"var(--font-body)",children:d?u:l})]})}const Ap=i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("polyline",{points:"6 9 12 15 18 9"})});function Lp({options:e,value:t,onChange:n,placeholder:r="Search...",label:o,helperText:s,errorMessage:a,colorScheme:l="blue",isInvalid:u=!1,isDisabled:c=!1}){const[d,h]=S.useState(!1),[p,m]=S.useState(""),g=S.useRef(null);S.useEffect(()=>{if(t){const w=e.find(F=>F.value===t);w&&m(w.label)}},[t,e]),S.useEffect(()=>{function w(F){if(g.current&&!g.current.contains(F.target))if(h(!1),t){const B=e.find(C=>C.value===t);B&&m(B.label)}else m("")}return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[t,e]);const x=e.filter(w=>w.label.toLowerCase().includes(p.toLowerCase())),v=u?"#DC2626":d?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return i.jsxs(f.Box,{w:"100%",position:"relative",zIndex:d?1e3:void 0,ref:g,children:[o&&i.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),i.jsxs(f.Box,{position:"relative",children:[i.jsx("input",{type:"text",value:p,placeholder:r,disabled:c,onChange:w=>{m(w.target.value),h(!0),w.target.value||n==null||n("")},onFocus:()=>h(!0),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${v}`,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:c?"not-allowed":"text",opacity:c?.5:1}}),i.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:Ap})]}),d&&!c&&i.jsx(f.Box,{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:x.length>0?x.map(w=>i.jsx(f.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{n==null||n(w.value),m(w.label),h(!1)},children:w.label},w.value)):i.jsx(f.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(s||a)&&i.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?a:s})]})}const Ip=i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),i.jsx("polyline",{points:"17 8 12 3 7 8"}),i.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function Dp({accept:e,multiple:t=!1,maxSize:n,label:r,helperText:o,errorMessage:s,colorScheme:a="blue",isInvalid:l=!1,isDisabled:u=!1,onChange:c,dropzoneTitle:d="Click or drag to upload",id:h}){const[p,m]=S.useState(!1),[g,x]=S.useState([]),y=S.useRef(null),v=D=>{D.preventDefault(),u||m(!0)},j=D=>{D.preventDefault(),u||m(!0)},w=D=>{D.preventDefault(),m(!1)},[F,B]=S.useState(null),C=D=>{if(!D||D.length===0)return;const N=Array.from(D);B(null);const O=N.find(M=>n&&M.size>n);if(O&&n){const M=Math.round(n/1048576);B(`File "${O.name}" exceeds the maximum limit of ${M}MB.`)}const I=N.filter(M=>!(n&&M.size>n));I.length>0&&(x(I.map(M=>M.name)),c==null||c(I))},P=D=>{D.preventDefault(),m(!1),!u&&C(D.dataTransfer.files)},A=D=>{C(D.target.files),D.target.value=""},E=a==="purple"?"purple.500":"blue.500",L=l?"red.500":p?E:"border",R=p?"bg.subtle":"transparent";return i.jsxs(f.Box,{w:"100%",children:[r&&i.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r}),i.jsxs(f.Box,{position:"relative",border:"1.5px dashed",borderColor:L,borderRadius:"xl",bg:R,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:u?.5:1,cursor:u?"not-allowed":"pointer",_hover:u?void 0:{borderColor:E,bg:"bg.subtle"},onDragEnter:v,onDragOver:j,onDragLeave:w,onDrop:P,onClick:()=>{var D;return!u&&((D=y.current)==null?void 0:D.click())},children:[i.jsx("input",{ref:y,id:h,type:"file",accept:e,multiple:t,disabled:u,style:{display:"none"},onChange:A}),i.jsx(f.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:Ip}),i.jsx(f.Text,{fontSize:"sm",fontWeight:"medium",color:p?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:d}),i.jsxs(f.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`]}),g.length>0&&i.jsxs(f.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[i.jsxs(f.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",g.length>1?"s":"",":"]}),g.map((D,N)=>i.jsx(f.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:D},N))]})]}),(o||s||F)&&i.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:l||F?"red.500":"text.muted",fontFamily:"var(--font-body)",children:F||(l?s:o)})]})}const ba={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"}},va={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 du({value:e=[],onChange:t,placeholder:n="Add tag...",label:r,helperText:o,errorMessage:s,isInvalid:a=!1,colorScheme:l="blue",size:u="md",isDisabled:c=!1,isReadOnly:d=!1,maxTags:h,allowDuplicates:p=!1,addOnBlur:m=!1,delimiter:g=",",id:x,name:y,style:v,className:j}){const w=S.useId(),F=x??w,[B,C]=S.useState(""),[P,A]=S.useState(!1),E=S.useRef(null),L=va[l]??va.blue,R=ba[u]??ba.md,D=H=>{if(c||d)return;const W=H.trim();if(W&&!(h!=null&&e.length>=h)){if(!p&&e.includes(W)){C("");return}t([...e,W]),C("")}},N=H=>{c||d||t(e.filter((W,$)=>$!==H))},O=H=>{H.key==="Enter"||g&&H.key===g?(H.preventDefault(),D(B)):H.key==="Backspace"&&!B&&e.length>0&&N(e.length-1)},I=()=>{A(!1),m&&B.trim()&&D(B)},M=a?"#DC2626":P?L.focusBorder:"var(--medix-form-border)";return i.jsxs(f.Box,{w:"100%",style:v,className:j,children:[r&&i.jsx("label",{htmlFor:F,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:r}),i.jsxs(f.Box,{onClick:()=>{var H;return!c&&((H=E.current)==null?void 0:H.focus())},display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",minH:R.minH,py:R.py,px:R.px,borderRadius:"10px",bg:"bg.surface",cursor:c?"not-allowed":"text",opacity:c?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${M}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[e.map((H,W)=>i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:R.tagPx,py:R.tagPy,borderRadius:"full",fontSize:R.tagFontSize,fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",whiteSpace:"nowrap",bg:l==="purple"?"purple.50":"blue.50",color:l==="purple"?"purple.700":"blue.700",border:"1px solid",borderColor:l==="purple"?"purple.200":"blue.200",_dark:{bg:l==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:l==="purple"?"purple.300":"blue.300",borderColor:l==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[i.jsx("span",{children:H}),!c&&!d&&i.jsx("button",{type:"button",onClick:$=>{$.stopPropagation(),N(W)},"aria-label":`Remove ${H}`,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:$=>{$.currentTarget.style.opacity="1"},onMouseLeave:$=>{$.currentTarget.style.opacity="0.7"},children:"×"})]},`${H}-${W}`)),!c&&!d&&i.jsx("input",{ref:E,id:F,name:y,type:"text",value:B,onChange:H=>C(H.target.value),onKeyDown:O,onFocus:()=>A(!0),onBlur:I,placeholder:e.length===0?n:"",disabled:c,readOnly:d,style:{flex:1,minWidth:"120px",border:"none",outline:"none",background:"transparent",fontSize:R.fontSize,fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:0}})]}),(o||s)&&i.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?s:o})]})}const Rp=du;function Kn(e){if(!e||typeof document>"u")return e||"";if(!/<[a-z][\s\S]*>/i.test(e))return e;const t=document.createElement("div");t.innerHTML=e;function n(r){if(r.nodeType===Node.TEXT_NODE)return r.textContent||"";if(r.nodeType!==Node.ELEMENT_NODE)return"";const o=r,s=o.tagName.toLowerCase(),a=Array.from(o.childNodes).map(n).join("");switch(s){case"h1":return`# ${a.trim()}
271
271
 
272
- `;case"h2":return`## ${s.trim()}
272
+ `;case"h2":return`## ${a.trim()}
273
273
 
274
- `;case"h3":return`### ${s.trim()}
274
+ `;case"h3":return`### ${a.trim()}
275
275
 
276
- `;case"p":return s.trim()?`${s.trim()}
276
+ `;case"p":return a.trim()?`${a.trim()}
277
277
 
278
- `:"";case"strong":case"b":return s.trim()?`**${s}**`:"";case"em":case"i":return s.trim()?`*${s}*`:"";case"u":return s.trim()?`<u>${s}</u>`:"";case"s":case"del":case"strike":return s.trim()?`~~${s}~~`:"";case"blockquote":return`> ${s.trim()}
278
+ `:"";case"strong":case"b":return a.trim()?`**${a}**`:"";case"em":case"i":return a.trim()?`*${a}*`:"";case"u":return a.trim()?`<u>${a}</u>`:"";case"s":case"del":case"strike":return a.trim()?`~~${a}~~`:"";case"blockquote":return`> ${a.trim()}
279
279
 
280
- `;case"ul":return`${Array.from(i.children).map(l=>`- ${n(l).trim()}`).join(`
280
+ `;case"ul":return`${Array.from(o.children).map(l=>`- ${n(l).trim()}`).join(`
281
281
  `)}
282
282
 
283
- `;case"ol":return`${Array.from(i.children).map((l,u)=>`${u+1}. ${n(l).trim()}`).join(`
283
+ `;case"ol":return`${Array.from(o.children).map((l,u)=>`${u+1}. ${n(l).trim()}`).join(`
284
284
  `)}
285
285
 
286
- `;case"li":return s;case"a":{const l=i.getAttribute("href")||"";return`[${s}](${l})`}case"br":return`
287
- `;default:return s}}return n(t).trim()}function $t(e){if(!e)return"<p></p>";if(/<[a-z][\s\S]*>/i.test(e.trim()))return e;const t=e.split(`
288
- `),n=[];let r=!1,i=!1;const o=s=>s.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/__([^_]+)__/g,"<strong>$1</strong>").replace(/\*([^*]+)\*/g,"<em>$1</em>").replace(/_([^_]+)_/g,"<em>$1</em>").replace(/~~([^~]+)~~/g,"<s>$1</s>").replace(/<u>([^<]+)<\/u>/g,"<u>$1</u>");for(let s=0;s<t.length;s++){const l=t[s].trim();if(!l){r&&(n.push("</ul>"),r=!1),i&&(n.push("</ol>"),i=!1);continue}l.startsWith("# ")?(r&&(n.push("</ul>"),r=!1),i&&(n.push("</ol>"),i=!1),n.push(`<h1>${o(l.slice(2))}</h1>`)):l.startsWith("## ")?(r&&(n.push("</ul>"),r=!1),i&&(n.push("</ol>"),i=!1),n.push(`<h2>${o(l.slice(3))}</h2>`)):l.startsWith("### ")?(r&&(n.push("</ul>"),r=!1),i&&(n.push("</ol>"),i=!1),n.push(`<h3>${o(l.slice(4))}</h3>`)):l.startsWith("> ")?(r&&(n.push("</ul>"),r=!1),i&&(n.push("</ol>"),i=!1),n.push(`<blockquote>${o(l.slice(2))}</blockquote>`)):l.startsWith("- ")||l.startsWith("* ")?(i&&(n.push("</ol>"),i=!1),r||(n.push("<ul>"),r=!0),n.push(`<li>${o(l.slice(2))}</li>`)):/^\d+\.\s/.test(l)?(r&&(n.push("</ul>"),r=!1),i||(n.push("<ol>"),i=!0),n.push(`<li>${o(l.replace(/^\d+\.\s/,""))}</li>`)):(r&&(n.push("</ul>"),r=!1),i&&(n.push("</ol>"),i=!1),n.push(`<p>${o(l)}</p>`))}return r&&n.push("</ul>"),i&&n.push("</ol>"),n.join("")}const jp={blue:{base:"#0685FF",ring:"rgba(6, 133, 255, 0.18)",hover:"#057AE8"},purple:{base:"#7700CC",ring:"rgba(119, 0, 204, 0.18)",hover:"#6600B3"}};let fa=!1;function Tp(){if(fa||typeof document>"u")return;fa=!0;const e=document.createElement("style");e.id="medix-rte-styles",e.textContent=`
286
+ `;case"li":return a;case"a":{const l=o.getAttribute("href")||"";return`[${a}](${l})`}case"br":return`
287
+ `;default:return a}}return n(t).trim()}function Yt(e){if(!e)return"<p></p>";if(/<[a-z][\s\S]*>/i.test(e.trim()))return e;const t=e.split(`
288
+ `),n=[];let r=!1,o=!1;const s=a=>a.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/__([^_]+)__/g,"<strong>$1</strong>").replace(/\*([^*]+)\*/g,"<em>$1</em>").replace(/_([^_]+)_/g,"<em>$1</em>").replace(/~~([^~]+)~~/g,"<s>$1</s>").replace(/<u>([^<]+)<\/u>/g,"<u>$1</u>");for(let a=0;a<t.length;a++){const l=t[a].trim();if(!l){r&&(n.push("</ul>"),r=!1),o&&(n.push("</ol>"),o=!1);continue}l.startsWith("# ")?(r&&(n.push("</ul>"),r=!1),o&&(n.push("</ol>"),o=!1),n.push(`<h1>${s(l.slice(2))}</h1>`)):l.startsWith("## ")?(r&&(n.push("</ul>"),r=!1),o&&(n.push("</ol>"),o=!1),n.push(`<h2>${s(l.slice(3))}</h2>`)):l.startsWith("### ")?(r&&(n.push("</ul>"),r=!1),o&&(n.push("</ol>"),o=!1),n.push(`<h3>${s(l.slice(4))}</h3>`)):l.startsWith("> ")?(r&&(n.push("</ul>"),r=!1),o&&(n.push("</ol>"),o=!1),n.push(`<blockquote>${s(l.slice(2))}</blockquote>`)):l.startsWith("- ")||l.startsWith("* ")?(o&&(n.push("</ol>"),o=!1),r||(n.push("<ul>"),r=!0),n.push(`<li>${s(l.slice(2))}</li>`)):/^\d+\.\s/.test(l)?(r&&(n.push("</ul>"),r=!1),o||(n.push("<ol>"),o=!0),n.push(`<li>${s(l.replace(/^\d+\.\s/,""))}</li>`)):(r&&(n.push("</ul>"),r=!1),o&&(n.push("</ol>"),o=!1),n.push(`<p>${s(l)}</p>`))}return r&&n.push("</ul>"),o&&n.push("</ol>"),n.join("")}const Mp={blue:{base:"#0685FF",ring:"rgba(6, 133, 255, 0.18)",hover:"#057AE8"},purple:{base:"#7700CC",ring:"rgba(119, 0, 204, 0.18)",hover:"#6600B3"}};let ka=!1;function Pp(){if(ka||typeof document>"u")return;ka=!0;const e=document.createElement("style");e.id="medix-rte-styles",e.textContent=`
289
289
  .medix-rte-content .tiptap {
290
290
  outline: none;
291
291
  padding: 12px 16px;
@@ -332,38 +332,38 @@
332
332
  .medix-rte-content .tiptap .text-center { text-align: center; }
333
333
  .medix-rte-content .tiptap .text-right { text-align: right; }
334
334
  .medix-rte-content .tiptap .text-justify { text-align: justify; }
335
- `,document.head.appendChild(e)}function Fe({onClick:e,isActive:t,disabled:n,title:r,accentColor:i,children:o}){const[s,l]=S.useState(!1);return a.jsx("button",{type:"button",title:r,onMouseDown:u=>{u.preventDefault(),n||e()},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!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:s?"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:o})}function br(){return a.jsx("div",{style:{width:"1px",height:"18px",background:"var(--medix-form-border)",flexShrink:0,alignSelf:"center",margin:"0 2px"}})}const Bp=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.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"})}),Fp=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"})}),Ep=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.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"})}),Ap=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"})}),Lp=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.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"})}),Ip=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"})}),Dp=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"})}),Rp=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.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"})}),Mp=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.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"})}),Pp=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"})}),Op=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"})}),zp=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"})});function _p({editor:e,accentColor:t,disabled:n}){if(!e)return null;const r=e.isActive("heading",{level:1})?"h1":e.isActive("heading",{level:2})?"h2":e.isActive("heading",{level:3})?"h3":"p",i=o=>{o.preventDefault();const s=o.target.value;if(s==="p")e.chain().focus().setParagraph().run();else{const l=parseInt(s.replace("h",""),10);e.chain().focus().toggleHeading({level:l}).run()}};return a.jsxs("select",{value:r,onChange:i,disabled:n,onMouseDown:o=>o.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:[a.jsx("option",{value:"p",children:"Paragraph"}),a.jsx("option",{value:"h1",children:"Heading 1"}),a.jsx("option",{value:"h2",children:"Heading 2"}),a.jsx("option",{value:"h3",children:"Heading 3"})]})}function Np({currentMode:e,onSelectMode:t,accentColor:n,disabled:r}){return a.jsxs(f.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:[a.jsx("button",{type:"button",disabled:r,onClick:()=>t("wysiwyg"),style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:r?"not-allowed":"pointer",background:e==="wysiwyg"?n:"transparent",color:e==="wysiwyg"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Rich Text"}),a.jsx("button",{type:"button",disabled:r,onClick:()=>t("markdown"),style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:r?"not-allowed":"pointer",background:e==="markdown"?n:"transparent",color:e==="markdown"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Markdown"})]})}function Vp({editor:e,accentColor:t,disabled:n,opts:r,mode:i,showModeToggle:o,onModeChange:s,onInsertMarkdown:l}){const u=()=>{if(!e)return;const d=e.getAttributes("link").href,c=window.prompt("Enter URL",d??"https://");if(c!==null){if(c===""){e.chain().focus().unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:c,target:"_blank"}).run()}};return a.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"1",px:"2",py:"1.5",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",style:{background:"var(--medix-form-bg)",borderBottomColor:"var(--medix-form-border)"},children:[a.jsx(f.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5",children:i==="wysiwyg"&&e?a.jsxs(a.Fragment,{children:[r.headings&&a.jsxs(a.Fragment,{children:[a.jsx(_p,{editor:e,accentColor:t,disabled:n}),a.jsx(br,{})]}),r.bold&&a.jsx(Fe,{onClick:()=>e.chain().focus().toggleBold().run(),isActive:e.isActive("bold"),disabled:n,title:"Bold (Ctrl+B)",accentColor:t,children:a.jsx(Bp,{})}),r.italic&&a.jsx(Fe,{onClick:()=>e.chain().focus().toggleItalic().run(),isActive:e.isActive("italic"),disabled:n,title:"Italic (Ctrl+I)",accentColor:t,children:a.jsx(Fp,{})}),r.underline&&a.jsx(Fe,{onClick:()=>e.chain().focus().toggleUnderline().run(),isActive:e.isActive("underline"),disabled:n,title:"Underline (Ctrl+U)",accentColor:t,children:a.jsx(Ep,{})}),r.strikethrough&&a.jsx(Fe,{onClick:()=>e.chain().focus().toggleStrike().run(),isActive:e.isActive("strike"),disabled:n,title:"Strikethrough",accentColor:t,children:a.jsx(Ap,{})}),(r.bulletList||r.orderedList||r.quote)&&a.jsx(br,{}),r.bulletList&&a.jsx(Fe,{onClick:()=>e.chain().focus().toggleBulletList().run(),isActive:e.isActive("bulletList"),disabled:n,title:"Bullet List",accentColor:t,children:a.jsx(Lp,{})}),r.orderedList&&a.jsx(Fe,{onClick:()=>e.chain().focus().toggleOrderedList().run(),isActive:e.isActive("orderedList"),disabled:n,title:"Ordered List",accentColor:t,children:a.jsx(Ip,{})}),r.quote&&a.jsx(Fe,{onClick:()=>e.chain().focus().toggleBlockquote().run(),isActive:e.isActive("blockquote"),disabled:n,title:"Blockquote",accentColor:t,children:a.jsx(Dp,{})}),r.textAlign&&a.jsxs(a.Fragment,{children:[a.jsx(br,{}),a.jsx(Fe,{onClick:()=>e.chain().focus().setTextAlign("left").run(),isActive:e.isActive({textAlign:"left"}),disabled:n,title:"Align Left",accentColor:t,children:a.jsx(Pp,{})}),a.jsx(Fe,{onClick:()=>e.chain().focus().setTextAlign("center").run(),isActive:e.isActive({textAlign:"center"}),disabled:n,title:"Align Center",accentColor:t,children:a.jsx(Op,{})}),a.jsx(Fe,{onClick:()=>e.chain().focus().setTextAlign("right").run(),isActive:e.isActive({textAlign:"right"}),disabled:n,title:"Align Right",accentColor:t,children:a.jsx(zp,{})})]}),(r.link||r.clearFormat)&&a.jsx(br,{}),r.link&&a.jsx(Fe,{onClick:u,isActive:e.isActive("link"),disabled:n,title:"Insert / Edit Link",accentColor:t,children:a.jsx(Rp,{})}),r.clearFormat&&a.jsx(Fe,{onClick:()=>e.chain().focus().unsetAllMarks().clearNodes().run(),disabled:n,title:"Clear Formatting",accentColor:t,children:a.jsx(Mp,{})})]}):a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",children:[a.jsx(Fe,{onClick:()=>l==null?void 0:l("**bold text**"),disabled:n,title:"Markdown Bold",accentColor:t,children:"**B**"}),a.jsx(Fe,{onClick:()=>l==null?void 0:l("*italic text*"),disabled:n,title:"Markdown Italic",accentColor:t,children:"*I*"}),a.jsx(Fe,{onClick:()=>l==null?void 0:l(`
335
+ `,document.head.appendChild(e)}function Ee({onClick:e,isActive:t,disabled:n,title:r,accentColor:o,children:s}){const[a,l]=S.useState(!1);return i.jsx("button",{type:"button",title:r,onMouseDown:u=>{u.preventDefault(),n||e()},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!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?o:a?"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:s})}function Sr(){return i.jsx("div",{style:{width:"1px",height:"18px",background:"var(--medix-form-border)",flexShrink:0,alignSelf:"center",margin:"0 2px"}})}const Op=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.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"})}),zp=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"})}),_p=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.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"})}),Np=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"})}),Vp=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.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"})}),Wp=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"})}),Hp=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"})}),Up=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.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"})}),$p=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.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"})}),Gp=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"})}),Yp=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"})}),Kp=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"})});function qp({editor:e,accentColor:t,disabled:n}){if(!e)return null;const r=e.isActive("heading",{level:1})?"h1":e.isActive("heading",{level:2})?"h2":e.isActive("heading",{level:3})?"h3":"p",o=s=>{s.preventDefault();const a=s.target.value;if(a==="p")e.chain().focus().setParagraph().run();else{const l=parseInt(a.replace("h",""),10);e.chain().focus().toggleHeading({level:l}).run()}};return i.jsxs("select",{value:r,onChange:o,disabled:n,onMouseDown:s=>s.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:[i.jsx("option",{value:"p",children:"Paragraph"}),i.jsx("option",{value:"h1",children:"Heading 1"}),i.jsx("option",{value:"h2",children:"Heading 2"}),i.jsx("option",{value:"h3",children:"Heading 3"})]})}function Xp({currentMode:e,onSelectMode:t,accentColor:n,disabled:r}){return i.jsxs(f.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:[i.jsx("button",{type:"button",disabled:r,onClick:()=>t("wysiwyg"),style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:r?"not-allowed":"pointer",background:e==="wysiwyg"?n:"transparent",color:e==="wysiwyg"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Rich Text"}),i.jsx("button",{type:"button",disabled:r,onClick:()=>t("markdown"),style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:r?"not-allowed":"pointer",background:e==="markdown"?n:"transparent",color:e==="markdown"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Markdown"})]})}function Zp({editor:e,accentColor:t,disabled:n,opts:r,mode:o,showModeToggle:s,onModeChange:a,onInsertMarkdown:l}){const u=()=>{if(!e)return;const c=e.getAttributes("link").href,d=window.prompt("Enter URL",c??"https://");if(d!==null){if(d===""){e.chain().focus().unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:d,target:"_blank"}).run()}};return i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"1",px:"2",py:"1.5",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",style:{background:"var(--medix-form-bg)",borderBottomColor:"var(--medix-form-border)"},children:[i.jsx(f.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5",children:o==="wysiwyg"&&e?i.jsxs(i.Fragment,{children:[r.headings&&i.jsxs(i.Fragment,{children:[i.jsx(qp,{editor:e,accentColor:t,disabled:n}),i.jsx(Sr,{})]}),r.bold&&i.jsx(Ee,{onClick:()=>e.chain().focus().toggleBold().run(),isActive:e.isActive("bold"),disabled:n,title:"Bold (Ctrl+B)",accentColor:t,children:i.jsx(Op,{})}),r.italic&&i.jsx(Ee,{onClick:()=>e.chain().focus().toggleItalic().run(),isActive:e.isActive("italic"),disabled:n,title:"Italic (Ctrl+I)",accentColor:t,children:i.jsx(zp,{})}),r.underline&&i.jsx(Ee,{onClick:()=>e.chain().focus().toggleUnderline().run(),isActive:e.isActive("underline"),disabled:n,title:"Underline (Ctrl+U)",accentColor:t,children:i.jsx(_p,{})}),r.strikethrough&&i.jsx(Ee,{onClick:()=>e.chain().focus().toggleStrike().run(),isActive:e.isActive("strike"),disabled:n,title:"Strikethrough",accentColor:t,children:i.jsx(Np,{})}),(r.bulletList||r.orderedList||r.quote)&&i.jsx(Sr,{}),r.bulletList&&i.jsx(Ee,{onClick:()=>e.chain().focus().toggleBulletList().run(),isActive:e.isActive("bulletList"),disabled:n,title:"Bullet List",accentColor:t,children:i.jsx(Vp,{})}),r.orderedList&&i.jsx(Ee,{onClick:()=>e.chain().focus().toggleOrderedList().run(),isActive:e.isActive("orderedList"),disabled:n,title:"Ordered List",accentColor:t,children:i.jsx(Wp,{})}),r.quote&&i.jsx(Ee,{onClick:()=>e.chain().focus().toggleBlockquote().run(),isActive:e.isActive("blockquote"),disabled:n,title:"Blockquote",accentColor:t,children:i.jsx(Hp,{})}),r.textAlign&&i.jsxs(i.Fragment,{children:[i.jsx(Sr,{}),i.jsx(Ee,{onClick:()=>e.chain().focus().setTextAlign("left").run(),isActive:e.isActive({textAlign:"left"}),disabled:n,title:"Align Left",accentColor:t,children:i.jsx(Gp,{})}),i.jsx(Ee,{onClick:()=>e.chain().focus().setTextAlign("center").run(),isActive:e.isActive({textAlign:"center"}),disabled:n,title:"Align Center",accentColor:t,children:i.jsx(Yp,{})}),i.jsx(Ee,{onClick:()=>e.chain().focus().setTextAlign("right").run(),isActive:e.isActive({textAlign:"right"}),disabled:n,title:"Align Right",accentColor:t,children:i.jsx(Kp,{})})]}),(r.link||r.clearFormat)&&i.jsx(Sr,{}),r.link&&i.jsx(Ee,{onClick:u,isActive:e.isActive("link"),disabled:n,title:"Insert / Edit Link",accentColor:t,children:i.jsx(Up,{})}),r.clearFormat&&i.jsx(Ee,{onClick:()=>e.chain().focus().unsetAllMarks().clearNodes().run(),disabled:n,title:"Clear Formatting",accentColor:t,children:i.jsx($p,{})})]}):i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",children:[i.jsx(Ee,{onClick:()=>l==null?void 0:l("**bold text**"),disabled:n,title:"Markdown Bold",accentColor:t,children:"**B**"}),i.jsx(Ee,{onClick:()=>l==null?void 0:l("*italic text*"),disabled:n,title:"Markdown Italic",accentColor:t,children:"*I*"}),i.jsx(Ee,{onClick:()=>l==null?void 0:l(`
336
336
  # Heading 1
337
- `),disabled:n,title:"Markdown H1",accentColor:t,children:"# H1"}),a.jsx(Fe,{onClick:()=>l==null?void 0:l(`
337
+ `),disabled:n,title:"Markdown H1",accentColor:t,children:"# H1"}),i.jsx(Ee,{onClick:()=>l==null?void 0:l(`
338
338
  ## Heading 2
339
- `),disabled:n,title:"Markdown H2",accentColor:t,children:"## H2"}),a.jsx(Fe,{onClick:()=>l==null?void 0:l(`
339
+ `),disabled:n,title:"Markdown H2",accentColor:t,children:"## H2"}),i.jsx(Ee,{onClick:()=>l==null?void 0:l(`
340
340
  - List item
341
- `),disabled:n,title:"Markdown Bullet List",accentColor:t,children:"- List"}),a.jsx(Fe,{onClick:()=>l==null?void 0:l("[link text](https://example.com)"),disabled:n,title:"Markdown Link",accentColor:t,children:"[Link]"}),a.jsx(Fe,{onClick:()=>l==null?void 0:l(`
341
+ `),disabled:n,title:"Markdown Bullet List",accentColor:t,children:"- List"}),i.jsx(Ee,{onClick:()=>l==null?void 0:l("[link text](https://example.com)"),disabled:n,title:"Markdown Link",accentColor:t,children:"[Link]"}),i.jsx(Ee,{onClick:()=>l==null?void 0:l(`
342
342
  > Blockquote
343
- `),disabled:n,title:"Markdown Blockquote",accentColor:t,children:"> Quote"})]})}),o&&a.jsx(Np,{currentMode:i,onSelectMode:s,accentColor:t,disabled:n})]})}const Hp={bold:!0,italic:!0,underline:!0,strikethrough:!0,headings:!0,bulletList:!0,orderedList:!0,quote:!0,link:!0,textAlign:!0,clearFormat:!0};function Jo({value:e,defaultValue:t,onChange:n,onMarkdownChange:r,onHtmlChange:i,outputFormat:o="html",defaultMode:s="wysiwyg",mode:l,onModeChange:u,showModeToggle:d=!0,placeholder:c="Start typing...",label:h,helperText:p,errorMessage:m,isInvalid:g=!1,disabled:x=!1,colorScheme:y="blue",minHeight:b="180px",maxHeight:T="400px",maxLength:w,showCharCount:A=!1,toolbarOptions:E,className:C}){const[O,B]=S.useState(!1),[F,L]=S.useState(s),R=l!==void 0?l:F,D=e!==void 0,N=jp[y],P={...Hp,...E},[I,M]=S.useState(()=>{const oe=D?e:t??"";return o==="markdown"?oe:Un(oe)}),U=S.useRef(null);S.useEffect(()=>{Tp()},[]);const H=ea.useEditor({extensions:[oh.configure({heading:{levels:[1,2,3]}}),ah,sh.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),lh.configure({types:["heading","paragraph"]}),ch.configure({placeholder:c})],content:D?o==="markdown"?$t(e??""):e??"":t?o==="markdown"?$t(t):t:"",editable:!x,editorProps:{attributes:{spellcheck:"true"}},onUpdate({editor:oe}){const ce=oe.getHTML(),J=ce==="<p></p>"?"":ce,Z=Un(J);i==null||i(J),r==null||r(Z);const Q=o==="markdown"?Z:J;w!==void 0&&oe.getText().length>w||n==null||n(Q)},onFocus(){B(!0)},onBlur(){B(!1)}}),$=oe=>{if(oe!==R){if(oe==="markdown"){const ce=H?H.getHTML():"",J=Un(ce==="<p></p>"?"":ce);M(J)}else{const ce=$t(I);H&&H.commands.setContent(ce,{emitUpdate:!1})}l===void 0&&L(oe),u==null||u(oe)}},v=oe=>{const ce=oe.target.value;M(ce);const J=$t(ce);r==null||r(ce),i==null||i(J);const Z=o==="markdown"?ce:J;w!==void 0&&ce.length>w||(n==null||n(Z),H&&H.commands.setContent(J,{emitUpdate:!1}))},Y=oe=>{const ce=U.current;if(!ce){M(Ae=>Ae+oe);return}const J=ce.selectionStart,Z=ce.selectionEnd,Q=ce.value,de=Q.substring(0,J)+oe+Q.substring(Z);M(de);const re=$t(de);r==null||r(de),i==null||i(re);const ze=o==="markdown"?de:re;n==null||n(ze),H&&H.commands.setContent(re,{emitUpdate:!1}),setTimeout(()=>{ce.focus(),ce.setSelectionRange(J+oe.length,J+oe.length)},50)};S.useEffect(()=>{if(D)if(o==="markdown"){const oe=e??"";if(M(oe),H){const ce=$t(oe);H.getHTML()!==ce&&H.commands.setContent(ce,{emitUpdate:!1})}}else{const oe=e===""?"<p></p>":e??"<p></p>";H&&H.getHTML()!==oe&&H.commands.setContent(oe,{emitUpdate:!1}),M(Un(e??""))}},[H,D,e,o]);const ie=R==="markdown"?I.length:(H==null?void 0:H.getText().length)??0,j=g?"#DC2626":O?N.base:"var(--medix-form-border)";return a.jsxs(f.Box,{w:"100%",className:C,children:[h&&a.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",color:"text.heading",children:h}),a.jsxs(f.Box,{borderRadius:"md",overflow:"hidden",bg:"bg.surface",opacity:x?.6:1,style:{border:`1.5px solid ${j}`,transition:"border-color 0.15s ease",boxShadow:"none",background:"var(--medix-form-bg)"},children:[a.jsx(Vp,{editor:H,accentColor:N.base,disabled:x,opts:P,mode:R,showModeToggle:d,onModeChange:$,onInsertMarkdown:Y}),R==="wysiwyg"?a.jsx(f.Box,{className:"medix-rte-content",style:{minHeight:b,maxHeight:T,overflowY:"auto"},_dark:{color:"var(--medix-form-text)"},children:a.jsx(ea.EditorContent,{editor:H})}):a.jsx("textarea",{ref:U,value:I,onChange:v,placeholder:c,disabled:x,onFocus:()=>B(!0),onBlur:()=>B(!1),style:{width:"100%",minHeight:b,maxHeight:T,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"}}),(A||w)&&a.jsx(f.Box,{display:"flex",justifyContent:w?"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:a.jsxs(f.Text,{fontSize:"xs",color:w&&ie>w?"red.500":"text.muted",fontFamily:"var(--font-body)",children:[ie,w?` / ${w}`:""," characters"]})})]}),p&&!g&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:p}),g&&m&&a.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:m})]})}const Wp=Jo;Jo.displayName="MedixRichTextInput";const tu=S.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...r},i)=>a.jsx(f.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"},...r,children:S.Children.map(n,o=>o||null)}));tu.displayName="MedixCard";function Up({title:e,subtitle:t,action:n,children:r,...i}){return a.jsxs(f.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[a.jsxs(f.Box,{flex:"1",children:[e&&a.jsx(f.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&a.jsx(f.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),r]}),n&&a.jsx(f.Box,{flexShrink:0,children:n})]})}function $p({children:e,...t}){return a.jsx(f.Box,{px:"6",py:"5",...t,children:e})}function Gp({children:e,...t}){return a.jsx(f.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const nu=S.forwardRef(({value:e,label:t,unit:n,change:r,trend:i,icon:o,accentColor:s="blue.500",...l},u)=>{const d=i??(r!==void 0?r>=0?"up":"down":"neutral"),c=d==="up"?"green.500":d==="down"?"red.500":"text.muted";return a.jsxs(f.Box,{ref:u,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"none",_dark:{boxShadow:"none"},...l,children:[o&&a.jsx(f.Box,{w:"10",h:"10",borderRadius:"md",bg:`${s.split(".")[0]}.100`,color:s,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:o}),a.jsxs(f.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&a.jsx(f.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),a.jsx(f.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),r!==void 0&&a.jsxs(f.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:c,children:[a.jsx(f.Box,{as:"span",children:d==="up"?"↑":d==="down"?"↓":"→"}),a.jsxs(f.Box,{as:"span",children:[Math.abs(r),"%"]})]})]})});nu.displayName="MedixStatCard";const Yp={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},ru=S.forwardRef(({maxWidth:e="xl",children:t,...n},r)=>a.jsx(f.Box,{ref:r,w:"100%",maxW:Yp[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));ru.displayName="MedixContainer";function Kp({eyebrow:e,title:t,description:n,align:r="center",action:i,eyebrowColor:o="blue.500",...s}){const l=r,u=r==="center"?"center":r==="right"?"flex-end":"flex-start";return a.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:u,textAlign:l,gap:"3",...s,children:[e&&a.jsx(f.Box,{as:"span",fontSize:"md",fontWeight:"bold",color:o,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),a.jsx(f.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:r==="center"?"720px":void 0,children:t}),n&&a.jsx(f.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:r==="center"?"640px":void 0,children:n}),i&&a.jsx(f.Box,{mt:"2",children:i})]})}const qp=["light","dark"],Xp={light:{label:"Light mode",canvas:V.neutralLight.bg.value,surface:V.neutralLight.surface.value,border:V.neutralLight.border.value,text:V.neutralLight.heading.value,muted:V.neutralLight.body.value},dark:{label:"Dark mode",canvas:V.neutralDark.bg.value,surface:V.neutralDark.surface.value,border:V.neutralDark.border.value,text:V.neutralDark.heading.value,muted:V.neutralDark.body.value}};function Ht(e,t){return Object.entries(t).map(([n,r])=>({token:`${e}.${n}`,value:r.value}))}const Zp=[{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:V.neutralLight.bg.value,dark:V.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:V.neutralLight.bg2.value,dark:V.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:V.neutralLight.surface.value,dark:V.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:V.neutralLight.heading.value,dark:V.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:V.neutralLight.body.value,dark:V.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:V.neutralLight.muted.value,dark:V.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:V.neutralLight.border.value,dark:V.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:V.blue[500].value,dark:V.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:V.blue[100].value,dark:V.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:V.green[500].value,dark:V.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:V.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:V.amber[500].value,dark:V.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:V.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:V.red[500].value,dark:V.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:V.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:V.blue[50].value,dark:V.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:V.blue[100].value,dark:V.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:V.blue[200].value,dark:V.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:V.blue[300].value,dark:V.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:V.blue[400].value,dark:V.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:V.blue[500].value,dark:V.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:V.blue[600].value,dark:V.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:V.blue[700].value,dark:V.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:V.blue[800].value,dark:V.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:V.blue[900].value,dark:V.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:V.blue[500].value,dark:V.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:V.blue[100].value,dark:V.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:V.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:V.blue[100].value,dark:V.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:V.blue[700].value,dark:V.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:V.blue[500].value,dark:V.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:V.purple[50].value,dark:V.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:V.purple[100].value,dark:V.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:V.purple[500].value,dark:V.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:V.purple[600].value,dark:V.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:V.purple[500].value,dark:V.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:V.purple[100].value,dark:V.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:V.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:V.purple[100].value,dark:V.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:V.purple[700].value,dark:V.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:V.purple[500].value,dark:V.purple[500].value}]}],Jp=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:Ht("brand.blue",V.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:Ht("brand.purple",V.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:Ht("brand.green",V.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:Ht("brand.amber",V.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:Ht("brand.red",V.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:Ht("brand.neutralLight",V.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:Ht("brand.neutralDark",V.neutralDark)}];function Qp({mode:e,token:t}){const n=Xp[e],r=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 a.jsxs(f.Box,{border:"1px solid",borderColor:n.border,borderRadius:"lg",bg:n.surface,p:"3",children:[a.jsx(f.Text,{fontSize:"xs",fontWeight:"600",color:n.text,fontFamily:"var(--font-heading)",mb:"2",children:n.label}),t.preview==="text"?a.jsx(f.Box,{...i,children:a.jsx(f.Text,{color:r,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?a.jsx(f.Box,{...i,children:a.jsx(f.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:r,bg:n.canvas})}):a.jsx(f.Box,{...i,bg:r,borderColor:r===n.canvas||r==="#FFFFFF"?n.border:"transparent"}),a.jsx(f.Text,{mt:"2",fontSize:"xs",color:n.muted,fontFamily:"var(--font-mono)",children:r})]})}const iu=S.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...n},r)=>a.jsxs(f.Box,{ref:r,display:"flex",flexDirection:"column",gap:"8",...n,children:[a.jsx(f.Box,{children:a.jsx(f.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&&a.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"6",children:Zp.map(i=>a.jsxs(f.Box,{children:[a.jsx(f.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),a.jsx(f.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),a.jsx(f.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:i.tokens.map(o=>a.jsxs(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[a.jsx(f.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:o.token}),a.jsx(f.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o.description}),a.jsx(f.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:qp.map(s=>a.jsx(Qp,{mode:s,token:o},`${o.token}-${s}`))})]},o.token))})]},i.title))}),t&&a.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"6",children:Jp.map(i=>a.jsxs(f.Box,{children:[a.jsx(f.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),a.jsx(f.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),a.jsx(f.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:i.tokens.map(o=>a.jsxs(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[a.jsx(f.Box,{h:"72px",bg:o.value,borderBottom:"1px solid",borderColor:o.value==="#FFFFFF"||o.value===V.neutralLight.bg.value?"border":"transparent"}),a.jsxs(f.Box,{p:"4",children:[a.jsx(f.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:o.token}),a.jsx(f.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:o.value})]})]},o.token))})]},i.title))})]}));iu.displayName="MedixThemeColorPalette";const Qo=S.createContext({});function es(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const em=typeof window<"u",ou=em?S.useLayoutEffect:S.useEffect,ri=S.createContext(null);function ts(e,t){e.indexOf(t)===-1&&e.push(t)}function Hr(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const wt=(e,t,n)=>n>t?t:n<e?e:n;function no(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let jn=()=>{},Bt=()=>{};var Mc;typeof process<"u"&&((Mc=process.env)==null?void 0:Mc.NODE_ENV)!=="production"&&(jn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(no(t,n))},Bt=(e,t,n)=>{if(!e)throw new Error(no(t,n))});const Pt={},su=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function au(e){return typeof e=="object"&&e!==null}const lu=e=>/^0[^.\s]+$/u.test(e);function cu(e){let t;return()=>(t===void 0&&(t=e()),t)}const ot=e=>e,tm=(e,t)=>n=>t(e(n)),ar=(...e)=>e.reduce(tm),er=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class ns{constructor(){this.subscriptions=[]}add(t){return ts(this.subscriptions,t),()=>Hr(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ke=e=>e*1e3,it=e=>e/1e3;function uu(e,t){return t?e*(1e3/t):0}const ha=new Set;function rs(e,t,n){e||ha.has(t)||(console.warn(no(t,n)),ha.add(t))}const du=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nm=1e-7,rm=12;function im(e,t,n,r,i){let o,s,l=0;do s=t+(n-t)/2,o=du(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>nm&&++l<rm);return s}function lr(e,t,n,r){if(e===t&&n===r)return ot;const i=o=>im(o,0,1,e,n);return o=>o===0||o===1?o:du(i(o),t,r)}const fu=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hu=e=>t=>1-e(1-t),pu=lr(.33,1.53,.69,.99),is=hu(pu),mu=fu(is),gu=e=>e>=1?1:(e*=2)<1?.5*is(e):.5*(2-Math.pow(2,-10*(e-1))),os=e=>1-Math.sin(Math.acos(e)),xu=hu(os),yu=fu(os),om=lr(.42,0,1,1),sm=lr(0,0,.58,1),bu=lr(.42,0,.58,1),am=e=>Array.isArray(e)&&typeof e[0]!="number",vu=e=>Array.isArray(e)&&typeof e[0]=="number",pa={linear:ot,easeIn:om,easeInOut:bu,easeOut:sm,circIn:os,circInOut:yu,circOut:xu,backIn:is,backInOut:mu,backOut:pu,anticipate:gu},lm=e=>typeof e=="string",ma=e=>{if(vu(e)){Bt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return lr(t,n,r,i)}else if(lm(e))return Bt(pa[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),pa[e];return e},vr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function cm(e,t){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(c){s.has(c)&&(d.schedule(c),e()),c(l)}const d={schedule:(c,h=!1,p=!1)=>{const g=p&&i?n:r;return h&&s.add(c),g.add(c),c},cancel:c=>{r.delete(c),s.delete(c)},process:c=>{if(l=c,i){o=!0;return}i=!0;const h=n;n=r,r=h,n.forEach(u),n.clear(),i=!1,o&&(o=!1,d.process(c))}};return d}const um=40;function ku(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=vr.reduce((w,A)=>(w[A]=cm(o),w),{}),{setup:l,read:u,resolveKeyframes:d,preUpdate:c,update:h,preRender:p,render:m,postRender:g}=s,x=()=>{const w=Pt.useManualTiming,A=w?i.timestamp:performance.now();n=!1,w||(i.delta=r?1e3/60:Math.max(Math.min(A-i.timestamp,um),1)),i.timestamp=A,i.isProcessing=!0,l.process(i),u.process(i),d.process(i),c.process(i),h.process(i),p.process(i),m.process(i),g.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(x))},y=()=>{n=!0,r=!0,i.isProcessing||e(x)};return{schedule:vr.reduce((w,A)=>{const E=s[A];return w[A]=(C,O=!1,B=!1)=>(n||y(),E.schedule(C,O,B)),w},{}),cancel:w=>{for(let A=0;A<vr.length;A++)s[vr[A]].cancel(w)},state:i,steps:s}}const{schedule:ge,cancel:Ot,state:Pe,steps:ki}=ku(typeof requestAnimationFrame<"u"?requestAnimationFrame:ot,!0);let Ir;function dm(){Ir=void 0}const He={now:()=>(Ir===void 0&&He.set(Pe.isProcessing||Pt.useManualTiming?Pe.timestamp:performance.now()),Ir),set:e=>{Ir=e,queueMicrotask(dm)}},wu=e=>t=>typeof t=="string"&&t.startsWith(e),Su=wu("--"),fm=wu("var(--"),ss=e=>fm(e)?hm.test(e.split("/*")[0].trim()):!1,hm=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ga(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Tn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},tr={...Tn,transform:e=>wt(0,1,e)},kr={...Tn,default:1},Kn=e=>Math.round(e*1e5)/1e5,as=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pm(e){return e==null}const mm=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ls=(e,t)=>n=>!!(typeof n=="string"&&mm.test(n)&&n.startsWith(e)||t&&!pm(n)&&Object.prototype.hasOwnProperty.call(n,t)),Cu=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,l]=r.match(as);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},gm=e=>wt(0,255,e),wi={...Tn,transform:e=>Math.round(gm(e))},Yt={test:ls("rgb","red"),parse:Cu("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+wi.transform(e)+", "+wi.transform(t)+", "+wi.transform(n)+", "+Kn(tr.transform(r))+")"};function xm(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const ro={test:ls("#"),parse:xm,transform:Yt.transform},cr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Dt=cr("deg"),kt=cr("%"),q=cr("px"),ym=cr("vh"),bm=cr("vw"),xa={...kt,parse:e=>kt.parse(e)/100,transform:e=>kt.transform(e*100)},xn={test:ls("hsl","hue"),parse:Cu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+kt.transform(Kn(t))+", "+kt.transform(Kn(n))+", "+Kn(tr.transform(r))+")"},Ce={test:e=>Yt.test(e)||ro.test(e)||xn.test(e),parse:e=>Yt.test(e)?Yt.parse(e):xn.test(e)?xn.parse(e):ro.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Yt.transform(e):xn.transform(e),getAnimatableNone:e=>{const t=Ce.parse(e);return t.alpha=0,Ce.transform(t)}},vm=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function km(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(as))==null?void 0:t.length)||0)+(((n=e.match(vm))==null?void 0:n.length)||0)>0}const ju="number",Tu="color",wm="var",Sm="var(",ya="${}",Cm=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Sn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const l=t.replace(Cm,u=>(Ce.test(u)?(r.color.push(o),i.push(Tu),n.push(Ce.parse(u))):u.startsWith(Sm)?(r.var.push(o),i.push(wm),n.push(u)):(r.number.push(o),i.push(ju),n.push(parseFloat(u))),++o,ya)).split(ya);return{values:n,split:l,indexes:r,types:i}}function jm(e){return Sn(e).values}function Bu({split:e,types:t}){const n=e.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=e[o],r[o]!==void 0){const s=t[o];s===ju?i+=Kn(r[o]):s===Tu?i+=Ce.transform(r[o]):i+=r[o]}return i}}function Tm(e){return Bu(Sn(e))}const Bm=e=>typeof e=="number"?0:Ce.test(e)?Ce.getAnimatableNone(e):e,Fm=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Bm(e);function Em(e){const t=Sn(e);return Bu(t)(t.values.map((r,i)=>Fm(r,t.split[i])))}const dt={test:km,parse:jm,createTransformer:Tm,getAnimatableNone:Em};function Si(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Am({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;i=Si(u,l,e+1/3),o=Si(u,l,e),s=Si(u,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Wr(e,t){return n=>n>0?t:e}const ye=(e,t,n)=>e+(t-e)*n,Ci=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Lm=[ro,Yt,xn],Im=e=>Lm.find(t=>t.test(e));function ba(e){const t=Im(e);if(jn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===xn&&(n=Am(n)),n}const va=(e,t)=>{const n=ba(e),r=ba(t);if(!n||!r)return Wr(e,t);const i={...n};return o=>(i.red=Ci(n.red,r.red,o),i.green=Ci(n.green,r.green,o),i.blue=Ci(n.blue,r.blue,o),i.alpha=ye(n.alpha,r.alpha,o),Yt.transform(i))},io=new Set(["none","hidden"]);function Dm(e,t){return io.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Rm(e,t){return n=>ye(e,t,n)}function cs(e){return typeof e=="number"?Rm:typeof e=="string"?ss(e)?Wr:Ce.test(e)?va:Om:Array.isArray(e)?Fu:typeof e=="object"?Ce.test(e)?va:Mm:Wr}function Fu(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>cs(o)(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function Mm(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=cs(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Pm(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],s=e.indexes[o][r[o]],l=e.values[s]??0;n[i]=l,r[o]++}return n}const Om=(e,t)=>{const n=dt.createTransformer(t),r=Sn(e),i=Sn(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?io.has(e)&&!i.values.length||io.has(t)&&!r.values.length?Dm(e,t):ar(Fu(Pm(r,i),i.values),n):(jn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Wr(e,t))};function Eu(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ye(e,t,n):cs(e)(e,t)}const zm=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ge.update(t,n),stop:()=>Ot(t),now:()=>Pe.isProcessing?Pe.timestamp:He.now()}},Au=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Ur=2e4;function us(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ur;)t+=n,r=e.next(t);return t>=Ur?1/0:t}function _m(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(us(r),Ur);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:it(i)}}const ve={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function oo(e,t){return e*Math.sqrt(1-t*t)}const Nm=12;function Vm(e,t,n){let r=n;for(let i=1;i<Nm;i++)r=r-e(r)/t(r);return r}const ji=.001;function Hm({duration:e=ve.duration,bounce:t=ve.bounce,velocity:n=ve.velocity,mass:r=ve.mass}){let i,o;jn(e<=Ke(ve.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=wt(ve.minDamping,ve.maxDamping,s),e=wt(ve.minDuration,ve.maxDuration,it(e)),s<1?(i=d=>{const c=d*s,h=c*e,p=c-n,m=oo(d,s),g=Math.exp(-h);return ji-p/m*g},o=d=>{const h=d*s*e,p=h*n+n,m=Math.pow(s,2)*Math.pow(d,2)*e,g=Math.exp(-h),x=oo(Math.pow(d,2),s);return(-i(d)+ji>0?-1:1)*((p-m)*g)/x}):(i=d=>{const c=Math.exp(-d*e),h=(d-n)*e+1;return-ji+c*h},o=d=>{const c=Math.exp(-d*e),h=(n-d)*(e*e);return c*h});const l=5/e,u=Vm(i,o,l);if(e=Ke(e),isNaN(u))return{stiffness:ve.stiffness,damping:ve.damping,duration:e};{const d=Math.pow(u,2)*r;return{stiffness:d,damping:s*2*Math.sqrt(r*d),duration:e}}}const Wm=["duration","bounce"],Um=["stiffness","damping","mass"];function ka(e,t){return t.some(n=>e[n]!==void 0)}function $m(e){let t={velocity:ve.velocity,stiffness:ve.stiffness,damping:ve.damping,mass:ve.mass,isResolvedFromDuration:!1,...e};if(!ka(e,Um)&&ka(e,Wm))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*wt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ve.mass,stiffness:i,damping:o}}else{const n=Hm({...e,velocity:0});t={...t,...n,mass:ve.mass},t.isResolvedFromDuration=!0}return t}function $r(e=ve.visualDuration,t=ve.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:u,damping:d,mass:c,duration:h,velocity:p,isResolvedFromDuration:m}=$m({...n,velocity:-it(n.velocity||0)}),g=p||0,x=d/(2*Math.sqrt(u*c)),y=s-o,b=it(Math.sqrt(u/c)),T=Math.abs(y)<5;r||(r=T?ve.restSpeed.granular:ve.restSpeed.default),i||(i=T?ve.restDelta.granular:ve.restDelta.default);let w,A,E,C,O,B;if(x<1)E=oo(b,x),C=(g+x*b*y)/E,w=L=>{const R=Math.exp(-x*b*L);return s-R*(C*Math.sin(E*L)+y*Math.cos(E*L))},O=x*b*C+y*E,B=x*b*y-C*E,A=L=>Math.exp(-x*b*L)*(O*Math.sin(E*L)+B*Math.cos(E*L));else if(x===1){w=R=>s-Math.exp(-b*R)*(y+(g+b*y)*R);const L=g+b*y;A=R=>Math.exp(-b*R)*(b*L*R-g)}else{const L=b*Math.sqrt(x*x-1);w=P=>{const I=Math.exp(-x*b*P),M=Math.min(L*P,300);return s-I*((g+x*b*y)*Math.sinh(M)+L*y*Math.cosh(M))/L};const R=(g+x*b*y)/L,D=x*b*R-y*L,N=x*b*y-R*L;A=P=>{const I=Math.exp(-x*b*P),M=Math.min(L*P,300);return I*(D*Math.sinh(M)+N*Math.cosh(M))}}const F={calculatedDuration:m&&h||null,velocity:L=>Ke(A(L)),next:L=>{if(!m&&x<1){const D=Math.exp(-x*b*L),N=Math.sin(E*L),P=Math.cos(E*L),I=s-D*(C*N+y*P),M=Ke(D*(O*N+B*P));return l.done=Math.abs(M)<=r&&Math.abs(s-I)<=i,l.value=l.done?s:I,l}const R=w(L);if(m)l.done=L>=h;else{const D=Ke(A(L));l.done=Math.abs(D)<=r&&Math.abs(s-R)<=i}return l.value=l.done?s:R,l},toString:()=>{const L=Math.min(us(F),Ur),R=Au(D=>F.next(L*D).value,L,30);return L+"ms "+R},toTransition:()=>{}};return F}$r.applyToOptions=e=>{const t=_m(e,100,$r);return e.ease=t.ease,e.duration=Ke(t.duration),e.type="keyframes",e};const Gm=5;function Lu(e,t,n){const r=Math.max(t-Gm,0);return uu(n-e(r),t-r)}function so({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:l,max:u,restDelta:d=.5,restSpeed:c}){const h=e[0],p={done:!1,value:h},m=B=>l!==void 0&&B<l||u!==void 0&&B>u,g=B=>l===void 0?u:u===void 0||Math.abs(l-B)<Math.abs(u-B)?l:u;let x=n*t;const y=h+x,b=s===void 0?y:s(y);b!==y&&(x=b-h);const T=B=>-x*Math.exp(-B/r),w=B=>b+T(B),A=B=>{const F=T(B),L=w(B);p.done=Math.abs(F)<=d,p.value=p.done?b:L};let E,C;const O=B=>{m(p.value)&&(E=B,C=$r({keyframes:[p.value,g(p.value)],velocity:Lu(w,B,p.value),damping:i,stiffness:o,restDelta:d,restSpeed:c}))};return O(0),{calculatedDuration:null,next:B=>{let F=!1;return!C&&E===void 0&&(F=!0,A(B),O(B)),E!==void 0&&B>=E?C.next(B-E):(!F&&A(B),p)}}}function Ym(e,t,n){const r=[],i=n||Pt.mix||Eu,o=e.length-1;for(let s=0;s<o;s++){let l=i(e[s],e[s+1]);if(t){const u=Array.isArray(t)?t[s]||ot:t;l=ar(u,l)}r.push(l)}return r}function Km(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Bt(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Ym(t,r,i),u=l.length,d=c=>{if(s&&c<e[0])return t[0];let h=0;if(u>1)for(;h<e.length-2&&!(c<e[h+1]);h++);const p=er(e[h],e[h+1],c);return l[h](p)};return n?c=>d(wt(e[0],e[o-1],c)):d}function qm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=er(0,t,r);e.push(ye(n,1,i))}}function Xm(e){const t=[0];return qm(t,e.length-1),t}function Zm(e,t){return e.map(n=>n*t)}function Jm(e,t){return e.map(()=>t||bu).splice(0,e.length-1)}function yn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=am(r)?r.map(ma):ma(r),o={done:!1,value:t[0]},s=Zm(n&&n.length===t.length?n:Xm(t),e),l=Km(s,t,{ease:Array.isArray(i)?i:Jm(t,i)});return{calculatedDuration:e,next:u=>(o.value=l(u),o.done=u>=e,o)}}const Qm=e=>e!==null;function ii(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(Qm),l=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!l||r===void 0?o[l]:r}const e1={decay:so,inertia:so,tween:yn,keyframes:yn,spring:$r};function Iu(e){typeof e.type=="string"&&(e.type=e1[e.type])}class ds{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const t1=e=>e/100;class Gr extends ds{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==He.now()&&this.tick(He.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Iu(t);const{type:n=yn,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:l}=t;const u=n||yn;process.env.NODE_ENV!=="production"&&u!==yn&&Bt(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),u!==yn&&typeof l[0]!="number"&&(this.mixKeyframes=ar(t1,Eu(l[0],l[1])),l=[0,100]);const d=u({...t,keyframes:l});o==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-s})),d.calculatedDuration===null&&(d.calculatedDuration=us(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:c,repeat:h,repeatType:p,repeatDelay:m,type:g,onUpdate:x,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-d*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,A=r;if(h){const B=Math.min(this.currentTime,i)/l;let F=Math.floor(B),L=B%1;!L&&B>=1&&(L=1),L===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(p==="reverse"?(L=1-L,m&&(L-=m/l)):p==="mirror"&&(A=s)),w=wt(0,1,L)*l}let E;T?(this.delayState.value=c[0],E=this.delayState):E=A.next(w),o&&!T&&(E.value=o(E.value));let{done:C}=E;!T&&u!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return O&&g!==so&&(E.value=ii(c,this.options,y,this.speed)),x&&x(E.value),O&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return it(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+it(t)}get time(){return it(this.currentTime)}set time(t){t=Ke(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Lu(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(He.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=it(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:t=zm,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(He.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function n1(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Kt=e=>e*180/Math.PI,ao=e=>{const t=Kt(Math.atan2(e[1],e[0]));return lo(t)},r1={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ao,rotateZ:ao,skewX:e=>Kt(Math.atan(e[1])),skewY:e=>Kt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},lo=e=>(e=e%360,e<0&&(e+=360),e),wa=ao,Sa=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ca=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),i1={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Sa,scaleY:Ca,scale:e=>(Sa(e)+Ca(e))/2,rotateX:e=>lo(Kt(Math.atan2(e[6],e[5]))),rotateY:e=>lo(Kt(Math.atan2(-e[2],e[0]))),rotateZ:wa,rotate:wa,skewX:e=>Kt(Math.atan(e[4])),skewY:e=>Kt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function co(e){return e.includes("scale")?1:0}function uo(e,t){if(!e||e==="none")return co(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=i1,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=r1,i=l}if(!i)return co(t);const o=r[t],s=i[1].split(",").map(s1);return typeof o=="function"?o(s):s[o]}const o1=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return uo(n,t)};function s1(e){return parseFloat(e.trim())}const Bn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fn=new Set(Bn),ja=e=>e===Tn||e===q,a1=new Set(["x","y","z"]),l1=Bn.filter(e=>!a1.has(e));function c1(e){const t=[];return l1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>uo(t,"x"),y:(e,{transform:t})=>uo(t,"y")};Mt.translateX=Mt.x;Mt.translateY=Mt.y;const Xt=new Set;let fo=!1,ho=!1,po=!1;function Du(){if(ho){const e=Array.from(Xt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=c1(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var l;(l=r.getValue(o))==null||l.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ho=!1,fo=!1,Xt.forEach(e=>e.complete(po)),Xt.clear()}function Ru(){Xt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ho=!0)})}function u1(){po=!0,Ru(),Du(),po=!1}class fs{constructor(t,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Xt.add(this),fo||(fo=!0,ge.read(Ru),ge.resolveKeyframes(Du))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}n1(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Xt.delete(this)}cancel(){this.state==="scheduled"&&(Xt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const d1=e=>e.startsWith("--");function Mu(e,t,n){d1(t)?e.style.setProperty(t,n):e.style[t]=n}const f1={};function Pu(e,t){const n=cu(e);return()=>f1[t]??n()}const h1=Pu(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ou=Pu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$n=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ta={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$n([0,.65,.55,1]),circOut:$n([.55,0,1,.45]),backIn:$n([.31,.01,.66,-.59]),backOut:$n([.33,1.53,.69,.99])};function zu(e,t){if(e)return typeof e=="function"?Ou()?Au(e,t):"ease-out":vu(e)?$n(e):Array.isArray(e)?e.map(n=>zu(n,t)||Ta.easeOut):Ta[e]}function p1(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:l="easeOut",times:u}={},d=void 0){const c={[t]:n};u&&(c.offset=u);const h=zu(l,i);Array.isArray(h)&&(c.easing=h);const p={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return d&&(p.pseudoElement=d),e.animate(c,p)}function _u(e){return typeof e=="function"&&"applyToOptions"in e}function m1({type:e,...t}){return _u(e)&&Ou()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Nu extends ds{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=t,Bt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=m1(t);this.animation=p1(n,r,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=ii(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(c),Mu(n,r,c),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return it(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+it(t)}get time(){return it(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ke(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:i}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&h1()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),ot):i(this)}}const Vu={anticipate:gu,backInOut:mu,circInOut:yu};function g1(e){return e in Vu}function x1(e){typeof e.ease=="string"&&g1(e.ease)&&(e.ease=Vu[e.ease])}const Ti=10;class y1 extends Nu{constructor(t){x1(t),Iu(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new Gr({...s,autoplay:!1}),u=Math.max(Ti,He.now()-this.startTime),d=wt(0,Ti,u-Ti),c=l.sample(u).value,{name:h}=this.options;o&&h&&Mu(o,h,c),n.setWithVelocity(l.sample(Math.max(0,u-d)).value,c,d),l.stop()}}const Ba=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(dt.test(e)||e==="0")&&!e.startsWith("url("));function b1(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function v1(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],s=Ba(i,t),l=Ba(o,t);return jn(s===l,`You are trying to animate ${t} from "${i}" to "${o}". "${s?o:i}" is not an animatable value.`,"value-not-animatable"),!s||!l?!1:b1(e)||(n==="spring"||_u(n))&&r}function mo(e){e.duration=0,e.type="keyframes"}const Hu=new Set(["opacity","clipPath","filter","transform"]),k1=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function w1(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&k1.test(e[t]))return!0;return!1}const S1=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),C1=cu(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function j1(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:c}=t.owner.getProps();return C1()&&n&&(Hu.has(n)||S1.has(n)&&w1(l))&&(n!=="transform"||!c)&&!d&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const T1=40;class B1 extends ds{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:l,name:u,motionValue:d,element:c,...h}){var g;super(),this.stop=()=>{var x,y;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=He.now();const p={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:u,motionValue:d,element:c,...h},m=(c==null?void 0:c.KeyframeResolver)||fs;this.keyframeResolver=new m(l,(x,y,b)=>this.onKeyframesResolved(x,y,p,!b),u,d,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,i){var b,T;this.keyframeResolver=void 0;const{name:o,type:s,velocity:l,delay:u,isHandoff:d,onUpdate:c}=r;this.resolvedAt=He.now();let h=!0;v1(t,o,s,l)||(h=!1,(Pt.instantAnimations||!u)&&(c==null||c(ii(t,r,n))),t[0]=t[t.length-1],mo(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>T1?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=h&&!d&&j1(m),x=(T=(b=m.motionValue)==null?void 0:b.owner)==null?void 0:T.current;let y;if(g)try{y=new y1({...m,element:x})}catch{y=new Gr(m)}else y=new Gr(m);y.finished.then(()=>{this.notifyFinished()}).catch(ot),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),u1()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Wu(e,t,n,r=0,i=1){const o=Array.from(e).sort((d,c)=>d.sortNodePosition(c)).indexOf(t),s=e.size,l=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:l-o*r}const F1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function E1(e){const t=F1.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const A1=4;function Uu(e,t,n=1){Bt(n<=A1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=E1(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return su(s)?parseFloat(s):s}return ss(i)?Uu(i,t,n+1):i}const L1={type:"spring",stiffness:500,damping:25,restSpeed:10},I1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),D1={type:"keyframes",duration:.8},R1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},M1=(e,{keyframes:t})=>t.length>2?D1:Fn.has(e)?e.startsWith("scale")?I1(t[1]):L1:R1;function $u(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function hs(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?$u(n,e):n}const P1=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function O1(e){for(const t in e)if(!P1.has(t))return!0;return!1}const ps=(e,t,n,r={},i,o)=>s=>{const l=hs(r,e)||{},u=l.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ke(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{s(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:i};O1(l)||Object.assign(c,M1(e,c)),c.duration&&(c.duration=Ke(c.duration)),c.repeatDelay&&(c.repeatDelay=Ke(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(mo(c),c.delay===0&&(h=!0)),(Pt.instantAnimations||Pt.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,mo(c),c.delay=0),c.allowFlatten=!l.type&&!l.ease,h&&!o&&t.get()!==void 0){const p=ii(c.keyframes,l);if(p!==void 0){ge.update(()=>{c.onUpdate(p),c.onComplete()});return}}return l.isSync?new Gr(c):new B1(c)};function Fa(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ms(e,t,n,r){if(typeof t=="function"){const[i,o]=Fa(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Fa(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function Zt(e,t,n){const r=e.getProps();return ms(r,t,n!==void 0?n:r.custom,e)}const Gu=new Set(["width","height","top","left","right","bottom",...Bn]),Ea=30,z1=e=>!isNaN(parseFloat(e));class _1{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=He.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=He.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=z1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rs(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ns);const r=this.events[t].add(n);return t==="change"?()=>{r(),ge.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=He.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ea)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ea);return uu(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Cn(e,t){return new _1(e,t)}const go=e=>Array.isArray(e);function N1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Cn(n))}function V1(e){return go(e)?e[e.length-1]||0:e}function H1(e,t){const n=Zt(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const l=V1(o[s]);N1(e,s,l)}}const Oe=e=>!!(e&&e.getVelocity);function W1(e){return!!(Oe(e)&&e.add)}function xo(e,t){const n=e.getValue("willChange");if(W1(n))return n.add(t);if(!n&&Pt.WillChange){const r=new Pt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function gs(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const U1="framerAppearId",Yu="data-"+gs(U1);function Ku(e){return e.props[Yu]}function $1({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function qu(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:s,...l}=t;const u=e.getDefaultTransition();o=o?$u(o,u):u;const d=o==null?void 0:o.reduceMotion;r&&(o=r);const c=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const p in l){const m=e.getValue(p,e.latestValues[p]??null),g=l[p];if(g===void 0||h&&$1(h,p))continue;const x={delay:n,...hs(o||{},p)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===y&&!x.velocity){ge.update(()=>m.set(g));continue}let b=!1;if(window.MotionHandoffAnimation){const A=Ku(e);if(A){const E=window.MotionHandoffAnimation(A,p,ge);E!==null&&(x.startTime=E,b=!0)}}xo(e,p);const T=d??e.shouldReduceMotion;m.start(ps(p,m,g,T&&Gu.has(p)?{type:!1}:x,e,b));const w=m.animation;w&&c.push(w)}if(s){const p=()=>ge.update(()=>{s&&H1(e,s)});c.length?Promise.all(c).then(p):p()}return c}function yo(e,t,n={}){var u;const r=Zt(e,t,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(qu(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:p}=i;return G1(e,t,d,c,h,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[d,c]=l==="beforeChildren"?[o,s]:[s,o];return d().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function G1(e,t,n=0,r=0,i=0,o=1,s){const l=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),l.push(yo(u,t,{...s,delay:n+(typeof r=="function"?0:r)+Wu(e.variantChildren,u,r,i,o)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function Y1(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>yo(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=yo(e,t,n);else{const i=typeof t=="function"?Zt(e,t,n.custom):t;r=Promise.all(qu(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const K1={test:e=>e==="auto",parse:e=>e},Xu=e=>t=>t.test(e),Zu=[Tn,q,kt,Dt,bm,ym,K1],Aa=e=>Zu.find(Xu(e));function q1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||lu(e):!0}const X1=new Set(["brightness","contrast","saturate","opacity"]);function Z1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(as)||[];if(!r)return e;const i=n.replace(r,"");let o=X1.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const J1=/\b([a-z-]*)\(.*?\)/gu,bo={...dt,getAnimatableNone:e=>{const t=e.match(J1);return t?t.map(Z1).join(" "):e}},vo={...dt,getAnimatableNone:e=>{const t=dt.parse(e);return dt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},La={...Tn,transform:Math.round},Q1={rotate:Dt,rotateX:Dt,rotateY:Dt,rotateZ:Dt,scale:kr,scaleX:kr,scaleY:kr,scaleZ:kr,skew:Dt,skewX:Dt,skewY:Dt,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:tr,originX:xa,originY:xa,originZ:q},xs={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,...Q1,zIndex:La,fillOpacity:tr,strokeOpacity:tr,numOctaves:La},eg={...xs,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:bo,WebkitFilter:bo,mask:vo,WebkitMask:vo},Ju=e=>eg[e],tg=new Set([bo,vo]);function Qu(e,t){let n=Ju(e);return tg.has(n)||(n=dt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ng=new Set(["auto","none","0"]);function rg(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!ng.has(o)&&Sn(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Qu(n,i)}class ig extends fs{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let h=t[c];if(typeof h=="string"&&(h=h.trim(),ss(h))){const p=Uu(h,n.current);p!==void 0&&(t[c]=p),c===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Gu.has(r)||t.length!==2)return;const[i,o]=t,s=Aa(i),l=Aa(o),u=ga(i),d=ga(o);if(u!==d&&Mt[r]){this.needsMeasurement=!0;return}if(s!==l)if(ja(s)&&ja(l))for(let c=0;c<t.length;c++){const h=t[c];typeof h=="string"&&(t[c]=parseFloat(h))}else Mt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||q1(t[i]))&&r.push(i);r.length&&rg(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Mt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([u,d])=>{t.getValue(u).set(d)}),this.resolveNoneKeyframes()}}function ed(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const td=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Dr(e){return au(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:ys}=ku(queueMicrotask,!1),ut={x:!1,y:!1};function nd(){return ut.x||ut.y}function og(e){return e==="x"||e==="y"?ut[e]?null:(ut[e]=!0,()=>{ut[e]=!1}):ut.x||ut.y?null:(ut.x=ut.y=!0,()=>{ut.x=ut.y=!1})}function rd(e,t){const n=ed(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function sg(e){return!(e.pointerType==="touch"||nd())}function ag(e,t,n={}){const[r,i,o]=rd(e,n);return r.forEach(s=>{let l=!1,u=!1,d;const c=()=>{s.removeEventListener("pointerleave",g)},h=y=>{d&&(d(y),d=void 0),c()},p=y=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),u&&(u=!1,h(y))},m=()=>{l=!0,window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",p,i)},g=y=>{if(y.pointerType!=="touch"){if(l){u=!0;return}h(y)}},x=y=>{if(!sg(y))return;u=!1;const b=t(s,y);typeof b=="function"&&(d=b,s.addEventListener("pointerleave",g,i))};s.addEventListener("pointerenter",x,i),s.addEventListener("pointerdown",m,i)}),o}const id=(e,t)=>t?e===t?!0:id(e,t.parentElement):!1,bs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,lg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function cg(e){return lg.has(e.tagName)||e.isContentEditable===!0}const ug=new Set(["INPUT","SELECT","TEXTAREA"]);function dg(e){return ug.has(e.tagName)||e.isContentEditable===!0}const Rr=new WeakSet;function Ia(e){return t=>{t.key==="Enter"&&e(t)}}function Bi(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fg=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ia(()=>{if(Rr.has(n))return;Bi(n,"down");const i=Ia(()=>{Bi(n,"up")}),o=()=>Bi(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Da(e){return bs(e)&&!nd()}const Ra=new WeakSet;function hg(e,t,n={}){const[r,i,o]=rd(e,n),s=l=>{const u=l.currentTarget;if(!Da(l)||Ra.has(l))return;Rr.add(u),n.stopPropagation&&Ra.add(l);const d=t(u,l),c=(m,g)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),Rr.has(u)&&Rr.delete(u),Da(m)&&typeof d=="function"&&d(m,{success:g})},h=m=>{c(m,u===window||u===document||n.useGlobalTarget||id(u,m.target))},p=m=>{c(m,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",p,i)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",s,i),Dr(l)&&(l.addEventListener("focus",d=>fg(d,i)),!cg(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function vs(e){return au(e)&&"ownerSVGElement"in e}const Mr=new WeakMap;let Rt;const od=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:vs(r)&&"getBBox"in r?r.getBBox()[t]:r[n],pg=od("inline","width","offsetWidth"),mg=od("block","height","offsetHeight");function gg({target:e,borderBoxSize:t}){var n;(n=Mr.get(e))==null||n.forEach(r=>{r(e,{get width(){return pg(e,t)},get height(){return mg(e,t)}})})}function xg(e){e.forEach(gg)}function yg(){typeof ResizeObserver>"u"||(Rt=new ResizeObserver(xg))}function bg(e,t){Rt||yg();const n=ed(e);return n.forEach(r=>{let i=Mr.get(r);i||(i=new Set,Mr.set(r,i)),i.add(t),Rt==null||Rt.observe(r)}),()=>{n.forEach(r=>{const i=Mr.get(r);i==null||i.delete(t),i!=null&&i.size||Rt==null||Rt.unobserve(r)})}}const Pr=new Set;let bn;function vg(){bn=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Pr.forEach(t=>t(e))},window.addEventListener("resize",bn)}function kg(e){return Pr.add(e),bn||vg(),()=>{Pr.delete(e),!Pr.size&&typeof bn=="function"&&(window.removeEventListener("resize",bn),bn=void 0)}}function Ma(e,t){return typeof e=="function"?kg(e):bg(e,t)}function wg(e){return vs(e)&&e.tagName==="svg"}const Sg=[...Zu,Ce,dt],Cg=e=>Sg.find(Xu(e)),Pa=()=>({translate:0,scale:1,origin:0,originPoint:0}),vn=()=>({x:Pa(),y:Pa()}),Oa=()=>({min:0,max:0}),Ee=()=>({x:Oa(),y:Oa()}),jg=new WeakMap;function oi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function nr(e){return typeof e=="string"||Array.isArray(e)}const ks=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ws=["initial",...ks];function si(e){return oi(e.animate)||ws.some(t=>nr(e[t]))}function sd(e){return!!(si(e)||e.variants)}function Tg(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Oe(i))e.addValue(r,i);else if(Oe(o))e.addValue(r,Cn(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,Cn(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ko={current:null},ad={current:!1},Bg=typeof window<"u";function Fg(){if(ad.current=!0,!!Bg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ko.current=e.matches;e.addEventListener("change",t),t()}else ko.current=!1}const za=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Yr={};function ld(e){Yr=e}function Eg(){return Yr}class Ag{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:s,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=fs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=He.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ge.render(this.render,!1,!0))};const{latestValues:d,renderState:c}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=u,this.blockInitialAnimation=!!s,this.isControllingVariants=si(n),this.isVariantNode=sd(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const g=p[m];d[m]!==void 0&&Oe(g)&&g.set(d[m])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,jg.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,o)=>this.bindToMotionValue(o,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ad.current||Fg(),this.shouldReduceMotion=ko.current),process.env.NODE_ENV!=="production"&&rs(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ot(this.notifyUpdate),Ot(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Hu.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:l,times:u,ease:d,duration:c}=n.accelerate,h=new Nu({element:this.current,name:t,keyframes:l,times:u,ease:d,duration:Ke(c)}),p=s(h);this.valueSubscriptions.set(t,()=>{p(),h.cancel()});return}const r=Fn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ge.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Yr){const n=Yr[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ee()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<za.length;r++){const i=za[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=t[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=Tg(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Cn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(su(r)||lu(r))?r=parseFloat(r):!Cg(r)&&dt.test(n)&&(r=Qu(t,n)),this.setBaseTarget(t,Oe(r)?r.get():r)),Oe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=ms(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Oe(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ns),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ys.render(this.render)}}class cd extends Ag{constructor(){super(...arguments),this.KeyframeResolver=ig}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Oe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class zt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ud({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Lg({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ig(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fi(e){return e===void 0||e===1}function wo({scale:e,scaleX:t,scaleY:n}){return!Fi(e)||!Fi(t)||!Fi(n)}function Gt(e){return wo(e)||dd(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function dd(e){return _a(e.x)||_a(e.y)}function _a(e){return e&&e!=="0%"}function Kr(e,t,n){const r=e-n,i=t*r;return n+i}function Na(e,t,n,r,i){return i!==void 0&&(e=Kr(e,i,r)),Kr(e,n,r)+t}function So(e,t=0,n=1,r,i){e.min=Na(e.min,t,n,r,i),e.max=Na(e.max,t,n,r,i)}function fd(e,{x:t,y:n}){So(e.x,t.translate,t.scale,t.originPoint),So(e.y,n.translate,n.scale,n.originPoint)}const Va=.999999999999,Ha=1.0000000000001;function Dg(e,t,n,r=!1){var l;const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let u=0;u<i;u++){o=n[u],s=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(bt(e.x,-o.scroll.offset.x),bt(e.y,-o.scroll.offset.y)),s&&(t.x*=s.x.scale,t.y*=s.y.scale,fd(e,s)),r&&Gt(o.latestValues)&&Or(e,o.latestValues,(l=o.layout)==null?void 0:l.layoutBox))}t.x<Ha&&t.x>Va&&(t.x=1),t.y<Ha&&t.y>Va&&(t.y=1)}function bt(e,t){e.min+=t,e.max+=t}function Wa(e,t,n,r,i=.5){const o=ye(e.min,e.max,i);So(e,t,n,o,r)}function Ua(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Or(e,t,n){const r=n??e;Wa(e.x,Ua(t.x,r.x),t.scaleX,t.scale,t.originX),Wa(e.y,Ua(t.y,r.y),t.scaleY,t.scale,t.originY)}function hd(e,t){return ud(Ig(e.getBoundingClientRect(),t))}function Rg(e,t,n){const r=hd(e,n),{scroll:i}=t;return i&&(bt(r.x,i.offset.x),bt(r.y,i.offset.y)),r}const Mg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Pg=Bn.length;function Og(e,t,n){let r="",i=!0;for(let o=0;o<Pg;o++){const s=Bn[o],l=e[s];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(s.startsWith("scale")?1:0);else{const d=parseFloat(l);u=s.startsWith("scale")?d===1:d===0}if(!u||n){const d=td(l,xs[s]);if(!u){i=!1;const c=Mg[s]||s;r+=`${c}(${d}) `}n&&(t[s]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Ss(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,l=!1;for(const u in t){const d=t[u];if(Fn.has(u)){s=!0;continue}else if(Su(u)){i[u]=d;continue}else{const c=td(d,xs[u]);u.startsWith("origin")?(l=!0,o[u]=c):r[u]=c}}if(t.transform||(s||n?r.transform=Og(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:c=0}=o;r.transformOrigin=`${u} ${d} ${c}`}}function pd(e,{style:t,vars:n},r,i){const o=e.style;let s;for(s in t)o[s]=t[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function $a(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const On={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(q.test(e))e=parseFloat(e);else return e;const n=$a(e,t.target.x),r=$a(e,t.target.y);return`${n}% ${r}%`}},zg={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=dt.parse(e);if(i.length>5)return r;const o=dt.createTransformer(e),s=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;i[0+s]/=l,i[1+s]/=u;const d=ye(l,u,.5);return typeof i[2+s]=="number"&&(i[2+s]/=d),typeof i[3+s]=="number"&&(i[3+s]/=d),o(i)}},Co={borderRadius:{...On,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:On,borderTopRightRadius:On,borderBottomLeftRadius:On,borderBottomRightRadius:On,boxShadow:zg};function md(e,{layout:t,layoutId:n}){return Fn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Co[e]||e==="opacity")}function Cs(e,t,n){var s;const r=e.style,i=t==null?void 0:t.style,o={};if(!r)return o;for(const l in r)(Oe(r[l])||i&&Oe(i[l])||md(l,e)||((s=n==null?void 0:n.getValue(l))==null?void 0:s.liveStyle)!==void 0)&&(o[l]=r[l]);return o}function _g(e){return window.getComputedStyle(e)}class Ng extends cd{constructor(){super(...arguments),this.type="html",this.renderInstance=pd}readValueFromInstance(t,n){var r;if(Fn.has(n))return(r=this.projection)!=null&&r.isProjecting?co(n):o1(t,n);{const i=_g(t),o=(Su(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return hd(t,n)}build(t,n,r){Ss(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Cs(t,n,r)}}const Vg={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hg={offset:"strokeDashoffset",array:"strokeDasharray"};function Wg(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Vg:Hg;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const Ug=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function gd(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...l},u,d,c){if(Ss(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox);for(const m of Ug)h[m]!==void 0&&(p[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&Wg(h,i,o,s,!1)}const xd=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),yd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $g(e,t,n,r){pd(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(xd.has(i)?i:gs(i),t.attrs[i])}function bd(e,t,n){const r=Cs(e,t,n);for(const i in e)if(Oe(e[i])||Oe(t[i])){const o=Bn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}class Gg extends cd{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ee}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Fn.has(n)){const r=Ju(n);return r&&r.default||0}return n=xd.has(n)?n:gs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return bd(t,n,r)}build(t,n,r){gd(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){$g(t,n,r,i)}mount(t){this.isSVGTag=yd(t.tagName),super.mount(t)}}const Yg=ws.length;function vd(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?vd(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Yg;n++){const r=ws[n],i=e.props[r];(nr(i)||i===!1)&&(t[r]=i)}return t}function kd(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Kg=[...ks].reverse(),qg=ks.length;function Xg(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Y1(e,n,r)))}function Zg(e){let t=Xg(e),n=Ga(),r=!0,i=!1;const o=d=>(c,h)=>{var m;const p=Zt(e,h,d==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(p){const{transition:g,transitionEnd:x,...y}=p;c={...c,...y,...x}}return c};function s(d){t=d(e)}function l(d){const{props:c}=e,h=vd(e.parent)||{},p=[],m=new Set;let g={},x=1/0;for(let b=0;b<qg;b++){const T=Kg[b],w=n[T],A=c[T]!==void 0?c[T]:h[T],E=nr(A),C=T===d?w.isActive:null;C===!1&&(x=b);let O=A===h[T]&&A!==c[T]&&E;if(O&&(r||i)&&e.manuallyAnimateOnMount&&(O=!1),w.protectedKeys={...g},!w.isActive&&C===null||!A&&!w.prevProp||oi(A)||typeof A=="boolean")continue;if(T==="exit"&&w.isActive&&C!==!0){w.prevResolvedValues&&(g={...g,...w.prevResolvedValues});continue}const B=Jg(w.prevProp,A);let F=B||T===d&&w.isActive&&!O&&E||b>x&&E,L=!1;const R=Array.isArray(A)?A:[A];let D=R.reduce(o(T),{});C===!1&&(D={});const{prevResolvedValues:N={}}=w,P={...N,...D},I=H=>{F=!0,m.has(H)&&(L=!0,m.delete(H)),w.needsAnimating[H]=!0;const $=e.getValue(H);$&&($.liveStyle=!1)};for(const H in P){const $=D[H],v=N[H];if(g.hasOwnProperty(H))continue;let Y=!1;go($)&&go(v)?Y=!kd($,v):Y=$!==v,Y?$!=null?I(H):m.add(H):$!==void 0&&m.has(H)?I(H):w.protectedKeys[H]=!0}w.prevProp=A,w.prevResolvedValues=D,w.isActive&&(g={...g,...D}),(r||i)&&e.blockInitialAnimation&&(F=!1);const M=O&&B;F&&(!M||L)&&p.push(...R.map(H=>{const $={type:T};if(typeof H=="string"&&(r||i)&&!M&&e.manuallyAnimateOnMount&&e.parent){const{parent:v}=e,Y=Zt(v,H);if(v.enteringChildren&&Y){const{delayChildren:ie}=Y.transition||{};$.delay=Wu(v.enteringChildren,e,ie)}}return{animation:H,options:$}}))}if(m.size){const b={};if(typeof c.initial!="boolean"){const T=Zt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);T&&T.transition&&(b.transition=T.transition)}m.forEach(T=>{const w=e.getBaseTarget(T),A=e.getValue(T);A&&(A.liveStyle=!0),b[T]=w??null}),p.push({animation:b})}let y=!!p.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,i=!1,y?t(p):Promise.resolve()}function u(d,c){var p;if(n[d].isActive===c)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(d,c)}),n[d].isActive=c;const h=l(d);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:u,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Ga(),i=!0}}}function Jg(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kd(t,e):!1}function Wt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ga(){return{animate:Wt(!0),whileInView:Wt(),whileHover:Wt(),whileTap:Wt(),whileDrag:Wt(),whileFocus:Wt(),exit:Wt()}}function jo(e,t){e.min=t.min,e.max=t.max}function ct(e,t){jo(e.x,t.x),jo(e.y,t.y)}function Ya(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const wd=1e-4,Qg=1-wd,ex=1+wd,Sd=.01,tx=0-Sd,nx=0+Sd;function We(e){return e.max-e.min}function rx(e,t,n){return Math.abs(e-t)<=n}function Ka(e,t,n,r=.5){e.origin=r,e.originPoint=ye(t.min,t.max,e.origin),e.scale=We(n)/We(t),e.translate=ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Qg&&e.scale<=ex||isNaN(e.scale))&&(e.scale=1),(e.translate>=tx&&e.translate<=nx||isNaN(e.translate))&&(e.translate=0)}function qn(e,t,n,r){Ka(e.x,t.x,n.x,r?r.originX:void 0),Ka(e.y,t.y,n.y,r?r.originY:void 0)}function qa(e,t,n,r=0){const i=r?ye(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+We(t)}function ix(e,t,n,r){qa(e.x,t.x,n.x,r==null?void 0:r.x),qa(e.y,t.y,n.y,r==null?void 0:r.y)}function Xa(e,t,n,r=0){const i=r?ye(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+We(t)}function qr(e,t,n,r){Xa(e.x,t.x,n.x,r==null?void 0:r.x),Xa(e.y,t.y,n.y,r==null?void 0:r.y)}function Za(e,t,n,r,i){return e-=t,e=Kr(e,1/n,r),i!==void 0&&(e=Kr(e,1/i,r)),e}function ox(e,t=0,n=1,r=.5,i,o=e,s=e){if(kt.test(t)&&(t=parseFloat(t),t=ye(s.min,s.max,t/100)-s.min),typeof t!="number")return;let l=ye(o.min,o.max,r);e===o&&(l-=t),e.min=Za(e.min,t,n,l,i),e.max=Za(e.max,t,n,l,i)}function Ja(e,t,[n,r,i],o,s){ox(e,t[n],t[r],t[i],t.scale,o,s)}const sx=["x","scaleX","originX"],ax=["y","scaleY","originY"];function Qa(e,t,n,r){Ja(e.x,t,sx,n?n.x:void 0,r?r.x:void 0),Ja(e.y,t,ax,n?n.y:void 0,r?r.y:void 0)}function el(e){return e.translate===0&&e.scale===1}function Cd(e){return el(e.x)&&el(e.y)}function tl(e,t){return e.min===t.min&&e.max===t.max}function lx(e,t){return tl(e.x,t.x)&&tl(e.y,t.y)}function nl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function jd(e,t){return nl(e.x,t.x)&&nl(e.y,t.y)}function rl(e){return We(e.x)/We(e.y)}function il(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function xt(e){return[e("x"),e("y")]}function cx(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:c,rotateX:h,rotateY:p,skewX:m,skewY:g}=n;d&&(r=`perspective(${d}px) ${r}`),c&&(r+=`rotate(${c}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),g&&(r+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const Td=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ux=Td.length,ol=e=>typeof e=="string"?parseFloat(e):e,sl=e=>typeof e=="number"||q.test(e);function dx(e,t,n,r,i,o){i?(e.opacity=ye(0,n.opacity??1,fx(r)),e.opacityExit=ye(t.opacity??1,0,hx(r))):o&&(e.opacity=ye(t.opacity??1,n.opacity??1,r));for(let s=0;s<ux;s++){const l=Td[s];let u=al(t,l),d=al(n,l);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||sl(u)===sl(d)?(e[l]=Math.max(ye(ol(u),ol(d),r),0),(kt.test(d)||kt.test(u))&&(e[l]+="%")):e[l]=d}(t.rotate||n.rotate)&&(e.rotate=ye(t.rotate||0,n.rotate||0,r))}function al(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const fx=Bd(0,.5,xu),hx=Bd(.5,.95,ot);function Bd(e,t,n){return r=>r<e?0:r>t?1:n(er(e,t,r))}function px(e,t,n){const r=Oe(e)?e:Cn(e);return r.start(ps("",r,t,n)),r.animation}function rr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const mx=(e,t)=>e.depth-t.depth;class gx{constructor(){this.children=[],this.isDirty=!1}add(t){ts(this.children,t),this.isDirty=!0}remove(t){Hr(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mx),this.isDirty=!1,this.children.forEach(t)}}function xx(e,t){const n=He.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ot(r),e(o-t))};return ge.setup(r,!0),()=>Ot(r)}function zr(e){return Oe(e)?e.get():e}class yx{constructor(){this.members=[]}add(t){ts(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;(!i||i.isConnected===!1)&&!r.snapshot&&(Hr(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Hr(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:s}=t.options;(o===void 0||o!==s)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,s;(r=(n=t.options).onExitComplete)==null||r.call(n),(s=(i=t.resumingFrom)==null?void 0:(o=i.options).onExitComplete)==null||s.call(o)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const _r={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ei=["","X","Y","Z"],bx=1e3;let vx=0;function Ai(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Fd(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ku(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ge,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Fd(r)}function Ed({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},l=t==null?void 0:t()){this.id=vx++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Sx),this.nodes.forEach(Ex),this.nodes.forEach(Ax),this.nodes.forEach(Cx)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new gx)}addEventListener(s,l){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new ns),this.eventHandlers.get(s).add(l)}notifyListeners(s,...l){const u=this.eventHandlers.get(s);u&&u.notify(...l)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=vs(s)&&!wg(s),this.instance=s;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),e){let c,h=0;const p=()=>this.root.updateBlockedByResize=!1;ge.read(()=>{h=window.innerWidth}),e(s,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,c&&c(),c=xx(p,250),_r.hasAnimatedSinceResize&&(_r.hasAnimatedSinceResize=!1,this.nodes.forEach(ul)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||Mx,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=d.getProps(),b=!this.targetLayout||!jd(this.targetLayout,m),T=!h&&p;if(this.options.layoutRoot||this.resumeFrom||T||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...hs(g,"layout"),onPlay:x,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,T)}else h||ul(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ot(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Lx),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fd(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(Tx),this.nodes.forEach(ll);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(cl);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Bx),this.nodes.forEach(Fx),this.nodes.forEach(kx),this.nodes.forEach(wx)):this.nodes.forEach(cl),this.clearAllSnapshots();const l=He.now();Pe.delta=wt(0,1e3/60,l-Pe.timestamp),Pe.timestamp=l,Pe.isProcessing=!0,ki.update.process(Pe),ki.preRender.process(Pe),ki.render.process(Pe),Pe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ys.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jx),this.sharedNodes.forEach(Ix)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ge.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ge.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!We(this.snapshot.measuredBox.x)&&!We(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ee()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(l=!1),l&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Cd(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,c=d!==this.prevTransformTemplateValue;s&&this.instance&&(l||Gt(this.latestValues)||c)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return s&&(u=this.removeTransform(u)),Px(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:s}=this.options;if(!s)return Ee();const l=s.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(Ox))){const{scroll:c}=this.root;c&&(bt(l.x,c.offset.x),bt(l.y,c.offset.y))}return l}removeElementScroll(s){var u;const l=Ee();if(ct(l,s),(u=this.scroll)!=null&&u.wasRoot)return l;for(let d=0;d<this.path.length;d++){const c=this.path[d],{scroll:h,options:p}=c;c!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&ct(l,s),bt(l.x,h.offset.x),bt(l.y,h.offset.y))}return l}applyTransform(s,l=!1,u){var c,h;const d=u||Ee();ct(d,s);for(let p=0;p<this.path.length;p++){const m=this.path[p];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(bt(d.x,-m.scroll.offset.x),bt(d.y,-m.scroll.offset.y)),Gt(m.latestValues)&&Or(d,m.latestValues,(c=m.layout)==null?void 0:c.layoutBox)}return Gt(this.latestValues)&&Or(d,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),d}removeTransform(s){var u;const l=Ee();ct(l,s);for(let d=0;d<this.path.length;d++){const c=this.path[d];if(!Gt(c.latestValues))continue;let h;c.instance&&(wo(c.latestValues)&&c.updateSnapshot(),h=Ee(),ct(h,c.measurePageBox())),Qa(l,c.latestValues,(u=c.snapshot)==null?void 0:u.layoutBox,h)}return Gt(this.latestValues)&&Qa(l,this.latestValues),l}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=Pe.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ee(),this.targetWithTransforms=Ee()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ix(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ct(this.target,this.layout.layoutBox),fd(this.target,this.targetDelta)):ct(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||wo(this.parent.latestValues)||dd(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,l,u){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ee(),this.relativeTargetOrigin=Ee(),qr(this.relativeTargetOrigin,l,u,this.options.layoutAnchor||void 0),ct(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let u=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Pe.timestamp&&(u=!1),u)return;const{layout:d,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||c))return;ct(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;Dg(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Ee());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ya(this.prevProjectionDelta.x,this.projectionDelta.x),Ya(this.prevProjectionDelta.y,this.projectionDelta.y)),qn(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!il(this.projectionDelta.x,this.prevProjectionDelta.x)||!il(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),s){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vn(),this.projectionDelta=vn(),this.projectionDeltaWithTransform=vn()}setAnimationOrigin(s,l=!1){const u=this.snapshot,d=u?u.latestValues:{},c={...this.latestValues},h=vn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=Ee(),m=u?u.source:void 0,g=this.layout?this.layout.source:void 0,x=m!==g,y=this.getStack(),b=!y||y.members.length<=1,T=!!(x&&!b&&this.options.crossfade===!0&&!this.path.some(Rx));this.animationProgress=0;let w;this.mixTargetDelta=A=>{const E=A/1e3;dl(h.x,s.x,E),dl(h.y,s.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qr(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Dx(this.relativeTarget,this.relativeTargetOrigin,p,E),w&&lx(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ee()),ct(w,this.relativeTarget)),x&&(this.animationValues=c,dx(c,d,this.latestValues,E,T,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var l,u,d;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(d=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ge.update(()=>{_r.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Cn(0)),this.motionValue.jump(0,!1),this.currentAnimation=px(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),s.onUpdate&&s.onUpdate(c)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bx),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:l,target:u,layout:d,latestValues:c}=s;if(!(!l||!u||!d)){if(this!==s&&this.layout&&d&&Ad(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||Ee();const h=We(this.layout.layoutBox.x);u.x.min=s.target.x.min,u.x.max=u.x.min+h;const p=We(this.layout.layoutBox.y);u.y.min=s.target.y.min,u.y.max=u.y.min+p}ct(l,u),Or(l,c),qn(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new yx),this.sharedNodes.get(s).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var l;const{layoutId:s}=this.options;return s?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:s}=this.options;return s?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let l=!1;const{latestValues:u}=s;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const d={};u.z&&Ai("z",s,d,this.animationValues);for(let c=0;c<Ei.length;c++)Ai(`rotate${Ei[c]}`,s,d,this.animationValues),Ai(`skew${Ei[c]}`,s,d,this.animationValues);s.render();for(const c in d)s.setStaticValue(c,d[c]),this.animationValues&&(this.animationValues[c]=d[c]);s.scheduleRender()}applyProjectionStyles(s,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=zr(l==null?void 0:l.pointerEvents)||"",s.transform=u?u(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=zr(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Gt(this.latestValues)&&(s.transform=u?u({},""):"none",this.hasProjected=!1);return}s.visibility="";const c=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=cx(this.projectionDeltaWithTransform,this.treeScale,c);u&&(h=u(c,h)),s.transform=h;const{x:p,y:m}=this.projectionDelta;s.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?s.opacity=d===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:s.opacity=d===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const g in Co){if(c[g]===void 0)continue;const{correct:x,applyTo:y,isCSSVariable:b}=Co[g],T=h==="none"?c[g]:x(c[g],d);if(y){const w=y.length;for(let A=0;A<w;A++)s[y[A]]=T}else b?this.options.visualElement.renderState.vars[g]=T:s[g]=T}this.options.layoutId&&(s.pointerEvents=d===this?zr(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var l;return(l=s.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(ll),this.root.sharedNodes.clear()}}}function kx(e){e.updateLayout()}function wx(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;if(o==="size")xt(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],m=We(p);p.min=r[h].min,p.max=p.min+m});else if(o==="x"||o==="y"){const h=o==="x"?"y":"x";jo(s?t.measuredBox[h]:t.layoutBox[h],r[h])}else Ad(o,t.layoutBox,r)&&xt(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],m=We(r[h]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=vn();qn(l,r,t.layoutBox);const u=vn();s?qn(u,e.applyTransform(i,!0),t.measuredBox):qn(u,r,t.layoutBox);const d=!Cd(l);let c=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:m}=h;if(p&&m){const g=e.options.layoutAnchor||void 0,x=Ee();qr(x,t.layoutBox,p.layoutBox,g);const y=Ee();qr(y,r,m.layoutBox,g),jd(x,y)||(c=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Sx(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Cx(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function jx(e){e.clearSnapshot()}function ll(e){e.clearMeasurements()}function Tx(e){e.isLayoutDirty=!0,e.updateLayout()}function cl(e){e.isLayoutDirty=!1}function Bx(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Fx(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ul(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ex(e){e.resolveTargetDelta()}function Ax(e){e.calcProjection()}function Lx(e){e.resetSkewAndRotation()}function Ix(e){e.removeLeadSnapshot()}function dl(e,t,n){e.translate=ye(t.translate,0,n),e.scale=ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function fl(e,t,n,r){e.min=ye(t.min,n.min,r),e.max=ye(t.max,n.max,r)}function Dx(e,t,n,r){fl(e.x,t.x,n.x,r),fl(e.y,t.y,n.y,r)}function Rx(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Mx={duration:.45,ease:[.4,0,.1,1]},hl=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),pl=hl("applewebkit/")&&!hl("chrome/")?Math.round:ot;function ml(e){e.min=pl(e.min),e.max=pl(e.max)}function Px(e){ml(e.x),ml(e.y)}function Ad(e,t,n){return e==="position"||e==="preserve-aspect"&&!rx(rl(t),rl(n),.2)}function Ox(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const zx=Ed({attachResizeListener:(e,t)=>rr(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Li={current:void 0},Ld=Ed({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Li.current){const e=new zx({});e.mount(window),e.setOptions({layoutScroll:!0}),Li.current=e}return Li.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),js=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function gl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _x(...e){return t=>{let n=!1;const r=e.map(i=>{const o=gl(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():gl(e[i],null)}}}}function Nx(...e){return be.useCallback(_x(...e),e)}class Vx extends be.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Dr(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Dr(r)&&r.offsetWidth||0,o=Dr(r)&&r.offsetHeight||0,s=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(s.height),l.width=parseFloat(s.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=i-l.width-l.left,l.bottom=o-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Hx({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){var p;const s=S.useId(),l=S.useRef(null),u=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=S.useContext(js),c=((p=e.props)==null?void 0:p.ref)??(e==null?void 0:e.ref),h=Nx(l,c);return S.useInsertionEffect(()=>{const{width:m,height:g,top:x,left:y,right:b,bottom:T}=u.current;if(t||o===!1||!l.current||!m||!g)return;const w=n==="left"?`left: ${y}`:`right: ${b}`,A=r==="bottom"?`bottom: ${T}`:`top: ${x}`;l.current.dataset.motionPopId=s;const E=document.createElement("style");d&&(E.nonce=d);const C=i??document.head;return C.appendChild(E),E.sheet&&E.sheet.insertRule(`
344
- [data-motion-pop-id="${s}"] {
343
+ `),disabled:n,title:"Markdown Blockquote",accentColor:t,children:"> Quote"})]})}),s&&i.jsx(Xp,{currentMode:o,onSelectMode:a,accentColor:t,disabled:n})]})}const Jp={bold:!0,italic:!0,underline:!0,strikethrough:!0,headings:!0,bulletList:!0,orderedList:!0,quote:!0,link:!0,textAlign:!0,clearFormat:!0};function is({value:e,defaultValue:t,onChange:n,onMarkdownChange:r,onHtmlChange:o,outputFormat:s="html",defaultMode:a="wysiwyg",mode:l,onModeChange:u,showModeToggle:c=!0,placeholder:d="Start typing...",label:h,helperText:p,errorMessage:m,isInvalid:g=!1,disabled:x=!1,colorScheme:y="blue",minHeight:v="180px",maxHeight:j="400px",maxLength:w,showCharCount:F=!1,toolbarOptions:B,className:C}){const[P,A]=S.useState(!1),[E,L]=S.useState(a),R=l!==void 0?l:E,D=e!==void 0,N=Mp[y],O={...Jp,...B},[I,M]=S.useState(()=>{const ie=D?e:t??"";return s==="markdown"?ie:Kn(ie)}),H=S.useRef(null);S.useEffect(()=>{Pp()},[]);const W=ca.useEditor({extensions:[mh.configure({heading:{levels:[1,2,3]}}),xh,gh.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),yh.configure({types:["heading","paragraph"]}),bh.configure({placeholder:d})],content:D?s==="markdown"?Yt(e??""):e??"":t?s==="markdown"?Yt(t):t:"",editable:!x,editorProps:{attributes:{spellcheck:"true"}},onUpdate({editor:ie}){const se=ie.getHTML(),X=se==="<p></p>"?"":se,Z=Kn(X);o==null||o(X),r==null||r(Z);const Q=s==="markdown"?Z:X;w!==void 0&&ie.getText().length>w||n==null||n(Q)},onFocus(){A(!0)},onBlur(){A(!1)}}),$=ie=>{if(ie!==R){if(ie==="markdown"){const se=W?W.getHTML():"",X=Kn(se==="<p></p>"?"":se);M(X)}else{const se=Yt(I);W&&W.commands.setContent(se,{emitUpdate:!1})}l===void 0&&L(ie),u==null||u(ie)}},b=ie=>{const se=ie.target.value;M(se);const X=Yt(se);r==null||r(se),o==null||o(X);const Z=s==="markdown"?se:X;w!==void 0&&se.length>w||(n==null||n(Z),W&&W.commands.setContent(X,{emitUpdate:!1}))},Y=ie=>{const se=H.current;if(!se){M(Ae=>Ae+ie);return}const X=se.selectionStart,Z=se.selectionEnd,Q=se.value,ue=Q.substring(0,X)+ie+Q.substring(Z);M(ue);const ee=Yt(ue);r==null||r(ue),o==null||o(ee);const ze=s==="markdown"?ue:ee;n==null||n(ze),W&&W.commands.setContent(ee,{emitUpdate:!1}),setTimeout(()=>{se.focus(),se.setSelectionRange(X+ie.length,X+ie.length)},50)};S.useEffect(()=>{if(D)if(s==="markdown"){const ie=e??"";if(M(ie),W){const se=Yt(ie);W.getHTML()!==se&&W.commands.setContent(se,{emitUpdate:!1})}}else{const ie=e===""?"<p></p>":e??"<p></p>";W&&W.getHTML()!==ie&&W.commands.setContent(ie,{emitUpdate:!1}),M(Kn(e??""))}},[W,D,e,s]);const oe=R==="markdown"?I.length:(W==null?void 0:W.getText().length)??0,T=g?"#DC2626":P?N.base:"var(--medix-form-border)";return i.jsxs(f.Box,{w:"100%",className:C,children:[h&&i.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",color:"text.heading",children:h}),i.jsxs(f.Box,{borderRadius:"md",overflow:"hidden",bg:"bg.surface",opacity:x?.6:1,style:{border:`1.5px solid ${T}`,transition:"border-color 0.15s ease",boxShadow:"none",background:"var(--medix-form-bg)"},children:[i.jsx(Zp,{editor:W,accentColor:N.base,disabled:x,opts:O,mode:R,showModeToggle:c,onModeChange:$,onInsertMarkdown:Y}),R==="wysiwyg"?i.jsx(f.Box,{className:"medix-rte-content",style:{minHeight:v,maxHeight:j,overflowY:"auto"},_dark:{color:"var(--medix-form-text)"},children:i.jsx(ca.EditorContent,{editor:W})}):i.jsx("textarea",{ref:H,value:I,onChange:b,placeholder:d,disabled:x,onFocus:()=>A(!0),onBlur:()=>A(!1),style:{width:"100%",minHeight:v,maxHeight:j,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"}}),(F||w)&&i.jsx(f.Box,{display:"flex",justifyContent:w?"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:i.jsxs(f.Text,{fontSize:"xs",color:w&&oe>w?"red.500":"text.muted",fontFamily:"var(--font-body)",children:[oe,w?` / ${w}`:""," characters"]})})]}),p&&!g&&i.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:p}),g&&m&&i.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:m})]})}const Qp=is;is.displayName="MedixRichTextInput";const fu=S.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...r},o)=>i.jsx(f.Box,{ref:o,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"},...r,children:S.Children.map(n,s=>s||null)}));fu.displayName="MedixCard";function em({title:e,subtitle:t,action:n,children:r,...o}){return i.jsxs(f.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...o,children:[i.jsxs(f.Box,{flex:"1",children:[e&&i.jsx(f.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&i.jsx(f.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),r]}),n&&i.jsx(f.Box,{flexShrink:0,children:n})]})}function tm({children:e,...t}){return i.jsx(f.Box,{px:"6",py:"5",...t,children:e})}function nm({children:e,...t}){return i.jsx(f.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const hu=S.forwardRef(({value:e,label:t,unit:n,change:r,trend:o,icon:s,accentColor:a="blue.500",...l},u)=>{const c=o??(r!==void 0?r>=0?"up":"down":"neutral"),d=c==="up"?"green.500":c==="down"?"red.500":"text.muted";return i.jsxs(f.Box,{ref:u,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"none",_dark:{boxShadow:"none"},...l,children:[s&&i.jsx(f.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:s}),i.jsxs(f.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&i.jsx(f.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),i.jsx(f.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),r!==void 0&&i.jsxs(f.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:d,children:[i.jsx(f.Box,{as:"span",children:c==="up"?"↑":c==="down"?"↓":"→"}),i.jsxs(f.Box,{as:"span",children:[Math.abs(r),"%"]})]})]})});hu.displayName="MedixStatCard";const rm={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},pu=S.forwardRef(({maxWidth:e="xl",children:t,...n},r)=>i.jsx(f.Box,{ref:r,w:"100%",maxW:rm[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));pu.displayName="MedixContainer";function om({eyebrow:e,title:t,description:n,align:r="center",action:o,eyebrowColor:s="blue.500",...a}){const l=r,u=r==="center"?"center":r==="right"?"flex-end":"flex-start";return i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:u,textAlign:l,gap:"3",...a,children:[e&&i.jsx(f.Box,{as:"span",fontSize:"md",fontWeight:"bold",color:s,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),i.jsx(f.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:r==="center"?"720px":void 0,children:t}),n&&i.jsx(f.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:r==="center"?"640px":void 0,children:n}),o&&i.jsx(f.Box,{mt:"2",children:o})]})}const im=["light","dark"],sm={light:{label:"Light mode",canvas:V.neutralLight.bg.value,surface:V.neutralLight.surface.value,border:V.neutralLight.border.value,text:V.neutralLight.heading.value,muted:V.neutralLight.body.value},dark:{label:"Dark mode",canvas:V.neutralDark.bg.value,surface:V.neutralDark.surface.value,border:V.neutralDark.border.value,text:V.neutralDark.heading.value,muted:V.neutralDark.body.value}};function Ut(e,t){return Object.entries(t).map(([n,r])=>({token:`${e}.${n}`,value:r.value}))}const am=[{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:V.neutralLight.bg.value,dark:V.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:V.neutralLight.bg2.value,dark:V.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:V.neutralLight.surface.value,dark:V.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:V.neutralLight.heading.value,dark:V.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:V.neutralLight.body.value,dark:V.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:V.neutralLight.muted.value,dark:V.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:V.neutralLight.border.value,dark:V.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:V.blue[500].value,dark:V.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:V.blue[100].value,dark:V.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:V.green[500].value,dark:V.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:V.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:V.amber[500].value,dark:V.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:V.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:V.red[500].value,dark:V.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:V.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:V.blue[50].value,dark:V.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:V.blue[100].value,dark:V.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:V.blue[200].value,dark:V.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:V.blue[300].value,dark:V.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:V.blue[400].value,dark:V.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:V.blue[500].value,dark:V.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:V.blue[600].value,dark:V.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:V.blue[700].value,dark:V.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:V.blue[800].value,dark:V.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:V.blue[900].value,dark:V.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:V.blue[500].value,dark:V.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:V.blue[100].value,dark:V.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:V.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:V.blue[100].value,dark:V.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:V.blue[700].value,dark:V.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:V.blue[500].value,dark:V.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:V.purple[50].value,dark:V.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:V.purple[100].value,dark:V.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:V.purple[500].value,dark:V.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:V.purple[600].value,dark:V.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:V.purple[500].value,dark:V.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:V.purple[100].value,dark:V.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:V.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:V.purple[100].value,dark:V.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:V.purple[700].value,dark:V.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:V.purple[500].value,dark:V.purple[500].value}]}],lm=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:Ut("brand.blue",V.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:Ut("brand.purple",V.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:Ut("brand.green",V.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:Ut("brand.amber",V.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:Ut("brand.red",V.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:Ut("brand.neutralLight",V.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:Ut("brand.neutralDark",V.neutralDark)}];function cm({mode:e,token:t}){const n=sm[e],r=e==="light"?t.light:t.dark,o={minH:"88px",borderRadius:"md",border:"1px solid",borderColor:n.border,bg:n.canvas,display:"flex",alignItems:"center",justifyContent:"center",px:"4"};return i.jsxs(f.Box,{border:"1px solid",borderColor:n.border,borderRadius:"lg",bg:n.surface,p:"3",children:[i.jsx(f.Text,{fontSize:"xs",fontWeight:"600",color:n.text,fontFamily:"var(--font-heading)",mb:"2",children:n.label}),t.preview==="text"?i.jsx(f.Box,{...o,children:i.jsx(f.Text,{color:r,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?i.jsx(f.Box,{...o,children:i.jsx(f.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:r,bg:n.canvas})}):i.jsx(f.Box,{...o,bg:r,borderColor:r===n.canvas||r==="#FFFFFF"?n.border:"transparent"}),i.jsx(f.Text,{mt:"2",fontSize:"xs",color:n.muted,fontFamily:"var(--font-mono)",children:r})]})}const mu=S.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...n},r)=>i.jsxs(f.Box,{ref:r,display:"flex",flexDirection:"column",gap:"8",...n,children:[i.jsx(f.Box,{children:i.jsx(f.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&&i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"6",children:am.map(o=>i.jsxs(f.Box,{children:[i.jsx(f.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:o.title}),i.jsx(f.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o.description}),i.jsx(f.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:o.tokens.map(s=>i.jsxs(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[i.jsx(f.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:s.token}),i.jsx(f.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:s.description}),i.jsx(f.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:im.map(a=>i.jsx(cm,{mode:a,token:s},`${s.token}-${a}`))})]},s.token))})]},o.title))}),t&&i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"6",children:lm.map(o=>i.jsxs(f.Box,{children:[i.jsx(f.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:o.title}),i.jsx(f.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o.description}),i.jsx(f.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:o.tokens.map(s=>i.jsxs(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[i.jsx(f.Box,{h:"72px",bg:s.value,borderBottom:"1px solid",borderColor:s.value==="#FFFFFF"||s.value===V.neutralLight.bg.value?"border":"transparent"}),i.jsxs(f.Box,{p:"4",children:[i.jsx(f.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:s.token}),i.jsx(f.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:s.value})]})]},s.token))})]},o.title))})]}));mu.displayName="MedixThemeColorPalette";const ss=S.createContext({});function as(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const um=typeof window<"u",gu=um?S.useLayoutEffect:S.useEffect,co=S.createContext(null);function ls(e,t){e.indexOf(t)===-1&&e.push(t)}function Gr(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const jt=(e,t,n)=>n>t?t:n<e?e:n;function ci(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Fn=()=>{},Ft=()=>{};var Gc;typeof process<"u"&&((Gc=process.env)==null?void 0:Gc.NODE_ENV)!=="production"&&(Fn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(ci(t,n))},Ft=(e,t,n)=>{if(!e)throw new Error(ci(t,n))});const zt={},xu=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yu(e){return typeof e=="object"&&e!==null}const bu=e=>/^0[^.\s]+$/u.test(e);function vu(e){let t;return()=>(t===void 0&&(t=e()),t)}const st=e=>e,dm=(e,t)=>n=>t(e(n)),dr=(...e)=>e.reduce(dm),or=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class cs{constructor(){this.subscriptions=[]}add(t){return ls(this.subscriptions,t),()=>Gr(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const a=this.subscriptions[s];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ke=e=>e*1e3,it=e=>e/1e3;function ku(e,t){return t?e*(1e3/t):0}const wa=new Set;function us(e,t,n){e||wa.has(t)||(console.warn(ci(t,n)),wa.add(t))}const wu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fm=1e-7,hm=12;function pm(e,t,n,r,o){let s,a,l=0;do a=t+(n-t)/2,s=wu(a,r,o)-e,s>0?n=a:t=a;while(Math.abs(s)>fm&&++l<hm);return a}function fr(e,t,n,r){if(e===t&&n===r)return st;const o=s=>pm(s,0,1,e,n);return s=>s===0||s===1?s:wu(o(s),t,r)}const Su=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Cu=e=>t=>1-e(1-t),ju=fr(.33,1.53,.69,.99),ds=Cu(ju),Tu=Su(ds),Bu=e=>e>=1?1:(e*=2)<1?.5*ds(e):.5*(2-Math.pow(2,-10*(e-1))),fs=e=>1-Math.sin(Math.acos(e)),Eu=Cu(fs),Fu=Su(fs),mm=fr(.42,0,1,1),gm=fr(0,0,.58,1),Au=fr(.42,0,.58,1),xm=e=>Array.isArray(e)&&typeof e[0]!="number",Lu=e=>Array.isArray(e)&&typeof e[0]=="number",Sa={linear:st,easeIn:mm,easeInOut:Au,easeOut:gm,circIn:fs,circInOut:Fu,circOut:Eu,backIn:ds,backInOut:Tu,backOut:ju,anticipate:Bu},ym=e=>typeof e=="string",Ca=e=>{if(Lu(e)){Ft(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return fr(t,n,r,o)}else if(ym(e))return Ft(Sa[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Sa[e];return e},Cr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function bm(e,t){let n=new Set,r=new Set,o=!1,s=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(d){a.has(d)&&(c.schedule(d),e()),d(l)}const c={schedule:(d,h=!1,p=!1)=>{const g=p&&o?n:r;return h&&a.add(d),g.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(l=d,o){s=!0;return}o=!0;const h=n;n=r,r=h,n.forEach(u),n.clear(),o=!1,s&&(s=!1,c.process(d))}};return c}const vm=40;function Iu(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=Cr.reduce((w,F)=>(w[F]=bm(s),w),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:d,update:h,preRender:p,render:m,postRender:g}=a,x=()=>{const w=zt.useManualTiming,F=w?o.timestamp:performance.now();n=!1,w||(o.delta=r?1e3/60:Math.max(Math.min(F-o.timestamp,vm),1)),o.timestamp=F,o.isProcessing=!0,l.process(o),u.process(o),c.process(o),d.process(o),h.process(o),p.process(o),m.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(x))},y=()=>{n=!0,r=!0,o.isProcessing||e(x)};return{schedule:Cr.reduce((w,F)=>{const B=a[F];return w[F]=(C,P=!1,A=!1)=>(n||y(),B.schedule(C,P,A)),w},{}),cancel:w=>{for(let F=0;F<Cr.length;F++)a[Cr[F]].cancel(w)},state:o,steps:a}}const{schedule:ge,cancel:_t,state:Pe,steps:Eo}=Iu(typeof requestAnimationFrame<"u"?requestAnimationFrame:st,!0);let Pr;function km(){Pr=void 0}const We={now:()=>(Pr===void 0&&We.set(Pe.isProcessing||zt.useManualTiming?Pe.timestamp:performance.now()),Pr),set:e=>{Pr=e,queueMicrotask(km)}},Du=e=>t=>typeof t=="string"&&t.startsWith(e),Ru=Du("--"),wm=Du("var(--"),hs=e=>wm(e)?Sm.test(e.split("/*")[0].trim()):!1,Sm=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ja(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const An={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ir={...An,transform:e=>jt(0,1,e)},jr={...An,default:1},Jn=e=>Math.round(e*1e5)/1e5,ps=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Cm(e){return e==null}const jm=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ms=(e,t)=>n=>!!(typeof n=="string"&&jm.test(n)&&n.startsWith(e)||t&&!Cm(n)&&Object.prototype.hasOwnProperty.call(n,t)),Mu=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,a,l]=r.match(ps);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},Tm=e=>jt(0,255,e),Fo={...An,transform:e=>Math.round(Tm(e))},qt={test:ms("rgb","red"),parse:Mu("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Fo.transform(e)+", "+Fo.transform(t)+", "+Fo.transform(n)+", "+Jn(ir.transform(r))+")"};function Bm(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const ui={test:ms("#"),parse:Bm,transform:qt.transform},hr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Mt=hr("deg"),St=hr("%"),q=hr("px"),Em=hr("vh"),Fm=hr("vw"),Ta={...St,parse:e=>St.parse(e)/100,transform:e=>St.transform(e*100)},vn={test:ms("hsl","hue"),parse:Mu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+St.transform(Jn(t))+", "+St.transform(Jn(n))+", "+Jn(ir.transform(r))+")"},Ce={test:e=>qt.test(e)||ui.test(e)||vn.test(e),parse:e=>qt.test(e)?qt.parse(e):vn.test(e)?vn.parse(e):ui.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qt.transform(e):vn.transform(e),getAnimatableNone:e=>{const t=Ce.parse(e);return t.alpha=0,Ce.transform(t)}},Am=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Lm(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ps))==null?void 0:t.length)||0)+(((n=e.match(Am))==null?void 0:n.length)||0)>0}const Pu="number",Ou="color",Im="var",Dm="var(",Ba="${}",Rm=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Bn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const l=t.replace(Rm,u=>(Ce.test(u)?(r.color.push(s),o.push(Ou),n.push(Ce.parse(u))):u.startsWith(Dm)?(r.var.push(s),o.push(Im),n.push(u)):(r.number.push(s),o.push(Pu),n.push(parseFloat(u))),++s,Ba)).split(Ba);return{values:n,split:l,indexes:r,types:o}}function Mm(e){return Bn(e).values}function zu({split:e,types:t}){const n=e.length;return r=>{let o="";for(let s=0;s<n;s++)if(o+=e[s],r[s]!==void 0){const a=t[s];a===Pu?o+=Jn(r[s]):a===Ou?o+=Ce.transform(r[s]):o+=r[s]}return o}}function Pm(e){return zu(Bn(e))}const Om=e=>typeof e=="number"?0:Ce.test(e)?Ce.getAnimatableNone(e):e,zm=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Om(e);function _m(e){const t=Bn(e);return zu(t)(t.values.map((r,o)=>zm(r,t.split[o])))}const ft={test:Lm,parse:Mm,createTransformer:Pm,getAnimatableNone:_m};function Ao(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Nm({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,a=0;if(!t)o=s=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;o=Ao(u,l,e+1/3),s=Ao(u,l,e),a=Ao(u,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}function Yr(e,t){return n=>n>0?t:e}const ye=(e,t,n)=>e+(t-e)*n,Lo=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Vm=[ui,qt,vn],Wm=e=>Vm.find(t=>t.test(e));function Ea(e){const t=Wm(e);if(Fn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===vn&&(n=Nm(n)),n}const Fa=(e,t)=>{const n=Ea(e),r=Ea(t);if(!n||!r)return Yr(e,t);const o={...n};return s=>(o.red=Lo(n.red,r.red,s),o.green=Lo(n.green,r.green,s),o.blue=Lo(n.blue,r.blue,s),o.alpha=ye(n.alpha,r.alpha,s),qt.transform(o))},di=new Set(["none","hidden"]);function Hm(e,t){return di.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Um(e,t){return n=>ye(e,t,n)}function gs(e){return typeof e=="number"?Um:typeof e=="string"?hs(e)?Yr:Ce.test(e)?Fa:Ym:Array.isArray(e)?_u:typeof e=="object"?Ce.test(e)?Fa:$m:Yr}function _u(e,t){const n=[...e],r=n.length,o=e.map((s,a)=>gs(s)(s,t[a]));return s=>{for(let a=0;a<r;a++)n[a]=o[a](s);return n}}function $m(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=gs(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function Gm(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][r[s]],l=e.values[a]??0;n[o]=l,r[s]++}return n}const Ym=(e,t)=>{const n=ft.createTransformer(t),r=Bn(e),o=Bn(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?di.has(e)&&!o.values.length||di.has(t)&&!r.values.length?Hm(e,t):dr(_u(Gm(r,o),o.values),n):(Fn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Yr(e,t))};function Nu(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ye(e,t,n):gs(e)(e,t)}const Km=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ge.update(t,n),stop:()=>_t(t),now:()=>Pe.isProcessing?Pe.timestamp:We.now()}},Vu=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Kr=2e4;function xs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Kr;)t+=n,r=e.next(t);return t>=Kr?1/0:t}function qm(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(xs(r),Kr);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:it(o)}}const ve={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function fi(e,t){return e*Math.sqrt(1-t*t)}const Xm=12;function Zm(e,t,n){let r=n;for(let o=1;o<Xm;o++)r=r-e(r)/t(r);return r}const Io=.001;function Jm({duration:e=ve.duration,bounce:t=ve.bounce,velocity:n=ve.velocity,mass:r=ve.mass}){let o,s;Fn(e<=Ke(ve.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=jt(ve.minDamping,ve.maxDamping,a),e=jt(ve.minDuration,ve.maxDuration,it(e)),a<1?(o=c=>{const d=c*a,h=d*e,p=d-n,m=fi(c,a),g=Math.exp(-h);return Io-p/m*g},s=c=>{const h=c*a*e,p=h*n+n,m=Math.pow(a,2)*Math.pow(c,2)*e,g=Math.exp(-h),x=fi(Math.pow(c,2),a);return(-o(c)+Io>0?-1:1)*((p-m)*g)/x}):(o=c=>{const d=Math.exp(-c*e),h=(c-n)*e+1;return-Io+d*h},s=c=>{const d=Math.exp(-c*e),h=(n-c)*(e*e);return d*h});const l=5/e,u=Zm(o,s,l);if(e=Ke(e),isNaN(u))return{stiffness:ve.stiffness,damping:ve.damping,duration:e};{const c=Math.pow(u,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const Qm=["duration","bounce"],e1=["stiffness","damping","mass"];function Aa(e,t){return t.some(n=>e[n]!==void 0)}function t1(e){let t={velocity:ve.velocity,stiffness:ve.stiffness,damping:ve.damping,mass:ve.mass,isResolvedFromDuration:!1,...e};if(!Aa(e,e1)&&Aa(e,Qm))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*jt(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ve.mass,stiffness:o,damping:s}}else{const n=Jm({...e,velocity:0});t={...t,...n,mass:ve.mass},t.isResolvedFromDuration=!0}return t}function qr(e=ve.visualDuration,t=ve.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:u,damping:c,mass:d,duration:h,velocity:p,isResolvedFromDuration:m}=t1({...n,velocity:-it(n.velocity||0)}),g=p||0,x=c/(2*Math.sqrt(u*d)),y=a-s,v=it(Math.sqrt(u/d)),j=Math.abs(y)<5;r||(r=j?ve.restSpeed.granular:ve.restSpeed.default),o||(o=j?ve.restDelta.granular:ve.restDelta.default);let w,F,B,C,P,A;if(x<1)B=fi(v,x),C=(g+x*v*y)/B,w=L=>{const R=Math.exp(-x*v*L);return a-R*(C*Math.sin(B*L)+y*Math.cos(B*L))},P=x*v*C+y*B,A=x*v*y-C*B,F=L=>Math.exp(-x*v*L)*(P*Math.sin(B*L)+A*Math.cos(B*L));else if(x===1){w=R=>a-Math.exp(-v*R)*(y+(g+v*y)*R);const L=g+v*y;F=R=>Math.exp(-v*R)*(v*L*R-g)}else{const L=v*Math.sqrt(x*x-1);w=O=>{const I=Math.exp(-x*v*O),M=Math.min(L*O,300);return a-I*((g+x*v*y)*Math.sinh(M)+L*y*Math.cosh(M))/L};const R=(g+x*v*y)/L,D=x*v*R-y*L,N=x*v*y-R*L;F=O=>{const I=Math.exp(-x*v*O),M=Math.min(L*O,300);return I*(D*Math.sinh(M)+N*Math.cosh(M))}}const E={calculatedDuration:m&&h||null,velocity:L=>Ke(F(L)),next:L=>{if(!m&&x<1){const D=Math.exp(-x*v*L),N=Math.sin(B*L),O=Math.cos(B*L),I=a-D*(C*N+y*O),M=Ke(D*(P*N+A*O));return l.done=Math.abs(M)<=r&&Math.abs(a-I)<=o,l.value=l.done?a:I,l}const R=w(L);if(m)l.done=L>=h;else{const D=Ke(F(L));l.done=Math.abs(D)<=r&&Math.abs(a-R)<=o}return l.value=l.done?a:R,l},toString:()=>{const L=Math.min(xs(E),Kr),R=Vu(D=>E.next(L*D).value,L,30);return L+"ms "+R},toTransition:()=>{}};return E}qr.applyToOptions=e=>{const t=qm(e,100,qr);return e.ease=t.ease,e.duration=Ke(t.duration),e.type="keyframes",e};const n1=5;function Wu(e,t,n){const r=Math.max(t-n1,0);return ku(n-e(r),t-r)}function hi({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:a,min:l,max:u,restDelta:c=.5,restSpeed:d}){const h=e[0],p={done:!1,value:h},m=A=>l!==void 0&&A<l||u!==void 0&&A>u,g=A=>l===void 0?u:u===void 0||Math.abs(l-A)<Math.abs(u-A)?l:u;let x=n*t;const y=h+x,v=a===void 0?y:a(y);v!==y&&(x=v-h);const j=A=>-x*Math.exp(-A/r),w=A=>v+j(A),F=A=>{const E=j(A),L=w(A);p.done=Math.abs(E)<=c,p.value=p.done?v:L};let B,C;const P=A=>{m(p.value)&&(B=A,C=qr({keyframes:[p.value,g(p.value)],velocity:Wu(w,A,p.value),damping:o,stiffness:s,restDelta:c,restSpeed:d}))};return P(0),{calculatedDuration:null,next:A=>{let E=!1;return!C&&B===void 0&&(E=!0,F(A),P(A)),B!==void 0&&A>=B?C.next(A-B):(!E&&F(A),p)}}}function r1(e,t,n){const r=[],o=n||zt.mix||Nu,s=e.length-1;for(let a=0;a<s;a++){let l=o(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||st:t;l=dr(u,l)}r.push(l)}return r}function o1(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Ft(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=r1(t,r,o),u=l.length,c=d=>{if(a&&d<e[0])return t[0];let h=0;if(u>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const p=or(e[h],e[h+1],d);return l[h](p)};return n?d=>c(jt(e[0],e[s-1],d)):c}function i1(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=or(0,t,r);e.push(ye(n,1,o))}}function s1(e){const t=[0];return i1(t,e.length-1),t}function a1(e,t){return e.map(n=>n*t)}function l1(e,t){return e.map(()=>t||Au).splice(0,e.length-1)}function kn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=xm(r)?r.map(Ca):Ca(r),s={done:!1,value:t[0]},a=a1(n&&n.length===t.length?n:s1(t),e),l=o1(a,t,{ease:Array.isArray(o)?o:l1(t,o)});return{calculatedDuration:e,next:u=>(s.value=l(u),s.done=u>=e,s)}}const c1=e=>e!==null;function uo(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(c1),l=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!l||r===void 0?s[l]:r}const u1={decay:hi,inertia:hi,tween:kn,keyframes:kn,spring:qr};function Hu(e){typeof e.type=="string"&&(e.type=u1[e.type])}class ys{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const d1=e=>e/100;class Xr extends ys{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==We.now()&&this.tick(We.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Hu(t);const{type:n=kn,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:a=0}=t;let{keyframes:l}=t;const u=n||kn;process.env.NODE_ENV!=="production"&&u!==kn&&Ft(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),u!==kn&&typeof l[0]!="number"&&(this.mixKeyframes=dr(d1,Nu(l[0],l[1])),l=[0,100]);const c=u({...t,keyframes:l});s==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=xs(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:d,repeat:h,repeatType:p,repeatDelay:m,type:g,onUpdate:x,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),j=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,F=r;if(h){const A=Math.min(this.currentTime,o)/l;let E=Math.floor(A),L=A%1;!L&&A>=1&&(L=1),L===1&&E--,E=Math.min(E,h+1),!!(E%2)&&(p==="reverse"?(L=1-L,m&&(L-=m/l)):p==="mirror"&&(F=a)),w=jt(0,1,L)*l}let B;j?(this.delayState.value=d[0],B=this.delayState):B=F.next(w),s&&!j&&(B.value=s(B.value));let{done:C}=B;!j&&u!==null&&(C=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return P&&g!==hi&&(B.value=uo(d,this.options,y,this.speed)),x&&x(B.value),P&&this.finish(),B}then(t,n){return this.finished.then(t,n)}get duration(){return it(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+it(t)}get time(){return it(this.currentTime)}set time(t){t=Ke(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Wu(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(We.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=it(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=Km,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(s=(o=this.options).onPlay)==null||s.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(We.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function f1(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Xt=e=>e*180/Math.PI,pi=e=>{const t=Xt(Math.atan2(e[1],e[0]));return mi(t)},h1={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:pi,rotateZ:pi,skewX:e=>Xt(Math.atan(e[1])),skewY:e=>Xt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},mi=e=>(e=e%360,e<0&&(e+=360),e),La=pi,Ia=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Da=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),p1={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ia,scaleY:Da,scale:e=>(Ia(e)+Da(e))/2,rotateX:e=>mi(Xt(Math.atan2(e[6],e[5]))),rotateY:e=>mi(Xt(Math.atan2(-e[2],e[0]))),rotateZ:La,rotate:La,skewX:e=>Xt(Math.atan(e[4])),skewY:e=>Xt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function gi(e){return e.includes("scale")?1:0}function xi(e,t){if(!e||e==="none")return gi(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=p1,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=h1,o=l}if(!o)return gi(t);const s=r[t],a=o[1].split(",").map(g1);return typeof s=="function"?s(a):a[s]}const m1=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return xi(n,t)};function g1(e){return parseFloat(e.trim())}const Ln=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],In=new Set(Ln),Ra=e=>e===An||e===q,x1=new Set(["x","y","z"]),y1=Ln.filter(e=>!x1.has(e));function b1(e){const t=[];return y1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ot={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const o=e.max-e.min;return r==="border-box"?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const o=e.max-e.min;return r==="border-box"?o:o-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>xi(t,"x"),y:(e,{transform:t})=>xi(t,"y")};Ot.translateX=Ot.x;Ot.translateY=Ot.y;const Jt=new Set;let yi=!1,bi=!1,vi=!1;function Uu(){if(bi){const e=Array.from(Jt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=b1(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,a])=>{var l;(l=r.getValue(s))==null||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}bi=!1,yi=!1,Jt.forEach(e=>e.complete(vi)),Jt.clear()}function $u(){Jt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(bi=!0)})}function v1(){vi=!0,$u(),Uu(),vi=!1}class bs{constructor(t,n,r,o,s,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Jt.add(this),yi||(yi=!0,ge.read($u),ge.resolveKeyframes(Uu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}f1(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Jt.delete(this)}cancel(){this.state==="scheduled"&&(Jt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const k1=e=>e.startsWith("--");function Gu(e,t,n){k1(t)?e.style.setProperty(t,n):e.style[t]=n}const w1={};function Yu(e,t){const n=vu(e);return()=>w1[t]??n()}const S1=Yu(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ku=Yu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),qn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ma={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:qn([0,.65,.55,1]),circOut:qn([.55,0,1,.45]),backIn:qn([.31,.01,.66,-.59]),backOut:qn([.33,1.53,.69,.99])};function qu(e,t){if(e)return typeof e=="function"?Ku()?Vu(e,t):"ease-out":Lu(e)?qn(e):Array.isArray(e)?e.map(n=>qu(n,t)||Ma.easeOut):Ma[e]}function C1(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:a="loop",ease:l="easeOut",times:u}={},c=void 0){const d={[t]:n};u&&(d.offset=u);const h=qu(l,o);Array.isArray(h)&&(d.easing=h);const p={delay:r,duration:o,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),e.animate(d,p)}function Xu(e){return typeof e=="function"&&"applyToOptions"in e}function j1({type:e,...t}){return Xu(e)&&Ku()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Zu extends ys{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:a=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!s,this.allowFlatten=a,this.options=t,Ft(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=j1(t);this.animation=C1(n,r,o,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const d=uo(o,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Gu(n,r,d),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,o;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((o=(r=this.animation).commitStyles)==null||o.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return it(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+it(t)}get time(){return it(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ke(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:o}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&S1()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),st):o(this)}}const Ju={anticipate:Bu,backInOut:Tu,circInOut:Fu};function T1(e){return e in Ju}function B1(e){typeof e.ease=="string"&&T1(e.ease)&&(e.ease=Ju[e.ease])}const Do=10;class E1 extends Zu{constructor(t){B1(t),Hu(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new Xr({...a,autoplay:!1}),u=Math.max(Do,We.now()-this.startTime),c=jt(0,Do,u-Do),d=l.sample(u).value,{name:h}=this.options;s&&h&&Gu(s,h,d),n.setWithVelocity(l.sample(Math.max(0,u-c)).value,d,c),l.stop()}}const Pa=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ft.test(e)||e==="0")&&!e.startsWith("url("));function F1(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function A1(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=Pa(o,t),l=Pa(s,t);return Fn(a===l,`You are trying to animate ${t} from "${o}" to "${s}". "${a?s:o}" is not an animatable value.`,"value-not-animatable"),!a||!l?!1:F1(e)||(n==="spring"||Xu(n))&&r}function ki(e){e.duration=0,e.type="keyframes"}const Qu=new Set(["opacity","clipPath","filter","transform"]),L1=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function I1(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&L1.test(e[t]))return!0;return!1}const D1=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),R1=vu(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function M1(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:a,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return R1()&&n&&(Qu.has(n)||D1.has(n)&&I1(l))&&(n!=="transform"||!d)&&!c&&!r&&o!=="mirror"&&s!==0&&a!=="inertia"}const P1=40;class O1 extends ys{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",keyframes:l,name:u,motionValue:c,element:d,...h}){var g;super(),this.stop=()=>{var x,y;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=We.now();const p={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:a,name:u,motionValue:c,element:d,...h},m=(d==null?void 0:d.KeyframeResolver)||bs;this.keyframeResolver=new m(l,(x,y,v)=>this.onKeyframesResolved(x,y,p,!v),u,c,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,o){var v,j;this.keyframeResolver=void 0;const{name:s,type:a,velocity:l,delay:u,isHandoff:c,onUpdate:d}=r;this.resolvedAt=We.now();let h=!0;A1(t,s,a,l)||(h=!1,(zt.instantAnimations||!u)&&(d==null||d(uo(t,r,n))),t[0]=t[t.length-1],ki(r),r.repeat=0);const m={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>P1?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=h&&!c&&M1(m),x=(j=(v=m.motionValue)==null?void 0:v.owner)==null?void 0:j.current;let y;if(g)try{y=new E1({...m,element:x})}catch{y=new Xr(m)}else y=new Xr(m);y.finished.then(()=>{this.notifyFinished()}).catch(st),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),v1()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function ed(e,t,n,r=0,o=1){const s=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),a=e.size,l=(a-1)*r;return typeof n=="function"?n(s,a):o===1?s*r:l-s*r}const z1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _1(e){const t=z1.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const N1=4;function td(e,t,n=1){Ft(n<=N1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=_1(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return xu(a)?parseFloat(a):a}return hs(o)?td(o,t,n+1):o}const V1={type:"spring",stiffness:500,damping:25,restSpeed:10},W1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),H1={type:"keyframes",duration:.8},U1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$1=(e,{keyframes:t})=>t.length>2?H1:In.has(e)?e.startsWith("scale")?W1(t[1]):V1:U1;function nd(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function vs(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?nd(n,e):n}const G1=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Y1(e){for(const t in e)if(!G1.has(t))return!0;return!1}const ks=(e,t,n,r={},o,s)=>a=>{const l=vs(r,e)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Ke(u);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:o};Y1(l)||Object.assign(d,$1(e,d)),d.duration&&(d.duration=Ke(d.duration)),d.repeatDelay&&(d.repeatDelay=Ke(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(ki(d),d.delay===0&&(h=!0)),(zt.instantAnimations||zt.skipAnimations||o!=null&&o.shouldSkipAnimations)&&(h=!0,ki(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!s&&t.get()!==void 0){const p=uo(d.keyframes,l);if(p!==void 0){ge.update(()=>{d.onUpdate(p),d.onComplete()});return}}return l.isSync?new Xr(d):new O1(d)};function Oa(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ws(e,t,n,r){if(typeof t=="function"){const[o,s]=Oa(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Oa(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Qt(e,t,n){const r=e.getProps();return ws(r,t,n!==void 0?n:r.custom,e)}const rd=new Set(["width","height","top","left","right","bottom",...Ln]),za=30,K1=e=>!isNaN(parseFloat(e));class q1{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const o=We.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=We.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=K1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&us(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new cs);const r=this.events[t].add(n);return t==="change"?()=>{r(),ge.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=We.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>za)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,za);return ku(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function En(e,t){return new q1(e,t)}const wi=e=>Array.isArray(e);function X1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,En(n))}function Z1(e){return wi(e)?e[e.length-1]||0:e}function J1(e,t){const n=Qt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const a in s){const l=Z1(s[a]);X1(e,a,l)}}const Oe=e=>!!(e&&e.getVelocity);function Q1(e){return!!(Oe(e)&&e.add)}function Si(e,t){const n=e.getValue("willChange");if(Q1(n))return n.add(t);if(!n&&zt.WillChange){const r=new zt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Ss(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const eg="framerAppearId",od="data-"+Ss(eg);function id(e){return e.props[od]}function tg({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function sd(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s,transitionEnd:a,...l}=t;const u=e.getDefaultTransition();s=s?nd(s,u):u;const c=s==null?void 0:s.reduceMotion;r&&(s=r);const d=[],h=o&&e.animationState&&e.animationState.getState()[o];for(const p in l){const m=e.getValue(p,e.latestValues[p]??null),g=l[p];if(g===void 0||h&&tg(h,p))continue;const x={delay:n,...vs(s||{},p)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===y&&!x.velocity){ge.update(()=>m.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const F=id(e);if(F){const B=window.MotionHandoffAnimation(F,p,ge);B!==null&&(x.startTime=B,v=!0)}}Si(e,p);const j=c??e.shouldReduceMotion;m.start(ks(p,m,g,j&&rd.has(p)?{type:!1}:x,e,v));const w=m.animation;w&&d.push(w)}if(a){const p=()=>ge.update(()=>{a&&J1(e,a)});d.length?Promise.all(d).then(p):p()}return d}function Ci(e,t,n={}){var u;const r=Qt(e,t,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(sd(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=o;return ng(e,t,c,d,h,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,d]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>d())}else return Promise.all([s(),a(n.delay)])}function ng(e,t,n=0,r=0,o=0,s=1,a){const l=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),l.push(Ci(u,t,{...a,delay:n+(typeof r=="function"?0:r)+ed(e.variantChildren,u,r,o,s)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function rg(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Ci(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Ci(e,t,n);else{const o=typeof t=="function"?Qt(e,t,n.custom):t;r=Promise.all(sd(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const og={test:e=>e==="auto",parse:e=>e},ad=e=>t=>t.test(e),ld=[An,q,St,Mt,Fm,Em,og],_a=e=>ld.find(ad(e));function ig(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||bu(e):!0}const sg=new Set(["brightness","contrast","saturate","opacity"]);function ag(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ps)||[];if(!r)return e;const o=n.replace(r,"");let s=sg.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const lg=/\b([a-z-]*)\(.*?\)/gu,ji={...ft,getAnimatableNone:e=>{const t=e.match(lg);return t?t.map(ag).join(" "):e}},Ti={...ft,getAnimatableNone:e=>{const t=ft.parse(e);return ft.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Na={...An,transform:Math.round},cg={rotate:Mt,rotateX:Mt,rotateY:Mt,rotateZ:Mt,scale:jr,scaleX:jr,scaleY:jr,scaleZ:jr,skew:Mt,skewX:Mt,skewY:Mt,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:ir,originX:Ta,originY:Ta,originZ:q},Cs={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,...cg,zIndex:Na,fillOpacity:ir,strokeOpacity:ir,numOctaves:Na},ug={...Cs,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:ji,WebkitFilter:ji,mask:Ti,WebkitMask:Ti},cd=e=>ug[e],dg=new Set([ji,Ti]);function ud(e,t){let n=cd(e);return dg.has(n)||(n=ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fg=new Set(["auto","none","0"]);function hg(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!fg.has(s)&&Bn(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=ud(n,o)}class pg extends bs{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),hs(h))){const p=td(h,n.current);p!==void 0&&(t[d]=p),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!rd.has(r)||t.length!==2)return;const[o,s]=t,a=_a(o),l=_a(s),u=ja(o),c=ja(s);if(u!==c&&Ot[r]){this.needsMeasurement=!0;return}if(a!==l)if(Ra(a)&&Ra(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Ot[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||ig(t[o]))&&r.push(o);r.length&&hg(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ot[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,a=r[s];r[s]=Ot[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([u,c])=>{t.getValue(u).set(c)}),this.resolveNoneKeyframes()}}function dd(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const fd=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Or(e){return yu(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:js}=Iu(queueMicrotask,!1),dt={x:!1,y:!1};function hd(){return dt.x||dt.y}function mg(e){return e==="x"||e==="y"?dt[e]?null:(dt[e]=!0,()=>{dt[e]=!1}):dt.x||dt.y?null:(dt.x=dt.y=!0,()=>{dt.x=dt.y=!1})}function pd(e,t){const n=dd(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function gg(e){return!(e.pointerType==="touch"||hd())}function xg(e,t,n={}){const[r,o,s]=pd(e,n);return r.forEach(a=>{let l=!1,u=!1,c;const d=()=>{a.removeEventListener("pointerleave",g)},h=y=>{c&&(c(y),c=void 0),d()},p=y=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),u&&(u=!1,h(y))},m=()=>{l=!0,window.addEventListener("pointerup",p,o),window.addEventListener("pointercancel",p,o)},g=y=>{if(y.pointerType!=="touch"){if(l){u=!0;return}h(y)}},x=y=>{if(!gg(y))return;u=!1;const v=t(a,y);typeof v=="function"&&(c=v,a.addEventListener("pointerleave",g,o))};a.addEventListener("pointerenter",x,o),a.addEventListener("pointerdown",m,o)}),s}const md=(e,t)=>t?e===t?!0:md(e,t.parentElement):!1,Ts=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,yg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function bg(e){return yg.has(e.tagName)||e.isContentEditable===!0}const vg=new Set(["INPUT","SELECT","TEXTAREA"]);function kg(e){return vg.has(e.tagName)||e.isContentEditable===!0}const zr=new WeakSet;function Va(e){return t=>{t.key==="Enter"&&e(t)}}function Ro(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const wg=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Va(()=>{if(zr.has(n))return;Ro(n,"down");const o=Va(()=>{Ro(n,"up")}),s=()=>Ro(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Wa(e){return Ts(e)&&!hd()}const Ha=new WeakSet;function Sg(e,t,n={}){const[r,o,s]=pd(e,n),a=l=>{const u=l.currentTarget;if(!Wa(l)||Ha.has(l))return;zr.add(u),n.stopPropagation&&Ha.add(l);const c=t(u,l),d=(m,g)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),zr.has(u)&&zr.delete(u),Wa(m)&&typeof c=="function"&&c(m,{success:g})},h=m=>{d(m,u===window||u===document||n.useGlobalTarget||md(u,m.target))},p=m=>{d(m,!1)};window.addEventListener("pointerup",h,o),window.addEventListener("pointercancel",p,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,o),Or(l)&&(l.addEventListener("focus",c=>wg(c,o)),!bg(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),s}function Bs(e){return yu(e)&&"ownerSVGElement"in e}const _r=new WeakMap;let Pt;const gd=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:Bs(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Cg=gd("inline","width","offsetWidth"),jg=gd("block","height","offsetHeight");function Tg({target:e,borderBoxSize:t}){var n;(n=_r.get(e))==null||n.forEach(r=>{r(e,{get width(){return Cg(e,t)},get height(){return jg(e,t)}})})}function Bg(e){e.forEach(Tg)}function Eg(){typeof ResizeObserver>"u"||(Pt=new ResizeObserver(Bg))}function Fg(e,t){Pt||Eg();const n=dd(e);return n.forEach(r=>{let o=_r.get(r);o||(o=new Set,_r.set(r,o)),o.add(t),Pt==null||Pt.observe(r)}),()=>{n.forEach(r=>{const o=_r.get(r);o==null||o.delete(t),o!=null&&o.size||Pt==null||Pt.unobserve(r)})}}const Nr=new Set;let wn;function Ag(){wn=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Nr.forEach(t=>t(e))},window.addEventListener("resize",wn)}function Lg(e){return Nr.add(e),wn||Ag(),()=>{Nr.delete(e),!Nr.size&&typeof wn=="function"&&(window.removeEventListener("resize",wn),wn=void 0)}}function Ua(e,t){return typeof e=="function"?Lg(e):Fg(e,t)}function Ig(e){return Bs(e)&&e.tagName==="svg"}const Dg=[...ld,Ce,ft],Rg=e=>Dg.find(ad(e)),$a=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sn=()=>({x:$a(),y:$a()}),Ga=()=>({min:0,max:0}),Fe=()=>({x:Ga(),y:Ga()}),Mg=new WeakMap;function fo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function sr(e){return typeof e=="string"||Array.isArray(e)}const Es=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fs=["initial",...Es];function ho(e){return fo(e.animate)||Fs.some(t=>sr(e[t]))}function xd(e){return!!(ho(e)||e.variants)}function Pg(e,t,n){for(const r in t){const o=t[r],s=n[r];if(Oe(o))e.addValue(r,o);else if(Oe(s))e.addValue(r,En(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,En(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Bi={current:null},yd={current:!1},Og=typeof window<"u";function zg(){if(yd.current=!0,!!Og)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Bi.current=e.matches;e.addEventListener("change",t),t()}else Bi.current=!1}const Ya=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Zr={};function bd(e){Zr=e}function _g(){return Zr}class Ng{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:s,blockInitialAnimation:a,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=We.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ge.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=l;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=s,this.options=u,this.blockInitialAnimation=!!a,this.isControllingVariants=ho(n),this.isVariantNode=xd(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const g=p[m];c[m]!==void 0&&Oe(g)&&g.set(c[m])}}mount(t){var n,r;if(this.hasBeenMounted)for(const o in this.initialValues)(n=this.values.get(o))==null||n.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];this.current=t,Mg.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,s)=>this.bindToMotionValue(s,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(yd.current||zg(),this.shouldReduceMotion=Bi.current),process.env.NODE_ENV!=="production"&&us(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),_t(this.notifyUpdate),_t(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Qu.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:l,times:u,ease:c,duration:d}=n.accelerate,h=new Zu({element:this.current,name:t,keyframes:l,times:u,ease:c,duration:Ke(d)}),p=a(h);this.valueSubscriptions.set(t,()=>{p(),h.cancel()});return}const r=In.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ge.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Zr){const n=Zr[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Fe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ya.length;r++){const o=Ya[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,a=t[s];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=Pg(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=En(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(xu(r)||bu(r))?r=parseFloat(r):!Rg(r)&&ft.test(n)&&(r=ud(t,n)),this.setBaseTarget(t,Oe(r)?r.get():r)),Oe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=ws(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Oe(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new cs),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){js.render(this.render)}}class vd extends Ng{constructor(){super(...arguments),this.KeyframeResolver=pg}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Oe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Nt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function kd({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Vg({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Wg(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Mo(e){return e===void 0||e===1}function Ei({scale:e,scaleX:t,scaleY:n}){return!Mo(e)||!Mo(t)||!Mo(n)}function Kt(e){return Ei(e)||wd(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wd(e){return Ka(e.x)||Ka(e.y)}function Ka(e){return e&&e!=="0%"}function Jr(e,t,n){const r=e-n,o=t*r;return n+o}function qa(e,t,n,r,o){return o!==void 0&&(e=Jr(e,o,r)),Jr(e,n,r)+t}function Fi(e,t=0,n=1,r,o){e.min=qa(e.min,t,n,r,o),e.max=qa(e.max,t,n,r,o)}function Sd(e,{x:t,y:n}){Fi(e.x,t.translate,t.scale,t.originPoint),Fi(e.y,n.translate,n.scale,n.originPoint)}const Xa=.999999999999,Za=1.0000000000001;function Hg(e,t,n,r=!1){var l;const o=n.length;if(!o)return;t.x=t.y=1;let s,a;for(let u=0;u<o;u++){s=n[u],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(vt(e.x,-s.scroll.offset.x),vt(e.y,-s.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Sd(e,a)),r&&Kt(s.latestValues)&&Vr(e,s.latestValues,(l=s.layout)==null?void 0:l.layoutBox))}t.x<Za&&t.x>Xa&&(t.x=1),t.y<Za&&t.y>Xa&&(t.y=1)}function vt(e,t){e.min+=t,e.max+=t}function Ja(e,t,n,r,o=.5){const s=ye(e.min,e.max,o);Fi(e,t,n,s,r)}function Qa(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Vr(e,t,n){const r=n??e;Ja(e.x,Qa(t.x,r.x),t.scaleX,t.scale,t.originX),Ja(e.y,Qa(t.y,r.y),t.scaleY,t.scale,t.originY)}function Cd(e,t){return kd(Wg(e.getBoundingClientRect(),t))}function Ug(e,t,n){const r=Cd(e,n),{scroll:o}=t;return o&&(vt(r.x,o.offset.x),vt(r.y,o.offset.y)),r}const $g={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gg=Ln.length;function Yg(e,t,n){let r="",o=!0;for(let s=0;s<Gg;s++){const a=Ln[s],l=e[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{const c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||n){const c=fd(l,Cs[a]);if(!u){o=!1;const d=$g[a]||a;r+=`${d}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function As(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let a=!1,l=!1;for(const u in t){const c=t[u];if(In.has(u)){a=!0;continue}else if(Ru(u)){o[u]=c;continue}else{const d=fd(c,Cs[u]);u.startsWith("origin")?(l=!0,s[u]=d):r[u]=d}}if(t.transform||(a||n?r.transform=Yg(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:c="50%",originZ:d=0}=s;r.transformOrigin=`${u} ${c} ${d}`}}function jd(e,{style:t,vars:n},r,o){const s=e.style;let a;for(a in t)s[a]=t[a];o==null||o.applyProjectionStyles(s,r);for(a in n)s.setProperty(a,n[a])}function el(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(q.test(e))e=parseFloat(e);else return e;const n=el(e,t.target.x),r=el(e,t.target.y);return`${n}% ${r}%`}},Kg={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ft.parse(e);if(o.length>5)return r;const s=ft.createTransformer(e),a=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;o[0+a]/=l,o[1+a]/=u;const c=ye(l,u,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),s(o)}},Ai={borderRadius:{...Vn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vn,borderTopRightRadius:Vn,borderBottomLeftRadius:Vn,borderBottomRightRadius:Vn,boxShadow:Kg};function Td(e,{layout:t,layoutId:n}){return In.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ai[e]||e==="opacity")}function Ls(e,t,n){var a;const r=e.style,o=t==null?void 0:t.style,s={};if(!r)return s;for(const l in r)(Oe(r[l])||o&&Oe(o[l])||Td(l,e)||((a=n==null?void 0:n.getValue(l))==null?void 0:a.liveStyle)!==void 0)&&(s[l]=r[l]);return s}function qg(e){return window.getComputedStyle(e)}class Xg extends vd{constructor(){super(...arguments),this.type="html",this.renderInstance=jd}readValueFromInstance(t,n){var r;if(In.has(n))return(r=this.projection)!=null&&r.isProjecting?gi(n):m1(t,n);{const o=qg(t),s=(Ru(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Cd(t,n)}build(t,n,r){As(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ls(t,n,r)}}const Zg={offset:"stroke-dashoffset",array:"stroke-dasharray"},Jg={offset:"strokeDashoffset",array:"strokeDasharray"};function Qg(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?Zg:Jg;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const ex=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Bd(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:a=0,...l},u,c,d){if(As(e,l,c),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const m of ex)h[m]!==void 0&&(p[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&Qg(h,o,s,a,!1)}const Ed=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Fd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function tx(e,t,n,r){jd(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ed.has(o)?o:Ss(o),t.attrs[o])}function Ad(e,t,n){const r=Ls(e,t,n);for(const o in e)if(Oe(e[o])||Oe(t[o])){const s=Ln.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}class nx extends vd{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Fe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(In.has(n)){const r=cd(n);return r&&r.default||0}return n=Ed.has(n)?n:Ss(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ad(t,n,r)}build(t,n,r){Bd(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){tx(t,n,r,o)}mount(t){this.isSVGTag=Fd(t.tagName),super.mount(t)}}const rx=Fs.length;function Ld(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ld(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<rx;n++){const r=Fs[n],o=e.props[r];(sr(o)||o===!1)&&(t[r]=o)}return t}function Id(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const ox=[...Es].reverse(),ix=Es.length;function sx(e){return t=>Promise.all(t.map(({animation:n,options:r})=>rg(e,n,r)))}function ax(e){let t=sx(e),n=tl(),r=!0,o=!1;const s=c=>(d,h)=>{var m;const p=Qt(e,h,c==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(p){const{transition:g,transitionEnd:x,...y}=p;d={...d,...y,...x}}return d};function a(c){t=c(e)}function l(c){const{props:d}=e,h=Ld(e.parent)||{},p=[],m=new Set;let g={},x=1/0;for(let v=0;v<ix;v++){const j=ox[v],w=n[j],F=d[j]!==void 0?d[j]:h[j],B=sr(F),C=j===c?w.isActive:null;C===!1&&(x=v);let P=F===h[j]&&F!==d[j]&&B;if(P&&(r||o)&&e.manuallyAnimateOnMount&&(P=!1),w.protectedKeys={...g},!w.isActive&&C===null||!F&&!w.prevProp||fo(F)||typeof F=="boolean")continue;if(j==="exit"&&w.isActive&&C!==!0){w.prevResolvedValues&&(g={...g,...w.prevResolvedValues});continue}const A=lx(w.prevProp,F);let E=A||j===c&&w.isActive&&!P&&B||v>x&&B,L=!1;const R=Array.isArray(F)?F:[F];let D=R.reduce(s(j),{});C===!1&&(D={});const{prevResolvedValues:N={}}=w,O={...N,...D},I=W=>{E=!0,m.has(W)&&(L=!0,m.delete(W)),w.needsAnimating[W]=!0;const $=e.getValue(W);$&&($.liveStyle=!1)};for(const W in O){const $=D[W],b=N[W];if(g.hasOwnProperty(W))continue;let Y=!1;wi($)&&wi(b)?Y=!Id($,b):Y=$!==b,Y?$!=null?I(W):m.add(W):$!==void 0&&m.has(W)?I(W):w.protectedKeys[W]=!0}w.prevProp=F,w.prevResolvedValues=D,w.isActive&&(g={...g,...D}),(r||o)&&e.blockInitialAnimation&&(E=!1);const M=P&&A;E&&(!M||L)&&p.push(...R.map(W=>{const $={type:j};if(typeof W=="string"&&(r||o)&&!M&&e.manuallyAnimateOnMount&&e.parent){const{parent:b}=e,Y=Qt(b,W);if(b.enteringChildren&&Y){const{delayChildren:oe}=Y.transition||{};$.delay=ed(b.enteringChildren,e,oe)}}return{animation:W,options:$}}))}if(m.size){const v={};if(typeof d.initial!="boolean"){const j=Qt(e,Array.isArray(d.initial)?d.initial[0]:d.initial);j&&j.transition&&(v.transition=j.transition)}m.forEach(j=>{const w=e.getBaseTarget(j),F=e.getValue(j);F&&(F.liveStyle=!0),v[j]=w??null}),p.push({animation:v})}let y=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,o=!1,y?t(p):Promise.resolve()}function u(c,d){var p;if(n[c].isActive===d)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(c,d)}),n[c].isActive=d;const h=l(c);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:u,setAnimateFunction:a,getState:()=>n,reset:()=>{n=tl(),o=!0}}}function lx(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Id(t,e):!1}function $t(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function tl(){return{animate:$t(!0),whileInView:$t(),whileHover:$t(),whileTap:$t(),whileDrag:$t(),whileFocus:$t(),exit:$t()}}function Li(e,t){e.min=t.min,e.max=t.max}function ut(e,t){Li(e.x,t.x),Li(e.y,t.y)}function nl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Dd=1e-4,cx=1-Dd,ux=1+Dd,Rd=.01,dx=0-Rd,fx=0+Rd;function He(e){return e.max-e.min}function hx(e,t,n){return Math.abs(e-t)<=n}function rl(e,t,n,r=.5){e.origin=r,e.originPoint=ye(t.min,t.max,e.origin),e.scale=He(n)/He(t),e.translate=ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=cx&&e.scale<=ux||isNaN(e.scale))&&(e.scale=1),(e.translate>=dx&&e.translate<=fx||isNaN(e.translate))&&(e.translate=0)}function Qn(e,t,n,r){rl(e.x,t.x,n.x,r?r.originX:void 0),rl(e.y,t.y,n.y,r?r.originY:void 0)}function ol(e,t,n,r=0){const o=r?ye(n.min,n.max,r):n.min;e.min=o+t.min,e.max=e.min+He(t)}function px(e,t,n,r){ol(e.x,t.x,n.x,r==null?void 0:r.x),ol(e.y,t.y,n.y,r==null?void 0:r.y)}function il(e,t,n,r=0){const o=r?ye(n.min,n.max,r):n.min;e.min=t.min-o,e.max=e.min+He(t)}function Qr(e,t,n,r){il(e.x,t.x,n.x,r==null?void 0:r.x),il(e.y,t.y,n.y,r==null?void 0:r.y)}function sl(e,t,n,r,o){return e-=t,e=Jr(e,1/n,r),o!==void 0&&(e=Jr(e,1/o,r)),e}function mx(e,t=0,n=1,r=.5,o,s=e,a=e){if(St.test(t)&&(t=parseFloat(t),t=ye(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=ye(s.min,s.max,r);e===s&&(l-=t),e.min=sl(e.min,t,n,l,o),e.max=sl(e.max,t,n,l,o)}function al(e,t,[n,r,o],s,a){mx(e,t[n],t[r],t[o],t.scale,s,a)}const gx=["x","scaleX","originX"],xx=["y","scaleY","originY"];function ll(e,t,n,r){al(e.x,t,gx,n?n.x:void 0,r?r.x:void 0),al(e.y,t,xx,n?n.y:void 0,r?r.y:void 0)}function cl(e){return e.translate===0&&e.scale===1}function Md(e){return cl(e.x)&&cl(e.y)}function ul(e,t){return e.min===t.min&&e.max===t.max}function yx(e,t){return ul(e.x,t.x)&&ul(e.y,t.y)}function dl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Pd(e,t){return dl(e.x,t.x)&&dl(e.y,t.y)}function fl(e){return He(e.x)/He(e.y)}function hl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function yt(e){return[e("x"),e("y")]}function bx(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||s||a)&&(r=`translate3d(${o}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:h,rotateY:p,skewX:m,skewY:g}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),g&&(r+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const Od=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],vx=Od.length,pl=e=>typeof e=="string"?parseFloat(e):e,ml=e=>typeof e=="number"||q.test(e);function kx(e,t,n,r,o,s){o?(e.opacity=ye(0,n.opacity??1,wx(r)),e.opacityExit=ye(t.opacity??1,0,Sx(r))):s&&(e.opacity=ye(t.opacity??1,n.opacity??1,r));for(let a=0;a<vx;a++){const l=Od[a];let u=gl(t,l),c=gl(n,l);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||ml(u)===ml(c)?(e[l]=Math.max(ye(pl(u),pl(c),r),0),(St.test(c)||St.test(u))&&(e[l]+="%")):e[l]=c}(t.rotate||n.rotate)&&(e.rotate=ye(t.rotate||0,n.rotate||0,r))}function gl(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const wx=zd(0,.5,Eu),Sx=zd(.5,.95,st);function zd(e,t,n){return r=>r<e?0:r>t?1:n(or(e,t,r))}function Cx(e,t,n){const r=Oe(e)?e:En(e);return r.start(ks("",r,t,n)),r.animation}function ar(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const jx=(e,t)=>e.depth-t.depth;class Tx{constructor(){this.children=[],this.isDirty=!1}add(t){ls(this.children,t),this.isDirty=!0}remove(t){Gr(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(jx),this.isDirty=!1,this.children.forEach(t)}}function Bx(e,t){const n=We.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(_t(r),e(s-t))};return ge.setup(r,!0),()=>_t(r)}function Wr(e){return Oe(e)?e.get():e}class Ex{constructor(){this.members=[]}add(t){ls(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;(!o||o.isConnected===!1)&&!r.snapshot&&(Gr(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Gr(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1&&((n=o.instance)==null?void 0:n.isConnected)!==!1)return this.promote(o),!0}return!1}promote(t,n){var o;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=r.options,{layoutDependency:a}=t.options;(s===void 0||s!==a)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(o=t.root)!=null&&o.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,o,s,a;(r=(n=t.options).onExitComplete)==null||r.call(n),(a=(o=t.resumingFrom)==null?void 0:(s=o.options).onExitComplete)==null||a.call(s)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Hr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Po=["","X","Y","Z"],Fx=1e3;let Ax=0;function Oo(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function _d(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=id(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ge,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&_d(r)}function Nd({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},l=t==null?void 0:t()){this.id=Ax++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Dx),this.nodes.forEach(_x),this.nodes.forEach(Nx),this.nodes.forEach(Rx)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Tx)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new cs),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const u=this.eventHandlers.get(a);u&&u.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Bs(a)&&!Ig(a),this.instance=a;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const p=()=>this.root.updateBlockedByResize=!1;ge.read(()=>{h=window.innerWidth}),e(a,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,d&&d(),d=Bx(p,250),Hr.hasAnimatedSinceResize&&(Hr.hasAnimatedSinceResize=!1,this.nodes.forEach(bl)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||$x,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=c.getProps(),v=!this.targetLayout||!Pd(this.targetLayout,m),j=!h&&p;if(this.options.layoutRoot||this.resumeFrom||j||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...vs(g,"layout"),onPlay:x,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,j)}else h||bl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),_t(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Vx),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&_d(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(Px),this.nodes.forEach(xl);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(yl);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ox),this.nodes.forEach(zx),this.nodes.forEach(Lx),this.nodes.forEach(Ix)):this.nodes.forEach(yl),this.clearAllSnapshots();const l=We.now();Pe.delta=jt(0,1e3/60,l-Pe.timestamp),Pe.timestamp=l,Pe.isProcessing=!0,Eo.update.process(Pe),Eo.preRender.process(Pe),Eo.render.process(Pe),Pe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,js.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Mx),this.sharedNodes.forEach(Wx)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ge.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ge.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!He(this.snapshot.measuredBox.x)&&!He(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Fe()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Md(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;a&&this.instance&&(l||Kt(this.latestValues)||d)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return a&&(u=this.removeTransform(u)),Gx(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:a}=this.options;if(!a)return Fe();const l=a.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(Yx))){const{scroll:d}=this.root;d&&(vt(l.x,d.offset.x),vt(l.y,d.offset.y))}return l}removeElementScroll(a){var u;const l=Fe();if(ut(l,a),(u=this.scroll)!=null&&u.wasRoot)return l;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:h,options:p}=d;d!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&ut(l,a),vt(l.x,h.offset.x),vt(l.y,h.offset.y))}return l}applyTransform(a,l=!1,u){var d,h;const c=u||Fe();ut(c,a);for(let p=0;p<this.path.length;p++){const m=this.path[p];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(vt(c.x,-m.scroll.offset.x),vt(c.y,-m.scroll.offset.y)),Kt(m.latestValues)&&Vr(c,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return Kt(this.latestValues)&&Vr(c,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),c}removeTransform(a){var u;const l=Fe();ut(l,a);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!Kt(d.latestValues))continue;let h;d.instance&&(Ei(d.latestValues)&&d.updateSnapshot(),h=Fe(),ut(h,d.measurePageBox())),ll(l,d.latestValues,(u=d.snapshot)==null?void 0:u.layoutBox,h)}return Kt(this.latestValues)&&ll(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=Pe.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Fe(),this.targetWithTransforms=Fe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),px(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ut(this.target,this.layout.layoutBox),Sd(this.target,this.targetDelta)):ut(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ei(this.parent.latestValues)||wd(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,l,u){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Fe(),this.relativeTargetOrigin=Fe(),Qr(this.relativeTargetOrigin,l,u,this.options.layoutAnchor||void 0),ut(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Pe.timestamp&&(u=!1),u)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;ut(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;Hg(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Fe());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(nl(this.prevProjectionDelta.x,this.projectionDelta.x),nl(this.prevProjectionDelta.y,this.projectionDelta.y)),Qn(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!hl(this.projectionDelta.x,this.prevProjectionDelta.x)||!hl(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Sn(),this.projectionDelta=Sn(),this.projectionDeltaWithTransform=Sn()}setAnimationOrigin(a,l=!1){const u=this.snapshot,c=u?u.latestValues:{},d={...this.latestValues},h=Sn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=Fe(),m=u?u.source:void 0,g=this.layout?this.layout.source:void 0,x=m!==g,y=this.getStack(),v=!y||y.members.length<=1,j=!!(x&&!v&&this.options.crossfade===!0&&!this.path.some(Ux));this.animationProgress=0;let w;this.mixTargetDelta=F=>{const B=F/1e3;vl(h.x,a.x,B),vl(h.y,a.y,B),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qr(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Hx(this.relativeTarget,this.relativeTargetOrigin,p,B),w&&yx(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Fe()),ut(w,this.relativeTarget)),x&&(this.animationValues=d,kx(d,c,this.latestValues,B,j,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var l,u,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(c=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||c.stop(),this.pendingAnimation&&(_t(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ge.update(()=>{Hr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=En(0)),this.motionValue.jump(0,!1),this.currentAnimation=Cx(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),a.onUpdate&&a.onUpdate(d)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Fx),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:u,layout:c,latestValues:d}=a;if(!(!l||!u||!c)){if(this!==a&&this.layout&&c&&Vd(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||Fe();const h=He(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+h;const p=He(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+p}ut(l,u),Vr(l,d),Qn(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Ex),this.sharedNodes.get(a).add(l);const c=l.options.initialPromotionConfig;l.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const c={};u.z&&Oo("z",a,c,this.animationValues);for(let d=0;d<Po.length;d++)Oo(`rotate${Po[d]}`,a,c,this.animationValues),Oo(`skew${Po[d]}`,a,c,this.animationValues);a.render();for(const d in c)a.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);a.scheduleRender()}applyProjectionStyles(a,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=Wr(l==null?void 0:l.pointerEvents)||"",a.transform=u?u(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=Wr(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Kt(this.latestValues)&&(a.transform=u?u({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=bx(this.projectionDeltaWithTransform,this.treeScale,d);u&&(h=u(d,h)),a.transform=h;const{x:p,y:m}=this.projectionDelta;a.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,c.animationValues?a.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in Ai){if(d[g]===void 0)continue;const{correct:x,applyTo:y,isCSSVariable:v}=Ai[g],j=h==="none"?d[g]:x(d[g],c);if(y){const w=y.length;for(let F=0;F<w;F++)a[y[F]]=j}else v?this.options.visualElement.renderState.vars[g]=j:a[g]=j}this.options.layoutId&&(a.pointerEvents=c===this?Wr(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(xl),this.root.sharedNodes.clear()}}}function Lx(e){e.updateLayout()}function Ix(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,a=t.source!==e.layout.source;if(s==="size")yt(h=>{const p=a?t.measuredBox[h]:t.layoutBox[h],m=He(p);p.min=r[h].min,p.max=p.min+m});else if(s==="x"||s==="y"){const h=s==="x"?"y":"x";Li(a?t.measuredBox[h]:t.layoutBox[h],r[h])}else Vd(s,t.layoutBox,r)&&yt(h=>{const p=a?t.measuredBox[h]:t.layoutBox[h],m=He(r[h]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=Sn();Qn(l,r,t.layoutBox);const u=Sn();a?Qn(u,e.applyTransform(o,!0),t.measuredBox):Qn(u,r,t.layoutBox);const c=!Md(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:m}=h;if(p&&m){const g=e.options.layoutAnchor||void 0,x=Fe();Qr(x,t.layoutBox,p.layoutBox,g);const y=Fe();Qr(y,r,m.layoutBox,g),Pd(x,y)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Dx(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Rx(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Mx(e){e.clearSnapshot()}function xl(e){e.clearMeasurements()}function Px(e){e.isLayoutDirty=!0,e.updateLayout()}function yl(e){e.isLayoutDirty=!1}function Ox(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function zx(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function bl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function _x(e){e.resolveTargetDelta()}function Nx(e){e.calcProjection()}function Vx(e){e.resetSkewAndRotation()}function Wx(e){e.removeLeadSnapshot()}function vl(e,t,n){e.translate=ye(t.translate,0,n),e.scale=ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kl(e,t,n,r){e.min=ye(t.min,n.min,r),e.max=ye(t.max,n.max,r)}function Hx(e,t,n,r){kl(e.x,t.x,n.x,r),kl(e.y,t.y,n.y,r)}function Ux(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $x={duration:.45,ease:[.4,0,.1,1]},wl=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Sl=wl("applewebkit/")&&!wl("chrome/")?Math.round:st;function Cl(e){e.min=Sl(e.min),e.max=Sl(e.max)}function Gx(e){Cl(e.x),Cl(e.y)}function Vd(e,t,n){return e==="position"||e==="preserve-aspect"&&!hx(fl(t),fl(n),.2)}function Yx(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Kx=Nd({attachResizeListener:(e,t)=>ar(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),zo={current:void 0},Wd=Nd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zo.current){const e=new Kx({});e.mount(window),e.setOptions({layoutScroll:!0}),zo.current=e}return zo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Is=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function jl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qx(...e){return t=>{let n=!1;const r=e.map(o=>{const s=jl(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():jl(e[o],null)}}}}function Xx(...e){return be.useCallback(qx(...e),e)}class Zx extends be.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Or(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,o=Or(r)&&r.offsetWidth||0,s=Or(r)&&r.offsetHeight||0,a=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(a.height),l.width=parseFloat(a.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=o-l.width-l.left,l.bottom=s-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Jx({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:s}){var p;const a=S.useId(),l=S.useRef(null),u=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=S.useContext(Is),d=((p=e.props)==null?void 0:p.ref)??(e==null?void 0:e.ref),h=Xx(l,d);return S.useInsertionEffect(()=>{const{width:m,height:g,top:x,left:y,right:v,bottom:j}=u.current;if(t||s===!1||!l.current||!m||!g)return;const w=n==="left"?`left: ${y}`:`right: ${v}`,F=r==="bottom"?`bottom: ${j}`:`top: ${x}`;l.current.dataset.motionPopId=a;const B=document.createElement("style");c&&(B.nonce=c);const C=o??document.head;return C.appendChild(B),B.sheet&&B.sheet.insertRule(`
344
+ [data-motion-pop-id="${a}"] {
345
345
  position: absolute !important;
346
346
  width: ${m}px !important;
347
347
  height: ${g}px !important;
348
348
  ${w}px !important;
349
- ${A}px !important;
349
+ ${F}px !important;
350
350
  }
351
- `),()=>{var O;(O=l.current)==null||O.removeAttribute("data-motion-pop-id"),C.contains(E)&&C.removeChild(E)}},[t]),a.jsx(Vx,{isPresent:t,childRef:l,sizeRef:u,pop:o,children:o===!1?e:be.cloneElement(e,{ref:h})})}const Wx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:l,anchorY:u,root:d})=>{const c=es(Ux),h=S.useId();let p=!0,m=S.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:g=>{c.set(g,!0);for(const x of c.values())if(!x)return;r&&r()},register:g=>(c.set(g,!1),()=>c.delete(g))}),[n,c,r]);return o&&p&&(m={...m}),S.useMemo(()=>{c.forEach((g,x)=>c.set(x,!1))},[n]),be.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=a.jsx(Hx,{pop:s==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:d,children:e}),a.jsx(ri.Provider,{value:m,children:e})};function Ux(){return new Map}function Id(e=!0){const t=S.useContext(ri);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=S.useId();S.useEffect(()=>{if(e)return i(o)},[e]);const s=S.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}const wr=e=>e.key||"";function xl(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const To=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:l="left",anchorY:u="top",root:d})=>{const[c,h]=Id(s),p=S.useMemo(()=>xl(e),[e]),m=s&&!c?[]:p.map(wr),g=S.useRef(!0),x=S.useRef(p),y=es(()=>new Map),b=S.useRef(new Set),[T,w]=S.useState(p),[A,E]=S.useState(p);ou(()=>{g.current=!1,x.current=p;for(let B=0;B<A.length;B++){const F=wr(A[B]);m.includes(F)?(y.delete(F),b.current.delete(F)):y.get(F)!==!0&&y.set(F,!1)}},[A,m.length,m.join("-")]);const C=[];if(p!==T){let B=[...p];for(let F=0;F<A.length;F++){const L=A[F],R=wr(L);m.includes(R)||(B.splice(F,0,L),C.push(L))}return o==="wait"&&C.length&&(B=C),E(xl(B)),w(p),null}process.env.NODE_ENV!=="production"&&o==="wait"&&A.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:O}=S.useContext(Qo);return a.jsx(a.Fragment,{children:A.map(B=>{const F=wr(B),L=s&&!c?!1:p===A||m.includes(F),R=()=>{if(b.current.has(F))return;if(y.has(F))b.current.add(F),y.set(F,!0);else return;let D=!0;y.forEach(N=>{N||(D=!1)}),D&&(O==null||O(),E(x.current),s&&(h==null||h()),r&&r())};return a.jsx(Wx,{isPresent:L,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:d,onExitComplete:L?void 0:R,anchorX:l,anchorY:u,children:B},F)})})},Dd=S.createContext({strict:!1}),yl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let bl=!1;function $x(){if(bl)return;const e={};for(const t in yl)e[t]={isEnabled:n=>yl[t].some(r=>!!n[r])};ld(e),bl=!0}function Rd(){return $x(),Eg()}function Gx(e){const t=Rd();for(const n in e)t[n]={...t[n],...e[n]};ld(t)}const Yx=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Xr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Yx.has(e)}let Md=e=>!Xr(e);function Kx(e){typeof e=="function"&&(Md=t=>t.startsWith("on")?!Xr(t):e(t))}try{Kx(require("@emotion/is-prop-valid").default)}catch{}function qx(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||Oe(e[i])||(Md(i)||n===!0&&Xr(i)||!t&&!Xr(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const ai=S.createContext({});function Xx(e,t){if(si(e)){const{initial:n,animate:r}=e;return{initial:n===!1||nr(n)?n:void 0,animate:nr(r)?r:void 0}}return e.inherit!==!1?t:{}}function Zx(e){const{initial:t,animate:n}=Xx(e,S.useContext(ai));return S.useMemo(()=>({initial:t,animate:n}),[vl(t),vl(n)])}function vl(e){return Array.isArray(e)?e.join(" "):e}const Ts=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pd(e,t,n){for(const r in t)!Oe(t[r])&&!md(r,n)&&(e[r]=t[r])}function Jx({transformTemplate:e},t){return S.useMemo(()=>{const n=Ts();return Ss(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Qx(e,t){const n=e.style||{},r={};return Pd(r,n,e),Object.assign(r,Jx(e,t)),r}function e0(e,t){const n={},r=Qx(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Od=()=>({...Ts(),attrs:{}});function t0(e,t,n,r){const i=S.useMemo(()=>{const o=Od();return gd(o,t,yd(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Pd(o,e.style,e),i.style={...o,...i.style}}return i}const n0=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Bs(e){return typeof e!="string"||e.includes("-")?!1:!!(n0.indexOf(e)>-1||/[A-Z]/u.test(e))}function r0(e,t,n,{latestValues:r},i,o=!1,s){const u=(s??Bs(e)?t0:e0)(t,r,i,e),d=qx(t,typeof e=="string",o),c=e!==S.Fragment?{...d,...u,ref:n}:{},{children:h}=t,p=S.useMemo(()=>Oe(h)?h.get():h,[h]);return S.createElement(e,{...c,children:p})}function i0({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:o0(n,r,i,e),renderState:t()}}function o0(e,t,n,r){const i={},o=r(e,{});for(const p in o)i[p]=zr(o[p]);let{initial:s,animate:l}=e;const u=si(e),d=sd(e);t&&d&&!u&&e.inherit!==!1&&(s===void 0&&(s=t.initial),l===void 0&&(l=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const h=c?l:s;if(h&&typeof h!="boolean"&&!oi(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const g=ms(e,p[m]);if(g){const{transitionEnd:x,transition:y,...b}=g;for(const T in b){let w=b[T];if(Array.isArray(w)){const A=c?w.length-1:0;w=w[A]}w!==null&&(i[T]=w)}for(const T in x)i[T]=x[T]}}}return i}const zd=e=>(t,n)=>{const r=S.useContext(ai),i=S.useContext(ri),o=()=>i0(e,t,r,i);return n?o():es(o)},s0=zd({scrapeMotionValuesFromProps:Cs,createRenderState:Ts}),a0=zd({scrapeMotionValuesFromProps:bd,createRenderState:Od}),l0=Symbol.for("motionComponentSymbol");function c0(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const i=S.useRef(null);return S.useCallback(o=>{var l;o&&((l=e.onMount)==null||l.call(e,o));const s=r.current;if(typeof s=="function")if(o){const u=s(o);typeof u=="function"&&(i.current=u)}else i.current?(i.current(),i.current=null):s(o);else s&&(s.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const _d=S.createContext({});function mn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function u0(e,t,n,r,i,o){var w,A;const{visualElement:s}=S.useContext(ai),l=S.useContext(Dd),u=S.useContext(ri),d=S.useContext(js),c=d.reducedMotion,h=d.skipAnimations,p=S.useRef(null),m=S.useRef(!1);r=r||l.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:o}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const g=p.current,x=S.useContext(_d);g&&!g.projection&&i&&(g.type==="html"||g.type==="svg")&&d0(p.current,n,i,x);const y=S.useRef(!1);S.useInsertionEffect(()=>{g&&y.current&&g.update(n,u)});const b=n[Yu],T=S.useRef(!!b&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,b))&&((A=window.MotionHasOptimisedAnimation)==null?void 0:A.call(window,b)));return ou(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),T.current&&g.animationState&&g.animationState.animateChanges())}),S.useEffect(()=>{g&&(!T.current&&g.animationState&&g.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)==null||E.call(window,b)}),T.current=!1),g.enteringChildren=void 0)}),g}function d0(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:l,layoutScroll:u,layoutRoot:d,layoutAnchor:c,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Nd(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||l&&mn(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:d,layoutAnchor:c})}function Nd(e){if(e)return e.options.allowProjection!==!1?e.projection:Nd(e.parent)}function Ii(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Gx(r);const o=n?n==="svg":Bs(e),s=o?a0:s0;function l(d,c){let h;const p={...S.useContext(js),...d,layoutId:f0(d)},{isStatic:m}=p,g=Zx(d),x=s(d,m);if(!m&&typeof window<"u"){h0(p,r);const y=p0(p);h=y.MeasureLayout,g.visualElement=u0(e,x,p,i,y.ProjectionNode,o)}return a.jsxs(ai.Provider,{value:g,children:[h&&g.visualElement?a.jsx(h,{visualElement:g.visualElement,...p}):null,r0(e,d,c0(x,g.visualElement,c),x,m,t,o)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=S.forwardRef(l);return u[l0]=e,u}function f0({layoutId:e}){const t=S.useContext(Qo).id;return t&&e!==void 0?t+"-"+e:e}function h0(e,t){const n=S.useContext(Dd).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?jn(!1,r,"lazy-strict-mode"):Bt(!1,r,"lazy-strict-mode")}}function p0(e){const t=Rd(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function m0(e,t){if(typeof Proxy>"u")return Ii;const n=new Map,r=(o,s)=>Ii(o,s,e,t),i=(o,s)=>(process.env.NODE_ENV!=="production"&&rs(!1,"motion() is deprecated. Use motion.create() instead."),r(o,s));return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,Ii(s,void 0,e,t)),n.get(s))})}const g0=(e,t)=>t.isSVG??Bs(e)?new Gg(t):new Ng(t,{allowProjection:e!==S.Fragment});class x0 extends zt{constructor(t){super(t),t.animationState||(t.animationState=Zg(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();oi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let y0=0;class b0 extends zt{constructor(){super(...arguments),this.id=y0++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"){const u=Zt(this.node,s,l);if(u){const{transition:d,transitionEnd:c,...h}=u;for(const p in h)(o=this.node.getValue(p))==null||o.jump(h[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const v0={animation:{Feature:x0},exit:{Feature:b0}};function ur(e){return{point:{x:e.pageX,y:e.pageY}}}const k0=e=>t=>bs(t)&&e(t,ur(t));function Xn(e,t,n,r){return rr(e,t,k0(n),r)}const Vd=({current:e})=>e?e.ownerDocument.defaultView:null,kl=(e,t)=>Math.abs(e-t);function w0(e,t){const n=kl(e.x,t.x),r=kl(e.y,t.y);return Math.sqrt(n**2+r**2)}const wl=new Set(["auto","scroll"]);class Hd{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Sr(this.lastRawMoveEventInfo,this.transformPagePoint));const m=Di(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=w0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:y}=m,{timestamp:b}=Pe;this.history.push({...y,timestamp:b});const{onStart:T,onMove:w}=this.handlers;g||(T&&T(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Sr(g,this.transformPagePoint),ge.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:x,onSessionEnd:y,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Di(m.type==="pointercancel"?this.lastMoveEventInfo:Sr(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,T),y&&y(m,T)},!bs(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const u=ur(t),d=Sr(u,this.transformPagePoint),{point:c}=d,{timestamp:h}=Pe;this.history=[{...c,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,Di(d,this.history)),this.removeListeners=ar(Xn(this.contextWindow,"pointermove",this.handlePointerMove),Xn(this.contextWindow,"pointerup",this.handlePointerUp),Xn(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(wl.has(r.overflowX)||wl.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,i),ge.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ot(this.updatePoint)}}function Sr(e,t){return t?{point:t(e.point)}:e}function Sl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Di({point:e},t){return{point:e,delta:Sl(e,Wd(t)),offset:Sl(e,S0(t)),velocity:C0(t,.1)}}function S0(e){return e[0]}function Wd(e){return e[e.length-1]}function C0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Wd(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ke(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Ke(t)*2&&(r=e[1]);const o=it(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function j0(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ye(n,e,r.max):Math.min(e,n)),e}function Cl(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function T0(e,{top:t,left:n,bottom:r,right:i}){return{x:Cl(e.x,n,i),y:Cl(e.y,t,r)}}function jl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function B0(e,t){return{x:jl(e.x,t.x),y:jl(e.y,t.y)}}function F0(e,t){let n=.5;const r=We(e),i=We(t);return i>r?n=er(t.min,t.max-r,e.min):r>i&&(n=er(e.min,e.max-i,t.min)),wt(0,1,n)}function E0(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Bo=.35;function A0(e=Bo){return e===!1?e=0:e===!0&&(e=Bo),{x:Tl(e,"left","right"),y:Tl(e,"top","bottom")}}function Tl(e,t,n){return{min:Bl(e,t),max:Bl(e,n)}}function Bl(e,t){return typeof e=="number"?e:e[t]||0}const L0=new WeakMap;class I0{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ee(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{n&&this.snapToCursor(ur(h).point),this.stopAnimation()},s=(h,p)=>{const{drag:m,dragPropagation:g,onDragStart:x}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=og(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xt(b=>{let T=this.getAxisMotionValue(b).get()||0;if(kt.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const A=w.layout.layoutBox[b];A&&(T=We(A)*(parseFloat(T)/100))}}this.originPoint[b]=T}),x&&ge.update(()=>x(h,p),!1,!0),xo(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:x,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=p;if(g&&this.currentDirection===null){this.currentDirection=R0(b),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),y&&ge.update(()=>y(h,p),!1,!0)},u=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Hd(t,{onSessionStart:o,onStart:s,onMove:l,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Vd(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:l}=this.getProps();l&&ge.postRender(()=>l(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Cr(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=j0(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;t&&mn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=T0(r.layoutBox,t):this.constraints=!1,this.elastic=A0(n),i!==this.constraints&&!mn(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&xt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=E0(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!mn(t))return!1;const r=t.current;Bt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Rg(r,i.root,this.visualElement.getTransformPagePoint());let s=B0(i.layout.layoutBox,o);if(n){const l=n(Lg(s));this.hasMutatedConstraints=!!l,l&&(s=ud(l))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},d=xt(c=>{if(!Cr(c,n,this.currentDirection))return;let h=u&&u[c]||{};(s===!0||s===c)&&(h={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,g={type:"inertia",velocity:r?t[c]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,g)});return Promise.all(d).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return xo(this.visualElement,t),r.start(ps(t,r,0,n,this.visualElement,!1))}stopAnimation(){xt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){xt(n=>{const{drag:r}=this.getProps();if(!Cr(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:l}=i.layout.layoutBox[n],u=o.get()||0;o.set(t[n]-ye(s,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!mn(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};xt(s=>{const l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){const u=l.get();i[s]=F0({min:u,max:u},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),xt(s=>{if(!Cr(s,t,null))return;const l=this.getAxisMotionValue(s),{min:u,max:d}=this.constraints[s];l.set(ye(u,d,i[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;L0.set(this.visualElement,this);const t=this.visualElement.current,n=Xn(t,"pointerdown",d=>{const{drag:c,dragListener:h=!0}=this.getProps(),p=d.target,m=p!==t&&dg(p);c&&h&&!m&&this.start(d)});let r;const i=()=>{const{dragConstraints:d}=this.getProps();mn(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),r||(r=D0(t,d.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,s=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ge.read(i);const l=rr(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:c})=>{this.isDragging&&c&&(xt(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=d[h].translate,p.set(p.get()+d[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),s(),u&&u(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Bo,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:l}}}function Fl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function D0(e,t,n){const r=Ma(e,Fl(n)),i=Ma(t,Fl(n));return()=>{r(),i()}}function Cr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function R0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class M0 extends zt{constructor(t){super(t),this.removeGroupControls=ot,this.removeListeners=ot,this.controls=new I0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ot}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ri=e=>(t,n)=>{e&&ge.update(()=>e(t,n),!1,!0)};class P0 extends zt{constructor(){super(...arguments),this.removePointerDownListener=ot}onPointerDown(t){this.session=new Hd(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Vd(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ri(t),onStart:Ri(n),onMove:Ri(r),onEnd:(o,s)=>{delete this.session,i&&ge.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Xn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Mi=!1;class O0 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Mi&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),_r.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),Mi=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||ge.postRender(()=>{const l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),ys.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Mi=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ud(e){const[t,n]=Id(),r=S.useContext(Qo);return a.jsx(O0,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(_d),isPresent:t,safeToRemove:n})}const z0={pan:{Feature:P0},drag:{Feature:M0,ProjectionNode:Ld,MeasureLayout:Ud}};function El(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&ge.postRender(()=>o(t,ur(t)))}class _0 extends zt{mount(){const{current:t}=this.node;t&&(this.unmount=ag(t,(n,r)=>(El(this.node,r,"Start"),i=>El(this.node,i,"End"))))}unmount(){}}class N0 extends zt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ar(rr(this.node.current,"focus",()=>this.onFocus()),rr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Al(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&ge.postRender(()=>o(t,ur(t)))}class V0 extends zt{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=hg(t,(i,o)=>(Al(this.node,o,"Start"),(s,{success:l})=>Al(this.node,s,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Fo=new WeakMap,Pi=new WeakMap,H0=e=>{const t=Fo.get(e.target);t&&t(e)},W0=e=>{e.forEach(H0)};function U0({root:e,...t}){const n=e||document;Pi.has(n)||Pi.set(n,{});const r=Pi.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(W0,{root:e,...t})),r[i]}function $0(e,t,n){const r=U0(t);return Fo.set(e,n),r.observe(e),()=>{Fo.delete(e),r.unobserve(e)}}const G0={some:0,all:1};class Y0 extends zt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var u;(u=this.stopObserver)==null||u.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:G0[i]},l=d=>{const{isIntersecting:c}=d;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),m=c?h:p;m&&m(d)};this.stopObserver=$0(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(K0(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function K0({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const q0={inView:{Feature:Y0},tap:{Feature:V0},focus:{Feature:N0},hover:{Feature:_0}},X0={layout:{ProjectionNode:Ld,MeasureLayout:Ud}},Z0={...v0,...q0,...z0,...X0},Tt=m0(Z0,g0),J0={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"}},Jt="#EF4444",$d="rgba(239,68,68,0.08)",Q0=()=>a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),a.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),a.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),e2=()=>a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Gd=({open:e})=>a.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:a.jsx("polyline",{points:"6 9 12 15 18 9"})}),Yd=()=>a.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),a.jsx("polyline",{points:"16 17 21 12 16 7"}),a.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),t2=()=>a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),a.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),n2=()=>a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("circle",{cx:"12",cy:"12",r:"3"}),a.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"})]}),r2=()=>a.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("circle",{cx:"12",cy:"12",r:"4"}),a.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),a.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),a.jsx("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),a.jsx("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),a.jsx("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),a.jsx("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),a.jsx("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),a.jsx("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),i2=()=>a.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),o2=()=>a.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),a.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),a.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]}),s2=(e,t)=>a.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function a2(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const jr=[{value:"light",label:"Light mode",shortLabel:"Light",icon:a.jsx(r2,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:a.jsx(i2,{})},{value:"system",label:"System theme",shortLabel:"System",icon:a.jsx(o2,{})}];function l2({scheme:e}){const{mounted:t,themeMode:n,themeSetting:r,setThemeMode:i}=or(),[o,s]=S.useState(!1),l=S.useRef(null),u=t?r:void 0,d=jr.find(p=>p.value===u)||jr[0];S.useEffect(()=>{const p=m=>{l.current&&!l.current.contains(m.target)&&s(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const c=a.jsx(f.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:jr.map(p=>{const m=u===p.value,g=p.value==="dark"?e.activeBgDarkStrong:p.value==="system"?e.hoverBgDark:e.hoverBgLight;return a.jsxs(f.Box,{as:"button",onClick:()=>{t&&i(p.value)},"aria-pressed":m,"aria-label":p.label,title:t&&p.value==="system"?`System theme (currently ${n})`:p.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:m?g:"transparent",color:m?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:m?g:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[a.jsx(f.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:p.icon}),a.jsx(f.Box,{as:"span",fontSize:"xs",fontWeight:m?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:p.shortLabel})]},p.value)})}),h=a.jsxs(f.Box,{display:{base:"block",md:"none"},position:"relative",ref:l,children:[a.jsx(f.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&&s(p=>!p)},"aria-label":"Theme mode switcher","aria-expanded":o,"aria-haspopup":"menu",children:d.icon}),o&&t&&a.jsx(f.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:jr.map(p=>{const m=u===p.value;return a.jsxs(f.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:m?e.hoverBgLight:"transparent",color:m?e.chakraToken:"text.body",cursor:"pointer",textAlign:"left",onClick:()=>{i(p.value),s(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:m?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[a.jsx(f.Box,{flexShrink:0,children:p.icon}),a.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:m?"600":"500",fontFamily:"var(--font-body)",children:p.label})]},p.value)})})]});return a.jsxs(a.Fragment,{children:[c,h]})}function Kd({item:e,renderLink:t,onClick:n,scheme:r}){var y;const[i,o]=S.useState(!1),[s,l]=S.useState(!1),u=e.isActive??!1,d=((y=e.subItems)==null?void 0:y.some(b=>b.isActive))??!1,[c,h]=S.useState(u||d),p=!!(e.subItems&&e.subItems.length>0),m=S.useId();S.useEffect(()=>{h(u||d)},[u,d]);const g=u,x=a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:p?"lg":"none",borderTopLeftRadius:p?"lg":"none",borderBottomLeftRadius:p?"lg":"none",position:"relative",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:p?void 0:n,style:{background:u?r.activeBgLight:i?r.hoverBgLight:"transparent",boxShadow:u&&!p?`inset 3px 0 0 ${r.solid}`:void 0,outline:s?`2px solid ${r.solid}`:void 0,outlineOffset:s?"2px":void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:u?r.activeBgDark:i?r.hoverBgDark:"transparent"},children:[e.icon&&a.jsx(f.Box,{flexShrink:0,style:{color:g?r.solid:void 0,opacity:g?1:i?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:g?r.chakraToken:"text.body",children:e.icon}),a.jsx(f.Box,{as:"span",flex:"1",fontSize:"sm",fontWeight:g?"600":"500",fontFamily:"var(--font-body)",style:{color:g?r.solid:void 0,transition:"color 0.15s ease"},color:g?r.chakraToken:"text.body",children:e.label}),typeof e.badge=="number"&&!p&&a.jsx(f.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:r.solid,color:"#fff"},children:e.badge}),e.hasDot&&!p&&a.jsx(f.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Jt},"aria-label":"New notification"}),p&&a.jsx(f.Box,{flexShrink:0,color:"text.muted",children:a.jsx(Gd,{open:c})})]});return a.jsxs(a.Fragment,{children:[p?a.jsx("button",{type:"button","aria-expanded":c,"aria-controls":m,onClick:()=>h(b=>!b),onFocus:b=>{l(b.currentTarget.matches(":focus-visible"))},onBlur:()=>l(!1),style:{display:"block",width:"100%",background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:x}):t(e,x),p&&a.jsx(Tt.div,{id:m,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:a.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"9",mt:"0.5",mb:"1",children:e.subItems.map(b=>a.jsx(Kd,{item:b,renderLink:t,onClick:n,scheme:r},b.href))})})]})}let Ll=!1;function c2(){if(typeof document>"u"||Ll)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
351
+ `),()=>{var P;(P=l.current)==null||P.removeAttribute("data-motion-pop-id"),C.contains(B)&&C.removeChild(B)}},[t]),i.jsx(Zx,{isPresent:t,childRef:l,sizeRef:u,pop:s,children:s===!1?e:be.cloneElement(e,{ref:h})})}const Qx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:a,anchorX:l,anchorY:u,root:c})=>{const d=as(e0),h=S.useId();let p=!0,m=S.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:o,onExitComplete:g=>{d.set(g,!0);for(const x of d.values())if(!x)return;r&&r()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,r]);return s&&p&&(m={...m}),S.useMemo(()=>{d.forEach((g,x)=>d.set(x,!1))},[n]),be.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=i.jsx(Jx,{pop:a==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:c,children:e}),i.jsx(co.Provider,{value:m,children:e})};function e0(){return new Map}function Hd(e=!0){const t=S.useContext(co);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=S.useId();S.useEffect(()=>{if(e)return o(s)},[e]);const a=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const Tr=e=>e.key||"";function Tl(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const lr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:a=!1,anchorX:l="left",anchorY:u="top",root:c})=>{const[d,h]=Hd(a),p=S.useMemo(()=>Tl(e),[e]),m=a&&!d?[]:p.map(Tr),g=S.useRef(!0),x=S.useRef(p),y=as(()=>new Map),v=S.useRef(new Set),[j,w]=S.useState(p),[F,B]=S.useState(p);gu(()=>{g.current=!1,x.current=p;for(let A=0;A<F.length;A++){const E=Tr(F[A]);m.includes(E)?(y.delete(E),v.current.delete(E)):y.get(E)!==!0&&y.set(E,!1)}},[F,m.length,m.join("-")]);const C=[];if(p!==j){let A=[...p];for(let E=0;E<F.length;E++){const L=F[E],R=Tr(L);m.includes(R)||(A.splice(E,0,L),C.push(L))}return s==="wait"&&C.length&&(A=C),B(Tl(A)),w(p),null}process.env.NODE_ENV!=="production"&&s==="wait"&&F.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:P}=S.useContext(ss);return i.jsx(i.Fragment,{children:F.map(A=>{const E=Tr(A),L=a&&!d?!1:p===F||m.includes(E),R=()=>{if(v.current.has(E))return;if(y.has(E))v.current.add(E),y.set(E,!0);else return;let D=!0;y.forEach(N=>{N||(D=!1)}),D&&(P==null||P(),B(x.current),a&&(h==null||h()),r&&r())};return i.jsx(Qx,{isPresent:L,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:c,onExitComplete:L?void 0:R,anchorX:l,anchorY:u,children:A},E)})})},Ud=S.createContext({strict:!1}),Bl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let El=!1;function t0(){if(El)return;const e={};for(const t in Bl)e[t]={isEnabled:n=>Bl[t].some(r=>!!n[r])};bd(e),El=!0}function $d(){return t0(),_g()}function n0(e){const t=$d();for(const n in e)t[n]={...t[n],...e[n]};bd(t)}const r0=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function eo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||r0.has(e)}let Gd=e=>!eo(e);function o0(e){typeof e=="function"&&(Gd=t=>t.startsWith("on")?!eo(t):e(t))}try{o0(require("@emotion/is-prop-valid").default)}catch{}function i0(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||Oe(e[o])||(Gd(o)||n===!0&&eo(o)||!t&&!eo(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const po=S.createContext({});function s0(e,t){if(ho(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sr(n)?n:void 0,animate:sr(r)?r:void 0}}return e.inherit!==!1?t:{}}function a0(e){const{initial:t,animate:n}=s0(e,S.useContext(po));return S.useMemo(()=>({initial:t,animate:n}),[Fl(t),Fl(n)])}function Fl(e){return Array.isArray(e)?e.join(" "):e}const Ds=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Yd(e,t,n){for(const r in t)!Oe(t[r])&&!Td(r,n)&&(e[r]=t[r])}function l0({transformTemplate:e},t){return S.useMemo(()=>{const n=Ds();return As(n,t,e),Object.assign({},n.vars,n.style)},[t])}function c0(e,t){const n=e.style||{},r={};return Yd(r,n,e),Object.assign(r,l0(e,t)),r}function u0(e,t){const n={},r=c0(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Kd=()=>({...Ds(),attrs:{}});function d0(e,t,n,r){const o=S.useMemo(()=>{const s=Kd();return Bd(s,t,Fd(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Yd(s,e.style,e),o.style={...s,...o.style}}return o}const f0=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Rs(e){return typeof e!="string"||e.includes("-")?!1:!!(f0.indexOf(e)>-1||/[A-Z]/u.test(e))}function h0(e,t,n,{latestValues:r},o,s=!1,a){const u=(a??Rs(e)?d0:u0)(t,r,o,e),c=i0(t,typeof e=="string",s),d=e!==S.Fragment?{...c,...u,ref:n}:{},{children:h}=t,p=S.useMemo(()=>Oe(h)?h.get():h,[h]);return S.createElement(e,{...d,children:p})}function p0({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:m0(n,r,o,e),renderState:t()}}function m0(e,t,n,r){const o={},s=r(e,{});for(const p in s)o[p]=Wr(s[p]);let{initial:a,animate:l}=e;const u=ho(e),c=xd(e);t&&c&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?l:a;if(h&&typeof h!="boolean"&&!fo(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const g=ws(e,p[m]);if(g){const{transitionEnd:x,transition:y,...v}=g;for(const j in v){let w=v[j];if(Array.isArray(w)){const F=d?w.length-1:0;w=w[F]}w!==null&&(o[j]=w)}for(const j in x)o[j]=x[j]}}}return o}const qd=e=>(t,n)=>{const r=S.useContext(po),o=S.useContext(co),s=()=>p0(e,t,r,o);return n?s():as(s)},g0=qd({scrapeMotionValuesFromProps:Ls,createRenderState:Ds}),x0=qd({scrapeMotionValuesFromProps:Ad,createRenderState:Kd}),y0=Symbol.for("motionComponentSymbol");function b0(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(s=>{var l;s&&((l=e.onMount)==null||l.call(e,s));const a=r.current;if(typeof a=="function")if(s){const u=a(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):a(s);else a&&(a.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const Xd=S.createContext({});function yn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function v0(e,t,n,r,o,s){var w,F;const{visualElement:a}=S.useContext(po),l=S.useContext(Ud),u=S.useContext(co),c=S.useContext(Is),d=c.reducedMotion,h=c.skipAnimations,p=S.useRef(null),m=S.useRef(!1);r=r||l.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:s}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const g=p.current,x=S.useContext(Xd);g&&!g.projection&&o&&(g.type==="html"||g.type==="svg")&&k0(p.current,n,o,x);const y=S.useRef(!1);S.useInsertionEffect(()=>{g&&y.current&&g.update(n,u)});const v=n[od],j=S.useRef(!!v&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,v))&&((F=window.MotionHasOptimisedAnimation)==null?void 0:F.call(window,v)));return gu(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),j.current&&g.animationState&&g.animationState.animateChanges())}),S.useEffect(()=>{g&&(!j.current&&g.animationState&&g.animationState.animateChanges(),j.current&&(queueMicrotask(()=>{var B;(B=window.MotionHandoffMarkAsComplete)==null||B.call(window,v)}),j.current=!1),g.enteringChildren=void 0)}),g}function k0(e,t,n,r){const{layoutId:o,layout:s,drag:a,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zd(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!a||l&&yn(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}function Zd(e){if(e)return e.options.allowProjection!==!1?e.projection:Zd(e.parent)}function _o(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&n0(r);const s=n?n==="svg":Rs(e),a=s?x0:g0;function l(c,d){let h;const p={...S.useContext(Is),...c,layoutId:w0(c)},{isStatic:m}=p,g=a0(c),x=a(c,m);if(!m&&typeof window<"u"){S0(p,r);const y=C0(p);h=y.MeasureLayout,g.visualElement=v0(e,x,p,o,y.ProjectionNode,s)}return i.jsxs(po.Provider,{value:g,children:[h&&g.visualElement?i.jsx(h,{visualElement:g.visualElement,...p}):null,h0(e,c,b0(x,g.visualElement,d),x,m,t,s)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=S.forwardRef(l);return u[y0]=e,u}function w0({layoutId:e}){const t=S.useContext(ss).id;return t&&e!==void 0?t+"-"+e:e}function S0(e,t){const n=S.useContext(Ud).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Fn(!1,r,"lazy-strict-mode"):Ft(!1,r,"lazy-strict-mode")}}function C0(e){const t=$d(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function j0(e,t){if(typeof Proxy>"u")return _o;const n=new Map,r=(s,a)=>_o(s,a,e,t),o=(s,a)=>(process.env.NODE_ENV!=="production"&&us(!1,"motion() is deprecated. Use motion.create() instead."),r(s,a));return new Proxy(o,{get:(s,a)=>a==="create"?r:(n.has(a)||n.set(a,_o(a,void 0,e,t)),n.get(a))})}const T0=(e,t)=>t.isSVG??Rs(e)?new nx(t):new Xg(t,{allowProjection:e!==S.Fragment});class B0 extends Nt{constructor(t){super(t),t.animationState||(t.animationState=ax(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let E0=0;class F0 extends Nt{constructor(){super(...arguments),this.id=E0++,this.isExitComplete=!1}update(){var s;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:a,custom:l}=this.node.getProps();if(typeof a=="string"){const u=Qt(this.node,a,l);if(u){const{transition:c,transitionEnd:d,...h}=u;for(const p in h)(s=this.node.getValue(p))==null||s.jump(h[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const A0={animation:{Feature:B0},exit:{Feature:F0}};function pr(e){return{point:{x:e.pageX,y:e.pageY}}}const L0=e=>t=>Ts(t)&&e(t,pr(t));function er(e,t,n,r){return ar(e,t,L0(n),r)}const Jd=({current:e})=>e?e.ownerDocument.defaultView:null,Al=(e,t)=>Math.abs(e-t);function I0(e,t){const n=Al(e.x,t.x),r=Al(e.y,t.y);return Math.sqrt(n**2+r**2)}const Ll=new Set(["auto","scroll"]);class Qd{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:a=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Br(this.lastRawMoveEventInfo,this.transformPagePoint));const m=No(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=I0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:y}=m,{timestamp:v}=Pe;this.history.push({...y,timestamp:v});const{onStart:j,onMove:w}=this.handlers;g||(j&&j(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Br(g,this.transformPagePoint),ge.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:x,onSessionEnd:y,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const j=No(m.type==="pointercancel"?this.lastMoveEventInfo:Br(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,j),y&&y(m,j)},!Ts(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const u=pr(t),c=Br(u,this.transformPagePoint),{point:d}=c,{timestamp:h}=Pe;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,No(c,this.history)),this.removeListeners=dr(er(this.contextWindow,"pointermove",this.handlePointerMove),er(this.contextWindow,"pointerup",this.handlePointerUp),er(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Ll.has(r.overflowX)||Ll.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),ge.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),_t(this.updatePoint)}}function Br(e,t){return t?{point:t(e.point)}:e}function Il(e,t){return{x:e.x-t.x,y:e.y-t.y}}function No({point:e},t){return{point:e,delta:Il(e,ef(t)),offset:Il(e,D0(t)),velocity:R0(t,.1)}}function D0(e){return e[0]}function ef(e){return e[e.length-1]}function R0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ef(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ke(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>Ke(t)*2&&(r=e[1]);const s=it(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function M0(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ye(n,e,r.max):Math.min(e,n)),e}function Dl(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function P0(e,{top:t,left:n,bottom:r,right:o}){return{x:Dl(e.x,n,o),y:Dl(e.y,t,r)}}function Rl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function O0(e,t){return{x:Rl(e.x,t.x),y:Rl(e.y,t.y)}}function z0(e,t){let n=.5;const r=He(e),o=He(t);return o>r?n=or(t.min,t.max-r,e.min):r>o&&(n=or(e.min,e.max-o,t.min)),jt(0,1,n)}function _0(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Ii=.35;function N0(e=Ii){return e===!1?e=0:e===!0&&(e=Ii),{x:Ml(e,"left","right"),y:Ml(e,"top","bottom")}}function Ml(e,t,n){return{min:Pl(e,t),max:Pl(e,n)}}function Pl(e,t){return typeof e=="number"?e:e[t]||0}const V0=new WeakMap;class W0{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Fe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=h=>{n&&this.snapToCursor(pr(h).point),this.stopAnimation()},a=(h,p)=>{const{drag:m,dragPropagation:g,onDragStart:x}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mg(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yt(v=>{let j=this.getAxisMotionValue(v).get()||0;if(St.test(j)){const{projection:w}=this.visualElement;if(w&&w.layout){const F=w.layout.layoutBox[v];F&&(j=He(F)*(parseFloat(j)/100))}}this.originPoint[v]=j}),x&&ge.update(()=>x(h,p),!1,!0),Si(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:x,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=p;if(g&&this.currentDirection===null){this.currentDirection=U0(v),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",p.point,v),this.updateAxis("y",p.point,v),this.visualElement.render(),y&&ge.update(()=>y(h,p),!1,!0)},u=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new Qd(t,{onSessionStart:s,onStart:a,onMove:l,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Jd(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:l}=this.getProps();l&&ge.postRender(()=>l(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Er(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=M0(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&yn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=P0(r.layoutBox,t):this.constraints=!1,this.elastic=N0(n),o!==this.constraints&&!yn(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&yt(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=_0(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yn(t))return!1;const r=t.current;Ft(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=Ug(r,o.root,this.visualElement.getTransformPagePoint());let a=O0(o.layout.layoutBox,s);if(n){const l=n(Vg(a));this.hasMutatedConstraints=!!l,l&&(a=kd(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},c=yt(d=>{if(!Er(d,n,this.currentDirection))return;let h=u&&u[d]||{};(a===!0||a===d)&&(h={min:0,max:0});const p=o?200:1e6,m=o?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...h};return this.startAxisValueAnimation(d,g)});return Promise.all(c).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Si(this.visualElement,t),r.start(ks(t,r,0,n,this.visualElement,!1))}stopAnimation(){yt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){yt(n=>{const{drag:r}=this.getProps();if(!Er(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:l}=o.layout.layoutBox[n],u=s.get()||0;s.set(t[n]-ye(a,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!yn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};yt(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const u=l.get();o[a]=z0({min:u,max:u},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),yt(a=>{if(!Er(a,t,null))return;const l=this.getAxisMotionValue(a),{min:u,max:c}=this.constraints[a];l.set(ye(u,c,o[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;V0.set(this.visualElement,this);const t=this.visualElement.current,n=er(t,"pointerdown",c=>{const{drag:d,dragListener:h=!0}=this.getProps(),p=c.target,m=p!==t&&kg(p);d&&h&&!m&&this.start(c)});let r;const o=()=>{const{dragConstraints:c}=this.getProps();yn(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=H0(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,a=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ge.read(o);const l=ar(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(yt(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=c[h].translate,p.set(p.get()+c[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),a(),u&&u(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:a=Ii,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:a,dragMomentum:l}}}function Ol(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function H0(e,t,n){const r=Ua(e,Ol(n)),o=Ua(t,Ol(n));return()=>{r(),o()}}function Er(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function U0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $0 extends Nt{constructor(t){super(t),this.removeGroupControls=st,this.removeListeners=st,this.controls=new W0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||st}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Vo=e=>(t,n)=>{e&&ge.update(()=>e(t,n),!1,!0)};class G0 extends Nt{constructor(){super(...arguments),this.removePointerDownListener=st}onPointerDown(t){this.session=new Qd(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jd(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Vo(t),onStart:Vo(n),onMove:Vo(r),onEnd:(s,a)=>{delete this.session,o&&ge.postRender(()=>o(s,a))}}}mount(){this.removePointerDownListener=er(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Wo=!1;class Y0 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Wo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Hr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:a}=r;return a&&(a.isPresent=s,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),Wo=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||ge.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),js.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Wo=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function tf(e){const[t,n]=Hd(),r=S.useContext(ss);return i.jsx(Y0,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Xd),isPresent:t,safeToRemove:n})}const K0={pan:{Feature:G0},drag:{Feature:$0,ProjectionNode:Wd,MeasureLayout:tf}};function zl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&ge.postRender(()=>s(t,pr(t)))}class q0 extends Nt{mount(){const{current:t}=this.node;t&&(this.unmount=xg(t,(n,r)=>(zl(this.node,r,"Start"),o=>zl(this.node,o,"End"))))}unmount(){}}class X0 extends Nt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=dr(ar(this.node.current,"focus",()=>this.onFocus()),ar(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function _l(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&ge.postRender(()=>s(t,pr(t)))}class Z0 extends Nt{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Sg(t,(o,s)=>(_l(this.node,s,"Start"),(a,{success:l})=>_l(this.node,a,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Di=new WeakMap,Ho=new WeakMap,J0=e=>{const t=Di.get(e.target);t&&t(e)},Q0=e=>{e.forEach(J0)};function e2({root:e,...t}){const n=e||document;Ho.has(n)||Ho.set(n,{});const r=Ho.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Q0,{root:e,...t})),r[o]}function t2(e,t,n){const r=e2(t);return Di.set(e,n),r.observe(e),()=>{Di.delete(e),r.unobserve(e)}}const n2={some:0,all:1};class r2 extends Nt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var u;(u=this.stopObserver)==null||u.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:n2[o]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,s&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),m=d?h:p;m&&m(c)};this.stopObserver=t2(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(o2(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function o2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const i2={inView:{Feature:r2},tap:{Feature:Z0},focus:{Feature:X0},hover:{Feature:q0}},s2={layout:{ProjectionNode:Wd,MeasureLayout:tf}},a2={...A0,...i2,...K0,...s2},tt=j0(a2,T0);function Ct({label:e,children:t,placement:n="top",...r}){const[o,s]=S.useState(!1),a=S.useRef(null),l=S.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(pointer: coarse)").matches,[]);S.useEffect(()=>{if(!l||!o)return;const c=d=>{a.current&&!a.current.contains(d.target)&&s(!1)};return document.addEventListener("mousedown",c),document.addEventListener("touchstart",c,{passive:!0}),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("touchstart",c)}},[l,o]);const u=c=>{l&&(c.preventDefault(),c.stopPropagation(),s(d=>!d))};return i.jsxs(f.Tooltip.Root,{positioning:{placement:n},open:l?o:void 0,onOpenChange:l?c=>s(c.open):void 0,...r,children:[i.jsx(f.Tooltip.Trigger,{asChild:!0,children:i.jsx("span",{ref:a,style:{display:"inline-flex"},onClick:u,children:t})}),i.jsx(f.Tooltip.Positioner,{children:i.jsx(f.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 l2={BASE_URL:"/",DEV:!1,MODE:"production",PACKAGE_VERSION:"0.1.22",PROD:!0,SSR:!1,VITE_STORYBOOK_URL:"https://medixdeck-ui.vercel.app",VITE_WHATSAPP_COMMUNITY_LINK:"https://medixdeck.com/whatsapp"},c2={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"}},kt="#EF4444",Ri="rgba(239,68,68,0.08)",nf=()=>i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),i.jsx("path",{d:"M9 3v18"}),i.jsx("path",{d:"m14 9-3 3 3 3"})]}),rf=()=>i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),i.jsx("path",{d:"M9 3v18"}),i.jsx("path",{d:"m12 15 3-3-3-3"})]}),u2=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),i.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),i.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),d2=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),of=({open:e})=>i.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:i.jsx("polyline",{points:"6 9 12 15 18 9"})}),Mi=()=>i.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),i.jsx("polyline",{points:"16 17 21 12 16 7"}),i.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),f2=()=>i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),i.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),h2=()=>i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.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"})]}),p2=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"4"}),i.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),i.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),i.jsx("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),i.jsx("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),i.jsx("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),i.jsx("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),i.jsx("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),i.jsx("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),m2=()=>i.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),g2=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),i.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),i.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]}),x2=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.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"}),i.jsx("line",{x1:"8.5",y1:"2",x2:"15.5",y2:"2"}),i.jsx("path",{d:"M8.5 14h7"})]}),y2=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),i.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),i.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),b2=()=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.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"}),i.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),i.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),v2=()=>i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),k2=(e,t)=>i.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function w2(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const Nl={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 S2(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,r=process.env.MEDIX_ENV||process.env.NEXT_PUBLIC_MEDIX_ENV||process.env.PUBLIC_MEDIX_ENV,o=process.env.CONTEXT;if(r){const s=String(r).toLowerCase();if(s==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"};if(s==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(s==="test")return{isNonProduction:!0,detectedEnv:"test"};if(s==="dev"||s==="development")return{isNonProduction:!0,detectedEnv:"development"};if(s==="production"||s==="live")return{isNonProduction:!1,detectedEnv:"production"}}if(n==="preview")return{isNonProduction:!0,detectedEnv:"preview"};if(n==="development")return{isNonProduction:!0,detectedEnv:"development"};if(o==="deploy-preview"||o==="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{if(typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:dn&&dn.tagName.toUpperCase()==="SCRIPT"&&dn.src||new URL("index.cjs",document.baseURI).href}<"u"&&{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:dn&&dn.tagName.toUpperCase()==="SCRIPT"&&dn.src||new URL("index.cjs",document.baseURI).href}&&l2){const t="production"}}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("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 C2(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 j2({detectedEnv:e,config:t,onDismiss:n}){const r=t.status??(e==="staging"||e==="preview"?"info":e==="test"?"error":"warning"),o=Nl[r]??Nl.warning,s=t.badgeLabel??C2(e),a=t.message??"You are in a non-production test/sandbox environment. Simulated patient records, transactions, and actions will not affect live data.",l=r==="info"?i.jsx(y2,{}):r==="error"?i.jsx(b2,{}):i.jsx(x2,{});return i.jsxs(f.Box,{as:"aside",role:"status","aria-live":"polite","aria-label":`${s}: ${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:o.border,bg:o.bg,color:o.text,_dark:{bg:o.darkBg,borderColor:o.darkBorder,color:o.darkText},transition:"background 0.2s ease, border-color 0.2s ease",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2.5",minW:"0",flex:"1",children:[i.jsx(f.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:o.badgeBg,children:l}),i.jsx(f.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:o.badgeBg,color:o.badgeColor},children:s}),i.jsx(f.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})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2.5",flexShrink:0,children:[t.action,t.dismissible&&i.jsx(f.Box,{as:"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:o.badgeBg,outlineOffset:"1px"},transition:"background 0.15s ease, opacity 0.15s ease",children:i.jsx(v2,{})})]})]})}const Fr=[{value:"light",label:"Light mode",shortLabel:"Light",icon:i.jsx(p2,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:i.jsx(m2,{})},{value:"system",label:"System theme",shortLabel:"System",icon:i.jsx(g2,{})}];function T2({scheme:e}){const{mounted:t,themeMode:n,themeSetting:r,setThemeMode:o}=ur(),[s,a]=S.useState(!1),l=S.useRef(null),u=t?r:void 0,c=Fr.find(p=>p.value===u)||Fr[0];S.useEffect(()=>{const p=m=>{l.current&&!l.current.contains(m.target)&&a(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const d=i.jsx(f.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:Fr.map(p=>{const m=u===p.value,g=p.value==="dark"?e.activeBgDarkStrong:p.value==="system"?e.hoverBgDark:e.hoverBgLight;return i.jsxs(f.Box,{as:"button",onClick:()=>{t&&o(p.value)},"aria-pressed":m,"aria-label":p.label,title:t&&p.value==="system"?`System theme (currently ${n})`:p.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:m?g:"transparent",color:m?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:m?g:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[i.jsx(f.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:p.icon}),i.jsx(f.Box,{as:"span",fontSize:"xs",fontWeight:m?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:p.shortLabel})]},p.value)})}),h=i.jsxs(f.Box,{display:{base:"block",md:"none"},position:"relative",ref:l,children:[i.jsx(f.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(p=>!p)},"aria-label":"Theme mode switcher","aria-expanded":s,"aria-haspopup":"menu",children:c.icon}),s&&t&&i.jsx(f.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:Fr.map(p=>{const m=u===p.value;return i.jsxs(f.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:m?e.hoverBgLight:"transparent",color:m?e.chakraToken:"text.body",cursor:"pointer",textAlign:"left",onClick:()=>{o(p.value),a(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:m?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[i.jsx(f.Box,{flexShrink:0,children:p.icon}),i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:m?"600":"500",fontFamily:"var(--font-body)",children:p.label})]},p.value)})})]});return i.jsxs(i.Fragment,{children:[d,h]})}function Pi({item:e,renderLink:t,onClick:n,scheme:r,isCollapsed:o=!1}){var F;const[s,a]=S.useState(!1),[l,u]=S.useState(!1),[c,d]=S.useState(!1),h=S.useRef(null),p=e.isActive??!1,m=((F=e.subItems)==null?void 0:F.some(B=>B.isActive))??!1,[g,x]=S.useState(p||m),y=!!(e.subItems&&e.subItems.length>0),v=S.useId();S.useEffect(()=>{x(p||m)},[p,m]),S.useEffect(()=>{if(!c)return;const B=P=>{h.current&&!h.current.contains(P.target)&&d(!1)},C=P=>{P.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",B),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",B),document.removeEventListener("keydown",C)}},[c]);const j=p;if(o){if(y){const C=i.jsxs(f.Box,{as:"button","aria-label":e.label,"aria-haspopup":"menu","aria-expanded":c,onClick:()=>d(P=>!P),onFocus:P=>u(P.currentTarget.matches(":focus-visible")),onBlur:()=>u(!1),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",cursor:"pointer",position:"relative",style:{background:p||m?r.activeBgLight:s||c?r.hoverBgLight:"transparent",outline:l?`2px solid ${r.solid}`:void 0,outlineOffset:l?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:p||m?r.activeBgDark:s||c?r.hoverBgDark:"transparent"},children:[e.icon&&i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:p||m?r.solid:void 0,opacity:p||m?1:s||c?.85:.6},color:p||m?r.chakraToken:"text.body",children:e.icon}),m&&i.jsx(f.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:r.solid},"aria-hidden":"true"})]});return i.jsxs(f.Box,{position:"relative",ref:h,my:"0.5",display:"flex",justifyContent:"center",style:{zIndex:c?100:1},children:[c?C:i.jsx(Ct,{label:e.label,placement:"right",children:C}),c&&i.jsx(tt.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:i.jsxs(f.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:[i.jsxs(f.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&&i.jsx(f.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",color:r.chakraToken,children:e.icon}),i.jsx(f.Box,{as:"span",children:e.label})]}),i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",px:"1",children:e.subItems.map(P=>i.jsx(Pi,{item:P,renderLink:t,onClick:()=>{d(!1),n==null||n()},scheme:r,isCollapsed:!1},P.href))})]})})]})}const B=i.jsx(Ct,{label:e.label,placement:"right",children:i.jsxs(f.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:()=>a(!0),onMouseLeave:()=>a(!1),onClick:n,style:{background:p?r.activeBgLight:s?r.hoverBgLight:"transparent",outline:l?`2px solid ${r.solid}`:void 0,outlineOffset:l?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:p?r.activeBgDark:s?r.hoverBgDark:"transparent"},children:[e.icon&&i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:j?r.solid:void 0,opacity:j?1:s?.85:.6},color:j?r.chakraToken:"text.body",children:e.icon}),typeof e.badge=="number"&&i.jsx(f.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:r.solid,color:"#fff"},children:e.badge>99?"99+":e.badge}),e.hasDot&&i.jsx(f.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:kt},"aria-label":"New notification"})]})});return t(e,B)}const w=i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:y?"lg":"none",borderTopLeftRadius:y?"lg":"none",borderBottomLeftRadius:y?"lg":"none",position:"relative",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:y?void 0:n,style:{background:p?r.activeBgLight:s?r.hoverBgLight:"transparent",boxShadow:p&&!y?`inset 3px 0 0 ${r.solid}`:void 0,outline:l?`2px solid ${r.solid}`:void 0,outlineOffset:l?"2px":void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:p?r.activeBgDark:s?r.hoverBgDark:"transparent"},children:[e.icon&&i.jsx(f.Box,{flexShrink:0,style:{color:j?r.solid:void 0,opacity:j?1:s?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:j?r.chakraToken:"text.body",children:e.icon}),i.jsx(f.Box,{as:"span",flex:"1",fontSize:"sm",fontWeight:j?"600":"500",fontFamily:"var(--font-body)",style:{color:j?r.solid:void 0,transition:"color 0.15s ease"},color:j?r.chakraToken:"text.body",children:e.label}),typeof e.badge=="number"&&!y&&i.jsx(f.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:r.solid,color:"#fff"},children:e.badge}),e.hasDot&&!y&&i.jsx(f.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:kt},"aria-label":"New notification"}),y&&i.jsx(f.Box,{flexShrink:0,color:"text.muted",children:i.jsx(of,{open:g})})]});return i.jsxs(i.Fragment,{children:[y?i.jsx("button",{type:"button","aria-expanded":g,"aria-controls":v,onClick:()=>x(B=>!B),onFocus:B=>{u(B.currentTarget.matches(":focus-visible"))},onBlur:()=>u(!1),style:{display:"block",width:"100%",background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:w}):t(e,w),y&&i.jsx(tt.div,{id:v,initial:!1,animate:g?{height:"auto",opacity:1}:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},style:{overflow:"hidden"},"aria-hidden":!g,children:i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"9",mt:"0.5",mb:"1",children:e.subItems.map(B=>i.jsx(Pi,{item:B,renderLink:t,onClick:n,scheme:r,isCollapsed:!1},B.href))})})]})}let Vl=!1;function B2(){if(typeof document>"u"||Vl)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
352
352
  @keyframes medixMobileNavIn {
353
353
  from { transform: translateY(100%); opacity: 0; }
354
354
  to { transform: translateY(0); opacity: 1; }
355
355
  }
356
- `,document.head.appendChild(e),Ll=!0}function u2({items:e,renderLink:t,scheme:n}){return S.useEffect(()=>{c2()},[]),a.jsx(f.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(r=>{const i=r.isActive??!1,o=a.jsxs(Tt.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:[a.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(${i?1:0})`,opacity:i?1:0,transition:"transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease",pointerEvents:"none"}}),a.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",zIndex:1,color:i?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",opacity:i?1:.6},children:[r.icon,typeof r.badge=="number"&&r.badge>0&&a.jsx("span",{"aria-label":`${r.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:r.badge>99?"99+":r.badge})]}),a.jsx(f.Box,{as:"span",fontSize:"2xs",fontWeight:i?"700":"500",fontFamily:"var(--font-body)",textAlign:"center",lineHeight:"1",position:"relative",zIndex:1,color:i?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",letterSpacing:i?"-0.01em":"0"},children:r.label})]}),s={label:r.label,href:r.href,isActive:r.isActive};return a.jsx(f.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},children:t(s,o)},r.href)})})}const d2={bronze:{label:"Bronze Clinician",color:"#92400E",ring:"#D97706",bg:"rgba(217,119,6,0.10)"},silver:{label:"Silver Clinician",color:"#475569",ring:"#94A3B8",bg:"rgba(148,163,184,0.10)"},gold:{label:"Gold Clinician",color:"#D97706",ring:"#F59E0B",bg:"rgba(245,158,11,0.10)"},platinum:{label:"Platinum Clinician",color:"#0284C7",ring:"#38BDF8",bg:"rgba(56,189,248,0.10)"},diamond:{label:"Diamond Clinician",color:"#7C3AED",ring:"#A78BFA",bg:"rgba(167,139,250,0.10)"}},f2=({color:e})=>a.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("circle",{cx:"12",cy:"8",r:"6"}),a.jsx("path",{d:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11"})]}),h2=()=>a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"9 18 15 12 9 6"})});function p2({data:e,renderLink:t}){const n=d2[e.tier],r=e.name.split(" ").map(o=>o[0]).join("").slice(0,2).toUpperCase(),i=a.jsxs(f.Box,{mx:"3",my:"4",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",style:{cursor:e.link?"pointer":"default"},_hover:e.link?{borderColor:n.ring,boxShadow:`0 0 0 1px ${n.ring}40`}:void 0,transition:"border-color 0.15s ease, box-shadow 0.15s ease",children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",pt:"3",pb:"2.5",children:[a.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${n.ring}, ${n.color})`},children:e.avatarSrc?a.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):a.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:n.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:n.color,fontFamily:"var(--font-heading)"},children:r})}),a.jsxs(f.Box,{flex:"1",minW:"0",children:[a.jsx(f.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}),a.jsx(f.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&&a.jsx(f.Box,{color:"text.muted",flexShrink:0,children:a.jsx(h2,{})})]}),a.jsx(f.Box,{borderTop:"1px solid",borderColor:"border"}),a.jsxs(f.Box,{px:"3",pt:"2",pb:"2.5",children:[a.jsx(f.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[a.jsx(f2,{color:n.color}),a.jsx(f.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n.color,whiteSpace:"nowrap"},children:n.label}),a.jsxs(f.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?a.jsx(a.Fragment,{children:t({label:e.role,href:e.link},i)}):a.jsx(a.Fragment,{children:i})}function m2({logo:e,navGroups:t,isOpen:n,onClose:r,onLogout:i,renderLink:o,sidebarWidth:s,scheme:l,scoreCard:u}){const[d,c]=S.useState(!1);return a.jsxs(a.Fragment,{children:[n&&a.jsx(f.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:r,"aria-hidden":"true"}),a.jsxs(f.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:`${s}px`,zIndex:{base:"modal",md:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:n?"translateX(0)":`translateX(-${s+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1)",children:[a.jsx(f.Box,{h:"16",minH:"16",maxH:"16",px:"5",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",overflow:"hidden",children:e}),u&&a.jsx(f.Box,{display:{base:"none",md:"block"},flexShrink:0,pt:"3",children:a.jsx(p2,{data:u,renderLink:o})}),a.jsx(f.Box,{flex:"1",overflowY:"auto",py:"3",px:"3",children:t.map((h,p)=>a.jsxs(f.Box,{mb:"4",children:[h.groupLabel&&a.jsx(f.Box,{px:"3",pb:"2",pt:p>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:h.groupLabel}),a.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",children:h.items.map(m=>a.jsx(Kd,{item:m,renderLink:o,onClick:r,scheme:l},m.href))})]},p))}),a.jsx(f.Box,{px:"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:a.jsxs(f.Box,{as:"button",display:"flex",alignItems:"center",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:()=>{r(),i==null||i()},style:{background:d?$d:"transparent",color:Jt,transition:"background 0.15s ease"},children:[a.jsx(f.Box,{flexShrink:0,style:{color:Jt},children:a.jsx(Yd,{})}),a.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Jt},children:"Log out"})]})})]})]})}function g2({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:r,onMenuToggle:i,sidebarWidth:o,topBarSlot:s,dropdownItems:l,onLogout:u,scheme:d}){const[c,h]=S.useState(!1),p=S.useRef(null),m=S.useId(),g=`user-menu-button-${m}`,x=`user-menu-dropdown-${m}`;return S.useEffect(()=>{const y=b=>{p.current&&!p.current.contains(b.target)&&h(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[]),a.jsxs(f.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:[a.jsx(f.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:i,"aria-label":r?"Close navigation menu":"Open navigation menu","aria-expanded":r,children:r?a.jsx(e2,{}):a.jsx(Q0,{})}),a.jsxs(f.Box,{flex:"1",minW:"0",children:[a.jsxs(f.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",a.jsx(f.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&a.jsx(f.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})]}),s,a.jsx(l2,{scheme:d}),a.jsxs(f.Box,{position:"relative",ref:p,children:[a.jsxs(f.Box,{as:"button",id:g,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>h(y=>!y),"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?x:void 0,"aria-label":"User menu",children:[a.jsx(ni,{name:e.name,src:e.avatarSrc,size:"sm"}),a.jsx(f.Box,{color:"text.muted",children:a.jsx(Gd,{open:c})})]}),c&&a.jsxs(f.Box,{role:"menu","aria-labelledby":g,id:x,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:[a.jsxs(f.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[a.jsx(f.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!l&&a.jsxs(a.Fragment,{children:[a.jsx(Tr,{icon:a.jsx(t2,{}),label:"My Profile",onClick:()=>h(!1),scheme:d}),a.jsx(Tr,{icon:a.jsx(n2,{}),label:"Settings",onClick:()=>h(!1),scheme:d})]}),l==null?void 0:l.map((y,b)=>a.jsx(Tr,{icon:y.icon,label:y.label,isDanger:y.isDanger,onClick:()=>{var T;h(!1),(T=y.onClick)==null||T.call(y)},scheme:d},b)),a.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),a.jsx(Tr,{icon:a.jsx(Yd,{}),label:"Log out",isDanger:!0,onClick:()=>{h(!1),u==null||u()},scheme:d})]})]})]})}function Tr({icon:e,label:t,isDanger:n,onClick:r,scheme:i}){const[o,s]=S.useState(!1);return a.jsxs(f.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:()=>s(!0),onMouseLeave:()=>s(!1),onClick:r,style:{background:o?n?$d:i.hoverBgLight:"transparent",color:n?Jt:void 0,transition:"background 0.12s ease"},children:[e&&a.jsx(f.Box,{flexShrink:0,style:{color:n?Jt:void 0},color:"text.muted",children:e}),a.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Jt:void 0},color:n?void 0:"text.body",children:t})]})}function qd({children:e,logo:t,navGroups:n,user:r,greeting:i,greetingSubtext:o,onLogout:s,renderLink:l=s2,dropdownItems:u,topBarSlot:d,sidebarWidth:c=220,colorScheme:h="blue",mobileNavItems:p,scoreCard:m,...g}){const[x,y]=S.useState(!1),b=J0[h],T=!!(p&&p.length>0),w=i??a2(),A=t??a.jsx(sr,{variant:h,height:26});return a.jsxs(f.Box,{display:"flex",minH:"100vh",bg:"bg",...g,children:[a.jsx(m2,{logo:A,navGroups:n,isOpen:x,onClose:()=>y(!1),onLogout:s,renderLink:l,sidebarWidth:c,scheme:b,scoreCard:m}),a.jsxs(f.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${c}px`},transition:"margin-left 0.25s cubic-bezier(0.22,1,0.36,1)",children:[a.jsx(g2,{user:r,greeting:w,greetingSubtext:o,isSidebarOpen:x,onMenuToggle:()=>y(E=>!E),sidebarWidth:c,topBarSlot:d,dropdownItems:u,onLogout:s,scheme:b}),a.jsx(f.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:T?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),T&&a.jsx(u2,{items:p,renderLink:l,scheme:b})]})}qd.displayName="MedixDashboardLayout";const Xd=[0,0,.2,1],x2=[.4,0,1,1],y2=[.22,1,.36,1],b2={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:y2}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:x2}}},v2={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},k2={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Xd}}},w2={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Xd,delay:.18}}},S2={blue:{solid:"#0685FF",hover:"#0685FF",hoverBg:"blue.50",hoverBgDark:"rgba(6,133,255,0.10)"},purple:{solid:"#7700CC",hover:"#7700CC",hoverBg:"purple.50",hoverBgDark:"rgba(119,0,204,0.10)"}},C2=()=>a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),a.jsx("polyline",{points:"7 7 17 7 17 17"})]});function j2({color:e}){return a.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),a.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function T2({color:e}){return a.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),a.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 B2=(e,t)=>a.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function F2({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:r="Get Started",ctaHref:i,onCtaClick:o,ctaIconHref:s,onCtaIconClick:l,secondaryCtaLabel:u,secondaryCtaHref:d,onSecondaryCtaClick:c,ctaSlot:h,renderLink:p=B2,isSticky:m=!1,colorScheme:g="blue",variant:x="solid",...y}){const[b,T]=S.useState(!1),w=S2[g],A=s??i,E=l??o,C=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},O=({mobile:B=!1})=>a.jsxs(f.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:B?"column":"row",children:[u&&a.jsx(Ye,{as:d?"a":"button",href:d,variant:B?"outline":"ghost",colorScheme:g,size:B?"md":"sm",onClick:()=>{c==null||c(),B&&T(!1)},style:B?{width:"100%"}:void 0,children:u}),a.jsx(Ye,{as:i?"a":"button",href:i,variant:"solid",colorScheme:g,size:B?"md":"sm",onClick:()=>{o==null||o(),B&&T(!1)},style:B?{width:"100%"}:void 0,children:r}),!B&&a.jsx(Ye,{as:A?"a":"button",href:A,target:A&&A!==i?"_blank":void 0,rel:A&&A!==i?"noopener noreferrer":void 0,variant:"solid",colorScheme:g,size:"sm",onClick:E,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:a.jsx(C2,{})})]});return a.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:m?"sticky":"relative",top:m?"0":void 0,zIndex:m?"sticky":void 0,bg:x==="transparent"?"transparent":x==="blur"?void 0:"bg",style:C,borderBottom:"1px solid",borderColor:x==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...y,children:[a.jsxs(f.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[a.jsx(f.Box,{flexShrink:0,children:e??a.jsx(sr,{variant:g==="blue"?"blue":"purple",height:28})}),a.jsx(f.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(B=>a.jsx(f.Box,{as:"li",children:p(B,a.jsx(f.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:B.isActive?w.hover:"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:w.hover,bg:w.hoverBg},_dark:{_hover:{bg:w.hoverBgDark}},cursor:"pointer",children:B.label}))},B.href))}),a.jsx(f.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:h??a.jsx(O,{})}),a.jsx(f.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>T(!b),"aria-label":b?"Close menu":"Open menu","aria-expanded":b,style:{flexShrink:0,position:"relative",width:32,height:32},children:a.jsx(To,{mode:"wait",initial:!1,children:b?a.jsx(Tt.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:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(T2,{color:w.solid})},"close"):a.jsx(Tt.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:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(j2,{color:w.solid})},"hamburger")})})]}),a.jsx(To,{children:b&&a.jsx(Tt.div,{variants:b2,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:a.jsxs(f.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[a.jsx(Tt.ul,{variants:v2,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(B=>a.jsx(Tt.li,{variants:k2,children:p(B,a.jsx(f.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:B.isActive?w.hover:"text.body",borderRadius:"md",_hover:{color:w.hover,bg:"bg.subtle"},cursor:"pointer",onClick:()=>T(!1),children:B.label}))},B.href))}),a.jsx(Tt.div,{variants:w2,initial:"hidden",animate:"visible",children:a.jsx(f.Box,{mt:"4",children:h??a.jsx(O,{mobile:!0})})})]})},"mobile-menu")})]})}const E2={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)"}},A2=e=>({facebook:a.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),a.jsx("g",{clipPath:"url(#clip0_1217_192)",children:a.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"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_1217_192",children:a.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:a.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),a.jsx("g",{clipPath:"url(#clip0_1217_186)",children:a.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"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_1217_186",children:a.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:a.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),a.jsx("g",{clipPath:"url(#clip0_1217_198)",children:a.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"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_1217_198",children:a.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:a.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),a.jsx("g",{clipPath:"url(#clip0_1217_183)",children:a.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"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_1217_183",children:a.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:a.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),a.jsx("g",{clipPath:"url(#clip0_1217_195)",children:a.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"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_1217_195",children:a.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:a.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),a.jsx("g",{clipPath:"url(#clip0_1217_189)",children:a.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"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_1217_189",children:a.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),whatsapp:a.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),a.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:a.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:a.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),a.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:a.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"})})]})}),L2="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",I2=[{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"}]}],D2=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"whatsapp",href:"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"}],R2=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],M2=(e,t)=>a.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function Zd({description:e=L2,logo:t,sections:n=I2,socialLinks:r=D2,copyright:i,bottomLinks:o=R2,newsletter:s,renderLink:l=M2,colorScheme:u="blue",certifications:d,...c}){const h=new Date().getFullYear(),p=i??`© ${h} MedixDeck Health Solutions Ltd. All Rights Reserved.`,[m,g]=S.useState(""),[x,y]=S.useState(!1),[b,T]=S.useState(!1),w=E2[u],{mounted:A,themeMode:E,toggleThemeMode:C}=or(),O=B=>{B.preventDefault(),s!=null&&s.onSubmit&&m&&(s.onSubmit(m),g(""))};return a.jsx(f.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...c,children:a.jsxs(f.Container,{maxWidth:"7xl",children:[a.jsxs(f.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[a.jsxs(f.Box,{children:[a.jsx(f.Box,{mb:4,children:a.jsx(f.Link,{href:"/",children:t??a.jsx(sr,{variant:u==="blue"?"blue":"purple",height:28})})}),a.jsx(f.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),a.jsx(f.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const B=A2(w.solid);return r.map(F=>a.jsx(f.Link,{href:F.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:F.platform,"aria-label":F.platform,children:B[F.platform]},F.platform))})()})]}),a.jsx(f.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(B=>a.jsxs(f.Box,{children:[a.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:B.title}),a.jsx(f.VStack,{align:"flex-start",gap:3,children:B.links.map(F=>a.jsx(f.Box,{w:"full",children:l(F,a.jsx(f.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:w.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:F.label}))},F.label))})]},B.title))}),!(s!=null&&s.hide)&&a.jsx(f.Box,{children:a.jsxs(f.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[a.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(s==null?void 0:s.title)??"Newsletter"}),a.jsx(f.Text,{fontSize:"sm",color:"text.body",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(s==null?void 0:s.description)??"Get monthly health tips from our verified specialists."}),a.jsxs(f.Box,{as:"form",onSubmit:O,position:"relative",display:"flex",children:[a.jsx(f.Box,{as:"input",type:"email",value:m,onChange:B=>g(B.target.value),placeholder:(s==null?void 0:s.placeholder)??"email@address.com",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:w.token,boxShadow:`0 0 0 1px ${w.solid}`},transition:"all 0.2s",required:!0}),a.jsx("button",{type:"submit",style:{position:"absolute",right:"4px",top:"4px",bottom:"4px",width:"36px",height:"36px",padding:0,background:x?w.solidHover:w.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:b?`0 0 0 3px ${w.focusRing}`:"none",transition:"background 0.2s ease, box-shadow 0.2s ease"},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onFocus:()=>T(!0),onBlur:()=>T(!1),"aria-label":"Subscribe",children:(s==null?void 0:s.buttonIcon)??a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),a.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),a.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:a.jsxs(f.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[a.jsx(f.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:p}),a.jsxs(f.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[o.map(B=>a.jsx(f.Box,{children:l(B,a.jsx(f.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:B.label}))},B.label)),A&&a.jsx(f.Box,{as:"button",onClick:C,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:E==="dark"?a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("circle",{cx:"12",cy:"12",r:"5"}),a.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),a.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),a.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),a.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),a.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),a.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),a.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),a.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})}),d&&d.length>0&&a.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:a.jsx(f.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:d.map(B=>{const F=a.jsxs(f.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:B.href?"pointer":"default"},children:[B.imageSrc?a.jsx("img",{src:B.imageSrc,alt:B.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):a.jsx(f.Box,{color:"text.muted",flexShrink:0,children:a.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}),a.jsx(f.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:B.name})]},B.name);return B.href?a.jsx(f.Box,{children:l({href:B.href,isExternal:B.isExternal??!0},F)},B.name):a.jsx(f.Box,{children:F},B.name)})})})]})})}Zd.displayName="MedixFooter";const P2=a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.jsx("path",{d:"m9 18 6-6-6-6"})}),O2=(e,t)=>e.href?a.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):a.jsx(a.Fragment,{children:t});function z2({items:e,separator:t=P2,renderLink:n=O2,...r}){return a.jsx(f.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",...r,children:e.map((i,o)=>{const s=o===e.length-1;return a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(i,a.jsx(f.Box,{as:"span",display:"inline-block",lineHeight:"1.2",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:s?"medium":"normal",color:s?"text.heading":"text.muted",_hover:s?void 0:{color:"blue.500"},cursor:!s&&i.href?"pointer":"default",transition:"color 0.15s",wordBreak:"break-word",whiteSpace:s?"normal":"nowrap",children:i.label})),!s&&a.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},o)})})}const _2={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function N2({tabs:e,defaultActiveId:t,activeId:n,onChange:r,variant:i="line",size:o="md",renderContent:s=!0,...l}){var g;const[u,d]=S.useState(t??((g=e[0])==null?void 0:g.id)),c=n??u,h=x=>{d(x),r==null||r(x)},p=e.find(x=>x.id===c),m=_2[o];return a.jsxs(f.Box,{...l,children:[a.jsx(f.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(x=>{const y=x.id===c;return a.jsxs(f.Box,{role:"tab","aria-selected":y,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onClick:()=>!x.disabled&&h(x.id),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&!x.disabled&&h(x.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:i==="pill"?"4":m.px,py:i==="pill"?"3":m.py,fontFamily:"var(--font-body)",fontWeight:y?"semibold":"medium",fontSize:i==="pill"?"sm":m.fontSize,color:x.disabled?"text.muted":i==="pill"?y?"text.heading":"text.body":y?"blue.500":"text.body",cursor:x.disabled?"not-allowed":"pointer",opacity:x.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:i==="pill"?"1":void 0,flexShrink:i==="pill"?1:0,bg:i==="pill"?y?"bg":"bg.surface":"transparent",borderRadius:i==="pill"?"full":"none",boxShadow:"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?y?"blue.500":"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:x.disabled?void 0:i==="line"?{color:"blue.500"}:{bg:y?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:i==="pill"?"full":"sm"},children:[a.jsx(f.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:x.label}),x.badge!==void 0&&a.jsx(f.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"?y?"bg.subtle":"bg":y?"blue.100":"bg.subtle",color:i==="pill"?y?"text.heading":"text.muted":y?"blue.700":"text.muted",children:x.badge})]},x.id)})}),s&&(p==null?void 0:p.content)&&a.jsx(f.Box,{role:"tabpanel",mt:"4",children:p.content})]})}function V2(e,t,n){if(n*2+5>=t)return Array.from({length:t},(u,d)=>d+1);const i=Math.max(e-n,1),o=Math.min(e+n,t),s=i>2,l=o<t-2;if(!s&&l){const u=3+2*n;return[...Array.from({length:u},(d,c)=>c+1),"...",t]}if(s&&!l){const u=3+2*n;return[1,"...",...Array.from({length:u},(d,c)=>t-u+1+c)]}return[1,"...",...Array.from({length:o-i+1},(u,d)=>i+d),"...",t]}function Jd({total:e,pageSize:t=10,currentPage:n=1,onChange:r,siblingCount:i=1,showEdges:o=!0,compact:s=!1,...l}){const u=Math.ceil(e/t);if(u<=1)return null;const d=V2(n,u,i),c={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"},h=({children:g,disabled:x,onClick:y,label:b,icon:T,isNext:w})=>a.jsxs(f.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:x?.4:1,pointerEvents:x?"none":void 0,onClick:y,"aria-label":b,_hover:{color:"blue.500"},children:[!w&&T&&a.jsx(f.Box,{as:"span",display:"flex",alignItems:"center",children:T}),g,w&&T&&a.jsx(f.Box,{as:"span",display:"flex",alignItems:"center",children:T})]}),p=a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"M15 18l-6-6 6-6"})}),m=a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"M9 18l6-6-6-6"})});return a.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...l,children:[o&&a.jsx(h,{disabled:n===1,onClick:()=>r==null?void 0:r(1),label:"First page",icon:p,children:"First"}),a.jsx(h,{disabled:n===1,onClick:()=>r==null?void 0:r(n-1),label:"Previous page",icon:p,children:"Prev"}),!s&&d.map((g,x)=>g==="..."?a.jsx(f.Box,{...c,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${x}`):a.jsx(f.Box,{as:"button",...c,bg:n===g?"blue.500":"blue.100",color:n===g?"white":"blue.500",_dark:{bg:n===g?"blue.500":"rgba(6, 133, 255, 0.12)",color:n===g?"white":"blue.200"},onClick:()=>r==null?void 0:r(g),"aria-label":`Page ${g}`,"aria-current":n===g?"page":void 0,_hover:n!==g?{bg:"blue.200",_dark:{bg:"rgba(6, 133, 255, 0.2)"}}:void 0,children:g},g)),s&&a.jsxs(f.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",u]}),a.jsx(h,{disabled:n===u,onClick:()=>r==null?void 0:r(n+1),label:"Next page",icon:m,isNext:!0,children:"Next"}),o&&a.jsx(h,{disabled:n===u,onClick:()=>r==null?void 0:r(u),label:"Last page",icon:m,isNext:!0,children:"Last"})]})}const Il=a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function H2({steps:e,currentStep:t,variant:n="default",orientation:r="horizontal",colorScheme:i="blue",...o}){const s=i==="blue"?"#0685FF":"#7700CC",l=i==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return r==="vertical"?a.jsx(f.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...o,children:e.map((d,c)=>{const h=c+1<t,p=c+1===t,m=c===e.length-1,g=h||p?s:"var(--chakra-colors-border, #E2E8F0)";return a.jsxs(f.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[a.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[a.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:h||p?s:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:h?Il:d.icon??c+1}),!m&&a.jsx(f.Box,{w:"2px",flex:"1",minH:"8",bg:h?s:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&a.jsxs(f.Box,{pt:"1",pb:m?"0":"8",children:[a.jsx(f.Box,{fontSize:"sm",fontWeight:p?"semibold":"medium",color:h||p?s:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:d.title}),d.description&&a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:d.description})]})]},d.id)})}):a.jsx(f.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...o,children:e.map((d,c)=>{const h=c+1<t,p=c+1===t,m=c+1>t,g=c===e.length-1,x=m?"bg.subtle":s,y=h?Il:d.icon?d.icon:a.jsx(f.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:c+1}),b=!m&&n!=="compact",T=m?"text.muted":s;return a.jsxs(S.Fragment,{children:[a.jsx(f.Box,{role:"listitem","aria-current":p?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:a.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:b?"2":"0",py:b?"1.5":"0",bg:b?l:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[a.jsx(f.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:x,border:m?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:y}),n!=="compact"&&a.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:p||h?"semibold":"medium",fontFamily:"var(--font-body)",color:T,whiteSpace:"nowrap",transition:"color 0.25s",children:d.title})]})}),!g&&a.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:a.jsx(f.Box,{h:"1.5px",w:"10",bg:h?s:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},d.id)})})}const W2=`
356
+ `,document.head.appendChild(e),Vl=!0}function E2({items:e,renderLink:t,scheme:n}){return S.useEffect(()=>{B2()},[]),i.jsx(f.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(r=>{const o=r.isActive??!1,s=i.jsxs(tt.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:[i.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(${o?1:0})`,opacity:o?1:0,transition:"transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease",pointerEvents:"none"}}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",zIndex:1,color:o?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",opacity:o?1:.6},children:[r.icon,typeof r.badge=="number"&&r.badge>0&&i.jsx("span",{"aria-label":`${r.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:r.badge>99?"99+":r.badge})]}),i.jsx(f.Box,{as:"span",fontSize:"2xs",fontWeight:o?"700":"500",fontFamily:"var(--font-body)",textAlign:"center",lineHeight:"1",position:"relative",zIndex:1,color:o?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",letterSpacing:o?"-0.01em":"0"},children:r.label})]}),a={label:r.label,href:r.href,isActive:r.isActive};return i.jsx(f.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},children:t(a,s)},r.href)})})}const F2={bronze:{label:"Bronze Clinician",color:"#92400E",ring:"#D97706",bg:"rgba(217,119,6,0.10)"},silver:{label:"Silver Clinician",color:"#475569",ring:"#94A3B8",bg:"rgba(148,163,184,0.10)"},gold:{label:"Gold Clinician",color:"#D97706",ring:"#F59E0B",bg:"rgba(245,158,11,0.10)"},platinum:{label:"Platinum Clinician",color:"#0284C7",ring:"#38BDF8",bg:"rgba(56,189,248,0.10)"},diamond:{label:"Diamond Clinician",color:"#7C3AED",ring:"#A78BFA",bg:"rgba(167,139,250,0.10)"}},A2=({color:e})=>i.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"8",r:"6"}),i.jsx("path",{d:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11"})]}),L2=()=>i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("polyline",{points:"9 18 15 12 9 6"})});function I2({data:e,renderLink:t,isCollapsed:n=!1}){const r=F2[e.tier],o=e.name.split(" ").map(a=>a[0]).join("").slice(0,2).toUpperCase();if(n){const a=i.jsx(Ct,{label:`${e.role} — ${e.name} (${r.label}, ${e.medixScore} pts)`,placement:"right",children:i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",my:"3",mx:"auto","aria-label":`${e.role} ${e.name}`,cursor:e.link?"pointer":"default",children:i.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${r.ring}, ${r.color})`},children:e.avatarSrc?i.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx("div",{style:{width:36,height:36,borderRadius:"50%",background:r.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:r.color,fontFamily:"var(--font-heading)"},children:o})})})});return e.link?i.jsx(i.Fragment,{children:t({label:e.role,href:e.link},a)}):i.jsx(i.Fragment,{children:a})}const s=i.jsxs(f.Box,{mx:"3",my:"4",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",style:{cursor:e.link?"pointer":"default"},_hover:e.link?{borderColor:r.ring,boxShadow:`0 0 0 1px ${r.ring}40`}:void 0,transition:"border-color 0.15s ease, box-shadow 0.15s ease",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",pt:"3",pb:"2.5",children:[i.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${r.ring}, ${r.color})`},children:e.avatarSrc?i.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:r.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:r.color,fontFamily:"var(--font-heading)"},children:o})}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsx(f.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}),i.jsx(f.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&&i.jsx(f.Box,{color:"text.muted",flexShrink:0,children:i.jsx(L2,{})})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border"}),i.jsxs(f.Box,{px:"3",pt:"2",pb:"2.5",children:[i.jsx(f.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[i.jsx(A2,{color:r.color}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:r.color,whiteSpace:"nowrap"},children:r.label}),i.jsxs(f.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?i.jsx(i.Fragment,{children:t({label:e.role,href:e.link},s)}):i.jsx(i.Fragment,{children:s})}function D2({logo:e,collapsedLogo:t,navGroups:n,isOpen:r,onClose:o,onLogout:s,renderLink:a,sidebarWidth:l,collapsedSidebarWidth:u,isCollapsed:c,collapsible:d,onToggleCollapse:h,collapseTogglePlacement:p,scheme:m,scoreCard:g}){const[x,y]=S.useState(!1);return i.jsxs(i.Fragment,{children:[r&&i.jsx(f.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:o,"aria-hidden":"true"}),i.jsxs(f.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:{base:`${l}px`,md:`${c?u:l}px`},zIndex:{base:"modal",md:c?1200:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:r?"translateX(0)":`translateX(-${l+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:[i.jsxs(f.Box,{h:c?{base:"16",md:"auto"}:"16",minH:c?{base:"16",md:"84px"}:"16",px:c?{base:"5",md:"2"}:"5",py:c?{base:"0",md:"3"}:"0",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",children:[i.jsxs(f.Box,{display:{base:"none",md:c?"flex":"none"},flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2",w:"full",children:[i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:t??i.jsx(tn,{type:"icon",variant:m.chakraToken==="blue.500"?"blue":"purple",height:26})}),d&&(p==="sidebar-header"||p==="both")&&i.jsx(Ct,{label:"Expand sidebar",placement:"right",children:i.jsx(f.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:h,"aria-label":"Expand sidebar",transition:"background 0.15s ease, color 0.15s ease",children:i.jsx(rf,{})})})]}),i.jsxs(f.Box,{display:{base:"flex",md:c?"none":"flex"},alignItems:"center",justifyContent:"space-between",w:"full",minW:"0",children:[i.jsx(f.Box,{flex:"1",minW:"0",overflow:"hidden",children:e}),d&&(p==="sidebar-header"||p==="both")&&i.jsx(Ct,{label:"Collapse sidebar",placement:"bottom",children:i.jsx(f.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:h,"aria-label":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:i.jsx(nf,{})})})]})]}),g&&i.jsx(f.Box,{display:{base:"none",md:"block"},flexShrink:0,pt:c?"1":"3",children:i.jsx(I2,{data:g,renderLink:a,isCollapsed:c})}),i.jsx(f.Box,{flex:"1",overflowY:c?"visible":"auto",overflowX:c?"visible":"hidden",position:"relative",py:"3",px:c?"2":"3",children:n.map((v,j)=>i.jsxs(f.Box,{mb:c?"2":"4",children:[v.groupLabel&&(c?j>0?i.jsx(f.Box,{h:"1px",bg:"border",mx:"2",my:"2"}):null:i.jsx(f.Box,{px:"3",pb:"2",pt:j>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:v.groupLabel})),i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:c?"1.5":"0.5",children:v.items.map(w=>i.jsx(Pi,{item:w,renderLink:a,onClick:o,scheme:m,isCollapsed:c},w.href))})]},j))}),i.jsx(f.Box,{px:c?"2":"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:c?i.jsx(Ct,{label:"Log out",placement:"right",children:i.jsx(f.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"full",h:"10",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onClick:()=>{o(),s==null||s()},style:{background:x?Ri:"transparent",color:kt,transition:"background 0.15s ease"},children:i.jsx(f.Box,{flexShrink:0,style:{color:kt},children:i.jsx(Mi,{})})})}):i.jsxs(f.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:()=>y(!0),onMouseLeave:()=>y(!1),onClick:()=>{o(),s==null||s()},style:{background:x?Ri:"transparent",color:kt,transition:"background 0.15s ease"},children:[i.jsx(f.Box,{flexShrink:0,style:{color:kt},children:i.jsx(Mi,{})}),i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:kt},children:"Log out"})]})})]})]})}function R2({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:r,onMenuToggle:o,sidebarWidth:s,topBarSlot:a,dropdownItems:l,onLogout:u,scheme:c,collapsible:d=!0,isCollapsed:h=!1,onToggleCollapse:p,collapseTogglePlacement:m="sidebar-header"}){const[g,x]=S.useState(!1),y=S.useRef(null),v=S.useId(),j=`user-menu-button-${v}`,w=`user-menu-dropdown-${v}`;return S.useEffect(()=>{const F=B=>{y.current&&!y.current.contains(B.target)&&x(!1)};return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[]),i.jsxs(f.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:[i.jsx(f.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:o,"aria-label":r?"Close navigation menu":"Open navigation menu","aria-expanded":r,children:r?i.jsx(d2,{}):i.jsx(u2,{})}),d&&(m==="topbar"||m==="both")&&i.jsx(Ct,{label:h?"Expand sidebar":"Collapse sidebar",placement:"bottom",children:i.jsx(f.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:p,"aria-label":h?"Expand sidebar":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:h?i.jsx(rf,{}):i.jsx(nf,{})})}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",i.jsx(f.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&i.jsx(f.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,i.jsx(T2,{scheme:c}),i.jsxs(f.Box,{position:"relative",ref:y,children:[i.jsxs(f.Box,{as:"button",id:j,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>x(F=>!F),"aria-haspopup":"menu","aria-expanded":g,"aria-controls":g?w:void 0,"aria-label":"User menu",children:[i.jsx(lo,{name:e.name,src:e.avatarSrc,size:"sm"}),i.jsx(f.Box,{color:"text.muted",children:i.jsx(of,{open:g})})]}),g&&i.jsxs(f.Box,{role:"menu","aria-labelledby":j,id:w,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:[i.jsxs(f.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!l&&i.jsxs(i.Fragment,{children:[i.jsx(Ar,{icon:i.jsx(f2,{}),label:"My Profile",onClick:()=>x(!1),scheme:c}),i.jsx(Ar,{icon:i.jsx(h2,{}),label:"Settings",onClick:()=>x(!1),scheme:c})]}),l==null?void 0:l.map((F,B)=>i.jsx(Ar,{icon:F.icon,label:F.label,isDanger:F.isDanger,onClick:()=>{var C;x(!1),(C=F.onClick)==null||C.call(F)},scheme:c},B)),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),i.jsx(Ar,{icon:i.jsx(Mi,{}),label:"Log out",isDanger:!0,onClick:()=>{x(!1),u==null||u()},scheme:c})]})]})]})}function Ar({icon:e,label:t,isDanger:n,onClick:r,scheme:o}){const[s,a]=S.useState(!1);return i.jsxs(f.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:r,style:{background:s?n?Ri:o.hoverBgLight:"transparent",color:n?kt:void 0,transition:"background 0.12s ease"},children:[e&&i.jsx(f.Box,{flexShrink:0,style:{color:n?kt:void 0},color:"text.muted",children:e}),i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?kt:void 0},color:n?void 0:"text.body",children:t})]})}function sf({children:e,logo:t,navGroups:n,user:r,greeting:o,greetingSubtext:s,onLogout:a,renderLink:l=k2,dropdownItems:u,topBarSlot:c,sidebarWidth:d=220,collapsedSidebarWidth:h=68,collapsible:p=!0,defaultCollapsed:m=!1,isCollapsed:g,onCollapseChange:x,collapsedLogo:y,collapseTogglePlacement:v="sidebar-header",colorScheme:j="blue",mobileNavItems:w,scoreCard:F,environment:B="auto",showEnvironmentBanner:C,environmentBanner:P,environmentBannerSlot:A,...E}){const[L,R]=S.useState(!1),[D,N]=S.useState(m),[O,I]=S.useState(!1),[M,H]=S.useState(!1);S.useEffect(()=>{H(!0)},[]);const W=p&&(g!==void 0?g:D),$=()=>{if(!p)return;const ee=!W;g===void 0&&N(ee),x==null||x(ee)},b=c2[j],Y=!!(w&&w.length>0),oe=o??w2(),T=t??i.jsx(tn,{variant:j,height:26}),ie=y??i.jsx(tn,{type:"icon",variant:j,height:26}),se=P||{},X=se.environment||B,{isNonProduction:Z,detectedEnv:Q}=S2(X),ue=!O&&(C!==void 0?C:M?Z:X!=="production"&&X!=="live");return i.jsxs(f.Box,{display:"flex",minH:"100vh",bg:"bg",...E,children:[i.jsx(D2,{logo:T,collapsedLogo:ie,navGroups:n,isOpen:L,onClose:()=>R(!1),onLogout:a,renderLink:l,sidebarWidth:d,collapsedSidebarWidth:h,isCollapsed:W,collapsible:p,onToggleCollapse:$,collapseTogglePlacement:v,scheme:b,scoreCard:F}),i.jsxs(f.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${W?h:d}px`},transition:"margin-left 0.22s cubic-bezier(0.2,0,0,1)",children:[ue&&(A??i.jsx(j2,{detectedEnv:Q,config:se,onDismiss:()=>{var ee;I(!0),(ee=se.onDismiss)==null||ee.call(se)}})),i.jsx(R2,{user:r,greeting:oe,greetingSubtext:s,isSidebarOpen:L,onMenuToggle:()=>R(ee=>!ee),sidebarWidth:d,topBarSlot:c,dropdownItems:u,onLogout:a,scheme:b,collapsible:p,isCollapsed:W,onToggleCollapse:$,collapseTogglePlacement:v}),i.jsx(f.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:Y?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),Y&&i.jsx(E2,{items:w,renderLink:l,scheme:b})]})}sf.displayName="MedixDashboardLayout";const to=[0,0,.2,1],Ms=[.4,0,1,1],Ps=[.22,1,.36,1],M2={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Ps}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Ms}}},P2={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Wl={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:to}}},O2={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:to,delay:.18}}},z2={hidden:{opacity:0,y:-6,scale:.98,transformOrigin:"top"},visible:{opacity:1,y:0,scale:1,transformOrigin:"top",transition:{duration:.18,ease:Ps}},exit:{opacity:0,y:-4,scale:.98,transformOrigin:"top",transition:{duration:.12,ease:Ms}}},_2={hidden:{opacity:0,height:0,overflow:"hidden"},visible:{opacity:1,height:"auto",overflow:"hidden",transition:{duration:.22,ease:Ps}},exit:{opacity:0,height:0,overflow:"hidden",transition:{duration:.16,ease:Ms}}},N2={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"}},V2=()=>i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),i.jsx("polyline",{points:"7 7 17 7 17 17"})]});function af({isOpen:e}){return i.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:i.jsx("polyline",{points:"6 9 12 15 18 9"})})}function no(){return i.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:[i.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),i.jsx("polyline",{points:"15 3 21 3 21 9"}),i.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function W2({color:e}){return i.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),i.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function H2({color:e}){return i.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),i.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 U2=(e,t)=>{const n=e.href??"#",r=e.target??(e.isExternal?"_blank":void 0),o=e.rel??(e.isExternal?"noopener noreferrer":void 0);return n==="#"&&!e.onClick?i.jsx("span",{style:{textDecoration:"none",display:"contents"},children:t}):i.jsx("a",{href:n,target:r,rel:o,onClick:e.onClick,style:{textDecoration:"none",display:"contents"},children:t})};function jn({badge:e,scheme:t}){return e?S.isValidElement(e)?e:i.jsx(f.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 $2({item:e,scheme:t,renderLink:n}){var d;const[r,o]=S.useState(!1),s=S.useRef(null),a=S.useRef(null),l=!!(e.children&&e.children.length>0);S.useEffect(()=>{if(!r)return;function h(m){s.current&&!s.current.contains(m.target)&&o(!1)}function p(m){m.key==="Escape"&&o(!1)}return document.addEventListener("mousedown",h),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",p)}},[r]);const u=()=>{a.current&&(clearTimeout(a.current),a.current=null),l&&o(!0)},c=()=>{l&&(a.current=setTimeout(()=>{o(!1)},150))};return l?i.jsxs(f.Box,{as:"li",ref:s,listStyleType:"none",position:"relative",onMouseEnter:u,onMouseLeave:c,children:[i.jsxs(f.Box,{as:"button","aria-haspopup":"menu","aria-expanded":r,onClick:()=>o(!r),display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||r?t.hover:"text.body",bg:r?t.hoverBg:"transparent",_dark:{color:e.isActive||r?t.hover:"text.body",bg:r?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&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),i.jsx("span",{children:e.label}),i.jsx(jn,{badge:e.badge,scheme:t}),i.jsx(af,{isOpen:r})]}),i.jsx(lr,{children:r&&i.jsx(tt.div,{variants:z2,initial:"hidden",animate:"visible",exit:"exit",style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:1e3},children:i.jsx(f.Box,{bg:"bg.surface",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((h,p)=>i.jsx(f.Box,{as:"div",role:"none",children:n(h,i.jsxs(f.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:()=>o(!1),children:[h.icon&&i.jsx(f.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}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",justifyContent:"space-between",children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",children:[i.jsx("span",{children:h.label}),h.isExternal&&i.jsx(no,{})]}),i.jsx(jn,{badge:h.badge,scheme:t})]}),h.description&&i.jsx(f.Box,{as:"span",display:"block",fontSize:"xs",color:"text.muted",_dark:{color:"text.muted"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.4",children:h.description})]})]}))},h.href||`${h.label}-${p}`))})})})]}):i.jsx(f.Box,{as:"li",listStyleType:"none",children:n(e,i.jsxs(f.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&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),i.jsx("span",{children:e.label}),i.jsx(jn,{badge:e.badge,scheme:t}),e.isExternal&&i.jsx(no,{})]}))})}function G2({item:e,scheme:t,renderLink:n,onCloseMenu:r}){var l;const[o,s]=S.useState(!1);return!(e.children&&e.children.length>0)?i.jsx(tt.li,{variants:Wl,children:n(e,i.jsxs(f.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:r,children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),i.jsx("span",{children:e.label})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[i.jsx(jn,{badge:e.badge,scheme:t}),e.isExternal&&i.jsx(no,{})]})]}))}):i.jsxs(tt.li,{variants:Wl,style:{listStyle:"none"},children:[i.jsxs(f.Box,{as:"button",onClick:()=>s(!o),"aria-expanded":o,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||o?t.hover:"text.body",bg:o?"bg.subtle":"transparent",_dark:{color:e.isActive||o?t.hover:"text.body",bg:o?"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:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),i.jsx("span",{children:e.label})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[i.jsx(jn,{badge:e.badge,scheme:t}),i.jsx(af,{isOpen:o})]})]}),i.jsx(lr,{children:o&&i.jsx(tt.div,{variants:_2,initial:"hidden",animate:"visible",exit:"exit",children:i.jsx(f.Box,{pl:"4",pr:"2",py:"1.5",display:"flex",flexDirection:"column",gap:"1",borderLeft:"2px solid",borderColor:"border",ml:"4",my:"1",children:(l=e.children)==null?void 0:l.map((u,c)=>i.jsx(f.Box,{as:"div",children:n(u,i.jsxs(f.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:r,children:[u.icon&&i.jsx(f.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:u.icon}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1",children:[i.jsxs(f.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-heading)",children:[i.jsx("span",{children:u.label}),u.isExternal&&i.jsx(no,{})]}),i.jsx(jn,{badge:u.badge,scheme:t})]}),u.description&&i.jsx(f.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:u.description})]})]}))},u.href||`${u.label}-${c}`))})})})]})}function Y2({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:r="Get Started",ctaHref:o,onCtaClick:s,ctaIconHref:a,onCtaIconClick:l,secondaryCtaLabel:u,secondaryCtaHref:c,onSecondaryCtaClick:d,ctaSlot:h,renderLink:p=U2,isSticky:m=!1,colorScheme:g="blue",variant:x="solid",...y}){const[v,j]=S.useState(!1),w=N2[g],F=a??o,B=l??s,C=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},P=({mobile:A=!1})=>i.jsxs(f.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:A?"column":"row",children:[u&&i.jsx(Ye,{as:c?"a":"button",href:c,variant:A?"outline":"ghost",colorScheme:g,size:A?"md":"sm",onClick:()=>{d==null||d(),A&&j(!1)},style:A?{width:"100%"}:void 0,children:u}),i.jsx(Ye,{as:o?"a":"button",href:o,variant:"solid",colorScheme:g,size:A?"md":"sm",onClick:()=>{s==null||s(),A&&j(!1)},style:A?{width:"100%"}:void 0,children:r}),!A&&i.jsx(Ye,{as:F?"a":"button",href:F,target:F&&F!==o?"_blank":void 0,rel:F&&F!==o?"noopener noreferrer":void 0,variant:"solid",colorScheme:g,size:"sm",onClick:B,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:i.jsx(V2,{})})]});return i.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:m?"sticky":"relative",top:m?"0":void 0,zIndex:m?"sticky":40,bg:x==="transparent"?"transparent":x==="blur"?void 0:"bg",style:C,borderBottom:"1px solid",borderColor:x==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...y,children:[i.jsxs(f.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[i.jsx(f.Box,{flexShrink:0,children:e??i.jsx(tn,{variant:g==="blue"?"blue":"purple",height:28})}),i.jsx(f.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((A,E)=>i.jsx($2,{item:A,scheme:w,renderLink:p},A.href||`${A.label}-${E}`))}),i.jsx(f.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:h??i.jsx(P,{})}),i.jsx(f.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>j(!v),"aria-label":v?"Close menu":"Open menu","aria-expanded":v,position:"relative",width:"32px",height:"32px",flexShrink:0,children:i.jsx(lr,{mode:"wait",initial:!1,children:v?i.jsx(tt.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:to},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:i.jsx(H2,{color:w.solid})},"close"):i.jsx(tt.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:to},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:i.jsx(W2,{color:w.solid})},"hamburger")})})]}),i.jsx(lr,{children:v&&i.jsx(tt.div,{variants:M2,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:i.jsxs(f.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[i.jsx(tt.ul,{variants:P2,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map((A,E)=>i.jsx(G2,{item:A,scheme:w,renderLink:p,onCloseMenu:()=>j(!1)},A.href||`${A.label}-${E}`))}),i.jsx(tt.div,{variants:O2,initial:"hidden",animate:"visible",children:i.jsx(f.Box,{mt:"4",children:h??i.jsx(P,{mobile:!0})})})]})},"mobile-menu")})]})}const K2={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)"}},q2=e=>({facebook:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_192)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_192",children:i.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_186)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_186",children:i.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_198)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_198",children:i.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_183)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_183",children:i.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_195)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_195",children:i.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{clipPath:"url(#clip0_1217_189)",children:i.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"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_1217_189",children:i.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),whatsapp:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:i.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:i.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),i.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:i.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"})})]})}),X2="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",Z2=[{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"}]}],J2=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"whatsapp",href:"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"}],Q2=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],ey=(e,t)=>i.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function lf({description:e=X2,logo:t,sections:n=Z2,socialLinks:r=J2,copyright:o,bottomLinks:s=Q2,newsletter:a,renderLink:l=ey,colorScheme:u="blue",certifications:c,...d}){const h=new Date().getFullYear(),p=o??`© ${h} MedixDeck Health Solutions Ltd. All Rights Reserved.`,[m,g]=S.useState(""),[x,y]=S.useState(!1),[v,j]=S.useState(!1),w=K2[u],{mounted:F,themeMode:B,toggleThemeMode:C}=ur(),P=A=>{A.preventDefault(),a!=null&&a.onSubmit&&m&&(a.onSubmit(m),g(""))};return i.jsx(f.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...d,children:i.jsxs(f.Container,{maxWidth:"7xl",children:[i.jsxs(f.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[i.jsxs(f.Box,{children:[i.jsx(f.Box,{mb:4,children:i.jsx(f.Link,{href:"/",children:t??i.jsx(tn,{variant:u==="blue"?"blue":"purple",height:28})})}),i.jsx(f.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),i.jsx(f.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const A=q2(w.solid);return r.map(E=>i.jsx(f.Link,{href:E.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:E.platform,"aria-label":E.platform,children:A[E.platform]},E.platform))})()})]}),i.jsx(f.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(A=>i.jsxs(f.Box,{children:[i.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:A.title}),i.jsx(f.VStack,{align:"flex-start",gap:3,children:A.links.map(E=>i.jsx(f.Box,{w:"full",children:l(E,i.jsx(f.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:w.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:E.label}))},E.label))})]},A.title))}),!(a!=null&&a.hide)&&i.jsx(f.Box,{children:i.jsxs(f.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[i.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(a==null?void 0:a.title)??"Newsletter"}),i.jsx(f.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."}),i.jsxs(f.Box,{as:"form",onSubmit:P,position:"relative",display:"flex",children:[i.jsx(f.Box,{as:"input",type:"email",value:m,onChange:A=>g(A.target.value),placeholder:(a==null?void 0:a.placeholder)??"email@address.com",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:w.token,boxShadow:`0 0 0 1px ${w.solid}`},transition:"all 0.2s",required:!0}),i.jsx("button",{type:"submit",style:{position:"absolute",right:"4px",top:"4px",bottom:"4px",width:"36px",height:"36px",padding:0,background:x?w.solidHover:w.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:v?`0 0 0 3px ${w.focusRing}`:"none",transition:"background 0.2s ease, box-shadow 0.2s ease"},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onFocus:()=>j(!0),onBlur:()=>j(!1),"aria-label":"Subscribe",children:(a==null?void 0:a.buttonIcon)??i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),i.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:i.jsxs(f.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[i.jsx(f.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:p}),i.jsxs(f.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[s.map(A=>i.jsx(f.Box,{children:l(A,i.jsx(f.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:A.label}))},A.label)),F&&i.jsx(f.Box,{as:"button",onClick:C,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"?i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"5"}),i.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),i.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),i.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),i.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),i.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),i.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),i.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),i.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})}),c&&c.length>0&&i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:i.jsx(f.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:c.map(A=>{const E=i.jsxs(f.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:A.href?"pointer":"default"},children:[A.imageSrc?i.jsx("img",{src:A.imageSrc,alt:A.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):i.jsx(f.Box,{color:"text.muted",flexShrink:0,children:i.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}),i.jsx(f.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:A.name})]},A.name);return A.href?i.jsx(f.Box,{children:l({href:A.href,isExternal:A.isExternal??!0},E)},A.name):i.jsx(f.Box,{children:E},A.name)})})})]})})}lf.displayName="MedixFooter";const ty=i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:i.jsx("path",{d:"m9 18 6-6-6-6"})}),ny=(e,t)=>e.href?i.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):i.jsx(i.Fragment,{children:t});function ry({items:e,separator:t=ty,renderLink:n=ny,...r}){return i.jsx(f.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",...r,children:e.map((o,s)=>{const a=s===e.length-1;return i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(o,i.jsx(f.Box,{as:"span",display:"inline-block",lineHeight:"1.2",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:a?"medium":"normal",color:a?"text.heading":"text.muted",_hover:a?void 0:{color:"blue.500"},cursor:!a&&o.href?"pointer":"default",transition:"color 0.15s",wordBreak:"break-word",whiteSpace:a?"normal":"nowrap",children:o.label})),!a&&i.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},s)})})}const oy={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function iy({tabs:e,defaultActiveId:t,activeId:n,onChange:r,variant:o="line",size:s="md",renderContent:a=!0,...l}){var g;const[u,c]=S.useState(t??((g=e[0])==null?void 0:g.id)),d=n??u,h=x=>{c(x),r==null||r(x)},p=e.find(x=>x.id===d),m=oy[s];return i.jsxs(f.Box,{...l,children:[i.jsx(f.Box,{role:"tablist",display:"flex",gap:o==="pill"?"1":"0",borderBottom:o==="line"?"1px solid":"none",border:o==="pill"?"1px solid":"none",borderColor:"border",bg:o==="pill"?"bg.subtle":"transparent",p:o==="pill"?"1":"0",borderRadius:o==="pill"?"full":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(x=>{const y=x.id===d;return i.jsxs(f.Box,{role:"tab","aria-selected":y,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onClick:()=>!x.disabled&&h(x.id),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&!x.disabled&&h(x.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:o==="pill"?"4":m.px,py:o==="pill"?"3":m.py,fontFamily:"var(--font-body)",fontWeight:y?"semibold":"medium",fontSize:o==="pill"?"sm":m.fontSize,color:x.disabled?"text.muted":o==="pill"?y?"text.heading":"text.body":y?"blue.500":"text.body",cursor:x.disabled?"not-allowed":"pointer",opacity:x.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:o==="pill"?"1":void 0,flexShrink:o==="pill"?1:0,bg:o==="pill"?y?"bg":"bg.surface":"transparent",borderRadius:o==="pill"?"full":"none",boxShadow:"none",borderBottom:o==="line"?"2px solid":"none",borderColor:o==="line"?y?"blue.500":"transparent":void 0,mb:o==="line"?"-1px":"0",_hover:x.disabled?void 0:o==="line"?{color:"blue.500"}:{bg:y?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:o==="pill"?"full":"sm"},children:[i.jsx(f.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:x.label}),x.badge!==void 0&&i.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:o==="pill"?y?"bg.subtle":"bg":y?"blue.100":"bg.subtle",color:o==="pill"?y?"text.heading":"text.muted":y?"blue.700":"text.muted",children:x.badge})]},x.id)})}),a&&(p==null?void 0:p.content)&&i.jsx(f.Box,{role:"tabpanel",mt:"4",children:p.content})]})}function sy(e,t,n){if(n*2+5>=t)return Array.from({length:t},(u,c)=>c+1);const o=Math.max(e-n,1),s=Math.min(e+n,t),a=o>2,l=s<t-2;if(!a&&l){const u=3+2*n;return[...Array.from({length:u},(c,d)=>d+1),"...",t]}if(a&&!l){const u=3+2*n;return[1,"...",...Array.from({length:u},(c,d)=>t-u+1+d)]}return[1,"...",...Array.from({length:s-o+1},(u,c)=>o+c),"...",t]}function cf({total:e,pageSize:t=10,currentPage:n=1,onChange:r,siblingCount:o=1,showEdges:s=!0,compact:a=!1,...l}){const u=Math.ceil(e/t);if(u<=1)return null;const c=sy(n,u,o),d={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"},h=({children:g,disabled:x,onClick:y,label:v,icon:j,isNext:w})=>i.jsxs(f.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:x?.4:1,pointerEvents:x?"none":void 0,onClick:y,"aria-label":v,_hover:{color:"blue.500"},children:[!w&&j&&i.jsx(f.Box,{as:"span",display:"flex",alignItems:"center",children:j}),g,w&&j&&i.jsx(f.Box,{as:"span",display:"flex",alignItems:"center",children:j})]}),p=i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M15 18l-6-6 6-6"})}),m=i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M9 18l6-6-6-6"})});return i.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...l,children:[s&&i.jsx(h,{disabled:n===1,onClick:()=>r==null?void 0:r(1),label:"First page",icon:p,children:"First"}),i.jsx(h,{disabled:n===1,onClick:()=>r==null?void 0:r(n-1),label:"Previous page",icon:p,children:"Prev"}),!a&&c.map((g,x)=>g==="..."?i.jsx(f.Box,{...d,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${x}`):i.jsx(f.Box,{as:"button",...d,bg:n===g?"blue.500":"blue.100",color:n===g?"white":"blue.500",_dark:{bg:n===g?"blue.500":"rgba(6, 133, 255, 0.12)",color:n===g?"white":"blue.200"},onClick:()=>r==null?void 0:r(g),"aria-label":`Page ${g}`,"aria-current":n===g?"page":void 0,_hover:n!==g?{bg:"blue.200",_dark:{bg:"rgba(6, 133, 255, 0.2)"}}:void 0,children:g},g)),a&&i.jsxs(f.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",u]}),i.jsx(h,{disabled:n===u,onClick:()=>r==null?void 0:r(n+1),label:"Next page",icon:m,isNext:!0,children:"Next"}),s&&i.jsx(h,{disabled:n===u,onClick:()=>r==null?void 0:r(u),label:"Last page",icon:m,isNext:!0,children:"Last"})]})}const Hl=i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:i.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function ay({steps:e,currentStep:t,variant:n="default",orientation:r="horizontal",colorScheme:o="blue",...s}){const a=o==="blue"?"#0685FF":"#7700CC",l=o==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return r==="vertical"?i.jsx(f.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...s,children:e.map((c,d)=>{const h=d+1<t,p=d+1===t,m=d===e.length-1,g=h||p?a:"var(--chakra-colors-border, #E2E8F0)";return i.jsxs(f.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[i.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:h||p?a:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:h?Hl:c.icon??d+1}),!m&&i.jsx(f.Box,{w:"2px",flex:"1",minH:"8",bg:h?a:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&i.jsxs(f.Box,{pt:"1",pb:m?"0":"8",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:p?"semibold":"medium",color:h||p?a:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:c.title}),c.description&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:c.description})]})]},c.id)})}):i.jsx(f.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...s,children:e.map((c,d)=>{const h=d+1<t,p=d+1===t,m=d+1>t,g=d===e.length-1,x=m?"bg.subtle":a,y=h?Hl:c.icon?c.icon:i.jsx(f.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:d+1}),v=!m&&n!=="compact",j=m?"text.muted":a;return i.jsxs(S.Fragment,{children:[i.jsx(f.Box,{role:"listitem","aria-current":p?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:v?"2":"0",py:v?"1.5":"0",bg:v?l:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[i.jsx(f.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:x,border:m?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:y}),n!=="compact"&&i.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:p||h?"semibold":"medium",fontFamily:"var(--font-body)",color:j,whiteSpace:"nowrap",transition:"color 0.25s",children:c.title})]})}),!g&&i.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:i.jsx(f.Box,{h:"1.5px",w:"10",bg:h?a:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},c.id)})})}const ly=`
357
357
  @keyframes medix-shimmer {
358
358
  0% { transform: translateX(-100%); }
359
359
  100% { transform: translateX(100%); }
360
360
  }
361
- `;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=W2,document.head.appendChild(t)}}const qt=S.forwardRef(({isLoaded:e=!1,children:t,...n},r)=>e?a.jsx(a.Fragment,{children:t}):a.jsx(f.Box,{ref:r,position:"relative",overflow:"hidden",borderRadius:"md",bg:"#E2E8F0",_dark:{bg:"rgba(255,255,255,0.08)"},_before:{content:'""',position:"absolute",inset:"0",backgroundImage:"linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.65) 50%, transparent 100%)",animation:"medix-shimmer 1.6s ease-in-out infinite",transform:"translateX(-100%)"},...n}));qt.displayName="MedixSkeleton";function Qd({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...r}){return a.jsx(f.Box,{display:"flex",flexDirection:"column",gap:t,...r,children:Array.from({length:e}).map((i,o)=>a.jsx(qt,{h:"3",w:o===e-1?n:"100%",borderRadius:"full"},o))})}function U2({...e}){return a.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[a.jsx(qt,{h:"48",borderRadius:"md",mb:"4"}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[a.jsx(qt,{w:"10",h:"10",borderRadius:"full"}),a.jsxs(f.Box,{flex:"1",children:[a.jsx(qt,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),a.jsx(qt,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),a.jsx(Qd,{lines:2})]})}const $2={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},G2={xs:"2px",sm:"4px",md:"8px",lg:"12px"};if(typeof document<"u"){const e="medix-progress-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=`
361
+ `;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=ly,document.head.appendChild(t)}}const Zt=S.forwardRef(({isLoaded:e=!1,children:t,...n},r)=>e?i.jsx(i.Fragment,{children:t}):i.jsx(f.Box,{ref:r,position:"relative",overflow:"hidden",borderRadius:"md",bg:"#E2E8F0",_dark:{bg:"rgba(255,255,255,0.08)"},_before:{content:'""',position:"absolute",inset:"0",backgroundImage:"linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.65) 50%, transparent 100%)",animation:"medix-shimmer 1.6s ease-in-out infinite",transform:"translateX(-100%)"},...n}));Zt.displayName="MedixSkeleton";function uf({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...r}){return i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:t,...r,children:Array.from({length:e}).map((o,s)=>i.jsx(Zt,{h:"3",w:s===e-1?n:"100%",borderRadius:"full"},s))})}function cy({...e}){return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[i.jsx(Zt,{h:"48",borderRadius:"md",mb:"4"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[i.jsx(Zt,{w:"10",h:"10",borderRadius:"full"}),i.jsxs(f.Box,{flex:"1",children:[i.jsx(Zt,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),i.jsx(Zt,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),i.jsx(uf,{lines:2})]})}const uy={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},dy={xs:"2px",sm:"4px",md:"8px",lg:"12px"};if(typeof document<"u"){const e="medix-progress-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=`
362
362
  @keyframes medix-indeterminate {
363
363
  0% { left: -40%; }
364
364
  100% { left: 100%; }
365
365
  }
366
- `,document.head.appendChild(t)}}const ef=S.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:r=!1,animated:i=!0,isIndeterminate:o=!1,...s},l)=>{const u=Math.min(100,Math.max(0,e)),d=$2[t],c=G2[n];return a.jsxs(f.Box,{ref:l,w:"100%",...s,children:[r&&a.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[a.jsx("span",{children:"Progress"}),a.jsxs("span",{children:[u,"%"]})]}),a.jsx(f.Box,{w:"100%",h:c,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:o?a.jsx(f.Box,{position:"absolute",h:"100%",w:"40%",bg:d,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):a.jsx(f.Box,{h:"100%",w:`${u}%`,bg:d,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});ef.displayName="MedixProgress";const Y2={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};let Dl=!1;function K2(){if(typeof document>"u"||Dl)return;const e=document.createElement("style");e.textContent=`
366
+ `,document.head.appendChild(t)}}const df=S.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:r=!1,animated:o=!0,isIndeterminate:s=!1,...a},l)=>{const u=Math.min(100,Math.max(0,e)),c=uy[t],d=dy[n];return i.jsxs(f.Box,{ref:l,w:"100%",...a,children:[r&&i.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[i.jsx("span",{children:"Progress"}),i.jsxs("span",{children:[u,"%"]})]}),i.jsx(f.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:s?i.jsx(f.Box,{position:"absolute",h:"100%",w:"40%",bg:c,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):i.jsx(f.Box,{h:"100%",w:`${u}%`,bg:c,borderRadius:"full",transition:o?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});df.displayName="MedixProgress";const fy={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};let Ul=!1;function hy(){if(typeof document>"u"||Ul)return;const e=document.createElement("style");e.textContent=`
367
367
  @keyframes medixBottomSheetIn {
368
368
  from { transform: translateY(100%); }
369
369
  to { transform: translateY(0); }
@@ -372,11 +372,11 @@
372
372
  from { transform: translateY(0); }
373
373
  to { transform: translateY(100%); }
374
374
  }
375
- `,document.head.appendChild(e),Dl=!0}function q2({isOpen:e,onClose:t,title:n,description:r,size:i="md",closeOnOverlayClick:o=!0,closeOnEscape:s=!0,footer:l,children:u,mobileVariant:d="bottom-sheet"}){const c=!!(n||r);S.useEffect(()=>{K2()},[]);const h=d==="bottom-sheet";return a.jsxs(f.DialogRoot,{open:e,onOpenChange:p=>{p.open||t()},closeOnInteractOutside:o,closeOnEscape:s,size:Y2[i],children:[a.jsx(f.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),a.jsx(f.DialogPositioner,{display:"flex",alignItems:h?{base:"flex-end",md:"center"}:"center",justifyContent:"center",children:a.jsxs(f.DialogContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",borderRadius:{base:h?"none":"modal",md:"modal"},w:{base:h?"full":void 0,md:void 0},borderTopRadius:h?{base:"modal",md:"modal"}:"modal",style:h?{"--bottom-sheet-animation":e?"medixBottomSheetIn 0.35s cubic-bezier(0.32,0.72,0,1) both":void 0}:void 0,children:[a.jsxs(f.DialogHeader,{borderBottom:c?"1px solid":"none",borderColor:"border",px:"6",py:"4",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",position:"relative",minH:c?void 0:"12",children:[h&&a.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"}),c&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&a.jsx(f.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),r&&a.jsx(f.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:r})]}),a.jsx(f.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:a.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:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),a.jsx(f.DialogBody,{px:"6",py:"5",children:u}),l&&a.jsx(f.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",style:h?{paddingBottom:"env(safe-area-inset-bottom, 16px)"}:void 0,children:l})]})})]})}function Eo({label:e,children:t,placement:n="top",...r}){const[i,o]=S.useState(!1),s=S.useRef(null),l=S.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(pointer: coarse)").matches,[]);S.useEffect(()=>{if(!l||!i)return;const d=c=>{s.current&&!s.current.contains(c.target)&&o(!1)};return document.addEventListener("mousedown",d),document.addEventListener("touchstart",d,{passive:!0}),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("touchstart",d)}},[l,i]);const u=d=>{l&&(d.preventDefault(),d.stopPropagation(),o(c=>!c))};return a.jsxs(f.Tooltip.Root,{positioning:{placement:n},open:l?i:void 0,onOpenChange:l?d=>o(d.open):void 0,...r,children:[a.jsx(f.Tooltip.Trigger,{asChild:!0,children:a.jsx("span",{ref:s,style:{display:"inline-flex"},onClick:u,children:t})}),a.jsx(f.Tooltip.Positioner,{children:a.jsx(f.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})})]})}function X2({icon:e,title:t,description:n,actionLabel:r,onAction:i,secondaryLabel:o,onSecondaryAction:s,...l}){return a.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&a.jsx(f.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}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&a.jsx(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(r||o)&&a.jsxs(f.Box,{display:"flex",gap:"3",mt:"2",children:[r&&a.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&a.jsx(Ye,{variant:"ghost",colorScheme:"blue",onClick:s,children:o})]})]})}function Z2({title:e="Page Not Found",description:t="The page you are looking for doesn't exist or has been moved.",errorMessage:n,actionLabel:r="Go back home",onAction:i,secondaryLabel:o,onSecondaryAction:s,...l}){return a.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[a.jsx(f.Box,{fontSize:"8xl",fontWeight:"bold",color:"blue.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),a.jsx(f.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),a.jsx(f.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&a.jsx(f.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}),a.jsxs(f.Box,{display:"flex",gap:"4",children:[r&&a.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&a.jsx(Ye,{variant:"outline",colorScheme:"blue",onClick:s,children:o})]})]})}function J2({title:e="Something went wrong",description:t="An unexpected error occurred on our end. Please try again later.",errorMessage:n,actionLabel:r="Try again",onAction:i,secondaryLabel:o,onSecondaryAction:s,...l}){return a.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[a.jsx(f.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:a.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),a.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),a.jsx(f.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),a.jsx(f.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&a.jsx(f.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}),a.jsxs(f.Box,{display:"flex",gap:"4",children:[r&&a.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&a.jsx(Ye,{variant:"outline",colorScheme:"blue",onClick:s,children:o})]})]})}const Q2={left:"start",right:"end",top:"top",bottom:"bottom"};function ey({isOpen:e,onClose:t,title:n,placement:r="right",size:i="md",closeOnOverlayClick:o=!0,closeOnEscape:s=!0,footer:l,children:u}){const d=Q2[r]??"end";return a.jsxs(f.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:d,size:i,closeOnInteractOutside:o,closeOnEscape:s,children:[a.jsx(f.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),a.jsx(f.DrawerPositioner,{children:a.jsxs(f.DrawerContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",children:[a.jsxs(f.DrawerHeader,{borderBottom:n?"1px solid":"none",borderColor:"border",px:"6",py:"4",position:"relative",minH:n?void 0:"12",children:[n&&a.jsx(f.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",pr:"8",children:n}),a.jsx(f.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:a.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:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),a.jsx(f.DrawerBody,{px:"6",py:"5",children:u}),l&&a.jsx(f.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:l})]})})]})}/*! js-cookie v3.0.5 | MIT */function Br(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var ty={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 Ao(e,t){function n(i,o,s){if(!(typeof document>"u")){s=Br({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var u in s)s[u]&&(l+="; "+u,s[u]!==!0&&(l+="="+s[u].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+l}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},l=0;l<o.length;l++){var u=o[l].split("="),d=u.slice(1).join("=");try{var c=decodeURIComponent(u[0]);if(s[c]=e.read(d,c),i===c)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Br({},o,{expires:-1}))},withAttributes:function(i){return Ao(this.converter,Br({},this.attributes,i))},withConverter:function(i){return Ao(Br({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Zr=Ao(ty,{path:"/"});const ny=({condition:e,wrapper:t,children:n})=>e?t(n):n,Lo={TOP:"top",BOTTOM:"bottom"};var Fs=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(Fs||{});const Io={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},tf="CookieConsent",ry=({children:e,...t})=>S.createElement("button",{...t},e),Gn={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:Lo.BOTTOM,visible:Io.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:tf,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:Fs.LAX,ButtonComponent:ry,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:{}},iy={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)"}},oy=(e=tf)=>{const t=Zr.get(e);return t===void 0?Zr.get(nf(e)):t},nf=e=>`${e}-legacy`,rf=class extends S.Component{constructor(){super(...arguments),this.state=iy,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...Gn,...this.props},n=document.documentElement,r=document.body,i="scrollTop",o="scrollHeight";(n[i]||r[i])/((n[o]||r[o])-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:r,hideOnAccept:i,onAccept:o}={...Gn,...this.props};this.setCookie(n,r),o(t??!1),i&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...Gn,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:r,onDecline:i,setDeclineCookie:o}={...Gn,...this.props};o&&this.setCookie(t,n),i(),r&&this.setState({visible:!1})}setCookie(t,n){const{extraCookieOptions:r,expires:i,sameSite:o}=this.props;let{cookieSecurity:s}=this.props;s===void 0&&(s=globalThis.location?globalThis.location.protocol==="https:":!0);const l={expires:i,...r,sameSite:o,secure:s};o===Fs.NONE&&Zr.set(nf(t),n,l),Zr.set(t,n,l)}getCookieValue(){const{cookieName:t}=this.props;return oy(t)}render(){switch(this.props.visible){case Io.HIDDEN:return null;case Io.BY_COOKIE_VALUE:if(!this.state.visible)return null;break}const{location:t,style:n,buttonStyle:r,declineButtonStyle:i,contentStyle:o,disableStyles:s,buttonText:l,declineButtonText:u,containerClasses:d,contentClasses:c,buttonClasses:h,buttonWrapperClasses:p,declineButtonClasses:m,buttonId:g,declineButtonId:x,disableButtonStyles:y,enableDeclineButton:b,flipButtons:T,ButtonComponent:w,overlay:A,overlayClasses:E,overlayStyle:C,ariaAcceptLabel:O,ariaDeclineLabel:B,customContainerAttributes:F,customContentAttributes:L,customButtonProps:R,customDeclineButtonProps:D,customButtonWrapperAttributes:N}=this.props;let P={},I={},M={},U={},H={};switch(s?(P=Object.assign({},n),I=Object.assign({},r),M=Object.assign({},i),U=Object.assign({},o),H=Object.assign({},C)):(P=Object.assign({},{...this.state.style,...n}),U=Object.assign({},{...this.state.contentStyle,...o}),H=Object.assign({},{...this.state.overlayStyle,...C}),y?(I=Object.assign({},r),M=Object.assign({},i)):(I=Object.assign({},{...this.state.buttonStyle,...r}),M=Object.assign({},{...this.state.declineButtonStyle,...i}))),t){case Lo.TOP:P.top="0";break;case Lo.BOTTOM:P.bottom="0";break}const $=[];return b&&$.push(S.createElement(w,{key:"declineButton",style:M,className:m,id:x,"aria-label":B,onClick:()=>{this.decline()},...D},u)),$.push(S.createElement(w,{key:"acceptButton",style:I,className:h,id:g,"aria-label":O,onClick:()=>{this.accept()},...R},l)),T&&$.reverse(),S.createElement(ny,{condition:A,wrapper:v=>S.createElement("div",{style:H,className:E,onClick:()=>{this.overlayClick()},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},v)},S.createElement("div",{className:`${d}`,style:P,...F},S.createElement("div",{style:U,className:c,...L},this.props.children),S.createElement("div",{className:`${p}`,...N},$.map(v=>v))))}};rf.defaultProps=Gn;let sy=rf;function of({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:r=!0,children:i,...o}){const s=Yo(),l=s?"#152035":"#F6F6F6",u=s?"#ABC0D6":"#3D4F63",d=s?"#1E3050":"#E4E8F0";return a.jsxs(a.Fragment,{children:[a.jsx("style",{children:`
375
+ `,document.head.appendChild(e),Ul=!0}function py({isOpen:e,onClose:t,title:n,description:r,size:o="md",closeOnOverlayClick:s=!0,closeOnEscape:a=!0,footer:l,children:u,mobileVariant:c="bottom-sheet"}){const d=!!(n||r);S.useEffect(()=>{hy()},[]);const h=c==="bottom-sheet";return i.jsxs(f.DialogRoot,{open:e,onOpenChange:p=>{p.open||t()},closeOnInteractOutside:s,closeOnEscape:a,size:fy[o],children:[i.jsx(f.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),i.jsx(f.DialogPositioner,{display:"flex",alignItems:h?{base:"flex-end",md:"center"}:"center",justifyContent:"center",children:i.jsxs(f.DialogContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",borderRadius:{base:h?"none":"modal",md:"modal"},w:{base:h?"full":void 0,md:void 0},borderTopRadius:h?{base:"modal",md:"modal"}:"modal",style:h?{"--bottom-sheet-animation":e?"medixBottomSheetIn 0.35s cubic-bezier(0.32,0.72,0,1) both":void 0}:void 0,children:[i.jsxs(f.DialogHeader,{borderBottom:d?"1px solid":"none",borderColor:"border",px:"6",py:"4",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",position:"relative",minH:d?void 0:"12",children:[h&&i.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"}),d&&i.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&i.jsx(f.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),r&&i.jsx(f.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:r})]}),i.jsx(f.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:i.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:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),i.jsx(f.DialogBody,{px:"6",py:"5",children:u}),l&&i.jsx(f.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",style:h?{paddingBottom:"env(safe-area-inset-bottom, 16px)"}:void 0,children:l})]})})]})}function my({icon:e,title:t,description:n,actionLabel:r,onAction:o,secondaryLabel:s,onSecondaryAction:a,...l}){return i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&i.jsx(f.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}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&i.jsx(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(r||s)&&i.jsxs(f.Box,{display:"flex",gap:"3",mt:"2",children:[r&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:o,children:r}),s&&i.jsx(Ye,{variant:"ghost",colorScheme:"blue",onClick:a,children:s})]})]})}function gy({title:e="Page Not Found",description:t="The page you are looking for doesn't exist or has been moved.",errorMessage:n,actionLabel:r="Go back home",onAction:o,secondaryLabel:s,onSecondaryAction:a,...l}){return i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[i.jsx(f.Box,{fontSize:"8xl",fontWeight:"bold",color:"blue.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),i.jsx(f.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),i.jsx(f.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&i.jsx(f.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}),i.jsxs(f.Box,{display:"flex",gap:"4",children:[r&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:o,children:r}),s&&i.jsx(Ye,{variant:"outline",colorScheme:"blue",onClick:a,children:s})]})]})}function xy({title:e="Something went wrong",description:t="An unexpected error occurred on our end. Please try again later.",errorMessage:n,actionLabel:r="Try again",onAction:o,secondaryLabel:s,onSecondaryAction:a,...l}){return i.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[i.jsx(f.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:i.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"10"}),i.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),i.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),i.jsx(f.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),i.jsx(f.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&i.jsx(f.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}),i.jsxs(f.Box,{display:"flex",gap:"4",children:[r&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",onClick:o,children:r}),s&&i.jsx(Ye,{variant:"outline",colorScheme:"blue",onClick:a,children:s})]})]})}const yy={left:"start",right:"end",top:"top",bottom:"bottom"};function by({isOpen:e,onClose:t,title:n,placement:r="right",size:o="md",closeOnOverlayClick:s=!0,closeOnEscape:a=!0,footer:l,children:u}){const c=yy[r]??"end";return i.jsxs(f.DrawerRoot,{open:e,onOpenChange:d=>{d.open||t()},placement:c,size:o,closeOnInteractOutside:s,closeOnEscape:a,children:[i.jsx(f.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),i.jsx(f.DrawerPositioner,{children:i.jsxs(f.DrawerContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",children:[i.jsxs(f.DrawerHeader,{borderBottom:n?"1px solid":"none",borderColor:"border",px:"6",py:"4",position:"relative",minH:n?void 0:"12",children:[n&&i.jsx(f.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",pr:"8",children:n}),i.jsx(f.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:i.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:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),i.jsx(f.DrawerBody,{px:"6",py:"5",children:u}),l&&i.jsx(f.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:l})]})})]})}/*! js-cookie v3.0.5 | MIT */function Lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var vy={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 Oi(e,t){function n(o,s,a){if(!(typeof document>"u")){a=Lr({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var u in a)a[u]&&(l+="; "+u,a[u]!==!0&&(l+="="+a[u].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+l}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],a={},l=0;l<s.length;l++){var u=s[l].split("="),c=u.slice(1).join("=");try{var d=decodeURIComponent(u[0]);if(a[d]=e.read(c,d),o===d)break}catch{}}return o?a[o]:a}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",Lr({},s,{expires:-1}))},withAttributes:function(o){return Oi(this.converter,Lr({},this.attributes,o))},withConverter:function(o){return Oi(Lr({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ro=Oi(vy,{path:"/"});const ky=({condition:e,wrapper:t,children:n})=>e?t(n):n,zi={TOP:"top",BOTTOM:"bottom"};var Os=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(Os||{});const _i={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},ff="CookieConsent",wy=({children:e,...t})=>S.createElement("button",{...t},e),Xn={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:zi.BOTTOM,visible:_i.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:ff,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:Os.LAX,ButtonComponent:wy,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:{}},Sy={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)"}},Cy=(e=ff)=>{const t=ro.get(e);return t===void 0?ro.get(hf(e)):t},hf=e=>`${e}-legacy`,pf=class extends S.Component{constructor(){super(...arguments),this.state=Sy,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...Xn,...this.props},n=document.documentElement,r=document.body,o="scrollTop",s="scrollHeight";(n[o]||r[o])/((n[s]||r[s])-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:r,hideOnAccept:o,onAccept:s}={...Xn,...this.props};this.setCookie(n,r),s(t??!1),o&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...Xn,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:r,onDecline:o,setDeclineCookie:s}={...Xn,...this.props};s&&this.setCookie(t,n),o(),r&&this.setState({visible:!1})}setCookie(t,n){const{extraCookieOptions:r,expires:o,sameSite:s}=this.props;let{cookieSecurity:a}=this.props;a===void 0&&(a=globalThis.location?globalThis.location.protocol==="https:":!0);const l={expires:o,...r,sameSite:s,secure:a};s===Os.NONE&&ro.set(hf(t),n,l),ro.set(t,n,l)}getCookieValue(){const{cookieName:t}=this.props;return Cy(t)}render(){switch(this.props.visible){case _i.HIDDEN:return null;case _i.BY_COOKIE_VALUE:if(!this.state.visible)return null;break}const{location:t,style:n,buttonStyle:r,declineButtonStyle:o,contentStyle:s,disableStyles:a,buttonText:l,declineButtonText:u,containerClasses:c,contentClasses:d,buttonClasses:h,buttonWrapperClasses:p,declineButtonClasses:m,buttonId:g,declineButtonId:x,disableButtonStyles:y,enableDeclineButton:v,flipButtons:j,ButtonComponent:w,overlay:F,overlayClasses:B,overlayStyle:C,ariaAcceptLabel:P,ariaDeclineLabel:A,customContainerAttributes:E,customContentAttributes:L,customButtonProps:R,customDeclineButtonProps:D,customButtonWrapperAttributes:N}=this.props;let O={},I={},M={},H={},W={};switch(a?(O=Object.assign({},n),I=Object.assign({},r),M=Object.assign({},o),H=Object.assign({},s),W=Object.assign({},C)):(O=Object.assign({},{...this.state.style,...n}),H=Object.assign({},{...this.state.contentStyle,...s}),W=Object.assign({},{...this.state.overlayStyle,...C}),y?(I=Object.assign({},r),M=Object.assign({},o)):(I=Object.assign({},{...this.state.buttonStyle,...r}),M=Object.assign({},{...this.state.declineButtonStyle,...o}))),t){case zi.TOP:O.top="0";break;case zi.BOTTOM:O.bottom="0";break}const $=[];return v&&$.push(S.createElement(w,{key:"declineButton",style:M,className:m,id:x,"aria-label":A,onClick:()=>{this.decline()},...D},u)),$.push(S.createElement(w,{key:"acceptButton",style:I,className:h,id:g,"aria-label":P,onClick:()=>{this.accept()},...R},l)),j&&$.reverse(),S.createElement(ky,{condition:F,wrapper:b=>S.createElement("div",{style:W,className:B,onClick:()=>{this.overlayClick()},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},b)},S.createElement("div",{className:`${c}`,style:O,...E},S.createElement("div",{style:H,className:d,...L},this.props.children),S.createElement("div",{className:`${p}`,...N},$.map(b=>b))))}};pf.defaultProps=Xn;let jy=pf;function mf({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:r=!0,children:o,...s}){const a=es(),l=a?"#152035":"#F6F6F6",u=a?"#ABC0D6":"#3D4F63",c=a?"#1E3050":"#E4E8F0";return i.jsxs(i.Fragment,{children:[i.jsx("style",{children:`
376
376
  .medixdeck-cookie-banner {
377
377
  background-color: ${l} !important;
378
378
  color: ${u} !important;
379
- border-top: 1px solid ${d} !important;
379
+ border-top: 1px solid ${c} !important;
380
380
  padding: 1rem 1.5rem !important;
381
381
  display: flex !important;
382
382
  flex-direction: row !important;
@@ -409,20 +409,20 @@
409
409
  align-items: center !important;
410
410
  flex-wrap: wrap !important;
411
411
  }
412
- `}),a.jsx(sy,{location:"bottom",buttonText:t,declineButtonText:n,enableDeclineButton:r,disableStyles:!0,containerClasses:"medixdeck-cookie-banner",contentClasses:"medixdeck-cookie-content",buttonWrapperClasses:"medixdeck-cookie-buttons",ButtonComponent:c=>a.jsx(Ye,{variant:"solid",colorScheme:"blue",size:"sm",onClick:c.onClick,id:c.id,children:c.children}),...o,children:a.jsxs(f.Box,{children:[e&&a.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:1,fontFamily:"var(--font-heading)",children:e}),a.jsx(f.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.`})]})})]})}of.displayName="MedixCookieConsentBanner";const sf="medixdeck_pwa_dismissed",ay=14,ly=[.4,0,.2,1];function cy(){if(typeof window>"u")return!1;const e=window.matchMedia("(display-mode: standalone)").matches,t=window.navigator.standalone===!0;return e||t}function uy(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream}function dy(e){if(typeof localStorage>"u")return!1;try{const t=localStorage.getItem(sf);if(!t)return!1;const n=e*24*60*60*1e3;return Date.now()-Number(t)<n}catch{return!1}}function fy(){try{localStorage.setItem(sf,String(Date.now()))}catch{}}function hy({size:e=18,color:t="#0685FF"}){return a.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),a.jsx("polyline",{points:"16 6 12 2 8 6"}),a.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function py(){return a.jsx(f.Box,{flexShrink:0,children:a.jsx(sr,{type:"icon",height:44})})}function af({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:r="Not now",cooldownDays:i=ay,onInstall:o,onDismiss:s,appName:l="this app",icon:u,position:d="bottom",delaySeconds:c=0,forceVisible:h,forceIOS:p}){const m=Yo(),[g,x]=S.useState(!1),[y,b]=S.useState(!1),T=S.useRef(null),w=S.useRef(null);S.useEffect(()=>{const B=()=>{c>0?w.current=setTimeout(()=>x(!0),c*1e3):x(!0)},F=()=>{w.current&&clearTimeout(w.current)};if(h)return p&&b(!0),B(),F;if(cy()||dy(i))return F;if(uy())return b(!0),B(),F;const L=D=>{D.preventDefault(),T.current=D,B()};window.addEventListener("beforeinstallprompt",L);const R=()=>x(!1);return window.addEventListener("appinstalled",R),()=>{window.removeEventListener("beforeinstallprompt",L),window.removeEventListener("appinstalled",R),F()}},[i,c,h,p]);const A=S.useCallback(async()=>{if(T.current){try{await T.current.prompt(),(await T.current.userChoice).outcome==="accepted"&&(o==null||o())}catch{}T.current=null}x(!1)},[o]),E=S.useCallback(()=>{fy(),x(!1),s==null||s()},[s]),C=m?"#152035":"#FFFFFF",O=m?"#1E3050":"#E4E8F0";return a.jsx(To,{children:g&&a.jsx(Tt.div,{initial:{opacity:0,y:d==="bottom"?80:-80,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:d==="bottom"?80:-80,x:"-50%"},transition:{duration:.35,ease:ly},style:{position:"fixed",[d]:16,left:"50%",zIndex:1e4,width:"calc(100% - 32px)",maxWidth:480,pointerEvents:"auto"},children:a.jsx(f.Box,{borderRadius:"16px",p:{base:"4",md:"5"},style:{background:C,border:`1px solid ${O}`,boxShadow:"none"},children:a.jsxs(f.Flex,{gap:"4",align:"flex-start",children:[u??a.jsx(py,{}),a.jsxs(f.Box,{flex:"1",minW:"0",children:[a.jsx(f.Text,{fontWeight:"700",fontSize:"md",color:"text.heading",fontFamily:"var(--font-heading)",mb:"1",children:e}),y?a.jsxs(f.Box,{children:[a.jsxs(f.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:["To install ",l,", tap the"," ",a.jsx("span",{style:{display:"inline-flex",verticalAlign:"middle",margin:"0 2px"},children:a.jsx(hy,{size:16,color:m?"#70B6FF":"#0685FF"})})," ","Share button in Safari, then select"," ",a.jsx("span",{style:{fontWeight:700,color:m?"#F0F6FF":"#111926"},children:'"Add to Home Screen"'}),"."]}),a.jsx(f.Flex,{gap:"3",mb:"3",flexWrap:"wrap",children:[{step:"1",text:"Tap Share"},{step:"2",text:"Add to Home Screen"}].map(B=>a.jsxs(f.Flex,{align:"center",gap:"2",px:"3",py:"1.5",borderRadius:"8px",bg:"bg.subtle",children:[a.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"20px",h:"20px",borderRadius:"full",flexShrink:0,style:{background:"#0685FF",color:"#FFFFFF",fontSize:"11px",fontWeight:700,fontFamily:"var(--font-body)"},children:B.step}),a.jsx(f.Text,{fontSize:"xs",fontWeight:"600",color:"text.body",fontFamily:"var(--font-body)",children:B.text})]},B.step))})]}):a.jsx(f.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:t}),a.jsxs(f.Flex,{gap:"3",align:"center",children:[!y&&a.jsx(Ye,{variant:"solid",colorScheme:"blue",size:"sm",onClick:A,children:n}),a.jsx(Ye,{variant:"ghost",colorScheme:"gray",size:"sm",onClick:E,children:y?"Got it":r})]})]}),a.jsx(f.Box,{as:"button","aria-label":"Close install prompt",onClick:E,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:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})})})}af.displayName="MedixPWAInstallPrompt";/*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */function Rl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function my(e){if(Array.isArray(e))return e}function gy(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,l=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(c){d=!0,i=c}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return l}}function xy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
413
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yy(e,t){return my(e)||gy(e,t)||by(e,t)||xy()}function by(e,t){if(e){if(typeof e=="string")return Rl(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rl(e,t):void 0}}const lf=Object.entries,Ml=Object.setPrototypeOf,vy=Object.isFrozen,ky=Object.getPrototypeOf,wy=Object.getOwnPropertyDescriptor;let Ue=Object.freeze,st=Object.seal,gn=Object.create,cf=typeof Reflect<"u"&&Reflect,Do=cf.apply,Ro=cf.construct;Ue||(Ue=function(t){return t});st||(st=function(t){return t});Do||(Do=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(n,i)});Ro||(Ro=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new t(...r)});const Ut=je(Array.prototype.forEach),Sy=je(Array.prototype.lastIndexOf),Pl=je(Array.prototype.pop),cn=je(Array.prototype.push),Cy=je(Array.prototype.splice),Ve=Array.isArray,Yn=je(String.prototype.toLowerCase),Oi=je(String.prototype.toString),Ol=je(String.prototype.match),un=je(String.prototype.replace),zl=je(String.prototype.indexOf),jy=je(String.prototype.trim),Ty=je(Number.prototype.toString),By=je(Boolean.prototype.toString),_l=typeof BigInt>"u"?null:je(BigInt.prototype.toString),Nl=typeof Symbol>"u"?null:je(Symbol.prototype.toString),ke=je(Object.prototype.hasOwnProperty),zn=je(Object.prototype.toString),Me=je(RegExp.prototype.test),dn=Fy(TypeError);function je(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Do(e,t,r)}}function Fy(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ro(e,n)}}function se(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yn;if(Ml&&Ml(e,null),!Ve(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const o=n(i);o!==i&&(vy(t)||(t[r]=o),i=o)}e[i]=!0}return e}function Ey(e){for(let t=0;t<e.length;t++)ke(e,t)||(e[t]=null);return e}function _e(e){const t=gn(null);for(const r of lf(e)){var n=yy(r,2);const i=n[0],o=n[1];ke(e,i)&&(Ve(o)?t[i]=Ey(o):o&&typeof o=="object"&&o.constructor===Object?t[i]=_e(o):t[i]=o)}return t}function Ay(e){switch(typeof e){case"string":return e;case"number":return Ty(e);case"boolean":return By(e);case"bigint":return _l?_l(e):"0";case"symbol":return Nl?Nl(e):"Symbol()";case"undefined":return zn(e);case"function":case"object":{if(e===null)return zn(e);const t=e,n=gt(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:zn(r)}return zn(e)}default:return zn(e)}}function gt(e,t){for(;e!==null;){const r=wy(e,t);if(r){if(r.get)return je(r.get);if(typeof r.value=="function")return je(r.value)}e=ky(e)}function n(){return null}return n}function Ly(e){try{return Me(e,""),!0}catch{return!1}}const Vl=Ue(["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"]),zi=Ue(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_i=Ue(["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"]),Iy=Ue(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ni=Ue(["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"]),Dy=Ue(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Hl=Ue(["#text"]),Wl=Ue(["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"]),Vi=Ue(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","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","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","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","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ul=Ue(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Fr=Ue(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ry=st(/{{[\w\W]*|^[\w\W]*}}/g),My=st(/<%[\w\W]*|^[\w\W]*%>/g),Py=st(/\${[\w\W]*/g),Oy=st(/^data-[\-\w.\u00B7-\uFFFF]+$/),zy=st(/^aria-[\-\w]+$/),$l=st(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_y=st(/^(?:\w+script|data):/i),Ny=st(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vy=st(/^html$/i),Hy=st(/^[a-z][.\w]*(-[.\w]+)+$/i),mt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Wy=function(){return typeof window>"u"?null:window},Uy=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Gl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function uf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wy();const t=X=>uf(X);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==mt.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,i=r.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,s=e.Node,l=e.Element,u=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,h=e.trustedTypes,p=l.prototype,m=gt(p,"cloneNode"),g=gt(p,"remove"),x=gt(p,"nextSibling"),y=gt(p,"childNodes"),b=gt(p,"parentNode"),T=gt(p,"shadowRoot"),w=gt(p,"attributes"),A=s&&s.prototype?gt(s.prototype,"nodeType"):null,E=s&&s.prototype?gt(s.prototype,"nodeName"):null;if(typeof o=="function"){const X=n.createElement("template");X.content&&X.content.ownerDocument&&(n=X.content.ownerDocument)}let C,O="",B=0;const F=function(k){if(B>0)throw dn('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');B++;try{return C.createHTML(k)}finally{B--}},L=n,R=L.implementation,D=L.createNodeIterator,N=L.createDocumentFragment,P=L.getElementsByTagName,I=r.importNode;let M=Gl();t.isSupported=typeof lf=="function"&&typeof b=="function"&&R&&R.createHTMLDocument!==void 0;const U=Ry,H=My,$=Py,v=Oy,Y=zy,ie=_y,j=Ny,oe=Hy;let ce=$l,J=null;const Z=se({},[...Vl,...zi,..._i,...Ni,...Hl]);let Q=null;const de=se({},[...Wl,...Vi,...Ul,...Fr]);let re=Object.seal(gn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ze=null,Ae=null;const Je=Object.seal(gn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let hr=!0,tn=!0,Ln=!1,In=!0,ft=!1,Ft=!0,ht=!1,Dn=!1,Rn=!1,Et=!1,nn=!1,rn=!1,z=!0,G=!1;const te="user-content-";let ae=!0,ue=!1,Le={},Ie=null;const Qe=se({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let At=null;const Lt=se({},["audio","video","img","source","image","track"]);let Re=null;const Ct=se({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",pr="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xhtml";let on=pt,di=!1,fi=null;const Jf=se({},[$e,pr,pt],Oi);let hi=se({},["mi","mo","mn","ms","mtext"]),pi=se({},["annotation-xml"]);const Qf=se({},["title","style","font","a","script"]);let Mn=null;const eh=["application/xhtml+xml","text/html"],th="text/html";let we=null,sn=null;const nh=n.createElement("form"),Ws=function(k){return k instanceof RegExp||k instanceof Function},mi=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(sn&&sn===k)return;(!k||typeof k!="object")&&(k={}),k=_e(k),Mn=eh.indexOf(k.PARSER_MEDIA_TYPE)===-1?th:k.PARSER_MEDIA_TYPE,we=Mn==="application/xhtml+xml"?Oi:Yn,J=ke(k,"ALLOWED_TAGS")&&Ve(k.ALLOWED_TAGS)?se({},k.ALLOWED_TAGS,we):Z,Q=ke(k,"ALLOWED_ATTR")&&Ve(k.ALLOWED_ATTR)?se({},k.ALLOWED_ATTR,we):de,fi=ke(k,"ALLOWED_NAMESPACES")&&Ve(k.ALLOWED_NAMESPACES)?se({},k.ALLOWED_NAMESPACES,Oi):Jf,Re=ke(k,"ADD_URI_SAFE_ATTR")&&Ve(k.ADD_URI_SAFE_ATTR)?se(_e(Ct),k.ADD_URI_SAFE_ATTR,we):Ct,At=ke(k,"ADD_DATA_URI_TAGS")&&Ve(k.ADD_DATA_URI_TAGS)?se(_e(Lt),k.ADD_DATA_URI_TAGS,we):Lt,Ie=ke(k,"FORBID_CONTENTS")&&Ve(k.FORBID_CONTENTS)?se({},k.FORBID_CONTENTS,we):Qe,ze=ke(k,"FORBID_TAGS")&&Ve(k.FORBID_TAGS)?se({},k.FORBID_TAGS,we):_e({}),Ae=ke(k,"FORBID_ATTR")&&Ve(k.FORBID_ATTR)?se({},k.FORBID_ATTR,we):_e({}),Le=ke(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?_e(k.USE_PROFILES):k.USE_PROFILES:!1,hr=k.ALLOW_ARIA_ATTR!==!1,tn=k.ALLOW_DATA_ATTR!==!1,Ln=k.ALLOW_UNKNOWN_PROTOCOLS||!1,In=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ft=k.SAFE_FOR_TEMPLATES||!1,Ft=k.SAFE_FOR_XML!==!1,ht=k.WHOLE_DOCUMENT||!1,Et=k.RETURN_DOM||!1,nn=k.RETURN_DOM_FRAGMENT||!1,rn=k.RETURN_TRUSTED_TYPE||!1,Rn=k.FORCE_BODY||!1,z=k.SANITIZE_DOM!==!1,G=k.SANITIZE_NAMED_PROPS||!1,ae=k.KEEP_CONTENT!==!1,ue=k.IN_PLACE||!1,ce=Ly(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:$l,on=typeof k.NAMESPACE=="string"?k.NAMESPACE:pt,hi=ke(k,"MATHML_TEXT_INTEGRATION_POINTS")&&k.MATHML_TEXT_INTEGRATION_POINTS&&typeof k.MATHML_TEXT_INTEGRATION_POINTS=="object"?_e(k.MATHML_TEXT_INTEGRATION_POINTS):se({},["mi","mo","mn","ms","mtext"]),pi=ke(k,"HTML_INTEGRATION_POINTS")&&k.HTML_INTEGRATION_POINTS&&typeof k.HTML_INTEGRATION_POINTS=="object"?_e(k.HTML_INTEGRATION_POINTS):se({},["annotation-xml"]);const _=ke(k,"CUSTOM_ELEMENT_HANDLING")&&k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING=="object"?_e(k.CUSTOM_ELEMENT_HANDLING):gn(null);if(re=gn(null),ke(_,"tagNameCheck")&&Ws(_.tagNameCheck)&&(re.tagNameCheck=_.tagNameCheck),ke(_,"attributeNameCheck")&&Ws(_.attributeNameCheck)&&(re.attributeNameCheck=_.attributeNameCheck),ke(_,"allowCustomizedBuiltInElements")&&typeof _.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=_.allowCustomizedBuiltInElements),ft&&(tn=!1),nn&&(Et=!0),Le&&(J=se({},Hl),Q=gn(null),Le.html===!0&&(se(J,Vl),se(Q,Wl)),Le.svg===!0&&(se(J,zi),se(Q,Vi),se(Q,Fr)),Le.svgFilters===!0&&(se(J,_i),se(Q,Vi),se(Q,Fr)),Le.mathMl===!0&&(se(J,Ni),se(Q,Ul),se(Q,Fr))),Je.tagCheck=null,Je.attributeCheck=null,ke(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?Je.tagCheck=k.ADD_TAGS:Ve(k.ADD_TAGS)&&(J===Z&&(J=_e(J)),se(J,k.ADD_TAGS,we))),ke(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?Je.attributeCheck=k.ADD_ATTR:Ve(k.ADD_ATTR)&&(Q===de&&(Q=_e(Q)),se(Q,k.ADD_ATTR,we))),ke(k,"ADD_URI_SAFE_ATTR")&&Ve(k.ADD_URI_SAFE_ATTR)&&se(Re,k.ADD_URI_SAFE_ATTR,we),ke(k,"FORBID_CONTENTS")&&Ve(k.FORBID_CONTENTS)&&(Ie===Qe&&(Ie=_e(Ie)),se(Ie,k.FORBID_CONTENTS,we)),ke(k,"ADD_FORBID_CONTENTS")&&Ve(k.ADD_FORBID_CONTENTS)&&(Ie===Qe&&(Ie=_e(Ie)),se(Ie,k.ADD_FORBID_CONTENTS,we)),ae&&(J["#text"]=!0),ht&&se(J,["html","head","body"]),J.table&&(se(J,["tbody"]),delete ze.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const K=C;C=k.TRUSTED_TYPES_POLICY;try{O=F("")}catch(fe){throw C=K,fe}}else C===void 0&&k.TRUSTED_TYPES_POLICY!==null&&(C=Uy(h,i)),C&&typeof O=="string"&&(O=F(""));(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&J===Z&&(J=_e(J)),M.uponSanitizeAttribute.length>0&&Q===de&&(Q=_e(Q)),Ue&&Ue(k),sn=k},Us=se({},[...zi,..._i,...Iy]),$s=se({},[...Ni,...Dy]),rh=function(k){let _=b(k);(!_||!_.tagName)&&(_={namespaceURI:on,tagName:"template"});const K=Yn(k.tagName),fe=Yn(_.tagName);return fi[k.namespaceURI]?k.namespaceURI===pr?_.namespaceURI===pt?K==="svg":_.namespaceURI===$e?K==="svg"&&(fe==="annotation-xml"||hi[fe]):!!Us[K]:k.namespaceURI===$e?_.namespaceURI===pt?K==="math":_.namespaceURI===pr?K==="math"&&pi[fe]:!!$s[K]:k.namespaceURI===pt?_.namespaceURI===pr&&!pi[fe]||_.namespaceURI===$e&&!hi[fe]?!1:!$s[K]&&(Qf[K]||!Us[K]):!!(Mn==="application/xhtml+xml"&&fi[k.namespaceURI]):!1},at=function(k){cn(t.removed,{element:k});try{b(k).removeChild(k)}catch{g(k)}},Nt=function(k,_){try{cn(t.removed,{attribute:_.getAttributeNode(k),from:_})}catch{cn(t.removed,{attribute:null,from:_})}if(_.removeAttribute(k),k==="is")if(Et||nn)try{at(_)}catch{}else try{_.setAttribute(k,"")}catch{}},Gs=function(k){let _=null,K=null;if(Rn)k="<remove></remove>"+k;else{const pe=Ol(k,/^[\r\n\t ]+/);K=pe&&pe[0]}Mn==="application/xhtml+xml"&&on===pt&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const fe=C?F(k):k;if(on===pt)try{_=new c().parseFromString(fe,Mn)}catch{}if(!_||!_.documentElement){_=R.createDocument(on,"template",null);try{_.documentElement.innerHTML=di?O:fe}catch{}}const le=_.body||_.documentElement;return k&&K&&le.insertBefore(n.createTextNode(K),le.childNodes[0]||null),on===pt?P.call(_,ht?"html":"body")[0]:ht?_.documentElement:le},Ys=function(k){return D.call(k.ownerDocument||k,k,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},gi=function(k){var _,K;k.normalize();const fe=D.call(k.ownerDocument||k,k,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let le=fe.nextNode();for(;le;){let Be=le.data;Ut([U,H,$],nt=>{Be=un(Be,nt," ")}),le.data=Be,le=fe.nextNode()}const pe=(_=(K=k.querySelectorAll)===null||K===void 0?void 0:K.call(k,"template"))!==null&&_!==void 0?_:[];Ut(Array.from(pe),Be=>{an(Be.content)&&gi(Be.content)})},mr=function(k){const _=E?E(k):null;return typeof _!="string"||we(_)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==w(k)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==A(k)||k.childNodes!==y(k)},an=function(k){if(!A||typeof k!="object"||k===null)return!1;try{return A(k)===mt.documentFragment}catch{return!1}},gr=function(k){if(!A||typeof k!="object"||k===null)return!1;try{return typeof A(k)=="number"}catch{return!1}};function jt(X,k,_){Ut(X,K=>{K.call(t,k,_,sn)})}const Ks=function(k){let _=null;if(jt(M.beforeSanitizeElements,k,null),mr(k))return at(k),!0;const K=we(E?E(k):k.nodeName);if(jt(M.uponSanitizeElement,k,{tagName:K,allowedTags:J}),Ft&&k.hasChildNodes()&&!gr(k.firstElementChild)&&Me(/<[/\w!]/g,k.innerHTML)&&Me(/<[/\w!]/g,k.textContent)||Ft&&k.namespaceURI===pt&&K==="style"&&gr(k.firstElementChild)||k.nodeType===mt.progressingInstruction||Ft&&k.nodeType===mt.comment&&Me(/<[/\w]/g,k.data))return at(k),!0;if(ze[K]||!(Je.tagCheck instanceof Function&&Je.tagCheck(K))&&!J[K]){if(!ze[K]&&Xs(K)&&(re.tagNameCheck instanceof RegExp&&Me(re.tagNameCheck,K)||re.tagNameCheck instanceof Function&&re.tagNameCheck(K)))return!1;if(ae&&!Ie[K]){const le=b(k),pe=y(k);if(pe&&le){const Be=pe.length;for(let nt=Be-1;nt>=0;--nt){const lt=m(pe[nt],!0);le.insertBefore(lt,x(k))}}}return at(k),!0}return(A?A(k):k.nodeType)===mt.element&&!rh(k)||(K==="noscript"||K==="noembed"||K==="noframes")&&Me(/<\/no(script|embed|frames)/i,k.innerHTML)?(at(k),!0):(ft&&k.nodeType===mt.text&&(_=k.textContent,Ut([U,H,$],le=>{_=un(_,le," ")}),k.textContent!==_&&(cn(t.removed,{element:k.cloneNode()}),k.textContent=_)),jt(M.afterSanitizeElements,k,null),!1)},qs=function(k,_,K){if(Ae[_]||z&&(_==="id"||_==="name")&&(K in n||K in nh))return!1;const fe=Q[_]||Je.attributeCheck instanceof Function&&Je.attributeCheck(_,k);if(!(tn&&!Ae[_]&&Me(v,_))){if(!(hr&&Me(Y,_))){if(!fe||Ae[_]){if(!(Xs(k)&&(re.tagNameCheck instanceof RegExp&&Me(re.tagNameCheck,k)||re.tagNameCheck instanceof Function&&re.tagNameCheck(k))&&(re.attributeNameCheck instanceof RegExp&&Me(re.attributeNameCheck,_)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(_,k))||_==="is"&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&Me(re.tagNameCheck,K)||re.tagNameCheck instanceof Function&&re.tagNameCheck(K))))return!1}else if(!Re[_]){if(!Me(ce,un(K,j,""))){if(!((_==="src"||_==="xlink:href"||_==="href")&&k!=="script"&&zl(K,"data:")===0&&At[k])){if(!(Ln&&!Me(ie,un(K,j,"")))){if(K)return!1}}}}}}return!0},ih=se({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Xs=function(k){return!ih[Yn(k)]&&Me(oe,k)},Zs=function(k){jt(M.beforeSanitizeAttributes,k,null);const _=k.attributes;if(!_||mr(k))return;const K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let fe=_.length;for(;fe--;){const le=_[fe],pe=le.name,Be=le.namespaceURI,nt=le.value,lt=we(pe),xi=nt;let De=pe==="value"?xi:jy(xi);if(K.attrName=lt,K.attrValue=De,K.keepAttr=!0,K.forceKeepAttr=void 0,jt(M.uponSanitizeAttribute,k,K),De=K.attrValue,G&&(lt==="id"||lt==="name")&&zl(De,te)!==0&&(Nt(pe,k),De=te+De),Ft&&Me(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,De)){Nt(pe,k);continue}if(lt==="attributename"&&Ol(De,"href")){Nt(pe,k);continue}if(K.forceKeepAttr)continue;if(!K.keepAttr){Nt(pe,k);continue}if(!In&&Me(/\/>/i,De)){Nt(pe,k);continue}ft&&Ut([U,H,$],Qs=>{De=un(De,Qs," ")});const Js=we(k.nodeName);if(!qs(Js,lt,De)){Nt(pe,k);continue}if(C&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Be)switch(h.getAttributeType(Js,lt)){case"TrustedHTML":{De=F(De);break}case"TrustedScriptURL":{De=C.createScriptURL(De);break}}if(De!==xi)try{Be?k.setAttributeNS(Be,pe,De):k.setAttribute(pe,De),mr(k)?at(k):Pl(t.removed)}catch{Nt(pe,k)}}jt(M.afterSanitizeAttributes,k,null)},xr=function(k){let _=null;const K=Ys(k);for(jt(M.beforeSanitizeShadowDOM,k,null);_=K.nextNode();)if(jt(M.uponSanitizeShadowNode,_,null),Ks(_),Zs(_),an(_.content)&&xr(_.content),(A?A(_):_.nodeType)===mt.element){const le=T?T(_):_.shadowRoot;an(le)&&(ln(le),xr(le))}jt(M.afterSanitizeShadowDOM,k,null)},ln=function(k){const _=A?A(k):k.nodeType;if(_===mt.element){const le=T?T(k):k.shadowRoot;an(le)&&(ln(le),xr(le))}const K=y?y(k):k.childNodes;if(!K)return;const fe=[];Ut(K,le=>{cn(fe,le)});for(const le of fe)ln(le);if(_===mt.element){const le=E?E(k):null;if(typeof le=="string"&&we(le)==="template"){const pe=k.content;an(pe)&&ln(pe)}}};return t.sanitize=function(X){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,K=null,fe=null,le=null;if(di=!X,di&&(X="<!-->"),typeof X!="string"&&!gr(X)&&(X=Ay(X),typeof X!="string"))throw dn("dirty is not a string, aborting");if(!t.isSupported)return X;if(Dn||mi(k),t.removed=[],typeof X=="string"&&(ue=!1),ue){const nt=E?E(X):X.nodeName;if(typeof nt=="string"){const lt=we(nt);if(!J[lt]||ze[lt])throw dn("root node is forbidden and cannot be sanitized in-place")}if(mr(X))throw dn("root node is clobbered and cannot be sanitized in-place");ln(X)}else if(gr(X))_=Gs("<!---->"),K=_.ownerDocument.importNode(X,!0),K.nodeType===mt.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?_=K:_.appendChild(K),ln(K);else{if(!Et&&!ft&&!ht&&X.indexOf("<")===-1)return C&&rn?F(X):X;if(_=Gs(X),!_)return Et?null:rn?O:""}_&&Rn&&at(_.firstChild);const pe=Ys(ue?X:_);for(;fe=pe.nextNode();)Ks(fe),Zs(fe),an(fe.content)&&xr(fe.content);if(ue)return ft&&gi(X),X;if(Et){if(ft&&gi(_),nn)for(le=N.call(_.ownerDocument);_.firstChild;)le.appendChild(_.firstChild);else le=_;return(Q.shadowroot||Q.shadowrootmode)&&(le=I.call(r,le,!0)),le}let Be=ht?_.outerHTML:_.innerHTML;return ht&&J["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&Me(Vy,_.ownerDocument.doctype.name)&&(Be="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
414
- `+Be),ft&&Ut([U,H,$],nt=>{Be=un(Be,nt," ")}),C&&rn?F(Be):Be},t.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};mi(X),Dn=!0},t.clearConfig=function(){sn=null,Dn=!1},t.isValidAttribute=function(X,k,_){sn||mi({});const K=we(X),fe=we(k);return qs(K,fe,_)},t.addHook=function(X,k){typeof k=="function"&&cn(M[X],k)},t.removeHook=function(X,k){if(k!==void 0){const _=Sy(M[X],k);return _===-1?void 0:Cy(M[X],_,1)[0]}return Pl(M[X])},t.removeHooks=function(X){M[X]=[]},t.removeAllHooks=function(){M=Gl()},t}var Te=uf(),$y=Te;Te.sanitize.bind(Te);Te.isSupported;Te.addHook.bind(Te);Te.removeHook.bind(Te);Te.removeHooks.bind(Te);Te.removeAllHooks.bind(Te);Te.setConfig.bind(Te);Te.clearConfig.bind(Te);Te.isValidAttribute.bind(Te);Te.version;Te.removed;function Gy(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Yy=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ky=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qy={};function Yl(e,t){return(qy.jsx?Ky:Yy).test(e)}const Xy=/[ \t\n\f\r]/g;function Zy(e){return typeof e=="object"?e.type==="text"?Kl(e.value):!1:Kl(e)}function Kl(e){return e.replace(Xy,"")===""}class dr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}dr.prototype.normal={};dr.prototype.property={};dr.prototype.space=void 0;function df(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new dr(n,r,t)}function Mo(e){return e.toLowerCase()}class Xe{constructor(t,n){this.attribute=n,this.property=t}}Xe.prototype.attribute="";Xe.prototype.booleanish=!1;Xe.prototype.boolean=!1;Xe.prototype.commaOrSpaceSeparated=!1;Xe.prototype.commaSeparated=!1;Xe.prototype.defined=!1;Xe.prototype.mustUseProperty=!1;Xe.prototype.number=!1;Xe.prototype.overloadedBoolean=!1;Xe.prototype.property="";Xe.prototype.spaceSeparated=!1;Xe.prototype.space=void 0;let Jy=0;const ne=en(),Se=en(),Po=en(),W=en(),me=en(),Qt=en(),et=en();function en(){return 2**++Jy}const Oo=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Se,commaOrSpaceSeparated:et,commaSeparated:Qt,number:W,overloadedBoolean:Po,spaceSeparated:me},Symbol.toStringTag,{value:"Module"})),Hi=Object.keys(Oo);class Es extends Xe{constructor(t,n,r,i){let o=-1;if(super(t,n),ql(this,"space",i),typeof r=="number")for(;++o<Hi.length;){const s=Hi[o];ql(this,Hi[o],(r&Oo[s])===Oo[s])}}}Es.prototype.defined=!0;function ql(e,t,n){n&&(e[t]=n)}function En(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Es(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Mo(r)]=r,n[Mo(o.attribute)]=r}return new dr(t,n,e.space)}const ff=En({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:me,ariaCurrent:null,ariaDescribedBy:me,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:me,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:me,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:me,ariaLevel:W,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:me,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:me,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:Se,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hf(e,t){return t in e?e[t]:t}function pf(e,t){return hf(e,t.toLowerCase())}const Qy=En({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qt,acceptCharset:me,accessKey:me,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alpha:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:me,autoFocus:ne,autoPlay:ne,blocking:me,capture:null,charSet:null,checked:ne,cite:null,className:me,closedBy:null,colorSpace:null,cols:W,colSpan:W,command:null,commandFor:null,content:null,contentEditable:Se,controls:ne,controlsList:me,coords:W|Qt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:Po,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:me,height:W,hidden:Po,high:W,href:null,hrefLang:null,htmlFor:me,httpEquiv:me,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:me,itemRef:me,itemScope:ne,itemType:me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,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:ne,optimum:W,pattern:null,ping:me,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:me,required:ne,reversed:ne,rows:W,rowSpan:W,sandbox:me,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootCustomElementRegistry:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shadowRootSerializable:ne,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Se,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:me,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ne,disablePictureInPicture:ne,disableRemotePlayback:ne,exportParts:Qt,part:me,prefix:null,property:null,results:W,security:null,unselectable:null},space:"html",transform:pf}),eb=En({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:et,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:me,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:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,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:Qt,g2:Qt,glyphName:Qt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,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:W,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:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:et,rev:et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:et,requiredFeatures:et,requiredFonts:et,requiredFormats:et,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:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:et,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hf}),mf=En({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()}}),gf=En({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pf}),xf=En({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),tb={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"},nb=/[A-Z]/g,Xl=/-[a-z]/g,rb=/^data[-\w.:]+$/i;function ib(e,t){const n=Mo(t);let r=t,i=Xe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&rb.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Xl,sb);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Xl.test(o)){let s=o.replace(nb,ob);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Es}return new i(r,t)}function ob(e){return"-"+e.toLowerCase()}function sb(e){return e.charAt(1).toUpperCase()}const ab=df([ff,Qy,mf,gf,xf],"html"),As=df([ff,eb,mf,gf,xf],"svg");function lb(e){return e.join(" ").trim()}function yf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fn={},Wi,Zl;function cb(){if(Zl)return Wi;Zl=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
415
- `,d="/",c="*",h="",p="comment",m="declaration";function g(y,b){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];b=b||{};var T=1,w=1;function A(P){var I=P.match(t);I&&(T+=I.length);var M=P.lastIndexOf(u);w=~M?P.length-M:w+P.length}function E(){var P={line:T,column:w};return function(I){return I.position=new C(P),F(),I}}function C(P){this.start=P,this.end={line:T,column:w},this.source=b.source}C.prototype.content=y;function O(P){var I=new Error(b.source+":"+T+":"+w+": "+P);if(I.reason=P,I.filename=b.source,I.line=T,I.column=w,I.source=y,!b.silent)throw I}function B(P){var I=P.exec(y);if(I){var M=I[0];return A(M),y=y.slice(M.length),I}}function F(){B(n)}function L(P){var I;for(P=P||[];I=R();)I!==!1&&P.push(I);return P}function R(){var P=E();if(!(d!=y.charAt(0)||c!=y.charAt(1))){for(var I=2;h!=y.charAt(I)&&(c!=y.charAt(I)||d!=y.charAt(I+1));)++I;if(I+=2,h===y.charAt(I-1))return O("End of comment missing");var M=y.slice(2,I-2);return w+=2,A(M),y=y.slice(I),w+=2,P({type:p,comment:M})}}function D(){var P=E(),I=B(r);if(I){if(R(),!B(i))return O("property missing ':'");var M=B(o),U=P({type:m,property:x(I[0].replace(e,h)),value:M?x(M[0].replace(e,h)):h});return B(s),U}}function N(){var P=[];L(P);for(var I;I=D();)I!==!1&&(P.push(I),L(P));return P}return F(),N()}function x(y){return y?y.replace(l,h):h}return Wi=g,Wi}var Jl;function ub(){if(Jl)return fn;Jl=1;var e=fn&&fn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=n;const t=e(cb());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const s=(0,t.default)(r),l=typeof i=="function";return s.forEach(u=>{if(u.type!=="declaration")return;const{property:d,value:c}=u;l?i(d,c,u):c&&(o=o||{},o[d]=c)}),o}return fn}var _n={},Ql;function db(){if(Ql)return _n;Ql=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(d){return!d||n.test(d)||e.test(d)},s=function(d,c){return c.toUpperCase()},l=function(d,c){return"".concat(c,"-")},u=function(d,c){return c===void 0&&(c={}),o(d)?d:(d=d.toLowerCase(),c.reactCompat?d=d.replace(i,l):d=d.replace(r,l),d.replace(t,s))};return _n.camelCase=u,_n}var Nn,ec;function fb(){if(ec)return Nn;ec=1;var e=Nn&&Nn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ub()),n=db();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(l,u){l&&u&&(s[(0,n.camelCase)(l,o)]=u)}),s}return r.default=r,Nn=r,Nn}var hb=fb();const pb=yf(hb),bf=vf("end"),Ls=vf("start");function vf(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function mb(e){const t=Ls(e),n=bf(e);if(t&&n)return{start:t,end:n}}function Zn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?tc(e.position):"start"in e||"end"in e?tc(e):"line"in e||"column"in e?zo(e):""}function zo(e){return nc(e&&e.line)+":"+nc(e&&e.column)}function tc(e){return zo(e&&e.start)+"-"+zo(e&&e.end)}function nc(e){return e&&typeof e=="number"?e:1}class Ne extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Zn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ne.prototype.file="";Ne.prototype.name="";Ne.prototype.reason="";Ne.prototype.message="";Ne.prototype.stack="";Ne.prototype.column=void 0;Ne.prototype.line=void 0;Ne.prototype.ancestors=void 0;Ne.prototype.cause=void 0;Ne.prototype.fatal=void 0;Ne.prototype.place=void 0;Ne.prototype.ruleId=void 0;Ne.prototype.source=void 0;const Is={}.hasOwnProperty,gb=new Map,xb=/[A-Z]/g,yb=new Set(["table","tbody","thead","tfoot","tr"]),bb=new Set(["td","th"]),kf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Fb(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");r=Bb(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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"?As:ab,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=wf(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function wf(e,t,n){if(t.type==="element")return kb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return wb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Cb(e,t,n);if(t.type==="mdxjsEsm")return Sb(e,t);if(t.type==="root")return jb(e,t,n);if(t.type==="text")return Tb(e,t)}function kb(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=As,e.schema=i),e.ancestors.push(t);const o=Cf(e,t.tagName,!1),s=Eb(e,t);let l=Rs(e,t);return yb.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!Zy(u):!0})),Sf(e,s,o,t),Ds(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function wb(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ir(e,t.position)}function Sb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ir(e,t.position)}function Cb(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=As,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Cf(e,t.name,!0),s=Ab(e,t),l=Rs(e,t);return Sf(e,s,o,t),Ds(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function jb(e,t,n){const r={};return Ds(r,Rs(e,t)),e.create(t,e.Fragment,r,n)}function Tb(e,t){return t.value}function Sf(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ds(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Bb(e,t,n){return r;function r(i,o,s,l){const d=Array.isArray(s.children)?n:t;return l?d(o,s,l):d(o,s)}}function Fb(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),u=Ls(r);return t(i,o,s,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Eb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Is.call(t.properties,i)){const o=Lb(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&bb.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ab(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ir(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else ir(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Rs(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:gb;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const d=i.get(u)||0;s=u+"-"+d,i.set(u,d+1)}}const l=wf(e,o,s);l!==void 0&&n.push(l)}return n}function Lb(e,t,n){const r=ib(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Gy(n):lb(n)),r.property==="style"){let i=typeof n=="object"?n:Ib(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Db(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?tb[r.property]||r.property:r.attribute,n]}}function Ib(e,t){try{return pb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ne("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=kf+"#cannot-parse-style-attribute",i}}function Cf(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=Yl(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=Yl(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Is.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ir(e)}function ir(e,t){const n=new Ne("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=kf+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Db(e){const t={};let n;for(n in e)Is.call(e,n)&&(t[Rb(n)]=e[n]);return t}function Rb(e){let t=e.replace(xb,Mb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Mb(e){return"-"+e.toLowerCase()}const Ui={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"]},Pb={};function Ob(e,t){const n=Pb,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return jf(e,r,i)}function jf(e,t,n){if(zb(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 rc(e.children,t,n)}return Array.isArray(e)?rc(e,t,n):""}function rc(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=jf(e[i],t,n);return r.join("")}function zb(e){return!!(e&&typeof e=="object")}const ic=document.createElement("i");function Ms(e){const t="&"+e+";";ic.innerHTML=t;const n=ic.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function St(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function rt(e,t){return e.length>0?(St(e,e.length,0,t),e):t}const oc={}.hasOwnProperty;function _b(e){const t={};let n=-1;for(;++n<e.length;)Nb(t,e[n]);return t}function Nb(e,t){let n;for(n in t){const i=(oc.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){oc.call(i,s)||(i[s]=[]);const l=o[s];Vb(i[s],Array.isArray(l)?l:l?[l]:[])}}}function Vb(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);St(e,0,0,r)}function Tf(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 wn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vt=_t(/[A-Za-z]/),tt=_t(/[\dA-Za-z]/),Hb=_t(/[#-'*+\--9=?A-Z^-~]/);function _o(e){return e!==null&&(e<32||e===127)}const No=_t(/\d/),Wb=_t(/[\dA-Fa-f]/),Ub=_t(/[!-/:-@[-`{-~]/);function ee(e){return e!==null&&e<-2}function qe(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const $b=_t(new RegExp("\\p{P}|\\p{S}","u")),Gb=_t(/\s/);function _t(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function An(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&tt(e.charCodeAt(n+1))&&tt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(u){return he(u)?(e.enter(n),l(u)):t(u)}function l(u){return he(u)&&o++<i?(e.consume(u),l):(e.exit(n),t(u))}}const Yb={tokenize:Kb};function Kb(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),xe(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ee(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const qb={tokenize:Xb},sc={tokenize:Zb};function Xb(e){const t=this,n=[];let r=0,i,o,s;return l;function l(w){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,u,d)(w)}return d(w)}function u(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const A=t.events.length;let E=A,C;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){C=t.events[E][1].end;break}b(r);let O=A;for(;O<t.events.length;)t.events[O][1].end={...C},O++;return St(t.events,E+1,0,t.events.slice(A)),t.events.length=O,d(w)}return l(w)}function d(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return g(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sc,c,h)(w)}function c(w){return i&&T(),b(r),p(w)}function h(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(w)}function p(w){return t.containerState={},e.attempt(sc,m,g)(w)}function m(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function g(w){if(w===null){i&&T(),b(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(w)}function x(w){if(w===null){y(e.exit("chunkFlow"),!0),b(0),e.consume(w);return}return ee(w)?(e.consume(w),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),x)}function y(w,A){const E=t.sliceStream(w);if(A&&E.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(E),t.parser.lazy[w.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const O=t.events.length;let B=O,F,L;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(F){L=t.events[B][1].end;break}F=!0}for(b(r),C=O;C<t.events.length;)t.events[C][1].end={...L},C++;St(t.events,B+1,0,t.events.slice(O)),t.events.length=C}}function b(w){let A=n.length;for(;A-- >w;){const E=n[A];t.containerState=E[1],E[0].exit.call(t,e)}n.length=w}function T(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Zb(e,t,n){return xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ac(e){if(e===null||qe(e)||Gb(e))return 1;if($b(e))return 2}function Ps(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Vo={name:"attention",resolveAll:Jb,tokenize:Qb};function Jb(e,t){let n=-1,r,i,o,s,l,u,d,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};lc(h,-u),lc(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=rt(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=rt(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),d=rt(d,Ps(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=rt(d,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,d=rt(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,St(e,r-1,n-r+3,d),n=r+d.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Qb(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ac(r);let o;return s;function s(u){return o=u,e.enter("attentionSequence"),l(u)}function l(u){if(u===o)return e.consume(u),l;const d=e.exit("attentionSequence"),c=ac(u),h=!c||c===2&&i||n.includes(u),p=!i||i===2&&c||n.includes(r);return d._open=!!(o===42?h:h&&(i||!p)),d._close=!!(o===42?p:p&&(c||!h)),t(u)}}function lc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const e5={name:"autolink",tokenize:t5};function t5(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(m){return vt(m)?(e.consume(m),s):m===64?n(m):d(m)}function s(m){return m===43||m===45||m===46||tt(m)?(r=1,l(m)):d(m)}function l(m){return m===58?(e.consume(m),r=0,u):(m===43||m===45||m===46||tt(m))&&r++<32?(e.consume(m),l):(r=0,d(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||_o(m)?n(m):(e.consume(m),u)}function d(m){return m===64?(e.consume(m),c):Hb(m)?(e.consume(m),d):n(m)}function c(m){return tt(m)?h(m):n(m)}function h(m){return m===46?(e.consume(m),r=0,c):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||tt(m))&&r++<63){const g=m===45?p:h;return e.consume(m),g}return n(m)}}const li={partial:!0,tokenize:n5};function n5(e,t,n){return r;function r(o){return he(o)?xe(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ee(o)?t(o):n(o)}}const Bf={continuation:{tokenize:i5},exit:o5,name:"blockQuote",tokenize:r5};function r5(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return he(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function i5(e,t,n){const r=this;return i;function i(s){return he(s)?xe(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Bf,t,n)(s)}}function o5(e){e.exit("blockQuote")}const Ff={name:"characterEscape",tokenize:s5};function s5(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Ub(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ef={name:"characterReference",tokenize:a5};function a5(e,t,n){const r=this;let i=0,o,s;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),o=31,s=tt,c(h))}function d(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=Wb,c):(e.enter("characterReferenceValue"),o=7,s=No,c(h))}function c(h){if(h===59&&i){const p=e.exit("characterReferenceValue");return s===tt&&!Ms(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&i++<o?(e.consume(h),c):n(h)}}const cc={partial:!0,tokenize:c5},uc={concrete:!0,name:"codeFenced",tokenize:l5};function l5(e,t,n){const r=this,i={partial:!0,tokenize:E};let o=0,s=0,l;return u;function u(C){return d(C)}function d(C){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,l=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(C)}function c(C){return C===l?(s++,e.consume(C),c):s<3?n(C):(e.exit("codeFencedFenceSequence"),he(C)?xe(e,h,"whitespace")(C):h(C))}function h(C){return C===null||ee(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(cc,x,A)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||ee(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(C)):he(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,m,"whitespace")(C)):C===96&&C===l?n(C):(e.consume(C),p)}function m(C){return C===null||ee(C)?h(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||ee(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(C)):C===96&&C===l?n(C):(e.consume(C),g)}function x(C){return e.attempt(i,A,y)(C)}function y(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),b}function b(C){return o>0&&he(C)?xe(e,T,"linePrefix",o+1)(C):T(C)}function T(C){return C===null||ee(C)?e.check(cc,x,A)(C):(e.enter("codeFlowValue"),w(C))}function w(C){return C===null||ee(C)?(e.exit("codeFlowValue"),T(C)):(e.consume(C),w)}function A(C){return e.exit("codeFenced"),t(C)}function E(C,O,B){let F=0;return L;function L(I){return C.enter("lineEnding"),C.consume(I),C.exit("lineEnding"),R}function R(I){return C.enter("codeFencedFence"),he(I)?xe(C,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):D(I)}function D(I){return I===l?(C.enter("codeFencedFenceSequence"),N(I)):B(I)}function N(I){return I===l?(F++,C.consume(I),N):F>=s?(C.exit("codeFencedFenceSequence"),he(I)?xe(C,P,"whitespace")(I):P(I)):B(I)}function P(I){return I===null||ee(I)?(C.exit("codeFencedFence"),O(I)):B(I)}}}function c5(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const $i={name:"codeIndented",tokenize:d5},u5={partial:!0,tokenize:f5};function d5(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),xe(e,o,"linePrefix",5)(d)}function o(d){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?u(d):ee(d)?e.attempt(u5,s,u)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||ee(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),l)}function u(d){return e.exit("codeIndented"),t(d)}}function f5(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ee(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):xe(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):ee(s)?i(s):n(s)}}const h5={name:"codeText",previous:m5,resolve:p5,tokenize:g5};function p5(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function m5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function g5(e,t,n){let r=0,i,o;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),u(h))}function u(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),u):h===96?(o=e.enter("codeTextSequence"),i=0,c(h)):ee(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("codeTextData"),d(h))}function d(h){return h===null||h===32||h===96||ee(h)?(e.exit("codeTextData"),u(h)):(e.consume(h),d)}function c(h){return h===96?(e.consume(h),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(o.type="codeTextData",d(h))}}class x5{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 r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Vn(this.left,r),o.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),Vn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Vn(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);Vn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Vn(this.left,n.reverse())}}}function Vn(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 Af(e){const t={};let n=-1,r,i,o,s,l,u,d;const c=new x5(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,y5(c,n)),n=t[n],d=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},l=c.slice(i,n),l.unshift(r),c.splice(i,n-i+1,l))}}return St(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!d}function y5(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,u=[],d={};let c,h,p=-1,m=n,g=0,x=0;const y=[x];for(;m;){for(;e.get(++i)[1]!==m;);o.push(i),m._tokenizer||(c=r.sliceStream(m),m.next||c.push(null),h&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(x=p+1,y.push(x),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):y.pop(),p=y.length;p--;){const b=l.slice(y[p],y[p+1]),T=o.pop();u.push([T,T+b.length-1]),e.splice(T,2,b)}for(u.reverse(),p=-1;++p<u.length;)d[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return d}const b5={resolve:k5,tokenize:w5},v5={partial:!0,tokenize:S5};function k5(e){return Af(e),e}function w5(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):ee(l)?e.check(v5,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function S5(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),xe(e,o,"linePrefix")}function o(s){if(s===null||ee(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Lf(e,t,n,r,i,o,s,l,u){const d=u||Number.POSITIVE_INFINITY;let c=0;return h;function h(b){return b===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(b),e.exit(o),p):b===null||b===32||b===41||_o(b)?n(b):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(b))}function p(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(l),p(b)):b===null||b===60||ee(b)?n(b):(e.consume(b),b===92?g:m)}function g(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function x(b){return!c&&(b===null||b===41||qe(b))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(b)):c<d&&b===40?(e.consume(b),c++,x):b===41?(e.consume(b),c--,x):b===null||b===32||b===40||_o(b)?n(b):(e.consume(b),b===92?y:x)}function y(b){return b===40||b===41||b===92?(e.consume(b),x):x(b)}}function If(e,t,n,r,i,o){const s=this;let l=0,u;return d;function d(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(o),c}function c(m){return l>999||m===null||m===91||m===93&&!u||m===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(o),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):ee(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===null||m===91||m===93||ee(m)||l++>999?(e.exit("chunkString"),c(m)):(e.consume(m),u||(u=!he(m)),m===92?p:h)}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,h):h(m)}}function Df(e,t,n,r,i,o){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),d(p))}function d(p){return p===s?(e.exit(o),u(s)):p===null?n(p):ee(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),xe(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||ee(p)?(e.exit("chunkString"),d(p)):(e.consume(p),p===92?h:c)}function h(p){return p===s||p===92?(e.consume(p),c):c(p)}}function Jn(e,t){let n;return r;function r(i){return ee(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):he(i)?xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const C5={name:"definition",tokenize:T5},j5={partial:!0,tokenize:B5};function T5(e,t,n){const r=this;let i;return o;function o(m){return e.enter("definition"),s(m)}function s(m){return If.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return i=wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):n(m)}function u(m){return qe(m)?Jn(e,d)(m):d(m)}function d(m){return Lf(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function c(m){return e.attempt(j5,h,h)(m)}function h(m){return he(m)?xe(e,p,"whitespace")(m):p(m)}function p(m){return m===null||ee(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function B5(e,t,n){return r;function r(l){return qe(l)?Jn(e,i)(l):n(l)}function i(l){return Df(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return he(l)?xe(e,s,"whitespace")(l):s(l)}function s(l){return l===null||ee(l)?t(l):n(l)}}const F5={name:"hardBreakEscape",tokenize:E5};function E5(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ee(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const A5={name:"headingAtx",resolve:L5,tokenize:I5};function L5(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},St(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function I5(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||qe(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||ee(c)?(e.exit("atxHeading"),t(c)):he(c)?xe(e,l,"whitespace")(c):(e.enter("atxHeadingText"),d(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),l(c))}function d(c){return c===null||c===35||qe(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),d)}}const D5=["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"],dc=["pre","script","style","textarea"],R5={concrete:!0,name:"htmlFlow",resolveTo:O5,tokenize:z5},M5={partial:!0,tokenize:N5},P5={partial:!0,tokenize:_5};function O5(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 z5(e,t,n){const r=this;let i,o,s,l,u;return d;function d(j){return c(j)}function c(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),h}function h(j){return j===33?(e.consume(j),p):j===47?(e.consume(j),o=!0,x):j===63?(e.consume(j),i=3,r.interrupt?t:v):vt(j)?(e.consume(j),s=String.fromCharCode(j),y):n(j)}function p(j){return j===45?(e.consume(j),i=2,m):j===91?(e.consume(j),i=5,l=0,g):vt(j)?(e.consume(j),i=4,r.interrupt?t:v):n(j)}function m(j){return j===45?(e.consume(j),r.interrupt?t:v):n(j)}function g(j){const oe="CDATA[";return j===oe.charCodeAt(l++)?(e.consume(j),l===oe.length?r.interrupt?t:D:g):n(j)}function x(j){return vt(j)?(e.consume(j),s=String.fromCharCode(j),y):n(j)}function y(j){if(j===null||j===47||j===62||qe(j)){const oe=j===47,ce=s.toLowerCase();return!oe&&!o&&dc.includes(ce)?(i=1,r.interrupt?t(j):D(j)):D5.includes(s.toLowerCase())?(i=6,oe?(e.consume(j),b):r.interrupt?t(j):D(j)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):o?T(j):w(j))}return j===45||tt(j)?(e.consume(j),s+=String.fromCharCode(j),y):n(j)}function b(j){return j===62?(e.consume(j),r.interrupt?t:D):n(j)}function T(j){return he(j)?(e.consume(j),T):L(j)}function w(j){return j===47?(e.consume(j),L):j===58||j===95||vt(j)?(e.consume(j),A):he(j)?(e.consume(j),w):L(j)}function A(j){return j===45||j===46||j===58||j===95||tt(j)?(e.consume(j),A):E(j)}function E(j){return j===61?(e.consume(j),C):he(j)?(e.consume(j),E):w(j)}function C(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),u=j,O):he(j)?(e.consume(j),C):B(j)}function O(j){return j===u?(e.consume(j),u=null,F):j===null||ee(j)?n(j):(e.consume(j),O)}function B(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||qe(j)?E(j):(e.consume(j),B)}function F(j){return j===47||j===62||he(j)?w(j):n(j)}function L(j){return j===62?(e.consume(j),R):n(j)}function R(j){return j===null||ee(j)?D(j):he(j)?(e.consume(j),R):n(j)}function D(j){return j===45&&i===2?(e.consume(j),M):j===60&&i===1?(e.consume(j),U):j===62&&i===4?(e.consume(j),Y):j===63&&i===3?(e.consume(j),v):j===93&&i===5?(e.consume(j),$):ee(j)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(M5,ie,N)(j)):j===null||ee(j)?(e.exit("htmlFlowData"),N(j)):(e.consume(j),D)}function N(j){return e.check(P5,P,ie)(j)}function P(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),I}function I(j){return j===null||ee(j)?N(j):(e.enter("htmlFlowData"),D(j))}function M(j){return j===45?(e.consume(j),v):D(j)}function U(j){return j===47?(e.consume(j),s="",H):D(j)}function H(j){if(j===62){const oe=s.toLowerCase();return dc.includes(oe)?(e.consume(j),Y):D(j)}return vt(j)&&s.length<8?(e.consume(j),s+=String.fromCharCode(j),H):D(j)}function $(j){return j===93?(e.consume(j),v):D(j)}function v(j){return j===62?(e.consume(j),Y):j===45&&i===2?(e.consume(j),v):D(j)}function Y(j){return j===null||ee(j)?(e.exit("htmlFlowData"),ie(j)):(e.consume(j),Y)}function ie(j){return e.exit("htmlFlow"),t(j)}}function _5(e,t,n){const r=this;return i;function i(s){return ee(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function N5(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(li,t,n)}}const V5={name:"htmlText",tokenize:H5};function H5(e,t,n){const r=this;let i,o,s;return l;function l(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),u}function u(v){return v===33?(e.consume(v),d):v===47?(e.consume(v),E):v===63?(e.consume(v),w):vt(v)?(e.consume(v),B):n(v)}function d(v){return v===45?(e.consume(v),c):v===91?(e.consume(v),o=0,g):vt(v)?(e.consume(v),T):n(v)}function c(v){return v===45?(e.consume(v),m):n(v)}function h(v){return v===null?n(v):v===45?(e.consume(v),p):ee(v)?(s=h,U(v)):(e.consume(v),h)}function p(v){return v===45?(e.consume(v),m):h(v)}function m(v){return v===62?M(v):v===45?p(v):h(v)}function g(v){const Y="CDATA[";return v===Y.charCodeAt(o++)?(e.consume(v),o===Y.length?x:g):n(v)}function x(v){return v===null?n(v):v===93?(e.consume(v),y):ee(v)?(s=x,U(v)):(e.consume(v),x)}function y(v){return v===93?(e.consume(v),b):x(v)}function b(v){return v===62?M(v):v===93?(e.consume(v),b):x(v)}function T(v){return v===null||v===62?M(v):ee(v)?(s=T,U(v)):(e.consume(v),T)}function w(v){return v===null?n(v):v===63?(e.consume(v),A):ee(v)?(s=w,U(v)):(e.consume(v),w)}function A(v){return v===62?M(v):w(v)}function E(v){return vt(v)?(e.consume(v),C):n(v)}function C(v){return v===45||tt(v)?(e.consume(v),C):O(v)}function O(v){return ee(v)?(s=O,U(v)):he(v)?(e.consume(v),O):M(v)}function B(v){return v===45||tt(v)?(e.consume(v),B):v===47||v===62||qe(v)?F(v):n(v)}function F(v){return v===47?(e.consume(v),M):v===58||v===95||vt(v)?(e.consume(v),L):ee(v)?(s=F,U(v)):he(v)?(e.consume(v),F):M(v)}function L(v){return v===45||v===46||v===58||v===95||tt(v)?(e.consume(v),L):R(v)}function R(v){return v===61?(e.consume(v),D):ee(v)?(s=R,U(v)):he(v)?(e.consume(v),R):F(v)}function D(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),i=v,N):ee(v)?(s=D,U(v)):he(v)?(e.consume(v),D):(e.consume(v),P)}function N(v){return v===i?(e.consume(v),i=void 0,I):v===null?n(v):ee(v)?(s=N,U(v)):(e.consume(v),N)}function P(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||qe(v)?F(v):(e.consume(v),P)}function I(v){return v===47||v===62||qe(v)?F(v):n(v)}function M(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function U(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),H}function H(v){return he(v)?xe(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):$(v)}function $(v){return e.enter("htmlTextData"),s(v)}}const Os={name:"labelEnd",resolveAll:G5,resolveTo:Y5,tokenize:K5},W5={tokenize:q5},U5={tokenize:X5},$5={tokenize:Z5};function G5(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&St(e,0,e.length,n),e}function Y5(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",u,t],["enter",d,t]],l=rt(l,e.slice(o+1,o+r+3)),l=rt(l,[["enter",c,t]]),l=rt(l,Ps(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=rt(l,[["exit",c,t],e[s-2],e[s-1],["exit",d,t]]),l=rt(l,e.slice(s+1)),l=rt(l,[["exit",u,t]]),St(e,o,e.length,l),e}function K5(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(p){return o?o._inactive?h(p):(s=r.parser.defined.includes(wn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(W5,c,s?c:h)(p):p===91?e.attempt(U5,c,s?d:h)(p):s?c(p):h(p)}function d(p){return e.attempt($5,c,h)(p)}function c(p){return t(p)}function h(p){return o._balanced=!0,n(p)}}function q5(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return qe(h)?Jn(e,o)(h):o(h)}function o(h){return h===41?c(h):Lf(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return qe(h)?Jn(e,u)(h):c(h)}function l(h){return n(h)}function u(h){return h===34||h===39||h===40?Df(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):c(h)}function d(h){return qe(h)?Jn(e,c)(h):c(h)}function c(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function X5(e,t,n){const r=this;return i;function i(l){return If.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function Z5(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const J5={name:"labelStartImage",resolveAll:Os.resolveAll,tokenize:Q5};function Q5(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const e4={name:"labelStartLink",resolveAll:Os.resolveAll,tokenize:t4};function t4(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Gi={name:"lineEnding",tokenize:n4};function n4(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const Nr={name:"thematicBreak",tokenize:r4};function r4(e,t,n){let r=0,i;return o;function o(d){return e.enter("thematicBreak"),s(d)}function s(d){return i=d,l(d)}function l(d){return d===i?(e.enter("thematicBreakSequence"),u(d)):r>=3&&(d===null||ee(d))?(e.exit("thematicBreak"),t(d)):n(d)}function u(d){return d===i?(e.consume(d),r++,u):(e.exit("thematicBreakSequence"),he(d)?xe(e,l,"whitespace")(d):l(d))}}const Ge={continuation:{tokenize:a4},exit:c4,name:"list",tokenize:s4},i4={partial:!0,tokenize:u4},o4={partial:!0,tokenize:l4};function s4(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(m){const g=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:No(m)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Nr,n,d)(m):d(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return n(m)}function u(m){return No(m)&&++s<10?(e.consume(m),u):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),d(m)):n(m)}function d(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(li,r.interrupt?n:c,e.attempt(i4,p,h))}function c(m){return r.containerState.initialBlankLine=!0,o++,p(m)}function h(m){return he(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function a4(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(li,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xe(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!he(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(o4,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(Ge,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function l4(e,t,n){const r=this;return xe(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function c4(e){e.exit(this.containerState.type)}function u4(e,t,n){const r=this;return xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!he(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const fc={name:"setextUnderline",resolveTo:d4,tokenize:f4};function d4(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function f4(e,t,n){const r=this;let i;return o;function o(d){let c=r.events.length,h;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){h=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===i?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),he(d)?xe(e,u,"lineSuffix")(d):u(d))}function u(d){return d===null||ee(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const h4={tokenize:p4};function p4(e){const t=this,n=e.attempt(li,r,e.attempt(this.parser.constructs.flowInitial,i,xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(b5,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const m4={resolveAll:Mf()},g4=Rf("string"),x4=Rf("text");function Rf(e){return{resolveAll:Mf(e==="text"?y4:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(c){return d(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return d(c)?(n.exit("data"),o(c)):(n.consume(c),u)}function d(c){if(c===null)return!0;const h=i[c];let p=-1;if(h)for(;++p<h.length;){const m=h[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function Mf(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function y4(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 r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,u;for(;o--;){const d=i[o];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(d===-2)u=!0,l++;else if(d!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const d={type:n===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const b4={42:Ge,43:Ge,45:Ge,48:Ge,49:Ge,50:Ge,51:Ge,52:Ge,53:Ge,54:Ge,55:Ge,56:Ge,57:Ge,62:Bf},v4={91:C5},k4={[-2]:$i,[-1]:$i,32:$i},w4={35:A5,42:Nr,45:[fc,Nr],60:R5,61:fc,95:Nr,96:uc,126:uc},S4={38:Ef,92:Ff},C4={[-5]:Gi,[-4]:Gi,[-3]:Gi,33:J5,38:Ef,42:Vo,60:[e5,V5],91:e4,92:[F5,Ff],93:Os,95:Vo,96:h5},j4={null:[Vo,m4]},T4={null:[42,95]},B4={null:[]},F4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:T4,contentInitial:v4,disable:B4,document:b4,flow:w4,flowInitial:k4,insideSpan:j4,string:S4,text:C4},Symbol.toStringTag,{value:"Module"}));function E4(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const u={attempt:O(E),check:O(C),consume:T,enter:w,exit:A,interrupt:O(C,{interrupt:!0})},d={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:h};let c=t.tokenize.call(d,u);return t.resolveAll&&o.push(t),d;function h(R){return s=rt(s,R),y(),s[s.length-1]!==null?[]:(B(t,0),d.events=Ps(o,d.events,d),d.events)}function p(R,D){return L4(m(R),D)}function m(R){return A4(s,R)}function g(){const{_bufferIndex:R,_index:D,line:N,column:P,offset:I}=r;return{_bufferIndex:R,_index:D,line:N,column:P,offset:I}}function x(R){i[R.line]=R.column,L()}function y(){let R;for(;r._index<s.length;){const D=s[r._index];if(typeof D=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<D.length;)b(D.charCodeAt(r._bufferIndex));else b(D)}}function b(R){c=c(R)}function T(R){ee(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,L()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=R}function w(R,D){const N=D||{};return N.type=R,N.start=g(),d.events.push(["enter",N,d]),l.push(N),N}function A(R){const D=l.pop();return D.end=g(),d.events.push(["exit",D,d]),D}function E(R,D){B(R,D.from)}function C(R,D){D.restore()}function O(R,D){return N;function N(P,I,M){let U,H,$,v;return Array.isArray(P)?ie(P):"tokenize"in P?ie([P]):Y(P);function Y(J){return Z;function Z(Q){const de=Q!==null&&J[Q],re=Q!==null&&J.null,ze=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(re)?re:re?[re]:[]];return ie(ze)(Q)}}function ie(J){return U=J,H=0,J.length===0?M:j(J[H])}function j(J){return Z;function Z(Q){return v=F(),$=J,J.partial||(d.currentConstruct=J),J.name&&d.parser.constructs.disable.null.includes(J.name)?ce():J.tokenize.call(D?Object.assign(Object.create(d),D):d,u,oe,ce)(Q)}}function oe(J){return R($,v),I}function ce(J){return v.restore(),++H<U.length?j(U[H]):M}}}function B(R,D){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&St(d.events,D,d.events.length-D,R.resolve(d.events.slice(D),d)),R.resolveTo&&(d.events=R.resolveTo(d.events,d))}function F(){const R=g(),D=d.previous,N=d.currentConstruct,P=d.events.length,I=Array.from(l);return{from:P,restore:M};function M(){r=R,d.previous=D,d.currentConstruct=N,d.events.length=P,l=I,L()}}function L(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function A4(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function L4(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
416
- `;break}case-3:{s=`\r
417
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function I4(e){const r={constructs:_b([F4,...(e||{}).extensions||[]]),content:i(Yb),defined:[],document:i(qb),flow:i(h4),lazy:{},string:i(g4),text:i(x4)};return r;function i(o){return s;function s(l){return E4(r,o,l)}}}function D4(e){for(;!Af(e););return e}const hc=/[\0\t\n\r]/g;function R4(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const u=[];let d,c,h,p,m;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),h=0,t="",n&&(o.charCodeAt(0)===65279&&h++,n=void 0);h<o.length;){if(hc.lastIndex=h,d=hc.exec(o),p=d&&d.index!==void 0?d.index:o.length,m=o.charCodeAt(p),!d){t=o.slice(h);break}if(m===10&&h===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<p&&(u.push(o.slice(h,p)),e+=p-h),m){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return l&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const M4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function P4(e){return e.replace(M4,O4)}function O4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Tf(n.slice(o?2:1),o?16:10)}return Ms(n)||e}const Pf={}.hasOwnProperty;function z4(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),_4(n)(D4(I4(n).document().write(R4()(e,t,!0))))}function _4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ft),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(tn),blockQuote:o(re),characterEscape:F,characterReference:F,codeFenced:o(ze),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ze,s),codeText:o(Ae,s),codeTextData:F,data:F,codeFlowValue:F,definition:o(Je),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(hr),hardBreakEscape:o(Ln),hardBreakTrailing:o(Ln),htmlFlow:o(In,s),htmlFlowData:F,htmlText:o(In,s),htmlTextData:F,image:o(ft),label:s,link:o(Ft),listItem:o(Dn),listItemValue:p,listOrdered:o(ht,h),listUnordered:o(ht),paragraph:o(Rn),reference:j,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(tn),strong:o(Et),thematicBreak:o(rn)},exit:{atxHeading:u(),atxHeadingSequence:E,autolink:u(),autolinkEmail:de,autolinkProtocol:Q,blockQuote:u(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:J,characterReference:Z,codeFenced:u(y),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:L,codeIndented:u(b),codeText:u(I),codeTextData:L,data:L,definition:u(),definitionDestinationString:A,definitionLabelString:T,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(D),hardBreakTrailing:u(D),htmlFlow:u(N),htmlFlowData:L,htmlText:u(P),htmlTextData:L,image:u(U),label:$,labelText:H,lineEnding:R,link:u(M),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:oe,resourceDestinationString:v,resourceTitleString:Y,resource:ie,setextHeading:u(B),setextHeadingLineSequence:O,setextHeadingText:C,strong:u(),thematicBreak:u()}};Of(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let G={type:"root",children:[]};const te={stack:[G],tokenStack:[],config:t,enter:l,exit:d,buffer:s,resume:c,data:n},ae=[];let ue=-1;for(;++ue<z.length;)if(z[ue][1].type==="listOrdered"||z[ue][1].type==="listUnordered")if(z[ue][0]==="enter")ae.push(ue);else{const Le=ae.pop();ue=i(z,Le,ue)}for(ue=-1;++ue<z.length;){const Le=t[z[ue][0]];Pf.call(Le,z[ue][1].type)&&Le[z[ue][1].type].call(Object.assign({sliceSerialize:z[ue][2].sliceSerialize},te),z[ue][1])}if(te.tokenStack.length>0){const Le=te.tokenStack[te.tokenStack.length-1];(Le[1]||pc).call(te,void 0,Le[0])}for(G.position={start:It(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:It(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)G=t.transforms[ue](G)||G;return G}function i(z,G,te){let ae=G-1,ue=-1,Le=!1,Ie,Qe,At,Lt;for(;++ae<=te;){const Re=z[ae];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?ue++:ue--,Lt=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(Ie&&!Lt&&!ue&&!At&&(At=ae),Lt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Lt=void 0}if(!ue&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||ue===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(Ie){let Ct=ae;for(Qe=void 0;Ct--;){const $e=z[Ct];if($e[1].type==="lineEnding"||$e[1].type==="lineEndingBlank"){if($e[0]==="exit")continue;Qe&&(z[Qe][1].type="lineEndingBlank",Le=!0),$e[1].type="lineEnding",Qe=Ct}else if(!($e[1].type==="linePrefix"||$e[1].type==="blockQuotePrefix"||$e[1].type==="blockQuotePrefixWhitespace"||$e[1].type==="blockQuoteMarker"||$e[1].type==="listItemIndent"))break}At&&(!Qe||At<Qe)&&(Ie._spread=!0),Ie.end=Object.assign({},Qe?z[Qe][1].start:Re[1].end),z.splice(Qe||ae,0,["exit",Ie,Re[2]]),ae++,te++}if(Re[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};Ie=Ct,z.splice(ae,0,["enter",Ct,Re[2]]),ae++,te++,At=void 0,Lt=!0}}}return z[G][1]._spread=Le,te}function o(z,G){return te;function te(ae){l.call(this,z(ae),ae),G&&G.call(this,ae)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(z,G,te){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([G,te||void 0]),z.position={start:It(G.start),end:void 0}}function u(z){return G;function G(te){z&&z.call(this,te),d.call(this,te)}}function d(z,G){const te=this.stack.pop(),ae=this.tokenStack.pop();if(ae)ae[0].type!==z.type&&(G?G.call(this,z,ae[0]):(ae[1]||pc).call(this,z,ae[0]));else throw new Error("Cannot close `"+z.type+"` ("+Zn({start:z.start,end:z.end})+"): it’s not open");te.position.end=It(z.end)}function c(){return Ob(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(z){if(this.data.expectingFirstListItemValue){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function m(){const z=this.resume(),G=this.stack[this.stack.length-1];G.lang=z}function g(){const z=this.resume(),G=this.stack[this.stack.length-1];G.meta=z}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z.replace(/(\r?\n|\r)$/g,"")}function T(z){const G=this.resume(),te=this.stack[this.stack.length-1];te.label=G,te.identifier=wn(this.sliceSerialize(z)).toLowerCase()}function w(){const z=this.resume(),G=this.stack[this.stack.length-1];G.title=z}function A(){const z=this.resume(),G=this.stack[this.stack.length-1];G.url=z}function E(z){const G=this.stack[this.stack.length-1];if(!G.depth){const te=this.sliceSerialize(z).length;G.depth=te}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function O(z){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function F(z){const te=this.stack[this.stack.length-1].children;let ae=te[te.length-1];(!ae||ae.type!=="text")&&(ae=nn(),ae.position={start:It(z.start),end:void 0},te.push(ae)),this.stack.push(ae)}function L(z){const G=this.stack.pop();G.value+=this.sliceSerialize(z),G.position.end=It(z.end)}function R(z){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak){const te=G.children[G.children.length-1];te.position.end=It(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(G.type)&&(F.call(this,z),L.call(this,z))}function D(){this.data.atHardBreak=!0}function N(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function P(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function I(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function M(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=G,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function U(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=G,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function H(z){const G=this.sliceSerialize(z),te=this.stack[this.stack.length-2];te.label=P4(G),te.identifier=wn(G).toLowerCase()}function $(){const z=this.stack[this.stack.length-1],G=this.resume(),te=this.stack[this.stack.length-1];if(this.data.inReference=!0,te.type==="link"){const ae=z.children;te.children=ae}else te.alt=G}function v(){const z=this.resume(),G=this.stack[this.stack.length-1];G.url=z}function Y(){const z=this.resume(),G=this.stack[this.stack.length-1];G.title=z}function ie(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function oe(z){const G=this.resume(),te=this.stack[this.stack.length-1];te.label=G,te.identifier=wn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function ce(z){this.data.characterReferenceType=z.type}function J(z){const G=this.sliceSerialize(z),te=this.data.characterReferenceType;let ae;te?(ae=Tf(G,te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ae=Ms(G);const ue=this.stack[this.stack.length-1];ue.value+=ae}function Z(z){const G=this.stack.pop();G.position.end=It(z.end)}function Q(z){L.call(this,z);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(z)}function de(z){L.call(this,z);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(z)}function re(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function Ae(){return{type:"inlineCode",value:""}}function Je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function hr(){return{type:"emphasis",children:[]}}function tn(){return{type:"heading",depth:0,children:[]}}function Ln(){return{type:"break"}}function In(){return{type:"html",value:""}}function ft(){return{type:"image",title:null,url:"",alt:null}}function Ft(){return{type:"link",title:null,url:"",children:[]}}function ht(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function Dn(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function Rn(){return{type:"paragraph",children:[]}}function Et(){return{type:"strong",children:[]}}function nn(){return{type:"text",value:""}}function rn(){return{type:"thematicBreak"}}}function It(e){return{line:e.line,column:e.column,offset:e.offset}}function Of(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Of(e,r):N4(e,r)}}function N4(e,t){let n;for(n in t)if(Pf.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function pc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zn({start:t.start,end:t.end})+") is still open")}function V4(e){const t=this;t.parser=n;function n(r){return z4(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function H4(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 W4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
418
- `}]}function U4(e,t){const n=t.value?t.value+`
419
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function $4(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function G4(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Y4(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=An(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const d={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,d),e.applyData(t,d)}function K4(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 q4(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function zf(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function X4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zf(e,t);const i={src:An(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Z4(e,t){const n={src:An(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 r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function J4(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Q4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zf(e,t);const i={href:An(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function ev(e,t){const n={href:An(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tv(e,t,n){const r=e.all(t),i=n?nv(n):_f(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let h;c&&c.type==="element"&&c.tagName==="p"?h=c:(h={type:"element",tagName:"p",properties:{},children:[]},r.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:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const c=r[l];(i||l!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
420
- `}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
421
- `});const d={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,d),e.applyData(t,d)}function nv(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=_f(n[r])}return t}function _f(e){const t=e.spread;return t??e.children.length>1}function rv(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function iv(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ov(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function sv(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function av(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Ls(t.children[1]),u=bf(t.children[t.children.length-1]);l&&u&&(s.position={start:l,end:u}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function lv(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let u=-1;const d=[];for(;++u<l;){const h=t.children[u],p={},m=s?s[u]:void 0;m&&(p.align=m);let g={type:"element",tagName:o,properties:p,children:[]};h&&(g.children=e.all(h),e.patch(h,g),g=e.applyData(h,g)),d.push(g)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,c),e.applyData(t,c)}function cv(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const mc=9,gc=32;function uv(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(xc(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(xc(t.slice(i),i>0,!1)),o.join("")}function xc(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===mc||o===gc;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===mc||o===gc;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function dv(e,t){const n={type:"text",value:uv(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fv(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const hv={blockquote:H4,break:W4,code:U4,delete:$4,emphasis:G4,footnoteReference:Y4,heading:K4,html:q4,imageReference:X4,image:Z4,inlineCode:J4,linkReference:Q4,link:ev,listItem:tv,list:rv,paragraph:iv,root:ov,strong:sv,table:av,tableCell:cv,tableRow:lv,text:dv,thematicBreak:fv,toml:Er,yaml:Er,definition:Er,footnoteDefinition:Er};function Er(){}const Nf=-1,ci=0,Qn=1,Jr=2,zs=3,_s=4,Ns=5,Vs=6,Vf=7,Hf=8,pv=typeof self=="object"?self:globalThis,yc=(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 pv[e](t)},mv=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case ci:case Nf:return n(s,i);case Qn:{const l=n([],i);for(const u of s)l.push(r(u));return l}case Jr:{const l=n({},i);for(const[u,d]of s)l[r(u)]=r(d);return l}case zs:return n(new Date(s),i);case _s:{const{source:l,flags:u}=s;return n(new RegExp(l,u),i)}case Ns:{const l=n(new Map,i);for(const[u,d]of s)l.set(r(u),r(d));return l}case Vs:{const l=n(new Set,i);for(const u of s)l.add(r(u));return l}case Vf:{const{name:l,message:u}=s;return n(yc(l,u),i)}case Hf:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(yc(o,s),i)};return r},bc=e=>mv(new Map,e)(0),hn="",{toString:gv}={},{keys:xv}=Object,Hn=e=>{const t=typeof e;if(t!=="object"||!e)return[ci,t];const n=gv.call(e).slice(8,-1);switch(n){case"Array":return[Qn,hn];case"Object":return[Jr,hn];case"Date":return[zs,hn];case"RegExp":return[_s,hn];case"Map":return[Ns,hn];case"Set":return[Vs,hn];case"DataView":return[Qn,n]}return n.includes("Array")?[Qn,n]:n.includes("Error")?[Vf,n]:[Jr,n]},Ar=([e,t])=>e===ci&&(t==="function"||t==="symbol"),yv=(e,t,n,r)=>{const i=(s,l)=>{const u=r.push(s)-1;return n.set(l,u),u},o=s=>{if(n.has(s))return n.get(s);let[l,u]=Hn(s);switch(l){case ci:{let c=s;switch(u){case"bigint":l=Hf,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([Nf],s)}return i([l,c],s)}case Qn:{if(u){let p=s;return u==="DataView"?p=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(s)),i([u,[...p]],s)}const c=[],h=i([l,c],s);for(const p of s)c.push(o(p));return h}case Jr:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],h=i([l,c],s);for(const p of xv(s))(e||!Ar(Hn(s[p])))&&c.push([o(p),o(s[p])]);return h}case zs:return i([l,s.toISOString()],s);case _s:{const{source:c,flags:h}=s;return i([l,{source:c,flags:h}],s)}case Ns:{const c=[],h=i([l,c],s);for(const[p,m]of s)(e||!(Ar(Hn(p))||Ar(Hn(m))))&&c.push([o(p),o(m)]);return h}case Vs:{const c=[],h=i([l,c],s);for(const p of s)(e||!Ar(Hn(p)))&&c.push(o(p));return h}}const{message:d}=s;return i([l,{name:u,message:d}],s)};return o},vc=(e,{json:t,lossy:n}={})=>{const r=[];return yv(!(t||n),!!t,new Map,r)(e),r},Qr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?bc(vc(e,t)):structuredClone(e):(e,t)=>bc(vc(e,t));function bv(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 vv(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function kv(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||bv,r=e.options.footnoteBackLabel||vv,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[u]);if(!d)continue;const c=e.all(d),h=String(d.identifier).toUpperCase(),p=An(h.toLowerCase());let m=0;const g=[],x=e.footnoteCounts.get(h);for(;x!==void 0&&++m<=x;){g.length>0&&g.push({type:"text",value:" "});let T=typeof n=="string"?n:n(u,m);typeof T=="string"&&(T={type:"text",value:T}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,m),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const T=y.children[y.children.length-1];T&&T.type==="text"?T.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...g)}else c.push(...g);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(d,b),l.push(b)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Qr(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
412
+ `}),i.jsx(jy,{location:"bottom",buttonText:t,declineButtonText:n,enableDeclineButton:r,disableStyles:!0,containerClasses:"medixdeck-cookie-banner",contentClasses:"medixdeck-cookie-content",buttonWrapperClasses:"medixdeck-cookie-buttons",ButtonComponent:d=>i.jsx(Ye,{variant:"solid",colorScheme:"blue",size:"sm",onClick:d.onClick,id:d.id,children:d.children}),...s,children:i.jsxs(f.Box,{children:[e&&i.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:1,fontFamily:"var(--font-heading)",children:e}),i.jsx(f.Text,{fontSize:"sm",color:"text.heading",lineHeight:"1.5",children:o||`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.`})]})})]})}mf.displayName="MedixCookieConsentBanner";const gf="medixdeck_pwa_dismissed",Ty=14,By=[.4,0,.2,1];function Ey(){if(typeof window>"u")return!1;const e=window.matchMedia("(display-mode: standalone)").matches,t=window.navigator.standalone===!0;return e||t}function Fy(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream}function Ay(e){if(typeof localStorage>"u")return!1;try{const t=localStorage.getItem(gf);if(!t)return!1;const n=e*24*60*60*1e3;return Date.now()-Number(t)<n}catch{return!1}}function Ly(){try{localStorage.setItem(gf,String(Date.now()))}catch{}}function Iy({size:e=18,color:t="#0685FF"}){return i.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),i.jsx("polyline",{points:"16 6 12 2 8 6"}),i.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function Dy(){return i.jsx(f.Box,{flexShrink:0,children:i.jsx(tn,{type:"icon",height:44})})}function xf({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:r="Not now",cooldownDays:o=Ty,onInstall:s,onDismiss:a,appName:l="this app",icon:u,position:c="bottom",delaySeconds:d=0,forceVisible:h,forceIOS:p}){const m=es(),[g,x]=S.useState(!1),[y,v]=S.useState(!1),j=S.useRef(null),w=S.useRef(null);S.useEffect(()=>{const A=()=>{d>0?w.current=setTimeout(()=>x(!0),d*1e3):x(!0)},E=()=>{w.current&&clearTimeout(w.current)};if(h)return p&&v(!0),A(),E;if(Ey()||Ay(o))return E;if(Fy())return v(!0),A(),E;const L=D=>{D.preventDefault(),j.current=D,A()};window.addEventListener("beforeinstallprompt",L);const R=()=>x(!1);return window.addEventListener("appinstalled",R),()=>{window.removeEventListener("beforeinstallprompt",L),window.removeEventListener("appinstalled",R),E()}},[o,d,h,p]);const F=S.useCallback(async()=>{if(j.current){try{await j.current.prompt(),(await j.current.userChoice).outcome==="accepted"&&(s==null||s())}catch{}j.current=null}x(!1)},[s]),B=S.useCallback(()=>{Ly(),x(!1),a==null||a()},[a]),C=m?"#152035":"#FFFFFF",P=m?"#1E3050":"#E4E8F0";return i.jsx(lr,{children:g&&i.jsx(tt.div,{initial:{opacity:0,y:c==="bottom"?80:-80,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:c==="bottom"?80:-80,x:"-50%"},transition:{duration:.35,ease:By},style:{position:"fixed",[c]:16,left:"50%",zIndex:1e4,width:"calc(100% - 32px)",maxWidth:480,pointerEvents:"auto"},children:i.jsx(f.Box,{borderRadius:"16px",p:{base:"4",md:"5"},style:{background:C,border:`1px solid ${P}`,boxShadow:"none"},children:i.jsxs(f.Flex,{gap:"4",align:"flex-start",children:[u??i.jsx(Dy,{}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsx(f.Text,{fontWeight:"700",fontSize:"md",color:"text.heading",fontFamily:"var(--font-heading)",mb:"1",children:e}),y?i.jsxs(f.Box,{children:[i.jsxs(f.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:["To install ",l,", tap the"," ",i.jsx("span",{style:{display:"inline-flex",verticalAlign:"middle",margin:"0 2px"},children:i.jsx(Iy,{size:16,color:m?"#70B6FF":"#0685FF"})})," ","Share button in Safari, then select"," ",i.jsx("span",{style:{fontWeight:700,color:m?"#F0F6FF":"#111926"},children:'"Add to Home Screen"'}),"."]}),i.jsx(f.Flex,{gap:"3",mb:"3",flexWrap:"wrap",children:[{step:"1",text:"Tap Share"},{step:"2",text:"Add to Home Screen"}].map(A=>i.jsxs(f.Flex,{align:"center",gap:"2",px:"3",py:"1.5",borderRadius:"8px",bg:"bg.subtle",children:[i.jsx(f.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"20px",h:"20px",borderRadius:"full",flexShrink:0,style:{background:"#0685FF",color:"#FFFFFF",fontSize:"11px",fontWeight:700,fontFamily:"var(--font-body)"},children:A.step}),i.jsx(f.Text,{fontSize:"xs",fontWeight:"600",color:"text.body",fontFamily:"var(--font-body)",children:A.text})]},A.step))})]}):i.jsx(f.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:t}),i.jsxs(f.Flex,{gap:"3",align:"center",children:[!y&&i.jsx(Ye,{variant:"solid",colorScheme:"blue",size:"sm",onClick:F,children:n}),i.jsx(Ye,{variant:"ghost",colorScheme:"gray",size:"sm",onClick:B,children:y?"Got it":r})]})]}),i.jsx(f.Box,{as:"button","aria-label":"Close install prompt",onClick:B,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:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})})})}xf.displayName="MedixPWAInstallPrompt";/*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */function $l(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ry(e){if(Array.isArray(e))return e}function My(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,a,l=[],u=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(u=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){c=!0,o=d}finally{try{if(!u&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function Py(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
413
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oy(e,t){return Ry(e)||My(e,t)||zy(e,t)||Py()}function zy(e,t){if(e){if(typeof e=="string")return $l(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$l(e,t):void 0}}const yf=Object.entries,Gl=Object.setPrototypeOf,_y=Object.isFrozen,Ny=Object.getPrototypeOf,Vy=Object.getOwnPropertyDescriptor;let Ue=Object.freeze,at=Object.seal,bn=Object.create,bf=typeof Reflect<"u"&&Reflect,Ni=bf.apply,Vi=bf.construct;Ue||(Ue=function(t){return t});at||(at=function(t){return t});Ni||(Ni=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];return t.apply(n,o)});Vi||(Vi=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const Gt=je(Array.prototype.forEach),Wy=je(Array.prototype.lastIndexOf),Yl=je(Array.prototype.pop),fn=je(Array.prototype.push),Hy=je(Array.prototype.splice),Ve=Array.isArray,Zn=je(String.prototype.toLowerCase),Uo=je(String.prototype.toString),Kl=je(String.prototype.match),hn=je(String.prototype.replace),ql=je(String.prototype.indexOf),Uy=je(String.prototype.trim),$y=je(Number.prototype.toString),Gy=je(Boolean.prototype.toString),Xl=typeof BigInt>"u"?null:je(BigInt.prototype.toString),Zl=typeof Symbol>"u"?null:je(Symbol.prototype.toString),ke=je(Object.prototype.hasOwnProperty),Wn=je(Object.prototype.toString),Me=je(RegExp.prototype.test),pn=Yy(TypeError);function je(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Ni(e,t,r)}}function Yy(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Vi(e,n)}}function ae(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zn;if(Gl&&Gl(e,null),!Ve(t))return e;let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const s=n(o);s!==o&&(_y(t)||(t[r]=s),o=s)}e[o]=!0}return e}function Ky(e){for(let t=0;t<e.length;t++)ke(e,t)||(e[t]=null);return e}function _e(e){const t=bn(null);for(const r of yf(e)){var n=Oy(r,2);const o=n[0],s=n[1];ke(e,o)&&(Ve(s)?t[o]=Ky(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=_e(s):t[o]=s)}return t}function qy(e){switch(typeof e){case"string":return e;case"number":return $y(e);case"boolean":return Gy(e);case"bigint":return Xl?Xl(e):"0";case"symbol":return Zl?Zl(e):"Symbol()";case"undefined":return Wn(e);case"function":case"object":{if(e===null)return Wn(e);const t=e,n=xt(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Wn(r)}return Wn(e)}default:return Wn(e)}}function xt(e,t){for(;e!==null;){const r=Vy(e,t);if(r){if(r.get)return je(r.get);if(typeof r.value=="function")return je(r.value)}e=Ny(e)}function n(){return null}return n}function Xy(e){try{return Me(e,""),!0}catch{return!1}}const Jl=Ue(["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"]),$o=Ue(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Go=Ue(["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"]),Zy=Ue(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Yo=Ue(["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"]),Jy=Ue(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ql=Ue(["#text"]),ec=Ue(["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"]),Ko=Ue(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","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","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","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","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),tc=Ue(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ir=Ue(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Qy=at(/{{[\w\W]*|^[\w\W]*}}/g),eb=at(/<%[\w\W]*|^[\w\W]*%>/g),tb=at(/\${[\w\W]*/g),nb=at(/^data-[\-\w.\u00B7-\uFFFF]+$/),rb=at(/^aria-[\-\w]+$/),nc=at(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ob=at(/^(?:\w+script|data):/i),ib=at(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sb=at(/^html$/i),ab=at(/^[a-z][.\w]*(-[.\w]+)+$/i),gt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},lb=function(){return typeof window>"u"?null:window},cb=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},rc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function vf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lb();const t=J=>vf(J);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==gt.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,o=r.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,l=e.Element,u=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,h=e.trustedTypes,p=l.prototype,m=xt(p,"cloneNode"),g=xt(p,"remove"),x=xt(p,"nextSibling"),y=xt(p,"childNodes"),v=xt(p,"parentNode"),j=xt(p,"shadowRoot"),w=xt(p,"attributes"),F=a&&a.prototype?xt(a.prototype,"nodeType"):null,B=a&&a.prototype?xt(a.prototype,"nodeName"):null;if(typeof s=="function"){const J=n.createElement("template");J.content&&J.content.ownerDocument&&(n=J.content.ownerDocument)}let C,P="",A=0;const E=function(k){if(A>0)throw pn('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');A++;try{return C.createHTML(k)}finally{A--}},L=n,R=L.implementation,D=L.createNodeIterator,N=L.createDocumentFragment,O=L.getElementsByTagName,I=r.importNode;let M=rc();t.isSupported=typeof yf=="function"&&typeof v=="function"&&R&&R.createHTMLDocument!==void 0;const H=Qy,W=eb,$=tb,b=nb,Y=rb,oe=ob,T=ib,ie=ab;let se=nc,X=null;const Z=ae({},[...Jl,...$o,...Go,...Yo,...Ql]);let Q=null;const ue=ae({},[...ec,...Ko,...tc,...Ir]);let ee=Object.seal(bn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ze=null,Ae=null;const Je=Object.seal(bn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let xr=!0,rn=!0,Mn=!1,Pn=!0,ht=!1,At=!0,pt=!1,On=!1,zn=!1,Lt=!1,on=!1,sn=!1,z=!0,G=!1;const ne="user-content-";let le=!0,de=!1,Le={},Ie=null;const Qe=ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let It=null;const Dt=ae({},["audio","video","img","source","image","track"]);let Re=null;const Bt=ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",yr="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml";let an=mt,yo=!1,bo=null;const lh=ae({},[$e,yr,mt],Uo);let vo=ae({},["mi","mo","mn","ms","mtext"]),ko=ae({},["annotation-xml"]);const ch=ae({},["title","style","font","a","script"]);let _n=null;const uh=["application/xhtml+xml","text/html"],dh="text/html";let we=null,ln=null;const fh=n.createElement("form"),Js=function(k){return k instanceof RegExp||k instanceof Function},wo=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ln&&ln===k)return;(!k||typeof k!="object")&&(k={}),k=_e(k),_n=uh.indexOf(k.PARSER_MEDIA_TYPE)===-1?dh:k.PARSER_MEDIA_TYPE,we=_n==="application/xhtml+xml"?Uo:Zn,X=ke(k,"ALLOWED_TAGS")&&Ve(k.ALLOWED_TAGS)?ae({},k.ALLOWED_TAGS,we):Z,Q=ke(k,"ALLOWED_ATTR")&&Ve(k.ALLOWED_ATTR)?ae({},k.ALLOWED_ATTR,we):ue,bo=ke(k,"ALLOWED_NAMESPACES")&&Ve(k.ALLOWED_NAMESPACES)?ae({},k.ALLOWED_NAMESPACES,Uo):lh,Re=ke(k,"ADD_URI_SAFE_ATTR")&&Ve(k.ADD_URI_SAFE_ATTR)?ae(_e(Bt),k.ADD_URI_SAFE_ATTR,we):Bt,It=ke(k,"ADD_DATA_URI_TAGS")&&Ve(k.ADD_DATA_URI_TAGS)?ae(_e(Dt),k.ADD_DATA_URI_TAGS,we):Dt,Ie=ke(k,"FORBID_CONTENTS")&&Ve(k.FORBID_CONTENTS)?ae({},k.FORBID_CONTENTS,we):Qe,ze=ke(k,"FORBID_TAGS")&&Ve(k.FORBID_TAGS)?ae({},k.FORBID_TAGS,we):_e({}),Ae=ke(k,"FORBID_ATTR")&&Ve(k.FORBID_ATTR)?ae({},k.FORBID_ATTR,we):_e({}),Le=ke(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?_e(k.USE_PROFILES):k.USE_PROFILES:!1,xr=k.ALLOW_ARIA_ATTR!==!1,rn=k.ALLOW_DATA_ATTR!==!1,Mn=k.ALLOW_UNKNOWN_PROTOCOLS||!1,Pn=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ht=k.SAFE_FOR_TEMPLATES||!1,At=k.SAFE_FOR_XML!==!1,pt=k.WHOLE_DOCUMENT||!1,Lt=k.RETURN_DOM||!1,on=k.RETURN_DOM_FRAGMENT||!1,sn=k.RETURN_TRUSTED_TYPE||!1,zn=k.FORCE_BODY||!1,z=k.SANITIZE_DOM!==!1,G=k.SANITIZE_NAMED_PROPS||!1,le=k.KEEP_CONTENT!==!1,de=k.IN_PLACE||!1,se=Xy(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:nc,an=typeof k.NAMESPACE=="string"?k.NAMESPACE:mt,vo=ke(k,"MATHML_TEXT_INTEGRATION_POINTS")&&k.MATHML_TEXT_INTEGRATION_POINTS&&typeof k.MATHML_TEXT_INTEGRATION_POINTS=="object"?_e(k.MATHML_TEXT_INTEGRATION_POINTS):ae({},["mi","mo","mn","ms","mtext"]),ko=ke(k,"HTML_INTEGRATION_POINTS")&&k.HTML_INTEGRATION_POINTS&&typeof k.HTML_INTEGRATION_POINTS=="object"?_e(k.HTML_INTEGRATION_POINTS):ae({},["annotation-xml"]);const _=ke(k,"CUSTOM_ELEMENT_HANDLING")&&k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING=="object"?_e(k.CUSTOM_ELEMENT_HANDLING):bn(null);if(ee=bn(null),ke(_,"tagNameCheck")&&Js(_.tagNameCheck)&&(ee.tagNameCheck=_.tagNameCheck),ke(_,"attributeNameCheck")&&Js(_.attributeNameCheck)&&(ee.attributeNameCheck=_.attributeNameCheck),ke(_,"allowCustomizedBuiltInElements")&&typeof _.allowCustomizedBuiltInElements=="boolean"&&(ee.allowCustomizedBuiltInElements=_.allowCustomizedBuiltInElements),ht&&(rn=!1),on&&(Lt=!0),Le&&(X=ae({},Ql),Q=bn(null),Le.html===!0&&(ae(X,Jl),ae(Q,ec)),Le.svg===!0&&(ae(X,$o),ae(Q,Ko),ae(Q,Ir)),Le.svgFilters===!0&&(ae(X,Go),ae(Q,Ko),ae(Q,Ir)),Le.mathMl===!0&&(ae(X,Yo),ae(Q,tc),ae(Q,Ir))),Je.tagCheck=null,Je.attributeCheck=null,ke(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?Je.tagCheck=k.ADD_TAGS:Ve(k.ADD_TAGS)&&(X===Z&&(X=_e(X)),ae(X,k.ADD_TAGS,we))),ke(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?Je.attributeCheck=k.ADD_ATTR:Ve(k.ADD_ATTR)&&(Q===ue&&(Q=_e(Q)),ae(Q,k.ADD_ATTR,we))),ke(k,"ADD_URI_SAFE_ATTR")&&Ve(k.ADD_URI_SAFE_ATTR)&&ae(Re,k.ADD_URI_SAFE_ATTR,we),ke(k,"FORBID_CONTENTS")&&Ve(k.FORBID_CONTENTS)&&(Ie===Qe&&(Ie=_e(Ie)),ae(Ie,k.FORBID_CONTENTS,we)),ke(k,"ADD_FORBID_CONTENTS")&&Ve(k.ADD_FORBID_CONTENTS)&&(Ie===Qe&&(Ie=_e(Ie)),ae(Ie,k.ADD_FORBID_CONTENTS,we)),le&&(X["#text"]=!0),pt&&ae(X,["html","head","body"]),X.table&&(ae(X,["tbody"]),delete ze.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw pn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const K=C;C=k.TRUSTED_TYPES_POLICY;try{P=E("")}catch(fe){throw C=K,fe}}else C===void 0&&k.TRUSTED_TYPES_POLICY!==null&&(C=cb(h,o)),C&&typeof P=="string"&&(P=E(""));(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&X===Z&&(X=_e(X)),M.uponSanitizeAttribute.length>0&&Q===ue&&(Q=_e(Q)),Ue&&Ue(k),ln=k},Qs=ae({},[...$o,...Go,...Zy]),ea=ae({},[...Yo,...Jy]),hh=function(k){let _=v(k);(!_||!_.tagName)&&(_={namespaceURI:an,tagName:"template"});const K=Zn(k.tagName),fe=Zn(_.tagName);return bo[k.namespaceURI]?k.namespaceURI===yr?_.namespaceURI===mt?K==="svg":_.namespaceURI===$e?K==="svg"&&(fe==="annotation-xml"||vo[fe]):!!Qs[K]:k.namespaceURI===$e?_.namespaceURI===mt?K==="math":_.namespaceURI===yr?K==="math"&&ko[fe]:!!ea[K]:k.namespaceURI===mt?_.namespaceURI===yr&&!ko[fe]||_.namespaceURI===$e&&!vo[fe]?!1:!ea[K]&&(ch[K]||!Qs[K]):!!(_n==="application/xhtml+xml"&&bo[k.namespaceURI]):!1},lt=function(k){fn(t.removed,{element:k});try{v(k).removeChild(k)}catch{g(k)}},Wt=function(k,_){try{fn(t.removed,{attribute:_.getAttributeNode(k),from:_})}catch{fn(t.removed,{attribute:null,from:_})}if(_.removeAttribute(k),k==="is")if(Lt||on)try{lt(_)}catch{}else try{_.setAttribute(k,"")}catch{}},ta=function(k){let _=null,K=null;if(zn)k="<remove></remove>"+k;else{const pe=Kl(k,/^[\r\n\t ]+/);K=pe&&pe[0]}_n==="application/xhtml+xml"&&an===mt&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const fe=C?E(k):k;if(an===mt)try{_=new d().parseFromString(fe,_n)}catch{}if(!_||!_.documentElement){_=R.createDocument(an,"template",null);try{_.documentElement.innerHTML=yo?P:fe}catch{}}const ce=_.body||_.documentElement;return k&&K&&ce.insertBefore(n.createTextNode(K),ce.childNodes[0]||null),an===mt?O.call(_,pt?"html":"body")[0]:pt?_.documentElement:ce},na=function(k){return D.call(k.ownerDocument||k,k,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},So=function(k){var _,K;k.normalize();const fe=D.call(k.ownerDocument||k,k,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let ce=fe.nextNode();for(;ce;){let Be=ce.data;Gt([H,W,$],rt=>{Be=hn(Be,rt," ")}),ce.data=Be,ce=fe.nextNode()}const pe=(_=(K=k.querySelectorAll)===null||K===void 0?void 0:K.call(k,"template"))!==null&&_!==void 0?_:[];Gt(Array.from(pe),Be=>{cn(Be.content)&&So(Be.content)})},br=function(k){const _=B?B(k):null;return typeof _!="string"||we(_)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==w(k)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==F(k)||k.childNodes!==y(k)},cn=function(k){if(!F||typeof k!="object"||k===null)return!1;try{return F(k)===gt.documentFragment}catch{return!1}},vr=function(k){if(!F||typeof k!="object"||k===null)return!1;try{return typeof F(k)=="number"}catch{return!1}};function Et(J,k,_){Gt(J,K=>{K.call(t,k,_,ln)})}const ra=function(k){let _=null;if(Et(M.beforeSanitizeElements,k,null),br(k))return lt(k),!0;const K=we(B?B(k):k.nodeName);if(Et(M.uponSanitizeElement,k,{tagName:K,allowedTags:X}),At&&k.hasChildNodes()&&!vr(k.firstElementChild)&&Me(/<[/\w!]/g,k.innerHTML)&&Me(/<[/\w!]/g,k.textContent)||At&&k.namespaceURI===mt&&K==="style"&&vr(k.firstElementChild)||k.nodeType===gt.progressingInstruction||At&&k.nodeType===gt.comment&&Me(/<[/\w]/g,k.data))return lt(k),!0;if(ze[K]||!(Je.tagCheck instanceof Function&&Je.tagCheck(K))&&!X[K]){if(!ze[K]&&ia(K)&&(ee.tagNameCheck instanceof RegExp&&Me(ee.tagNameCheck,K)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(K)))return!1;if(le&&!Ie[K]){const ce=v(k),pe=y(k);if(pe&&ce){const Be=pe.length;for(let rt=Be-1;rt>=0;--rt){const ct=m(pe[rt],!0);ce.insertBefore(ct,x(k))}}}return lt(k),!0}return(F?F(k):k.nodeType)===gt.element&&!hh(k)||(K==="noscript"||K==="noembed"||K==="noframes")&&Me(/<\/no(script|embed|frames)/i,k.innerHTML)?(lt(k),!0):(ht&&k.nodeType===gt.text&&(_=k.textContent,Gt([H,W,$],ce=>{_=hn(_,ce," ")}),k.textContent!==_&&(fn(t.removed,{element:k.cloneNode()}),k.textContent=_)),Et(M.afterSanitizeElements,k,null),!1)},oa=function(k,_,K){if(Ae[_]||z&&(_==="id"||_==="name")&&(K in n||K in fh))return!1;const fe=Q[_]||Je.attributeCheck instanceof Function&&Je.attributeCheck(_,k);if(!(rn&&!Ae[_]&&Me(b,_))){if(!(xr&&Me(Y,_))){if(!fe||Ae[_]){if(!(ia(k)&&(ee.tagNameCheck instanceof RegExp&&Me(ee.tagNameCheck,k)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(k))&&(ee.attributeNameCheck instanceof RegExp&&Me(ee.attributeNameCheck,_)||ee.attributeNameCheck instanceof Function&&ee.attributeNameCheck(_,k))||_==="is"&&ee.allowCustomizedBuiltInElements&&(ee.tagNameCheck instanceof RegExp&&Me(ee.tagNameCheck,K)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(K))))return!1}else if(!Re[_]){if(!Me(se,hn(K,T,""))){if(!((_==="src"||_==="xlink:href"||_==="href")&&k!=="script"&&ql(K,"data:")===0&&It[k])){if(!(Mn&&!Me(oe,hn(K,T,"")))){if(K)return!1}}}}}}return!0},ph=ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ia=function(k){return!ph[Zn(k)]&&Me(ie,k)},sa=function(k){Et(M.beforeSanitizeAttributes,k,null);const _=k.attributes;if(!_||br(k))return;const K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let fe=_.length;for(;fe--;){const ce=_[fe],pe=ce.name,Be=ce.namespaceURI,rt=ce.value,ct=we(pe),Co=rt;let De=pe==="value"?Co:Uy(Co);if(K.attrName=ct,K.attrValue=De,K.keepAttr=!0,K.forceKeepAttr=void 0,Et(M.uponSanitizeAttribute,k,K),De=K.attrValue,G&&(ct==="id"||ct==="name")&&ql(De,ne)!==0&&(Wt(pe,k),De=ne+De),At&&Me(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,De)){Wt(pe,k);continue}if(ct==="attributename"&&Kl(De,"href")){Wt(pe,k);continue}if(K.forceKeepAttr)continue;if(!K.keepAttr){Wt(pe,k);continue}if(!Pn&&Me(/\/>/i,De)){Wt(pe,k);continue}ht&&Gt([H,W,$],la=>{De=hn(De,la," ")});const aa=we(k.nodeName);if(!oa(aa,ct,De)){Wt(pe,k);continue}if(C&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Be)switch(h.getAttributeType(aa,ct)){case"TrustedHTML":{De=E(De);break}case"TrustedScriptURL":{De=C.createScriptURL(De);break}}if(De!==Co)try{Be?k.setAttributeNS(Be,pe,De):k.setAttribute(pe,De),br(k)?lt(k):Yl(t.removed)}catch{Wt(pe,k)}}Et(M.afterSanitizeAttributes,k,null)},kr=function(k){let _=null;const K=na(k);for(Et(M.beforeSanitizeShadowDOM,k,null);_=K.nextNode();)if(Et(M.uponSanitizeShadowNode,_,null),ra(_),sa(_),cn(_.content)&&kr(_.content),(F?F(_):_.nodeType)===gt.element){const ce=j?j(_):_.shadowRoot;cn(ce)&&(un(ce),kr(ce))}Et(M.afterSanitizeShadowDOM,k,null)},un=function(k){const _=F?F(k):k.nodeType;if(_===gt.element){const ce=j?j(k):k.shadowRoot;cn(ce)&&(un(ce),kr(ce))}const K=y?y(k):k.childNodes;if(!K)return;const fe=[];Gt(K,ce=>{fn(fe,ce)});for(const ce of fe)un(ce);if(_===gt.element){const ce=B?B(k):null;if(typeof ce=="string"&&we(ce)==="template"){const pe=k.content;cn(pe)&&un(pe)}}};return t.sanitize=function(J){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,K=null,fe=null,ce=null;if(yo=!J,yo&&(J="<!-->"),typeof J!="string"&&!vr(J)&&(J=qy(J),typeof J!="string"))throw pn("dirty is not a string, aborting");if(!t.isSupported)return J;if(On||wo(k),t.removed=[],typeof J=="string"&&(de=!1),de){const rt=B?B(J):J.nodeName;if(typeof rt=="string"){const ct=we(rt);if(!X[ct]||ze[ct])throw pn("root node is forbidden and cannot be sanitized in-place")}if(br(J))throw pn("root node is clobbered and cannot be sanitized in-place");un(J)}else if(vr(J))_=ta("<!---->"),K=_.ownerDocument.importNode(J,!0),K.nodeType===gt.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?_=K:_.appendChild(K),un(K);else{if(!Lt&&!ht&&!pt&&J.indexOf("<")===-1)return C&&sn?E(J):J;if(_=ta(J),!_)return Lt?null:sn?P:""}_&&zn&&lt(_.firstChild);const pe=na(de?J:_);for(;fe=pe.nextNode();)ra(fe),sa(fe),cn(fe.content)&&kr(fe.content);if(de)return ht&&So(J),J;if(Lt){if(ht&&So(_),on)for(ce=N.call(_.ownerDocument);_.firstChild;)ce.appendChild(_.firstChild);else ce=_;return(Q.shadowroot||Q.shadowrootmode)&&(ce=I.call(r,ce,!0)),ce}let Be=pt?_.outerHTML:_.innerHTML;return pt&&X["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&Me(sb,_.ownerDocument.doctype.name)&&(Be="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
414
+ `+Be),ht&&Gt([H,W,$],rt=>{Be=hn(Be,rt," ")}),C&&sn?E(Be):Be},t.setConfig=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wo(J),On=!0},t.clearConfig=function(){ln=null,On=!1},t.isValidAttribute=function(J,k,_){ln||wo({});const K=we(J),fe=we(k);return oa(K,fe,_)},t.addHook=function(J,k){typeof k=="function"&&fn(M[J],k)},t.removeHook=function(J,k){if(k!==void 0){const _=Wy(M[J],k);return _===-1?void 0:Hy(M[J],_,1)[0]}return Yl(M[J])},t.removeHooks=function(J){M[J]=[]},t.removeAllHooks=function(){M=rc()},t}var Te=vf(),ub=Te;Te.sanitize.bind(Te);Te.isSupported;Te.addHook.bind(Te);Te.removeHook.bind(Te);Te.removeHooks.bind(Te);Te.removeAllHooks.bind(Te);Te.setConfig.bind(Te);Te.clearConfig.bind(Te);Te.isValidAttribute.bind(Te);Te.version;Te.removed;function db(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const fb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pb={};function oc(e,t){return(pb.jsx?hb:fb).test(e)}const mb=/[ \t\n\f\r]/g;function gb(e){return typeof e=="object"?e.type==="text"?ic(e.value):!1:ic(e)}function ic(e){return e.replace(mb,"")===""}class mr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}mr.prototype.normal={};mr.prototype.property={};mr.prototype.space=void 0;function kf(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new mr(n,r,t)}function Wi(e){return e.toLowerCase()}class Xe{constructor(t,n){this.attribute=n,this.property=t}}Xe.prototype.attribute="";Xe.prototype.booleanish=!1;Xe.prototype.boolean=!1;Xe.prototype.commaOrSpaceSeparated=!1;Xe.prototype.commaSeparated=!1;Xe.prototype.defined=!1;Xe.prototype.mustUseProperty=!1;Xe.prototype.number=!1;Xe.prototype.overloadedBoolean=!1;Xe.prototype.property="";Xe.prototype.spaceSeparated=!1;Xe.prototype.space=void 0;let xb=0;const re=nn(),Se=nn(),Hi=nn(),U=nn(),me=nn(),en=nn(),et=nn();function nn(){return 2**++xb}const Ui=Object.freeze(Object.defineProperty({__proto__:null,boolean:re,booleanish:Se,commaOrSpaceSeparated:et,commaSeparated:en,number:U,overloadedBoolean:Hi,spaceSeparated:me},Symbol.toStringTag,{value:"Module"})),qo=Object.keys(Ui);class zs extends Xe{constructor(t,n,r,o){let s=-1;if(super(t,n),sc(this,"space",o),typeof r=="number")for(;++s<qo.length;){const a=qo[s];sc(this,qo[s],(r&Ui[a])===Ui[a])}}}zs.prototype.defined=!0;function sc(e,t,n){n&&(e[t]=n)}function Dn(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const s=new zs(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Wi(r)]=r,n[Wi(s.attribute)]=r}return new mr(t,n,e.space)}const wf=Dn({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:me,ariaCurrent:null,ariaDescribedBy:me,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:me,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:me,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:me,ariaLevel:U,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:me,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:me,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Se,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sf(e,t){return t in e?e[t]:t}function Cf(e,t){return Sf(e,t.toLowerCase())}const yb=Dn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:en,acceptCharset:me,accessKey:me,action:null,allow:null,allowFullScreen:re,allowPaymentRequest:re,allowUserMedia:re,alpha:re,alt:null,as:null,async:re,autoCapitalize:null,autoComplete:me,autoFocus:re,autoPlay:re,blocking:me,capture:null,charSet:null,checked:re,cite:null,className:me,closedBy:null,colorSpace:null,cols:U,colSpan:U,command:null,commandFor:null,content:null,contentEditable:Se,controls:re,controlsList:me,coords:U|en,crossOrigin:null,data:null,dateTime:null,decoding:null,default:re,defer:re,dir:null,dirName:null,disabled:re,download:Hi,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:re,formTarget:null,headers:me,height:U,hidden:Hi,high:U,href:null,hrefLang:null,htmlFor:me,httpEquiv:me,id:null,imageSizes:null,imageSrcSet:null,inert:re,inputMode:null,integrity:null,is:null,isMap:re,itemId:null,itemProp:me,itemRef:me,itemScope:re,itemType:me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:re,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:re,muted:re,name:null,nonce:null,noModule:re,noValidate:re,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:re,optimum:U,pattern:null,ping:me,placeholder:null,playsInline:re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:re,referrerPolicy:null,rel:me,required:re,reversed:re,rows:U,rowSpan:U,sandbox:me,scope:null,scoped:re,seamless:re,selected:re,shadowRootClonable:re,shadowRootCustomElementRegistry:re,shadowRootDelegatesFocus:re,shadowRootMode:null,shadowRootSerializable:re,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:re,useMap:null,value:Se,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:me,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:re,declare:re,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:re,noHref:re,noShade:re,noWrap:re,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:re,disablePictureInPicture:re,disableRemotePlayback:re,exportParts:en,part:me,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:Cf}),bb=Dn({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:et,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:me,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:re,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:en,g2:en,glyphName:en,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,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:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:et,rev:et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:et,requiredFeatures:et,requiredFonts:et,requiredFormats:et,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:et,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sf}),jf=Dn({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()}}),Tf=Dn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Cf}),Bf=Dn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),vb={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"},kb=/[A-Z]/g,ac=/-[a-z]/g,wb=/^data[-\w.:]+$/i;function Sb(e,t){const n=Wi(t);let r=t,o=Xe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(ac,jb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!ac.test(s)){let a=s.replace(kb,Cb);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=zs}return new o(r,t)}function Cb(e){return"-"+e.toLowerCase()}function jb(e){return e.charAt(1).toUpperCase()}const Tb=kf([wf,yb,jf,Tf,Bf],"html"),_s=kf([wf,bb,jf,Tf,Bf],"svg");function Bb(e){return e.join(" ").trim()}function Ef(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mn={},Xo,lc;function Eb(){if(lc)return Xo;lc=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
415
+ `,c="/",d="*",h="",p="comment",m="declaration";function g(y,v){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];v=v||{};var j=1,w=1;function F(O){var I=O.match(t);I&&(j+=I.length);var M=O.lastIndexOf(u);w=~M?O.length-M:w+O.length}function B(){var O={line:j,column:w};return function(I){return I.position=new C(O),E(),I}}function C(O){this.start=O,this.end={line:j,column:w},this.source=v.source}C.prototype.content=y;function P(O){var I=new Error(v.source+":"+j+":"+w+": "+O);if(I.reason=O,I.filename=v.source,I.line=j,I.column=w,I.source=y,!v.silent)throw I}function A(O){var I=O.exec(y);if(I){var M=I[0];return F(M),y=y.slice(M.length),I}}function E(){A(n)}function L(O){var I;for(O=O||[];I=R();)I!==!1&&O.push(I);return O}function R(){var O=B();if(!(c!=y.charAt(0)||d!=y.charAt(1))){for(var I=2;h!=y.charAt(I)&&(d!=y.charAt(I)||c!=y.charAt(I+1));)++I;if(I+=2,h===y.charAt(I-1))return P("End of comment missing");var M=y.slice(2,I-2);return w+=2,F(M),y=y.slice(I),w+=2,O({type:p,comment:M})}}function D(){var O=B(),I=A(r);if(I){if(R(),!A(o))return P("property missing ':'");var M=A(s),H=O({type:m,property:x(I[0].replace(e,h)),value:M?x(M[0].replace(e,h)):h});return A(a),H}}function N(){var O=[];L(O);for(var I;I=D();)I!==!1&&(O.push(I),L(O));return O}return E(),N()}function x(y){return y?y.replace(l,h):h}return Xo=g,Xo}var cc;function Fb(){if(cc)return mn;cc=1;var e=mn&&mn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mn,"__esModule",{value:!0}),mn.default=n;const t=e(Eb());function n(r,o){let s=null;if(!r||typeof r!="string")return s;const a=(0,t.default)(r),l=typeof o=="function";return a.forEach(u=>{if(u.type!=="declaration")return;const{property:c,value:d}=u;l?o(c,d,u):d&&(s=s||{},s[c]=d)}),s}return mn}var Hn={},uc;function Ab(){if(uc)return Hn;uc=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(c){return!c||n.test(c)||e.test(c)},a=function(c,d){return d.toUpperCase()},l=function(c,d){return"".concat(d,"-")},u=function(c,d){return d===void 0&&(d={}),s(c)?c:(c=c.toLowerCase(),d.reactCompat?c=c.replace(o,l):c=c.replace(r,l),c.replace(t,a))};return Hn.camelCase=u,Hn}var Un,dc;function Lb(){if(dc)return Un;dc=1;var e=Un&&Un.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Fb()),n=Ab();function r(o,s){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(l,u){l&&u&&(a[(0,n.camelCase)(l,s)]=u)}),a}return r.default=r,Un=r,Un}var Ib=Lb();const Db=Ef(Ib),Ff=Af("end"),Ns=Af("start");function Af(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Rb(e){const t=Ns(e),n=Ff(e);if(t&&n)return{start:t,end:n}}function tr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fc(e.position):"start"in e||"end"in e?fc(e):"line"in e||"column"in e?$i(e):""}function $i(e){return hc(e&&e.line)+":"+hc(e&&e.column)}function fc(e){return $i(e&&e.start)+"-"+$i(e&&e.end)}function hc(e){return e&&typeof e=="number"?e:1}class Ne extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?o=t:!s.cause&&t&&(a=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=l?l.line:void 0,this.name=tr(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ne.prototype.file="";Ne.prototype.name="";Ne.prototype.reason="";Ne.prototype.message="";Ne.prototype.stack="";Ne.prototype.column=void 0;Ne.prototype.line=void 0;Ne.prototype.ancestors=void 0;Ne.prototype.cause=void 0;Ne.prototype.fatal=void 0;Ne.prototype.place=void 0;Ne.prototype.ruleId=void 0;Ne.prototype.source=void 0;const Vs={}.hasOwnProperty,Mb=new Map,Pb=/[A-Z]/g,Ob=new Set(["table","tbody","thead","tfoot","tr"]),zb=new Set(["td","th"]),Lf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _b(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Yb(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");r=Gb(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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"?_s:Tb,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=If(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function If(e,t,n){if(t.type==="element")return Nb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Vb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Hb(e,t,n);if(t.type==="mdxjsEsm")return Wb(e,t);if(t.type==="root")return Ub(e,t,n);if(t.type==="text")return $b(e,t)}function Nb(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=_s,e.schema=o),e.ancestors.push(t);const s=Rf(e,t.tagName,!1),a=Kb(e,t);let l=Hs(e,t);return Ob.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!gb(u):!0})),Df(e,a,s,t),Ws(a,l),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Vb(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}cr(e,t.position)}function Wb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cr(e,t.position)}function Hb(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=_s,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:Rf(e,t.name,!0),a=qb(e,t),l=Hs(e,t);return Df(e,a,s,t),Ws(a,l),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Ub(e,t,n){const r={};return Ws(r,Hs(e,t)),e.create(t,e.Fragment,r,n)}function $b(e,t){return t.value}function Df(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ws(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Gb(e,t,n){return r;function r(o,s,a,l){const c=Array.isArray(a.children)?n:t;return l?c(s,a,l):c(s,a)}}function Yb(e,t){return n;function n(r,o,s,a){const l=Array.isArray(s.children),u=Ns(r);return t(o,s,a,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Kb(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Vs.call(t.properties,o)){const s=Xb(e,o,t.properties[o]);if(s){const[a,l]=s;e.tableCellAlignToStyle&&a==="align"&&typeof l=="string"&&zb.has(t.tagName)?r=l:n[a]=l}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function qb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const l=a.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else cr(e,t.position);else{const o=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,s=e.evaluater.evaluateExpression(l.expression)}else cr(e,t.position);else s=r.value===null?!0:r.value;n[o]=s}return n}function Hs(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Mb;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const c=o.get(u)||0;a=u+"-"+c,o.set(u,c+1)}}const l=If(e,s,a);l!==void 0&&n.push(l)}return n}function Xb(e,t,n){const r=Sb(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?db(n):Bb(n)),r.property==="style"){let o=typeof n=="object"?n:Zb(e,String(n));return e.stylePropertyNameCase==="css"&&(o=Jb(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?vb[r.property]||r.property:r.attribute,n]}}function Zb(e,t){try{return Db(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Ne("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Lf+"#cannot-parse-style-attribute",o}}function Rf(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,a;for(;++s<o.length;){const l=oc(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};a=a?{type:"MemberExpression",object:a,property:l,computed:!!(s&&l.type==="Literal"),optional:!1}:l}r=a}else r=oc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Vs.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);cr(e)}function cr(e,t){const n=new Ne("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=Lf+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Jb(e){const t={};let n;for(n in e)Vs.call(e,n)&&(t[Qb(n)]=e[n]);return t}function Qb(e){let t=e.replace(Pb,e5);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function e5(e){return"-"+e.toLowerCase()}const Zo={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"]},t5={};function n5(e,t){const n=t5,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Mf(e,r,o)}function Mf(e,t,n){if(r5(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 pc(e.children,t,n)}return Array.isArray(e)?pc(e,t,n):""}function pc(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Mf(e[o],t,n);return r.join("")}function r5(e){return!!(e&&typeof e=="object")}const mc=document.createElement("i");function Us(e){const t="&"+e+";";mc.innerHTML=t;const n=mc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Tt(e,t,n,r){const o=e.length;let s=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function ot(e,t){return e.length>0?(Tt(e,e.length,0,t),e):t}const gc={}.hasOwnProperty;function o5(e){const t={};let n=-1;for(;++n<e.length;)i5(t,e[n]);return t}function i5(e,t){let n;for(n in t){const o=(gc.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){gc.call(o,a)||(o[a]=[]);const l=s[a];s5(o[a],Array.isArray(l)?l:l?[l]:[])}}}function s5(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Tt(e,0,0,r)}function Pf(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 Tn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wt=Vt(/[A-Za-z]/),nt=Vt(/[\dA-Za-z]/),a5=Vt(/[#-'*+\--9=?A-Z^-~]/);function Gi(e){return e!==null&&(e<32||e===127)}const Yi=Vt(/\d/),l5=Vt(/[\dA-Fa-f]/),c5=Vt(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function qe(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const u5=Vt(new RegExp("\\p{P}|\\p{S}","u")),d5=Vt(/\s/);function Vt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Rn(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&nt(e.charCodeAt(n+1))&&nt(e.charCodeAt(n+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const l=e.charCodeAt(n+1);s<56320&&l>56319&&l<57344?(a=String.fromCharCode(s,l),o=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function xe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(u){return he(u)?(e.enter(n),l(u)):t(u)}function l(u){return he(u)&&s++<o?(e.consume(u),l):(e.exit(n),t(u))}}const f5={tokenize:h5};function h5(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),xe(e,t,"linePrefix")}function o(l){return e.enter("paragraph"),s(l)}function s(l){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(l)}function a(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return te(l)?(e.consume(l),e.exit("chunkText"),s):(e.consume(l),a)}}const p5={tokenize:m5},xc={tokenize:g5};function m5(e){const t=this,n=[];let r=0,o,s,a;return l;function l(w){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,u,c)(w)}return c(w)}function u(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&j();const F=t.events.length;let B=F,C;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){C=t.events[B][1].end;break}v(r);let P=F;for(;P<t.events.length;)t.events[P][1].end={...C},P++;return Tt(t.events,B+1,0,t.events.slice(F)),t.events.length=P,c(w)}return l(w)}function c(w){if(r===n.length){if(!o)return p(w);if(o.currentConstruct&&o.currentConstruct.concrete)return g(w);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xc,d,h)(w)}function d(w){return o&&j(),v(r),p(w)}function h(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(w)}function p(w){return t.containerState={},e.attempt(xc,m,g)(w)}function m(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function g(w){if(w===null){o&&j(),v(0),e.consume(w);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),x(w)}function x(w){if(w===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(w);return}return te(w)?(e.consume(w),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),x)}function y(w,F){const B=t.sliceStream(w);if(F&&B.push(null),w.previous=s,s&&(s.next=w),s=w,o.defineSkip(w.start),o.write(B),t.parser.lazy[w.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<a&&(!o.events[C][1].end||o.events[C][1].end.offset>a))return;const P=t.events.length;let A=P,E,L;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(E){L=t.events[A][1].end;break}E=!0}for(v(r),C=P;C<t.events.length;)t.events[C][1].end={...L},C++;Tt(t.events,A+1,0,t.events.slice(P)),t.events.length=C}}function v(w){let F=n.length;for(;F-- >w;){const B=n[F];t.containerState=B[1],B[0].exit.call(t,e)}n.length=w}function j(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function g5(e,t,n){return xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function yc(e){if(e===null||qe(e)||d5(e))return 1;if(u5(e))return 2}function $s(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Ki={name:"attention",resolveAll:x5,tokenize:y5};function x5(e,t){let n=-1,r,o,s,a,l,u,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};bc(h,-u),bc(p,u),a={type:u>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},s={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:u>1?"strong":"emphasis",start:{...a.start},end:{...l.end}},e[r][1].end={...a.start},e[n][1].start={...l.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ot(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ot(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=ot(c,$s(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=ot(c,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=ot(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Tt(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function y5(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=yc(r);let s;return a;function a(u){return s=u,e.enter("attentionSequence"),l(u)}function l(u){if(u===s)return e.consume(u),l;const c=e.exit("attentionSequence"),d=yc(u),h=!d||d===2&&o||n.includes(u),p=!o||o===2&&d||n.includes(r);return c._open=!!(s===42?h:h&&(o||!p)),c._close=!!(s===42?p:p&&(d||!h)),t(u)}}function bc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const b5={name:"autolink",tokenize:v5};function v5(e,t,n){let r=0;return o;function o(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(m){return wt(m)?(e.consume(m),a):m===64?n(m):c(m)}function a(m){return m===43||m===45||m===46||nt(m)?(r=1,l(m)):c(m)}function l(m){return m===58?(e.consume(m),r=0,u):(m===43||m===45||m===46||nt(m))&&r++<32?(e.consume(m),l):(r=0,c(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Gi(m)?n(m):(e.consume(m),u)}function c(m){return m===64?(e.consume(m),d):a5(m)?(e.consume(m),c):n(m)}function d(m){return nt(m)?h(m):n(m)}function h(m){return m===46?(e.consume(m),r=0,d):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||nt(m))&&r++<63){const g=m===45?p:h;return e.consume(m),g}return n(m)}}const mo={partial:!0,tokenize:k5};function k5(e,t,n){return r;function r(s){return he(s)?xe(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||te(s)?t(s):n(s)}}const Of={continuation:{tokenize:S5},exit:C5,name:"blockQuote",tokenize:w5};function w5(e,t,n){const r=this;return o;function o(a){if(a===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return he(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function S5(e,t,n){const r=this;return o;function o(a){return he(a)?xe(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Of,t,n)(a)}}function C5(e){e.exit("blockQuote")}const zf={name:"characterEscape",tokenize:j5};function j5(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return c5(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const _f={name:"characterReference",tokenize:T5};function T5(e,t,n){const r=this;let o=0,s,a;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=nt,d(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=l5,d):(e.enter("characterReferenceValue"),s=7,a=Yi,d(h))}function d(h){if(h===59&&o){const p=e.exit("characterReferenceValue");return a===nt&&!Us(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&o++<s?(e.consume(h),d):n(h)}}const vc={partial:!0,tokenize:E5},kc={concrete:!0,name:"codeFenced",tokenize:B5};function B5(e,t,n){const r=this,o={partial:!0,tokenize:B};let s=0,a=0,l;return u;function u(C){return c(C)}function c(C){const P=r.events[r.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,l=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===l?(a++,e.consume(C),d):a<3?n(C):(e.exit("codeFencedFenceSequence"),he(C)?xe(e,h,"whitespace")(C):h(C))}function h(C){return C===null||te(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(vc,x,F)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(C)):he(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,m,"whitespace")(C)):C===96&&C===l?n(C):(e.consume(C),p)}function m(C){return C===null||te(C)?h(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(C)):C===96&&C===l?n(C):(e.consume(C),g)}function x(C){return e.attempt(o,F,y)(C)}function y(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),v}function v(C){return s>0&&he(C)?xe(e,j,"linePrefix",s+1)(C):j(C)}function j(C){return C===null||te(C)?e.check(vc,x,F)(C):(e.enter("codeFlowValue"),w(C))}function w(C){return C===null||te(C)?(e.exit("codeFlowValue"),j(C)):(e.consume(C),w)}function F(C){return e.exit("codeFenced"),t(C)}function B(C,P,A){let E=0;return L;function L(I){return C.enter("lineEnding"),C.consume(I),C.exit("lineEnding"),R}function R(I){return C.enter("codeFencedFence"),he(I)?xe(C,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):D(I)}function D(I){return I===l?(C.enter("codeFencedFenceSequence"),N(I)):A(I)}function N(I){return I===l?(E++,C.consume(I),N):E>=a?(C.exit("codeFencedFenceSequence"),he(I)?xe(C,O,"whitespace")(I):O(I)):A(I)}function O(I){return I===null||te(I)?(C.exit("codeFencedFence"),P(I)):A(I)}}}function E5(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Jo={name:"codeIndented",tokenize:A5},F5={partial:!0,tokenize:L5};function A5(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),xe(e,s,"linePrefix",5)(c)}function s(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?u(c):te(c)?e.attempt(F5,a,u)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||te(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),l)}function u(c){return e.exit("codeIndented"),t(c)}}function L5(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):te(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):xe(e,s,"linePrefix",5)(a)}function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):te(a)?o(a):n(a)}}const I5={name:"codeText",previous:R5,resolve:D5,tokenize:M5};function D5(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function R5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function M5(e,t,n){let r=0,o,s;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),u(h))}function u(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),u):h===96?(s=e.enter("codeTextSequence"),o=0,d(h)):te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||te(h)?(e.exit("codeTextData"),u(h)):(e.consume(h),c)}function d(h){return h===96?(e.consume(h),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",c(h))}}class P5{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 r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&$n(this.left,r),s.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),$n(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),$n(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);$n(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);$n(this.left,n.reverse())}}}function $n(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 Nf(e){const t={};let n=-1,r,o,s,a,l,u,c;const d=new P5(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,s=0,s<u.length&&u[s][1].type==="lineEndingBlank"&&(s+=2),s<u.length&&u[s][1].type==="content"))for(;++s<u.length&&u[s][1].type!=="content";)u[s][1].type==="chunkText"&&(u[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,O5(d,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,o=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(d.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...d.get(o)[1].start},l=d.slice(o,n),l.unshift(r),d.splice(o,n-o+1,l))}}return Tt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function O5(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const l=a.events,u=[],c={};let d,h,p=-1,m=n,g=0,x=0;const y=[x];for(;m;){for(;e.get(++o)[1]!==m;);s.push(o),m._tokenizer||(d=r.sliceStream(m),m.next||d.push(null),h&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(x=p+1,y.push(x),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):y.pop(),p=y.length;p--;){const v=l.slice(y[p],y[p+1]),j=s.pop();u.push([j,j+v.length-1]),e.splice(j,2,v)}for(u.reverse(),p=-1;++p<u.length;)c[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return c}const z5={resolve:N5,tokenize:V5},_5={partial:!0,tokenize:W5};function N5(e){return Nf(e),e}function V5(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(l)}function o(l){return l===null?s(l):te(l)?e.check(_5,a,s)(l):(e.consume(l),o)}function s(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function a(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function W5(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),xe(e,s,"linePrefix")}function s(a){if(a===null||te(a))return n(a);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Vf(e,t,n,r,o,s,a,l,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return h;function h(v){return v===60?(e.enter(r),e.enter(o),e.enter(s),e.consume(v),e.exit(s),p):v===null||v===32||v===41||Gi(v)?n(v):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(v))}function p(v){return v===62?(e.enter(s),e.consume(v),e.exit(s),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===62?(e.exit("chunkString"),e.exit(l),p(v)):v===null||v===60||te(v)?n(v):(e.consume(v),v===92?g:m)}function g(v){return v===60||v===62||v===92?(e.consume(v),m):m(v)}function x(v){return!d&&(v===null||v===41||qe(v))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(v)):d<c&&v===40?(e.consume(v),d++,x):v===41?(e.consume(v),d--,x):v===null||v===32||v===40||Gi(v)?n(v):(e.consume(v),v===92?y:x)}function y(v){return v===40||v===41||v===92?(e.consume(v),x):x(v)}}function Wf(e,t,n,r,o,s){const a=this;let l=0,u;return c;function c(m){return e.enter(r),e.enter(o),e.consume(m),e.exit(o),e.enter(s),d}function d(m){return l>999||m===null||m===91||m===93&&!u||m===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(m):m===93?(e.exit(s),e.enter(o),e.consume(m),e.exit(o),e.exit(r),t):te(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===null||m===91||m===93||te(m)||l++>999?(e.exit("chunkString"),d(m)):(e.consume(m),u||(u=!he(m)),m===92?p:h)}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,h):h(m)}}function Hf(e,t,n,r,o,s){let a;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,u):n(p)}function u(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(s),c(p))}function c(p){return p===a?(e.exit(s),u(a)):p===null?n(p):te(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),xe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===a||p===null||te(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?h:d)}function h(p){return p===a||p===92?(e.consume(p),d):d(p)}}function nr(e,t){let n;return r;function r(o){return te(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):he(o)?xe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const H5={name:"definition",tokenize:$5},U5={partial:!0,tokenize:G5};function $5(e,t,n){const r=this;let o;return s;function s(m){return e.enter("definition"),a(m)}function a(m){return Wf.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return o=Tn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):n(m)}function u(m){return qe(m)?nr(e,c)(m):c(m)}function c(m){return Vf(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(U5,h,h)(m)}function h(m){return he(m)?xe(e,p,"whitespace")(m):p(m)}function p(m){return m===null||te(m)?(e.exit("definition"),r.parser.defined.push(o),t(m)):n(m)}}function G5(e,t,n){return r;function r(l){return qe(l)?nr(e,o)(l):n(l)}function o(l){return Hf(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return he(l)?xe(e,a,"whitespace")(l):a(l)}function a(l){return l===null||te(l)?t(l):n(l)}}const Y5={name:"hardBreakEscape",tokenize:K5};function K5(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return te(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const q5={name:"headingAtx",resolve:X5,tokenize:Z5};function X5(e,t){let n=e.length-2,r=3,o,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Tt(e,r,n-r+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function Z5(e,t,n){let r=0;return o;function o(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||qe(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||te(d)?(e.exit("atxHeading"),t(d)):he(d)?xe(e,l,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),l(d))}function c(d){return d===null||d===35||qe(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),c)}}const J5=["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"],wc=["pre","script","style","textarea"],Q5={concrete:!0,name:"htmlFlow",resolveTo:nv,tokenize:rv},ev={partial:!0,tokenize:iv},tv={partial:!0,tokenize:ov};function nv(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 rv(e,t,n){const r=this;let o,s,a,l,u;return c;function c(T){return d(T)}function d(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),h}function h(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),s=!0,x):T===63?(e.consume(T),o=3,r.interrupt?t:b):wt(T)?(e.consume(T),a=String.fromCharCode(T),y):n(T)}function p(T){return T===45?(e.consume(T),o=2,m):T===91?(e.consume(T),o=5,l=0,g):wt(T)?(e.consume(T),o=4,r.interrupt?t:b):n(T)}function m(T){return T===45?(e.consume(T),r.interrupt?t:b):n(T)}function g(T){const ie="CDATA[";return T===ie.charCodeAt(l++)?(e.consume(T),l===ie.length?r.interrupt?t:D:g):n(T)}function x(T){return wt(T)?(e.consume(T),a=String.fromCharCode(T),y):n(T)}function y(T){if(T===null||T===47||T===62||qe(T)){const ie=T===47,se=a.toLowerCase();return!ie&&!s&&wc.includes(se)?(o=1,r.interrupt?t(T):D(T)):J5.includes(a.toLowerCase())?(o=6,ie?(e.consume(T),v):r.interrupt?t(T):D(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):s?j(T):w(T))}return T===45||nt(T)?(e.consume(T),a+=String.fromCharCode(T),y):n(T)}function v(T){return T===62?(e.consume(T),r.interrupt?t:D):n(T)}function j(T){return he(T)?(e.consume(T),j):L(T)}function w(T){return T===47?(e.consume(T),L):T===58||T===95||wt(T)?(e.consume(T),F):he(T)?(e.consume(T),w):L(T)}function F(T){return T===45||T===46||T===58||T===95||nt(T)?(e.consume(T),F):B(T)}function B(T){return T===61?(e.consume(T),C):he(T)?(e.consume(T),B):w(T)}function C(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),u=T,P):he(T)?(e.consume(T),C):A(T)}function P(T){return T===u?(e.consume(T),u=null,E):T===null||te(T)?n(T):(e.consume(T),P)}function A(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||qe(T)?B(T):(e.consume(T),A)}function E(T){return T===47||T===62||he(T)?w(T):n(T)}function L(T){return T===62?(e.consume(T),R):n(T)}function R(T){return T===null||te(T)?D(T):he(T)?(e.consume(T),R):n(T)}function D(T){return T===45&&o===2?(e.consume(T),M):T===60&&o===1?(e.consume(T),H):T===62&&o===4?(e.consume(T),Y):T===63&&o===3?(e.consume(T),b):T===93&&o===5?(e.consume(T),$):te(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(ev,oe,N)(T)):T===null||te(T)?(e.exit("htmlFlowData"),N(T)):(e.consume(T),D)}function N(T){return e.check(tv,O,oe)(T)}function O(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),I}function I(T){return T===null||te(T)?N(T):(e.enter("htmlFlowData"),D(T))}function M(T){return T===45?(e.consume(T),b):D(T)}function H(T){return T===47?(e.consume(T),a="",W):D(T)}function W(T){if(T===62){const ie=a.toLowerCase();return wc.includes(ie)?(e.consume(T),Y):D(T)}return wt(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),W):D(T)}function $(T){return T===93?(e.consume(T),b):D(T)}function b(T){return T===62?(e.consume(T),Y):T===45&&o===2?(e.consume(T),b):D(T)}function Y(T){return T===null||te(T)?(e.exit("htmlFlowData"),oe(T)):(e.consume(T),Y)}function oe(T){return e.exit("htmlFlow"),t(T)}}function ov(e,t,n){const r=this;return o;function o(a){return te(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function iv(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(mo,t,n)}}const sv={name:"htmlText",tokenize:av};function av(e,t,n){const r=this;let o,s,a;return l;function l(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),u}function u(b){return b===33?(e.consume(b),c):b===47?(e.consume(b),B):b===63?(e.consume(b),w):wt(b)?(e.consume(b),A):n(b)}function c(b){return b===45?(e.consume(b),d):b===91?(e.consume(b),s=0,g):wt(b)?(e.consume(b),j):n(b)}function d(b){return b===45?(e.consume(b),m):n(b)}function h(b){return b===null?n(b):b===45?(e.consume(b),p):te(b)?(a=h,H(b)):(e.consume(b),h)}function p(b){return b===45?(e.consume(b),m):h(b)}function m(b){return b===62?M(b):b===45?p(b):h(b)}function g(b){const Y="CDATA[";return b===Y.charCodeAt(s++)?(e.consume(b),s===Y.length?x:g):n(b)}function x(b){return b===null?n(b):b===93?(e.consume(b),y):te(b)?(a=x,H(b)):(e.consume(b),x)}function y(b){return b===93?(e.consume(b),v):x(b)}function v(b){return b===62?M(b):b===93?(e.consume(b),v):x(b)}function j(b){return b===null||b===62?M(b):te(b)?(a=j,H(b)):(e.consume(b),j)}function w(b){return b===null?n(b):b===63?(e.consume(b),F):te(b)?(a=w,H(b)):(e.consume(b),w)}function F(b){return b===62?M(b):w(b)}function B(b){return wt(b)?(e.consume(b),C):n(b)}function C(b){return b===45||nt(b)?(e.consume(b),C):P(b)}function P(b){return te(b)?(a=P,H(b)):he(b)?(e.consume(b),P):M(b)}function A(b){return b===45||nt(b)?(e.consume(b),A):b===47||b===62||qe(b)?E(b):n(b)}function E(b){return b===47?(e.consume(b),M):b===58||b===95||wt(b)?(e.consume(b),L):te(b)?(a=E,H(b)):he(b)?(e.consume(b),E):M(b)}function L(b){return b===45||b===46||b===58||b===95||nt(b)?(e.consume(b),L):R(b)}function R(b){return b===61?(e.consume(b),D):te(b)?(a=R,H(b)):he(b)?(e.consume(b),R):E(b)}function D(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),o=b,N):te(b)?(a=D,H(b)):he(b)?(e.consume(b),D):(e.consume(b),O)}function N(b){return b===o?(e.consume(b),o=void 0,I):b===null?n(b):te(b)?(a=N,H(b)):(e.consume(b),N)}function O(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||qe(b)?E(b):(e.consume(b),O)}function I(b){return b===47||b===62||qe(b)?E(b):n(b)}function M(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function H(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),W}function W(b){return he(b)?xe(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):$(b)}function $(b){return e.enter("htmlTextData"),a(b)}}const Gs={name:"labelEnd",resolveAll:dv,resolveTo:fv,tokenize:hv},lv={tokenize:pv},cv={tokenize:mv},uv={tokenize:gv};function dv(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Tt(e,0,e.length,n),e}function fv(e,t){let n=e.length,r=0,o,s,a,l;for(;n--;)if(o=e[n][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const u={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return l=[["enter",u,t],["enter",c,t]],l=ot(l,e.slice(s+1,s+r+3)),l=ot(l,[["enter",d,t]]),l=ot(l,$s(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),l=ot(l,[["exit",d,t],e[a-2],e[a-1],["exit",c,t]]),l=ot(l,e.slice(a+1)),l=ot(l,[["exit",u,t]]),Tt(e,s,e.length,l),e}function hv(e,t,n){const r=this;let o=r.events.length,s,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){s=r.events[o][1];break}return l;function l(p){return s?s._inactive?h(p):(a=r.parser.defined.includes(Tn(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(lv,d,a?d:h)(p):p===91?e.attempt(cv,d,a?c:h)(p):a?d(p):h(p)}function c(p){return e.attempt(uv,d,h)(p)}function d(p){return t(p)}function h(p){return s._balanced=!0,n(p)}}function pv(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),o}function o(h){return qe(h)?nr(e,s)(h):s(h)}function s(h){return h===41?d(h):Vf(e,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return qe(h)?nr(e,u)(h):d(h)}function l(h){return n(h)}function u(h){return h===34||h===39||h===40?Hf(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function c(h){return qe(h)?nr(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function mv(e,t,n){const r=this;return o;function o(l){return Wf.call(r,e,s,a,"reference","referenceMarker","referenceString")(l)}function s(l){return r.parser.defined.includes(Tn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function a(l){return n(l)}}function gv(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const xv={name:"labelStartImage",resolveAll:Gs.resolveAll,tokenize:yv};function yv(e,t,n){const r=this;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),s}function s(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),a):n(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const bv={name:"labelStartLink",resolveAll:Gs.resolveAll,tokenize:vv};function vv(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Qo={name:"lineEnding",tokenize:kv};function kv(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const Ur={name:"thematicBreak",tokenize:wv};function wv(e,t,n){let r=0,o;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,l(c)}function l(c){return c===o?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||te(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===o?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),he(c)?xe(e,l,"whitespace")(c):l(c))}}const Ge={continuation:{tokenize:Tv},exit:Ev,name:"list",tokenize:jv},Sv={partial:!0,tokenize:Fv},Cv={partial:!0,tokenize:Bv};function jv(e,t,n){const r=this,o=r.events[r.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return l;function l(m){const g=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Yi(m)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Ur,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return n(m)}function u(m){return Yi(m)&&++a<10?(e.consume(m),u):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(mo,r.interrupt?n:d,e.attempt(Sv,p,h))}function d(m){return r.containerState.initialBlankLine=!0,s++,p(m)}function h(m){return he(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function Tv(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(mo,o,s);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xe(e,t,"listItemIndent",r.containerState.size+1)(l)}function s(l){return r.containerState.furtherBlankLines||!he(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Cv,t,a)(l))}function a(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(Ge,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Bv(e,t,n){const r=this;return xe(e,o,"listItemIndent",r.containerState.size+1);function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function Ev(e){e.exit(this.containerState.type)}function Fv(e,t,n){const r=this;return xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const a=r.events[r.events.length-1];return!he(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Sc={name:"setextUnderline",resolveTo:Av,tokenize:Lv};function Av(e,t){let n=e.length,r,o,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Lv(e,t,n){const r=this;let o;return s;function s(c){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===o?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),he(c)?xe(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||te(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Iv={tokenize:Dv};function Dv(e){const t=this,n=e.attempt(mo,r,e.attempt(this.parser.constructs.flowInitial,o,xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(z5,o)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Rv={resolveAll:$f()},Mv=Uf("string"),Pv=Uf("text");function Uf(e){return{resolveAll:$f(e==="text"?Ov:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],s=n.attempt(o,a,l);return a;function a(d){return c(d)?s(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),s(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const h=o[d];let p=-1;if(h)for(;++p<h.length;){const m=h[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function $f(e){return t;function t(n,r){let o=-1,s;for(;++o<=n.length;)s===void 0?n[o]&&n[o][1].type==="data"&&(s=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==s+2&&(n[s][1].end=n[o-1][1].end,n.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(n,r):n}}function Ov(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 r=e[n-1][1],o=t.sliceStream(r);let s=o.length,a=-1,l=0,u;for(;s--;){const c=o[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(c===-2)u=!0,l++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const c={type:n===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const zv={42:Ge,43:Ge,45:Ge,48:Ge,49:Ge,50:Ge,51:Ge,52:Ge,53:Ge,54:Ge,55:Ge,56:Ge,57:Ge,62:Of},_v={91:H5},Nv={[-2]:Jo,[-1]:Jo,32:Jo},Vv={35:q5,42:Ur,45:[Sc,Ur],60:Q5,61:Sc,95:Ur,96:kc,126:kc},Wv={38:_f,92:zf},Hv={[-5]:Qo,[-4]:Qo,[-3]:Qo,33:xv,38:_f,42:Ki,60:[b5,sv],91:bv,92:[Y5,zf],93:Gs,95:Ki,96:I5},Uv={null:[Ki,Rv]},$v={null:[42,95]},Gv={null:[]},Yv=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$v,contentInitial:_v,disable:Gv,document:zv,flow:Vv,flowInitial:Nv,insideSpan:Uv,string:Wv,text:Hv},Symbol.toStringTag,{value:"Module"}));function Kv(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},s=[];let a=[],l=[];const u={attempt:P(B),check:P(C),consume:j,enter:w,exit:F,interrupt:P(C,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:h};let d=t.tokenize.call(c,u);return t.resolveAll&&s.push(t),c;function h(R){return a=ot(a,R),y(),a[a.length-1]!==null?[]:(A(t,0),c.events=$s(s,c.events,c),c.events)}function p(R,D){return Xv(m(R),D)}function m(R){return qv(a,R)}function g(){const{_bufferIndex:R,_index:D,line:N,column:O,offset:I}=r;return{_bufferIndex:R,_index:D,line:N,column:O,offset:I}}function x(R){o[R.line]=R.column,L()}function y(){let R;for(;r._index<a.length;){const D=a[r._index];if(typeof D=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<D.length;)v(D.charCodeAt(r._bufferIndex));else v(D)}}function v(R){d=d(R)}function j(R){te(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,L()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function w(R,D){const N=D||{};return N.type=R,N.start=g(),c.events.push(["enter",N,c]),l.push(N),N}function F(R){const D=l.pop();return D.end=g(),c.events.push(["exit",D,c]),D}function B(R,D){A(R,D.from)}function C(R,D){D.restore()}function P(R,D){return N;function N(O,I,M){let H,W,$,b;return Array.isArray(O)?oe(O):"tokenize"in O?oe([O]):Y(O);function Y(X){return Z;function Z(Q){const ue=Q!==null&&X[Q],ee=Q!==null&&X.null,ze=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(ee)?ee:ee?[ee]:[]];return oe(ze)(Q)}}function oe(X){return H=X,W=0,X.length===0?M:T(X[W])}function T(X){return Z;function Z(Q){return b=E(),$=X,X.partial||(c.currentConstruct=X),X.name&&c.parser.constructs.disable.null.includes(X.name)?se():X.tokenize.call(D?Object.assign(Object.create(c),D):c,u,ie,se)(Q)}}function ie(X){return R($,b),I}function se(X){return b.restore(),++W<H.length?T(H[W]):M}}}function A(R,D){R.resolveAll&&!s.includes(R)&&s.push(R),R.resolve&&Tt(c.events,D,c.events.length-D,R.resolve(c.events.slice(D),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function E(){const R=g(),D=c.previous,N=c.currentConstruct,O=c.events.length,I=Array.from(l);return{from:O,restore:M};function M(){r=R,c.previous=D,c.currentConstruct=N,c.events.length=O,l=I,L()}}function L(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function qv(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,s)];else{if(a=e.slice(n,o),r>-1){const l=a[0];typeof l=="string"?a[0]=l.slice(r):a.shift()}s>0&&a.push(e[o].slice(0,s))}return a}function Xv(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
416
+ `;break}case-3:{a=`\r
417
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(s)}o=s===-2,r.push(a)}return r.join("")}function Zv(e){const r={constructs:o5([Yv,...(e||{}).extensions||[]]),content:o(f5),defined:[],document:o(p5),flow:o(Iv),lazy:{},string:o(Mv),text:o(Pv)};return r;function o(s){return a;function a(l){return Kv(r,s,l)}}}function Jv(e){for(;!Nf(e););return e}const Cc=/[\0\t\n\r]/g;function Qv(){let e=1,t="",n=!0,r;return o;function o(s,a,l){const u=[];let c,d,h,p,m;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),h=0,t="",n&&(s.charCodeAt(0)===65279&&h++,n=void 0);h<s.length;){if(Cc.lastIndex=h,c=Cc.exec(s),p=c&&c.index!==void 0?c.index:s.length,m=s.charCodeAt(p),!c){t=s.slice(h);break}if(m===10&&h===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<p&&(u.push(s.slice(h,p)),e+=p-h),m){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return l&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const e4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function t4(e){return e.replace(e4,n4)}function n4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),s=o===120||o===88;return Pf(n.slice(s?2:1),s?16:10)}return Us(n)||e}const Gf={}.hasOwnProperty;function r4(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),o4(n)(Jv(Zv(n).document().write(Qv()(e,t,!0))))}function o4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(At),autolinkProtocol:E,autolinkEmail:E,atxHeading:s(rn),blockQuote:s(ee),characterEscape:E,characterReference:E,codeFenced:s(ze),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(ze,a),codeText:s(Ae,a),codeTextData:E,data:E,codeFlowValue:E,definition:s(Je),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(xr),hardBreakEscape:s(Mn),hardBreakTrailing:s(Mn),htmlFlow:s(Pn,a),htmlFlowData:E,htmlText:s(Pn,a),htmlTextData:E,image:s(ht),label:a,link:s(At),listItem:s(On),listItemValue:p,listOrdered:s(pt,h),listUnordered:s(pt),paragraph:s(zn),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(rn),strong:s(Lt),thematicBreak:s(sn)},exit:{atxHeading:u(),atxHeadingSequence:B,autolink:u(),autolinkEmail:ue,autolinkProtocol:Q,blockQuote:u(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:X,characterReference:Z,codeFenced:u(y),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:L,codeIndented:u(v),codeText:u(I),codeTextData:L,data:L,definition:u(),definitionDestinationString:F,definitionLabelString:j,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(D),hardBreakTrailing:u(D),htmlFlow:u(N),htmlFlowData:L,htmlText:u(O),htmlTextData:L,image:u(H),label:$,labelText:W,lineEnding:R,link:u(M),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ie,resourceDestinationString:b,resourceTitleString:Y,resource:oe,setextHeading:u(A),setextHeadingLineSequence:P,setextHeadingText:C,strong:u(),thematicBreak:u()}};Yf(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let G={type:"root",children:[]};const ne={stack:[G],tokenStack:[],config:t,enter:l,exit:c,buffer:a,resume:d,data:n},le=[];let de=-1;for(;++de<z.length;)if(z[de][1].type==="listOrdered"||z[de][1].type==="listUnordered")if(z[de][0]==="enter")le.push(de);else{const Le=le.pop();de=o(z,Le,de)}for(de=-1;++de<z.length;){const Le=t[z[de][0]];Gf.call(Le,z[de][1].type)&&Le[z[de][1].type].call(Object.assign({sliceSerialize:z[de][2].sliceSerialize},ne),z[de][1])}if(ne.tokenStack.length>0){const Le=ne.tokenStack[ne.tokenStack.length-1];(Le[1]||jc).call(ne,void 0,Le[0])}for(G.position={start:Rt(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Rt(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},de=-1;++de<t.transforms.length;)G=t.transforms[de](G)||G;return G}function o(z,G,ne){let le=G-1,de=-1,Le=!1,Ie,Qe,It,Dt;for(;++le<=ne;){const Re=z[le];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?de++:de--,Dt=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(Ie&&!Dt&&!de&&!It&&(It=le),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!de&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||de===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(Ie){let Bt=le;for(Qe=void 0;Bt--;){const $e=z[Bt];if($e[1].type==="lineEnding"||$e[1].type==="lineEndingBlank"){if($e[0]==="exit")continue;Qe&&(z[Qe][1].type="lineEndingBlank",Le=!0),$e[1].type="lineEnding",Qe=Bt}else if(!($e[1].type==="linePrefix"||$e[1].type==="blockQuotePrefix"||$e[1].type==="blockQuotePrefixWhitespace"||$e[1].type==="blockQuoteMarker"||$e[1].type==="listItemIndent"))break}It&&(!Qe||It<Qe)&&(Ie._spread=!0),Ie.end=Object.assign({},Qe?z[Qe][1].start:Re[1].end),z.splice(Qe||le,0,["exit",Ie,Re[2]]),le++,ne++}if(Re[1].type==="listItemPrefix"){const Bt={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};Ie=Bt,z.splice(le,0,["enter",Bt,Re[2]]),le++,ne++,It=void 0,Dt=!0}}}return z[G][1]._spread=Le,ne}function s(z,G){return ne;function ne(le){l.call(this,z(le),le),G&&G.call(this,le)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(z,G,ne){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([G,ne||void 0]),z.position={start:Rt(G.start),end:void 0}}function u(z){return G;function G(ne){z&&z.call(this,ne),c.call(this,ne)}}function c(z,G){const ne=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==z.type&&(G?G.call(this,z,le[0]):(le[1]||jc).call(this,z,le[0]));else throw new Error("Cannot close `"+z.type+"` ("+tr({start:z.start,end:z.end})+"): it’s not open");ne.position.end=Rt(z.end)}function d(){return n5(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(z){if(this.data.expectingFirstListItemValue){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function m(){const z=this.resume(),G=this.stack[this.stack.length-1];G.lang=z}function g(){const z=this.resume(),G=this.stack[this.stack.length-1];G.meta=z}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z.replace(/(\r?\n|\r)$/g,"")}function j(z){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.label=G,ne.identifier=Tn(this.sliceSerialize(z)).toLowerCase()}function w(){const z=this.resume(),G=this.stack[this.stack.length-1];G.title=z}function F(){const z=this.resume(),G=this.stack[this.stack.length-1];G.url=z}function B(z){const G=this.stack[this.stack.length-1];if(!G.depth){const ne=this.sliceSerialize(z).length;G.depth=ne}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function P(z){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function E(z){const ne=this.stack[this.stack.length-1].children;let le=ne[ne.length-1];(!le||le.type!=="text")&&(le=on(),le.position={start:Rt(z.start),end:void 0},ne.push(le)),this.stack.push(le)}function L(z){const G=this.stack.pop();G.value+=this.sliceSerialize(z),G.position.end=Rt(z.end)}function R(z){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=G.children[G.children.length-1];ne.position.end=Rt(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(G.type)&&(E.call(this,z),L.call(this,z))}function D(){this.data.atHardBreak=!0}function N(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function O(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function I(){const z=this.resume(),G=this.stack[this.stack.length-1];G.value=z}function M(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=G,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function H(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=G,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function W(z){const G=this.sliceSerialize(z),ne=this.stack[this.stack.length-2];ne.label=t4(G),ne.identifier=Tn(G).toLowerCase()}function $(){const z=this.stack[this.stack.length-1],G=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const le=z.children;ne.children=le}else ne.alt=G}function b(){const z=this.resume(),G=this.stack[this.stack.length-1];G.url=z}function Y(){const z=this.resume(),G=this.stack[this.stack.length-1];G.title=z}function oe(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ie(z){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.label=G,ne.identifier=Tn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function se(z){this.data.characterReferenceType=z.type}function X(z){const G=this.sliceSerialize(z),ne=this.data.characterReferenceType;let le;ne?(le=Pf(G,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=Us(G);const de=this.stack[this.stack.length-1];de.value+=le}function Z(z){const G=this.stack.pop();G.position.end=Rt(z.end)}function Q(z){L.call(this,z);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(z)}function ue(z){L.call(this,z);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(z)}function ee(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function Ae(){return{type:"inlineCode",value:""}}function Je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xr(){return{type:"emphasis",children:[]}}function rn(){return{type:"heading",depth:0,children:[]}}function Mn(){return{type:"break"}}function Pn(){return{type:"html",value:""}}function ht(){return{type:"image",title:null,url:"",alt:null}}function At(){return{type:"link",title:null,url:"",children:[]}}function pt(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function On(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function zn(){return{type:"paragraph",children:[]}}function Lt(){return{type:"strong",children:[]}}function on(){return{type:"text",value:""}}function sn(){return{type:"thematicBreak"}}}function Rt(e){return{line:e.line,column:e.column,offset:e.offset}}function Yf(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Yf(e,r):i4(e,r)}}function i4(e,t){let n;for(n in t)if(Gf.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function jc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tr({start:t.start,end:t.end})+") is still open")}function s4(e){const t=this;t.parser=n;function n(r){return r4(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function a4(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 l4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
418
+ `}]}function c4(e,t){const n=t.value?t.value+`
419
+ `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function u4(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function d4(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function f4(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Rn(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,l+=1,e.footnoteCounts.set(r,l);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function h4(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 p4(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Kf(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function m4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Kf(e,t);const o={src:Rn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,s),e.applyData(t,s)}function g4(e,t){const n={src:Rn(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 r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function x4(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function y4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Kf(e,t);const o={href:Rn(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const s={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function b4(e,t){const n={href:Rn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function v4(e,t,n){const r=e.all(t),o=n?k4(n):qf(t),s={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.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:[]}),s.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(o||l!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
420
+ `}),d.type==="element"&&d.tagName==="p"&&!o?a.push(...d.children):a.push(d)}const u=r[r.length-1];u&&(o||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
421
+ `});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function k4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=qf(n[r])}return t}function qf(e){const t=e.spread;return t??e.children.length>1}function w4(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];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 s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function S4(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function C4(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function j4(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function T4(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Ns(t.children[1]),u=Ff(t.children[t.children.length-1]);l&&u&&(a.position={start:l,end:u}),o.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,s),e.applyData(t,s)}function B4(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,l=a?a.length:t.children.length;let u=-1;const c=[];for(;++u<l;){const h=t.children[u],p={},m=a?a[u]:void 0;m&&(p.align=m);let g={type:"element",tagName:s,properties:p,children:[]};h&&(g.children=e.all(h),e.patch(h,g),g=e.applyData(h,g)),c.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function E4(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Tc=9,Bc=32;function F4(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const s=[];for(;r;)s.push(Ec(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return s.push(Ec(t.slice(o),o>0,!1)),s.join("")}function Ec(e,t,n){let r=0,o=e.length;if(t){let s=e.codePointAt(r);for(;s===Tc||s===Bc;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(o-1);for(;s===Tc||s===Bc;)o--,s=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function A4(e,t){const n={type:"text",value:F4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function L4(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const I4={blockquote:a4,break:l4,code:c4,delete:u4,emphasis:d4,footnoteReference:f4,heading:h4,html:p4,imageReference:m4,image:g4,inlineCode:x4,linkReference:y4,link:b4,listItem:v4,list:w4,paragraph:S4,root:C4,strong:j4,table:T4,tableCell:E4,tableRow:B4,text:A4,thematicBreak:L4,toml:Dr,yaml:Dr,definition:Dr,footnoteDefinition:Dr};function Dr(){}const Xf=-1,go=0,rr=1,oo=2,Ys=3,Ks=4,qs=5,Xs=6,Zf=7,Jf=8,D4=typeof self=="object"?self:globalThis,Fc=(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 D4[e](t)},R4=(e,t)=>{const n=(o,s)=>(e.set(s,o),o),r=o=>{if(e.has(o))return e.get(o);const[s,a]=t[o];switch(s){case go:case Xf:return n(a,o);case rr:{const l=n([],o);for(const u of a)l.push(r(u));return l}case oo:{const l=n({},o);for(const[u,c]of a)l[r(u)]=r(c);return l}case Ys:return n(new Date(a),o);case Ks:{const{source:l,flags:u}=a;return n(new RegExp(l,u),o)}case qs:{const l=n(new Map,o);for(const[u,c]of a)l.set(r(u),r(c));return l}case Xs:{const l=n(new Set,o);for(const u of a)l.add(r(u));return l}case Zf:{const{name:l,message:u}=a;return n(Fc(l,u),o)}case Jf:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:l}=new Uint8Array(a);return n(new DataView(l),a)}}return n(Fc(s,a),o)};return r},Ac=e=>R4(new Map,e)(0),gn="",{toString:M4}={},{keys:P4}=Object,Gn=e=>{const t=typeof e;if(t!=="object"||!e)return[go,t];const n=M4.call(e).slice(8,-1);switch(n){case"Array":return[rr,gn];case"Object":return[oo,gn];case"Date":return[Ys,gn];case"RegExp":return[Ks,gn];case"Map":return[qs,gn];case"Set":return[Xs,gn];case"DataView":return[rr,n]}return n.includes("Array")?[rr,n]:n.includes("Error")?[Zf,n]:[oo,n]},Rr=([e,t])=>e===go&&(t==="function"||t==="symbol"),O4=(e,t,n,r)=>{const o=(a,l)=>{const u=r.push(a)-1;return n.set(l,u),u},s=a=>{if(n.has(a))return n.get(a);let[l,u]=Gn(a);switch(l){case go:{let d=a;switch(u){case"bigint":l=Jf,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return o([Xf],a)}return o([l,d],a)}case rr:{if(u){let p=a;return u==="DataView"?p=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(a)),o([u,[...p]],a)}const d=[],h=o([l,d],a);for(const p of a)d.push(s(p));return h}case oo:{if(u)switch(u){case"BigInt":return o([u,a.toString()],a);case"Boolean":case"Number":case"String":return o([u,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],h=o([l,d],a);for(const p of P4(a))(e||!Rr(Gn(a[p])))&&d.push([s(p),s(a[p])]);return h}case Ys:return o([l,a.toISOString()],a);case Ks:{const{source:d,flags:h}=a;return o([l,{source:d,flags:h}],a)}case qs:{const d=[],h=o([l,d],a);for(const[p,m]of a)(e||!(Rr(Gn(p))||Rr(Gn(m))))&&d.push([s(p),s(m)]);return h}case Xs:{const d=[],h=o([l,d],a);for(const p of a)(e||!Rr(Gn(p)))&&d.push(s(p));return h}}const{message:c}=a;return o([l,{name:u,message:c}],a)};return s},Lc=(e,{json:t,lossy:n}={})=>{const r=[];return O4(!(t||n),!!t,new Map,r)(e),r},io=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ac(Lc(e,t)):structuredClone(e):(e,t)=>Ac(Lc(e,t));function z4(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 _4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function N4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||z4,r=e.options.footnoteBackLabel||_4,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),h=String(c.identifier).toUpperCase(),p=Rn(h.toLowerCase());let m=0;const g=[],x=e.footnoteCounts.get(h);for(;x!==void 0&&++m<=x;){g.length>0&&g.push({type:"text",value:" "});let j=typeof n=="string"?n:n(u,m);typeof j=="string"&&(j={type:"text",value:j}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,m),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const j=y.children[y.children.length-1];j&&j.type==="text"?j.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...g)}else d.push(...g);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,v),l.push(v)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...io(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
422
422
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
423
- `}]}}const Wf=(function(e){if(e==null)return jv;if(typeof e=="function")return ui(e);if(typeof e=="object")return Array.isArray(e)?wv(e):Sv(e);if(typeof e=="string")return Cv(e);throw new Error("Expected function, string, or object as test")});function wv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Wf(e[n]);return ui(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Sv(e){const t=e;return ui(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Cv(e){return ui(t);function t(n){return n&&n.type===e}}function ui(e){return t;function t(n,r,i){return!!(Tv(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function jv(){return!0}function Tv(e){return e!==null&&typeof e=="object"&&"type"in e}const Uf=[],Bv=!0,kc=!1,Fv="skip";function Ev(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Wf(i),s=r?-1:1;l(e,void 0,[])();function l(u,d,c){const h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){const m=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=Uf,g,x,y;if((!t||o(u,d,c[c.length-1]||void 0))&&(m=Av(n(u,c)),m[0]===kc))return m;if("children"in u&&u.children){const b=u;if(b.children&&m[0]!==Fv)for(x=(r?b.children.length:-1)+s,y=c.concat(b);x>-1&&x<b.children.length;){const T=b.children[x];if(g=l(T,x,y)(),g[0]===kc)return g;x=typeof g[1]=="number"?g[1]:x+s}}return m}}}function Av(e){return Array.isArray(e)?e:typeof e=="number"?[Bv,e]:e==null?Uf:[e]}function $f(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),Ev(e,o,l,i);function l(u,d){const c=d[d.length-1],h=c?c.children.indexOf(u):void 0;return s(u,h,c)}}const Ho={}.hasOwnProperty,Lv={};function Iv(e,t){const n=t||Lv,r=new Map,i=new Map,o=new Map,s={...hv,...n.handlers},l={all:d,applyData:Rv,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:u,options:n,patch:Dv,wrap:Pv};return $f(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const h=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();h.has(p)||h.set(p,c)}}),l;function u(c,h){const p=c.type,m=l.handlers[p];if(Ho.call(l.handlers,p)&&m)return m(l,c,h);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in c){const{children:x,...y}=c,b=Qr(y);return b.children=l.all(c),b}return Qr(c)}return(l.options.unknownHandler||Mv)(l,c,h)}function d(c){const h=[];if("children"in c){const p=c.children;let m=-1;for(;++m<p.length;){const g=l.one(p[m],c);if(g){if(m&&p[m-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=wc(g.value)),!Array.isArray(g)&&g.type==="element")){const x=g.children[0];x&&x.type==="text"&&(x.value=wc(x.value))}Array.isArray(g)?h.push(...g):h.push(g)}}}return h}}function Dv(e,t){e.position&&(t.position=mb(e))}function Rv(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,Qr(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Mv(e,t){const n=t.data||{},r="value"in t&&!(Ho.call(n,"hProperties")||Ho.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Pv(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
423
+ `}]}}const Qf=(function(e){if(e==null)return U4;if(typeof e=="function")return xo(e);if(typeof e=="object")return Array.isArray(e)?V4(e):W4(e);if(typeof e=="string")return H4(e);throw new Error("Expected function, string, or object as test")});function V4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Qf(e[n]);return xo(r);function r(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function W4(e){const t=e;return xo(n);function n(r){const o=r;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function H4(e){return xo(t);function t(n){return n&&n.type===e}}function xo(e){return t;function t(n,r,o){return!!($4(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function U4(){return!0}function $4(e){return e!==null&&typeof e=="object"&&"type"in e}const eh=[],G4=!0,Ic=!1,Y4="skip";function K4(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const s=Qf(o),a=r?-1:1;l(e,void 0,[])();function l(u,c,d){const h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){const m=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=eh,g,x,y;if((!t||s(u,c,d[d.length-1]||void 0))&&(m=q4(n(u,d)),m[0]===Ic))return m;if("children"in u&&u.children){const v=u;if(v.children&&m[0]!==Y4)for(x=(r?v.children.length:-1)+a,y=d.concat(v);x>-1&&x<v.children.length;){const j=v.children[x];if(g=l(j,x,y)(),g[0]===Ic)return g;x=typeof g[1]=="number"?g[1]:x+a}}return m}}}function q4(e){return Array.isArray(e)?e:typeof e=="number"?[G4,e]:e==null?eh:[e]}function th(e,t,n,r){let o,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,o=n):(s=t,a=n,o=r),K4(e,s,l,o);function l(u,c){const d=c[c.length-1],h=d?d.children.indexOf(u):void 0;return a(u,h,d)}}const qi={}.hasOwnProperty,X4={};function Z4(e,t){const n=t||X4,r=new Map,o=new Map,s=new Map,a={...I4,...n.handlers},l={all:c,applyData:Q4,definitionById:r,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:a,one:u,options:n,patch:J4,wrap:t6};return th(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:o,p=String(d.identifier).toUpperCase();h.has(p)||h.set(p,d)}}),l;function u(d,h){const p=d.type,m=l.handlers[p];if(qi.call(l.handlers,p)&&m)return m(l,d,h);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in d){const{children:x,...y}=d,v=io(y);return v.children=l.all(d),v}return io(d)}return(l.options.unknownHandler||e6)(l,d,h)}function c(d){const h=[];if("children"in d){const p=d.children;let m=-1;for(;++m<p.length;){const g=l.one(p[m],d);if(g){if(m&&p[m-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Dc(g.value)),!Array.isArray(g)&&g.type==="element")){const x=g.children[0];x&&x.type==="text"&&(x.value=Dc(x.value))}Array.isArray(g)?h.push(...g):h.push(g)}}}return h}}function J4(e,t){e.position&&(t.position=Rb(e))}function Q4(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,io(s)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function e6(e,t){const n=t.data||{},r="value"in t&&!(qi.call(n,"hProperties")||qi.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function t6(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
424
424
  `});++r<e.length;)r&&n.push({type:"text",value:`
425
425
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
426
- `}),n}function wc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Sc(e,t){const n=Iv(e,t),r=n.one(e,void 0),i=kv(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
427
- `},i),o}function Ov(e,t){return e&&"run"in e?async function(n,r){const i=Sc(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Sc(n,{file:r,...e||t})}}function Cc(e){if(e)throw e}var Yi,jc;function zv(){if(jc)return Yi;jc=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},o=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var c=e.call(d,"constructor"),h=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!c&&!h)return!1;var p;for(p in d);return typeof p>"u"||e.call(d,p)},s=function(d,c){n&&c.name==="__proto__"?n(d,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):d[c.name]=c.newValue},l=function(d,c){if(c==="__proto__")if(e.call(d,c)){if(r)return r(d,c).value}else return;return d[c]};return Yi=function u(){var d,c,h,p,m,g,x=arguments[0],y=1,b=arguments.length,T=!1;for(typeof x=="boolean"&&(T=x,x=arguments[1]||{},y=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});y<b;++y)if(d=arguments[y],d!=null)for(c in d)h=l(x,c),p=l(d,c),x!==p&&(T&&p&&(o(p)||(m=i(p)))?(m?(m=!1,g=h&&i(h)?h:[]):g=h&&o(h)?h:{},s(x,{name:c,newValue:u(T,g,p)})):typeof p<"u"&&s(x,{name:c,newValue:p}));return x},Yi}var _v=zv();const Ki=yf(_v);function Wo(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 Nv(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(u,...d){const c=e[++o];let h=-1;if(u){s(u);return}for(;++h<i.length;)(d[h]===null||d[h]===void 0)&&(d[h]=i[h]);i=d,c?Vv(c,l)(...d):s(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Vv(e,t){let n;return r;function r(...s){const l=e.length>s.length;let u;l&&s.push(i);try{u=e.apply(this,s)}catch(d){const c=d;if(l&&n)throw c;return i(c)}l||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const yt={basename:Hv,dirname:Wv,extname:Uv,join:$v,sep:"/"};function Hv(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');fr(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Wv(e){if(fr(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Uv(e){fr(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function $v(...e){let t=-1,n;for(;++t<e.length;)fr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Gv(n)}function Gv(e){fr(e);const t=e.codePointAt(0)===47;let n=Yv(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Yv(e,t){let n="",r=0,i=-1,o=0,s=-1,l,u;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function fr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Kv={cwd:qv};function qv(){return"/"}function Uo(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Xv(e){if(typeof e=="string")e=new URL(e);else if(!Uo(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 Zv(e)}function Zv(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===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 qi=["history","path","basename","stem","extname","dirname"];class Gf{constructor(t){let n;t?Uo(t)?n={path:t}:typeof t=="string"||Jv(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Kv.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<qi.length;){const o=qi[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)qi.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?yt.basename(this.path):void 0}set basename(t){Zi(t,"basename"),Xi(t,"basename"),this.path=yt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?yt.dirname(this.path):void 0}set dirname(t){Tc(this.basename,"dirname"),this.path=yt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?yt.extname(this.path):void 0}set extname(t){if(Xi(t,"extname"),Tc(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=yt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Uo(t)&&(t=Xv(t)),Zi(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?yt.basename(this.path,this.extname):void 0}set stem(t){Zi(t,"stem"),Xi(t,"stem"),this.path=yt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ne(t,n,r);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 Xi(e,t){if(e&&e.includes(yt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+yt.sep+"`")}function Zi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Tc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Jv(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Qv=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),e6={}.hasOwnProperty;class Hs extends Qv{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=Nv()}copy(){const t=new Hs;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ki(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(eo("data",this.frozen),this.namespace[t]=n,this):e6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(eo("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,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Lr(t),r=this.parser||this.Parser;return Ji("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ji("process",this.parser||this.Parser),Qi("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=Lr(t),u=r.parse(l);r.run(u,l,function(c,h,p){if(c||!h||!p)return d(c);const m=h,g=r.stringify(m,p);r6(g)?p.value=g:p.result=g,d(c,p)});function d(c,h){c||!h?s(c):o?o(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),Ji("processSync",this.parser||this.Parser),Qi("processSync",this.compiler||this.Compiler),this.process(t,i),Fc("processSync","process",n),r;function i(o,s){n=!0,Cc(o),r=s}}run(t,n,r){Bc(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const u=Lr(n);i.run(t,u,d);function d(c,h,p){const m=h||t;c?l(c):s?s(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Fc("runSync","run",r),i;function o(s,l){Cc(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Lr(n),i=this.compiler||this.Compiler;return Qi("stringify",i),Bc(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(eo("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(d){if(typeof d=="function")u(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[c,...h]=d;u(c,h)}else s(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function s(d){if(!("plugins"in d)&&!("settings"in d))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");l(d.plugins),d.settings&&(i.settings=Ki(!0,i.settings,d.settings))}function l(d){let c=-1;if(d!=null)if(Array.isArray(d))for(;++c<d.length;){const h=d[c];o(h)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function u(d,c){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===d){p=h;break}if(p===-1)r.push([d,...c]);else if(c.length>0){let[m,...g]=c;const x=r[p][1];Wo(x)&&Wo(m)&&(m=Ki(!0,x,m)),r[p]=[d,m,...g]}}}}const t6=new Hs().freeze();function Ji(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function eo(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 Bc(e){if(!Wo(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Lr(e){return n6(e)?e:new Gf(e)}function n6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function r6(e){return typeof e=="string"||i6(e)}function i6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const o6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ec=[],Ac={allowDangerousHtml:!0},s6=/^(https?|ircs?|mailto|xmpp)$/i,a6=[{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 l6(e){const t=c6(e),n=u6(e);return d6(t.runSync(t.parse(n),n),e)}function c6(e){const t=e.rehypePlugins||Ec,n=e.remarkPlugins||Ec,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ac}:Ac;return t6().use(V4).use(n).use(Ov,r).use(t)}function u6(e){const t=e.children||"",n=new Gf;return typeof t=="string"&&(n.value=t),n}function d6(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||f6;for(const c of a6)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+o6+c.id,void 0);return $f(e,d),vb(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function d(c,h,p){if(c.type==="raw"&&p&&typeof h=="number")return s?p.children.splice(h,1):p.children[h]={type:"text",value:c.value},h;if(c.type==="element"){let m;for(m in Ui)if(Object.hasOwn(Ui,m)&&Object.hasOwn(c.properties,m)){const g=c.properties[m],x=Ui[m];(x===null||x.includes(c.tagName))&&(c.properties[m]=u(String(g||""),m,c))}}if(c.type==="element"){let m=n?!n.includes(c.tagName):o?o.includes(c.tagName):!1;if(!m&&r&&typeof h=="number"&&(m=!r(c,h,p)),m&&p&&typeof h=="number")return l&&c.children?p.children.splice(h,1,...c.children):p.children.splice(h,1),h}}}function f6(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||s6.test(e.slice(0,t))?e:""}const h6={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function p6({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:r="blue",answerType:i="HTML",...o}){const s=h6[r],[l,u]=S.useState(new Set(n)),d=c=>{u(h=>{const p=new Set(h);return p.has(c)?p.delete(c):(t||p.clear(),p.add(c)),p})};return a.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"4",...o,children:e.map(c=>{const h=l.has(c.id);return a.jsxs(f.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:h?s.ring:"border"},children:[a.jsxs(f.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:()=>d(c.id),"aria-expanded":h,children:[a.jsx(f.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:c.question}),a.jsx(f.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:h?"none":"1.5px solid var(--medix-form-text)",background:h?s.solid:"transparent",color:h?"#ffffff":"inherit",flexShrink:0},children:h?a.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:a.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):a.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[a.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),a.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),a.jsx(f.Box,{overflow:"hidden",maxH:h?"800px":"0px",opacity:h?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:a.jsx(f.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:typeof c.answer=="string"?i==="MD"?a.jsx(l6,{children:c.answer}):a.jsx("span",{dangerouslySetInnerHTML:{__html:$y.sanitize(c.answer)}}):c.answer})})]},c.id)})})}function m6({quote:e,authorName:t,authorTitle:n,authorAvatar:r,rating:i,...o}){return a.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"none",_dark:{boxShadow:"none"},...o,children:[i!==void 0&&a.jsx(f.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((s,l)=>a.jsx(f.Box,{as:"span",fontSize:"sm",color:l<i?"#F59E0B":"text.muted",children:"★"},l))}),a.jsxs(f.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[r?a.jsx("img",{src:r,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):a.jsx(f.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()}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const g6={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function x6(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 y6({title:e,excerpt:t,category:n,date:r,coverImage:i,href:o,onClick:s,colorScheme:l="blue",...u}){const d=!!(o||s),c=x6(r),h=g6[l],p={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:d?"pointer":"default",textAlign:"left"},m=a.jsxs(f.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:d?{transform:"translateY(-4px)"}:void 0,...u,children:[a.jsxs(f.Box,{position:"relative",overflow:"hidden",children:[i?a.jsx("img",{src:i,alt:e,style:{width:"100%",height:300,objectFit:"cover",display:"block",borderRadius:"20px"}}):a.jsx(f.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),c&&a.jsxs(f.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:[a.jsx(f.Box,{style:{fontSize:22,fontWeight:700,color:h.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:c.day}),a.jsx(f.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:c.weekday})]})]}),a.jsxs(f.Box,{px:"0",pt:"3",pb:"4",children:[n&&a.jsx(f.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}),a.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&a.jsx(f.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 o?a.jsx("a",{href:o,style:p,onClick:s,children:m}):s?a.jsx("button",{type:"button",style:p,onClick:s,children:m}):m}function b6({columns:e,data:t,rowKey:n="id",isLoading:r=!1,emptyMessage:i="No data available",sortable:o=!1,sortKey:s,sortDirection:l="asc",onSort:u,striped:d=!0,onRowClick:c,caption:h,enablePagination:p=!1,pageSize:m=10,page:g,onPageChange:x,enableSearch:y=!1,searchPlaceholder:b="Search table...",searchQuery:T,onSearchChange:w,style:A,className:E,stickyFirstColumn:C=!1}){const[O,B]=S.useState(""),F=T??O,[L,R]=S.useState(1),D=g??L,[N,P]=S.useState(s),[I,M]=S.useState(l),U=s??N,H=s?l:I,$=Z=>{B(Z),R(1),w==null||w(Z)},v=Z=>{const Q=U===Z&&H==="asc"?"desc":"asc";P(Z),M(Q),u==null||u(Z,Q)},Y=Z=>{R(Z),x==null||x(Z)},ie=S.useMemo(()=>{if(!F.trim())return t;const Z=F.toLowerCase().trim();return t.filter(Q=>e.some(de=>{const re=Q[de.key];return re==null?!1:String(re).toLowerCase().includes(Z)}))},[t,e,F]),j=S.useMemo(()=>!U||u?ie:[...ie].sort((Z,Q)=>{const de=Z[U],re=Q[U],ze=String(de??""),Ae=String(re??""),Je=ze.localeCompare(Ae,void 0,{numeric:!0,sensitivity:"base"});return H==="asc"?Je:-Je}),[ie,U,H,u]),oe=j.length,ce=S.useMemo(()=>{if(!p)return j;const Z=(D-1)*m;return j.slice(Z,Z+m)},[j,p,D,m]),J=({colKey:Z})=>U!==Z?a.jsx(f.Text,{as:"span",opacity:.3,ml:"1",fontSize:"xs",children:"↕"}):a.jsx(f.Text,{as:"span",ml:"1",color:"text.heading",fontSize:"xs",children:H==="asc"?"↑":"↓"});return a.jsxs(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"none",_dark:{boxShadow:"none"},style:A,className:E,children:[y&&a.jsx(f.Box,{p:"4",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsx(Xo,{placeholder:b,value:F,onChange:Z=>$(Z.target.value),maxW:"360px"})}),a.jsx(f.Box,{overflowX:"auto",children:a.jsxs(f.Box,{as:"table",w:"full",style:{borderCollapse:"collapse"},"aria-label":h,children:[h&&a.jsx("caption",{style:{display:"none"},children:h}),a.jsx(f.Box,{as:"thead",children:a.jsx(f.Box,{as:"tr",bg:"bg.subtle",borderBottom:"1px solid",borderColor:"border",children:e.map((Z,Q)=>{const de=C&&Q===0;return a.jsx(f.Box,{as:"th",py:"3",px:"4",textAlign:Z.align??"left",minW:Z.minWidth,fontSize:"xs",fontWeight:"600",letterSpacing:"0.05em",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",whiteSpace:"nowrap",userSelect:"none",cursor:Z.sortable||o?"pointer":"default",_hover:Z.sortable||o?{color:"text.heading"}:void 0,onClick:()=>Z.sortable||o?v(Z.key):void 0,"aria-sort":U===Z.key?H==="asc"?"ascending":"descending":void 0,position:de?"sticky":void 0,left:de?0:void 0,zIndex:de?3:void 0,bg:de?"bg.subtle":void 0,borderRight:de?"1px solid":void 0,borderColor:de?"border":void 0,boxShadow:de?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:a.jsxs(f.Flex,{as:"span",align:"center",justify:Z.align==="right"?"flex-end":Z.align==="center"?"center":"flex-start",children:[Z.label,(Z.sortable||o)&&a.jsx(J,{colKey:Z.key})]})},Z.key)})})}),a.jsx(f.Box,{as:"tbody",children:r?Array.from({length:5}).map((Z,Q)=>a.jsx(f.Box,{as:"tr",borderBottom:"1px solid",borderColor:"border",children:e.map(de=>a.jsx(f.Box,{as:"td",py:"3.5",px:"4",children:a.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},de.key))},Q)):ce.length===0?a.jsx(f.Box,{as:"tr",children:a.jsx("td",{colSpan:e.length,style:{textAlign:"center",padding:"48px 16px"},children:a.jsx(f.Text,{color:"text.muted",fontFamily:"var(--font-body)",fontSize:"sm",children:i})})}):ce.map((Z,Q)=>{const de=String(Z[n]??Q);return a.jsx(f.Box,{as:"tr",onClick:()=>c==null?void 0:c(Z,Q),bg:d&&Q%2===1?"bg.subtle":"transparent",borderBottom:"1px solid",borderColor:"border",cursor:c?"pointer":"default",transition:"background 0.15s ease",_hover:{bg:"bg.subtle"},children:e.map((re,ze)=>{const Ae=C&&ze===0;return a.jsx(f.Box,{as:"td",py:"3.5",px:"4",textAlign:re.align??"left",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",verticalAlign:"middle",position:Ae?"sticky":void 0,left:Ae?0:void 0,zIndex:Ae?2:void 0,bg:Ae?d&&Q%2===1?"bg.subtle":"bg.surface":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:re.render?re.render(Z[re.key],Z,Q):String(Z[re.key]??"—")},re.key)})},de)})})]})}),p&&a.jsxs(f.Flex,{p:"4",borderTop:"1px solid",borderColor:"border",bg:"bg.surface",align:"center",justify:"space-between",flexWrap:"wrap",gap:"4",children:[a.jsxs(f.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:["Showing ",oe===0?0:(D-1)*m+1," to"," ",Math.min(D*m,oe)," of ",oe," entries"]}),a.jsx(Jd,{total:oe,pageSize:m,currentPage:D,onChange:Y,compact:!0})]})]})}function v6({name:e,specialty:t,location:n,avatar:r,rating:i,reviewCount:o,experience:s,consultationFee:l,isVerified:u=!1,isAvailable:d=!1,availabilityLabel:c="Available",onBookClick:h,onViewClick:p,variant:m="standard",...g}){return m==="featured"?a.jsxs(f.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",...g,children:[r?a.jsx("img",{src:r,alt:e,style:{width:"100%",height:240,objectFit:"cover",display:"block"}}):a.jsx(f.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:a.jsx(f.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),a.jsxs(f.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[a.jsxs(f.Box,{children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[a.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),u&&a.jsx(Eo,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:a.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:[a.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"}),a.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"})]})})]}),a.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[d&&a.jsxs(f.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:[a.jsx(f.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),c]}),d&&s&&a.jsx(f.Box,{w:"1px",h:"20px",bg:"border"}),s&&a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[a.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:[a.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),a.jsx("path",{d:"M9 12l2 2 4-4"})]}),s]})]}),a.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),a.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l&&a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),a.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),a.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"center",children:[p&&a.jsx(f.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:p,children:"view"}),h&&a.jsx(f.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"})]})]})]})]}):m==="compact"?a.jsxs(f.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"},...g,children:[a.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[a.jsxs(f.Box,{display:"flex",gap:"4",children:[a.jsx(f.Box,{flexShrink:0,children:r?a.jsx("img",{src:r,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):a.jsx(f.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)})}),a.jsxs(f.Box,{pt:"1",children:[a.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),a.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&m!=="compact"?` • ${n}`:""]})]})]}),p&&a.jsx(f.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:p,pt:"1",children:"View"})]}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[a.jsx(f.Box,{as:"span",color:"status.warning",mt:"-2px",children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:a.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"})})}),a.jsxs(f.Box,{as:"span",color:"text.heading",mr:"1",children:[(i==null?void 0:i.toFixed(1))||"New"," ",o?`(${o})`:""]}),n&&a.jsxs(f.Box,{as:"span",children:[" • ",n]}),s&&a.jsxs(f.Box,{as:"span",children:[" • ",s]})]}),a.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),a.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),a.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),h&&a.jsx(f.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"})]})]}):a.jsxs(f.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"},...g,children:[a.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[a.jsxs(f.Box,{display:"flex",gap:"4",minW:"0",flex:"1",children:[a.jsx(f.Box,{flexShrink:0,children:r?a.jsx("img",{src:r,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):a.jsx(f.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)})}),a.jsxs(f.Box,{pt:"1",minW:"0",flex:"1",children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",minW:"0",children:[a.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minW:"0",flex:"1",children:e}),u&&a.jsx(Eo,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:a.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:[a.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"}),a.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"})]})})]}),a.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:[t,n?` • ${n}`:""]})]})]}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[a.jsx(f.Box,{as:"span",color:"status.warning",mt:"-2px",children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:a.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"," ",o?a.jsxs(f.Box,{as:"span",color:"text.muted",children:["(",o,")"]}):null]})]}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[d&&a.jsxs(f.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:[a.jsx(f.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),c]}),d&&s&&a.jsx(f.Box,{w:"1px",h:"20px",bg:"border"}),s&&a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[a.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:[a.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),a.jsx("path",{d:"M9 12l2 2 4-4"})]}),s]})]}),a.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),a.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),a.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),a.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"center",children:[p&&a.jsx(f.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:p,children:"view"}),h&&a.jsx(f.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 k6={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:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[a.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"var(--chakra-colors-status-success)"}),a.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:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[a.jsx("path",{d:"M12 2L2 21h20L12 2z",fill:"var(--chakra-colors-status-warning)"}),a.jsx("path",{d:"M12 9v5",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),a.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:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[a.jsx("path",{d:"M8.5 2h7l6.5 6.5v7L15.5 22h-7L2 15.5v-7L8.5 2z",fill:"var(--chakra-colors-status-error)"}),a.jsx("path",{d:"M12 7v6",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),a.jsx("circle",{cx:"12",cy:"16.5",r:"1",fill:"white"})]})}};function w6({label:e,value:t,unit:n,status:r="normal",...i}){const o=k6[r];return a.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:o.bg,border:"1px solid",borderColor:o.border,...i,children:[a.jsx("span",{"aria-label":o.ariaLabel,style:{display:"inline-flex",alignItems:"center",flexShrink:0},children:o.icon}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),a.jsxs(f.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[a.jsx(f.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&a.jsx(f.Box,{fontSize:"xs",color:o.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const S6={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function C6({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:r,time:i,type:o="video",status:s="upcoming",onCancel:l,onReschedule:u,onJoin:d,...c}){const h=S6[s];return a.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...c,children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?a.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):a.jsx(f.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)}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&a.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),a.jsx(Ko,{status:h.color,size:"sm",children:h.label})]}),a.jsxs(f.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),a.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),a.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),a.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:o==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),s==="upcoming"&&a.jsxs(f.Box,{display:"flex",gap:"2",children:[d&&a.jsx(f.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:d,children:"Join Call"}),u&&a.jsx(f.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:u,children:"Reschedule"}),l&&a.jsx(f.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:l,children:"Cancel"})]})]})}const j6={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)"}},T6=()=>a.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:[a.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"}),a.jsx("path",{d:"m8.5 8.5 7 7"})]}),B6=()=>a.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:[a.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),a.jsx("polyline",{points:"7 10 12 15 17 10"}),a.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),Lc=()=>a.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:[a.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),a.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),a.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),a.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]});function F6({rxId:e,doctorName:t,doctorSpecialty:n,issuedDate:r,expiryDate:i,drugs:o,refillsRemaining:s,status:l="active",colorScheme:u="blue",onDownload:d,...c}){const h=j6[l],p=u==="purple"?"#7700CC":"#0685FF",m=u==="purple"?"color-mix(in srgb, #7700CC 8%, transparent)":"color-mix(in srgb, #0685FF 8%, transparent)";return a.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",...c,children:[a.jsxs(f.Box,{px:"5",py:"3.5",display:"flex",alignItems:"center",justifyContent:"space-between",style:{borderBottom:"1px solid var(--chakra-colors-border)",background:m},children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[a.jsx(f.Box,{style:{color:p},children:a.jsx(T6,{})}),a.jsx(f.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",style:{color:p},children:"Prescription"}),e&&a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:e})]}),a.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:[a.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:h.color,display:"inline-block"}}),h.label]})]}),a.jsxs(f.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"border",flexWrap:"wrap",gap:"2",children:[a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:t}),n&&a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]}),a.jsxs(f.Box,{display:"flex",gap:"4",children:[a.jsxs(f.Box,{children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[a.jsx(Lc,{}),a.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Issued"})]}),a.jsx(f.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),i&&a.jsxs(f.Box,{children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[a.jsx(Lc,{}),a.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Expires"})]}),a.jsx(f.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]})]})]}),a.jsx(f.Box,{px:"5",py:"4",display:"flex",flexDirection:"column",gap:"3",children:o.map((g,x)=>a.jsxs(f.Box,{display:"flex",alignItems:"flex-start",gap:"3",p:"3",borderRadius:"md",bg:"bg.subtle",border:"1px solid",borderColor:"border",children:[a.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:"50%",background:m,color:p,fontSize:11,fontWeight:700,fontFamily:"var(--font-heading)",flexShrink:0,marginTop:1},children:x+1}),a.jsxs(f.Box,{flex:"1",minW:"0",children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[a.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:g.name}),a.jsx("span",{style:{padding:"1px 6px",borderRadius:4,fontSize:11,fontWeight:600,background:m,color:p,fontFamily:"var(--font-body)"},children:g.dosage})]}),a.jsxs(f.Box,{display:"flex",gap:"3",mt:"1",flexWrap:"wrap",children:[a.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["🕐 ",g.frequency]}),g.duration&&a.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["📅 ",g.duration]}),g.instructions&&a.jsxs(f.Box,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",fontStyle:"italic",children:["ℹ️ ",g.instructions]})]})]})]},x))}),a.jsxs(f.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderTop:"1px solid",borderColor:"border",children:[s!==void 0?a.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[a.jsx(f.Box,{as:"span",fontWeight:"semibold",color:"text.heading",children:s})," ","refill",s!==1?"s":""," remaining"]}):a.jsx(f.Box,{}),d&&a.jsxs("button",{onClick:d,"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:p,background:m,border:"none",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:g=>{g.currentTarget.style.opacity="0.8"},onMouseLeave:g=>{g.currentTarget.style.opacity="1"},children:[a.jsx(B6,{}),"Download"]})]})]})}const E6={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 Yf({code:e,description:t,category:n="primary",...r}){const i=E6[n];return a.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",...r,children:[a.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&&a.jsx(f.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]})}function Kf({bloodType:e,...t}){return a.jsx(f.Box,{display:"inline-flex",alignItems:"center",...t,children:a.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:[a.jsx("svg",{width:"10",height:"12",viewBox:"0 0 12 16",fill:"currentColor","aria-hidden":"true",children:a.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 A6={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 qf({allergen:e,severity:t="mild",...n}){const r=A6[t];return a.jsx(f.Box,{display:"inline-flex",alignItems:"center",...n,children:a.jsxs("span",{"aria-label":`Allergy: ${e} — ${r.label} severity`,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:r.bg,color:r.color,border:`1px solid ${r.border}`,borderLeftWidth:t==="life-threatening"?3:1,whiteSpace:"nowrap"},children:[a.jsx("span",{"aria-hidden":"true",children:r.icon}),e,a.jsxs("span",{style:{opacity:.7,fontSize:10},children:["· ",r.label]})]})})}function L6({diagnoses:e,bloodType:t,allergies:n,direction:r="row",...i}){return a.jsxs(f.Box,{display:"flex",flexDirection:r,flexWrap:"wrap",gap:"2",alignItems:r==="row"?"center":"flex-start",...i,children:[t&&a.jsx(Kf,{bloodType:t}),e==null?void 0:e.map((o,s)=>a.jsx(Yf,{code:o.code,description:o.description,category:o.category},s)),n==null?void 0:n.map((o,s)=>a.jsx(qf,{allergen:o.allergen,severity:o.severity},s))]})}var Xf={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ic=S.createContext&&S.createContext(Xf),I6=["attr","size","title"];function D6(e,t){if(e==null)return{};var n,r,i=R6(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function R6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ei(){return ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ei.apply(null,arguments)}function Dc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dc(Object(n),!0).forEach(function(r){M6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function M6(e,t,n){return(t=P6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P6(e){var t=O6(e,"string");return typeof t=="symbol"?t:t+""}function O6(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zf(e){return e&&e.map((t,n)=>S.createElement(t.tag,ti({key:n},t.attr),Zf(t.child)))}function Ze(e){return t=>S.createElement(z6,ei({attr:ti({},e.attr)},t),Zf(e.child))}function z6(e){var t=n=>{var{attr:r,size:i,title:o}=e,s=D6(e,I6),l=i||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),S.createElement("svg",ei({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:u,style:ti(ti({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&S.createElement("title",null,o),e.children)};return Ic!==void 0?S.createElement(Ic.Consumer,null,n=>t(n)):t(Xf)}function _6(e){return Ze({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 N6(e){return Ze({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 V6(e){return Ze({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 H6(e){return Ze({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 W6(e){return Ze({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 U6(e){return Ze({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 $6(e){return Ze({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 G6(e){return Ze({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 Y6(e){return Ze({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 K6(e){return Ze({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 q6(e){return Ze({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 X6(e){return Ze({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 Z6(e){return Ze({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 J6(e){return Ze({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 Q6=({muted:e})=>e?a.jsx(G6,{size:18,"aria-hidden":"true"}):a.jsx($6,{size:18,"aria-hidden":"true"}),e3=({off:e})=>e?a.jsx(N6,{size:18,"aria-hidden":"true"}):a.jsx(_6,{size:18,"aria-hidden":"true"}),t3=({active:e})=>a.jsx(V6,{size:18,color:e?"var(--chakra-colors-status-success, #16A34A)":"currentColor","aria-hidden":"true"}),n3=()=>a.jsx(W6,{size:18,"aria-hidden":"true"});function r3({participantName:e,participantRole:t,participantAvatar:n,duration:r,isMuted:i=!1,isCameraOff:o=!1,isSharingScreen:s=!1,onToggleMute:l,onToggleCamera:u,onEndCall:d,onShareScreen:c,position:h="bottom",variant:p="adaptive",...m}){const[g,x]=S.useState(i),[y,b]=S.useState(o),T=p==="dark",w=()=>{x(C=>!C),l==null||l()},A=()=>{b(C=>!C),u==null||u()},E=({onClick:C,ariaLabel:O,active:B,isEndCall:F=!1,children:L})=>{let R=T?"rgba(255,255,255,0.1)":"var(--chakra-colors-bg-subtle, #F0F4F8)",D=T?"white":"var(--chakra-colors-text-heading, #111926)",N=T?"rgba(255,255,255,0.2)":"var(--chakra-colors-border, #E2E8F0)";return F?(R="var(--chakra-colors-status-error, #DC2626)",D="white",N="color-mix(in srgb, var(--chakra-colors-status-error, #DC2626) 85%, black)"):B&&(R="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",D="var(--chakra-colors-status-error, #DC2626)",N="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.25))"),a.jsx("button",{onClick:C,"aria-label":O,"aria-pressed":B,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:44,height:44,borderRadius:"50%",border:B?"1px solid var(--chakra-colors-status-error)":"1px solid transparent",cursor:"pointer",transition:"all 0.15s ease",background:R,color:D,WebkitTapHighlightColor:"transparent"},onMouseEnter:P=>{const I=P.currentTarget;I.style.background=N,I.style.transform="scale(1.06)"},onMouseLeave:P=>{const I=P.currentTarget;I.style.background=R,I.style.transform="scale(1)"},children:L})};return a.jsxs(f.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:T?void 0:"bg.surface",borderColor:"border",style:{minHeight:72,paddingTop:12,paddingBottom:h==="bottom"?"calc(12px + env(safe-area-inset-bottom, 0px))":12,background:T?"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"},...m,children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[a.jsx(ni,{src:n,name:e,size:"md"}),a.jsxs(f.Box,{children:[a.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",color:T?"white":"text.heading",children:e}),t&&a.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",color:T?"rgba(255,255,255,0.6)":"text.muted",children:t})]}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",ml:"2",children:[a.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:[a.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"]}),r&&a.jsx(f.Box,{fontSize:"sm",fontFamily:"var(--font-mono, monospace)",fontWeight:"600",color:T?"rgba(255,255,255,0.8)":"text.heading",style:{letterSpacing:"0.05em"},children:r})]})]}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[l&&a.jsx(E,{onClick:w,ariaLabel:g?"Unmute microphone":"Mute microphone",active:g,children:a.jsx(Q6,{muted:g})}),u&&a.jsx(E,{onClick:A,ariaLabel:y?"Turn camera on":"Turn camera off",active:y,children:a.jsx(e3,{off:y})}),c&&a.jsx(E,{onClick:c,ariaLabel:s?"Stop sharing screen":"Share screen",active:s,children:a.jsx(t3,{active:s})}),d&&a.jsx(E,{onClick:d,ariaLabel:"End call",isEndCall:!0,children:a.jsx(n3,{})})]})]})}const i3={consultation:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF",icon:a.jsx(U6,{size:14,"aria-hidden":"true"})},lab:{bg:"color-mix(in srgb, #7700CC 12%, transparent)",color:"#7700CC",icon:a.jsx(q6,{size:14,"aria-hidden":"true"})},prescription:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:a.jsx(H6,{size:14,"aria-hidden":"true"})},vitals:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706",icon:a.jsx(J6,{size:14,"aria-hidden":"true"})},note:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B",icon:a.jsx(X6,{size:14,"aria-hidden":"true"})},admission:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444",icon:a.jsx(K6,{size:14,"aria-hidden":"true"})},discharge:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:a.jsx(Y6,{size:14,"aria-hidden":"true"})},custom:{bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",icon:a.jsx(Z6,{size:14,"aria-hidden":"true"})}},Rc={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 o3(){return a.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",children:[a.jsxs(f.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[a.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",bg:"bg.subtle",style:{animation:"medix-shimmer 1.5s infinite"}}),a.jsx(f.Box,{w:"px",flex:"1",minH:"8",bg:"border",mt:"2"})]}),a.jsxs(f.Box,{flex:"1",pb:"6",children:[a.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:"40%",mb:"2",style:{animation:"medix-shimmer 1.5s infinite"}}),a.jsx(f.Box,{h:"3",bg:"bg.subtle",borderRadius:"full",w:"65%",style:{animation:"medix-shimmer 1.5s infinite"}})]})]})}function s3({events:e,compact:t=!1,isLoading:n=!1,loadingCount:r=4,colorScheme:i="blue",...o}){const s=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?a.jsx(f.Box,{...o,children:Array.from({length:r}).map((l,u)=>a.jsx(o3,{},u))}):a.jsx(f.Box,{...o,role:"feed","aria-label":"Patient medical timeline",children:e.map((l,u)=>{const d=i3[l.type],c=u===e.length-1;return a.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",role:"article","aria-label":`${l.title} on ${l.date}`,children:[a.jsxs(f.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[a.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",style:{background:d.bg,color:d.color,border:`1.5px solid ${d.color}40`,cursor:l.onClick?"pointer":"default",transition:"transform 0.15s, box-shadow 0.15s",flexShrink:0},onClick:l.onClick,role:l.onClick?"button":void 0,tabIndex:l.onClick?0:void 0,onKeyDown:l.onClick?h=>{(h.key==="Enter"||h.key===" ")&&l.onClick()}:void 0,_hover:l.onClick?{transform:"scale(1.1)"}:void 0,children:l.icon??d.icon}),!c&&a.jsx(f.Box,{w:"1px",flex:"1",minH:"8",mt:"1",style:{background:s}})]}),a.jsxs(f.Box,{flex:"1",pb:c?"0":"5",cursor:l.onClick?"pointer":"default",onClick:l.onClick,_hover:l.onClick?{opacity:.85}:void 0,transition:"opacity 0.15s",children:[a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[a.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:l.title}),l.badgeLabel&&l.badgeStatus&&a.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"1px 7px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:Rc[l.badgeStatus].bg,color:Rc[l.badgeStatus].color},children:l.badgeLabel})]}),!t&&l.description&&a.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l.description}),a.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"1",flexWrap:"wrap",children:[a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l.date}),l.provider&&a.jsxs(a.Fragment,{children:[a.jsx(f.Box,{w:"1px",h:"3",style:{background:"var(--chakra-colors-border)"}}),a.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l.provider})]})]})]})]},l.id)})})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>f.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>f.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>f.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>f.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>f.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>f.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>f.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>f.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>f.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>f.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>f.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>f.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>f.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>f.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>f.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>f.WrapItem});exports.Accordion=p6;exports.Alert=Go;exports.AllergyBadge=qf;exports.AppointmentCard=C6;exports.Avatar=ni;exports.AvatarGroup=Oh;exports.Badge=Ko;exports.BlogCard=y6;exports.BloodTypeBadge=Kf;exports.Breadcrumb=z2;exports.Button=Ye;exports.Calendar=Zo;exports.Card=tu;exports.CardBody=$p;exports.CardFooter=Gp;exports.CardHeader=Up;exports.Checkbox=Zc;exports.Combobox=kp;exports.Container=ru;exports.CookieConsentBanner=of;exports.DashboardLayout=qd;exports.DataTable=b6;exports.DatePicker=yp;exports.DateRangePicker=bp;exports.Divider=Kc;exports.DoctorCard=v6;exports.Drawer=ey;exports.EmptyState=X2;exports.FileUpload=Sp;exports.Footer=Zd;exports.FormControl=np;exports.FullPageSpinner=zh;exports.ICD10Badge=Yf;exports.IconButton=Uc;exports.Input=qo;exports.Logo=sr;exports.MedicalRecordBadge=L6;exports.MedixProvider=Eh;exports.Modal=q2;exports.Navbar=F2;exports.NotFoundPage=Z2;exports.OTPInput=Qc;exports.PWAInstallPrompt=af;exports.Pagination=Jd;exports.PatientTimeline=s3;exports.PhoneInput=up;exports.PinInput=rp;exports.PrescriptionCard=F6;exports.Progress=ef;exports.RadioGroup=Jh;exports.RichTextEditor=Wp;exports.RichTextInput=Jo;exports.SearchInput=Xo;exports.SectionHeader=Kp;exports.Select=Zh;exports.ServerErrorPage=J2;exports.Skeleton=qt;exports.SkeletonCard=U2;exports.SkeletonText=Qd;exports.Spinner=Gc;exports.StatCard=nu;exports.Stepper=H2;exports.Switch=Jc;exports.Tabs=N2;exports.Tag=Yc;exports.TagInput=Cp;exports.TagsInput=eu;exports.TelehealthCallBar=r3;exports.TestimonialCard=m6;exports.Textarea=qc;exports.ThemeColorPalette=iu;exports.Toaster=Wc;exports.Tooltip=Eo;exports.VitalBadge=w6;exports.colorTokens=V;exports.dismissToast=wh;exports.htmlToMarkdown=Un;exports.markdownToHtml=$t;exports.medixConfig=Vc;exports.radiiTokens=_c;exports.shadowTokens=Nc;exports.spacingTokens=zc;exports.system=Hc;exports.textStyleTokens=Oc;exports.toast=Wn;exports.typographyTokens=pn;exports.useColorScheme=Ih;exports.useIsDarkMode=Yo;exports.useThemeMode=or;
426
+ `}),n}function Dc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Rc(e,t){const n=Z4(e,t),r=n.one(e,void 0),o=N4(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
427
+ `},o),s}function n6(e,t){return e&&"run"in e?async function(n,r){const o=Rc(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Rc(n,{file:r,...e||t})}}function Mc(e){if(e)throw e}var ei,Pc;function r6(){if(Pc)return ei;Pc=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},s=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!h)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},a=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},l=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return ei=function u(){var c,d,h,p,m,g,x=arguments[0],y=1,v=arguments.length,j=!1;for(typeof x=="boolean"&&(j=x,x=arguments[1]||{},y=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});y<v;++y)if(c=arguments[y],c!=null)for(d in c)h=l(x,d),p=l(c,d),x!==p&&(j&&p&&(s(p)||(m=o(p)))?(m?(m=!1,g=h&&o(h)?h:[]):g=h&&s(h)?h:{},a(x,{name:d,newValue:u(j,g,p)})):typeof p<"u"&&a(x,{name:d,newValue:p}));return x},ei}var o6=r6();const ti=Ef(o6);function Xi(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 i6(){const e=[],t={run:n,use:r};return t;function n(...o){let s=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);l(null,...o);function l(u,...c){const d=e[++s];let h=-1;if(u){a(u);return}for(;++h<o.length;)(c[h]===null||c[h]===void 0)&&(c[h]=o[h]);o=c,d?s6(d,l)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function s6(e,t){let n;return r;function r(...a){const l=e.length>a.length;let u;l&&a.push(o);try{u=e.apply(this,a)}catch(c){const d=c;if(l&&n)throw d;return o(d)}l||(u&&u.then&&typeof u.then=="function"?u.then(s,o):u instanceof Error?o(u):s(u))}function o(a,...l){n||(n=!0,t(a,...l))}function s(a){o(null,a)}}const bt={basename:a6,dirname:l6,extname:c6,join:u6,sep:"/"};function a6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');gr(e);let n=0,r=-1,o=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else r<0&&(s=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,l=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else a<0&&(s=!0,a=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(r=o):(l=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function l6(e){if(gr(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function c6(e){gr(e);let t=e.length,n=-1,r=0,o=-1,s=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?o<0?o=t:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||n<0||s===0||s===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function u6(...e){let t=-1,n;for(;++t<e.length;)gr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":d6(n)}function d6(e){gr(e);const t=e.codePointAt(0)===47;let n=f6(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function f6(e,t){let n="",r=0,o=-1,s=0,a=-1,l,u;for(;++a<=e.length;){if(a<e.length)l=e.codePointAt(a);else{if(l===47)break;l=47}if(l===47){if(!(o===a-1||s===1))if(o!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),o=a,s=0;continue}}else if(n.length>0){n="",r=0,o=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,s=0}else l===46&&s>-1?s++:s=-1}return n}function gr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const h6={cwd:p6};function p6(){return"/"}function Zi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function m6(e){if(typeof e=="string")e=new URL(e);else if(!Zi(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 g6(e)}function g6(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ni=["history","path","basename","stem","extname","dirname"];class nh{constructor(t){let n;t?Zi(t)?n={path:t}:typeof t=="string"||x6(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":h6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ni.length;){const s=ni[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let o;for(o in n)ni.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?bt.basename(this.path):void 0}set basename(t){oi(t,"basename"),ri(t,"basename"),this.path=bt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?bt.dirname(this.path):void 0}set dirname(t){Oc(this.basename,"dirname"),this.path=bt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?bt.extname(this.path):void 0}set extname(t){if(ri(t,"extname"),Oc(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=bt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Zi(t)&&(t=m6(t)),oi(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?bt.basename(this.path,this.extname):void 0}set stem(t){oi(t,"stem"),ri(t,"stem"),this.path=bt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Ne(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ri(e,t){if(e&&e.includes(bt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+bt.sep+"`")}function oi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Oc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function x6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const y6=(function(e){const r=this.constructor.prototype,o=r[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),b6={}.hasOwnProperty;class Zs extends y6{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=i6()}copy(){const t=new Zs;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ti(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ai("data",this.frozen),this.namespace[t]=n,this):b6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ai("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,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Mr(t),r=this.parser||this.Parser;return ii("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ii("process",this.parser||this.Parser),si("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(s,a){const l=Mr(t),u=r.parse(l);r.run(u,l,function(d,h,p){if(d||!h||!p)return c(d);const m=h,g=r.stringify(m,p);w6(g)?p.value=g:p.result=g,c(d,p)});function c(d,h){d||!h?a(d):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),ii("processSync",this.parser||this.Parser),si("processSync",this.compiler||this.Compiler),this.process(t,o),_c("processSync","process",n),r;function o(s,a){n=!0,Mc(s),r=a}}run(t,n,r){zc(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,l){const u=Mr(n);o.run(t,u,c);function c(d,h,p){const m=h||t;d?l(d):a?a(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,s),_c("runSync","run",r),o;function s(a,l){Mc(a),o=l,r=!0}}stringify(t,n){this.freeze();const r=Mr(n),o=this.compiler||this.Compiler;return si("stringify",o),zc(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(ai("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...h]=c;u(d,h)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))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");l(c.plugins),c.settings&&(o.settings=ti(!0,o.settings,c.settings))}function l(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const h=c[d];s(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===c){p=h;break}if(p===-1)r.push([c,...d]);else if(d.length>0){let[m,...g]=d;const x=r[p][1];Xi(x)&&Xi(m)&&(m=ti(!0,x,m)),r[p]=[c,m,...g]}}}}const v6=new Zs().freeze();function ii(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function si(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ai(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 zc(e){if(!Xi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _c(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mr(e){return k6(e)?e:new nh(e)}function k6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function w6(e){return typeof e=="string"||S6(e)}function S6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Nc=[],Vc={allowDangerousHtml:!0},j6=/^(https?|ircs?|mailto|xmpp)$/i,T6=[{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 B6(e){const t=E6(e),n=F6(e);return A6(t.runSync(t.parse(n),n),e)}function E6(e){const t=e.rehypePlugins||Nc,n=e.remarkPlugins||Nc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Vc}:Vc;return v6().use(s4).use(n).use(n6,r).use(t)}function F6(e){const t=e.children||"",n=new nh;return typeof t=="string"&&(n.value=t),n}function A6(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,s=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||L6;for(const d of T6)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+C6+d.id,void 0);return th(e,c),_b(e,{Fragment:i.Fragment,components:o,ignoreInvalidStyle:!0,jsx:i.jsx,jsxs:i.jsxs,passKeys:!0,passNode:!0});function c(d,h,p){if(d.type==="raw"&&p&&typeof h=="number")return a?p.children.splice(h,1):p.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let m;for(m in Zo)if(Object.hasOwn(Zo,m)&&Object.hasOwn(d.properties,m)){const g=d.properties[m],x=Zo[m];(x===null||x.includes(d.tagName))&&(d.properties[m]=u(String(g||""),m,d))}}if(d.type==="element"){let m=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!m&&r&&typeof h=="number"&&(m=!r(d,h,p)),m&&p&&typeof h=="number")return l&&d.children?p.children.splice(h,1,...d.children):p.children.splice(h,1),h}}}function L6(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||j6.test(e.slice(0,t))?e:""}const I6={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function D6({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:r="blue",answerType:o="HTML",...s}){const a=I6[r],[l,u]=S.useState(new Set(n)),c=d=>{u(h=>{const p=new Set(h);return p.has(d)?p.delete(d):(t||p.clear(),p.add(d)),p})};return i.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"4",...s,children:e.map(d=>{const h=l.has(d.id);return i.jsxs(f.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:h?a.ring:"border"},children:[i.jsxs(f.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:()=>c(d.id),"aria-expanded":h,children:[i.jsx(f.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:d.question}),i.jsx(f.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:h?"none":"1.5px solid var(--medix-form-text)",background:h?a.solid:"transparent",color:h?"#ffffff":"inherit",flexShrink:0},children:h?i.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:i.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[i.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),i.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),i.jsx(f.Box,{overflow:"hidden",maxH:h?"800px":"0px",opacity:h?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:i.jsx(f.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:typeof d.answer=="string"?o==="MD"?i.jsx(B6,{children:d.answer}):i.jsx("span",{dangerouslySetInnerHTML:{__html:ub.sanitize(d.answer)}}):d.answer})})]},d.id)})})}function R6({quote:e,authorName:t,authorTitle:n,authorAvatar:r,rating:o,...s}){return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"none",_dark:{boxShadow:"none"},...s,children:[o!==void 0&&i.jsx(f.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((a,l)=>i.jsx(f.Box,{as:"span",fontSize:"sm",color:l<o?"#F59E0B":"text.muted",children:"★"},l))}),i.jsxs(f.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[r?i.jsx("img",{src:r,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):i.jsx(f.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()}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const M6={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function P6(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 O6({title:e,excerpt:t,category:n,date:r,coverImage:o,href:s,onClick:a,colorScheme:l="blue",...u}){const c=!!(s||a),d=P6(r),h=M6[l],p={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",textAlign:"left"},m=i.jsxs(f.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:c?{transform:"translateY(-4px)"}:void 0,...u,children:[i.jsxs(f.Box,{position:"relative",overflow:"hidden",children:[o?i.jsx("img",{src:o,alt:e,style:{width:"100%",height:300,objectFit:"cover",display:"block",borderRadius:"20px"}}):i.jsx(f.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),d&&i.jsxs(f.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:[i.jsx(f.Box,{style:{fontSize:22,fontWeight:700,color:h.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:d.day}),i.jsx(f.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:d.weekday})]})]}),i.jsxs(f.Box,{px:"0",pt:"3",pb:"4",children:[n&&i.jsx(f.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}),i.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&i.jsx(f.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 s?i.jsx("a",{href:s,style:p,onClick:a,children:m}):a?i.jsx("button",{type:"button",style:p,onClick:a,children:m}):m}function z6({columns:e,data:t,rowKey:n="id",isLoading:r=!1,emptyMessage:o="No data available",sortable:s=!1,sortKey:a,sortDirection:l="asc",onSort:u,striped:c=!0,onRowClick:d,caption:h,enablePagination:p=!1,pageSize:m=10,page:g,onPageChange:x,enableSearch:y=!1,searchPlaceholder:v="Search table...",searchQuery:j,onSearchChange:w,style:F,className:B,stickyFirstColumn:C=!1}){const[P,A]=S.useState(""),E=j??P,[L,R]=S.useState(1),D=g??L,[N,O]=S.useState(a),[I,M]=S.useState(l),H=a??N,W=a?l:I,$=Z=>{A(Z),R(1),w==null||w(Z)},b=Z=>{const Q=H===Z&&W==="asc"?"desc":"asc";O(Z),M(Q),u==null||u(Z,Q)},Y=Z=>{R(Z),x==null||x(Z)},oe=S.useMemo(()=>{if(!E.trim())return t;const Z=E.toLowerCase().trim();return t.filter(Q=>e.some(ue=>{const ee=Q[ue.key];return ee==null?!1:String(ee).toLowerCase().includes(Z)}))},[t,e,E]),T=S.useMemo(()=>!H||u?oe:[...oe].sort((Z,Q)=>{const ue=Z[H],ee=Q[H],ze=String(ue??""),Ae=String(ee??""),Je=ze.localeCompare(Ae,void 0,{numeric:!0,sensitivity:"base"});return W==="asc"?Je:-Je}),[oe,H,W,u]),ie=T.length,se=S.useMemo(()=>{if(!p)return T;const Z=(D-1)*m;return T.slice(Z,Z+m)},[T,p,D,m]),X=({colKey:Z})=>H!==Z?i.jsx(f.Text,{as:"span",opacity:.3,ml:"1",fontSize:"xs",children:"↕"}):i.jsx(f.Text,{as:"span",ml:"1",color:"text.heading",fontSize:"xs",children:W==="asc"?"↑":"↓"});return i.jsxs(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"none",_dark:{boxShadow:"none"},style:F,className:B,children:[y&&i.jsx(f.Box,{p:"4",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:i.jsx(rs,{placeholder:v,value:E,onChange:Z=>$(Z.target.value),maxW:"360px"})}),i.jsx(f.Box,{overflowX:"auto",children:i.jsxs(f.Box,{as:"table",w:"full",style:{borderCollapse:"collapse"},"aria-label":h,children:[h&&i.jsx("caption",{style:{display:"none"},children:h}),i.jsx(f.Box,{as:"thead",children:i.jsx(f.Box,{as:"tr",bg:"bg.subtle",borderBottom:"1px solid",borderColor:"border",children:e.map((Z,Q)=>{const ue=C&&Q===0;return i.jsx(f.Box,{as:"th",py:"3",px:"4",textAlign:Z.align??"left",minW:Z.minWidth,fontSize:"xs",fontWeight:"600",letterSpacing:"0.05em",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",whiteSpace:"nowrap",userSelect:"none",cursor:Z.sortable||s?"pointer":"default",_hover:Z.sortable||s?{color:"text.heading"}:void 0,onClick:()=>Z.sortable||s?b(Z.key):void 0,"aria-sort":H===Z.key?W==="asc"?"ascending":"descending":void 0,position:ue?"sticky":void 0,left:ue?0:void 0,zIndex:ue?3:void 0,bg:ue?"bg.subtle":void 0,borderRight:ue?"1px solid":void 0,borderColor:ue?"border":void 0,boxShadow:ue?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:i.jsxs(f.Flex,{as:"span",align:"center",justify:Z.align==="right"?"flex-end":Z.align==="center"?"center":"flex-start",children:[Z.label,(Z.sortable||s)&&i.jsx(X,{colKey:Z.key})]})},Z.key)})})}),i.jsx(f.Box,{as:"tbody",children:r?Array.from({length:5}).map((Z,Q)=>i.jsx(f.Box,{as:"tr",borderBottom:"1px solid",borderColor:"border",children:e.map(ue=>i.jsx(f.Box,{as:"td",py:"3.5",px:"4",children:i.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},ue.key))},Q)):se.length===0?i.jsx(f.Box,{as:"tr",children:i.jsx("td",{colSpan:e.length,style:{textAlign:"center",padding:"48px 16px"},children:i.jsx(f.Text,{color:"text.muted",fontFamily:"var(--font-body)",fontSize:"sm",children:o})})}):se.map((Z,Q)=>{const ue=String(Z[n]??Q);return i.jsx(f.Box,{as:"tr",onClick:()=>d==null?void 0:d(Z,Q),bg:c&&Q%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((ee,ze)=>{const Ae=C&&ze===0;return i.jsx(f.Box,{as:"td",py:"3.5",px:"4",textAlign:ee.align??"left",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",verticalAlign:"middle",position:Ae?"sticky":void 0,left:Ae?0:void 0,zIndex:Ae?2:void 0,bg:Ae?c&&Q%2===1?"bg.subtle":"bg.surface":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:ee.render?ee.render(Z[ee.key],Z,Q):String(Z[ee.key]??"—")},ee.key)})},ue)})})]})}),p&&i.jsxs(f.Flex,{p:"4",borderTop:"1px solid",borderColor:"border",bg:"bg.surface",align:"center",justify:"space-between",flexWrap:"wrap",gap:"4",children:[i.jsxs(f.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:["Showing ",ie===0?0:(D-1)*m+1," to"," ",Math.min(D*m,ie)," of ",ie," entries"]}),i.jsx(cf,{total:ie,pageSize:m,currentPage:D,onChange:Y,compact:!0})]})]})}function _6({name:e,specialty:t,location:n,avatar:r,rating:o,reviewCount:s,experience:a,consultationFee:l,isVerified:u=!1,isAvailable:c=!1,availabilityLabel:d="Available",onBookClick:h,onViewClick:p,variant:m="standard",...g}){return m==="featured"?i.jsxs(f.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",...g,children:[r?i.jsx("img",{src:r,alt:e,style:{width:"100%",height:240,objectFit:"cover",display:"block"}}):i.jsx(f.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:i.jsx(f.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),i.jsxs(f.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[i.jsxs(f.Box,{children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),u&&i.jsx(Ct,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:i.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:[i.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"}),i.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"})]})})]}),i.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[c&&i.jsxs(f.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:[i.jsx(f.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),c&&a&&i.jsx(f.Box,{w:"1px",h:"20px",bg:"border"}),a&&i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[i.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:[i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),i.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l&&i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),i.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"center",children:[p&&i.jsx(f.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:p,children:"view"}),h&&i.jsx(f.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"})]})]})]})]}):m==="compact"?i.jsxs(f.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"},...g,children:[i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[i.jsxs(f.Box,{display:"flex",gap:"4",children:[i.jsx(f.Box,{flexShrink:0,children:r?i.jsx("img",{src:r,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx(f.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)})}),i.jsxs(f.Box,{pt:"1",children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),i.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&m!=="compact"?` • ${n}`:""]})]})]}),p&&i.jsx(f.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:p,pt:"1",children:"View"})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[i.jsx(f.Box,{as:"span",color:"status.warning",mt:"-2px",children:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:i.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.jsxs(f.Box,{as:"span",color:"text.heading",mr:"1",children:[(o==null?void 0:o.toFixed(1))||"New"," ",s?`(${s})`:""]}),n&&i.jsxs(f.Box,{as:"span",children:[" • ",n]}),a&&i.jsxs(f.Box,{as:"span",children:[" • ",a]})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),h&&i.jsx(f.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"})]})]}):i.jsxs(f.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"},...g,children:[i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[i.jsxs(f.Box,{display:"flex",gap:"4",minW:"0",flex:"1",children:[i.jsx(f.Box,{flexShrink:0,children:r?i.jsx("img",{src:r,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx(f.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)})}),i.jsxs(f.Box,{pt:"1",minW:"0",flex:"1",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",minW:"0",children:[i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minW:"0",flex:"1",children:e}),u&&i.jsx(Ct,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:i.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:[i.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"}),i.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"})]})})]}),i.jsxs(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:[t,n?` • ${n}`:""]})]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[i.jsx(f.Box,{as:"span",color:"status.warning",mt:"-2px",children:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:i.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"})})}),(o==null?void 0:o.toFixed(1))||"New"," ",s?i.jsxs(f.Box,{as:"span",color:"text.muted",children:["(",s,")"]}):null]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[c&&i.jsxs(f.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:[i.jsx(f.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),c&&a&&i.jsx(f.Box,{w:"1px",h:"20px",bg:"border"}),a&&i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[i.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:[i.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),i.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),i.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),i.jsx(f.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),i.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"center",children:[p&&i.jsx(f.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:p,children:"view"}),h&&i.jsx(f.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 N6={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:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[i.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"var(--chakra-colors-status-success)"}),i.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:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[i.jsx("path",{d:"M12 2L2 21h20L12 2z",fill:"var(--chakra-colors-status-warning)"}),i.jsx("path",{d:"M12 9v5",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),i.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:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[i.jsx("path",{d:"M8.5 2h7l6.5 6.5v7L15.5 22h-7L2 15.5v-7L8.5 2z",fill:"var(--chakra-colors-status-error)"}),i.jsx("path",{d:"M12 7v6",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),i.jsx("circle",{cx:"12",cy:"16.5",r:"1",fill:"white"})]})}};function V6({label:e,value:t,unit:n,status:r="normal",...o}){const s=N6[r];return i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:s.bg,border:"1px solid",borderColor:s.border,...o,children:[i.jsx("span",{"aria-label":s.ariaLabel,style:{display:"inline-flex",alignItems:"center",flexShrink:0},children:s.icon}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),i.jsxs(f.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[i.jsx(f.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&i.jsx(f.Box,{fontSize:"xs",color:s.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const W6={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function H6({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:r,time:o,type:s="video",status:a="upcoming",onCancel:l,onReschedule:u,onJoin:c,...d}){const h=W6[a];return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?i.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):i.jsx(f.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)}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),i.jsx(ts,{status:h.color,size:"sm",children:h.label})]}),i.jsxs(f.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:s==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),a==="upcoming"&&i.jsxs(f.Box,{display:"flex",gap:"2",children:[c&&i.jsx(f.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:c,children:"Join Call"}),u&&i.jsx(f.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:u,children:"Reschedule"}),l&&i.jsx(f.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:l,children:"Cancel"})]})]})}const U6={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)"}},$6=()=>i.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:[i.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"}),i.jsx("path",{d:"m8.5 8.5 7 7"})]}),G6=()=>i.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:[i.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),i.jsx("polyline",{points:"7 10 12 15 17 10"}),i.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),Wc=()=>i.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:[i.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),i.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),i.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),i.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]});function Y6({rxId:e,doctorName:t,doctorSpecialty:n,issuedDate:r,expiryDate:o,drugs:s,refillsRemaining:a,status:l="active",colorScheme:u="blue",onDownload:c,...d}){const h=U6[l],p=u==="purple"?"#7700CC":"#0685FF",m=u==="purple"?"color-mix(in srgb, #7700CC 8%, transparent)":"color-mix(in srgb, #0685FF 8%, transparent)";return i.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",...d,children:[i.jsxs(f.Box,{px:"5",py:"3.5",display:"flex",alignItems:"center",justifyContent:"space-between",style:{borderBottom:"1px solid var(--chakra-colors-border)",background:m},children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[i.jsx(f.Box,{style:{color:p},children:i.jsx($6,{})}),i.jsx(f.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",style:{color:p},children:"Prescription"}),e&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:e})]}),i.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:[i.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:h.color,display:"inline-block"}}),h.label]})]}),i.jsxs(f.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"border",flexWrap:"wrap",gap:"2",children:[i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:t}),n&&i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]}),i.jsxs(f.Box,{display:"flex",gap:"4",children:[i.jsxs(f.Box,{children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[i.jsx(Wc,{}),i.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Issued"})]}),i.jsx(f.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),o&&i.jsxs(f.Box,{children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[i.jsx(Wc,{}),i.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Expires"})]}),i.jsx(f.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]})]})]}),i.jsx(f.Box,{px:"5",py:"4",display:"flex",flexDirection:"column",gap:"3",children:s.map((g,x)=>i.jsxs(f.Box,{display:"flex",alignItems:"flex-start",gap:"3",p:"3",borderRadius:"md",bg:"bg.subtle",border:"1px solid",borderColor:"border",children:[i.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:"50%",background:m,color:p,fontSize:11,fontWeight:700,fontFamily:"var(--font-heading)",flexShrink:0,marginTop:1},children:x+1}),i.jsxs(f.Box,{flex:"1",minW:"0",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:g.name}),i.jsx("span",{style:{padding:"1px 6px",borderRadius:4,fontSize:11,fontWeight:600,background:m,color:p,fontFamily:"var(--font-body)"},children:g.dosage})]}),i.jsxs(f.Box,{display:"flex",gap:"3",mt:"1",flexWrap:"wrap",children:[i.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["🕐 ",g.frequency]}),g.duration&&i.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["📅 ",g.duration]}),g.instructions&&i.jsxs(f.Box,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",fontStyle:"italic",children:["ℹ️ ",g.instructions]})]})]})]},x))}),i.jsxs(f.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderTop:"1px solid",borderColor:"border",children:[a!==void 0?i.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[i.jsx(f.Box,{as:"span",fontWeight:"semibold",color:"text.heading",children:a})," ","refill",a!==1?"s":""," remaining"]}):i.jsx(f.Box,{}),c&&i.jsxs("button",{onClick:c,"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:p,background:m,border:"none",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:g=>{g.currentTarget.style.opacity="0.8"},onMouseLeave:g=>{g.currentTarget.style.opacity="1"},children:[i.jsx(G6,{}),"Download"]})]})]})}const K6={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 rh({code:e,description:t,category:n="primary",...r}){const o=K6[n];return i.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",...r,children:[i.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:o.bg,color:o.color,border:`1px solid ${o.border}`,cursor:t?"help":"default",whiteSpace:"nowrap"},children:e}),t&&i.jsx(f.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]})}function oh({bloodType:e,...t}){return i.jsx(f.Box,{display:"inline-flex",alignItems:"center",...t,children:i.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:[i.jsx("svg",{width:"10",height:"12",viewBox:"0 0 12 16",fill:"currentColor","aria-hidden":"true",children:i.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 q6={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 ih({allergen:e,severity:t="mild",...n}){const r=q6[t];return i.jsx(f.Box,{display:"inline-flex",alignItems:"center",...n,children:i.jsxs("span",{"aria-label":`Allergy: ${e} — ${r.label} severity`,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:r.bg,color:r.color,border:`1px solid ${r.border}`,borderLeftWidth:t==="life-threatening"?3:1,whiteSpace:"nowrap"},children:[i.jsx("span",{"aria-hidden":"true",children:r.icon}),e,i.jsxs("span",{style:{opacity:.7,fontSize:10},children:["· ",r.label]})]})})}function X6({diagnoses:e,bloodType:t,allergies:n,direction:r="row",...o}){return i.jsxs(f.Box,{display:"flex",flexDirection:r,flexWrap:"wrap",gap:"2",alignItems:r==="row"?"center":"flex-start",...o,children:[t&&i.jsx(oh,{bloodType:t}),e==null?void 0:e.map((s,a)=>i.jsx(rh,{code:s.code,description:s.description,category:s.category},a)),n==null?void 0:n.map((s,a)=>i.jsx(ih,{allergen:s.allergen,severity:s.severity},a))]})}var sh={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Hc=S.createContext&&S.createContext(sh),Z6=["attr","size","title"];function J6(e,t){if(e==null)return{};var n,r,o=Q6(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Q6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(null,arguments)}function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uc(Object(n),!0).forEach(function(r){e3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e3(e,t,n){return(t=t3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t3(e){var t=n3(e,"string");return typeof t=="symbol"?t:t+""}function n3(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ah(e){return e&&e.map((t,n)=>S.createElement(t.tag,ao({key:n},t.attr),ah(t.child)))}function Ze(e){return t=>S.createElement(r3,so({attr:ao({},e.attr)},t),ah(e.child))}function r3(e){var t=n=>{var{attr:r,size:o,title:s}=e,a=J6(e,Z6),l=o||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),S.createElement("svg",so({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:ao(ao({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&S.createElement("title",null,s),e.children)};return Hc!==void 0?S.createElement(Hc.Consumer,null,n=>t(n)):t(sh)}function o3(e){return Ze({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 i3(e){return Ze({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 s3(e){return Ze({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 a3(e){return Ze({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 l3(e){return Ze({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 c3(e){return Ze({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 u3(e){return Ze({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 d3(e){return Ze({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 f3(e){return Ze({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 h3(e){return Ze({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 p3(e){return Ze({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 m3(e){return Ze({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 g3(e){return Ze({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 x3(e){return Ze({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 y3=({muted:e})=>e?i.jsx(d3,{size:18,"aria-hidden":"true"}):i.jsx(u3,{size:18,"aria-hidden":"true"}),b3=({off:e})=>e?i.jsx(i3,{size:18,"aria-hidden":"true"}):i.jsx(o3,{size:18,"aria-hidden":"true"}),v3=({active:e})=>i.jsx(s3,{size:18,color:e?"var(--chakra-colors-status-success, #16A34A)":"currentColor","aria-hidden":"true"}),k3=()=>i.jsx(l3,{size:18,"aria-hidden":"true"});function w3({participantName:e,participantRole:t,participantAvatar:n,duration:r,isMuted:o=!1,isCameraOff:s=!1,isSharingScreen:a=!1,onToggleMute:l,onToggleCamera:u,onEndCall:c,onShareScreen:d,position:h="bottom",variant:p="adaptive",...m}){const[g,x]=S.useState(o),[y,v]=S.useState(s),j=p==="dark",w=()=>{x(C=>!C),l==null||l()},F=()=>{v(C=>!C),u==null||u()},B=({onClick:C,ariaLabel:P,active:A,isEndCall:E=!1,children:L})=>{let R=j?"rgba(255,255,255,0.1)":"var(--chakra-colors-bg-subtle, #F0F4F8)",D=j?"white":"var(--chakra-colors-text-heading, #111926)",N=j?"rgba(255,255,255,0.2)":"var(--chakra-colors-border, #E2E8F0)";return E?(R="var(--chakra-colors-status-error, #DC2626)",D="white",N="color-mix(in srgb, var(--chakra-colors-status-error, #DC2626) 85%, black)"):A&&(R="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",D="var(--chakra-colors-status-error, #DC2626)",N="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.25))"),i.jsx("button",{onClick:C,"aria-label":P,"aria-pressed":A,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:44,height:44,borderRadius:"50%",border:A?"1px solid var(--chakra-colors-status-error)":"1px solid transparent",cursor:"pointer",transition:"all 0.15s ease",background:R,color:D,WebkitTapHighlightColor:"transparent"},onMouseEnter:O=>{const I=O.currentTarget;I.style.background=N,I.style.transform="scale(1.06)"},onMouseLeave:O=>{const I=O.currentTarget;I.style.background=R,I.style.transform="scale(1)"},children:L})};return i.jsxs(f.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:j?void 0:"bg.surface",borderColor:"border",style:{minHeight:72,paddingTop:12,paddingBottom:h==="bottom"?"calc(12px + env(safe-area-inset-bottom, 0px))":12,background:j?"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"},...m,children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[i.jsx(lo,{src:n,name:e,size:"md"}),i.jsxs(f.Box,{children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",color:j?"white":"text.heading",children:e}),t&&i.jsx(f.Box,{fontSize:"xs",fontFamily:"var(--font-body)",color:j?"rgba(255,255,255,0.6)":"text.muted",children:t})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",ml:"2",children:[i.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:[i.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"]}),r&&i.jsx(f.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:r})]})]}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[l&&i.jsx(B,{onClick:w,ariaLabel:g?"Unmute microphone":"Mute microphone",active:g,children:i.jsx(y3,{muted:g})}),u&&i.jsx(B,{onClick:F,ariaLabel:y?"Turn camera on":"Turn camera off",active:y,children:i.jsx(b3,{off:y})}),d&&i.jsx(B,{onClick:d,ariaLabel:a?"Stop sharing screen":"Share screen",active:a,children:i.jsx(v3,{active:a})}),c&&i.jsx(B,{onClick:c,ariaLabel:"End call",isEndCall:!0,children:i.jsx(k3,{})})]})]})}const S3={consultation:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF",icon:i.jsx(c3,{size:14,"aria-hidden":"true"})},lab:{bg:"color-mix(in srgb, #7700CC 12%, transparent)",color:"#7700CC",icon:i.jsx(p3,{size:14,"aria-hidden":"true"})},prescription:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:i.jsx(a3,{size:14,"aria-hidden":"true"})},vitals:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706",icon:i.jsx(x3,{size:14,"aria-hidden":"true"})},note:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B",icon:i.jsx(m3,{size:14,"aria-hidden":"true"})},admission:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444",icon:i.jsx(h3,{size:14,"aria-hidden":"true"})},discharge:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:i.jsx(f3,{size:14,"aria-hidden":"true"})},custom:{bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",icon:i.jsx(g3,{size:14,"aria-hidden":"true"})}},$c={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 C3(){return i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",children:[i.jsxs(f.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[i.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",bg:"bg.subtle",style:{animation:"medix-shimmer 1.5s infinite"}}),i.jsx(f.Box,{w:"px",flex:"1",minH:"8",bg:"border",mt:"2"})]}),i.jsxs(f.Box,{flex:"1",pb:"6",children:[i.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:"40%",mb:"2",style:{animation:"medix-shimmer 1.5s infinite"}}),i.jsx(f.Box,{h:"3",bg:"bg.subtle",borderRadius:"full",w:"65%",style:{animation:"medix-shimmer 1.5s infinite"}})]})]})}function j3({events:e,compact:t=!1,isLoading:n=!1,loadingCount:r=4,colorScheme:o="blue",...s}){const a=o==="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?i.jsx(f.Box,{...s,children:Array.from({length:r}).map((l,u)=>i.jsx(C3,{},u))}):i.jsx(f.Box,{...s,role:"feed","aria-label":"Patient medical timeline",children:e.map((l,u)=>{const c=S3[l.type],d=u===e.length-1;return i.jsxs(f.Box,{display:"flex",gap:"4",alignItems:"flex-start",role:"article","aria-label":`${l.title} on ${l.date}`,children:[i.jsxs(f.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[i.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",style:{background:c.bg,color:c.color,border:`1.5px solid ${c.color}40`,cursor:l.onClick?"pointer":"default",transition:"transform 0.15s, box-shadow 0.15s",flexShrink:0},onClick:l.onClick,role:l.onClick?"button":void 0,tabIndex:l.onClick?0:void 0,onKeyDown:l.onClick?h=>{(h.key==="Enter"||h.key===" ")&&l.onClick()}:void 0,_hover:l.onClick?{transform:"scale(1.1)"}:void 0,children:l.icon??c.icon}),!d&&i.jsx(f.Box,{w:"1px",flex:"1",minH:"8",mt:"1",style:{background:a}})]}),i.jsxs(f.Box,{flex:"1",pb:d?"0":"5",cursor:l.onClick?"pointer":"default",onClick:l.onClick,_hover:l.onClick?{opacity:.85}:void 0,transition:"opacity 0.15s",children:[i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:l.title}),l.badgeLabel&&l.badgeStatus&&i.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"1px 7px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:$c[l.badgeStatus].bg,color:$c[l.badgeStatus].color},children:l.badgeLabel})]}),!t&&l.description&&i.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l.description}),i.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"1",flexWrap:"wrap",children:[i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l.date}),l.provider&&i.jsxs(i.Fragment,{children:[i.jsx(f.Box,{w:"1px",h:"3",style:{background:"var(--chakra-colors-border)"}}),i.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l.provider})]})]})]})]},l.id)})})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>f.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>f.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>f.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>f.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>f.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>f.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>f.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>f.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>f.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>f.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>f.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>f.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>f.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>f.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>f.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>f.WrapItem});exports.Accordion=D6;exports.Alert=Qi;exports.AllergyBadge=ih;exports.AppointmentCard=H6;exports.Avatar=lo;exports.AvatarGroup=Yh;exports.Badge=ts;exports.BlogCard=O6;exports.BloodTypeBadge=oh;exports.Breadcrumb=ry;exports.Button=Ye;exports.Calendar=os;exports.Card=fu;exports.CardBody=tm;exports.CardFooter=nm;exports.CardHeader=em;exports.Checkbox=lu;exports.Combobox=Lp;exports.Container=pu;exports.CookieConsentBanner=mf;exports.DashboardLayout=sf;exports.DataTable=z6;exports.DatePicker=Ep;exports.DateRangePicker=Fp;exports.Divider=iu;exports.DoctorCard=_6;exports.Drawer=by;exports.EmptyState=my;exports.FileUpload=Dp;exports.Footer=lf;exports.FormControl=fp;exports.FullPageSpinner=Kh;exports.ICD10Badge=rh;exports.IconButton=tu;exports.Input=ns;exports.Logo=tn;exports.MedicalRecordBadge=X6;exports.MedixProvider=_h;exports.Modal=py;exports.Navbar=Y2;exports.NotFoundPage=gy;exports.OTPInput=uu;exports.PWAInstallPrompt=xf;exports.Pagination=cf;exports.PatientTimeline=j3;exports.PhoneInput=vp;exports.PinInput=hp;exports.PrescriptionCard=Y6;exports.Progress=df;exports.RadioGroup=lp;exports.RichTextEditor=Qp;exports.RichTextInput=is;exports.SearchInput=rs;exports.SectionHeader=om;exports.Select=ap;exports.ServerErrorPage=xy;exports.Skeleton=Zt;exports.SkeletonCard=cy;exports.SkeletonText=uf;exports.Spinner=ru;exports.StatCard=hu;exports.Stepper=ay;exports.Switch=cu;exports.Tabs=iy;exports.Tag=ou;exports.TagInput=Rp;exports.TagsInput=du;exports.TelehealthCallBar=w3;exports.TestimonialCard=R6;exports.Textarea=su;exports.ThemeColorPalette=mu;exports.Toaster=eu;exports.Tooltip=Ct;exports.VitalBadge=V6;exports.colorTokens=V;exports.dismissToast=Ih;exports.htmlToMarkdown=Kn;exports.markdownToHtml=Yt;exports.medixConfig=Jc;exports.radiiTokens=Xc;exports.shadowTokens=Zc;exports.spacingTokens=qc;exports.system=Qc;exports.textStyleTokens=Kc;exports.toast=Yn;exports.typographyTokens=xn;exports.useColorScheme=Wh;exports.useIsDarkMode=es;exports.useThemeMode=ur;
428
428
  //# sourceMappingURL=index.cjs.map