@medixdeck/ui 0.1.18 → 0.1.19
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 +56 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +45 -14
- package/dist/index.js +7350 -6720
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),T=require("react"),h=require("@chakra-ui/react"),$s=require("@tiptap/react"),Nf=require("@tiptap/starter-kit"),Vf=require("@tiptap/extension-link"),Hf=require("@tiptap/extension-underline"),Wf=require("@tiptap/extension-text-align"),Uf=require("@tiptap/extension-placeholder");function $f(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 ge=$f(T);var Gf=(e,t,n,r,i,o,s,l)=>{let c=document.documentElement,d=["light","dark"];function u(m){(Array.isArray(e)?e:[e]).forEach(g=>{let x=g==="class",y=x&&o?i.map(b=>o[b]||b):i;x?(c.classList.remove(...y),c.classList.add(o&&o[m]?o[m]:m)):c.setAttribute(g,m)}),f(m)}function f(m){l&&d.includes(m)&&(c.style.colorScheme=m)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)u(r);else try{let m=localStorage.getItem(t)||n,g=s&&m==="system"?p():m;u(g)}catch{}},Gs=["light","dark"],kc="(prefers-color-scheme: dark)",Yf=typeof window>"u",Mo=ge.createContext(void 0),Kf={setTheme:e=>{},themes:[]},qf=()=>{var e;return(e=ge.useContext(Mo))!=null?e:Kf},Xf=e=>ge.useContext(Mo)?ge.createElement(ge.Fragment,null,e.children):ge.createElement(Jf,{...e}),Zf=["light","dark"],Jf=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:o=Zf,defaultTheme:s=n?"system":"light",attribute:l="data-theme",value:c,children:d,nonce:u,scriptProps:f})=>{let[p,m]=ge.useState(()=>eh(i,s)),[g,x]=ge.useState(()=>p==="system"?ui():p),y=c?Object.values(c):o,b=ge.useCallback(A=>{let w=A;if(!w)return;A==="system"&&n&&(w=ui());let M=c?c[w]:w,F=t?th(u):null,E=document.documentElement,L=D=>{D==="class"?(E.classList.remove(...y),M&&E.classList.add(M)):D.startsWith("data-")&&(M?E.setAttribute(D,M):E.removeAttribute(D))};if(Array.isArray(l)?l.forEach(L):L(l),r){let D=Gs.includes(s)?s:null,P=Gs.includes(w)?w:D;E.style.colorScheme=P}F==null||F()},[u]),j=ge.useCallback(A=>{let w=typeof A=="function"?A(p):A;m(w);try{localStorage.setItem(i,w)}catch{}},[p]),k=ge.useCallback(A=>{let w=ui(A);x(w),p==="system"&&n&&!e&&b("system")},[p,e]);ge.useEffect(()=>{let A=window.matchMedia(kc);return A.addListener(k),k(A),()=>A.removeListener(k)},[k]),ge.useEffect(()=>{let A=w=>{w.key===i&&(w.newValue?m(w.newValue):j(s))};return window.addEventListener("storage",A),()=>window.removeEventListener("storage",A)},[j]),ge.useEffect(()=>{b(e??p)},[e,p]);let B=ge.useMemo(()=>({theme:p,setTheme:j,forcedTheme:e,resolvedTheme:p==="system"?g:p,themes:n?[...o,"system"]:o,systemTheme:n?g:void 0}),[p,j,e,g,n,o]);return ge.createElement(Mo.Provider,{value:B},ge.createElement(Qf,{forcedTheme:e,storageKey:i,attribute:l,enableSystem:n,enableColorScheme:r,defaultTheme:s,value:c,themes:o,nonce:u,scriptProps:f}),d)},Qf=ge.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:s,themes:l,nonce:c,scriptProps:d})=>{let u=JSON.stringify([n,t,o,e,l,s,r,i]).slice(1,-1);return ge.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Gf.toString()})(${u})`}})}),eh=(e,t)=>{if(Yf)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},th=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)}},ui=e=>(e||(e=window.matchMedia(kc)),e.matches?"dark":"light");const N={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"}}},fn={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"}}},Sc={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)"}}},Cc={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"}},Tc={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%"}},jc={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"}},Ac=h.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:N.blue,purple:N.purple,green:N.green,amber:N.amber,red:N.red,neutralLight:N.neutralLight,neutralDark:N.neutralDark}},fonts:fn.fonts,fontSizes:fn.fontSizes,fontWeights:fn.fontWeights,lineHeights:fn.lineHeights,letterSpacings:fn.letterSpacings,spacing:Cc,radii:Tc,shadows:jc},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:Sc}}),Ec=h.createSystem(h.defaultConfig,Ac),nh={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:"✕"}},Po=T.forwardRef(({status:e="info",variant:t="subtle",title:n,description:r,icon:i,onClose:o,closable:s=!1,children:l,...c},d)=>{const u=nh[e],f=t==="solid"?u.color:u.bg,p=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${u.color}`:void 0,g=t==="subtle"?`1px solid ${u.border}`:void 0;return a.jsxs(h.Box,{ref:d,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:f,border:g,borderLeft:m,color:p,...c,children:[a.jsx(h.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)":u.color,color:"white",mt:"0.5",children:i??u.icon}),a.jsxs(h.Box,{flex:"1",children:[n&&a.jsx(h.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":u.color,children:n}),r&&a.jsx(h.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(h.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:"×"})]})});Po.displayName="MedixAlert";const Mr=h.createToaster({placement:"bottom-end",pauseOnPageIdle:!0,overlap:!0,gap:16,duration:4e3,removeDelay:200}),_n=Object.assign(e=>Mr.create({title:e.title,description:e.description,type:e.type||"info",duration:e.duration??4e3}),{success:(e,t)=>_n({title:e,type:"success",...t}),error:(e,t)=>_n({title:e,type:"error",...t}),info:(e,t)=>_n({title:e,type:"info",...t}),warning:(e,t)=>_n({title:e,type:"warning",...t})}),rh=e=>Mr.dismiss(e),Fc=()=>a.jsx(h.Toaster,{toaster:Mr,insetInline:{base:"4",md:"4"},insetBlock:{base:"4",md:"4"},pointerEvents:"none",children:e=>{var n;const t=((n=e.meta)==null?void 0:n.variant)||"subtle";return a.jsx(h.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",children:a.jsxs(Po,{status:e.type||"info",variant:t,title:typeof e.title=="string"?e.title:void 0,description:typeof e.description=="string"?e.description:void 0,closable:!0,onClose:()=>Mr.dismiss(e.id),boxShadow:"none",w:"100%",children:[typeof e.title!="string"&&e.title,typeof e.description!="string"&&e.description]})},e.id)}}),ih=["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"],oh=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),S=require("react"),h=require("@chakra-ui/react"),Xs=require("@tiptap/react"),$f=require("@tiptap/starter-kit"),Gf=require("@tiptap/extension-link"),Yf=require("@tiptap/extension-underline"),Kf=require("@tiptap/extension-text-align"),qf=require("@tiptap/extension-placeholder");function Xf(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=Xf(S);var Zf=(e,t,n,r,i,o,s,l)=>{let u=document.documentElement,d=["light","dark"];function c(p){(Array.isArray(e)?e:[e]).forEach(g=>{let x=g==="class",y=x&&o?i.map(v=>o[v]||v):i;x?(u.classList.remove(...y),u.classList.add(o&&o[p]?o[p]:p)):u.setAttribute(g,p)}),f(p)}function f(p){l&&d.includes(p)&&(u.style.colorScheme=p)}function m(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)c(r);else try{let p=localStorage.getItem(t)||n,g=s&&p==="system"?m():p;c(g)}catch{}},Zs=["light","dark"],Ec="(prefers-color-scheme: dark)",Jf=typeof window>"u",No=be.createContext(void 0),Qf={setTheme:e=>{},themes:[]},eh=()=>{var e;return(e=be.useContext(No))!=null?e:Qf},th=e=>be.useContext(No)?be.createElement(be.Fragment,null,e.children):be.createElement(rh,{...e}),nh=["light","dark"],rh=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:o=nh,defaultTheme:s=n?"system":"light",attribute:l="data-theme",value:u,children:d,nonce:c,scriptProps:f})=>{let[m,p]=be.useState(()=>oh(i,s)),[g,x]=be.useState(()=>m==="system"?pi():m),y=u?Object.values(u):o,v=be.useCallback(B=>{let T=B;if(!T)return;B==="system"&&n&&(T=pi());let O=u?u[T]:T,E=t?sh(c):null,A=document.documentElement,L=M=>{M==="class"?(A.classList.remove(...y),O&&A.classList.add(O)):M.startsWith("data-")&&(O?A.setAttribute(M,O):A.removeAttribute(M))};if(Array.isArray(l)?l.forEach(L):L(l),r){let M=Zs.includes(s)?s:null,R=Zs.includes(T)?T:M;A.style.colorScheme=R}E==null||E()},[c]),j=be.useCallback(B=>{let T=typeof B=="function"?B(m):B;p(T);try{localStorage.setItem(i,T)}catch{}},[m]),k=be.useCallback(B=>{let T=pi(B);x(T),m==="system"&&n&&!e&&v("system")},[m,e]);be.useEffect(()=>{let B=window.matchMedia(Ec);return B.addListener(k),k(B),()=>B.removeListener(k)},[k]),be.useEffect(()=>{let B=T=>{T.key===i&&(T.newValue?p(T.newValue):j(s))};return window.addEventListener("storage",B),()=>window.removeEventListener("storage",B)},[j]),be.useEffect(()=>{v(e??m)},[e,m]);let F=be.useMemo(()=>({theme:m,setTheme:j,forcedTheme:e,resolvedTheme:m==="system"?g:m,themes:n?[...o,"system"]:o,systemTheme:n?g:void 0}),[m,j,e,g,n,o]);return be.createElement(No.Provider,{value:F},be.createElement(ih,{forcedTheme:e,storageKey:i,attribute:l,enableSystem:n,enableColorScheme:r,defaultTheme:s,value:u,themes:o,nonce:c,scriptProps:f}),d)},ih=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:`(${Zf.toString()})(${c})`}})}),oh=(e,t)=>{if(Jf)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},sh=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)}},pi=e=>(e||(e=window.matchMedia(Ec)),e.matches?"dark":"light");const N={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"}}},hn={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"}}},Ac={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)"}}},Fc={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"}},Bc={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%"}},Lc={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"}},Ic=h.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:N.blue,purple:N.purple,green:N.green,amber:N.amber,red:N.red,neutralLight:N.neutralLight,neutralDark:N.neutralDark}},fonts:hn.fonts,fontSizes:hn.fontSizes,fontWeights:hn.fontWeights,lineHeights:hn.lineHeights,letterSpacings:hn.letterSpacings,spacing:Fc,radii:Bc,shadows:Lc},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:Ac}}),Dc=h.createSystem(h.defaultConfig,Ic),ah={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:"✕"}},Vo=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=ah[e],f=t==="solid"?c.color:c.bg,m=t==="solid"?"white":"inherit",p=t==="left-accent"?`4px solid ${c.color}`:void 0,g=t==="subtle"?`1px solid ${c.border}`:void 0;return a.jsxs(h.Box,{ref:d,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:f,border:g,borderLeft:p,color:m,...u,children:[a.jsx(h.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(h.Box,{flex:"1",children:[n&&a.jsx(h.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":c.color,children:n}),r&&a.jsx(h.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(h.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:"×"})]})});Vo.displayName="MedixAlert";const _r=h.createToaster({placement:"bottom-end",pauseOnPageIdle:!0,overlap:!0,gap:16,duration:4e3,removeDelay:200}),Vn=Object.assign(e=>_r.create({title:e.title,description:e.description,type:e.type||"info",duration:e.duration??4e3}),{success:(e,t)=>Vn({title:e,type:"success",...t}),error:(e,t)=>Vn({title:e,type:"error",...t}),info:(e,t)=>Vn({title:e,type:"info",...t}),warning:(e,t)=>Vn({title:e,type:"warning",...t})}),lh=e=>_r.dismiss(e),Rc=()=>a.jsx(h.Toaster,{toaster:_r,insetInline:{base:"4",md:"4"},insetBlock:{base:"4",md:"4"},pointerEvents:"none",children:e=>{var n;const t=((n=e.meta)==null?void 0:n.variant)||"subtle";return a.jsx(h.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",children:a.jsxs(Vo,{status:e.type||"info",variant:t,title:typeof e.title=="string"?e.title:void 0,description:typeof e.description=="string"?e.description:void 0,closable:!0,onClose:()=>_r.dismiss(e.id),boxShadow:"none",w:"100%",children:[typeof e.title!="string"&&e.title,typeof e.description!="string"&&e.description]})},e.id)}}),ch=["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"],uh=`
|
|
2
2
|
/* ── Fluid typography base ───────────────────────────────────────────────── */
|
|
3
3
|
/* font-size: 100% keeps 1rem = user's browser preference (default 16px). */
|
|
4
4
|
/* All token font sizes use clamp() so they scale fluidly between mobile and */
|
|
@@ -133,18 +133,18 @@
|
|
|
133
133
|
@keyframes medix-spin {
|
|
134
134
|
to { transform: rotate(360deg); }
|
|
135
135
|
}
|
|
136
|
-
`;let Ys=!1,Ks=!1;function sh(){if(typeof document>"u"||Ys)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)}),ih.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)}),Ys=!0}function ah(){if(typeof document>"u"||Ks)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=oh,document.head.insertBefore(e,document.head.firstChild),Ks=!0}function lh({children:e,defaultColorMode:t="system",forcedColorMode:n}){return T.useEffect(()=>{sh(),ah()},[]),a.jsx(Xf,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:a.jsxs(h.ChakraProvider,{value:Ec,children:[e,a.jsx(Fc,{})]})})}function er(){const{resolvedTheme:e,setTheme:t,theme:n}=qf(),[r,i]=T.useState(!1);T.useEffect(()=>{i(!0)},[]);const o=e==="dark"?"dark":"light",s=n==="light"||n==="dark"||n==="system"?n:"system",l=T.useCallback(d=>{t(d)},[t]),c=T.useCallback(()=>{t(o==="dark"?"light":"dark")},[t,o]);return{mounted:r,themeMode:o,themeSetting:s,setThemeMode:l,toggleThemeMode:c}}function Oo(){const{mounted:e,themeMode:t}=er();return e&&t==="dark"}function ch(e="blue"){const[t,n]=T.useState(e),r=T.useCallback(o=>{n(o)},[]),i=T.useCallback(()=>{n(o=>o==="blue"?"purple":"blue")},[]);return{colorScheme:t,setColorScheme:r,toggleColorScheme:i,isBlue:t==="blue",isPurple:t==="purple"}}const qs={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"}},Xs={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"}},We=T.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:r=!1,leftIcon:i,rightIcon:o,disabled:s,children:l,style:c,as:d="button",href:u,target:f,rel:p,...m},g)=>{const x=qs[n]||qs.blue,y=Xs[t]||Xs.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 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[k,B]=T.useState(!1),[A,w]=T.useState(!1);let M={};if((k||A)&&!s&&!r)switch(e){case"solid":M={background:A?x.solidActive:x.solidHover,boxShadow:"none"};break;case"outline":M={background:x.tint,color:x.fgHover};break;case"ghost":M={background:x.tint};break;case"secondary":M={background:x.tintHover};break;case"link":M={color:x.fgHover};break}const F={...b,...j,...M,...c};return a.jsx(d,{ref:g,type:d==="button"?m.type??"button":void 0,href:u,target:f,rel:p,disabled:d==="button"?s||r:void 0,style:F,onMouseEnter:()=>B(!0),onMouseLeave:()=>{B(!1),w(!1)},onMouseDown:()=>w(!0),onMouseUp:()=>w(!1),onFocus:E=>{E.currentTarget.style.boxShadow="none"},onBlur:E=>{E.currentTarget.style.boxShadow="none"},...m,"aria-disabled":d!=="button"&&(s||r)?!0:m["aria-disabled"],onClick:E=>{var L;if(d!=="button"&&(s||r)){E.preventDefault();return}(L=m.onClick)==null||L.call(m,E)},children:r?a.jsx(h.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})]})})});We.displayName="MedixButton";const uh={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"}},dh={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}},Bc=T.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:r=!1,disabled:i,children:o,style:s,...l},c)=>{const d=uh[n],u=dh[t],[f,p]=T.useState(!1),[m,g]=T.useState(!1);let x;switch(e){case"solid":x={background:f?m?d.solidActive:d.solidHover:d.solid,color:"#fff"};break;case"outline":x={background:f?d.tint:"transparent",color:d.fg,border:`1.5px solid ${d.solid}`};break;case"ghost":default:x={background:f?d.tint:"transparent",color:d.fg};break}return a.jsx("button",{ref:c,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",...u,...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})});Bc.displayName="MedixIconButton";const fh={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"}},hh={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},zo=T.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",rounded:r,children:i,style:o,...s},l)=>{const c=fh[t],d=hh[n];let u,f,p="1px solid transparent";switch(e){case"solid":u=c.solid,f=c.solidText;break;case"outline":u="transparent",f=c.tintText,p=`1px solid ${c.border}`;break;case"surface":u=c.tint,f=c.tintText,p=`1px solid ${c.border}20`;break;case"subtle":default:u=c.tint,f=c.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:u,color:f,whiteSpace:"nowrap",...d,...o};return a.jsx("span",{ref:l,style:m,...s,children:i})});zo.displayName="MedixBadge";const Lc={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},_o=T.forwardRef(({src:e,name:t,size:n="md",showStatus:r=!1,statusColor:i="green",...o},s)=>a.jsxs(h.Avatar.Root,{ref:s,size:Lc[n],position:"relative",...o,children:[a.jsx(h.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&a.jsx(h.Avatar.Image,{src:e,alt:t??""}),r&&a.jsx(h.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));_o.displayName="MedixAvatar";function ph({children:e,max:t,size:n="md"}){const r=T.Children.toArray(e),i=t?r.slice(0,t):r,o=t?Math.max(0,r.length-t):0,s=Lc[n];return a.jsxs(h.Box,{display:"flex",alignItems:"center",children:[i.map((l,c)=>a.jsx(h.Box,{ml:c===0?"0":"-2",position:"relative",zIndex:i.length-c,children:T.isValidElement(l)?T.cloneElement(l,{size:n}):l},c)),o>0&&a.jsxs(h.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 Ic({size:e="md",label:t,color:n="blue.500",...r}){return a.jsxs(h.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[a.jsx(h.Spinner,{size:e,color:n,borderWidth:"2px",...r}),t&&a.jsx(h.Text,{textStyle:"small",color:"text.muted",children:t})]})}function mh({label:e}){return a.jsx(h.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:a.jsx(Ic,{size:"xl",label:e??"Loading…"})})}const Dc=T.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:r,...i},o)=>a.jsxs(h.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(h.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:"×"})]}));Dc.displayName="MedixTag";const Rc=T.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(h.Separator,{ref:r,orientation:e,borderColor:"border",...n}));Rc.displayName="MedixDivider";const gh="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 yh({variant:e,type:t,height:n,markColor:r,textColor:i,downloadFileName:o}){if(typeof window>"u")return;const s=4,l=532,c=44,d=119,u=32,f=n,p=Math.round(n*.3),m=t==="full"?Math.round(d*(n/u)):0,x=(t==="full"?f+p+m:f)*s,y=n*s,b=f*s/l,j=y/u,k=`
|
|
136
|
+
`;let Js=!1,Qs=!1;function dh(){if(typeof document>"u"||Js)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)}),ch.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)}),Js=!0}function fh(){if(typeof document>"u"||Qs)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=uh,document.head.insertBefore(e,document.head.firstChild),Qs=!0}function hh({children:e,defaultColorMode:t="system",forcedColorMode:n}){return S.useEffect(()=>{dh(),fh()},[]),a.jsx(th,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:a.jsxs(h.ChakraProvider,{value:Dc,children:[e,a.jsx(Rc,{})]})})}function rr(){const{resolvedTheme:e,setTheme:t,theme:n}=eh(),[r,i]=S.useState(!1);S.useEffect(()=>{i(!0)},[]);const o=e==="dark"?"dark":"light",s=n==="light"||n==="dark"||n==="system"?n:"system",l=S.useCallback(d=>{t(d)},[t]),u=S.useCallback(()=>{t(o==="dark"?"light":"dark")},[t,o]);return{mounted:r,themeMode:o,themeSetting:s,setThemeMode:l,toggleThemeMode:u}}function Ho(){const{mounted:e,themeMode:t}=rr();return e&&t==="dark"}function ph(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 ea={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"}},ta={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"}},Ge=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:f,rel:m,...p},g)=>{const x=ea[n]||ea.blue,y=ta[t]||ta.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: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 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[k,F]=S.useState(!1),[B,T]=S.useState(!1);let O={};if((k||B)&&!s&&!r)switch(e){case"solid":O={background:B?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 E={...v,...j,...O,...u};return a.jsx(d,{ref:g,type:d==="button"?p.type??"button":void 0,href:c,target:f,rel:m,disabled:d==="button"?s||r:void 0,style:E,onMouseEnter:()=>F(!0),onMouseLeave:()=>{F(!1),T(!1)},onMouseDown:()=>T(!0),onMouseUp:()=>T(!1),onFocus:A=>{A.currentTarget.style.boxShadow="none"},onBlur:A=>{A.currentTarget.style.boxShadow="none"},...p,"aria-disabled":d!=="button"&&(s||r)?!0:p["aria-disabled"],onClick:A=>{var L;if(d!=="button"&&(s||r)){A.preventDefault();return}(L=p.onClick)==null||L.call(p,A)},children:r?a.jsx(h.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})]})})});Ge.displayName="MedixButton";const mh={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"}},gh={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}},Mc=S.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:r=!1,disabled:i,children:o,style:s,...l},u)=>{const d=mh[n],c=gh[t],[f,m]=S.useState(!1),[p,g]=S.useState(!1);let x;switch(e){case"solid":x={background:f?p?d.solidActive:d.solidHover:d.solid,color:"#fff"};break;case"outline":x={background:f?d.tint:"transparent",color:d.fg,border:`1.5px solid ${d.solid}`};break;case"ghost":default:x={background:f?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:()=>m(!0),onMouseLeave:()=>{m(!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})});Mc.displayName="MedixIconButton";const xh={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"}},yh={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},Wo=S.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",rounded:r,children:i,style:o,...s},l)=>{const u=xh[t],d=yh[n];let c,f,m="1px solid transparent";switch(e){case"solid":c=u.solid,f=u.solidText;break;case"outline":c="transparent",f=u.tintText,m=`1px solid ${u.border}`;break;case"surface":c=u.tint,f=u.tintText,m=`1px solid ${u.border}20`;break;case"subtle":default:c=u.tint,f=u.tintText;break}const p={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:r?"100px":4,border:m,background:c,color:f,whiteSpace:"nowrap",...d,...o};return a.jsx("span",{ref:l,style:p,...s,children:i})});Wo.displayName="MedixBadge";const Pc={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},Uo=S.forwardRef(({src:e,name:t,size:n="md",showStatus:r=!1,statusColor:i="green",...o},s)=>a.jsxs(h.Avatar.Root,{ref:s,size:Pc[n],position:"relative",...o,children:[a.jsx(h.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&a.jsx(h.Avatar.Image,{src:e,alt:t??""}),r&&a.jsx(h.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));Uo.displayName="MedixAvatar";function bh({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=Pc[n];return a.jsxs(h.Box,{display:"flex",alignItems:"center",children:[i.map((l,u)=>a.jsx(h.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(h.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 Oc({size:e="md",label:t,color:n="blue.500",...r}){return a.jsxs(h.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[a.jsx(h.Spinner,{size:e,color:n,borderWidth:"2px",...r}),t&&a.jsx(h.Text,{textStyle:"small",color:"text.muted",children:t})]})}function vh({label:e}){return a.jsx(h.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:a.jsx(Oc,{size:"xl",label:e??"Loading…"})})}const zc=S.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:r,...i},o)=>a.jsxs(h.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(h.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:"×"})]}));zc.displayName="MedixTag";const _c=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(h.Separator,{ref:r,orientation:e,borderColor:"border",...n}));_c.displayName="MedixDivider";const wh="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",kh="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 Sh({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,f=n,m=Math.round(n*.3),p=t==="full"?Math.round(d*(n/c)):0,x=(t==="full"?f+m+p:f)*s,y=n*s,v=f*s/l,j=y/c,k=`
|
|
137
137
|
<svg xmlns="http://www.w3.org/2000/svg" width="${x}" height="${y}" viewBox="0 0 ${x} ${y}">
|
|
138
|
-
<g transform="scale(${
|
|
139
|
-
<path d="${
|
|
138
|
+
<g transform="scale(${v})">
|
|
139
|
+
<path d="${wh}" fill="${r}" fill-rule="evenodd" transform="translate(-178, -1958)"/>
|
|
140
140
|
</g>
|
|
141
|
-
${t==="full"?`<g transform="translate(${(f+
|
|
142
|
-
<svg viewBox="${
|
|
143
|
-
<path d="${
|
|
141
|
+
${t==="full"?`<g transform="translate(${(f+m)*s}, 0) scale(${j})">
|
|
142
|
+
<svg viewBox="${u} 0 ${d} ${c}" width="${d}" height="${c}">
|
|
143
|
+
<path d="${kh}" fill="${i}"/>
|
|
144
144
|
</svg>
|
|
145
145
|
</g>`:""}
|
|
146
146
|
</svg>
|
|
147
|
-
`,
|
|
147
|
+
`,F=new Blob([k],{type:"image/svg+xml;charset=utf-8"}),B=URL.createObjectURL(F),T=new Image;T.onload=()=>{const O=document.createElement("canvas");O.width=x,O.height=y;const E=O.getContext("2d");if(E){E.drawImage(T,0,0),URL.revokeObjectURL(B);const A=O.toDataURL("image/png"),L=document.createElement("a");L.href=A,L.download=o??`medixdeck-logo-${e}-${t}.png`,document.body.appendChild(L),L.click(),document.body.removeChild(L)}},T.src=B}function ir({variant:e="blue",type:t="full",height:n=32,downloadable:r=!1,downloadFileName:i,className:o,style:s}){const{mounted:l,themeMode:u}=rr(),d=l?u==="dark":!1,c=Ch[e],f=d?jh[e]:Th[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},g=y=>{r&&(y.stopPropagation(),x())},x=()=>{Sh({variant:e,type:t,height:n,markColor:c,textColor:f,downloadFileName:i})};return a.jsxs("span",{className:o,style:p,role:r?"button":"img",tabIndex:r?0:void 0,onClick:g,onKeyDown:y=>{r&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),x())},title:r?`Click to download MedixDeck logo (${e} ${t})`:void 0,"aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[a.jsx(Eh,{color:c,height:n}),t==="full"&&a.jsx(Ah,{color:f,height:n})]})}const Ch={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},Th={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},jh={blue:"#FFFFFF",purple:"#FFFFFF",black:"#111926",white:"#FFFFFF"};function Eh({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:`
|
|
148
148
|
M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557
|
|
149
149
|
C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490
|
|
150
150
|
225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
C328.923,2426.794 337.487,2436.055 345.675,2444.555
|
|
210
210
|
C353.486,2452.676 362.788,2461.68 371.226,2469.229
|
|
211
211
|
C378.696,2475.993 386.419,2482.518 394.335,2488.823Z
|
|
212
|
-
`,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function
|
|
212
|
+
`,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function Ah({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:`
|
|
213
213
|
M46.32 25H44.016V7.648H46.32L52.296 22.24L58.272 7.648H60.624V25H58.32
|
|
214
214
|
V18.136C58.32 14.896 58.344 13.72 58.464 12.496L53.4 25H51.192L46.152
|
|
215
215
|
12.544C46.272 13.384 46.32 15.16 46.32 17.584V25Z
|
|
@@ -262,7 +262,25 @@
|
|
|
262
262
|
|
|
263
263
|
M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281
|
|
264
264
|
L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z
|
|
265
|
-
`,fill:e})})}const di={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},No=T.forwardRef(({size:e="md",colorScheme:t="blue",leftElement:n,rightElement:r,isInvalid:i,errorMessage:o,...s},l)=>{const c=!!n,d=!!r,u=t==="purple"?"purple.500":"blue.500";return a.jsxs(h.Box,{w:"100%",children:[a.jsxs(h.Box,{position:"relative",children:[c&&a.jsx(h.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n}),a.jsx(h.Input,{ref:l,...di[e],pl:c?"10":di[e].px,pr:d?"10":di[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":u,boxShadow:"none",outline:"none"},_dark:{bg:"bg.surface",borderColor:i?"red.500":"border",color:"text.heading"},...s}),d&&a.jsx(h.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(h.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})});No.displayName="MedixInput";const Vo=T.forwardRef(({placeholder:e="Search…",...t},n)=>a.jsx(No,{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}));Vo.displayName="MedixSearchInput";const Mc=T.forwardRef(({colorScheme:e="blue",isInvalid:t,errorMessage:n,maxLength:r,showCount:i=!1,onChange:o,value:s,...l},c)=>{const[d,u]=T.useState(typeof s=="string"?s.length:0),f=e==="purple"?"purple.500":"blue.500",p=m=>{u(m.target.value.length),o==null||o(m)};return a.jsxs(h.Box,{w:"100%",children:[a.jsx(h.Textarea,{ref:c,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":f,boxShadow:"none",outline:"none"},_dark:{bg:"bg.surface",borderColor:t?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...l}),a.jsxs(h.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[t&&n?a.jsx(h.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:n}):a.jsx("span",{}),i&&r&&a.jsxs(h.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[d,"/",r]})]})]})});Mc.displayName="MedixTextarea";const Ch={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}};function Th({options:e=[],placeholder:t="Select option...",isInvalid:n=!1,errorMessage:r,size:i="md",colorScheme:o="blue",icon:s,value:l,defaultValue:c,onChange:d,disabled:u=!1,name:f,id:p}){const[m,g]=T.useState(!1),[x,y]=T.useState(""),[b,j]=T.useState(()=>typeof c=="string"?c:Array.isArray(c)&&c.length>0?c[0]:""),k=T.useRef(null),B=T.useRef(null),A=l!==void 0,w=A?typeof l=="string"?l:Array.isArray(l)&&l.length>0?l[0]:"":b,M=e.find(V=>V.value===w);T.useEffect(()=>{function V(_){k.current&&!k.current.contains(_.target)&&g(!1)}return m&&document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[m]),T.useEffect(()=>{if(m){const V=setTimeout(()=>{var _;return(_=B.current)==null?void 0:_.focus()},50);return()=>clearTimeout(V)}else y("")},[m]);const F=V=>{u||(A||j(V),d==null||d(V),g(!1))},E=T.useMemo(()=>{if(!x.trim())return e;const V=x.toLowerCase().trim();return e.filter(_=>_.label.toLowerCase().includes(V))},[e,x]),L=o==="purple"?"#7700CC":"#0685FF",D=n?"#DC2626":m?L:"var(--medix-form-border)",P=Ch[i];return a.jsxs(h.Box,{w:"100%",position:"relative",ref:k,children:[f&&a.jsx("input",{type:"hidden",name:f,id:p,value:w}),a.jsxs(h.Box,{onClick:()=>!u&&g(!m),display:"flex",alignItems:"center",justifyContent:"space-between",h:P.h,px:P.px,borderRadius:"md",bg:"bg.surface",cursor:u?"not-allowed":"pointer",opacity:u?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${D}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"2.5",flex:"1",minW:"0",children:[s&&a.jsx(h.Box,{color:"text.heading",display:"flex",alignItems:"center",flexShrink:0,children:s}),M?a.jsx(h.Text,{fontSize:P.fontSize,color:"text.heading",fontFamily:"var(--font-body)",truncate:!0,fontWeight:"500",children:M.label}):a.jsx(h.Text,{fontSize:P.fontSize,color:"text.muted",fontFamily:"var(--font-body)",truncate:!0,children:t})]}),a.jsx(h.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(h.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:"popover",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[e.length>5&&a.jsx(h.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsxs(h.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:B,type:"text",placeholder:"Search...",value:x,onChange:V=>y(V.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(h.Box,{overflowY:"auto",flex:"1",py:"1",children:E.length===0?a.jsx(h.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):E.map(V=>{const _=V.value===w;return a.jsxs("button",{type:"button",disabled:V.disabled,onClick:()=>F(V.value),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:_?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:V.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:V.disabled?.5:1,transition:"background 0.1s ease"},onMouseEnter:I=>{V.disabled||(I.currentTarget.style.background="var(--medix-form-bg-subtle)")},onMouseLeave:I=>{V.disabled||(I.currentTarget.style.background=_?"var(--medix-form-bg-subtle)":"transparent")},children:[a.jsx("span",{style:{fontWeight:_?600:400},children:V.label}),_&&a.jsx("span",{style:{color:L,fontWeight:700,fontSize:"14px"},children:"✓"})]},V.value)})})]}),n&&r&&a.jsx(h.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function jh({options:e=[],placeholder:t="Select options...",isInvalid:n=!1,errorMessage:r,size:i="md",colorScheme:o="blue",icon:s,value:l,defaultValue:c,onChange:d,disabled:u=!1,name:f,id:p}){const[m,g]=T.useState(!1),[x,y]=T.useState(""),[b,j]=T.useState(()=>Array.isArray(c)?c:typeof c=="string"&&c?[c]:[]),k=T.useRef(null),B=T.useRef(null),A=l!==void 0,w=A?Array.isArray(l)?l:typeof l=="string"&&l?[l]:[]:b;T.useEffect(()=>{function I(R){k.current&&!k.current.contains(R.target)&&g(!1)}return m&&document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[m]),T.useEffect(()=>{if(m){const I=setTimeout(()=>{var R;return(R=B.current)==null?void 0:R.focus()},50);return()=>clearTimeout(I)}else y("")},[m]);const M=I=>{if(u)return;const W=w.includes(I)?w.filter(Y=>Y!==I):[...w,I];A||j(W),d==null||d(W)},F=(I,R)=>{if(R.stopPropagation(),u)return;const W=w.filter(Y=>Y!==I);A||j(W),d==null||d(W)},E=T.useMemo(()=>{if(!x.trim())return e;const I=x.toLowerCase().trim();return e.filter(R=>R.label.toLowerCase().includes(I))},[e,x]),L=o==="purple"?"#7700CC":"#0685FF",D=n?"#DC2626":m?L:"var(--medix-form-border)",P=o==="purple"?"purple.50":"blue.50",V=o==="purple"?"purple.700":"blue.700",_=o==="purple"?"purple.200":"blue.200";return a.jsxs(h.Box,{w:"100%",position:"relative",ref:k,children:[f&&a.jsx("input",{type:"hidden",name:f,id:p,value:w.join(",")}),a.jsxs(h.Box,{onClick:()=>!u&&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:u?"not-allowed":"pointer",opacity:u?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${D}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[a.jsxs(h.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"1.5",flex:"1",minW:"0",children:[s&&a.jsx(h.Box,{color:"text.heading",display:"flex",alignItems:"center",mr:"1",children:s}),w.length===0?a.jsx(h.Text,{fontSize:i==="sm"?"xs":"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}):w.map(I=>{const R=e.find(Y=>Y.value===I),W=R?R.label:I;return a.jsxs(h.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:P,color:V,border:"1px solid",borderColor:_,_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:W}),!u&&a.jsx("button",{type:"button",onClick:Y=>F(I,Y),"aria-label":`Remove ${W}`,style:{background:"transparent",border:"none",padding:0,marginLeft:"2px",cursor:"pointer",color:"inherit",fontSize:"13px",lineHeight:1,opacity:.75},onMouseEnter:Y=>Y.currentTarget.style.opacity="1",onMouseLeave:Y=>Y.currentTarget.style.opacity="0.75",children:"×"})]},I)})]}),a.jsx(h.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(h.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:"popover",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[e.length>5&&a.jsx(h.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsxs(h.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:B,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(h.Box,{overflowY:"auto",flex:"1",py:"1",children:E.length===0?a.jsx(h.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):E.map(I=>{const R=w.includes(I.value);return a.jsxs("button",{type:"button",disabled:I.disabled,onClick:()=>M(I.value),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:R?"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:W=>{I.disabled||(W.currentTarget.style.background="var(--medix-form-bg-subtle)")},onMouseLeave:W=>{I.disabled||(W.currentTarget.style.background=R?"var(--medix-form-bg-subtle)":"transparent")},children:[a.jsx("span",{style:{fontWeight:R?600:400},children:I.label}),R&&a.jsx("span",{style:{color:L,fontWeight:700,fontSize:"14px"},children:"✓"})]},I.value)})})]}),n&&r&&a.jsx(h.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function Ah(e){return e.multiple?a.jsx(jh,{...e}):a.jsx(Th,{...e})}const Pc={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"}},Oc=T.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:r,disabled:i=!1,indeterminate:o=!1,children:s,description:l,name:c,value:d,id:u},f)=>{const p=Pc[e],m=u??T.useId(),[g,x]=T.useState(n),[y,b]=T.useState(!1),j=t!==void 0?t:g,k=A=>{t===void 0&&x(A.target.checked),r==null||r(A.target.checked)},B={width:18,height:18,borderRadius:4,border:`2px solid ${j||o?p.solid:"var(--medix-form-border, #CBD5E1)"}`,background:j||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(h.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:f,id:m,type:"checkbox",name:c,value:d,checked:j,disabled:i,onChange:k,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:B,"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"})}):j?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(h.Box,{children:[a.jsx(h.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:s}),l&&a.jsx(h.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]}),!s&&l&&a.jsx(h.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l})]})});Oc.displayName="MedixCheckbox";function Eh({name:e,value:t,onChange:n,options:r,colorScheme:i="blue",direction:o="column"}){const s=Pc[i],[l,c]=T.useState(""),d=t!==void 0?t:l,u=f=>{t===void 0&&c(f),n==null||n(f)};return a.jsx(h.Box,{display:"flex",flexDirection:o,gap:o==="row"?"5":"3",role:"radiogroup",children:r.map(f=>{const p=d===f.value;return a.jsx(Fh,{option:f,name:e,isSelected:p,onChange:u,solidColor:s.solid,ring:s.ring},f.value)})})}function Fh({option:e,name:t,isSelected:n,onChange:r,solidColor:i,ring:o}){const[s,l]=T.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(h.Box,{children:[a.jsx(h.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&a.jsx(h.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const Bh={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"}},Lh={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}},zc=T.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:r=!1,onChange:i,disabled:o=!1,label:s,description:l,name:c,id:d},u)=>{const f=Bh[e],p=Lh[t],m=d??T.useId(),[g,x]=T.useState(r),[y,b]=T.useState(!1),j=n!==void 0?n:g,k=w=>{n===void 0&&x(w.target.checked),i==null||i(w.target.checked)},B={position:"relative",display:"inline-flex",alignItems:"center",width:p.width,height:p.height,borderRadius:p.height,background:j?f.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},A={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 a.jsxs(h.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:u,id:m,type:"checkbox",role:"switch",name:c,checked:j,disabled:o,onChange:k,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:B,"aria-hidden":"true",children:a.jsx("span",{style:A})})]}),(s||l)&&a.jsxs(h.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(h.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]})});zc.displayName="MedixSwitch";function Ih({id:e,label:t,helperText:n,errorMessage:r,isRequired:i=!1,isDisabled:o=!1,children:s}){const l=!!r;return a.jsxs(h.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:o?.5:1,pointerEvents:o?"none":void 0,w:"100%",children:[t&&a.jsxs(h.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[a.jsx(h.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&a.jsx(h.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),T.cloneElement(s,{id:e,isInvalid:l||void 0}),n&&!l&&a.jsx(h.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),l&&r&&a.jsx(h.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function _c({length:e=6,value:t,defaultValue:n="",onChange:r,onComplete:i,colorScheme:o="blue",isInvalid:s=!1,isDisabled:l=!1,mask:c=!1,label:d,helperText:u,errorMessage:f}){const[p,m]=T.useState(n),[g,x]=T.useState(null),y=t!==void 0,j=(y?t:p).split("").slice(0,e),k=T.useRef([]),B=s?"#DC2626":"var(--medix-form-border)",A=s?"#DC2626":o==="purple"?"#7700CC":"#0685FF",w=(F,E)=>{var L,D,P;if(F.key==="Backspace"){F.preventDefault();const V=[...j];if(V[E]){V[E]="";const _=V.join("");y||m(_),r==null||r(_)}else if(E>0){(L=k.current[E-1])==null||L.focus(),V[E-1]="";const _=V.join("");y||m(_),r==null||r(_)}}else F.key==="ArrowLeft"&&E>0?(D=k.current[E-1])==null||D.focus():F.key==="ArrowRight"&&E<e-1&&((P=k.current[E+1])==null||P.focus())},M=(F,E)=>{var V,_;const L=F.target.value.replace(/\D/g,"");if(!L)return;if(L.length>1){const I=L.split("").slice(0,e),R=[...Array(e).fill("")];I.forEach((Z,S)=>{R[S]=Z});const W=R.join("");y||m(W),r==null||r(W);const Y=Math.min(I.length,e-1);(V=k.current[Y])==null||V.focus(),W.length===e&&(i==null||i(W));return}const D=[...j];for(;D.length<e;)D.push("");D[E]=L;const P=D.join("");y||m(P),r==null||r(P),E<e-1&&((_=k.current[E+1])==null||_.focus()),P.replace(/\s/g,"").length===e&&(i==null||i(P))};return a.jsxs(h.Box,{w:"fit-content",children:[d&&a.jsx(h.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:d}),a.jsx(h.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((F,E)=>a.jsx("input",{ref:L=>{k.current[E]=L},type:c?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:j[E]??"",onChange:L=>M(L,E),onKeyDown:L=>w(L,E),onFocus:L=>{L.target.select(),x(E)},onBlur:()=>x(null),disabled:l,"aria-label":`Digit ${E+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${g===E?A:B}`,boxShadow:"none",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",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}},E))}),(u||f)&&a.jsx(h.Text,{mt:"2",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?f:u})]})}const Dh=_c;function Pr(){return Pr=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},Pr.apply(this,arguments)}function Rh(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 Mh=["cdnSuffix","cdnUrl","countryCode","style","svg"],Ph="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",Oh="svg",zh=127397,Zs=function(t){var n=t.cdnSuffix,r=n===void 0?Oh:n,i=t.cdnUrl,o=i===void 0?Ph:i,s=t.countryCode,l=t.style,c=t.svg,d=c===void 0?!1:c,u=Rh(t,Mh);if(typeof s!="string")return null;if(d){var f=""+o+s.toLowerCase()+"."+r;return T.createElement("img",Object.assign({},u,{src:f,style:Pr({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},l)}))}var p=s.toUpperCase().replace(/./g,function(m){return String.fromCodePoint(m.charCodeAt(0)+zh)});return T.createElement("span",Object.assign({role:"img"},u,{style:Pr({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},l)}),p)};const _h={"+1":"US","+7":"RU","+39":"IT","+44":"GB","+47":"NO","+212":"MA","+262":"RE","+290":"SH","+358":"FI","+590":"GP","+599":"CW"},Nt=[{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 Nh({value:e="",onChange:t,showCountryCode:n=!0,showCountryFlag:r=!0,defaultCountryCode:i="+234",defaultCountry:o,placeholder:s="80 000 0000",colorScheme:l="blue",isInvalid:c=!1,errorMessage:d,label:u,helperText:f,isDisabled:p=!1,id:m}){const g=T.useId(),x=m??g,y=o??(i?_h[i]:void 0),b=(y?Nt.find(q=>q.country===y):void 0)??Nt.find(q=>q.code===i)??Nt.find(q=>q.country==="NG")??Nt[0],[j,k]=T.useState(b.country),[B,A]=T.useState(e),[w,M]=T.useState(!1),[F,E]=T.useState(!1),[L,D]=T.useState(""),P=T.useRef(null),V=T.useRef(null),_=Nt.find(q=>q.country===j)??b;T.useEffect(()=>{function q(oe){P.current&&!P.current.contains(oe.target)&&E(!1)}return F&&document.addEventListener("mousedown",q),()=>{document.removeEventListener("mousedown",q)}},[F]),T.useEffect(()=>{if(F){const q=setTimeout(()=>{var oe;(oe=V.current)==null||oe.focus()},50);return()=>clearTimeout(q)}else D("")},[F]);const I=T.useMemo(()=>{if(!L.trim())return Nt;const q=L.toLowerCase().trim();return Nt.filter(oe=>oe.name.toLowerCase().includes(q)||oe.code.toLowerCase().includes(q)||oe.country.toLowerCase().includes(q))},[L]),R=q=>{const oe=q.target.value.replace(/[^\d\s\-]/g,"");A(oe),t==null||t(`${_.code}${oe.replace(/\s/g,"")}`)},W=q=>{k(q.country),t==null||t(`${q.code}${B.replace(/\s/g,"")}`),E(!1)},Z=c?"#DC2626":w||F?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return a.jsxs(h.Box,{w:"100%",children:[u&&a.jsx("label",{htmlFor:x,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:u}),a.jsxs(h.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",style:{border:`1.5px solid ${Z}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[n&&a.jsxs(h.Box,{position:"relative",ref:P,h:"full",children:[a.jsxs("button",{id:`${x}-country`,type:"button",onClick:()=>!p&&E(!F),disabled:p,"aria-label":"Select country code","aria-expanded":F,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(h.Box,{display:"flex",alignItems:"center",fontSize:"lg",lineHeight:"1",children:a.jsx(Zs,{countryCode:_.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),a.jsx("span",{children:_.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:F?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease",opacity:.7},children:a.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),F&&a.jsxs(h.Box,{position:"absolute",top:"100%",left:"0",mt:"2",w:"280px",maxH:"320px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:"popover",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[a.jsx(h.Box,{p:"2.5",color:"text.heading",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsxs(h.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:V,type:"text",placeholder:"Search country or code...",value:L,onChange:q=>D(q.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(h.Box,{overflowY:"auto",flex:"1",py:"1",children:I.length===0?a.jsx(h.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No country found"}):I.map(q=>{const oe=q.country===_.country;return a.jsxs("button",{type:"button",onClick:()=>W(q),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:C=>{C.currentTarget.style.background="var(--medix-form-bg-subtle)"},onMouseLeave:C=>{C.currentTarget.style.background=oe?"var(--medix-form-bg-subtle)":"transparent"},children:[a.jsx(h.Box,{display:"flex",alignItems:"center",fontSize:"md",flexShrink:0,children:a.jsx(Zs,{countryCode:q.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),a.jsx(h.Text,{flex:"1",truncate:!0,fontWeight:oe?"600":"400",children:q.name}),a.jsx(h.Text,{fontSize:"xs",color:"text.muted",flexShrink:0,children:q.code})]},`${q.country}-${q.code}`)})})]})]}),a.jsx("input",{id:x,type:"tel",value:B,onChange:R,onFocus:()=>M(!0),onBlur:()=>M(!1),placeholder:s,disabled:p,"aria-invalid":c,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}})]}),(f||d)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:c?"red.500":"text.muted",fontFamily:"var(--font-body)",children:c?d:f})]})}const Vh=["MON","TUES","WED","THURS","FRI","SAT","SUN"],Hh=["January","February","March","April","May","June","July","August","September","October","November","December"];function Js(e,t){return new Date(e,t+1,0).getDate()}function Wh(e,t){return new Date(e,t,1).getDay()}function Uh(e){return e===0?6:e-1}function Qs(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 Ho({value:e,onChange:t,minDate:n,maxDate:r,...i}){const[o,s]=T.useState(()=>e?new Date(e):new Date);T.useEffect(()=>{e&&s(A=>{const w=new Date(e);return A.getFullYear()===w.getFullYear()&&A.getMonth()===w.getMonth()?A:w})},[e]);const l=o.getFullYear(),c=o.getMonth(),d=!n||l>n.getFullYear()||l===n.getFullYear()&&c>n.getMonth(),u=!r||l<r.getFullYear()||l===r.getFullYear()&&c<r.getMonth(),f=()=>{s(new Date(l,c-1,1))},p=()=>{s(new Date(l,c+1,1))},m=()=>{const A=new Date;s(A),t&&!Qs(A.getDate(),A.getMonth(),A.getFullYear(),n,r)&&t(A)},g=Js(l,c),x=Uh(Wh(l,c)),y=Js(l,c-1),j=(x+g>35?42:35)-(x+g),k=(A,w,M)=>e?e.getDate()===A&&e.getMonth()===w&&e.getFullYear()===M:!1,B=()=>{const A=[];for(let w=0;w<x;w++){const M=y-x+w+1;A.push(a.jsx(fi,{day:M,isMuted:!0},`prev-${w}`))}for(let w=1;w<=g;w++){const M=Qs(w,c,l,n,r);A.push(a.jsx(fi,{day:w,isActive:k(w,c,l),isDisabled:M,onClick:M?void 0:()=>t==null?void 0:t(new Date(l,c,w))},`curr-${w}`))}for(let w=1;w<=j;w++)A.push(a.jsx(fi,{day:w,isMuted:!0},`next-${w}`));return A};return a.jsxs(h.Box,{w:"100%",maxW:"360px",bg:"bg.surface",borderRadius:"card",p:"5",fontFamily:"var(--font-body)",...i,children:[a.jsxs(h.Flex,{justify:"space-between",align:"center",mb:"6",children:[a.jsxs(h.Flex,{align:"center",gap:"4",children:[a.jsx(ea,{enabled:d,onClick:f,direction:"prev"}),a.jsxs(h.Text,{fontWeight:"semibold",fontSize:"md",color:"text.heading",children:[Hh[c]," ",l]}),a.jsx(ea,{enabled:u,onClick:p,direction:"next"})]}),a.jsx(h.Box,{as:"button",type:"button",onClick:m,px:"3",py:"1",fontSize:"sm",fontWeight:"medium",borderRadius:"md",border:"1px solid",borderColor:"border",color:"text.heading",_hover:{bg:"bg.subtle"},children:"Today"})]}),a.jsx(h.Flex,{mb:"3",children:Vh.map(A=>a.jsx(h.Box,{flex:"1",textAlign:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:A},A))}),a.jsx(h.Box,{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gapY:"2",children:B()})]})}function ea({enabled:e,onClick:t,direction:n}){return a.jsx(h.Box,{as:"button",type:"button","aria-label":n==="prev"?"Go to previous month":"Go to next month","aria-disabled":!e,onClick:e?t:void 0,cursor:e?"pointer":"not-allowed",color:e?"text.heading":"text.muted",opacity:e?1:.4,_hover:e?{color:"blue.500"}:void 0,children:a.jsx("svg",{width:"18",height:"18",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 fi({day:e,isActive:t,isMuted:n,isDisabled:r,onClick:i}){return a.jsx(h.Flex,{justify:"center",align:"center",h:"10",children:a.jsx(h.Box,{as:"button",type:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"full",fontSize:"sm",fontWeight:"medium",onClick:i,disabled:n||r,cursor:n?"default":r?"not-allowed":"pointer",opacity:r?.35:1,bg:t?"blue.500":"transparent",color:t?"white":n||r?"text.muted":"text.heading",_hover:!n&&!r&&!t?{bg:"bg.subtle",color:"blue.500"}:void 0,transition:"all 0.2s",children:e})})}function $h({value:e,onChange:t,min:n,max:r,label:i,helperText:o,errorMessage:s,colorScheme:l="blue",isInvalid:c=!1,isDisabled:d=!1,placeholder:u="Select date",id:f,includeTime:p=!1}){const[m,g]=T.useState(!1),x=T.useRef(null),y=E=>E!=null&&E.includes("T")&&E.split("T")[1].slice(0,5)||"00:00";T.useEffect(()=>{function E(L){x.current&&!x.current.contains(L.target)&&g(!1)}return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]);const j=c?"#DC2626":m?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",k="none",B=E=>{const L=E.getFullYear(),D=String(E.getMonth()+1).padStart(2,"0"),P=String(E.getDate()).padStart(2,"0");p?t==null||t(`${L}-${D}-${P}T${y(e)}`):(t==null||t(`${L}-${D}-${P}`),g(!1))},A=E=>{const L=E.target.value,D=(e==null?void 0:e.split("T")[0])??"";D&&(t==null||t(`${D}T${L}`))},w=E=>{if(!E)return;const[L,D,P]=E.split("-"),V=Number(L),_=Number(D),I=Number(P==null?void 0:P.split("T")[0]);if(!Number.isInteger(V)||!Number.isInteger(_)||!Number.isInteger(I))return;const R=new Date(V,_-1,I);if(!(R.getFullYear()!==V||R.getMonth()!==_-1||R.getDate()!==I))return R},M=w(e==null?void 0:e.split("T")[0]),F=M&&!isNaN(M.getTime())?p&&(e!=null&&e.includes("T"))?`${M.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})} ${e.split("T")[1].slice(0,5)}`:M.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return a.jsxs(h.Box,{w:"100%",position:"relative",ref:x,children:[i&&a.jsx(h.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),a.jsxs(h.Box,{position:"relative",children:[a.jsx("input",{id:f,readOnly:!0,type:"text",value:F,placeholder:u,disabled:d,"aria-invalid":c,"aria-haspopup":"dialog","aria-expanded":m,onClick:()=>!d&&g(!m),onKeyDown:E=>{d||(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:k,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(h.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(h.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:"popover",boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:[a.jsx(Ho,{value:M,onChange:B,minDate:w(n),maxDate:w(r)}),p&&a.jsxs(h.Box,{px:"5",pb:"4",borderTop:"1px solid",borderColor:"border",children:[a.jsx(h.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:A,disabled:!M,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:M?1:.4,cursor:M?"default":"not-allowed",colorScheme:"auto"}})]})]}),(o||s)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:c?"red.500":"text.muted",fontFamily:"var(--font-body)",children:c?s:o})]})}function Gh({startValue:e,onStartChange:t,endValue:n,onEndChange:r,min:i,max:o,label:s,helperText:l,errorMessage:c,colorScheme:d="blue",isInvalid:u=!1,isDisabled:f=!1,startPlaceholder:p="Start date",endPlaceholder:m="End date",id:g}){const[x,y]=T.useState(null),b=T.useRef(null);T.useEffect(()=>{function R(W){b.current&&!b.current.contains(W.target)&&y(null)}return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]);const k=u?"#DC2626":x?d==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",B="none",A={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:f?"not-allowed":"pointer",colorScheme:"auto",width:"100%"},w=R=>{const W=R.getFullYear(),Y=String(R.getMonth()+1).padStart(2,"0"),Z=String(R.getDate()).padStart(2,"0");return`${W}-${Y}-${Z}`},M=R=>i&&R<i?i:o&&R>o?o:R,F=R=>{const W=M(w(R));x==="start"?(t==null||t(W),n&&n<W&&(r==null||r("")),y("end")):x==="end"&&(r==null||r(W),e&&e>W&&(t==null||t("")),y(null))},E=R=>{if(!R)return;const[W,Y,Z]=R.split("-").map(Number);if(!W||Y<1||Y>12||Z<1||Z>31)return;const S=new Date(W,Y-1,Z);if(!(S.getFullYear()!==W||S.getMonth()!==Y-1||S.getDate()!==Z))return S},D=E(x==="start"?e:n),P=E(e),V=E(n),_=P?P.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",I=V?V.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return a.jsxs(h.Box,{w:"100%",position:"relative",ref:b,children:[s&&a.jsx(h.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s}),a.jsxs(h.Box,{display:"flex",alignItems:"center",position:"relative",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${k}`,boxShadow:B,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:f?.5:1,overflow:"hidden"},children:[a.jsx("input",{id:g,readOnly:!0,type:"text",value:_,placeholder:p,disabled:f,"aria-invalid":u,"aria-haspopup":"dialog","aria-expanded":x==="start",onClick:()=>!f&&y("start"),onKeyDown:R=>{f||(R.key==="Enter"||R.key===" "||R.key==="ArrowDown"?(R.preventDefault(),y("start")):R.key==="Escape"&&y(null))},style:{...A,textAlign:"center"}}),a.jsx(h.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),a.jsx("input",{readOnly:!0,type:"text",value:I,placeholder:m,disabled:f,"aria-invalid":u,"aria-haspopup":"dialog","aria-expanded":x==="end",onClick:()=>!f&&y("end"),onKeyDown:R=>{f||(R.key==="Enter"||R.key===" "||R.key==="ArrowDown"?(R.preventDefault(),y("end")):R.key==="Escape"&&y(null))},style:{...A,textAlign:"center"}})]}),x&&a.jsx(h.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:"popover",boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:a.jsx(Ho,{value:D,onChange:F,minDate:x==="end"?P??E(i):E(i),maxDate:E(o)})}),(l||c)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?c:l})]})}const Yh=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 Kh({options:e,value:t,onChange:n,placeholder:r="Search...",label:i,helperText:o,errorMessage:s,colorScheme:l="blue",isInvalid:c=!1,isDisabled:d=!1}){const[u,f]=T.useState(!1),[p,m]=T.useState(""),g=T.useRef(null);T.useEffect(()=>{if(t){const k=e.find(B=>B.value===t);k&&m(k.label)}},[t,e]),T.useEffect(()=>{function k(B){if(g.current&&!g.current.contains(B.target))if(f(!1),t){const A=e.find(w=>w.value===t);A&&m(A.label)}else m("")}return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[t,e]);const x=e.filter(k=>k.label.toLowerCase().includes(p.toLowerCase())),b=c?"#DC2626":u?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return a.jsxs(h.Box,{w:"100%",position:"relative",ref:g,children:[i&&a.jsx(h.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),a.jsxs(h.Box,{position:"relative",children:[a.jsx("input",{type:"text",value:p,placeholder:r,disabled:d,onChange:k=>{m(k.target.value),f(!0),k.target.value||n==null||n("")},onFocus:()=>f(!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(h.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:Yh})]}),u&&!d&&a.jsx(h.Box,{position:"absolute",zIndex:10,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(k=>a.jsx(h.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{n==null||n(k.value),m(k.label),f(!1)},children:k.label},k.value)):a.jsx(h.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(o||s)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:c?"red.500":"text.muted",fontFamily:"var(--font-body)",children:c?s:o})]})}const qh=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 Xh({accept:e,multiple:t=!1,maxSize:n,label:r,helperText:i,errorMessage:o,colorScheme:s="blue",isInvalid:l=!1,isDisabled:c=!1,onChange:d,dropzoneTitle:u="Click or drag to upload",id:f}){const[p,m]=T.useState(!1),[g,x]=T.useState([]),y=T.useRef(null),b=L=>{L.preventDefault(),c||m(!0)},j=L=>{L.preventDefault(),c||m(!0)},k=L=>{L.preventDefault(),m(!1)},B=L=>{if(!L||L.length===0)return;const P=Array.from(L).filter(V=>!(n&&V.size>n));x(P.map(V=>V.name)),d==null||d(P)},A=L=>{L.preventDefault(),m(!1),!c&&B(L.dataTransfer.files)},w=L=>{B(L.target.files)},M=s==="purple"?"purple.500":"blue.500",F=l?"red.500":p?M:"border",E=p?"bg.subtle":"transparent";return a.jsxs(h.Box,{w:"100%",children:[r&&a.jsx(h.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r}),a.jsxs(h.Box,{position:"relative",border:"1.5px dashed",borderColor:F,borderRadius:"xl",bg:E,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:c?.5:1,cursor:c?"not-allowed":"pointer",_hover:c?void 0:{borderColor:M,bg:"bg.subtle"},onDragEnter:b,onDragOver:j,onDragLeave:k,onDrop:A,onClick:()=>{var L;return!c&&((L=y.current)==null?void 0:L.click())},children:[a.jsx("input",{ref:y,id:f,type:"file",accept:e,multiple:t,disabled:c,style:{display:"none"},onChange:w}),a.jsx(h.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:qh}),a.jsx(h.Text,{fontSize:"sm",fontWeight:"medium",color:p?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:u}),a.jsxs(h.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(h.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[a.jsxs(h.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",g.length>1?"s":"",":"]}),g.map((L,D)=>a.jsx(h.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:L},D))]})]}),(i||o)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?o:i})]})}const ta={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"}},na={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 Nc({value:e=[],onChange:t,placeholder:n="Add tag...",label:r,helperText:i,errorMessage:o,isInvalid:s=!1,colorScheme:l="blue",size:c="md",isDisabled:d=!1,isReadOnly:u=!1,maxTags:f,allowDuplicates:p=!1,addOnBlur:m=!1,delimiter:g=",",id:x,name:y,style:b,className:j}){const k=T.useId(),B=x??k,[A,w]=T.useState(""),[M,F]=T.useState(!1),E=T.useRef(null),L=na[l]??na.blue,D=ta[c]??ta.md,P=W=>{if(d||u)return;const Y=W.trim();if(Y&&!(f!=null&&e.length>=f)){if(!p&&e.includes(Y)){w("");return}t([...e,Y]),w("")}},V=W=>{d||u||t(e.filter((Y,Z)=>Z!==W))},_=W=>{W.key==="Enter"||g&&W.key===g?(W.preventDefault(),P(A)):W.key==="Backspace"&&!A&&e.length>0&&V(e.length-1)},I=()=>{F(!1),m&&A.trim()&&P(A)},R=s?"#DC2626":M?L.focusBorder:"var(--medix-form-border)";return a.jsxs(h.Box,{w:"100%",style:b,className:j,children:[r&&a.jsx("label",{htmlFor:B,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:r}),a.jsxs(h.Box,{onClick:()=>{var W;return!d&&((W=E.current)==null?void 0:W.focus())},display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",minH:D.minH,py:D.py,px:D.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 ${R}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[e.map((W,Y)=>a.jsxs(h.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:D.tagPx,py:D.tagPy,borderRadius:"full",fontSize:D.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:W}),!d&&!u&&a.jsx("button",{type:"button",onClick:Z=>{Z.stopPropagation(),V(Y)},"aria-label":`Remove ${W}`,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:Z=>{Z.currentTarget.style.opacity="1"},onMouseLeave:Z=>{Z.currentTarget.style.opacity="0.7"},children:"×"})]},`${W}-${Y}`)),!d&&!u&&a.jsx("input",{ref:E,id:B,name:y,type:"text",value:A,onChange:W=>w(W.target.value),onKeyDown:_,onFocus:()=>F(!0),onBlur:I,placeholder:e.length===0?n:"",disabled:d,readOnly:u,style:{flex:1,minWidth:"120px",border:"none",outline:"none",background:"transparent",fontSize:D.fontSize,fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:0}})]}),(i||o)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?o:i})]})}const Zh=Nc,Jh={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 ra=!1;function Qh(){if(ra||typeof document>"u")return;ra=!0;const e=document.createElement("style");e.id="medix-rte-styles",e.textContent=`
|
|
265
|
+
`,fill:e})})}const mi={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},$o=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(h.Box,{w:"100%",children:[a.jsxs(h.Box,{position:"relative",children:[u&&a.jsx(h.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n}),a.jsx(h.Input,{ref:l,...mi[e],pl:u?"10":mi[e].px,pr:d?"10":mi[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(h.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(h.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})});$o.displayName="MedixInput";const Go=S.forwardRef(({placeholder:e="Search…",...t},n)=>a.jsx($o,{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}));Go.displayName="MedixSearchInput";const Nc=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),f=e==="purple"?"purple.500":"blue.500",m=p=>{c(p.target.value.length),o==null||o(p)};return a.jsxs(h.Box,{w:"100%",children:[a.jsx(h.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:m,_placeholder:{color:"text.muted"},_focus:{borderColor:t?"red.500":f,boxShadow:"none",outline:"none"},_dark:{bg:"bg.surface",borderColor:t?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...l}),a.jsxs(h.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[t&&n?a.jsx(h.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:n}):a.jsx("span",{}),i&&r&&a.jsxs(h.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[d,"/",r]})]})]})});Nc.displayName="MedixTextarea";const Fh={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}};function Bh({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:f,id:m}){const[p,g]=S.useState(!1),[x,y]=S.useState(""),[v,j]=S.useState(()=>typeof u=="string"?u:Array.isArray(u)&&u.length>0?u[0]:""),k=S.useRef(null),F=S.useRef(null),B=l!==void 0,T=B?typeof l=="string"?l:Array.isArray(l)&&l.length>0?l[0]:"":v,O=e.find(V=>V.value===T);S.useEffect(()=>{function V(_){k.current&&!k.current.contains(_.target)&&g(!1)}return p&&document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[p]),S.useEffect(()=>{if(p){const V=setTimeout(()=>{var _;return(_=F.current)==null?void 0:_.focus()},50);return()=>clearTimeout(V)}else y("")},[p]);const E=V=>{c||(B||j(V),d==null||d(V),g(!1))},A=S.useMemo(()=>{if(!x.trim())return e;const V=x.toLowerCase().trim();return e.filter(_=>_.label.toLowerCase().includes(V))},[e,x]),L=o==="purple"?"#7700CC":"#0685FF",M=n?"#DC2626":p?L:"var(--medix-form-border)",R=Fh[i];return a.jsxs(h.Box,{w:"100%",position:"relative",zIndex:p?1e3:void 0,ref:k,children:[f&&a.jsx("input",{type:"hidden",name:f,id:m,value:T}),a.jsxs(h.Box,{onClick:()=>!c&&g(!p),display:"flex",alignItems:"center",justifyContent:"space-between",h:R.h,px:R.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 ${M}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"2.5",flex:"1",minW:"0",children:[s&&a.jsx(h.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,children:s}),O?a.jsx(h.Text,{fontSize:R.fontSize,color:"text.heading",fontFamily:"var(--font-body)",truncate:!0,fontWeight:"500",children:O.label}):a.jsx(h.Text,{fontSize:R.fontSize,color:"text.muted",fontFamily:"var(--font-body)",truncate:!0,children:t})]}),a.jsx(h.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",flexShrink:0,style:{transform:p?"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"})})})]}),p&&a.jsxs(h.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(h.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsxs(h.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:F,type:"text",placeholder:"Search...",value:x,onChange:V=>y(V.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(h.Box,{overflowY:"auto",flex:"1",py:"1",children:A.length===0?a.jsx(h.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):A.map(V=>{const _=V.value===T;return a.jsxs("button",{type:"button",disabled:V.disabled,onClick:()=>E(V.value),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:_?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:V.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:V.disabled?.5:1,transition:"background 0.1s ease"},onMouseEnter:I=>{V.disabled||(I.currentTarget.style.background="var(--medix-form-bg-subtle)")},onMouseLeave:I=>{V.disabled||(I.currentTarget.style.background=_?"var(--medix-form-bg-subtle)":"transparent")},children:[a.jsx("span",{style:{fontWeight:_?600:400},children:V.label}),_&&a.jsx("span",{style:{color:L,fontWeight:700,fontSize:"14px"},children:"✓"})]},V.value)})})]}),n&&r&&a.jsx(h.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function Lh({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:f,id:m}){const[p,g]=S.useState(!1),[x,y]=S.useState(""),[v,j]=S.useState(()=>Array.isArray(u)?u:typeof u=="string"&&u?[u]:[]),k=S.useRef(null),F=S.useRef(null),B=l!==void 0,T=B?Array.isArray(l)?l:typeof l=="string"&&l?[l]:[]:v;S.useEffect(()=>{function I(D){k.current&&!k.current.contains(D.target)&&g(!1)}return p&&document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[p]),S.useEffect(()=>{if(p){const I=setTimeout(()=>{var D;return(D=F.current)==null?void 0:D.focus()},50);return()=>clearTimeout(I)}else y("")},[p]);const O=I=>{if(c)return;const U=T.includes(I)?T.filter(W=>W!==I):[...T,I];B||j(U),d==null||d(U)},E=(I,D)=>{if(D.stopPropagation(),c)return;const U=T.filter(W=>W!==I);B||j(U),d==null||d(U)},A=S.useMemo(()=>{if(!x.trim())return e;const I=x.toLowerCase().trim();return e.filter(D=>D.label.toLowerCase().includes(I))},[e,x]),L=o==="purple"?"#7700CC":"#0685FF",M=n?"#DC2626":p?L:"var(--medix-form-border)",R=o==="purple"?"purple.50":"blue.50",V=o==="purple"?"purple.700":"blue.700",_=o==="purple"?"purple.200":"blue.200";return a.jsxs(h.Box,{w:"100%",position:"relative",zIndex:p?1e3:void 0,ref:k,children:[f&&a.jsx("input",{type:"hidden",name:f,id:m,value:T.join(",")}),a.jsxs(h.Box,{onClick:()=>!c&&g(!p),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 ${M}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[a.jsxs(h.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"1.5",flex:"1",minW:"0",children:[s&&a.jsx(h.Box,{color:"text.muted",display:"flex",alignItems:"center",mr:"1",children:s}),T.length===0?a.jsx(h.Text,{fontSize:i==="sm"?"xs":"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}):T.map(I=>{const D=e.find(W=>W.value===I),U=D?D.label:I;return a.jsxs(h.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:R,color:V,border:"1px solid",borderColor:_,_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:W=>E(I,W),"aria-label":`Remove ${U}`,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)})]}),a.jsx(h.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",style:{transform:p?"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"})})})]}),p&&a.jsxs(h.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(h.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsxs(h.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: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"}})]})}),a.jsx(h.Box,{overflowY:"auto",flex:"1",py:"1",children:A.length===0?a.jsx(h.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):A.map(I=>{const D=T.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:D?"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=D?"var(--medix-form-bg-subtle)":"transparent")},children:[a.jsx("span",{style:{fontWeight:D?600:400},children:I.label}),D&&a.jsx("span",{style:{color:L,fontWeight:700,fontSize:"14px"},children:"✓"})]},I.value)})})]}),n&&r&&a.jsx(h.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function Ih(e){return e.multiple?a.jsx(Lh,{...e}):a.jsx(Bh,{...e})}const Vc={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"}},Hc=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},f)=>{const m=Vc[e],p=c??S.useId(),[g,x]=S.useState(n),[y,v]=S.useState(!1),j=t!==void 0?t:g,k=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||o?m.solid:"var(--medix-form-border, #CBD5E1)"}`,background:j||o?m.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(h.Box,{opacity:i?.55:1,children:[a.jsxs("label",{htmlFor:p,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[a.jsx("input",{ref:f,id:p,type:"checkbox",name:u,value:d,checked:j,disabled:i,onChange:k,onFocus:()=>v(!0),onBlur:()=>v(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),a.jsx("span",{style:F,"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"})}):j?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(h.Box,{children:[a.jsx(h.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:s}),l&&a.jsx(h.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]}),!s&&l&&a.jsx(h.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l})]})});Hc.displayName="MedixCheckbox";function Dh({name:e,value:t,onChange:n,options:r,colorScheme:i="blue",direction:o="column"}){const s=Vc[i],[l,u]=S.useState(""),d=t!==void 0?t:l,c=f=>{t===void 0&&u(f),n==null||n(f)};return a.jsx(h.Box,{display:"flex",flexDirection:o,gap:o==="row"?"5":"3",role:"radiogroup",children:r.map(f=>{const m=d===f.value;return a.jsx(Rh,{option:f,name:e,isSelected:m,onChange:c,solidColor:s.solid,ring:s.ring},f.value)})})}function Rh({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(h.Box,{children:[a.jsx(h.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&a.jsx(h.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const Mh={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"}},Ph={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}},Wc=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 f=Mh[e],m=Ph[t],p=d??S.useId(),[g,x]=S.useState(r),[y,v]=S.useState(!1),j=n!==void 0?n:g,k=T=>{n===void 0&&x(T.target.checked),i==null||i(T.target.checked)},F={position:"relative",display:"inline-flex",alignItems:"center",width:m.width,height:m.height,borderRadius:m.height,background:j?f.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},B={position:"absolute",width:m.thumbSize,height:m.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"none",top:m.thumbOffset,left:j?m.width-m.thumbSize-m.thumbOffset:m.thumbOffset,transition:"left 0.18s ease"};return a.jsxs(h.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:o?.55:1,children:[a.jsxs("label",{htmlFor:p,style:{display:"inline-flex",cursor:o?"not-allowed":"pointer"},children:[a.jsx("input",{ref:c,id:p,type:"checkbox",role:"switch",name:u,checked:j,disabled:o,onChange:k,onFocus:()=>v(!0),onBlur:()=>v(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),a.jsx("span",{style:F,"aria-hidden":"true",children:a.jsx("span",{style:B})})]}),(s||l)&&a.jsxs(h.Box,{children:[s&&a.jsx("label",{htmlFor:p,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(h.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]})});Wc.displayName="MedixSwitch";function Oh({id:e,label:t,helperText:n,errorMessage:r,isRequired:i=!1,isDisabled:o=!1,children:s}){const l=!!r;return a.jsxs(h.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:o?.5:1,pointerEvents:o?"none":void 0,w:"100%",children:[t&&a.jsxs(h.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[a.jsx(h.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&a.jsx(h.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),S.cloneElement(s,{id:e,isInvalid:l||void 0}),n&&!l&&a.jsx(h.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),l&&r&&a.jsx(h.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function Uc({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:f}){const[m,p]=S.useState(n),[g,x]=S.useState(null),y=t!==void 0,j=(y?t:m).split("").slice(0,e),k=S.useRef([]),F=s?"#DC2626":"var(--medix-form-border)",B=s?"#DC2626":o==="purple"?"#7700CC":"#0685FF",T=(E,A)=>{var L,M,R;if(E.key==="Backspace"){E.preventDefault();const V=[...j];if(V[A]){V[A]="";const _=V.join("");y||p(_),r==null||r(_)}else if(A>0){(L=k.current[A-1])==null||L.focus(),V[A-1]="";const _=V.join("");y||p(_),r==null||r(_)}}else E.key==="ArrowLeft"&&A>0?(M=k.current[A-1])==null||M.focus():E.key==="ArrowRight"&&A<e-1&&((R=k.current[A+1])==null||R.focus())},O=(E,A)=>{var V,_;const L=E.target.value.replace(/\D/g,"");if(!L)return;if(L.length>1){const I=L.split("").slice(0,e),D=[...Array(e).fill("")];I.forEach((G,b)=>{D[b]=G});const U=D.join("");y||p(U),r==null||r(U);const W=Math.min(I.length,e-1);(V=k.current[W])==null||V.focus(),U.length===e&&(i==null||i(U));return}const M=[...j];for(;M.length<e;)M.push("");M[A]=L;const R=M.join("");y||p(R),r==null||r(R),A<e-1&&((_=k.current[A+1])==null||_.focus()),R.replace(/\s/g,"").length===e&&(i==null||i(R))};return a.jsxs(h.Box,{w:"fit-content",children:[d&&a.jsx(h.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:d}),a.jsx(h.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((E,A)=>a.jsx("input",{ref:L=>{k.current[A]=L},type:u?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:j[A]??"",onChange:L=>O(L,A),onKeyDown:L=>T(L,A),onFocus:L=>{L.target.select(),x(A)},onBlur:()=>x(null),disabled:l,"aria-label":`Digit ${A+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${g===A?B:F}`,boxShadow:"none",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",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}},A))}),(c||f)&&a.jsx(h.Text,{mt:"2",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?f:c})]})}const zh=Uc;function Nr(){return Nr=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},Nr.apply(this,arguments)}function _h(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 Nh=["cdnSuffix","cdnUrl","countryCode","style","svg"],Vh="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",Hh="svg",Wh=127397,na=function(t){var n=t.cdnSuffix,r=n===void 0?Hh:n,i=t.cdnUrl,o=i===void 0?Vh:i,s=t.countryCode,l=t.style,u=t.svg,d=u===void 0?!1:u,c=_h(t,Nh);if(typeof s!="string")return null;if(d){var f=""+o+s.toLowerCase()+"."+r;return S.createElement("img",Object.assign({},c,{src:f,style:Nr({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},l)}))}var m=s.toUpperCase().replace(/./g,function(p){return String.fromCodePoint(p.charCodeAt(0)+Wh)});return S.createElement("span",Object.assign({role:"img"},c,{style:Nr({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},l)}),m)};const Uh={"+1":"US","+7":"RU","+39":"IT","+44":"GB","+47":"NO","+212":"MA","+262":"RE","+290":"SH","+358":"FI","+590":"GP","+599":"CW"},Nt=[{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 $h({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:f,isDisabled:m=!1,id:p}){const g=S.useId(),x=p??g,y=o??(i?Uh[i]:void 0),v=(y?Nt.find(K=>K.country===y):void 0)??Nt.find(K=>K.code===i)??Nt.find(K=>K.country==="NG")??Nt[0],[j,k]=S.useState(v.country),[F,B]=S.useState(e),[T,O]=S.useState(!1),[E,A]=S.useState(!1),[L,M]=S.useState(""),R=S.useRef(null),V=S.useRef(null),_=Nt.find(K=>K.country===j)??v;S.useEffect(()=>{function K(te){R.current&&!R.current.contains(te.target)&&A(!1)}return E&&document.addEventListener("mousedown",K),()=>{document.removeEventListener("mousedown",K)}},[E]),S.useEffect(()=>{if(E){const K=setTimeout(()=>{var te;(te=V.current)==null||te.focus()},50);return()=>clearTimeout(K)}else M("")},[E]);const I=S.useMemo(()=>{if(!L.trim())return Nt;const K=L.toLowerCase().trim();return Nt.filter(te=>te.name.toLowerCase().includes(K)||te.code.toLowerCase().includes(K)||te.country.toLowerCase().includes(K))},[L]),D=K=>{const te=K.target.value.replace(/[^\d\s\-]/g,"");B(te),t==null||t(`${_.code}${te.replace(/\s/g,"")}`)},U=K=>{k(K.country),t==null||t(`${K.code}${F.replace(/\s/g,"")}`),A(!1)},G=u?"#DC2626":T||E?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return a.jsxs(h.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(h.Box,{display:"flex",alignItems:"center",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:m?.5:1,pointerEvents:m?"none":void 0,position:"relative",zIndex:E?1e3:void 0,style:{border:`1.5px solid ${G}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[n&&a.jsxs(h.Box,{position:"relative",ref:R,h:"full",children:[a.jsxs("button",{id:`${x}-country`,type:"button",onClick:()=>!m&&A(!E),disabled:m,"aria-label":"Select country code","aria-expanded":E,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:m?"not-allowed":"pointer",height:"100%",color:"var(--medix-form-text)",fontFamily:"var(--font-body)",fontSize:"14px",fontWeight:500},children:[r&&a.jsx(h.Box,{display:"flex",alignItems:"center",fontSize:"lg",lineHeight:"1",children:a.jsx(na,{countryCode:_.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),a.jsx("span",{children:_.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:E?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease",opacity:.7},children:a.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),E&&a.jsxs(h.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(h.Box,{p:"2.5",color:"text.heading",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsxs(h.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:V,type:"text",placeholder:"Search country or code...",value:L,onChange:K=>M(K.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),a.jsx(h.Box,{overflowY:"auto",flex:"1",py:"1",children:I.length===0?a.jsx(h.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No country found"}):I.map(K=>{const te=K.country===_.country;return a.jsxs("button",{type:"button",onClick:()=>U(K),style:{display:"flex",width:"100%",alignItems:"center",gap:"10px",padding:"8px 14px",background:te?"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:C=>{C.currentTarget.style.background="var(--medix-form-bg-subtle)"},onMouseLeave:C=>{C.currentTarget.style.background=te?"var(--medix-form-bg-subtle)":"transparent"},children:[a.jsx(h.Box,{display:"flex",alignItems:"center",fontSize:"md",flexShrink:0,children:a.jsx(na,{countryCode:K.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),a.jsx(h.Text,{flex:"1",truncate:!0,fontWeight:te?"600":"400",children:K.name}),a.jsx(h.Text,{fontSize:"xs",color:"text.muted",flexShrink:0,children:K.code})]},`${K.country}-${K.code}`)})})]})]}),a.jsx("input",{id:x,type:"tel",value:F,onChange:D,onFocus:()=>O(!0),onBlur:()=>O(!1),placeholder:s,disabled:m,"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}})]}),(f||d)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?d:f})]})}const Gh=["MON","TUES","WED","THURS","FRI","SAT","SUN"],Yh=["January","February","March","April","May","June","July","August","September","October","November","December"],Kh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Rn=12;function Zi(e,t){return new Date(e,t+1,0).getDate()}function qh(e,t){return new Date(e,t,1).getDay()}function Xh(e){return e===0?6:e-1}function ra(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 Zh(e,t,n,r){const i=Zi(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 Jh(e,t,n){return!!(t&&e<t.getFullYear()||n&&e>n.getFullYear())}function Yo({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,f]=S.useState("day"),[m,p]=S.useState(0);S.useEffect(()=>{e&&d(G=>{const b=new Date(e);return G.getFullYear()===b.getFullYear()&&G.getMonth()===b.getMonth()?G:b})},[e]);const g=u.getFullYear(),x=u.getMonth(),v=Math.floor(g/Rn)*Rn+m*Rn,j=v+Rn-1,k=!n||g>n.getFullYear()||g===n.getFullYear()&&x>n.getMonth(),F=!r||g<r.getFullYear()||g===r.getFullYear()&&x<r.getMonth(),B=()=>{d(new Date(g,x-1,1))},T=()=>{d(new Date(g,x+1,1))},O=()=>{const G=new Date;d(G),f("day"),t&&!ra(G.getDate(),G.getMonth(),G.getFullYear(),n,r)&&t(G)},E=G=>{d(new Date(g,G,1)),f("day")},A=G=>{d(new Date(G,x,1)),p(0),f("month")},L=Zi(g,x),M=Xh(qh(g,x)),R=Zi(g,x-1),_=(M+L>35?42:35)-(M+L),I=(G,b,K)=>e?e.getDate()===G&&e.getMonth()===b&&e.getFullYear()===K:!1,D=()=>{const G=[];for(let b=0;b<M;b++){const K=R-M+b+1;G.push(a.jsx(gi,{day:K,isMuted:!0,accentColor:s},`prev-${b}`))}for(let b=1;b<=L;b++){const K=ra(b,x,g,n,r);G.push(a.jsx(gi,{day:b,isActive:I(b,x,g),isDisabled:K,accentColor:s,accentLight:l,onClick:K?void 0:()=>t==null?void 0:t(new Date(g,x,b))},`curr-${b}`))}for(let b=1;b<=_;b++)G.push(a.jsx(gi,{day:b,isMuted:!0,accentColor:s},`next-${b}`));return G},U=()=>a.jsx(h.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",mt:"2",children:Kh.map((G,b)=>{const K=b===x,te=Zh(b,g,n,r);return a.jsx(oa,{label:G,isActive:K,isDisabled:te,accentColor:s,accentLight:l,onClick:()=>!te&&E(b)},G)})}),W=()=>{const G=Array.from({length:Rn},(b,K)=>v+K);return a.jsxs(a.Fragment,{children:[a.jsxs(h.Flex,{justify:"space-between",align:"center",mb:"3",children:[a.jsx(gr,{direction:"prev",enabled:!0,accentColor:s,onClick:()=>p(b=>b-1),ariaLabel:"Previous years"}),a.jsxs(h.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:[v," – ",j]}),a.jsx(gr,{direction:"next",enabled:!0,accentColor:s,onClick:()=>p(b=>b+1),ariaLabel:"Next years"})]}),a.jsx(h.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",children:G.map(b=>{const K=b===g,te=Jh(b,n,r);return a.jsx(oa,{label:String(b),isActive:K,isDisabled:te,accentColor:s,accentLight:l,onClick:()=>!te&&A(b)},b)})})]})};return a.jsxs(h.Box,{w:"100%",maxW:"360px",bg:"bg.surface",borderRadius:"card",p:"5",fontFamily:"var(--font-body)",...o,children:[a.jsxs(h.Flex,{justify:"space-between",align:"center",mb:c==="day"?"6":"4",children:[a.jsxs(h.Flex,{align:"center",gap:"1",children:[c==="day"&&a.jsx(gr,{direction:"prev",enabled:k,accentColor:s,onClick:B,ariaLabel:"Go to previous month"}),a.jsx(ia,{label:Yh[x],isActive:c==="month",accentColor:s,accentLight:l,onClick:()=>{f(G=>G==="month"?"day":"month"),p(0)}}),a.jsx(ia,{label:String(g),isActive:c==="year",accentColor:s,accentLight:l,onClick:()=>{f(G=>G==="year"?"day":"year"),p(0)}}),c==="day"&&a.jsx(gr,{direction:"next",enabled:F,accentColor:s,onClick:T,ariaLabel:"Go to next month"})]}),a.jsx(h.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(h.Flex,{mb:"3",children:Gh.map(G=>a.jsx(h.Box,{flex:"1",textAlign:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:G},G))}),a.jsx(h.Box,{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gapY:"2",children:D()})]}),c==="month"&&U(),c==="year"&&W()]})}function gr({enabled:e,onClick:t,direction:n,accentColor:r,ariaLabel:i}){return a.jsx(h.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 ia({label:e,isActive:t,accentColor:n,accentLight:r,onClick:i}){return a.jsxs(h.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 oa({label:e,isActive:t,isDisabled:n,accentColor:r,accentLight:i,onClick:o}){return a.jsx(h.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 gi({day:e,isActive:t,isMuted:n,isDisabled:r,accentColor:i,accentLight:o,onClick:s}){return a.jsx(h.Flex,{justify:"center",align:"center",h:"10",children:a.jsx(h.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 Qh({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:f,includeTime:m=!1}){const[p,g]=S.useState(!1),x=S.useRef(null),y=A=>A!=null&&A.includes("T")&&A.split("T")[1].slice(0,5)||"00:00";S.useEffect(()=>{function A(L){x.current&&!x.current.contains(L.target)&&g(!1)}return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]);const j=u?"#DC2626":p?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",k="none",F=A=>{const L=A.getFullYear(),M=String(A.getMonth()+1).padStart(2,"0"),R=String(A.getDate()).padStart(2,"0");m?t==null||t(`${L}-${M}-${R}T${y(e)}`):(t==null||t(`${L}-${M}-${R}`),g(!1))},B=A=>{const L=A.target.value,M=(e==null?void 0:e.split("T")[0])??"";M&&(t==null||t(`${M}T${L}`))},T=A=>{if(!A)return;const[L,M,R]=A.split("-"),V=Number(L),_=Number(M),I=Number(R==null?void 0:R.split("T")[0]);if(!Number.isInteger(V)||!Number.isInteger(_)||!Number.isInteger(I))return;const D=new Date(V,_-1,I);if(!(D.getFullYear()!==V||D.getMonth()!==_-1||D.getDate()!==I))return D},O=T(e==null?void 0:e.split("T")[0]),E=O&&!isNaN(O.getTime())?m&&(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(h.Box,{w:"100%",position:"relative",zIndex:p?1e3:void 0,ref:x,children:[i&&a.jsx(h.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),a.jsxs(h.Box,{position:"relative",children:[a.jsx("input",{id:f,readOnly:!0,type:"text",value:E,placeholder:c,disabled:d,"aria-invalid":u,"aria-haspopup":"dialog","aria-expanded":p,onClick:()=>!d&&g(!p),onKeyDown:A=>{d||(A.key==="Enter"||A.key===" "||A.key==="ArrowDown"?(A.preventDefault(),g(!0)):A.key==="Escape"&&g(!1))},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${j}`,boxShadow:k,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(h.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"})]})})]}),p&&a.jsxs(h.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(Yo,{value:O,onChange:F,minDate:T(n),maxDate:T(r),colorScheme:l}),m&&a.jsxs(h.Box,{px:"5",pb:"4",borderTop:"1px solid",borderColor:"border",children:[a.jsx(h.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:B,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(h.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?s:o})]})}function ep({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:f=!1,startPlaceholder:m="Start date",endPlaceholder:p="End date",id:g}){const[x,y]=S.useState(null),v=S.useRef(null);S.useEffect(()=>{function D(U){v.current&&!v.current.contains(U.target)&&y(null)}return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const k=c?"#DC2626":x?d==="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:f?"not-allowed":"pointer",colorScheme:"auto",width:"100%"},T=D=>{const U=D.getFullYear(),W=String(D.getMonth()+1).padStart(2,"0"),G=String(D.getDate()).padStart(2,"0");return`${U}-${W}-${G}`},O=D=>i&&D<i?i:o&&D>o?o:D,E=D=>{const U=O(T(D));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))},A=D=>{if(!D)return;const[U,W,G]=D.split("-").map(Number);if(!U||W<1||W>12||G<1||G>31)return;const b=new Date(U,W-1,G);if(!(b.getFullYear()!==U||b.getMonth()!==W-1||b.getDate()!==G))return b},M=A(x==="start"?e:n),R=A(e),V=A(n),_=R?R.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",I=V?V.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return a.jsxs(h.Box,{w:"100%",position:"relative",zIndex:x?1e3:void 0,ref:v,children:[s&&a.jsx(h.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s}),a.jsxs(h.Box,{display:"flex",alignItems:"center",position:"relative",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${k}`,boxShadow:F,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:f?.5:1,overflow:"hidden"},children:[a.jsx("input",{id:g,readOnly:!0,type:"text",value:_,placeholder:m,disabled:f,"aria-invalid":c,"aria-haspopup":"dialog","aria-expanded":x==="start",onClick:()=>!f&&y("start"),onKeyDown:D=>{f||(D.key==="Enter"||D.key===" "||D.key==="ArrowDown"?(D.preventDefault(),y("start")):D.key==="Escape"&&y(null))},style:{...B,textAlign:"center"}}),a.jsx(h.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),a.jsx("input",{readOnly:!0,type:"text",value:I,placeholder:p,disabled:f,"aria-invalid":c,"aria-haspopup":"dialog","aria-expanded":x==="end",onClick:()=>!f&&y("end"),onKeyDown:D=>{f||(D.key==="Enter"||D.key===" "||D.key==="ArrowDown"?(D.preventDefault(),y("end")):D.key==="Escape"&&y(null))},style:{...B,textAlign:"center"}})]}),x&&a.jsx(h.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(Yo,{value:M,onChange:E,minDate:x==="end"?R??A(i):A(i),maxDate:A(o),colorScheme:d})}),(l||u)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:c?"red.500":"text.muted",fontFamily:"var(--font-body)",children:c?u:l})]})}const tp=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 np({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,f]=S.useState(!1),[m,p]=S.useState(""),g=S.useRef(null);S.useEffect(()=>{if(t){const k=e.find(F=>F.value===t);k&&p(k.label)}},[t,e]),S.useEffect(()=>{function k(F){if(g.current&&!g.current.contains(F.target))if(f(!1),t){const B=e.find(T=>T.value===t);B&&p(B.label)}else p("")}return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[t,e]);const x=e.filter(k=>k.label.toLowerCase().includes(m.toLowerCase())),v=u?"#DC2626":c?l==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return a.jsxs(h.Box,{w:"100%",position:"relative",zIndex:c?1e3:void 0,ref:g,children:[i&&a.jsx(h.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),a.jsxs(h.Box,{position:"relative",children:[a.jsx("input",{type:"text",value:m,placeholder:r,disabled:d,onChange:k=>{p(k.target.value),f(!0),k.target.value||n==null||n("")},onFocus:()=>f(!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:d?"not-allowed":"text",opacity:d?.5:1}}),a.jsx(h.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:tp})]}),c&&!d&&a.jsx(h.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(k=>a.jsx(h.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{n==null||n(k.value),p(k.label),f(!1)},children:k.label},k.value)):a.jsx(h.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(o||s)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?s:o})]})}const rp=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 ip({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:f}){const[m,p]=S.useState(!1),[g,x]=S.useState([]),y=S.useRef(null),v=R=>{R.preventDefault(),u||p(!0)},j=R=>{R.preventDefault(),u||p(!0)},k=R=>{R.preventDefault(),p(!1)},[F,B]=S.useState(null),T=R=>{if(!R||R.length===0)return;const V=Array.from(R);B(null);const _=V.find(D=>n&&D.size>n);if(_&&n){const D=Math.round(n/1048576);B(`File "${_.name}" exceeds the maximum limit of ${D}MB.`)}const I=V.filter(D=>!(n&&D.size>n));I.length>0&&(x(I.map(D=>D.name)),d==null||d(I))},O=R=>{R.preventDefault(),p(!1),!u&&T(R.dataTransfer.files)},E=R=>{T(R.target.files),R.target.value=""},A=s==="purple"?"purple.500":"blue.500",L=l?"red.500":m?A:"border",M=m?"bg.subtle":"transparent";return a.jsxs(h.Box,{w:"100%",children:[r&&a.jsx(h.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r}),a.jsxs(h.Box,{position:"relative",border:"1.5px dashed",borderColor:L,borderRadius:"xl",bg:M,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:A,bg:"bg.subtle"},onDragEnter:v,onDragOver:j,onDragLeave:k,onDrop:O,onClick:()=>{var R;return!u&&((R=y.current)==null?void 0:R.click())},children:[a.jsx("input",{ref:y,id:f,type:"file",accept:e,multiple:t,disabled:u,style:{display:"none"},onChange:E}),a.jsx(h.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:rp}),a.jsx(h.Text,{fontSize:"sm",fontWeight:"medium",color:m?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:c}),a.jsxs(h.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(h.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[a.jsxs(h.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",g.length>1?"s":"",":"]}),g.map((R,V)=>a.jsx(h.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:R},V))]})]}),(i||o||F)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:l||F?"red.500":"text.muted",fontFamily:"var(--font-body)",children:F||(l?o:i)})]})}const sa={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"}},aa={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 $c({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:f,allowDuplicates:m=!1,addOnBlur:p=!1,delimiter:g=",",id:x,name:y,style:v,className:j}){const k=S.useId(),F=x??k,[B,T]=S.useState(""),[O,E]=S.useState(!1),A=S.useRef(null),L=aa[l]??aa.blue,M=sa[u]??sa.md,R=U=>{if(d||c)return;const W=U.trim();if(W&&!(f!=null&&e.length>=f)){if(!m&&e.includes(W)){T("");return}t([...e,W]),T("")}},V=U=>{d||c||t(e.filter((W,G)=>G!==U))},_=U=>{U.key==="Enter"||g&&U.key===g?(U.preventDefault(),R(B)):U.key==="Backspace"&&!B&&e.length>0&&V(e.length-1)},I=()=>{E(!1),p&&B.trim()&&R(B)},D=s?"#DC2626":O?L.focusBorder:"var(--medix-form-border)";return a.jsxs(h.Box,{w:"100%",style:v,className:j,children:[r&&a.jsx("label",{htmlFor:F,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:r}),a.jsxs(h.Box,{onClick:()=>{var U;return!d&&((U=A.current)==null?void 0:U.focus())},display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",minH:M.minH,py:M.py,px:M.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 ${D}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[e.map((U,W)=>a.jsxs(h.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:M.tagPx,py:M.tagPy,borderRadius:"full",fontSize:M.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:G=>{G.stopPropagation(),V(W)},"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:G=>{G.currentTarget.style.opacity="1"},onMouseLeave:G=>{G.currentTarget.style.opacity="0.7"},children:"×"})]},`${U}-${W}`)),!d&&!c&&a.jsx("input",{ref:A,id:F,name:y,type:"text",value:B,onChange:U=>T(U.target.value),onKeyDown:_,onFocus:()=>E(!0),onBlur:I,placeholder:e.length===0?n:"",disabled:d,readOnly:c,style:{flex:1,minWidth:"120px",border:"none",outline:"none",background:"transparent",fontSize:M.fontSize,fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:0}})]}),(i||o)&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?o:i})]})}const op=$c;function Hn(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()}
|
|
266
|
+
|
|
267
|
+
`;case"h2":return`## ${s.trim()}
|
|
268
|
+
|
|
269
|
+
`;case"h3":return`### ${s.trim()}
|
|
270
|
+
|
|
271
|
+
`;case"p":return s.trim()?`${s.trim()}
|
|
272
|
+
|
|
273
|
+
`:"";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()}
|
|
274
|
+
|
|
275
|
+
`;case"ul":return`${Array.from(i.children).map(l=>`- ${n(l).trim()}`).join(`
|
|
276
|
+
`)}
|
|
277
|
+
|
|
278
|
+
`;case"ol":return`${Array.from(i.children).map((l,u)=>`${u+1}. ${n(l).trim()}`).join(`
|
|
279
|
+
`)}
|
|
280
|
+
|
|
281
|
+
`;case"li":return s;case"a":{const l=i.getAttribute("href")||"";return`[${s}](${l})`}case"br":return`
|
|
282
|
+
`;default:return s}}return n(t).trim()}function Ut(e){if(!e)return"<p></p>";if(/<[a-z][\s\S]*>/i.test(e.trim()))return e;const t=e.split(`
|
|
283
|
+
`),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 sp={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 la=!1;function ap(){if(la||typeof document>"u")return;la=!0;const e=document.createElement("style");e.id="medix-rte-styles",e.textContent=`
|
|
266
284
|
.medix-rte-content .tiptap {
|
|
267
285
|
outline: none;
|
|
268
286
|
padding: 12px 16px;
|
|
@@ -309,33 +327,41 @@
|
|
|
309
327
|
.medix-rte-content .tiptap .text-center { text-align: center; }
|
|
310
328
|
.medix-rte-content .tiptap .text-right { text-align: right; }
|
|
311
329
|
.medix-rte-content .tiptap .text-justify { text-align: justify; }
|
|
312
|
-
`,document.head.appendChild(e)}function Qe({onClick:e,isActive:t,disabled:n,title:r,accentColor:i,children:o}){const[s,l]=T.useState(!1);return a.jsx("button",{type:"button",title:r,onMouseDown:c=>{c.preventDefault(),n||e()},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),disabled:n,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"30px",height:"28px",borderRadius:"6px",border:"none",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 hr(){return a.jsx("div",{style:{width:"1px",height:"18px",background:"var(--medix-form-border)",flexShrink:0,alignSelf:"center",margin:"0 2px"}})}const ep=()=>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"})}),tp=()=>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"})}),np=()=>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"})}),rp=()=>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"})}),ip=()=>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"})}),op=()=>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"})}),sp=()=>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"})}),ap=()=>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"})}),lp=()=>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"})}),cp=()=>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"})}),up=()=>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"})}),dp=()=>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 fp({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 hp({editor:e,accentColor:t,disabled:n,opts:r}){if(!e)return null;const i=()=>{const o=e.getAttributes("link").href,s=window.prompt("Enter URL",o??"https://");if(s!==null){if(s===""){e.chain().focus().unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:s,target:"_blank"}).run()}};return a.jsxs(h.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5",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:[r.headings&&a.jsxs(a.Fragment,{children:[a.jsx(fp,{editor:e,accentColor:t,disabled:n}),a.jsx(hr,{})]}),r.bold&&a.jsx(Qe,{onClick:()=>e.chain().focus().toggleBold().run(),isActive:e.isActive("bold"),disabled:n,title:"Bold (Ctrl+B)",accentColor:t,children:a.jsx(ep,{})}),r.italic&&a.jsx(Qe,{onClick:()=>e.chain().focus().toggleItalic().run(),isActive:e.isActive("italic"),disabled:n,title:"Italic (Ctrl+I)",accentColor:t,children:a.jsx(tp,{})}),r.underline&&a.jsx(Qe,{onClick:()=>e.chain().focus().toggleUnderline().run(),isActive:e.isActive("underline"),disabled:n,title:"Underline (Ctrl+U)",accentColor:t,children:a.jsx(np,{})}),r.strikethrough&&a.jsx(Qe,{onClick:()=>e.chain().focus().toggleStrike().run(),isActive:e.isActive("strike"),disabled:n,title:"Strikethrough",accentColor:t,children:a.jsx(rp,{})}),(r.bulletList||r.orderedList||r.quote)&&a.jsx(hr,{}),r.bulletList&&a.jsx(Qe,{onClick:()=>e.chain().focus().toggleBulletList().run(),isActive:e.isActive("bulletList"),disabled:n,title:"Bullet List",accentColor:t,children:a.jsx(ip,{})}),r.orderedList&&a.jsx(Qe,{onClick:()=>e.chain().focus().toggleOrderedList().run(),isActive:e.isActive("orderedList"),disabled:n,title:"Ordered List",accentColor:t,children:a.jsx(op,{})}),r.quote&&a.jsx(Qe,{onClick:()=>e.chain().focus().toggleBlockquote().run(),isActive:e.isActive("blockquote"),disabled:n,title:"Blockquote",accentColor:t,children:a.jsx(sp,{})}),r.textAlign&&a.jsxs(a.Fragment,{children:[a.jsx(hr,{}),a.jsx(Qe,{onClick:()=>e.chain().focus().setTextAlign("left").run(),isActive:e.isActive({textAlign:"left"}),disabled:n,title:"Align Left",accentColor:t,children:a.jsx(cp,{})}),a.jsx(Qe,{onClick:()=>e.chain().focus().setTextAlign("center").run(),isActive:e.isActive({textAlign:"center"}),disabled:n,title:"Align Center",accentColor:t,children:a.jsx(up,{})}),a.jsx(Qe,{onClick:()=>e.chain().focus().setTextAlign("right").run(),isActive:e.isActive({textAlign:"right"}),disabled:n,title:"Align Right",accentColor:t,children:a.jsx(dp,{})})]}),(r.link||r.clearFormat)&&a.jsx(hr,{}),r.link&&a.jsx(Qe,{onClick:i,isActive:e.isActive("link"),disabled:n,title:"Insert / Edit Link",accentColor:t,children:a.jsx(ap,{})}),r.clearFormat&&a.jsx(Qe,{onClick:()=>e.chain().focus().unsetAllMarks().clearNodes().run(),disabled:n,title:"Clear Formatting",accentColor:t,children:a.jsx(lp,{})})]})}const pp={bold:!0,italic:!0,underline:!0,strikethrough:!0,headings:!0,bulletList:!0,orderedList:!0,quote:!0,link:!0,textAlign:!0,clearFormat:!0};function Wo({value:e,defaultValue:t,onChange:n,placeholder:r="Start typing...",label:i,helperText:o,errorMessage:s,isInvalid:l=!1,disabled:c=!1,colorScheme:d="blue",minHeight:u="180px",maxHeight:f="400px",maxLength:p,showCharCount:m=!1,toolbarOptions:g,className:x}){const[y,b]=T.useState(!1),j=e!==void 0,k=Jh[d],B={...pp,...g};T.useEffect(()=>{Qh()},[]);const A=$s.useEditor({extensions:[Nf.configure({heading:{levels:[1,2,3]}}),Hf,Vf.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),Wf.configure({types:["heading","paragraph"]}),Uf.configure({placeholder:r})],content:j?e:t??"",editable:!c,editorProps:{attributes:{spellcheck:"true"}},onUpdate({editor:F}){const E=F.getHTML();p!==void 0&&F.getText().length>p||n==null||n(E==="<p></p>"?"":E)},onFocus(){b(!0)},onBlur(){b(!1)}});T.useEffect(()=>{if(!A||!j)return;const F=A.getHTML(),E=e===""?"<p></p>":e??"<p></p>";F!==E&&A.commands.setContent(E,{emitUpdate:!1})},[A,j,e]);const w=(A==null?void 0:A.getText().length)??0,M=l?"#DC2626":y?k.base:"var(--medix-form-border)";return a.jsxs(h.Box,{w:"100%",className:x,children:[i&&a.jsx(h.Text,{mb:"1.5",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",color:"text.heading",children:i}),a.jsxs(h.Box,{borderRadius:"md",overflow:"hidden",bg:"bg.surface",opacity:c?.6:1,style:{border:`1.5px solid ${M}`,transition:"border-color 0.15s ease",boxShadow:"none",background:"var(--medix-form-bg)"},children:[a.jsx(hp,{editor:A,accentColor:k.base,disabled:c,opts:B}),a.jsx(h.Box,{className:"medix-rte-content",style:{minHeight:u,maxHeight:f,overflowY:"auto"},_dark:{color:"var(--medix-form-text)"},children:a.jsx($s.EditorContent,{editor:A})}),(m||p)&&a.jsx(h.Box,{display:"flex",justifyContent:p?"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(h.Text,{fontSize:"xs",color:p&&w>p?"red.500":"text.muted",fontFamily:"var(--font-body)",children:[w,p?` / ${p}`:""," characters"]})})]}),o&&!l&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:o}),l&&s&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:s})]})}const mp=Wo;Wo.displayName="MedixRichTextInput";const Vc=T.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...r},i)=>a.jsx(h.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:T.Children.map(n,o=>o||null)}));Vc.displayName="MedixCard";function gp({title:e,subtitle:t,action:n,children:r,...i}){return a.jsxs(h.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[a.jsxs(h.Box,{flex:"1",children:[e&&a.jsx(h.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&a.jsx(h.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),r]}),n&&a.jsx(h.Box,{flexShrink:0,children:n})]})}function xp({children:e,...t}){return a.jsx(h.Box,{px:"6",py:"5",...t,children:e})}function yp({children:e,...t}){return a.jsx(h.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Hc=T.forwardRef(({value:e,label:t,unit:n,change:r,trend:i,icon:o,accentColor:s="blue.500",...l},c)=>{const d=i??(r!==void 0?r>=0?"up":"down":"neutral"),u=d==="up"?"green.500":d==="down"?"red.500":"text.muted";return a.jsxs(h.Box,{ref:c,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"none",_dark:{boxShadow:"none"},...l,children:[o&&a.jsx(h.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(h.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&a.jsx(h.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),a.jsx(h.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),r!==void 0&&a.jsxs(h.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:u,children:[a.jsx(h.Box,{as:"span",children:d==="up"?"↑":d==="down"?"↓":"→"}),a.jsxs(h.Box,{as:"span",children:[Math.abs(r),"%"]})]})]})});Hc.displayName="MedixStatCard";const bp={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Wc=T.forwardRef(({maxWidth:e="xl",children:t,...n},r)=>a.jsx(h.Box,{ref:r,w:"100%",maxW:bp[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Wc.displayName="MedixContainer";function vp({eyebrow:e,title:t,description:n,align:r="center",action:i,eyebrowColor:o="blue.500",...s}){const l=r,c=r==="center"?"center":r==="right"?"flex-end":"flex-start";return a.jsxs(h.Box,{display:"flex",flexDirection:"column",alignItems:c,textAlign:l,gap:"3",...s,children:[e&&a.jsx(h.Box,{as:"span",fontSize:"md",fontWeight:"bold",color:o,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),a.jsx(h.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(h.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(h.Box,{mt:"2",children:i})]})}const wp=["light","dark"],kp={light:{label:"Light mode",canvas:N.neutralLight.bg.value,surface:N.neutralLight.surface.value,border:N.neutralLight.border.value,text:N.neutralLight.heading.value,muted:N.neutralLight.body.value},dark:{label:"Dark mode",canvas:N.neutralDark.bg.value,surface:N.neutralDark.surface.value,border:N.neutralDark.border.value,text:N.neutralDark.heading.value,muted:N.neutralDark.body.value}};function Vt(e,t){return Object.entries(t).map(([n,r])=>({token:`${e}.${n}`,value:r.value}))}const Sp=[{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:N.neutralLight.bg.value,dark:N.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:N.neutralLight.bg2.value,dark:N.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:N.neutralLight.surface.value,dark:N.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:N.neutralLight.heading.value,dark:N.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:N.neutralLight.body.value,dark:N.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:N.neutralLight.muted.value,dark:N.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:N.neutralLight.border.value,dark:N.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:N.blue[500].value,dark:N.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:N.blue[100].value,dark:N.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:N.green[500].value,dark:N.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:N.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:N.amber[500].value,dark:N.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:N.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:N.red[500].value,dark:N.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:N.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:N.blue[50].value,dark:N.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:N.blue[100].value,dark:N.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:N.blue[200].value,dark:N.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:N.blue[300].value,dark:N.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:N.blue[400].value,dark:N.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:N.blue[500].value,dark:N.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:N.blue[600].value,dark:N.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:N.blue[700].value,dark:N.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:N.blue[800].value,dark:N.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:N.blue[900].value,dark:N.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:N.blue[500].value,dark:N.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:N.blue[100].value,dark:N.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:N.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:N.blue[100].value,dark:N.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:N.blue[700].value,dark:N.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:N.blue[500].value,dark:N.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:N.purple[50].value,dark:N.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:N.purple[100].value,dark:N.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:N.purple[500].value,dark:N.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:N.purple[600].value,dark:N.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:N.purple[500].value,dark:N.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:N.purple[100].value,dark:N.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:N.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:N.purple[100].value,dark:N.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:N.purple[700].value,dark:N.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:N.purple[500].value,dark:N.purple[500].value}]}],Cp=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:Vt("brand.blue",N.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:Vt("brand.purple",N.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:Vt("brand.green",N.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:Vt("brand.amber",N.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:Vt("brand.red",N.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:Vt("brand.neutralLight",N.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:Vt("brand.neutralDark",N.neutralDark)}];function Tp({mode:e,token:t}){const n=kp[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(h.Box,{border:"1px solid",borderColor:n.border,borderRadius:"lg",bg:n.surface,p:"3",children:[a.jsx(h.Text,{fontSize:"xs",fontWeight:"600",color:n.text,fontFamily:"var(--font-heading)",mb:"2",children:n.label}),t.preview==="text"?a.jsx(h.Box,{...i,children:a.jsx(h.Text,{color:r,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?a.jsx(h.Box,{...i,children:a.jsx(h.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:r,bg:n.canvas})}):a.jsx(h.Box,{...i,bg:r,borderColor:r===n.canvas||r==="#FFFFFF"?n.border:"transparent"}),a.jsx(h.Text,{mt:"2",fontSize:"xs",color:n.muted,fontFamily:"var(--font-mono)",children:r})]})}const Uc=T.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...n},r)=>a.jsxs(h.Box,{ref:r,display:"flex",flexDirection:"column",gap:"8",...n,children:[a.jsx(h.Box,{children:a.jsx(h.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(h.Box,{display:"flex",flexDirection:"column",gap:"6",children:Sp.map(i=>a.jsxs(h.Box,{children:[a.jsx(h.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),a.jsx(h.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),a.jsx(h.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:i.tokens.map(o=>a.jsxs(h.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[a.jsx(h.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:o.token}),a.jsx(h.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o.description}),a.jsx(h.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:wp.map(s=>a.jsx(Tp,{mode:s,token:o},`${o.token}-${s}`))})]},o.token))})]},i.title))}),t&&a.jsx(h.Box,{display:"flex",flexDirection:"column",gap:"6",children:Cp.map(i=>a.jsxs(h.Box,{children:[a.jsx(h.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),a.jsx(h.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),a.jsx(h.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:i.tokens.map(o=>a.jsxs(h.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[a.jsx(h.Box,{h:"72px",bg:o.value,borderBottom:"1px solid",borderColor:o.value==="#FFFFFF"||o.value===N.neutralLight.bg.value?"border":"transparent"}),a.jsxs(h.Box,{p:"4",children:[a.jsx(h.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:o.token}),a.jsx(h.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:o.value})]})]},o.token))})]},i.title))})]}));Uc.displayName="MedixThemeColorPalette";const Uo=T.createContext({});function $o(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const jp=typeof window<"u",$c=jp?T.useLayoutEffect:T.useEffect,qr=T.createContext(null);function Go(e,t){e.indexOf(t)===-1&&e.push(t)}function Or(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const vt=(e,t,n)=>n>t?t:n<e?e:n;function Yi(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let kn=()=>{},jt=()=>{};var wc;typeof process<"u"&&((wc=process.env)==null?void 0:wc.NODE_ENV)!=="production"&&(kn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Yi(t,n))},jt=(e,t,n)=>{if(!e)throw new Error(Yi(t,n))});const Mt={},Gc=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Yc(e){return typeof e=="object"&&e!==null}const Kc=e=>/^0[^.\s]+$/u.test(e);function qc(e){let t;return()=>(t===void 0&&(t=e()),t)}const nt=e=>e,Ap=(e,t)=>n=>t(e(n)),nr=(...e)=>e.reduce(Ap),qn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Yo{constructor(){this.subscriptions=[]}add(t){return Go(this.subscriptions,t),()=>Or(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 Ue=e=>e*1e3,tt=e=>e/1e3;function Xc(e,t){return t?e*(1e3/t):0}const ia=new Set;function Ko(e,t,n){e||ia.has(t)||(console.warn(Yi(t,n)),ia.add(t))}const Zc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ep=1e-7,Fp=12;function Bp(e,t,n,r,i){let o,s,l=0;do s=t+(n-t)/2,o=Zc(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>Ep&&++l<Fp);return s}function rr(e,t,n,r){if(e===t&&n===r)return nt;const i=o=>Bp(o,0,1,e,n);return o=>o===0||o===1?o:Zc(i(o),t,r)}const Jc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Qc=e=>t=>1-e(1-t),eu=rr(.33,1.53,.69,.99),qo=Qc(eu),tu=Jc(qo),nu=e=>e>=1?1:(e*=2)<1?.5*qo(e):.5*(2-Math.pow(2,-10*(e-1))),Xo=e=>1-Math.sin(Math.acos(e)),ru=Qc(Xo),iu=Jc(Xo),Lp=rr(.42,0,1,1),Ip=rr(0,0,.58,1),ou=rr(.42,0,.58,1),Dp=e=>Array.isArray(e)&&typeof e[0]!="number",su=e=>Array.isArray(e)&&typeof e[0]=="number",oa={linear:nt,easeIn:Lp,easeInOut:ou,easeOut:Ip,circIn:Xo,circInOut:iu,circOut:ru,backIn:qo,backInOut:tu,backOut:eu,anticipate:nu},Rp=e=>typeof e=="string",sa=e=>{if(su(e)){jt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return rr(t,n,r,i)}else if(Rp(e))return jt(oa[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),oa[e];return e},pr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Mp(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 c(u){s.has(u)&&(d.schedule(u),e()),u(l)}const d={schedule:(u,f=!1,p=!1)=>{const g=p&&i?n:r;return f&&s.add(u),g.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(l=u,i){o=!0;return}i=!0;const f=n;n=r,r=f,n.forEach(c),n.clear(),i=!1,o&&(o=!1,d.process(u))}};return d}const Pp=40;function au(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=pr.reduce((k,B)=>(k[B]=Mp(o),k),{}),{setup:l,read:c,resolveKeyframes:d,preUpdate:u,update:f,preRender:p,render:m,postRender:g}=s,x=()=>{const k=Mt.useManualTiming,B=k?i.timestamp:performance.now();n=!1,k||(i.delta=r?1e3/60:Math.max(Math.min(B-i.timestamp,Pp),1)),i.timestamp=B,i.isProcessing=!0,l.process(i),c.process(i),d.process(i),u.process(i),f.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:pr.reduce((k,B)=>{const A=s[B];return k[B]=(w,M=!1,F=!1)=>(n||y(),A.schedule(w,M,F)),k},{}),cancel:k=>{for(let B=0;B<pr.length;B++)s[pr[B]].cancel(k)},state:i,steps:s}}const{schedule:fe,cancel:Pt,state:Ie,steps:hi}=au(typeof requestAnimationFrame<"u"?requestAnimationFrame:nt,!0);let jr;function Op(){jr=void 0}const ze={now:()=>(jr===void 0&&ze.set(Ie.isProcessing||Mt.useManualTiming?Ie.timestamp:performance.now()),jr),set:e=>{jr=e,queueMicrotask(Op)}},lu=e=>t=>typeof t=="string"&&t.startsWith(e),cu=lu("--"),zp=lu("var(--"),Zo=e=>zp(e)?_p.test(e.split("/*")[0].trim()):!1,_p=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function aa(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Sn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xn={...Sn,transform:e=>vt(0,1,e)},mr={...Sn,default:1},Wn=e=>Math.round(e*1e5)/1e5,Jo=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Np(e){return e==null}const Vp=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qo=(e,t)=>n=>!!(typeof n=="string"&&Vp.test(n)&&n.startsWith(e)||t&&!Np(n)&&Object.prototype.hasOwnProperty.call(n,t)),uu=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,l]=r.match(Jo);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},Hp=e=>vt(0,255,e),pi={...Sn,transform:e=>Math.round(Hp(e))},$t={test:Qo("rgb","red"),parse:uu("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+pi.transform(e)+", "+pi.transform(t)+", "+pi.transform(n)+", "+Wn(Xn.transform(r))+")"};function Wp(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 Ki={test:Qo("#"),parse:Wp,transform:$t.transform},ir=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),It=ir("deg"),bt=ir("%"),K=ir("px"),Up=ir("vh"),$p=ir("vw"),la={...bt,parse:e=>bt.parse(e)/100,transform:e=>bt.transform(e*100)},mn={test:Qo("hsl","hue"),parse:uu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+bt.transform(Wn(t))+", "+bt.transform(Wn(n))+", "+Wn(Xn.transform(r))+")"},ke={test:e=>$t.test(e)||Ki.test(e)||mn.test(e),parse:e=>$t.test(e)?$t.parse(e):mn.test(e)?mn.parse(e):Ki.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$t.transform(e):mn.transform(e),getAnimatableNone:e=>{const t=ke.parse(e);return t.alpha=0,ke.transform(t)}},Gp=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Yp(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Jo))==null?void 0:t.length)||0)+(((n=e.match(Gp))==null?void 0:n.length)||0)>0}const du="number",fu="color",Kp="var",qp="var(",ca="${}",Xp=/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 vn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const l=t.replace(Xp,c=>(ke.test(c)?(r.color.push(o),i.push(fu),n.push(ke.parse(c))):c.startsWith(qp)?(r.var.push(o),i.push(Kp),n.push(c)):(r.number.push(o),i.push(du),n.push(parseFloat(c))),++o,ca)).split(ca);return{values:n,split:l,indexes:r,types:i}}function Zp(e){return vn(e).values}function hu({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===du?i+=Wn(r[o]):s===fu?i+=ke.transform(r[o]):i+=r[o]}return i}}function Jp(e){return hu(vn(e))}const Qp=e=>typeof e=="number"?0:ke.test(e)?ke.getAnimatableNone(e):e,em=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Qp(e);function tm(e){const t=vn(e);return hu(t)(t.values.map((r,i)=>em(r,t.split[i])))}const lt={test:Yp,parse:Zp,createTransformer:Jp,getAnimatableNone:tm};function mi(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 i=0,o=0,s=0;if(!t)i=o=s=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=mi(c,l,e+1/3),o=mi(c,l,e),s=mi(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function zr(e,t){return n=>n>0?t:e}const pe=(e,t,n)=>e+(t-e)*n,gi=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},rm=[Ki,$t,mn],im=e=>rm.find(t=>t.test(e));function ua(e){const t=im(e);if(kn(!!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===mn&&(n=nm(n)),n}const da=(e,t)=>{const n=ua(e),r=ua(t);if(!n||!r)return zr(e,t);const i={...n};return o=>(i.red=gi(n.red,r.red,o),i.green=gi(n.green,r.green,o),i.blue=gi(n.blue,r.blue,o),i.alpha=pe(n.alpha,r.alpha,o),$t.transform(i))},qi=new Set(["none","hidden"]);function om(e,t){return qi.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sm(e,t){return n=>pe(e,t,n)}function es(e){return typeof e=="number"?sm:typeof e=="string"?Zo(e)?zr:ke.test(e)?da:cm:Array.isArray(e)?pu:typeof e=="object"?ke.test(e)?da:am:zr}function pu(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>es(o)(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function am(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=es(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function lm(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 cm=(e,t)=>{const n=lt.createTransformer(t),r=vn(e),i=vn(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?qi.has(e)&&!i.values.length||qi.has(t)&&!r.values.length?om(e,t):nr(pu(lm(r,i),i.values),n):(kn(!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"),zr(e,t))};function mu(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?pe(e,t,n):es(e)(e,t)}const um=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>fe.update(t,n),stop:()=>Pt(t),now:()=>Ie.isProcessing?Ie.timestamp:ze.now()}},gu=(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)})`},_r=2e4;function ts(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<_r;)t+=n,r=e.next(t);return t>=_r?1/0:t}function dm(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(ts(r),_r);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:tt(i)}}const xe={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 Xi(e,t){return e*Math.sqrt(1-t*t)}const fm=12;function hm(e,t,n){let r=n;for(let i=1;i<fm;i++)r=r-e(r)/t(r);return r}const xi=.001;function pm({duration:e=xe.duration,bounce:t=xe.bounce,velocity:n=xe.velocity,mass:r=xe.mass}){let i,o;kn(e<=Ue(xe.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=vt(xe.minDamping,xe.maxDamping,s),e=vt(xe.minDuration,xe.maxDuration,tt(e)),s<1?(i=d=>{const u=d*s,f=u*e,p=u-n,m=Xi(d,s),g=Math.exp(-f);return xi-p/m*g},o=d=>{const f=d*s*e,p=f*n+n,m=Math.pow(s,2)*Math.pow(d,2)*e,g=Math.exp(-f),x=Xi(Math.pow(d,2),s);return(-i(d)+xi>0?-1:1)*((p-m)*g)/x}):(i=d=>{const u=Math.exp(-d*e),f=(d-n)*e+1;return-xi+u*f},o=d=>{const u=Math.exp(-d*e),f=(n-d)*(e*e);return u*f});const l=5/e,c=hm(i,o,l);if(e=Ue(e),isNaN(c))return{stiffness:xe.stiffness,damping:xe.damping,duration:e};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:s*2*Math.sqrt(r*d),duration:e}}}const mm=["duration","bounce"],gm=["stiffness","damping","mass"];function fa(e,t){return t.some(n=>e[n]!==void 0)}function xm(e){let t={velocity:xe.velocity,stiffness:xe.stiffness,damping:xe.damping,mass:xe.mass,isResolvedFromDuration:!1,...e};if(!fa(e,gm)&&fa(e,mm))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*vt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:xe.mass,stiffness:i,damping:o}}else{const n=pm({...e,velocity:0});t={...t,...n,mass:xe.mass},t.isResolvedFromDuration=!0}return t}function Nr(e=xe.visualDuration,t=xe.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:c,damping:d,mass:u,duration:f,velocity:p,isResolvedFromDuration:m}=xm({...n,velocity:-tt(n.velocity||0)}),g=p||0,x=d/(2*Math.sqrt(c*u)),y=s-o,b=tt(Math.sqrt(c/u)),j=Math.abs(y)<5;r||(r=j?xe.restSpeed.granular:xe.restSpeed.default),i||(i=j?xe.restDelta.granular:xe.restDelta.default);let k,B,A,w,M,F;if(x<1)A=Xi(b,x),w=(g+x*b*y)/A,k=L=>{const D=Math.exp(-x*b*L);return s-D*(w*Math.sin(A*L)+y*Math.cos(A*L))},M=x*b*w+y*A,F=x*b*y-w*A,B=L=>Math.exp(-x*b*L)*(M*Math.sin(A*L)+F*Math.cos(A*L));else if(x===1){k=D=>s-Math.exp(-b*D)*(y+(g+b*y)*D);const L=g+b*y;B=D=>Math.exp(-b*D)*(b*L*D-g)}else{const L=b*Math.sqrt(x*x-1);k=_=>{const I=Math.exp(-x*b*_),R=Math.min(L*_,300);return s-I*((g+x*b*y)*Math.sinh(R)+L*y*Math.cosh(R))/L};const D=(g+x*b*y)/L,P=x*b*D-y*L,V=x*b*y-D*L;B=_=>{const I=Math.exp(-x*b*_),R=Math.min(L*_,300);return I*(P*Math.sinh(R)+V*Math.cosh(R))}}const E={calculatedDuration:m&&f||null,velocity:L=>Ue(B(L)),next:L=>{if(!m&&x<1){const P=Math.exp(-x*b*L),V=Math.sin(A*L),_=Math.cos(A*L),I=s-P*(w*V+y*_),R=Ue(P*(M*V+F*_));return l.done=Math.abs(R)<=r&&Math.abs(s-I)<=i,l.value=l.done?s:I,l}const D=k(L);if(m)l.done=L>=f;else{const P=Ue(B(L));l.done=Math.abs(P)<=r&&Math.abs(s-D)<=i}return l.value=l.done?s:D,l},toString:()=>{const L=Math.min(ts(E),_r),D=gu(P=>E.next(L*P).value,L,30);return L+"ms "+D},toTransition:()=>{}};return E}Nr.applyToOptions=e=>{const t=dm(e,100,Nr);return e.ease=t.ease,e.duration=Ue(t.duration),e.type="keyframes",e};const ym=5;function xu(e,t,n){const r=Math.max(t-ym,0);return Xc(n-e(r),t-r)}function Zi({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:l,max:c,restDelta:d=.5,restSpeed:u}){const f=e[0],p={done:!1,value:f},m=F=>l!==void 0&&F<l||c!==void 0&&F>c,g=F=>l===void 0?c:c===void 0||Math.abs(l-F)<Math.abs(c-F)?l:c;let x=n*t;const y=f+x,b=s===void 0?y:s(y);b!==y&&(x=b-f);const j=F=>-x*Math.exp(-F/r),k=F=>b+j(F),B=F=>{const E=j(F),L=k(F);p.done=Math.abs(E)<=d,p.value=p.done?b:L};let A,w;const M=F=>{m(p.value)&&(A=F,w=Nr({keyframes:[p.value,g(p.value)],velocity:xu(k,F,p.value),damping:i,stiffness:o,restDelta:d,restSpeed:u}))};return M(0),{calculatedDuration:null,next:F=>{let E=!1;return!w&&A===void 0&&(E=!0,B(F),M(F)),A!==void 0&&F>=A?w.next(F-A):(!E&&B(F),p)}}}function bm(e,t,n){const r=[],i=n||Mt.mix||mu,o=e.length-1;for(let s=0;s<o;s++){let l=i(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||nt:t;l=nr(c,l)}r.push(l)}return r}function vm(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(jt(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=bm(t,r,i),c=l.length,d=u=>{if(s&&u<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const p=qn(e[f],e[f+1],u);return l[f](p)};return n?u=>d(vt(e[0],e[o-1],u)):d}function wm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=qn(0,t,r);e.push(pe(n,1,i))}}function km(e){const t=[0];return wm(t,e.length-1),t}function Sm(e,t){return e.map(n=>n*t)}function Cm(e,t){return e.map(()=>t||ou).splice(0,e.length-1)}function gn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Dp(r)?r.map(sa):sa(r),o={done:!1,value:t[0]},s=Sm(n&&n.length===t.length?n:km(t),e),l=vm(s,t,{ease:Array.isArray(i)?i:Cm(t,i)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const Tm=e=>e!==null;function Xr(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(Tm),l=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!l||r===void 0?o[l]:r}const jm={decay:Zi,inertia:Zi,tween:gn,keyframes:gn,spring:Nr};function yu(e){typeof e.type=="string"&&(e.type=jm[e.type])}class ns{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 Am=e=>e/100;class Vr extends ns{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!==ze.now()&&this.tick(ze.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;yu(t);const{type:n=gn,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:l}=t;const c=n||gn;process.env.NODE_ENV!=="production"&&c!==gn&&jt(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),c!==gn&&typeof l[0]!="number"&&(this.mixKeyframes=nr(Am,mu(l[0],l[1])),l=[0,100]);const d=c({...t,keyframes:l});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-s})),d.calculatedDuration===null&&(d.calculatedDuration=ts(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+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:c}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:u,repeat:f,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),j=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let k=this.currentTime,B=r;if(f){const F=Math.min(this.currentTime,i)/l;let E=Math.floor(F),L=F%1;!L&&F>=1&&(L=1),L===1&&E--,E=Math.min(E,f+1),!!(E%2)&&(p==="reverse"?(L=1-L,m&&(L-=m/l)):p==="mirror"&&(B=s)),k=vt(0,1,L)*l}let A;j?(this.delayState.value=u[0],A=this.delayState):A=B.next(k),o&&!j&&(A.value=o(A.value));let{done:w}=A;!j&&c!==null&&(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return M&&g!==Zi&&(A.value=Xr(u,this.options,y,this.speed)),x&&x(A.value),M&&this.finish(),A}then(t,n){return this.finished.then(t,n)}get duration(){return tt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+tt(t)}get time(){return tt(this.currentTime)}set time(t){t=Ue(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 xu(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(ze.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=tt(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:t=um,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(ze.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 Em(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Gt=e=>e*180/Math.PI,Ji=e=>{const t=Gt(Math.atan2(e[1],e[0]));return Qi(t)},Fm={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ji,rotateZ:Ji,skewX:e=>Gt(Math.atan(e[1])),skewY:e=>Gt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Qi=e=>(e=e%360,e<0&&(e+=360),e),ha=Ji,pa=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ma=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Bm={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:pa,scaleY:ma,scale:e=>(pa(e)+ma(e))/2,rotateX:e=>Qi(Gt(Math.atan2(e[6],e[5]))),rotateY:e=>Qi(Gt(Math.atan2(-e[2],e[0]))),rotateZ:ha,rotate:ha,skewX:e=>Gt(Math.atan(e[4])),skewY:e=>Gt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function eo(e){return e.includes("scale")?1:0}function to(e,t){if(!e||e==="none")return eo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Bm,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Fm,i=l}if(!i)return eo(t);const o=r[t],s=i[1].split(",").map(Im);return typeof o=="function"?o(s):s[o]}const Lm=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return to(n,t)};function Im(e){return parseFloat(e.trim())}const Cn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Tn=new Set(Cn),ga=e=>e===Sn||e===K,Dm=new Set(["x","y","z"]),Rm=Cn.filter(e=>!Dm.has(e));function Mm(e){const t=[];return Rm.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Rt={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})=>to(t,"x"),y:(e,{transform:t})=>to(t,"y")};Rt.translateX=Rt.x;Rt.translateY=Rt.y;const Kt=new Set;let no=!1,ro=!1,io=!1;function bu(){if(ro){const e=Array.from(Kt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Mm(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)})}ro=!1,no=!1,Kt.forEach(e=>e.complete(io)),Kt.clear()}function vu(){Kt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ro=!0)})}function Pm(){io=!0,vu(),bu(),io=!1}class rs{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?(Kt.add(this),no||(no=!0,fe.read(vu),fe.resolveKeyframes(bu))):(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])}Em(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Kt.delete(this)}cancel(){this.state==="scheduled"&&(Kt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Om=e=>e.startsWith("--");function wu(e,t,n){Om(t)?e.style.setProperty(t,n):e.style[t]=n}const zm={};function ku(e,t){const n=qc(e);return()=>zm[t]??n()}const _m=ku(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Su=ku(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,xa={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nn([0,.65,.55,1]),circOut:Nn([.55,0,1,.45]),backIn:Nn([.31,.01,.66,-.59]),backOut:Nn([.33,1.53,.69,.99])};function Cu(e,t){if(e)return typeof e=="function"?Su()?gu(e,t):"ease-out":su(e)?Nn(e):Array.isArray(e)?e.map(n=>Cu(n,t)||xa.easeOut):xa[e]}function Nm(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:l="easeOut",times:c}={},d=void 0){const u={[t]:n};c&&(u.offset=c);const f=Cu(l,i);Array.isArray(f)&&(u.easing=f);const p={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return d&&(p.pseudoElement=d),e.animate(u,p)}function Tu(e){return typeof e=="function"&&"applyToOptions"in e}function Vm({type:e,...t}){return Tu(e)&&Su()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ju extends ns{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:c}=t;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=t,jt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Vm(t);this.animation=Nm(n,r,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Xr(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(u),wu(n,r,u),this.animation.cancel()}c==null||c(),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 tt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+tt(t)}get time(){return tt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ue(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&&_m()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),nt):i(this)}}const Au={anticipate:nu,backInOut:tu,circInOut:iu};function Hm(e){return e in Au}function Wm(e){typeof e.ease=="string"&&Hm(e.ease)&&(e.ease=Au[e.ease])}const yi=10;class Um extends ju{constructor(t){Wm(t),yu(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 Vr({...s,autoplay:!1}),c=Math.max(yi,ze.now()-this.startTime),d=vt(0,yi,c-yi),u=l.sample(c).value,{name:f}=this.options;o&&f&&wu(o,f,u),n.setWithVelocity(l.sample(Math.max(0,c-d)).value,u,d),l.stop()}}const ya=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(lt.test(e)||e==="0")&&!e.startsWith("url("));function $m(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 Gm(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=ya(i,t),l=ya(o,t);return kn(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:$m(e)||(n==="spring"||Tu(n))&&r}function oo(e){e.duration=0,e.type="keyframes"}const Eu=new Set(["opacity","clipPath","filter","transform"]),Ym=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Km(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Ym.test(e[t]))return!0;return!1}const qm=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Xm=qc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zm(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s,keyframes:l}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:u}=t.owner.getProps();return Xm()&&n&&(Eu.has(n)||qm.has(n)&&Km(l))&&(n!=="transform"||!u)&&!d&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const Jm=40;class Qm extends ns{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:l,name:c,motionValue:d,element:u,...f}){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=ze.now();const p={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:c,motionValue:d,element:u,...f},m=(u==null?void 0:u.KeyframeResolver)||rs;this.keyframeResolver=new m(l,(x,y,b)=>this.onKeyframesResolved(x,y,p,!b),c,d,u),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,i){var b,j;this.keyframeResolver=void 0;const{name:o,type:s,velocity:l,delay:c,isHandoff:d,onUpdate:u}=r;this.resolvedAt=ze.now();let f=!0;Gm(t,o,s,l)||(f=!1,(Mt.instantAnimations||!c)&&(u==null||u(Xr(t,r,n))),t[0]=t[t.length-1],oo(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Jm?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=f&&!d&&Zm(m),x=(j=(b=m.motionValue)==null?void 0:b.owner)==null?void 0:j.current;let y;if(g)try{y=new Um({...m,element:x})}catch{y=new Vr(m)}else y=new Vr(m);y.finished.then(()=>{this.notifyFinished()}).catch(nt),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(),Pm()),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 Fu(e,t,n,r=0,i=1){const o=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),s=e.size,l=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:l-o*r}const e1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function t1(e){const t=e1.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const n1=4;function Bu(e,t,n=1){jt(n<=n1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=t1(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return Gc(s)?parseFloat(s):s}return Zo(i)?Bu(i,t,n+1):i}const r1={type:"spring",stiffness:500,damping:25,restSpeed:10},i1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),o1={type:"keyframes",duration:.8},s1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},a1=(e,{keyframes:t})=>t.length>2?o1:Tn.has(e)?e.startsWith("scale")?i1(t[1]):r1:s1;function Lu(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function is(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Lu(n,e):n}const l1=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function c1(e){for(const t in e)if(!l1.has(t))return!0;return!1}const os=(e,t,n,r={},i,o)=>s=>{const l=is(r,e)||{},c=l.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ue(c);const u={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};c1(l)||Object.assign(u,a1(e,u)),u.duration&&(u.duration=Ue(u.duration)),u.repeatDelay&&(u.repeatDelay=Ue(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(oo(u),u.delay===0&&(f=!0)),(Mt.instantAnimations||Mt.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(f=!0,oo(u),u.delay=0),u.allowFlatten=!l.type&&!l.ease,f&&!o&&t.get()!==void 0){const p=Xr(u.keyframes,l);if(p!==void 0){fe.update(()=>{u.onUpdate(p),u.onComplete()});return}}return l.isSync?new Vr(u):new Qm(u)};function ba(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ss(e,t,n,r){if(typeof t=="function"){const[i,o]=ba(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]=ba(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function qt(e,t,n){const r=e.getProps();return ss(r,t,n!==void 0?n:r.custom,e)}const Iu=new Set(["width","height","top","left","right","bottom",...Cn]),va=30,u1=e=>!isNaN(parseFloat(e));class d1{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=ze.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=ze.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=u1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ko(!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 Yo);const r=this.events[t].add(n);return t==="change"?()=>{r(),fe.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=ze.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>va)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,va);return Xc(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 wn(e,t){return new d1(e,t)}const so=e=>Array.isArray(e);function f1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wn(n))}function h1(e){return so(e)?e[e.length-1]||0:e}function p1(e,t){const n=qt(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const l=h1(o[s]);f1(e,s,l)}}const De=e=>!!(e&&e.getVelocity);function m1(e){return!!(De(e)&&e.add)}function ao(e,t){const n=e.getValue("willChange");if(m1(n))return n.add(t);if(!n&&Mt.WillChange){const r=new Mt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function as(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const g1="framerAppearId",Du="data-"+as(g1);function Ru(e){return e.props[Du]}function x1({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Mu(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:s,...l}=t;const c=e.getDefaultTransition();o=o?Lu(o,c):c;const d=o==null?void 0:o.reduceMotion;r&&(o=r);const u=[],f=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||f&&x1(f,p))continue;const x={delay:n,...is(o||{},p)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===y&&!x.velocity){fe.update(()=>m.set(g));continue}let b=!1;if(window.MotionHandoffAnimation){const B=Ru(e);if(B){const A=window.MotionHandoffAnimation(B,p,fe);A!==null&&(x.startTime=A,b=!0)}}ao(e,p);const j=d??e.shouldReduceMotion;m.start(os(p,m,g,j&&Iu.has(p)?{type:!1}:x,e,b));const k=m.animation;k&&u.push(k)}if(s){const p=()=>fe.update(()=>{s&&p1(e,s)});u.length?Promise.all(u).then(p):p()}return u}function lo(e,t,n={}){var c;const r=qt(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Mu(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:p}=i;return y1(e,t,d,u,f,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[d,u]=l==="beforeChildren"?[o,s]:[s,o];return d().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function y1(e,t,n=0,r=0,i=0,o=1,s){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(lo(c,t,{...s,delay:n+(typeof r=="function"?0:r)+Fu(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function b1(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>lo(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=lo(e,t,n);else{const i=typeof t=="function"?qt(e,t,n.custom):t;r=Promise.all(Mu(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const v1={test:e=>e==="auto",parse:e=>e},Pu=e=>t=>t.test(e),Ou=[Sn,K,bt,It,$p,Up,v1],wa=e=>Ou.find(Pu(e));function w1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Kc(e):!0}const k1=new Set(["brightness","contrast","saturate","opacity"]);function S1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Jo)||[];if(!r)return e;const i=n.replace(r,"");let o=k1.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const C1=/\b([a-z-]*)\(.*?\)/gu,co={...lt,getAnimatableNone:e=>{const t=e.match(C1);return t?t.map(S1).join(" "):e}},uo={...lt,getAnimatableNone:e=>{const t=lt.parse(e);return lt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},ka={...Sn,transform:Math.round},T1={rotate:It,rotateX:It,rotateY:It,rotateZ:It,scale:mr,scaleX:mr,scaleY:mr,scaleZ:mr,skew:It,skewX:It,skewY:It,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:Xn,originX:la,originY:la,originZ:K},ls={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,inset:K,insetBlock:K,insetBlockStart:K,insetBlockEnd:K,insetInline:K,insetInlineStart:K,insetInlineEnd:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,paddingBlock:K,paddingBlockStart:K,paddingBlockEnd:K,paddingInline:K,paddingInlineStart:K,paddingInlineEnd:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,marginBlock:K,marginBlockStart:K,marginBlockEnd:K,marginInline:K,marginInlineStart:K,marginInlineEnd:K,fontSize:K,backgroundPositionX:K,backgroundPositionY:K,...T1,zIndex:ka,fillOpacity:Xn,strokeOpacity:Xn,numOctaves:ka},j1={...ls,color:ke,backgroundColor:ke,outlineColor:ke,fill:ke,stroke:ke,borderColor:ke,borderTopColor:ke,borderRightColor:ke,borderBottomColor:ke,borderLeftColor:ke,filter:co,WebkitFilter:co,mask:uo,WebkitMask:uo},zu=e=>j1[e],A1=new Set([co,uo]);function _u(e,t){let n=zu(e);return A1.has(n)||(n=lt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const E1=new Set(["auto","none","0"]);function F1(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!E1.has(o)&&vn(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=_u(n,i)}class B1 extends rs{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 u=0;u<t.length;u++){let f=t[u];if(typeof f=="string"&&(f=f.trim(),Zo(f))){const p=Bu(f,n.current);p!==void 0&&(t[u]=p),u===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Iu.has(r)||t.length!==2)return;const[i,o]=t,s=wa(i),l=wa(o),c=aa(i),d=aa(o);if(c!==d&&Rt[r]){this.needsMeasurement=!0;return}if(s!==l)if(ga(s)&&ga(l))for(let u=0;u<t.length;u++){const f=t[u];typeof f=="string"&&(t[u]=parseFloat(f))}else Rt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||w1(t[i]))&&r.push(i);r.length&&F1(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=Rt[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]=Rt[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(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function Nu(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 Vu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ar(e){return Yc(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:cs}=au(queueMicrotask,!1),at={x:!1,y:!1};function Hu(){return at.x||at.y}function L1(e){return e==="x"||e==="y"?at[e]?null:(at[e]=!0,()=>{at[e]=!1}):at.x||at.y?null:(at.x=at.y=!0,()=>{at.x=at.y=!1})}function Wu(e,t){const n=Nu(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function I1(e){return!(e.pointerType==="touch"||Hu())}function D1(e,t,n={}){const[r,i,o]=Wu(e,n);return r.forEach(s=>{let l=!1,c=!1,d;const u=()=>{s.removeEventListener("pointerleave",g)},f=y=>{d&&(d(y),d=void 0),u()},p=y=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),c&&(c=!1,f(y))},m=()=>{l=!0,window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",p,i)},g=y=>{if(y.pointerType!=="touch"){if(l){c=!0;return}f(y)}},x=y=>{if(!I1(y))return;c=!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 Uu=(e,t)=>t?e===t?!0:Uu(e,t.parentElement):!1,us=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,R1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function M1(e){return R1.has(e.tagName)||e.isContentEditable===!0}const P1=new Set(["INPUT","SELECT","TEXTAREA"]);function O1(e){return P1.has(e.tagName)||e.isContentEditable===!0}const Er=new WeakSet;function Sa(e){return t=>{t.key==="Enter"&&e(t)}}function bi(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const z1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Sa(()=>{if(Er.has(n))return;bi(n,"down");const i=Sa(()=>{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 Ca(e){return us(e)&&!Hu()}const Ta=new WeakSet;function _1(e,t,n={}){const[r,i,o]=Wu(e,n),s=l=>{const c=l.currentTarget;if(!Ca(l)||Ta.has(l))return;Er.add(c),n.stopPropagation&&Ta.add(l);const d=t(c,l),u=(m,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),Er.has(c)&&Er.delete(c),Ca(m)&&typeof d=="function"&&d(m,{success:g})},f=m=>{u(m,c===window||c===document||n.useGlobalTarget||Uu(c,m.target))},p=m=>{u(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",p,i)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",s,i),Ar(l)&&(l.addEventListener("focus",d=>z1(d,i)),!M1(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function ds(e){return Yc(e)&&"ownerSVGElement"in e}const Fr=new WeakMap;let Dt;const $u=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:ds(r)&&"getBBox"in r?r.getBBox()[t]:r[n],N1=$u("inline","width","offsetWidth"),V1=$u("block","height","offsetHeight");function H1({target:e,borderBoxSize:t}){var n;(n=Fr.get(e))==null||n.forEach(r=>{r(e,{get width(){return N1(e,t)},get height(){return V1(e,t)}})})}function W1(e){e.forEach(H1)}function U1(){typeof ResizeObserver>"u"||(Dt=new ResizeObserver(W1))}function $1(e,t){Dt||U1();const n=Nu(e);return n.forEach(r=>{let i=Fr.get(r);i||(i=new Set,Fr.set(r,i)),i.add(t),Dt==null||Dt.observe(r)}),()=>{n.forEach(r=>{const i=Fr.get(r);i==null||i.delete(t),i!=null&&i.size||Dt==null||Dt.unobserve(r)})}}const Br=new Set;let xn;function G1(){xn=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Br.forEach(t=>t(e))},window.addEventListener("resize",xn)}function Y1(e){return Br.add(e),xn||G1(),()=>{Br.delete(e),!Br.size&&typeof xn=="function"&&(window.removeEventListener("resize",xn),xn=void 0)}}function ja(e,t){return typeof e=="function"?Y1(e):$1(e,t)}function K1(e){return ds(e)&&e.tagName==="svg"}const q1=[...Ou,ke,lt],X1=e=>q1.find(Pu(e)),Aa=()=>({translate:0,scale:1,origin:0,originPoint:0}),yn=()=>({x:Aa(),y:Aa()}),Ea=()=>({min:0,max:0}),je=()=>({x:Ea(),y:Ea()}),Z1=new WeakMap;function Zr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Zn(e){return typeof e=="string"||Array.isArray(e)}const fs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hs=["initial",...fs];function Jr(e){return Zr(e.animate)||hs.some(t=>Zn(e[t]))}function Gu(e){return!!(Jr(e)||e.variants)}function J1(e,t,n){for(const r in t){const i=t[r],o=n[r];if(De(i))e.addValue(r,i);else if(De(o))e.addValue(r,wn(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,wn(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const fo={current:null},Yu={current:!1},Q1=typeof window<"u";function eg(){if(Yu.current=!0,!!Q1)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fo.current=e.matches;e.addEventListener("change",t),t()}else fo.current=!1}const Fa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Hr={};function Ku(e){Hr=e}function tg(){return Hr}class ng{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:s,visualState:l},c={}){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=rs,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=ze.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,fe.render(this.render,!1,!0))};const{latestValues:d,renderState:u}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=Jr(n),this.isVariantNode=Gu(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const g=p[m];d[m]!==void 0&&De(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,Z1.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:(Yu.current||eg(),this.shouldReduceMotion=fo.current),process.env.NODE_ENV!=="production"&&Ko(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(),Pt(this.notifyUpdate),Pt(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&&Eu.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:l,times:c,ease:d,duration:u}=n.accelerate,f=new ju({element:this.current,name:t,keyframes:l,times:c,ease:d,duration:Ue(u)}),p=s(f);this.valueSubscriptions.set(t,()=>{p(),f.cancel()});return}const r=Tn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&fe.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 Hr){const n=Hr[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):je()}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<Fa.length;r++){const i=Fa[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=J1(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=wn(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"&&(Gc(r)||Kc(r))?r=parseFloat(r):!X1(r)&<.test(n)&&(r=_u(t,n)),this.setBaseTarget(t,De(r)?r.get():r)),De(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=ss(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&&!De(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 Yo),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){cs.render(this.render)}}class qu extends ng{constructor(){super(...arguments),this.KeyframeResolver=B1}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;De(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ot{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Xu({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function rg({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 vi(e){return e===void 0||e===1}function ho({scale:e,scaleX:t,scaleY:n}){return!vi(e)||!vi(t)||!vi(n)}function Ut(e){return ho(e)||Zu(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Zu(e){return Ba(e.x)||Ba(e.y)}function Ba(e){return e&&e!=="0%"}function Wr(e,t,n){const r=e-n,i=t*r;return n+i}function La(e,t,n,r,i){return i!==void 0&&(e=Wr(e,i,r)),Wr(e,n,r)+t}function po(e,t=0,n=1,r,i){e.min=La(e.min,t,n,r,i),e.max=La(e.max,t,n,r,i)}function Ju(e,{x:t,y:n}){po(e.x,t.translate,t.scale,t.originPoint),po(e.y,n.translate,n.scale,n.originPoint)}const Ia=.999999999999,Da=1.0000000000001;function og(e,t,n,r=!1){var l;const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let c=0;c<i;c++){o=n[c],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&&(xt(e.x,-o.scroll.offset.x),xt(e.y,-o.scroll.offset.y)),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Ju(e,s)),r&&Ut(o.latestValues)&&Lr(e,o.latestValues,(l=o.layout)==null?void 0:l.layoutBox))}t.x<Da&&t.x>Ia&&(t.x=1),t.y<Da&&t.y>Ia&&(t.y=1)}function xt(e,t){e.min+=t,e.max+=t}function Ra(e,t,n,r,i=.5){const o=pe(e.min,e.max,i);po(e,t,n,o,r)}function Ma(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Lr(e,t,n){const r=n??e;Ra(e.x,Ma(t.x,r.x),t.scaleX,t.scale,t.originX),Ra(e.y,Ma(t.y,r.y),t.scaleY,t.scale,t.originY)}function Qu(e,t){return Xu(ig(e.getBoundingClientRect(),t))}function sg(e,t,n){const r=Qu(e,n),{scroll:i}=t;return i&&(xt(r.x,i.offset.x),xt(r.y,i.offset.y)),r}const ag={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lg=Cn.length;function cg(e,t,n){let r="",i=!0;for(let o=0;o<lg;o++){const s=Cn[o],l=e[s];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(s.startsWith("scale")?1:0);else{const d=parseFloat(l);c=s.startsWith("scale")?d===1:d===0}if(!c||n){const d=Vu(l,ls[s]);if(!c){i=!1;const u=ag[s]||s;r+=`${u}(${d}) `}n&&(t[s]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function ps(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,l=!1;for(const c in t){const d=t[c];if(Tn.has(c)){s=!0;continue}else if(cu(c)){i[c]=d;continue}else{const u=Vu(d,ls[c]);c.startsWith("origin")?(l=!0,o[c]=u):r[c]=u}}if(t.transform||(s||n?r.transform=cg(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:d="50%",originZ:u=0}=o;r.transformOrigin=`${c} ${d} ${u}`}}function ed(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 Pa(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Dn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=Pa(e,t.target.x),r=Pa(e,t.target.y);return`${n}% ${r}%`}},ug={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=lt.parse(e);if(i.length>5)return r;const o=lt.createTransformer(e),s=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+s]/=l,i[1+s]/=c;const d=pe(l,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=d),typeof i[3+s]=="number"&&(i[3+s]/=d),o(i)}},mo={borderRadius:{...Dn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Dn,borderTopRightRadius:Dn,borderBottomLeftRadius:Dn,borderBottomRightRadius:Dn,boxShadow:ug};function td(e,{layout:t,layoutId:n}){return Tn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mo[e]||e==="opacity")}function ms(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)(De(r[l])||i&&De(i[l])||td(l,e)||((s=n==null?void 0:n.getValue(l))==null?void 0:s.liveStyle)!==void 0)&&(o[l]=r[l]);return o}function dg(e){return window.getComputedStyle(e)}class fg extends qu{constructor(){super(...arguments),this.type="html",this.renderInstance=ed}readValueFromInstance(t,n){var r;if(Tn.has(n))return(r=this.projection)!=null&&r.isProjecting?eo(n):Lm(t,n);{const i=dg(t),o=(cu(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qu(t,n)}build(t,n,r){ps(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ms(t,n,r)}}const hg={offset:"stroke-dashoffset",array:"stroke-dasharray"},pg={offset:"strokeDashoffset",array:"strokeDasharray"};function mg(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?hg:pg;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const gg=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function nd(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...l},c,d,u){if(ps(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p}=e;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox);for(const m of gg)f[m]!==void 0&&(p[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&mg(f,i,o,s,!1)}const rd=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"]),id=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xg(e,t,n,r){ed(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(rd.has(i)?i:as(i),t.attrs[i])}function od(e,t,n){const r=ms(e,t,n);for(const i in e)if(De(e[i])||De(t[i])){const o=Cn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}class yg extends qu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Tn.has(n)){const r=zu(n);return r&&r.default||0}return n=rd.has(n)?n:as(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return od(t,n,r)}build(t,n,r){nd(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){xg(t,n,r,i)}mount(t){this.isSVGTag=id(t.tagName),super.mount(t)}}const bg=hs.length;function sd(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?sd(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<bg;n++){const r=hs[n],i=e.props[r];(Zn(i)||i===!1)&&(t[r]=i)}return t}function ad(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 vg=[...fs].reverse(),wg=fs.length;function kg(e){return t=>Promise.all(t.map(({animation:n,options:r})=>b1(e,n,r)))}function Sg(e){let t=kg(e),n=Oa(),r=!0,i=!1;const o=d=>(u,f)=>{var m;const p=qt(e,f,d==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(p){const{transition:g,transitionEnd:x,...y}=p;u={...u,...y,...x}}return u};function s(d){t=d(e)}function l(d){const{props:u}=e,f=sd(e.parent)||{},p=[],m=new Set;let g={},x=1/0;for(let b=0;b<wg;b++){const j=vg[b],k=n[j],B=u[j]!==void 0?u[j]:f[j],A=Zn(B),w=j===d?k.isActive:null;w===!1&&(x=b);let M=B===f[j]&&B!==u[j]&&A;if(M&&(r||i)&&e.manuallyAnimateOnMount&&(M=!1),k.protectedKeys={...g},!k.isActive&&w===null||!B&&!k.prevProp||Zr(B)||typeof B=="boolean")continue;if(j==="exit"&&k.isActive&&w!==!0){k.prevResolvedValues&&(g={...g,...k.prevResolvedValues});continue}const F=Cg(k.prevProp,B);let E=F||j===d&&k.isActive&&!M&&A||b>x&&A,L=!1;const D=Array.isArray(B)?B:[B];let P=D.reduce(o(j),{});w===!1&&(P={});const{prevResolvedValues:V={}}=k,_={...V,...P},I=Y=>{E=!0,m.has(Y)&&(L=!0,m.delete(Y)),k.needsAnimating[Y]=!0;const Z=e.getValue(Y);Z&&(Z.liveStyle=!1)};for(const Y in _){const Z=P[Y],S=V[Y];if(g.hasOwnProperty(Y))continue;let q=!1;so(Z)&&so(S)?q=!ad(Z,S):q=Z!==S,q?Z!=null?I(Y):m.add(Y):Z!==void 0&&m.has(Y)?I(Y):k.protectedKeys[Y]=!0}k.prevProp=B,k.prevResolvedValues=P,k.isActive&&(g={...g,...P}),(r||i)&&e.blockInitialAnimation&&(E=!1);const R=M&&F;E&&(!R||L)&&p.push(...D.map(Y=>{const Z={type:j};if(typeof Y=="string"&&(r||i)&&!R&&e.manuallyAnimateOnMount&&e.parent){const{parent:S}=e,q=qt(S,Y);if(S.enteringChildren&&q){const{delayChildren:oe}=q.transition||{};Z.delay=Fu(S.enteringChildren,e,oe)}}return{animation:Y,options:Z}}))}if(m.size){const b={};if(typeof u.initial!="boolean"){const j=qt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);j&&j.transition&&(b.transition=j.transition)}m.forEach(j=>{const k=e.getBaseTarget(j),B=e.getValue(j);B&&(B.liveStyle=!0),b[j]=k??null}),p.push({animation:b})}let y=!!p.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,i=!1,y?t(p):Promise.resolve()}function c(d,u){var p;if(n[d].isActive===u)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(d,u)}),n[d].isActive=u;const f=l(d);for(const m in n)n[m].protectedKeys={};return f}return{animateChanges:l,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Oa(),i=!0}}}function Cg(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ad(t,e):!1}function Ht(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Oa(){return{animate:Ht(!0),whileInView:Ht(),whileHover:Ht(),whileTap:Ht(),whileDrag:Ht(),whileFocus:Ht(),exit:Ht()}}function go(e,t){e.min=t.min,e.max=t.max}function st(e,t){go(e.x,t.x),go(e.y,t.y)}function za(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const ld=1e-4,Tg=1-ld,jg=1+ld,cd=.01,Ag=0-cd,Eg=0+cd;function _e(e){return e.max-e.min}function Fg(e,t,n){return Math.abs(e-t)<=n}function _a(e,t,n,r=.5){e.origin=r,e.originPoint=pe(t.min,t.max,e.origin),e.scale=_e(n)/_e(t),e.translate=pe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Tg&&e.scale<=jg||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ag&&e.translate<=Eg||isNaN(e.translate))&&(e.translate=0)}function Un(e,t,n,r){_a(e.x,t.x,n.x,r?r.originX:void 0),_a(e.y,t.y,n.y,r?r.originY:void 0)}function Na(e,t,n,r=0){const i=r?pe(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+_e(t)}function Bg(e,t,n,r){Na(e.x,t.x,n.x,r==null?void 0:r.x),Na(e.y,t.y,n.y,r==null?void 0:r.y)}function Va(e,t,n,r=0){const i=r?pe(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+_e(t)}function Ur(e,t,n,r){Va(e.x,t.x,n.x,r==null?void 0:r.x),Va(e.y,t.y,n.y,r==null?void 0:r.y)}function Ha(e,t,n,r,i){return e-=t,e=Wr(e,1/n,r),i!==void 0&&(e=Wr(e,1/i,r)),e}function Lg(e,t=0,n=1,r=.5,i,o=e,s=e){if(bt.test(t)&&(t=parseFloat(t),t=pe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let l=pe(o.min,o.max,r);e===o&&(l-=t),e.min=Ha(e.min,t,n,l,i),e.max=Ha(e.max,t,n,l,i)}function Wa(e,t,[n,r,i],o,s){Lg(e,t[n],t[r],t[i],t.scale,o,s)}const Ig=["x","scaleX","originX"],Dg=["y","scaleY","originY"];function Ua(e,t,n,r){Wa(e.x,t,Ig,n?n.x:void 0,r?r.x:void 0),Wa(e.y,t,Dg,n?n.y:void 0,r?r.y:void 0)}function $a(e){return e.translate===0&&e.scale===1}function ud(e){return $a(e.x)&&$a(e.y)}function Ga(e,t){return e.min===t.min&&e.max===t.max}function Rg(e,t){return Ga(e.x,t.x)&&Ga(e.y,t.y)}function Ya(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function dd(e,t){return Ya(e.x,t.x)&&Ya(e.y,t.y)}function Ka(e){return _e(e.x)/_e(e.y)}function qa(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function mt(e){return[e("x"),e("y")]}function Mg(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:u,rotateX:f,rotateY:p,skewX:m,skewY:g}=n;d&&(r=`perspective(${d}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),g&&(r+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const fd=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Pg=fd.length,Xa=e=>typeof e=="string"?parseFloat(e):e,Za=e=>typeof e=="number"||K.test(e);function Og(e,t,n,r,i,o){i?(e.opacity=pe(0,n.opacity??1,zg(r)),e.opacityExit=pe(t.opacity??1,0,_g(r))):o&&(e.opacity=pe(t.opacity??1,n.opacity??1,r));for(let s=0;s<Pg;s++){const l=fd[s];let c=Ja(t,l),d=Ja(n,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Za(c)===Za(d)?(e[l]=Math.max(pe(Xa(c),Xa(d),r),0),(bt.test(d)||bt.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||n.rotate)&&(e.rotate=pe(t.rotate||0,n.rotate||0,r))}function Ja(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const zg=hd(0,.5,ru),_g=hd(.5,.95,nt);function hd(e,t,n){return r=>r<e?0:r>t?1:n(qn(e,t,r))}function Ng(e,t,n){const r=De(e)?e:wn(e);return r.start(os("",r,t,n)),r.animation}function Jn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Vg=(e,t)=>e.depth-t.depth;class Hg{constructor(){this.children=[],this.isDirty=!1}add(t){Go(this.children,t),this.isDirty=!0}remove(t){Or(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Vg),this.isDirty=!1,this.children.forEach(t)}}function Wg(e,t){const n=ze.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Pt(r),e(o-t))};return fe.setup(r,!0),()=>Pt(r)}function Ir(e){return De(e)?e.get():e}class Ug{constructor(){this.members=[]}add(t){Go(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&&(Or(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Or(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 Dr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},wi=["","X","Y","Z"],$g=1e3;let Gg=0;function ki(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function pd(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ru(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",fe,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&pd(r)}function md({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},l=t==null?void 0:t()){this.id=Gg++,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(qg),this.nodes.forEach(tx),this.nodes.forEach(nx),this.nodes.forEach(Xg)},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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Hg)}addEventListener(s,l){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Yo),this.eventHandlers.get(s).add(l)}notifyListeners(s,...l){const c=this.eventHandlers.get(s);c&&c.notify(...l)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=ds(s)&&!K1(s),this.instance=s;const{layoutId:l,layout:c,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&&(c||l)&&(this.isLayoutDirty=!0),e){let u,f=0;const p=()=>this.root.updateBlockedByResize=!1;fe.read(()=>{f=window.innerWidth}),e(s,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,u&&u(),u=Wg(p,250),Dr.hasAnimatedSinceResize&&(Dr.hasAnimatedSinceResize=!1,this.nodes.forEach(tl)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||ax,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=d.getProps(),b=!this.targetLayout||!dd(this.targetLayout,m),j=!f&&p;if(this.options.layoutRoot||this.resumeFrom||j||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={...is(g,"layout"),onPlay:x,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(u,j)}else f||tl(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(),Pt(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(rx),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&&pd(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)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 c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(Jg),this.nodes.forEach(Qa);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(el);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Qg),this.nodes.forEach(ex),this.nodes.forEach(Yg),this.nodes.forEach(Kg)):this.nodes.forEach(el),this.clearAllSnapshots();const l=ze.now();Ie.delta=vt(0,1e3/60,l-Ie.timestamp),Ie.timestamp=l,Ie.isProcessing=!0,hi.update.process(Ie),hi.preRender.process(Ie),hi.render.process(Ie),Ie.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Zg),this.sharedNodes.forEach(ix)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,fe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){fe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_e(this.snapshot.measuredBox.x)&&!_e(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=je()),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 c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!ud(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;s&&this.instance&&(l||Ut(this.latestValues)||u)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return s&&(c=this.removeTransform(c)),lx(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:s}=this.options;if(!s)return je();const l=s.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(cx))){const{scroll:u}=this.root;u&&(xt(l.x,u.offset.x),xt(l.y,u.offset.y))}return l}removeElementScroll(s){var c;const l=je();if(st(l,s),(c=this.scroll)!=null&&c.wasRoot)return l;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:f,options:p}=u;u!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&st(l,s),xt(l.x,f.offset.x),xt(l.y,f.offset.y))}return l}applyTransform(s,l=!1,c){var u,f;const d=c||je();st(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&&(xt(d.x,-m.scroll.offset.x),xt(d.y,-m.scroll.offset.y)),Ut(m.latestValues)&&Lr(d,m.latestValues,(u=m.layout)==null?void 0:u.layoutBox)}return Ut(this.latestValues)&&Lr(d,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),d}removeTransform(s){var c;const l=je();st(l,s);for(let d=0;d<this.path.length;d++){const u=this.path[d];if(!Ut(u.latestValues))continue;let f;u.instance&&(ho(u.latestValues)&&u.updateSnapshot(),f=je(),st(f,u.measurePageBox())),Ua(l,u.latestValues,(c=u.snapshot)==null?void 0:c.layoutBox,f)}return Ut(this.latestValues)&&Ua(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!==Ie.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 c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=Ie.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=je(),this.targetWithTransforms=je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bg(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):st(this.target,this.layout.layoutBox),Ju(this.target,this.targetDelta)):st(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||ho(this.parent.latestValues)||Zu(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,c){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),Ur(this.relativeTargetOrigin,l,c,this.options.layoutAnchor||void 0),st(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ie.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=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||u))return;st(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;og(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=je());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(za(this.prevProjectionDelta.x,this.projectionDelta.x),za(this.prevProjectionDelta.y,this.projectionDelta.y)),Un(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!qa(this.projectionDelta.x,this.prevProjectionDelta.x)||!qa(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 c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=yn(),this.projectionDelta=yn(),this.projectionDeltaWithTransform=yn()}setAnimationOrigin(s,l=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},f=yn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=je(),m=c?c.source:void 0,g=this.layout?this.layout.source:void 0,x=m!==g,y=this.getStack(),b=!y||y.members.length<=1,j=!!(x&&!b&&this.options.crossfade===!0&&!this.path.some(sx));this.animationProgress=0;let k;this.mixTargetDelta=B=>{const A=B/1e3;nl(f.x,s.x,A),nl(f.y,s.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ur(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ox(this.relativeTarget,this.relativeTargetOrigin,p,A),k&&Rg(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=je()),st(k,this.relativeTarget)),x&&(this.animationValues=u,Og(u,d,this.latestValues,A,j,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var l,c,d;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Pt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fe.update(()=>{Dr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wn(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ng(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),s.onUpdate&&s.onUpdate(u)},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($g),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:u}=s;if(!(!l||!c||!d)){if(this!==s&&this.layout&&d&&gd(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||je();const f=_e(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const p=_e(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+p}st(l,c),Lr(l,u),Un(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Ug),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:c}={}){const d=this.getStack();d&&d.promote(this,c),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:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const d={};c.z&&ki("z",s,d,this.animationValues);for(let u=0;u<wi.length;u++)ki(`rotate${wi[u]}`,s,d,this.animationValues),ki(`skew${wi[u]}`,s,d,this.animationValues);s.render();for(const u in d)s.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);s.scheduleRender()}applyProjectionStyles(s,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Ir(l==null?void 0:l.pointerEvents)||"",s.transform=c?c(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=Ir(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Ut(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let f=Mg(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),s.transform=f;const{x:p,y:m}=this.projectionDelta;s.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?s.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in mo){if(u[g]===void 0)continue;const{correct:x,applyTo:y,isCSSVariable:b}=mo[g],j=f==="none"?u[g]:x(u[g],d);if(y){const k=y.length;for(let B=0;B<k;B++)s[y[B]]=j}else b?this.options.visualElement.renderState.vars[g]=j:s[g]=j}this.options.layoutId&&(s.pointerEvents=d===this?Ir(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(Qa),this.root.sharedNodes.clear()}}}function Yg(e){e.updateLayout()}function Kg(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")mt(f=>{const p=s?t.measuredBox[f]:t.layoutBox[f],m=_e(p);p.min=r[f].min,p.max=p.min+m});else if(o==="x"||o==="y"){const f=o==="x"?"y":"x";go(s?t.measuredBox[f]:t.layoutBox[f],r[f])}else gd(o,t.layoutBox,r)&&mt(f=>{const p=s?t.measuredBox[f]:t.layoutBox[f],m=_e(r[f]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const l=yn();Un(l,r,t.layoutBox);const c=yn();s?Un(c,e.applyTransform(i,!0),t.measuredBox):Un(c,r,t.layoutBox);const d=!ud(l);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:m}=f;if(p&&m){const g=e.options.layoutAnchor||void 0,x=je();Ur(x,t.layoutBox,p.layoutBox,g);const y=je();Ur(y,r,m.layoutBox,g),dd(x,y)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function qg(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 Xg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Zg(e){e.clearSnapshot()}function Qa(e){e.clearMeasurements()}function Jg(e){e.isLayoutDirty=!0,e.updateLayout()}function el(e){e.isLayoutDirty=!1}function Qg(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function ex(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tx(e){e.resolveTargetDelta()}function nx(e){e.calcProjection()}function rx(e){e.resetSkewAndRotation()}function ix(e){e.removeLeadSnapshot()}function nl(e,t,n){e.translate=pe(t.translate,0,n),e.scale=pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function rl(e,t,n,r){e.min=pe(t.min,n.min,r),e.max=pe(t.max,n.max,r)}function ox(e,t,n,r){rl(e.x,t.x,n.x,r),rl(e.y,t.y,n.y,r)}function sx(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ax={duration:.45,ease:[.4,0,.1,1]},il=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ol=il("applewebkit/")&&!il("chrome/")?Math.round:nt;function sl(e){e.min=ol(e.min),e.max=ol(e.max)}function lx(e){sl(e.x),sl(e.y)}function gd(e,t,n){return e==="position"||e==="preserve-aspect"&&!Fg(Ka(t),Ka(n),.2)}function cx(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const ux=md({attachResizeListener:(e,t)=>Jn(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}),Si={current:void 0},xd=md({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Si.current){const e=new ux({});e.mount(window),e.setOptions({layoutScroll:!0}),Si.current=e}return Si.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),gs=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function al(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function dx(...e){return t=>{let n=!1;const r=e.map(i=>{const o=al(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():al(e[i],null)}}}}function fx(...e){return ge.useCallback(dx(...e),e)}class hx extends ge.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Ar(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Ar(r)&&r.offsetWidth||0,o=Ar(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 px({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){var p;const s=T.useId(),l=T.useRef(null),c=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=T.useContext(gs),u=((p=e.props)==null?void 0:p.ref)??(e==null?void 0:e.ref),f=fx(l,u);return T.useInsertionEffect(()=>{const{width:m,height:g,top:x,left:y,right:b,bottom:j}=c.current;if(t||o===!1||!l.current||!m||!g)return;const k=n==="left"?`left: ${y}`:`right: ${b}`,B=r==="bottom"?`bottom: ${j}`:`top: ${x}`;l.current.dataset.motionPopId=s;const A=document.createElement("style");d&&(A.nonce=d);const w=i??document.head;return w.appendChild(A),A.sheet&&A.sheet.insertRule(`
|
|
330
|
+
`,document.head.appendChild(e)}function Ae({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 xr(){return a.jsx("div",{style:{width:"1px",height:"18px",background:"var(--medix-form-border)",flexShrink:0,alignSelf:"center",margin:"0 2px"}})}const lp=()=>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"})}),cp=()=>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"})}),up=()=>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"})}),dp=()=>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"})}),fp=()=>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"})}),hp=()=>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"})}),pp=()=>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"})}),mp=()=>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"})}),gp=()=>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"})}),xp=()=>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"})}),yp=()=>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"})}),bp=()=>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 vp({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 wp({currentMode:e,onSelectMode:t,accentColor:n,disabled:r}){return a.jsxs(h.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 kp({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(h.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(h.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(vp,{editor:e,accentColor:t,disabled:n}),a.jsx(xr,{})]}),r.bold&&a.jsx(Ae,{onClick:()=>e.chain().focus().toggleBold().run(),isActive:e.isActive("bold"),disabled:n,title:"Bold (Ctrl+B)",accentColor:t,children:a.jsx(lp,{})}),r.italic&&a.jsx(Ae,{onClick:()=>e.chain().focus().toggleItalic().run(),isActive:e.isActive("italic"),disabled:n,title:"Italic (Ctrl+I)",accentColor:t,children:a.jsx(cp,{})}),r.underline&&a.jsx(Ae,{onClick:()=>e.chain().focus().toggleUnderline().run(),isActive:e.isActive("underline"),disabled:n,title:"Underline (Ctrl+U)",accentColor:t,children:a.jsx(up,{})}),r.strikethrough&&a.jsx(Ae,{onClick:()=>e.chain().focus().toggleStrike().run(),isActive:e.isActive("strike"),disabled:n,title:"Strikethrough",accentColor:t,children:a.jsx(dp,{})}),(r.bulletList||r.orderedList||r.quote)&&a.jsx(xr,{}),r.bulletList&&a.jsx(Ae,{onClick:()=>e.chain().focus().toggleBulletList().run(),isActive:e.isActive("bulletList"),disabled:n,title:"Bullet List",accentColor:t,children:a.jsx(fp,{})}),r.orderedList&&a.jsx(Ae,{onClick:()=>e.chain().focus().toggleOrderedList().run(),isActive:e.isActive("orderedList"),disabled:n,title:"Ordered List",accentColor:t,children:a.jsx(hp,{})}),r.quote&&a.jsx(Ae,{onClick:()=>e.chain().focus().toggleBlockquote().run(),isActive:e.isActive("blockquote"),disabled:n,title:"Blockquote",accentColor:t,children:a.jsx(pp,{})}),r.textAlign&&a.jsxs(a.Fragment,{children:[a.jsx(xr,{}),a.jsx(Ae,{onClick:()=>e.chain().focus().setTextAlign("left").run(),isActive:e.isActive({textAlign:"left"}),disabled:n,title:"Align Left",accentColor:t,children:a.jsx(xp,{})}),a.jsx(Ae,{onClick:()=>e.chain().focus().setTextAlign("center").run(),isActive:e.isActive({textAlign:"center"}),disabled:n,title:"Align Center",accentColor:t,children:a.jsx(yp,{})}),a.jsx(Ae,{onClick:()=>e.chain().focus().setTextAlign("right").run(),isActive:e.isActive({textAlign:"right"}),disabled:n,title:"Align Right",accentColor:t,children:a.jsx(bp,{})})]}),(r.link||r.clearFormat)&&a.jsx(xr,{}),r.link&&a.jsx(Ae,{onClick:u,isActive:e.isActive("link"),disabled:n,title:"Insert / Edit Link",accentColor:t,children:a.jsx(mp,{})}),r.clearFormat&&a.jsx(Ae,{onClick:()=>e.chain().focus().unsetAllMarks().clearNodes().run(),disabled:n,title:"Clear Formatting",accentColor:t,children:a.jsx(gp,{})})]}):a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"1",children:[a.jsx(Ae,{onClick:()=>l==null?void 0:l("**bold text**"),disabled:n,title:"Markdown Bold",accentColor:t,children:"**B**"}),a.jsx(Ae,{onClick:()=>l==null?void 0:l("*italic text*"),disabled:n,title:"Markdown Italic",accentColor:t,children:"*I*"}),a.jsx(Ae,{onClick:()=>l==null?void 0:l(`
|
|
331
|
+
# Heading 1
|
|
332
|
+
`),disabled:n,title:"Markdown H1",accentColor:t,children:"# H1"}),a.jsx(Ae,{onClick:()=>l==null?void 0:l(`
|
|
333
|
+
## Heading 2
|
|
334
|
+
`),disabled:n,title:"Markdown H2",accentColor:t,children:"## H2"}),a.jsx(Ae,{onClick:()=>l==null?void 0:l(`
|
|
335
|
+
- List item
|
|
336
|
+
`),disabled:n,title:"Markdown Bullet List",accentColor:t,children:"- List"}),a.jsx(Ae,{onClick:()=>l==null?void 0:l("[link text](https://example.com)"),disabled:n,title:"Markdown Link",accentColor:t,children:"[Link]"}),a.jsx(Ae,{onClick:()=>l==null?void 0:l(`
|
|
337
|
+
> Blockquote
|
|
338
|
+
`),disabled:n,title:"Markdown Blockquote",accentColor:t,children:"> Quote"})]})}),o&&a.jsx(wp,{currentMode:i,onSelectMode:s,accentColor:t,disabled:n})]})}const Sp={bold:!0,italic:!0,underline:!0,strikethrough:!0,headings:!0,bulletList:!0,orderedList:!0,quote:!0,link:!0,textAlign:!0,clearFormat:!0};function Ko({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:f,helperText:m,errorMessage:p,isInvalid:g=!1,disabled:x=!1,colorScheme:y="blue",minHeight:v="180px",maxHeight:j="400px",maxLength:k,showCharCount:F=!1,toolbarOptions:B,className:T}){const[O,E]=S.useState(!1),[A,L]=S.useState(s),M=l!==void 0?l:A,R=e!==void 0,V=sp[y],_={...Sp,...B},[I,D]=S.useState(()=>{const ie=R?e:t??"";return o==="markdown"?ie:Hn(ie)}),U=S.useRef(null);S.useEffect(()=>{ap()},[]);const W=Xs.useEditor({extensions:[$f.configure({heading:{levels:[1,2,3]}}),Yf,Gf.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),Kf.configure({types:["heading","paragraph"]}),qf.configure({placeholder:c})],content:R?o==="markdown"?Ut(e??""):e??"":t?o==="markdown"?Ut(t):t:"",editable:!x,editorProps:{attributes:{spellcheck:"true"}},onUpdate({editor:ie}){const ae=ie.getHTML(),H=ae==="<p></p>"?"":ae,fe=Hn(H);i==null||i(H),r==null||r(fe);const ne=o==="markdown"?fe:H;k!==void 0&&ie.getText().length>k||n==null||n(ne)},onFocus(){E(!0)},onBlur(){E(!1)}}),G=ie=>{if(ie!==M){if(ie==="markdown"){const ae=W?W.getHTML():"",H=Hn(ae==="<p></p>"?"":ae);D(H)}else{const ae=Ut(I);W&&W.commands.setContent(ae,{emitUpdate:!1})}l===void 0&&L(ie),u==null||u(ie)}},b=ie=>{const ae=ie.target.value;D(ae);const H=Ut(ae);r==null||r(ae),i==null||i(H);const fe=o==="markdown"?ae:H;k!==void 0&&ae.length>k||(n==null||n(fe),W&&W.commands.setContent(H,{emitUpdate:!1}))},K=ie=>{const ae=U.current;if(!ae){D(it=>it+ie);return}const H=ae.selectionStart,fe=ae.selectionEnd,ne=ae.value,he=ne.substring(0,H)+ie+ne.substring(fe);D(he);const le=Ut(he);r==null||r(he),i==null||i(le);const We=o==="markdown"?he:le;n==null||n(We),W&&W.commands.setContent(le,{emitUpdate:!1}),setTimeout(()=>{ae.focus(),ae.setSelectionRange(H+ie.length,H+ie.length)},50)};S.useEffect(()=>{if(R)if(o==="markdown"){const ie=e??"";if(D(ie),W){const ae=Ut(ie);W.getHTML()!==ae&&W.commands.setContent(ae,{emitUpdate:!1})}}else{const ie=e===""?"<p></p>":e??"<p></p>";W&&W.getHTML()!==ie&&W.commands.setContent(ie,{emitUpdate:!1}),D(Hn(e??""))}},[W,R,e,o]);const te=M==="markdown"?I.length:(W==null?void 0:W.getText().length)??0,C=g?"#DC2626":O?V.base:"var(--medix-form-border)";return a.jsxs(h.Box,{w:"100%",className:T,children:[f&&a.jsx(h.Text,{mb:"1.5",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",color:"text.heading",children:f}),a.jsxs(h.Box,{borderRadius:"md",overflow:"hidden",bg:"bg.surface",opacity:x?.6:1,style:{border:`1.5px solid ${C}`,transition:"border-color 0.15s ease",boxShadow:"none",background:"var(--medix-form-bg)"},children:[a.jsx(kp,{editor:W,accentColor:V.base,disabled:x,opts:_,mode:M,showModeToggle:d,onModeChange:G,onInsertMarkdown:K}),M==="wysiwyg"?a.jsx(h.Box,{className:"medix-rte-content",style:{minHeight:v,maxHeight:j,overflowY:"auto"},_dark:{color:"var(--medix-form-text)"},children:a.jsx(Xs.EditorContent,{editor:W})}):a.jsx("textarea",{ref:U,value:I,onChange:b,placeholder:c,disabled:x,onFocus:()=>E(!0),onBlur:()=>E(!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||k)&&a.jsx(h.Box,{display:"flex",justifyContent:k?"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(h.Text,{fontSize:"xs",color:k&&te>k?"red.500":"text.muted",fontFamily:"var(--font-body)",children:[te,k?` / ${k}`:""," characters"]})})]}),m&&!g&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:m}),g&&p&&a.jsx(h.Text,{mt:"1.5",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:p})]})}const Cp=Ko;Ko.displayName="MedixRichTextInput";const Gc=S.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...r},i)=>a.jsx(h.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)}));Gc.displayName="MedixCard";function Tp({title:e,subtitle:t,action:n,children:r,...i}){return a.jsxs(h.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[a.jsxs(h.Box,{flex:"1",children:[e&&a.jsx(h.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&a.jsx(h.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),r]}),n&&a.jsx(h.Box,{flexShrink:0,children:n})]})}function jp({children:e,...t}){return a.jsx(h.Box,{px:"6",py:"5",...t,children:e})}function Ep({children:e,...t}){return a.jsx(h.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Yc=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(h.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(h.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(h.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&a.jsx(h.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),a.jsx(h.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),r!==void 0&&a.jsxs(h.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:c,children:[a.jsx(h.Box,{as:"span",children:d==="up"?"↑":d==="down"?"↓":"→"}),a.jsxs(h.Box,{as:"span",children:[Math.abs(r),"%"]})]})]})});Yc.displayName="MedixStatCard";const Ap={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Kc=S.forwardRef(({maxWidth:e="xl",children:t,...n},r)=>a.jsx(h.Box,{ref:r,w:"100%",maxW:Ap[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Kc.displayName="MedixContainer";function Fp({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(h.Box,{display:"flex",flexDirection:"column",alignItems:u,textAlign:l,gap:"3",...s,children:[e&&a.jsx(h.Box,{as:"span",fontSize:"md",fontWeight:"bold",color:o,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),a.jsx(h.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(h.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(h.Box,{mt:"2",children:i})]})}const Bp=["light","dark"],Lp={light:{label:"Light mode",canvas:N.neutralLight.bg.value,surface:N.neutralLight.surface.value,border:N.neutralLight.border.value,text:N.neutralLight.heading.value,muted:N.neutralLight.body.value},dark:{label:"Dark mode",canvas:N.neutralDark.bg.value,surface:N.neutralDark.surface.value,border:N.neutralDark.border.value,text:N.neutralDark.heading.value,muted:N.neutralDark.body.value}};function Vt(e,t){return Object.entries(t).map(([n,r])=>({token:`${e}.${n}`,value:r.value}))}const Ip=[{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:N.neutralLight.bg.value,dark:N.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:N.neutralLight.bg2.value,dark:N.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:N.neutralLight.surface.value,dark:N.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:N.neutralLight.heading.value,dark:N.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:N.neutralLight.body.value,dark:N.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:N.neutralLight.muted.value,dark:N.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:N.neutralLight.border.value,dark:N.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:N.blue[500].value,dark:N.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:N.blue[100].value,dark:N.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:N.green[500].value,dark:N.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:N.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:N.amber[500].value,dark:N.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:N.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:N.red[500].value,dark:N.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:N.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:N.blue[50].value,dark:N.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:N.blue[100].value,dark:N.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:N.blue[200].value,dark:N.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:N.blue[300].value,dark:N.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:N.blue[400].value,dark:N.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:N.blue[500].value,dark:N.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:N.blue[600].value,dark:N.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:N.blue[700].value,dark:N.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:N.blue[800].value,dark:N.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:N.blue[900].value,dark:N.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:N.blue[500].value,dark:N.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:N.blue[100].value,dark:N.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:N.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:N.blue[100].value,dark:N.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:N.blue[700].value,dark:N.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:N.blue[500].value,dark:N.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:N.purple[50].value,dark:N.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:N.purple[100].value,dark:N.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:N.purple[500].value,dark:N.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:N.purple[600].value,dark:N.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:N.purple[500].value,dark:N.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:N.purple[100].value,dark:N.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:N.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:N.purple[100].value,dark:N.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:N.purple[700].value,dark:N.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:N.purple[500].value,dark:N.purple[500].value}]}],Dp=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:Vt("brand.blue",N.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:Vt("brand.purple",N.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:Vt("brand.green",N.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:Vt("brand.amber",N.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:Vt("brand.red",N.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:Vt("brand.neutralLight",N.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:Vt("brand.neutralDark",N.neutralDark)}];function Rp({mode:e,token:t}){const n=Lp[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(h.Box,{border:"1px solid",borderColor:n.border,borderRadius:"lg",bg:n.surface,p:"3",children:[a.jsx(h.Text,{fontSize:"xs",fontWeight:"600",color:n.text,fontFamily:"var(--font-heading)",mb:"2",children:n.label}),t.preview==="text"?a.jsx(h.Box,{...i,children:a.jsx(h.Text,{color:r,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?a.jsx(h.Box,{...i,children:a.jsx(h.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:r,bg:n.canvas})}):a.jsx(h.Box,{...i,bg:r,borderColor:r===n.canvas||r==="#FFFFFF"?n.border:"transparent"}),a.jsx(h.Text,{mt:"2",fontSize:"xs",color:n.muted,fontFamily:"var(--font-mono)",children:r})]})}const qc=S.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...n},r)=>a.jsxs(h.Box,{ref:r,display:"flex",flexDirection:"column",gap:"8",...n,children:[a.jsx(h.Box,{children:a.jsx(h.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(h.Box,{display:"flex",flexDirection:"column",gap:"6",children:Ip.map(i=>a.jsxs(h.Box,{children:[a.jsx(h.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),a.jsx(h.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),a.jsx(h.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:i.tokens.map(o=>a.jsxs(h.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[a.jsx(h.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:o.token}),a.jsx(h.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o.description}),a.jsx(h.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:Bp.map(s=>a.jsx(Rp,{mode:s,token:o},`${o.token}-${s}`))})]},o.token))})]},i.title))}),t&&a.jsx(h.Box,{display:"flex",flexDirection:"column",gap:"6",children:Dp.map(i=>a.jsxs(h.Box,{children:[a.jsx(h.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),a.jsx(h.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),a.jsx(h.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:i.tokens.map(o=>a.jsxs(h.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[a.jsx(h.Box,{h:"72px",bg:o.value,borderBottom:"1px solid",borderColor:o.value==="#FFFFFF"||o.value===N.neutralLight.bg.value?"border":"transparent"}),a.jsxs(h.Box,{p:"4",children:[a.jsx(h.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:o.token}),a.jsx(h.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:o.value})]})]},o.token))})]},i.title))})]}));qc.displayName="MedixThemeColorPalette";const qo=S.createContext({});function Xo(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mp=typeof window<"u",Xc=Mp?S.useLayoutEffect:S.useEffect,Qr=S.createContext(null);function Zo(e,t){e.indexOf(t)===-1&&e.push(t)}function Vr(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 Ji(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Sn=()=>{},jt=()=>{};var jc;typeof process<"u"&&((jc=process.env)==null?void 0:jc.NODE_ENV)!=="production"&&(Sn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ji(t,n))},jt=(e,t,n)=>{if(!e)throw new Error(Ji(t,n))});const Mt={},Zc=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Jc(e){return typeof e=="object"&&e!==null}const Qc=e=>/^0[^.\s]+$/u.test(e);function eu(e){let t;return()=>(t===void 0&&(t=e()),t)}const nt=e=>e,Pp=(e,t)=>n=>t(e(n)),or=(...e)=>e.reduce(Pp),Jn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Jo{constructor(){this.subscriptions=[]}add(t){return Zo(this.subscriptions,t),()=>Vr(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 Ye=e=>e*1e3,tt=e=>e/1e3;function tu(e,t){return t?e*(1e3/t):0}const ca=new Set;function Qo(e,t,n){e||ca.has(t)||(console.warn(Ji(t,n)),ca.add(t))}const nu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Op=1e-7,zp=12;function _p(e,t,n,r,i){let o,s,l=0;do s=t+(n-t)/2,o=nu(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>Op&&++l<zp);return s}function sr(e,t,n,r){if(e===t&&n===r)return nt;const i=o=>_p(o,0,1,e,n);return o=>o===0||o===1?o:nu(i(o),t,r)}const ru=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,iu=e=>t=>1-e(1-t),ou=sr(.33,1.53,.69,.99),es=iu(ou),su=ru(es),au=e=>e>=1?1:(e*=2)<1?.5*es(e):.5*(2-Math.pow(2,-10*(e-1))),ts=e=>1-Math.sin(Math.acos(e)),lu=iu(ts),cu=ru(ts),Np=sr(.42,0,1,1),Vp=sr(0,0,.58,1),uu=sr(.42,0,.58,1),Hp=e=>Array.isArray(e)&&typeof e[0]!="number",du=e=>Array.isArray(e)&&typeof e[0]=="number",ua={linear:nt,easeIn:Np,easeInOut:uu,easeOut:Vp,circIn:ts,circInOut:cu,circOut:lu,backIn:es,backInOut:su,backOut:ou,anticipate:au},Wp=e=>typeof e=="string",da=e=>{if(du(e)){jt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return sr(t,n,r,i)}else if(Wp(e))return jt(ua[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ua[e];return e},yr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Up(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,f=!1,m=!1)=>{const g=m&&i?n:r;return f&&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 f=n;n=r,r=f,n.forEach(u),n.clear(),i=!1,o&&(o=!1,d.process(c))}};return d}const $p=40;function fu(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=yr.reduce((k,F)=>(k[F]=Up(o),k),{}),{setup:l,read:u,resolveKeyframes:d,preUpdate:c,update:f,preRender:m,render:p,postRender:g}=s,x=()=>{const k=Mt.useManualTiming,F=k?i.timestamp:performance.now();n=!1,k||(i.delta=r?1e3/60:Math.max(Math.min(F-i.timestamp,$p),1)),i.timestamp=F,i.isProcessing=!0,l.process(i),u.process(i),d.process(i),c.process(i),f.process(i),m.process(i),p.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:yr.reduce((k,F)=>{const B=s[F];return k[F]=(T,O=!1,E=!1)=>(n||y(),B.schedule(T,O,E)),k},{}),cancel:k=>{for(let F=0;F<yr.length;F++)s[yr[F]].cancel(k)},state:i,steps:s}}const{schedule:ge,cancel:Pt,state:Me,steps:xi}=fu(typeof requestAnimationFrame<"u"?requestAnimationFrame:nt,!0);let Br;function Gp(){Br=void 0}const Ne={now:()=>(Br===void 0&&Ne.set(Me.isProcessing||Mt.useManualTiming?Me.timestamp:performance.now()),Br),set:e=>{Br=e,queueMicrotask(Gp)}},hu=e=>t=>typeof t=="string"&&t.startsWith(e),pu=hu("--"),Yp=hu("var(--"),ns=e=>Yp(e)?Kp.test(e.split("/*")[0].trim()):!1,Kp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function fa(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Cn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Qn={...Cn,transform:e=>wt(0,1,e)},br={...Cn,default:1},Gn=e=>Math.round(e*1e5)/1e5,rs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qp(e){return e==null}const Xp=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,is=(e,t)=>n=>!!(typeof n=="string"&&Xp.test(n)&&n.startsWith(e)||t&&!qp(n)&&Object.prototype.hasOwnProperty.call(n,t)),mu=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,l]=r.match(rs);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},Zp=e=>wt(0,255,e),yi={...Cn,transform:e=>Math.round(Zp(e))},Gt={test:is("rgb","red"),parse:mu("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+yi.transform(e)+", "+yi.transform(t)+", "+yi.transform(n)+", "+Gn(Qn.transform(r))+")"};function Jp(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 Qi={test:is("#"),parse:Jp,transform:Gt.transform},ar=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),It=ar("deg"),vt=ar("%"),X=ar("px"),Qp=ar("vh"),em=ar("vw"),ha={...vt,parse:e=>vt.parse(e)/100,transform:e=>vt.transform(e*100)},gn={test:is("hsl","hue"),parse:mu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+vt.transform(Gn(t))+", "+vt.transform(Gn(n))+", "+Gn(Qn.transform(r))+")"},Ce={test:e=>Gt.test(e)||Qi.test(e)||gn.test(e),parse:e=>Gt.test(e)?Gt.parse(e):gn.test(e)?gn.parse(e):Qi.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Gt.transform(e):gn.transform(e),getAnimatableNone:e=>{const t=Ce.parse(e);return t.alpha=0,Ce.transform(t)}},tm=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nm(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(rs))==null?void 0:t.length)||0)+(((n=e.match(tm))==null?void 0:n.length)||0)>0}const gu="number",xu="color",rm="var",im="var(",pa="${}",om=/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 wn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const l=t.replace(om,u=>(Ce.test(u)?(r.color.push(o),i.push(xu),n.push(Ce.parse(u))):u.startsWith(im)?(r.var.push(o),i.push(rm),n.push(u)):(r.number.push(o),i.push(gu),n.push(parseFloat(u))),++o,pa)).split(pa);return{values:n,split:l,indexes:r,types:i}}function sm(e){return wn(e).values}function yu({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===gu?i+=Gn(r[o]):s===xu?i+=Ce.transform(r[o]):i+=r[o]}return i}}function am(e){return yu(wn(e))}const lm=e=>typeof e=="number"?0:Ce.test(e)?Ce.getAnimatableNone(e):e,cm=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:lm(e);function um(e){const t=wn(e);return yu(t)(t.values.map((r,i)=>cm(r,t.split[i])))}const ct={test:nm,parse:sm,createTransformer:am,getAnimatableNone:um};function bi(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 dm({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=bi(u,l,e+1/3),o=bi(u,l,e),s=bi(u,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Hr(e,t){return n=>n>0?t:e}const ye=(e,t,n)=>e+(t-e)*n,vi=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},fm=[Qi,Gt,gn],hm=e=>fm.find(t=>t.test(e));function ma(e){const t=hm(e);if(Sn(!!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===gn&&(n=dm(n)),n}const ga=(e,t)=>{const n=ma(e),r=ma(t);if(!n||!r)return Hr(e,t);const i={...n};return o=>(i.red=vi(n.red,r.red,o),i.green=vi(n.green,r.green,o),i.blue=vi(n.blue,r.blue,o),i.alpha=ye(n.alpha,r.alpha,o),Gt.transform(i))},eo=new Set(["none","hidden"]);function pm(e,t){return eo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function mm(e,t){return n=>ye(e,t,n)}function os(e){return typeof e=="number"?mm:typeof e=="string"?ns(e)?Hr:Ce.test(e)?ga:ym:Array.isArray(e)?bu:typeof e=="object"?Ce.test(e)?ga:gm:Hr}function bu(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>os(o)(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function gm(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=os(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function xm(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 ym=(e,t)=>{const n=ct.createTransformer(t),r=wn(e),i=wn(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?eo.has(e)&&!i.values.length||eo.has(t)&&!r.values.length?pm(e,t):or(bu(xm(r,i),i.values),n):(Sn(!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"),Hr(e,t))};function vu(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ye(e,t,n):os(e)(e,t)}const bm=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ge.update(t,n),stop:()=>Pt(t),now:()=>Me.isProcessing?Me.timestamp:Ne.now()}},wu=(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)})`},Wr=2e4;function ss(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Wr;)t+=n,r=e.next(t);return t>=Wr?1/0:t}function vm(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(ss(r),Wr);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:tt(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 to(e,t){return e*Math.sqrt(1-t*t)}const wm=12;function km(e,t,n){let r=n;for(let i=1;i<wm;i++)r=r-e(r)/t(r);return r}const wi=.001;function Sm({duration:e=ve.duration,bounce:t=ve.bounce,velocity:n=ve.velocity,mass:r=ve.mass}){let i,o;Sn(e<=Ye(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,tt(e)),s<1?(i=d=>{const c=d*s,f=c*e,m=c-n,p=to(d,s),g=Math.exp(-f);return wi-m/p*g},o=d=>{const f=d*s*e,m=f*n+n,p=Math.pow(s,2)*Math.pow(d,2)*e,g=Math.exp(-f),x=to(Math.pow(d,2),s);return(-i(d)+wi>0?-1:1)*((m-p)*g)/x}):(i=d=>{const c=Math.exp(-d*e),f=(d-n)*e+1;return-wi+c*f},o=d=>{const c=Math.exp(-d*e),f=(n-d)*(e*e);return c*f});const l=5/e,u=km(i,o,l);if(e=Ye(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 Cm=["duration","bounce"],Tm=["stiffness","damping","mass"];function xa(e,t){return t.some(n=>e[n]!==void 0)}function jm(e){let t={velocity:ve.velocity,stiffness:ve.stiffness,damping:ve.damping,mass:ve.mass,isResolvedFromDuration:!1,...e};if(!xa(e,Tm)&&xa(e,Cm))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=Sm({...e,velocity:0});t={...t,...n,mass:ve.mass},t.isResolvedFromDuration=!0}return t}function Ur(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:f,velocity:m,isResolvedFromDuration:p}=jm({...n,velocity:-tt(n.velocity||0)}),g=m||0,x=d/(2*Math.sqrt(u*c)),y=s-o,v=tt(Math.sqrt(u/c)),j=Math.abs(y)<5;r||(r=j?ve.restSpeed.granular:ve.restSpeed.default),i||(i=j?ve.restDelta.granular:ve.restDelta.default);let k,F,B,T,O,E;if(x<1)B=to(v,x),T=(g+x*v*y)/B,k=L=>{const M=Math.exp(-x*v*L);return s-M*(T*Math.sin(B*L)+y*Math.cos(B*L))},O=x*v*T+y*B,E=x*v*y-T*B,F=L=>Math.exp(-x*v*L)*(O*Math.sin(B*L)+E*Math.cos(B*L));else if(x===1){k=M=>s-Math.exp(-v*M)*(y+(g+v*y)*M);const L=g+v*y;F=M=>Math.exp(-v*M)*(v*L*M-g)}else{const L=v*Math.sqrt(x*x-1);k=_=>{const I=Math.exp(-x*v*_),D=Math.min(L*_,300);return s-I*((g+x*v*y)*Math.sinh(D)+L*y*Math.cosh(D))/L};const M=(g+x*v*y)/L,R=x*v*M-y*L,V=x*v*y-M*L;F=_=>{const I=Math.exp(-x*v*_),D=Math.min(L*_,300);return I*(R*Math.sinh(D)+V*Math.cosh(D))}}const A={calculatedDuration:p&&f||null,velocity:L=>Ye(F(L)),next:L=>{if(!p&&x<1){const R=Math.exp(-x*v*L),V=Math.sin(B*L),_=Math.cos(B*L),I=s-R*(T*V+y*_),D=Ye(R*(O*V+E*_));return l.done=Math.abs(D)<=r&&Math.abs(s-I)<=i,l.value=l.done?s:I,l}const M=k(L);if(p)l.done=L>=f;else{const R=Ye(F(L));l.done=Math.abs(R)<=r&&Math.abs(s-M)<=i}return l.value=l.done?s:M,l},toString:()=>{const L=Math.min(ss(A),Wr),M=wu(R=>A.next(L*R).value,L,30);return L+"ms "+M},toTransition:()=>{}};return A}Ur.applyToOptions=e=>{const t=vm(e,100,Ur);return e.ease=t.ease,e.duration=Ye(t.duration),e.type="keyframes",e};const Em=5;function ku(e,t,n){const r=Math.max(t-Em,0);return tu(n-e(r),t-r)}function no({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 f=e[0],m={done:!1,value:f},p=E=>l!==void 0&&E<l||u!==void 0&&E>u,g=E=>l===void 0?u:u===void 0||Math.abs(l-E)<Math.abs(u-E)?l:u;let x=n*t;const y=f+x,v=s===void 0?y:s(y);v!==y&&(x=v-f);const j=E=>-x*Math.exp(-E/r),k=E=>v+j(E),F=E=>{const A=j(E),L=k(E);m.done=Math.abs(A)<=d,m.value=m.done?v:L};let B,T;const O=E=>{p(m.value)&&(B=E,T=Ur({keyframes:[m.value,g(m.value)],velocity:ku(k,E,m.value),damping:i,stiffness:o,restDelta:d,restSpeed:c}))};return O(0),{calculatedDuration:null,next:E=>{let A=!1;return!T&&B===void 0&&(A=!0,F(E),O(E)),B!==void 0&&E>=B?T.next(E-B):(!A&&F(E),m)}}}function Am(e,t,n){const r=[],i=n||Mt.mix||vu,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]||nt:t;l=or(u,l)}r.push(l)}return r}function Fm(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(jt(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=Am(t,r,i),u=l.length,d=c=>{if(s&&c<e[0])return t[0];let f=0;if(u>1)for(;f<e.length-2&&!(c<e[f+1]);f++);const m=Jn(e[f],e[f+1],c);return l[f](m)};return n?c=>d(wt(e[0],e[o-1],c)):d}function Bm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Jn(0,t,r);e.push(ye(n,1,i))}}function Lm(e){const t=[0];return Bm(t,e.length-1),t}function Im(e,t){return e.map(n=>n*t)}function Dm(e,t){return e.map(()=>t||uu).splice(0,e.length-1)}function xn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Hp(r)?r.map(da):da(r),o={done:!1,value:t[0]},s=Im(n&&n.length===t.length?n:Lm(t),e),l=Fm(s,t,{ease:Array.isArray(i)?i:Dm(t,i)});return{calculatedDuration:e,next:u=>(o.value=l(u),o.done=u>=e,o)}}const Rm=e=>e!==null;function ei(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(Rm),l=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!l||r===void 0?o[l]:r}const Mm={decay:no,inertia:no,tween:xn,keyframes:xn,spring:Ur};function Su(e){typeof e.type=="string"&&(e.type=Mm[e.type])}class as{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 Pm=e=>e/100;class $r extends as{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!==Ne.now()&&this.tick(Ne.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;Su(t);const{type:n=xn,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:l}=t;const u=n||xn;process.env.NODE_ENV!=="production"&&u!==xn&&jt(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),u!==xn&&typeof l[0]!="number"&&(this.mixKeyframes=or(Pm,vu(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=ss(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:f,repeatType:m,repeatDelay:p,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 v=this.currentTime-d*(this.playbackSpeed>=0?1:-1),j=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let k=this.currentTime,F=r;if(f){const E=Math.min(this.currentTime,i)/l;let A=Math.floor(E),L=E%1;!L&&E>=1&&(L=1),L===1&&A--,A=Math.min(A,f+1),!!(A%2)&&(m==="reverse"?(L=1-L,p&&(L-=p/l)):m==="mirror"&&(F=s)),k=wt(0,1,L)*l}let B;j?(this.delayState.value=c[0],B=this.delayState):B=F.next(k),o&&!j&&(B.value=o(B.value));let{done:T}=B;!j&&u!==null&&(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return O&&g!==no&&(B.value=ei(c,this.options,y,this.speed)),x&&x(B.value),O&&this.finish(),B}then(t,n){return this.finished.then(t,n)}get duration(){return tt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+tt(t)}get time(){return tt(this.currentTime)}set time(t){t=Ye(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 ku(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(Ne.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=tt(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:t=bm,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(Ne.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 Om(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Yt=e=>e*180/Math.PI,ro=e=>{const t=Yt(Math.atan2(e[1],e[0]));return io(t)},zm={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ro,rotateZ:ro,skewX:e=>Yt(Math.atan(e[1])),skewY:e=>Yt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},io=e=>(e=e%360,e<0&&(e+=360),e),ya=ro,ba=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),va=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_m={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ba,scaleY:va,scale:e=>(ba(e)+va(e))/2,rotateX:e=>io(Yt(Math.atan2(e[6],e[5]))),rotateY:e=>io(Yt(Math.atan2(-e[2],e[0]))),rotateZ:ya,rotate:ya,skewX:e=>Yt(Math.atan(e[4])),skewY:e=>Yt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function oo(e){return e.includes("scale")?1:0}function so(e,t){if(!e||e==="none")return oo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=_m,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=zm,i=l}if(!i)return oo(t);const o=r[t],s=i[1].split(",").map(Vm);return typeof o=="function"?o(s):s[o]}const Nm=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return so(n,t)};function Vm(e){return parseFloat(e.trim())}const Tn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jn=new Set(Tn),wa=e=>e===Cn||e===X,Hm=new Set(["x","y","z"]),Wm=Tn.filter(e=>!Hm.has(e));function Um(e){const t=[];return Wm.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Rt={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})=>so(t,"x"),y:(e,{transform:t})=>so(t,"y")};Rt.translateX=Rt.x;Rt.translateY=Rt.y;const qt=new Set;let ao=!1,lo=!1,co=!1;function Cu(){if(lo){const e=Array.from(qt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Um(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)})}lo=!1,ao=!1,qt.forEach(e=>e.complete(co)),qt.clear()}function Tu(){qt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(lo=!0)})}function $m(){co=!0,Tu(),Cu(),co=!1}class ls{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?(qt.add(this),ao||(ao=!0,ge.read(Tu),ge.resolveKeyframes(Cu))):(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])}Om(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),qt.delete(this)}cancel(){this.state==="scheduled"&&(qt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Gm=e=>e.startsWith("--");function ju(e,t,n){Gm(t)?e.style.setProperty(t,n):e.style[t]=n}const Ym={};function Eu(e,t){const n=eu(e);return()=>Ym[t]??n()}const Km=Eu(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Au=Eu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ka={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wn([0,.65,.55,1]),circOut:Wn([.55,0,1,.45]),backIn:Wn([.31,.01,.66,-.59]),backOut:Wn([.33,1.53,.69,.99])};function Fu(e,t){if(e)return typeof e=="function"?Au()?wu(e,t):"ease-out":du(e)?Wn(e):Array.isArray(e)?e.map(n=>Fu(n,t)||ka.easeOut):ka[e]}function qm(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 f=Fu(l,i);Array.isArray(f)&&(c.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return d&&(m.pseudoElement=d),e.animate(c,m)}function Bu(e){return typeof e=="function"&&"applyToOptions"in e}function Xm({type:e,...t}){return Bu(e)&&Au()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Lu extends as{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,jt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Xm(t);this.animation=qm(n,r,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=ei(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(c),ju(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 tt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+tt(t)}get time(){return tt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ye(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&&Km()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),nt):i(this)}}const Iu={anticipate:au,backInOut:su,circInOut:cu};function Zm(e){return e in Iu}function Jm(e){typeof e.ease=="string"&&Zm(e.ease)&&(e.ease=Iu[e.ease])}const ki=10;class Qm extends Lu{constructor(t){Jm(t),Su(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 $r({...s,autoplay:!1}),u=Math.max(ki,Ne.now()-this.startTime),d=wt(0,ki,u-ki),c=l.sample(u).value,{name:f}=this.options;o&&f&&ju(o,f,c),n.setWithVelocity(l.sample(Math.max(0,u-d)).value,c,d),l.stop()}}const Sa=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ct.test(e)||e==="0")&&!e.startsWith("url("));function e1(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 t1(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=Sa(i,t),l=Sa(o,t);return Sn(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:e1(e)||(n==="spring"||Bu(n))&&r}function uo(e){e.duration=0,e.type="keyframes"}const Du=new Set(["opacity","clipPath","filter","transform"]),n1=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function r1(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&n1.test(e[t]))return!0;return!1}const i1=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),o1=eu(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function s1(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s,keyframes:l}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:c}=t.owner.getProps();return o1()&&n&&(Du.has(n)||i1.has(n)&&r1(l))&&(n!=="transform"||!c)&&!d&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const a1=40;class l1 extends as{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,...f}){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=Ne.now();const m={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:u,motionValue:d,element:c,...f},p=(c==null?void 0:c.KeyframeResolver)||ls;this.keyframeResolver=new p(l,(x,y,v)=>this.onKeyframesResolved(x,y,m,!v),u,d,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,i){var v,j;this.keyframeResolver=void 0;const{name:o,type:s,velocity:l,delay:u,isHandoff:d,onUpdate:c}=r;this.resolvedAt=Ne.now();let f=!0;t1(t,o,s,l)||(f=!1,(Mt.instantAnimations||!u)&&(c==null||c(ei(t,r,n))),t[0]=t[t.length-1],uo(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>a1?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=f&&!d&&s1(p),x=(j=(v=p.motionValue)==null?void 0:v.owner)==null?void 0:j.current;let y;if(g)try{y=new Qm({...p,element:x})}catch{y=new $r(p)}else y=new $r(p);y.finished.then(()=>{this.notifyFinished()}).catch(nt),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(),$m()),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 Ru(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 c1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function u1(e){const t=c1.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const d1=4;function Mu(e,t,n=1){jt(n<=d1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=u1(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return Zc(s)?parseFloat(s):s}return ns(i)?Mu(i,t,n+1):i}const f1={type:"spring",stiffness:500,damping:25,restSpeed:10},h1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),p1={type:"keyframes",duration:.8},m1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},g1=(e,{keyframes:t})=>t.length>2?p1:jn.has(e)?e.startsWith("scale")?h1(t[1]):f1:m1;function Pu(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function cs(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Pu(n,e):n}const x1=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function y1(e){for(const t in e)if(!x1.has(t))return!0;return!1}const us=(e,t,n,r={},i,o)=>s=>{const l=cs(r,e)||{},u=l.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ye(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{s(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:i};y1(l)||Object.assign(c,g1(e,c)),c.duration&&(c.duration=Ye(c.duration)),c.repeatDelay&&(c.repeatDelay=Ye(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(uo(c),c.delay===0&&(f=!0)),(Mt.instantAnimations||Mt.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(f=!0,uo(c),c.delay=0),c.allowFlatten=!l.type&&!l.ease,f&&!o&&t.get()!==void 0){const m=ei(c.keyframes,l);if(m!==void 0){ge.update(()=>{c.onUpdate(m),c.onComplete()});return}}return l.isSync?new $r(c):new l1(c)};function Ca(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ds(e,t,n,r){if(typeof t=="function"){const[i,o]=Ca(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]=Ca(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function Xt(e,t,n){const r=e.getProps();return ds(r,t,n!==void 0?n:r.custom,e)}const Ou=new Set(["width","height","top","left","right","bottom",...Tn]),Ta=30,b1=e=>!isNaN(parseFloat(e));class v1{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=Ne.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=Ne.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=b1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Qo(!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 Jo);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=Ne.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ta)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ta);return tu(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 kn(e,t){return new v1(e,t)}const fo=e=>Array.isArray(e);function w1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,kn(n))}function k1(e){return fo(e)?e[e.length-1]||0:e}function S1(e,t){const n=Xt(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const l=k1(o[s]);w1(e,s,l)}}const Pe=e=>!!(e&&e.getVelocity);function C1(e){return!!(Pe(e)&&e.add)}function ho(e,t){const n=e.getValue("willChange");if(C1(n))return n.add(t);if(!n&&Mt.WillChange){const r=new Mt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function fs(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const T1="framerAppearId",zu="data-"+fs(T1);function _u(e){return e.props[zu]}function j1({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nu(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:s,...l}=t;const u=e.getDefaultTransition();o=o?Pu(o,u):u;const d=o==null?void 0:o.reduceMotion;r&&(o=r);const c=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const m in l){const p=e.getValue(m,e.latestValues[m]??null),g=l[m];if(g===void 0||f&&j1(f,m))continue;const x={delay:n,...cs(o||{},m)},y=p.get();if(y!==void 0&&!p.isAnimating()&&!Array.isArray(g)&&g===y&&!x.velocity){ge.update(()=>p.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const F=_u(e);if(F){const B=window.MotionHandoffAnimation(F,m,ge);B!==null&&(x.startTime=B,v=!0)}}ho(e,m);const j=d??e.shouldReduceMotion;p.start(us(m,p,g,j&&Ou.has(m)?{type:!1}:x,e,v));const k=p.animation;k&&c.push(k)}if(s){const m=()=>ge.update(()=>{s&&S1(e,s)});c.length?Promise.all(c).then(m):m()}return c}function po(e,t,n={}){var u;const r=Xt(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(Nu(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:m}=i;return E1(e,t,d,c,f,m,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 E1(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(po(u,t,{...s,delay:n+(typeof r=="function"?0:r)+Ru(e.variantChildren,u,r,i,o)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function A1(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>po(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=po(e,t,n);else{const i=typeof t=="function"?Xt(e,t,n.custom):t;r=Promise.all(Nu(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const F1={test:e=>e==="auto",parse:e=>e},Vu=e=>t=>t.test(e),Hu=[Cn,X,vt,It,em,Qp,F1],ja=e=>Hu.find(Vu(e));function B1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Qc(e):!0}const L1=new Set(["brightness","contrast","saturate","opacity"]);function I1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(rs)||[];if(!r)return e;const i=n.replace(r,"");let o=L1.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const D1=/\b([a-z-]*)\(.*?\)/gu,mo={...ct,getAnimatableNone:e=>{const t=e.match(D1);return t?t.map(I1).join(" "):e}},go={...ct,getAnimatableNone:e=>{const t=ct.parse(e);return ct.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Ea={...Cn,transform:Math.round},R1={rotate:It,rotateX:It,rotateY:It,rotateZ:It,scale:br,scaleX:br,scaleY:br,scaleZ:br,skew:It,skewX:It,skewY:It,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:Qn,originX:ha,originY:ha,originZ:X},hs={borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,inset:X,insetBlock:X,insetBlockStart:X,insetBlockEnd:X,insetInline:X,insetInlineStart:X,insetInlineEnd:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,paddingBlock:X,paddingBlockStart:X,paddingBlockEnd:X,paddingInline:X,paddingInlineStart:X,paddingInlineEnd:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,marginBlock:X,marginBlockStart:X,marginBlockEnd:X,marginInline:X,marginInlineStart:X,marginInlineEnd:X,fontSize:X,backgroundPositionX:X,backgroundPositionY:X,...R1,zIndex:Ea,fillOpacity:Qn,strokeOpacity:Qn,numOctaves:Ea},M1={...hs,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:mo,WebkitFilter:mo,mask:go,WebkitMask:go},Wu=e=>M1[e],P1=new Set([mo,go]);function Uu(e,t){let n=Wu(e);return P1.has(n)||(n=ct),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const O1=new Set(["auto","none","0"]);function z1(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!O1.has(o)&&wn(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Uu(n,i)}class _1 extends ls{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 f=t[c];if(typeof f=="string"&&(f=f.trim(),ns(f))){const m=Mu(f,n.current);m!==void 0&&(t[c]=m),c===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Ou.has(r)||t.length!==2)return;const[i,o]=t,s=ja(i),l=ja(o),u=fa(i),d=fa(o);if(u!==d&&Rt[r]){this.needsMeasurement=!0;return}if(s!==l)if(wa(s)&&wa(l))for(let c=0;c<t.length;c++){const f=t[c];typeof f=="string"&&(t[c]=parseFloat(f))}else Rt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||B1(t[i]))&&r.push(i);r.length&&z1(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=Rt[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]=Rt[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 $u(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 Gu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Lr(e){return Jc(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:ps}=fu(queueMicrotask,!1),lt={x:!1,y:!1};function Yu(){return lt.x||lt.y}function N1(e){return e==="x"||e==="y"?lt[e]?null:(lt[e]=!0,()=>{lt[e]=!1}):lt.x||lt.y?null:(lt.x=lt.y=!0,()=>{lt.x=lt.y=!1})}function Ku(e,t){const n=$u(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function V1(e){return!(e.pointerType==="touch"||Yu())}function H1(e,t,n={}){const[r,i,o]=Ku(e,n);return r.forEach(s=>{let l=!1,u=!1,d;const c=()=>{s.removeEventListener("pointerleave",g)},f=y=>{d&&(d(y),d=void 0),c()},m=y=>{l=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),u&&(u=!1,f(y))},p=()=>{l=!0,window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",m,i)},g=y=>{if(y.pointerType!=="touch"){if(l){u=!0;return}f(y)}},x=y=>{if(!V1(y))return;u=!1;const v=t(s,y);typeof v=="function"&&(d=v,s.addEventListener("pointerleave",g,i))};s.addEventListener("pointerenter",x,i),s.addEventListener("pointerdown",p,i)}),o}const qu=(e,t)=>t?e===t?!0:qu(e,t.parentElement):!1,ms=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,W1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function U1(e){return W1.has(e.tagName)||e.isContentEditable===!0}const $1=new Set(["INPUT","SELECT","TEXTAREA"]);function G1(e){return $1.has(e.tagName)||e.isContentEditable===!0}const Ir=new WeakSet;function Aa(e){return t=>{t.key==="Enter"&&e(t)}}function Si(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Y1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Aa(()=>{if(Ir.has(n))return;Si(n,"down");const i=Aa(()=>{Si(n,"up")}),o=()=>Si(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 Fa(e){return ms(e)&&!Yu()}const Ba=new WeakSet;function K1(e,t,n={}){const[r,i,o]=Ku(e,n),s=l=>{const u=l.currentTarget;if(!Fa(l)||Ba.has(l))return;Ir.add(u),n.stopPropagation&&Ba.add(l);const d=t(u,l),c=(p,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),Ir.has(u)&&Ir.delete(u),Fa(p)&&typeof d=="function"&&d(p,{success:g})},f=p=>{c(p,u===window||u===document||n.useGlobalTarget||qu(u,p.target))},m=p=>{c(p,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",s,i),Lr(l)&&(l.addEventListener("focus",d=>Y1(d,i)),!U1(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function gs(e){return Jc(e)&&"ownerSVGElement"in e}const Dr=new WeakMap;let Dt;const Xu=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:gs(r)&&"getBBox"in r?r.getBBox()[t]:r[n],q1=Xu("inline","width","offsetWidth"),X1=Xu("block","height","offsetHeight");function Z1({target:e,borderBoxSize:t}){var n;(n=Dr.get(e))==null||n.forEach(r=>{r(e,{get width(){return q1(e,t)},get height(){return X1(e,t)}})})}function J1(e){e.forEach(Z1)}function Q1(){typeof ResizeObserver>"u"||(Dt=new ResizeObserver(J1))}function eg(e,t){Dt||Q1();const n=$u(e);return n.forEach(r=>{let i=Dr.get(r);i||(i=new Set,Dr.set(r,i)),i.add(t),Dt==null||Dt.observe(r)}),()=>{n.forEach(r=>{const i=Dr.get(r);i==null||i.delete(t),i!=null&&i.size||Dt==null||Dt.unobserve(r)})}}const Rr=new Set;let yn;function tg(){yn=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Rr.forEach(t=>t(e))},window.addEventListener("resize",yn)}function ng(e){return Rr.add(e),yn||tg(),()=>{Rr.delete(e),!Rr.size&&typeof yn=="function"&&(window.removeEventListener("resize",yn),yn=void 0)}}function La(e,t){return typeof e=="function"?ng(e):eg(e,t)}function rg(e){return gs(e)&&e.tagName==="svg"}const ig=[...Hu,Ce,ct],og=e=>ig.find(Vu(e)),Ia=()=>({translate:0,scale:1,origin:0,originPoint:0}),bn=()=>({x:Ia(),y:Ia()}),Da=()=>({min:0,max:0}),Fe=()=>({x:Da(),y:Da()}),sg=new WeakMap;function ti(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function er(e){return typeof e=="string"||Array.isArray(e)}const xs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ys=["initial",...xs];function ni(e){return ti(e.animate)||ys.some(t=>er(e[t]))}function Zu(e){return!!(ni(e)||e.variants)}function ag(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Pe(i))e.addValue(r,i);else if(Pe(o))e.addValue(r,kn(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,kn(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const xo={current:null},Ju={current:!1},lg=typeof window<"u";function cg(){if(Ju.current=!0,!!lg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xo.current=e.matches;e.addEventListener("change",t),t()}else xo.current=!1}const Ra=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Gr={};function Qu(e){Gr=e}function ug(){return Gr}class dg{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=ls,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 p=Ne.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,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=ni(n),this.isVariantNode=Zu(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in m){const g=m[p];d[p]!==void 0&&Pe(g)&&g.set(d[p])}}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,sg.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:(Ju.current||cg(),this.shouldReduceMotion=xo.current),process.env.NODE_ENV!=="production"&&Qo(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(),Pt(this.notifyUpdate),Pt(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&&Du.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:l,times:u,ease:d,duration:c}=n.accelerate,f=new Lu({element:this.current,name:t,keyframes:l,times:u,ease:d,duration:Ye(c)}),m=s(f);this.valueSubscriptions.set(t,()=>{m(),f.cancel()});return}const r=jn.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 Gr){const n=Gr[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):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<Ra.length;r++){const i=Ra[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=ag(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=kn(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"&&(Zc(r)||Qc(r))?r=parseFloat(r):!og(r)&&ct.test(n)&&(r=Uu(t,n)),this.setBaseTarget(t,Pe(r)?r.get():r)),Pe(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=ds(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&&!Pe(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 Jo),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ps.render(this.render)}}class ed extends dg{constructor(){super(...arguments),this.KeyframeResolver=_1}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;Pe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ot{constructor(t){this.isMounted=!1,this.node=t}update(){}}function td({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function fg({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function hg(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 Ci(e){return e===void 0||e===1}function yo({scale:e,scaleX:t,scaleY:n}){return!Ci(e)||!Ci(t)||!Ci(n)}function $t(e){return yo(e)||nd(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nd(e){return Ma(e.x)||Ma(e.y)}function Ma(e){return e&&e!=="0%"}function Yr(e,t,n){const r=e-n,i=t*r;return n+i}function Pa(e,t,n,r,i){return i!==void 0&&(e=Yr(e,i,r)),Yr(e,n,r)+t}function bo(e,t=0,n=1,r,i){e.min=Pa(e.min,t,n,r,i),e.max=Pa(e.max,t,n,r,i)}function rd(e,{x:t,y:n}){bo(e.x,t.translate,t.scale,t.originPoint),bo(e.y,n.translate,n.scale,n.originPoint)}const Oa=.999999999999,za=1.0000000000001;function pg(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&&(yt(e.x,-o.scroll.offset.x),yt(e.y,-o.scroll.offset.y)),s&&(t.x*=s.x.scale,t.y*=s.y.scale,rd(e,s)),r&&$t(o.latestValues)&&Mr(e,o.latestValues,(l=o.layout)==null?void 0:l.layoutBox))}t.x<za&&t.x>Oa&&(t.x=1),t.y<za&&t.y>Oa&&(t.y=1)}function yt(e,t){e.min+=t,e.max+=t}function _a(e,t,n,r,i=.5){const o=ye(e.min,e.max,i);bo(e,t,n,o,r)}function Na(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Mr(e,t,n){const r=n??e;_a(e.x,Na(t.x,r.x),t.scaleX,t.scale,t.originX),_a(e.y,Na(t.y,r.y),t.scaleY,t.scale,t.originY)}function id(e,t){return td(hg(e.getBoundingClientRect(),t))}function mg(e,t,n){const r=id(e,n),{scroll:i}=t;return i&&(yt(r.x,i.offset.x),yt(r.y,i.offset.y)),r}const gg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xg=Tn.length;function yg(e,t,n){let r="",i=!0;for(let o=0;o<xg;o++){const s=Tn[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=Gu(l,hs[s]);if(!u){i=!1;const c=gg[s]||s;r+=`${c}(${d}) `}n&&(t[s]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function bs(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(jn.has(u)){s=!0;continue}else if(pu(u)){i[u]=d;continue}else{const c=Gu(d,hs[u]);u.startsWith("origin")?(l=!0,o[u]=c):r[u]=c}}if(t.transform||(s||n?r.transform=yg(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 od(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 Va(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Mn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(X.test(e))e=parseFloat(e);else return e;const n=Va(e,t.target.x),r=Va(e,t.target.y);return`${n}% ${r}%`}},bg={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ct.parse(e);if(i.length>5)return r;const o=ct.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)}},vo={borderRadius:{...Mn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Mn,borderTopRightRadius:Mn,borderBottomLeftRadius:Mn,borderBottomRightRadius:Mn,boxShadow:bg};function sd(e,{layout:t,layoutId:n}){return jn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!vo[e]||e==="opacity")}function vs(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)(Pe(r[l])||i&&Pe(i[l])||sd(l,e)||((s=n==null?void 0:n.getValue(l))==null?void 0:s.liveStyle)!==void 0)&&(o[l]=r[l]);return o}function vg(e){return window.getComputedStyle(e)}class wg extends ed{constructor(){super(...arguments),this.type="html",this.renderInstance=od}readValueFromInstance(t,n){var r;if(jn.has(n))return(r=this.projection)!=null&&r.isProjecting?oo(n):Nm(t,n);{const i=vg(t),o=(pu(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return id(t,n)}build(t,n,r){bs(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return vs(t,n,r)}}const kg={offset:"stroke-dashoffset",array:"stroke-dasharray"},Sg={offset:"strokeDashoffset",array:"strokeDasharray"};function Cg(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?kg:Sg;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const Tg=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ad(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...l},u,d,c){if(bs(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete f.transformBox);for(const p of Tg)f[p]!==void 0&&(m[p]=f[p],delete f[p]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&Cg(f,i,o,s,!1)}const ld=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"]),cd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function jg(e,t,n,r){od(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ld.has(i)?i:fs(i),t.attrs[i])}function ud(e,t,n){const r=vs(e,t,n);for(const i in e)if(Pe(e[i])||Pe(t[i])){const o=Tn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}class Eg extends ed{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Fe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(jn.has(n)){const r=Wu(n);return r&&r.default||0}return n=ld.has(n)?n:fs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ud(t,n,r)}build(t,n,r){ad(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){jg(t,n,r,i)}mount(t){this.isSVGTag=cd(t.tagName),super.mount(t)}}const Ag=ys.length;function dd(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?dd(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Ag;n++){const r=ys[n],i=e.props[r];(er(i)||i===!1)&&(t[r]=i)}return t}function fd(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 Fg=[...xs].reverse(),Bg=xs.length;function Lg(e){return t=>Promise.all(t.map(({animation:n,options:r})=>A1(e,n,r)))}function Ig(e){let t=Lg(e),n=Ha(),r=!0,i=!1;const o=d=>(c,f)=>{var p;const m=Xt(e,f,d==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(m){const{transition:g,transitionEnd:x,...y}=m;c={...c,...y,...x}}return c};function s(d){t=d(e)}function l(d){const{props:c}=e,f=dd(e.parent)||{},m=[],p=new Set;let g={},x=1/0;for(let v=0;v<Bg;v++){const j=Fg[v],k=n[j],F=c[j]!==void 0?c[j]:f[j],B=er(F),T=j===d?k.isActive:null;T===!1&&(x=v);let O=F===f[j]&&F!==c[j]&&B;if(O&&(r||i)&&e.manuallyAnimateOnMount&&(O=!1),k.protectedKeys={...g},!k.isActive&&T===null||!F&&!k.prevProp||ti(F)||typeof F=="boolean")continue;if(j==="exit"&&k.isActive&&T!==!0){k.prevResolvedValues&&(g={...g,...k.prevResolvedValues});continue}const E=Dg(k.prevProp,F);let A=E||j===d&&k.isActive&&!O&&B||v>x&&B,L=!1;const M=Array.isArray(F)?F:[F];let R=M.reduce(o(j),{});T===!1&&(R={});const{prevResolvedValues:V={}}=k,_={...V,...R},I=W=>{A=!0,p.has(W)&&(L=!0,p.delete(W)),k.needsAnimating[W]=!0;const G=e.getValue(W);G&&(G.liveStyle=!1)};for(const W in _){const G=R[W],b=V[W];if(g.hasOwnProperty(W))continue;let K=!1;fo(G)&&fo(b)?K=!fd(G,b):K=G!==b,K?G!=null?I(W):p.add(W):G!==void 0&&p.has(W)?I(W):k.protectedKeys[W]=!0}k.prevProp=F,k.prevResolvedValues=R,k.isActive&&(g={...g,...R}),(r||i)&&e.blockInitialAnimation&&(A=!1);const D=O&&E;A&&(!D||L)&&m.push(...M.map(W=>{const G={type:j};if(typeof W=="string"&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:b}=e,K=Xt(b,W);if(b.enteringChildren&&K){const{delayChildren:te}=K.transition||{};G.delay=Ru(b.enteringChildren,e,te)}}return{animation:W,options:G}}))}if(p.size){const v={};if(typeof c.initial!="boolean"){const j=Xt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);j&&j.transition&&(v.transition=j.transition)}p.forEach(j=>{const k=e.getBaseTarget(j),F=e.getValue(j);F&&(F.liveStyle=!0),v[j]=k??null}),m.push({animation:v})}let y=!!m.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,i=!1,y?t(m):Promise.resolve()}function u(d,c){var m;if(n[d].isActive===c)return Promise.resolve();(m=e.variantChildren)==null||m.forEach(p=>{var g;return(g=p.animationState)==null?void 0:g.setActive(d,c)}),n[d].isActive=c;const f=l(d);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:l,setActive:u,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Ha(),i=!0}}}function Dg(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fd(t,e):!1}function Ht(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ha(){return{animate:Ht(!0),whileInView:Ht(),whileHover:Ht(),whileTap:Ht(),whileDrag:Ht(),whileFocus:Ht(),exit:Ht()}}function wo(e,t){e.min=t.min,e.max=t.max}function at(e,t){wo(e.x,t.x),wo(e.y,t.y)}function Wa(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const hd=1e-4,Rg=1-hd,Mg=1+hd,pd=.01,Pg=0-pd,Og=0+pd;function Ve(e){return e.max-e.min}function zg(e,t,n){return Math.abs(e-t)<=n}function Ua(e,t,n,r=.5){e.origin=r,e.originPoint=ye(t.min,t.max,e.origin),e.scale=Ve(n)/Ve(t),e.translate=ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Rg&&e.scale<=Mg||isNaN(e.scale))&&(e.scale=1),(e.translate>=Pg&&e.translate<=Og||isNaN(e.translate))&&(e.translate=0)}function Yn(e,t,n,r){Ua(e.x,t.x,n.x,r?r.originX:void 0),Ua(e.y,t.y,n.y,r?r.originY:void 0)}function $a(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+Ve(t)}function _g(e,t,n,r){$a(e.x,t.x,n.x,r==null?void 0:r.x),$a(e.y,t.y,n.y,r==null?void 0:r.y)}function Ga(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+Ve(t)}function Kr(e,t,n,r){Ga(e.x,t.x,n.x,r==null?void 0:r.x),Ga(e.y,t.y,n.y,r==null?void 0:r.y)}function Ya(e,t,n,r,i){return e-=t,e=Yr(e,1/n,r),i!==void 0&&(e=Yr(e,1/i,r)),e}function Ng(e,t=0,n=1,r=.5,i,o=e,s=e){if(vt.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=Ya(e.min,t,n,l,i),e.max=Ya(e.max,t,n,l,i)}function Ka(e,t,[n,r,i],o,s){Ng(e,t[n],t[r],t[i],t.scale,o,s)}const Vg=["x","scaleX","originX"],Hg=["y","scaleY","originY"];function qa(e,t,n,r){Ka(e.x,t,Vg,n?n.x:void 0,r?r.x:void 0),Ka(e.y,t,Hg,n?n.y:void 0,r?r.y:void 0)}function Xa(e){return e.translate===0&&e.scale===1}function md(e){return Xa(e.x)&&Xa(e.y)}function Za(e,t){return e.min===t.min&&e.max===t.max}function Wg(e,t){return Za(e.x,t.x)&&Za(e.y,t.y)}function Ja(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gd(e,t){return Ja(e.x,t.x)&&Ja(e.y,t.y)}function Qa(e){return Ve(e.x)/Ve(e.y)}function el(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function gt(e){return[e("x"),e("y")]}function Ug(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:f,rotateY:m,skewX:p,skewY:g}=n;d&&(r=`perspective(${d}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),p&&(r+=`skewX(${p}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 xd=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],$g=xd.length,tl=e=>typeof e=="string"?parseFloat(e):e,nl=e=>typeof e=="number"||X.test(e);function Gg(e,t,n,r,i,o){i?(e.opacity=ye(0,n.opacity??1,Yg(r)),e.opacityExit=ye(t.opacity??1,0,Kg(r))):o&&(e.opacity=ye(t.opacity??1,n.opacity??1,r));for(let s=0;s<$g;s++){const l=xd[s];let u=rl(t,l),d=rl(n,l);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||nl(u)===nl(d)?(e[l]=Math.max(ye(tl(u),tl(d),r),0),(vt.test(d)||vt.test(u))&&(e[l]+="%")):e[l]=d}(t.rotate||n.rotate)&&(e.rotate=ye(t.rotate||0,n.rotate||0,r))}function rl(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Yg=yd(0,.5,lu),Kg=yd(.5,.95,nt);function yd(e,t,n){return r=>r<e?0:r>t?1:n(Jn(e,t,r))}function qg(e,t,n){const r=Pe(e)?e:kn(e);return r.start(us("",r,t,n)),r.animation}function tr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Xg=(e,t)=>e.depth-t.depth;class Zg{constructor(){this.children=[],this.isDirty=!1}add(t){Zo(this.children,t),this.isDirty=!0}remove(t){Vr(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Xg),this.isDirty=!1,this.children.forEach(t)}}function Jg(e,t){const n=Ne.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Pt(r),e(o-t))};return ge.setup(r,!0),()=>Pt(r)}function Pr(e){return Pe(e)?e.get():e}class Qg{constructor(){this.members=[]}add(t){Zo(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&&(Vr(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Vr(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 Or={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ti=["","X","Y","Z"],ex=1e3;let tx=0;function ji(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function bd(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=_u(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&&bd(r)}function vd({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},l=t==null?void 0:t()){this.id=tx++,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(ix),this.nodes.forEach(ux),this.nodes.forEach(dx),this.nodes.forEach(ox)},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 Zg)}addEventListener(s,l){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Jo),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=gs(s)&&!rg(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,f=0;const m=()=>this.root.updateBlockedByResize=!1;ge.read(()=>{f=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,c&&c(),c=Jg(m,250),Or.hasAnimatedSinceResize&&(Or.hasAnimatedSinceResize=!1,this.nodes.forEach(sl)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||gx,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=d.getProps(),v=!this.targetLayout||!gd(this.targetLayout,p),j=!f&&m;if(this.options.layoutRoot||this.resumeFrom||j||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={...cs(g,"layout"),onPlay:x,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(c,j)}else f||sl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(),Pt(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(fx),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&&bd(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(ax),this.nodes.forEach(il);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ol);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(lx),this.nodes.forEach(cx),this.nodes.forEach(nx),this.nodes.forEach(rx)):this.nodes.forEach(ol),this.clearAllSnapshots();const l=Ne.now();Me.delta=wt(0,1e3/60,l-Me.timestamp),Me.timestamp=l,Me.isProcessing=!0,xi.update.process(Me),xi.preRender.process(Me),xi.render.process(Me),Me.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ps.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sx),this.sharedNodes.forEach(hx)}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&&!Ve(this.snapshot.measuredBox.x)&&!Ve(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=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,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&&!md(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,c=d!==this.prevTransformTemplateValue;s&&this.instance&&(l||$t(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)),xx(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:s}=this.options;if(!s)return Fe();const l=s.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(yx))){const{scroll:c}=this.root;c&&(yt(l.x,c.offset.x),yt(l.y,c.offset.y))}return l}removeElementScroll(s){var u;const l=Fe();if(at(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:f,options:m}=c;c!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&at(l,s),yt(l.x,f.offset.x),yt(l.y,f.offset.y))}return l}applyTransform(s,l=!1,u){var c,f;const d=u||Fe();at(d,s);for(let m=0;m<this.path.length;m++){const p=this.path[m];!l&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(yt(d.x,-p.scroll.offset.x),yt(d.y,-p.scroll.offset.y)),$t(p.latestValues)&&Mr(d,p.latestValues,(c=p.layout)==null?void 0:c.layoutBox)}return $t(this.latestValues)&&Mr(d,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),d}removeTransform(s){var u;const l=Fe();at(l,s);for(let d=0;d<this.path.length;d++){const c=this.path[d];if(!$t(c.latestValues))continue;let f;c.instance&&(yo(c.latestValues)&&c.updateSnapshot(),f=Fe(),at(f,c.measurePageBox())),qa(l,c.latestValues,(u=c.snapshot)==null?void 0:u.layoutBox,f)}return $t(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!==Me.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var p;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||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!this.layout||!(c||f))return;this.resolvedRelativeTargetAt=Me.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.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(),_g(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):at(this.target,this.layout.layoutBox),rd(this.target,this.targetDelta)):at(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||yo(this.parent.latestValues)||nd(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=Fe(),this.relativeTargetOrigin=Fe(),Kr(this.relativeTargetOrigin,l,u,this.options.layoutAnchor||void 0),at(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===Me.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;at(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;pg(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=Fe());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Wa(this.prevProjectionDelta.x,this.projectionDelta.x),Wa(this.prevProjectionDelta.y,this.projectionDelta.y)),Yn(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!el(this.projectionDelta.x,this.prevProjectionDelta.x)||!el(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}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=bn(),this.projectionDelta=bn(),this.projectionDeltaWithTransform=bn()}setAnimationOrigin(s,l=!1){const u=this.snapshot,d=u?u.latestValues:{},c={...this.latestValues},f=bn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=Fe(),p=u?u.source:void 0,g=this.layout?this.layout.source:void 0,x=p!==g,y=this.getStack(),v=!y||y.members.length<=1,j=!!(x&&!v&&this.options.crossfade===!0&&!this.path.some(mx));this.animationProgress=0;let k;this.mixTargetDelta=F=>{const B=F/1e3;al(f.x,s.x,B),al(f.y,s.y,B),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),px(this.relativeTarget,this.relativeTargetOrigin,m,B),k&&Wg(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Fe()),at(k,this.relativeTarget)),x&&(this.animationValues=c,Gg(c,d,this.latestValues,B,j,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},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&&(Pt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ge.update(()=>{Or.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=kn(0)),this.motionValue.jump(0,!1),this.currentAnimation=qg(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(ex),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&&wd(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||Fe();const f=Ve(this.layout.layoutBox.x);u.x.min=s.target.x.min,u.x.max=u.x.min+f;const m=Ve(this.layout.layoutBox.y);u.y.min=s.target.y.min,u.y.max=u.y.min+m}at(l,u),Mr(l,c),Yn(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Qg),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&&ji("z",s,d,this.animationValues);for(let c=0;c<Ti.length;c++)ji(`rotate${Ti[c]}`,s,d,this.animationValues),ji(`skew${Ti[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=Pr(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=Pr(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!$t(this.latestValues)&&(s.transform=u?u({},""):"none",this.hasProjected=!1);return}s.visibility="";const c=d.animationValues||d.latestValues;this.applyTransformsToTarget();let f=Ug(this.projectionDeltaWithTransform,this.treeScale,c);u&&(f=u(c,f)),s.transform=f;const{x:m,y:p}=this.projectionDelta;s.transformOrigin=`${m.origin*100}% ${p.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 vo){if(c[g]===void 0)continue;const{correct:x,applyTo:y,isCSSVariable:v}=vo[g],j=f==="none"?c[g]:x(c[g],d);if(y){const k=y.length;for(let F=0;F<k;F++)s[y[F]]=j}else v?this.options.visualElement.renderState.vars[g]=j:s[g]=j}this.options.layoutId&&(s.pointerEvents=d===this?Pr(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(il),this.root.sharedNodes.clear()}}}function nx(e){e.updateLayout()}function rx(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")gt(f=>{const m=s?t.measuredBox[f]:t.layoutBox[f],p=Ve(m);m.min=r[f].min,m.max=m.min+p});else if(o==="x"||o==="y"){const f=o==="x"?"y":"x";wo(s?t.measuredBox[f]:t.layoutBox[f],r[f])}else wd(o,t.layoutBox,r)&>(f=>{const m=s?t.measuredBox[f]:t.layoutBox[f],p=Ve(r[f]);m.max=m.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const l=bn();Yn(l,r,t.layoutBox);const u=bn();s?Yn(u,e.applyTransform(i,!0),t.measuredBox):Yn(u,r,t.layoutBox);const d=!md(l);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:p}=f;if(m&&p){const g=e.options.layoutAnchor||void 0,x=Fe();Kr(x,t.layoutBox,m.layoutBox,g);const y=Fe();Kr(y,r,p.layoutBox,g),gd(x,y)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=f)}}}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 ix(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 ox(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function sx(e){e.clearSnapshot()}function il(e){e.clearMeasurements()}function ax(e){e.isLayoutDirty=!0,e.updateLayout()}function ol(e){e.isLayoutDirty=!1}function lx(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function cx(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function sl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ux(e){e.resolveTargetDelta()}function dx(e){e.calcProjection()}function fx(e){e.resetSkewAndRotation()}function hx(e){e.removeLeadSnapshot()}function al(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 ll(e,t,n,r){e.min=ye(t.min,n.min,r),e.max=ye(t.max,n.max,r)}function px(e,t,n,r){ll(e.x,t.x,n.x,r),ll(e.y,t.y,n.y,r)}function mx(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const gx={duration:.45,ease:[.4,0,.1,1]},cl=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ul=cl("applewebkit/")&&!cl("chrome/")?Math.round:nt;function dl(e){e.min=ul(e.min),e.max=ul(e.max)}function xx(e){dl(e.x),dl(e.y)}function wd(e,t,n){return e==="position"||e==="preserve-aspect"&&!zg(Qa(t),Qa(n),.2)}function yx(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const bx=vd({attachResizeListener:(e,t)=>tr(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}),Ei={current:void 0},kd=vd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ei.current){const e=new bx({});e.mount(window),e.setOptions({layoutScroll:!0}),Ei.current=e}return Ei.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ws=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function fl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vx(...e){return t=>{let n=!1;const r=e.map(i=>{const o=fl(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():fl(e[i],null)}}}}function wx(...e){return be.useCallback(vx(...e),e)}class kx extends be.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Lr(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Lr(r)&&r.offsetWidth||0,o=Lr(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 Sx({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){var m;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(ws),c=((m=e.props)==null?void 0:m.ref)??(e==null?void 0:e.ref),f=wx(l,c);return S.useInsertionEffect(()=>{const{width:p,height:g,top:x,left:y,right:v,bottom:j}=u.current;if(t||o===!1||!l.current||!p||!g)return;const k=n==="left"?`left: ${y}`:`right: ${v}`,F=r==="bottom"?`bottom: ${j}`:`top: ${x}`;l.current.dataset.motionPopId=s;const B=document.createElement("style");d&&(B.nonce=d);const T=i??document.head;return T.appendChild(B),B.sheet&&B.sheet.insertRule(`
|
|
313
339
|
[data-motion-pop-id="${s}"] {
|
|
314
340
|
position: absolute !important;
|
|
315
|
-
width: ${
|
|
341
|
+
width: ${p}px !important;
|
|
316
342
|
height: ${g}px !important;
|
|
317
343
|
${k}px !important;
|
|
318
|
-
${
|
|
344
|
+
${F}px !important;
|
|
319
345
|
}
|
|
320
|
-
`),()=>{var M;(M=l.current)==null||M.removeAttribute("data-motion-pop-id"),w.contains(A)&&w.removeChild(A)}},[t]),a.jsx(hx,{isPresent:t,childRef:l,sizeRef:c,pop:o,children:o===!1?e:ge.cloneElement(e,{ref:f})})}const mx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:l,anchorY:c,root:d})=>{const u=$o(gx),f=T.useId();let p=!0,m=T.useMemo(()=>(p=!1,{id:f,initial:t,isPresent:n,custom:i,onExitComplete:g=>{u.set(g,!0);for(const x of u.values())if(!x)return;r&&r()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,r]);return o&&p&&(m={...m}),T.useMemo(()=>{u.forEach((g,x)=>u.set(x,!1))},[n]),ge.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=a.jsx(px,{pop:s==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:d,children:e}),a.jsx(qr.Provider,{value:m,children:e})};function gx(){return new Map}function yd(e=!0){const t=T.useContext(qr);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=T.useId();T.useEffect(()=>{if(e)return i(o)},[e]);const s=T.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}const gr=e=>e.key||"";function ll(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const xo=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:l="left",anchorY:c="top",root:d})=>{const[u,f]=yd(s),p=T.useMemo(()=>ll(e),[e]),m=s&&!u?[]:p.map(gr),g=T.useRef(!0),x=T.useRef(p),y=$o(()=>new Map),b=T.useRef(new Set),[j,k]=T.useState(p),[B,A]=T.useState(p);$c(()=>{g.current=!1,x.current=p;for(let F=0;F<B.length;F++){const E=gr(B[F]);m.includes(E)?(y.delete(E),b.current.delete(E)):y.get(E)!==!0&&y.set(E,!1)}},[B,m.length,m.join("-")]);const w=[];if(p!==j){let F=[...p];for(let E=0;E<B.length;E++){const L=B[E],D=gr(L);m.includes(D)||(F.splice(E,0,L),w.push(L))}return o==="wait"&&w.length&&(F=w),A(ll(F)),k(p),null}process.env.NODE_ENV!=="production"&&o==="wait"&&B.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:M}=T.useContext(Uo);return a.jsx(a.Fragment,{children:B.map(F=>{const E=gr(F),L=s&&!u?!1:p===B||m.includes(E),D=()=>{if(b.current.has(E))return;if(y.has(E))b.current.add(E),y.set(E,!0);else return;let P=!0;y.forEach(V=>{V||(P=!1)}),P&&(M==null||M(),A(x.current),s&&(f==null||f()),r&&r())};return a.jsx(mx,{isPresent:L,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:d,onExitComplete:L?void 0:D,anchorX:l,anchorY:c,children:F},E)})})},bd=T.createContext({strict:!1}),cl={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 ul=!1;function xx(){if(ul)return;const e={};for(const t in cl)e[t]={isEnabled:n=>cl[t].some(r=>!!n[r])};Ku(e),ul=!0}function vd(){return xx(),tg()}function yx(e){const t=vd();for(const n in e)t[n]={...t[n],...e[n]};Ku(t)}const bx=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 $r(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||bx.has(e)}let wd=e=>!$r(e);function vx(e){typeof e=="function"&&(wd=t=>t.startsWith("on")?!$r(t):e(t))}try{vx(require("@emotion/is-prop-valid").default)}catch{}function wx(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||De(e[i])||(wd(i)||n===!0&&$r(i)||!t&&!$r(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Qr=T.createContext({});function kx(e,t){if(Jr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Zn(n)?n:void 0,animate:Zn(r)?r:void 0}}return e.inherit!==!1?t:{}}function Sx(e){const{initial:t,animate:n}=kx(e,T.useContext(Qr));return T.useMemo(()=>({initial:t,animate:n}),[dl(t),dl(n)])}function dl(e){return Array.isArray(e)?e.join(" "):e}const xs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function kd(e,t,n){for(const r in t)!De(t[r])&&!td(r,n)&&(e[r]=t[r])}function Cx({transformTemplate:e},t){return T.useMemo(()=>{const n=xs();return ps(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Tx(e,t){const n=e.style||{},r={};return kd(r,n,e),Object.assign(r,Cx(e,t)),r}function jx(e,t){const n={},r=Tx(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 Sd=()=>({...xs(),attrs:{}});function Ax(e,t,n,r){const i=T.useMemo(()=>{const o=Sd();return nd(o,t,id(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};kd(o,e.style,e),i.style={...o,...i.style}}return i}const Ex=["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 ys(e){return typeof e!="string"||e.includes("-")?!1:!!(Ex.indexOf(e)>-1||/[A-Z]/u.test(e))}function Fx(e,t,n,{latestValues:r},i,o=!1,s){const c=(s??ys(e)?Ax:jx)(t,r,i,e),d=wx(t,typeof e=="string",o),u=e!==T.Fragment?{...d,...c,ref:n}:{},{children:f}=t,p=T.useMemo(()=>De(f)?f.get():f,[f]);return T.createElement(e,{...u,children:p})}function Bx({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Lx(n,r,i,e),renderState:t()}}function Lx(e,t,n,r){const i={},o=r(e,{});for(const p in o)i[p]=Ir(o[p]);let{initial:s,animate:l}=e;const c=Jr(e),d=Gu(e);t&&d&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),l===void 0&&(l=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const f=u?l:s;if(f&&typeof f!="boolean"&&!Zr(f)){const p=Array.isArray(f)?f:[f];for(let m=0;m<p.length;m++){const g=ss(e,p[m]);if(g){const{transitionEnd:x,transition:y,...b}=g;for(const j in b){let k=b[j];if(Array.isArray(k)){const B=u?k.length-1:0;k=k[B]}k!==null&&(i[j]=k)}for(const j in x)i[j]=x[j]}}}return i}const Cd=e=>(t,n)=>{const r=T.useContext(Qr),i=T.useContext(qr),o=()=>Bx(e,t,r,i);return n?o():$o(o)},Ix=Cd({scrapeMotionValuesFromProps:ms,createRenderState:xs}),Dx=Cd({scrapeMotionValuesFromProps:od,createRenderState:Sd}),Rx=Symbol.for("motionComponentSymbol");function Mx(e,t,n){const r=T.useRef(n);T.useInsertionEffect(()=>{r.current=n});const i=T.useRef(null);return T.useCallback(o=>{var l;o&&((l=e.onMount)==null||l.call(e,o));const s=r.current;if(typeof s=="function")if(o){const c=s(o);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):s(o);else s&&(s.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const Td=T.createContext({});function hn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Px(e,t,n,r,i,o){var k,B;const{visualElement:s}=T.useContext(Qr),l=T.useContext(bd),c=T.useContext(qr),d=T.useContext(gs),u=d.reducedMotion,f=d.skipAnimations,p=T.useRef(null),m=T.useRef(!1);r=r||l.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:o}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const g=p.current,x=T.useContext(Td);g&&!g.projection&&i&&(g.type==="html"||g.type==="svg")&&Ox(p.current,n,i,x);const y=T.useRef(!1);T.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const b=n[Du],j=T.useRef(!!b&&typeof window<"u"&&!((k=window.MotionHandoffIsComplete)!=null&&k.call(window,b))&&((B=window.MotionHasOptimisedAnimation)==null?void 0:B.call(window,b)));return $c(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),j.current&&g.animationState&&g.animationState.animateChanges())}),T.useEffect(()=>{g&&(!j.current&&g.animationState&&g.animationState.animateChanges(),j.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)==null||A.call(window,b)}),j.current=!1),g.enteringChildren=void 0)}),g}function Ox(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:l,layoutScroll:c,layoutRoot:d,layoutAnchor:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:jd(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||l&&hn(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:c,layoutRoot:d,layoutAnchor:u})}function jd(e){if(e)return e.options.allowProjection!==!1?e.projection:jd(e.parent)}function Ci(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&yx(r);const o=n?n==="svg":ys(e),s=o?Dx:Ix;function l(d,u){let f;const p={...T.useContext(gs),...d,layoutId:zx(d)},{isStatic:m}=p,g=Sx(d),x=s(d,m);if(!m&&typeof window<"u"){_x(p,r);const y=Nx(p);f=y.MeasureLayout,g.visualElement=Px(e,x,p,i,y.ProjectionNode,o)}return a.jsxs(Qr.Provider,{value:g,children:[f&&g.visualElement?a.jsx(f,{visualElement:g.visualElement,...p}):null,Fx(e,d,Mx(x,g.visualElement,u),x,m,t,o)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=T.forwardRef(l);return c[Rx]=e,c}function zx({layoutId:e}){const t=T.useContext(Uo).id;return t&&e!==void 0?t+"-"+e:e}function _x(e,t){const n=T.useContext(bd).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?kn(!1,r,"lazy-strict-mode"):jt(!1,r,"lazy-strict-mode")}}function Nx(e){const t=vd(),{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 Vx(e,t){if(typeof Proxy>"u")return Ci;const n=new Map,r=(o,s)=>Ci(o,s,e,t),i=(o,s)=>(process.env.NODE_ENV!=="production"&&Ko(!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,Ci(s,void 0,e,t)),n.get(s))})}const Hx=(e,t)=>t.isSVG??ys(e)?new yg(t):new fg(t,{allowProjection:e!==T.Fragment});class Wx extends Ot{constructor(t){super(t),t.animationState||(t.animationState=Sg(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zr(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 Ux=0;class $x extends Ot{constructor(){super(...arguments),this.id=Ux++,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 c=qt(this.node,s,l);if(c){const{transition:d,transitionEnd:u,...f}=c;for(const p in f)(o=this.node.getValue(p))==null||o.jump(f[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 Gx={animation:{Feature:Wx},exit:{Feature:$x}};function or(e){return{point:{x:e.pageX,y:e.pageY}}}const Yx=e=>t=>us(t)&&e(t,or(t));function $n(e,t,n,r){return Jn(e,t,Yx(n),r)}const Ad=({current:e})=>e?e.ownerDocument.defaultView:null,fl=(e,t)=>Math.abs(e-t);function Kx(e,t){const n=fl(e.x,t.x),r=fl(e.y,t.y);return Math.sqrt(n**2+r**2)}const hl=new Set(["auto","scroll"]);class Ed{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=xr(this.lastRawMoveEventInfo,this.transformPagePoint));const m=Ti(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=Kx(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:y}=m,{timestamp:b}=Ie;this.history.push({...y,timestamp:b});const{onStart:j,onMove:k}=this.handlers;g||(j&&j(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=xr(g,this.transformPagePoint),fe.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 j=Ti(m.type==="pointercancel"?this.lastMoveEventInfo:xr(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,j),y&&y(m,j)},!us(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const c=or(t),d=xr(c,this.transformPagePoint),{point:u}=d,{timestamp:f}=Ie;this.history=[{...u,timestamp:f}];const{onSessionStart:p}=n;p&&p(t,Ti(d,this.history)),this.removeListeners=nr($n(this.contextWindow,"pointermove",this.handlePointerMove),$n(this.contextWindow,"pointerup",this.handlePointerUp),$n(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(hl.has(r.overflowX)||hl.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),fe.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Pt(this.updatePoint)}}function xr(e,t){return t?{point:t(e.point)}:e}function pl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ti({point:e},t){return{point:e,delta:pl(e,Fd(t)),offset:pl(e,qx(t)),velocity:Xx(t,.1)}}function qx(e){return e[0]}function Fd(e){return e[e.length-1]}function Xx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Fd(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ue(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Ue(t)*2&&(r=e[1]);const o=tt(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 Zx(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?pe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?pe(n,e,r.max):Math.min(e,n)),e}function ml(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 Jx(e,{top:t,left:n,bottom:r,right:i}){return{x:ml(e.x,n,i),y:ml(e.y,t,r)}}function gl(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 Qx(e,t){return{x:gl(e.x,t.x),y:gl(e.y,t.y)}}function e0(e,t){let n=.5;const r=_e(e),i=_e(t);return i>r?n=qn(t.min,t.max-r,e.min):r>i&&(n=qn(e.min,e.max-i,t.min)),vt(0,1,n)}function t0(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 yo=.35;function n0(e=yo){return e===!1?e=0:e===!0&&(e=yo),{x:xl(e,"left","right"),y:xl(e,"top","bottom")}}function xl(e,t,n){return{min:yl(e,t),max:yl(e,n)}}function yl(e,t){return typeof e=="number"?e:e[t]||0}const r0=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=je(),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=f=>{n&&this.snapToCursor(or(f).point),this.stopAnimation()},s=(f,p)=>{const{drag:m,dragPropagation:g,onDragStart:x}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=L1(m),!this.openDragLock))return;this.latestPointerEvent=f,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),mt(b=>{let j=this.getAxisMotionValue(b).get()||0;if(bt.test(j)){const{projection:k}=this.visualElement;if(k&&k.layout){const B=k.layout.layoutBox[b];B&&(j=_e(B)*(parseFloat(j)/100))}}this.originPoint[b]=j}),x&&fe.update(()=>x(f,p),!1,!0),ao(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(f,p)=>{this.latestPointerEvent=f,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=s0(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&&fe.update(()=>y(f,p),!1,!0)},c=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ed(t,{onSessionStart:o,onStart:s,onMove:l,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Ad(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&&fe.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||!yr(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=Zx(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&&hn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Jx(r.layoutBox,t):this.constraints=!1,this.elastic=n0(n),i!==this.constraints&&!hn(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&mt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=t0(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hn(t))return!1;const r=t.current;jt(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=sg(r,i.root,this.visualElement.getTransformPagePoint());let s=Qx(i.layout.layoutBox,o);if(n){const l=n(rg(s));this.hasMutatedConstraints=!!l,l&&(s=Xu(l))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=mt(u=>{if(!yr(u,n,this.currentDirection))return;let f=c&&c[u]||{};(s===!0||s===u)&&(f={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(u,g)});return Promise.all(d).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ao(this.visualElement,t),r.start(os(t,r,0,n,this.visualElement,!1))}stopAnimation(){mt(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){mt(n=>{const{drag:r}=this.getProps();if(!yr(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],c=o.get()||0;o.set(t[n]-pe(s,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!hn(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mt(s=>{const l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){const c=l.get();i[s]=e0({min:c,max:c},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(),mt(s=>{if(!yr(s,t,null))return;const l=this.getAxisMotionValue(s),{min:c,max:d}=this.constraints[s];l.set(pe(c,d,i[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;r0.set(this.visualElement,this);const t=this.visualElement.current,n=$n(t,"pointerdown",d=>{const{drag:u,dragListener:f=!0}=this.getProps(),p=d.target,m=p!==t&&O1(p);u&&f&&!m&&this.start(d)});let r;const i=()=>{const{dragConstraints:d}=this.getProps();hn(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),r||(r=o0(t,d.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,s=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),fe.read(i);const l=Jn(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:u})=>{this.isDragging&&u&&(mt(f=>{const p=this.getAxisMotionValue(f);p&&(this.originPoint[f]+=d[f].translate,p.set(p.get()+d[f].translate))}),this.visualElement.render())}));return()=>{l(),n(),s(),c&&c(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=yo,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:l}}}function bl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function o0(e,t,n){const r=ja(e,bl(n)),i=ja(t,bl(n));return()=>{r(),i()}}function yr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function s0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class a0 extends Ot{constructor(t){super(t),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new i0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}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 ji=e=>(t,n)=>{e&&fe.update(()=>e(t,n),!1,!0)};class l0 extends Ot{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(t){this.session=new Ed(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ad(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ji(t),onStart:ji(n),onMove:ji(r),onEnd:(o,s)=>{delete this.session,i&&fe.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=$n(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 Ai=!1;class c0 extends T.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),Ai&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Dr.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}),Ai=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||fe.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(),cs.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Ai=!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 Bd(e){const[t,n]=yd(),r=T.useContext(Uo);return a.jsx(c0,{...e,layoutGroup:r,switchLayoutGroup:T.useContext(Td),isPresent:t,safeToRemove:n})}const u0={pan:{Feature:l0},drag:{Feature:a0,ProjectionNode:xd,MeasureLayout:Bd}};function vl(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&&fe.postRender(()=>o(t,or(t)))}class d0 extends Ot{mount(){const{current:t}=this.node;t&&(this.unmount=D1(t,(n,r)=>(vl(this.node,r,"Start"),i=>vl(this.node,i,"End"))))}unmount(){}}class f0 extends Ot{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=nr(Jn(this.node.current,"focus",()=>this.onFocus()),Jn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function wl(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&&fe.postRender(()=>o(t,or(t)))}class h0 extends Ot{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=_1(t,(i,o)=>(wl(this.node,o,"Start"),(s,{success:l})=>wl(this.node,s,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const bo=new WeakMap,Ei=new WeakMap,p0=e=>{const t=bo.get(e.target);t&&t(e)},m0=e=>{e.forEach(p0)};function g0({root:e,...t}){const n=e||document;Ei.has(n)||Ei.set(n,{});const r=Ei.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(m0,{root:e,...t})),r[i]}function x0(e,t,n){const r=g0(t);return bo.set(e,n),r.observe(e),()=>{bo.delete(e),r.unobserve(e)}}const y0={some:0,all:1};class b0 extends Ot{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.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:y0[i]},l=d=>{const{isIntersecting:u}=d;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:p}=this.node.getProps(),m=u?f:p;m&&m(d)};this.stopObserver=x0(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(v0(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function v0({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const w0={inView:{Feature:b0},tap:{Feature:h0},focus:{Feature:f0},hover:{Feature:d0}},k0={layout:{ProjectionNode:xd,MeasureLayout:Bd}},S0={...Gx,...w0,...u0,...k0},Tt=Vx(S0,Hx),C0={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"}},Xt="#EF4444",Ld="rgba(239,68,68,0.08)",T0=()=>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"})]}),j0=()=>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"})]}),Id=({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"})}),Dd=()=>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"})]}),A0=()=>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"})]}),E0=()=>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"})]}),F0=()=>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"})]}),B0=()=>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"})}),L0=()=>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"})]}),I0=(e,t)=>a.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function D0(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const br=[{value:"light",label:"Light mode",shortLabel:"Light",icon:a.jsx(F0,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:a.jsx(B0,{})},{value:"system",label:"System theme",shortLabel:"System",icon:a.jsx(L0,{})}];function R0({scheme:e}){const{mounted:t,themeMode:n,themeSetting:r,setThemeMode:i}=er(),[o,s]=T.useState(!1),l=T.useRef(null),c=t?r:void 0,d=br.find(p=>p.value===c)||br[0];T.useEffect(()=>{const p=m=>{l.current&&!l.current.contains(m.target)&&s(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const u=a.jsx(h.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:br.map(p=>{const m=c===p.value,g=p.value==="dark"?e.activeBgDarkStrong:p.value==="system"?e.hoverBgDark:e.hoverBgLight;return a.jsxs(h.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(h.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:p.icon}),a.jsx(h.Box,{as:"span",fontSize:"xs",fontWeight:m?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:p.shortLabel})]},p.value)})}),f=a.jsxs(h.Box,{display:{base:"block",md:"none"},position:"relative",ref:l,children:[a.jsx(h.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(h.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:br.map(p=>{const m=c===p.value;return a.jsxs(h.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(h.Box,{flexShrink:0,children:p.icon}),a.jsx(h.Box,{as:"span",fontSize:"sm",fontWeight:m?"600":"500",fontFamily:"var(--font-body)",children:p.label})]},p.value)})})]});return a.jsxs(a.Fragment,{children:[u,f]})}function Rd({item:e,renderLink:t,onClick:n,scheme:r}){var y;const[i,o]=T.useState(!1),[s,l]=T.useState(!1),c=e.isActive??!1,d=((y=e.subItems)==null?void 0:y.some(b=>b.isActive))??!1,[u,f]=T.useState(c||d),p=!!(e.subItems&&e.subItems.length>0),m=T.useId();T.useEffect(()=>{f(c||d)},[c,d]);const g=c,x=a.jsxs(h.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:c?r.activeBgLight:i?r.hoverBgLight:"transparent",boxShadow:c&&!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:c?r.activeBgDark:i?r.hoverBgDark:"transparent"},children:[e.icon&&a.jsx(h.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(h.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(h.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(h.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Xt},"aria-label":"New notification"}),p&&a.jsx(h.Box,{flexShrink:0,color:"text.muted",children:a.jsx(Id,{open:u})})]});return a.jsxs(a.Fragment,{children:[p?a.jsx("button",{type:"button","aria-expanded":u,"aria-controls":m,onClick:()=>f(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:u?{height:"auto",opacity:1}:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},style:{overflow:"hidden"},"aria-hidden":!u,children:a.jsx(h.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"9",mt:"0.5",mb:"1",children:e.subItems.map(b=>a.jsx(Rd,{item:b,renderLink:t,onClick:n,scheme:r},b.href))})})]})}let kl=!1;function M0(){if(typeof document>"u"||kl)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
|
|
346
|
+
`),()=>{var O;(O=l.current)==null||O.removeAttribute("data-motion-pop-id"),T.contains(B)&&T.removeChild(B)}},[t]),a.jsx(kx,{isPresent:t,childRef:l,sizeRef:u,pop:o,children:o===!1?e:be.cloneElement(e,{ref:f})})}const Cx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:l,anchorY:u,root:d})=>{const c=Xo(Tx),f=S.useId();let m=!0,p=S.useMemo(()=>(m=!1,{id:f,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&&m&&(p={...p}),S.useMemo(()=>{c.forEach((g,x)=>c.set(x,!1))},[n]),be.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=a.jsx(Sx,{pop:s==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:d,children:e}),a.jsx(Qr.Provider,{value:p,children:e})};function Tx(){return new Map}function Sd(e=!0){const t=S.useContext(Qr);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 vr=e=>e.key||"";function hl(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const ko=({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,f]=Sd(s),m=S.useMemo(()=>hl(e),[e]),p=s&&!c?[]:m.map(vr),g=S.useRef(!0),x=S.useRef(m),y=Xo(()=>new Map),v=S.useRef(new Set),[j,k]=S.useState(m),[F,B]=S.useState(m);Xc(()=>{g.current=!1,x.current=m;for(let E=0;E<F.length;E++){const A=vr(F[E]);p.includes(A)?(y.delete(A),v.current.delete(A)):y.get(A)!==!0&&y.set(A,!1)}},[F,p.length,p.join("-")]);const T=[];if(m!==j){let E=[...m];for(let A=0;A<F.length;A++){const L=F[A],M=vr(L);p.includes(M)||(E.splice(A,0,L),T.push(L))}return o==="wait"&&T.length&&(E=T),B(hl(E)),k(m),null}process.env.NODE_ENV!=="production"&&o==="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:O}=S.useContext(qo);return a.jsx(a.Fragment,{children:F.map(E=>{const A=vr(E),L=s&&!c?!1:m===F||p.includes(A),M=()=>{if(v.current.has(A))return;if(y.has(A))v.current.add(A),y.set(A,!0);else return;let R=!0;y.forEach(V=>{V||(R=!1)}),R&&(O==null||O(),B(x.current),s&&(f==null||f()),r&&r())};return a.jsx(Cx,{isPresent:L,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:d,onExitComplete:L?void 0:M,anchorX:l,anchorY:u,children:E},A)})})},Cd=S.createContext({strict:!1}),pl={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 ml=!1;function jx(){if(ml)return;const e={};for(const t in pl)e[t]={isEnabled:n=>pl[t].some(r=>!!n[r])};Qu(e),ml=!0}function Td(){return jx(),ug()}function Ex(e){const t=Td();for(const n in e)t[n]={...t[n],...e[n]};Qu(t)}const Ax=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 qr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ax.has(e)}let jd=e=>!qr(e);function Fx(e){typeof e=="function"&&(jd=t=>t.startsWith("on")?!qr(t):e(t))}try{Fx(require("@emotion/is-prop-valid").default)}catch{}function Bx(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||Pe(e[i])||(jd(i)||n===!0&&qr(i)||!t&&!qr(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const ri=S.createContext({});function Lx(e,t){if(ni(e)){const{initial:n,animate:r}=e;return{initial:n===!1||er(n)?n:void 0,animate:er(r)?r:void 0}}return e.inherit!==!1?t:{}}function Ix(e){const{initial:t,animate:n}=Lx(e,S.useContext(ri));return S.useMemo(()=>({initial:t,animate:n}),[gl(t),gl(n)])}function gl(e){return Array.isArray(e)?e.join(" "):e}const ks=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ed(e,t,n){for(const r in t)!Pe(t[r])&&!sd(r,n)&&(e[r]=t[r])}function Dx({transformTemplate:e},t){return S.useMemo(()=>{const n=ks();return bs(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Rx(e,t){const n=e.style||{},r={};return Ed(r,n,e),Object.assign(r,Dx(e,t)),r}function Mx(e,t){const n={},r=Rx(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 Ad=()=>({...ks(),attrs:{}});function Px(e,t,n,r){const i=S.useMemo(()=>{const o=Ad();return ad(o,t,cd(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Ed(o,e.style,e),i.style={...o,...i.style}}return i}const Ox=["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 Ss(e){return typeof e!="string"||e.includes("-")?!1:!!(Ox.indexOf(e)>-1||/[A-Z]/u.test(e))}function zx(e,t,n,{latestValues:r},i,o=!1,s){const u=(s??Ss(e)?Px:Mx)(t,r,i,e),d=Bx(t,typeof e=="string",o),c=e!==S.Fragment?{...d,...u,ref:n}:{},{children:f}=t,m=S.useMemo(()=>Pe(f)?f.get():f,[f]);return S.createElement(e,{...c,children:m})}function _x({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Nx(n,r,i,e),renderState:t()}}function Nx(e,t,n,r){const i={},o=r(e,{});for(const m in o)i[m]=Pr(o[m]);let{initial:s,animate:l}=e;const u=ni(e),d=Zu(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 f=c?l:s;if(f&&typeof f!="boolean"&&!ti(f)){const m=Array.isArray(f)?f:[f];for(let p=0;p<m.length;p++){const g=ds(e,m[p]);if(g){const{transitionEnd:x,transition:y,...v}=g;for(const j in v){let k=v[j];if(Array.isArray(k)){const F=c?k.length-1:0;k=k[F]}k!==null&&(i[j]=k)}for(const j in x)i[j]=x[j]}}}return i}const Fd=e=>(t,n)=>{const r=S.useContext(ri),i=S.useContext(Qr),o=()=>_x(e,t,r,i);return n?o():Xo(o)},Vx=Fd({scrapeMotionValuesFromProps:vs,createRenderState:ks}),Hx=Fd({scrapeMotionValuesFromProps:ud,createRenderState:Ad}),Wx=Symbol.for("motionComponentSymbol");function Ux(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 Bd=S.createContext({});function pn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function $x(e,t,n,r,i,o){var k,F;const{visualElement:s}=S.useContext(ri),l=S.useContext(Cd),u=S.useContext(Qr),d=S.useContext(ws),c=d.reducedMotion,f=d.skipAnimations,m=S.useRef(null),p=S.useRef(!1);r=r||l.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c,skipAnimations:f,isSVG:o}),p.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const g=m.current,x=S.useContext(Bd);g&&!g.projection&&i&&(g.type==="html"||g.type==="svg")&&Gx(m.current,n,i,x);const y=S.useRef(!1);S.useInsertionEffect(()=>{g&&y.current&&g.update(n,u)});const v=n[zu],j=S.useRef(!!v&&typeof window<"u"&&!((k=window.MotionHandoffIsComplete)!=null&&k.call(window,v))&&((F=window.MotionHasOptimisedAnimation)==null?void 0:F.call(window,v)));return Xc(()=>{p.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 Gx(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:l,layoutScroll:u,layoutRoot:d,layoutAnchor:c,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ld(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||l&&pn(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:u,layoutRoot:d,layoutAnchor:c})}function Ld(e){if(e)return e.options.allowProjection!==!1?e.projection:Ld(e.parent)}function Ai(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Ex(r);const o=n?n==="svg":Ss(e),s=o?Hx:Vx;function l(d,c){let f;const m={...S.useContext(ws),...d,layoutId:Yx(d)},{isStatic:p}=m,g=Ix(d),x=s(d,p);if(!p&&typeof window<"u"){Kx(m,r);const y=qx(m);f=y.MeasureLayout,g.visualElement=$x(e,x,m,i,y.ProjectionNode,o)}return a.jsxs(ri.Provider,{value:g,children:[f&&g.visualElement?a.jsx(f,{visualElement:g.visualElement,...m}):null,zx(e,d,Ux(x,g.visualElement,c),x,p,t,o)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=S.forwardRef(l);return u[Wx]=e,u}function Yx({layoutId:e}){const t=S.useContext(qo).id;return t&&e!==void 0?t+"-"+e:e}function Kx(e,t){const n=S.useContext(Cd).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?Sn(!1,r,"lazy-strict-mode"):jt(!1,r,"lazy-strict-mode")}}function qx(e){const t=Td(),{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 Xx(e,t){if(typeof Proxy>"u")return Ai;const n=new Map,r=(o,s)=>Ai(o,s,e,t),i=(o,s)=>(process.env.NODE_ENV!=="production"&&Qo(!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,Ai(s,void 0,e,t)),n.get(s))})}const Zx=(e,t)=>t.isSVG??Ss(e)?new Eg(t):new wg(t,{allowProjection:e!==S.Fragment});class Jx extends Ot{constructor(t){super(t),t.animationState||(t.animationState=Ig(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ti(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 Qx=0;class e0 extends Ot{constructor(){super(...arguments),this.id=Qx++,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=Xt(this.node,s,l);if(u){const{transition:d,transitionEnd:c,...f}=u;for(const m in f)(o=this.node.getValue(m))==null||o.jump(f[m])}}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 t0={animation:{Feature:Jx},exit:{Feature:e0}};function lr(e){return{point:{x:e.pageX,y:e.pageY}}}const n0=e=>t=>ms(t)&&e(t,lr(t));function Kn(e,t,n,r){return tr(e,t,n0(n),r)}const Id=({current:e})=>e?e.ownerDocument.defaultView:null,xl=(e,t)=>Math.abs(e-t);function r0(e,t){const n=xl(e.x,t.x),r=xl(e.y,t.y);return Math.sqrt(n**2+r**2)}const yl=new Set(["auto","scroll"]);class Dd{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=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=wr(this.lastRawMoveEventInfo,this.transformPagePoint));const p=Fi(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=r0(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:y}=p,{timestamp:v}=Me;this.history.push({...y,timestamp:v});const{onStart:j,onMove:k}=this.handlers;g||(j&&j(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=wr(g,this.transformPagePoint),ge.update(this.updatePoint,!0)},this.handlePointerUp=(p,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=Fi(p.type==="pointercancel"?this.lastMoveEventInfo:wr(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(p,j),y&&y(p,j)},!ms(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const u=lr(t),d=wr(u,this.transformPagePoint),{point:c}=d,{timestamp:f}=Me;this.history=[{...c,timestamp:f}];const{onSessionStart:m}=n;m&&m(t,Fi(d,this.history)),this.removeListeners=or(Kn(this.contextWindow,"pointermove",this.handlePointerMove),Kn(this.contextWindow,"pointerup",this.handlePointerUp),Kn(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(yl.has(r.overflowX)||yl.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(),Pt(this.updatePoint)}}function wr(e,t){return t?{point:t(e.point)}:e}function bl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fi({point:e},t){return{point:e,delta:bl(e,Rd(t)),offset:bl(e,i0(t)),velocity:o0(t,.1)}}function i0(e){return e[0]}function Rd(e){return e[e.length-1]}function o0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Rd(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ye(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Ye(t)*2&&(r=e[1]);const o=tt(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 s0(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 vl(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 a0(e,{top:t,left:n,bottom:r,right:i}){return{x:vl(e.x,n,i),y:vl(e.y,t,r)}}function wl(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 l0(e,t){return{x:wl(e.x,t.x),y:wl(e.y,t.y)}}function c0(e,t){let n=.5;const r=Ve(e),i=Ve(t);return i>r?n=Jn(t.min,t.max-r,e.min):r>i&&(n=Jn(e.min,e.max-i,t.min)),wt(0,1,n)}function u0(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 So=.35;function d0(e=So){return e===!1?e=0:e===!0&&(e=So),{x:kl(e,"left","right"),y:kl(e,"top","bottom")}}function kl(e,t,n){return{min:Sl(e,t),max:Sl(e,n)}}function Sl(e,t){return typeof e=="number"?e:e[t]||0}const f0=new WeakMap;class h0{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:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{n&&this.snapToCursor(lr(f).point),this.stopAnimation()},s=(f,m)=>{const{drag:p,dragPropagation:g,onDragStart:x}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=N1(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gt(v=>{let j=this.getAxisMotionValue(v).get()||0;if(vt.test(j)){const{projection:k}=this.visualElement;if(k&&k.layout){const F=k.layout.layoutBox[v];F&&(j=Ve(F)*(parseFloat(j)/100))}}this.originPoint[v]=j}),x&&ge.update(()=>x(f,m),!1,!0),ho(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:x,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=m;if(g&&this.currentDirection===null){this.currentDirection=m0(v),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",m.point,v),this.updateAxis("y",m.point,v),this.visualElement.render(),y&&ge.update(()=>y(f,m),!1,!0)},u=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Dd(t,{onSessionStart:o,onStart:s,onMove:l,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Id(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||!kr(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=s0(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&&pn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=a0(r.layoutBox,t):this.constraints=!1,this.elastic=d0(n),i!==this.constraints&&!pn(t)&&r&&this.constraints&&!this.hasMutatedConstraints&>(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=u0(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!pn(t))return!1;const r=t.current;jt(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=mg(r,i.root,this.visualElement.getTransformPagePoint());let s=l0(i.layout.layoutBox,o);if(n){const l=n(fg(s));this.hasMutatedConstraints=!!l,l&&(s=td(l))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},d=gt(c=>{if(!kr(c,n,this.currentDirection))return;let f=u&&u[c]||{};(s===!0||s===c)&&(f={min:0,max:0});const m=i?200:1e6,p=i?40:1e7,g={type:"inertia",velocity:r?t[c]:0,bounceStiffness:m,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,g)});return Promise.all(d).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ho(this.visualElement,t),r.start(us(t,r,0,n,this.visualElement,!1))}stopAnimation(){gt(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){gt(n=>{const{drag:r}=this.getProps();if(!kr(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(!pn(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};gt(s=>{const l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){const u=l.get();i[s]=c0({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(),gt(s=>{if(!kr(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;f0.set(this.visualElement,this);const t=this.visualElement.current,n=Kn(t,"pointerdown",d=>{const{drag:c,dragListener:f=!0}=this.getProps(),m=d.target,p=m!==t&&G1(m);c&&f&&!p&&this.start(d)});let r;const i=()=>{const{dragConstraints:d}=this.getProps();pn(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),r||(r=p0(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=tr(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:c})=>{this.isDragging&&c&&(gt(f=>{const m=this.getAxisMotionValue(f);m&&(this.originPoint[f]+=d[f].translate,m.set(m.get()+d[f].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=So,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:l}}}function Cl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function p0(e,t,n){const r=La(e,Cl(n)),i=La(t,Cl(n));return()=>{r(),i()}}function kr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function m0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class g0 extends Ot{constructor(t){super(t),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new h0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}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 Bi=e=>(t,n)=>{e&&ge.update(()=>e(t,n),!1,!0)};class x0 extends Ot{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(t){this.session=new Dd(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Id(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Bi(t),onStart:Bi(n),onMove:Bi(r),onEnd:(o,s)=>{delete this.session,i&&ge.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Kn(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 Li=!1;class y0 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),Li&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Or.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}),Li=!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(),ps.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Li=!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 Md(e){const[t,n]=Sd(),r=S.useContext(qo);return a.jsx(y0,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Bd),isPresent:t,safeToRemove:n})}const b0={pan:{Feature:x0},drag:{Feature:g0,ProjectionNode:kd,MeasureLayout:Md}};function Tl(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,lr(t)))}class v0 extends Ot{mount(){const{current:t}=this.node;t&&(this.unmount=H1(t,(n,r)=>(Tl(this.node,r,"Start"),i=>Tl(this.node,i,"End"))))}unmount(){}}class w0 extends Ot{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=or(tr(this.node.current,"focus",()=>this.onFocus()),tr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function jl(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,lr(t)))}class k0 extends Ot{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=K1(t,(i,o)=>(jl(this.node,o,"Start"),(s,{success:l})=>jl(this.node,s,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Co=new WeakMap,Ii=new WeakMap,S0=e=>{const t=Co.get(e.target);t&&t(e)},C0=e=>{e.forEach(S0)};function T0({root:e,...t}){const n=e||document;Ii.has(n)||Ii.set(n,{});const r=Ii.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(C0,{root:e,...t})),r[i]}function j0(e,t,n){const r=T0(t);return Co.set(e,n),r.observe(e),()=>{Co.delete(e),r.unobserve(e)}}const E0={some:0,all:1};class A0 extends Ot{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:E0[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:f,onViewportLeave:m}=this.node.getProps(),p=c?f:m;p&&p(d)};this.stopObserver=j0(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(F0(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function F0({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const B0={inView:{Feature:A0},tap:{Feature:k0},focus:{Feature:w0},hover:{Feature:v0}},L0={layout:{ProjectionNode:kd,MeasureLayout:Md}},I0={...t0,...B0,...b0,...L0},Tt=Xx(I0,Zx),D0={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"}},Zt="#EF4444",Pd="rgba(239,68,68,0.08)",R0=()=>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"})]}),M0=()=>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"})]}),Od=({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"})}),zd=()=>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"})]}),P0=()=>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"})]}),O0=()=>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"})]}),z0=()=>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"})]}),_0=()=>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"})}),N0=()=>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"})]}),V0=(e,t)=>a.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function H0(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const Sr=[{value:"light",label:"Light mode",shortLabel:"Light",icon:a.jsx(z0,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:a.jsx(_0,{})},{value:"system",label:"System theme",shortLabel:"System",icon:a.jsx(N0,{})}];function W0({scheme:e}){const{mounted:t,themeMode:n,themeSetting:r,setThemeMode:i}=rr(),[o,s]=S.useState(!1),l=S.useRef(null),u=t?r:void 0,d=Sr.find(m=>m.value===u)||Sr[0];S.useEffect(()=>{const m=p=>{l.current&&!l.current.contains(p.target)&&s(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const c=a.jsx(h.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:Sr.map(m=>{const p=u===m.value,g=m.value==="dark"?e.activeBgDarkStrong:m.value==="system"?e.hoverBgDark:e.hoverBgLight;return a.jsxs(h.Box,{as:"button",onClick:()=>{t&&i(m.value)},"aria-pressed":p,"aria-label":m.label,title:t&&m.value==="system"?`System theme (currently ${n})`:m.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:p?g:"transparent",color:p?e.chakraToken:"text.muted",opacity:t?1:.6,cursor:t?"pointer":"default",transition:"background 0.18s ease, color 0.18s ease, opacity 0.18s ease",_hover:t?{bg:p?g:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[a.jsx(h.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:m.icon}),a.jsx(h.Box,{as:"span",fontSize:"xs",fontWeight:p?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:m.shortLabel})]},m.value)})}),f=a.jsxs(h.Box,{display:{base:"block",md:"none"},position:"relative",ref:l,children:[a.jsx(h.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(m=>!m)},"aria-label":"Theme mode switcher","aria-expanded":o,"aria-haspopup":"menu",children:d.icon}),o&&t&&a.jsx(h.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:Sr.map(m=>{const p=u===m.value;return a.jsxs(h.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:p?e.hoverBgLight:"transparent",color:p?e.chakraToken:"text.body",cursor:"pointer",textAlign:"left",onClick:()=>{i(m.value),s(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:p?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[a.jsx(h.Box,{flexShrink:0,children:m.icon}),a.jsx(h.Box,{as:"span",fontSize:"sm",fontWeight:p?"600":"500",fontFamily:"var(--font-body)",children:m.label})]},m.value)})})]});return a.jsxs(a.Fragment,{children:[c,f]})}function _d({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(v=>v.isActive))??!1,[c,f]=S.useState(u||d),m=!!(e.subItems&&e.subItems.length>0),p=S.useId();S.useEffect(()=>{f(u||d)},[u,d]);const g=u,x=a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:m?"lg":"none",borderTopLeftRadius:m?"lg":"none",borderBottomLeftRadius:m?"lg":"none",position:"relative",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:m?void 0:n,style:{background:u?r.activeBgLight:i?r.hoverBgLight:"transparent",boxShadow:u&&!m?`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(h.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(h.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"&&!m&&a.jsx(h.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&&!m&&a.jsx(h.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Zt},"aria-label":"New notification"}),m&&a.jsx(h.Box,{flexShrink:0,color:"text.muted",children:a.jsx(Od,{open:c})})]});return a.jsxs(a.Fragment,{children:[m?a.jsx("button",{type:"button","aria-expanded":c,"aria-controls":p,onClick:()=>f(v=>!v),onFocus:v=>{l(v.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),m&&a.jsx(Tt.div,{id:p,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(h.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"9",mt:"0.5",mb:"1",children:e.subItems.map(v=>a.jsx(_d,{item:v,renderLink:t,onClick:n,scheme:r},v.href))})})]})}let El=!1;function U0(){if(typeof document>"u"||El)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
|
|
321
347
|
@keyframes medixMobileNavIn {
|
|
322
348
|
from { transform: translateY(100%); opacity: 0; }
|
|
323
349
|
to { transform: translateY(0); opacity: 1; }
|
|
324
350
|
}
|
|
325
|
-
`,document.head.appendChild(e),kl=!0}function P0({items:e,renderLink:t,scheme:n}){return T.useEffect(()=>{M0()},[]),a.jsx(h.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:{height: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(h.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(h.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(h.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},children:t(s,o)},r.href)})})}const O0={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)"}},z0=({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"})]}),_0=()=>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 N0({data:e,renderLink:t}){const n=O0[e.tier],r=e.name.split(" ").map(o=>o[0]).join("").slice(0,2).toUpperCase(),i=a.jsxs(h.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(h.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(h.Box,{flex:"1",minW:"0",children:[a.jsx(h.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(h.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(h.Box,{color:"text.muted",flexShrink:0,children:a.jsx(_0,{})})]}),a.jsx(h.Box,{borderTop:"1px solid",borderColor:"border"}),a.jsxs(h.Box,{px:"3",pt:"2",pb:"2.5",children:[a.jsx(h.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[a.jsx(z0,{color:n.color}),a.jsx(h.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n.color,whiteSpace:"nowrap"},children:n.label}),a.jsxs(h.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 V0({logo:e,navGroups:t,isOpen:n,onClose:r,onLogout:i,renderLink:o,sidebarWidth:s,scheme:l,scoreCard:c}){const[d,u]=T.useState(!1);return a.jsxs(a.Fragment,{children:[n&&a.jsx(h.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:r,"aria-hidden":"true"}),a.jsxs(h.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(h.Box,{px:"5",pt:"5",pb:"4",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",children:e}),c&&a.jsx(h.Box,{display:{base:"none",md:"block"},flexShrink:0,pt:"3",children:a.jsx(N0,{data:c,renderLink:o})}),a.jsx(h.Box,{flex:"1",overflowY:"auto",py:"3",px:"3",children:t.map((f,p)=>a.jsxs(h.Box,{mb:"4",children:[f.groupLabel&&a.jsx(h.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:f.groupLabel}),a.jsx(h.Box,{display:"flex",flexDirection:"column",gap:"0.5",children:f.items.map(m=>a.jsx(Rd,{item:m,renderLink:o,onClick:r,scheme:l},m.href))})]},p))}),a.jsx(h.Box,{px:"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:a.jsxs(h.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:()=>u(!0),onMouseLeave:()=>u(!1),onClick:()=>{r(),i==null||i()},style:{background:d?Ld:"transparent",color:Xt,transition:"background 0.15s ease"},children:[a.jsx(h.Box,{flexShrink:0,style:{color:Xt},children:a.jsx(Dd,{})}),a.jsx(h.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Xt},children:"Log out"})]})})]})]})}function H0({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:r,onMenuToggle:i,sidebarWidth:o,topBarSlot:s,dropdownItems:l,onLogout:c,scheme:d}){const[u,f]=T.useState(!1),p=T.useRef(null),m=T.useId(),g=`user-menu-button-${m}`,x=`user-menu-dropdown-${m}`;return T.useEffect(()=>{const y=b=>{p.current&&!p.current.contains(b.target)&&f(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[]),a.jsxs(h.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[a.jsx(h.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(j0,{}):a.jsx(T0,{})}),a.jsxs(h.Box,{flex:"1",minW:"0",children:[a.jsxs(h.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",a.jsx(h.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&a.jsx(h.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(R0,{scheme:d}),a.jsxs(h.Box,{position:"relative",ref:p,children:[a.jsxs(h.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:()=>f(y=>!y),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?x:void 0,"aria-label":"User menu",children:[a.jsx(_o,{name:e.name,src:e.avatarSrc,size:"sm"}),a.jsx(h.Box,{color:"text.muted",children:a.jsx(Id,{open:u})})]}),u&&a.jsxs(h.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(h.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[a.jsx(h.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!l&&a.jsxs(a.Fragment,{children:[a.jsx(vr,{icon:a.jsx(A0,{}),label:"My Profile",onClick:()=>f(!1),scheme:d}),a.jsx(vr,{icon:a.jsx(E0,{}),label:"Settings",onClick:()=>f(!1),scheme:d})]}),l==null?void 0:l.map((y,b)=>a.jsx(vr,{icon:y.icon,label:y.label,isDanger:y.isDanger,onClick:()=>{var j;f(!1),(j=y.onClick)==null||j.call(y)},scheme:d},b)),a.jsx(h.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),a.jsx(vr,{icon:a.jsx(Dd,{}),label:"Log out",isDanger:!0,onClick:()=>{f(!1),c==null||c()},scheme:d})]})]})]})}function vr({icon:e,label:t,isDanger:n,onClick:r,scheme:i}){const[o,s]=T.useState(!1);return a.jsxs(h.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?Ld:i.hoverBgLight:"transparent",color:n?Xt:void 0,transition:"background 0.12s ease"},children:[e&&a.jsx(h.Box,{flexShrink:0,style:{color:n?Xt:void 0},color:"text.muted",children:e}),a.jsx(h.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Xt:void 0},color:n?void 0:"text.body",children:t})]})}function Md({children:e,logo:t,navGroups:n,user:r,greeting:i,greetingSubtext:o,onLogout:s,renderLink:l=I0,dropdownItems:c,topBarSlot:d,sidebarWidth:u=220,colorScheme:f="blue",mobileNavItems:p,scoreCard:m,...g}){const[x,y]=T.useState(!1),b=C0[f],j=!!(p&&p.length>0),k=i??D0(),B=t??a.jsx(tr,{variant:f,height:26});return a.jsxs(h.Box,{display:"flex",minH:"100vh",bg:"bg",...g,children:[a.jsx(V0,{logo:B,navGroups:n,isOpen:x,onClose:()=>y(!1),onLogout:s,renderLink:l,sidebarWidth:u,scheme:b,scoreCard:m}),a.jsxs(h.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${u}px`},transition:"margin-left 0.25s cubic-bezier(0.22,1,0.36,1)",children:[a.jsx(H0,{user:r,greeting:k,greetingSubtext:o,isSidebarOpen:x,onMenuToggle:()=>y(A=>!A),sidebarWidth:u,topBarSlot:d,dropdownItems:c,onLogout:s,scheme:b}),a.jsx(h.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:j?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),j&&a.jsx(P0,{items:p,renderLink:l,scheme:b})]})}Md.displayName="MedixDashboardLayout";const Pd=[0,0,.2,1],W0=[.4,0,1,1],U0=[.22,1,.36,1],$0={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:U0}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:W0}}},G0={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Y0={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Pd}}},K0={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Pd,delay:.18}}},q0={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)"}},X0=()=>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 Z0({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 J0({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 Q0=(e,t)=>a.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function ey({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:r="Get Started",ctaHref:i,onCtaClick:o,ctaIconHref:s,onCtaIconClick:l,secondaryCtaLabel:c,secondaryCtaHref:d,onSecondaryCtaClick:u,ctaSlot:f,renderLink:p=Q0,isSticky:m=!1,colorScheme:g="blue",variant:x="solid",...y}){const[b,j]=T.useState(!1),k=q0[g],B=s??i,A=l??o,w=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},M=({mobile:F=!1})=>a.jsxs(h.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:F?"column":"row",children:[c&&a.jsx(We,{as:d?"a":"button",href:d,variant:F?"outline":"ghost",colorScheme:g,size:F?"md":"sm",onClick:()=>{u==null||u(),F&&j(!1)},style:F?{width:"100%"}:void 0,children:c}),a.jsx(We,{as:i?"a":"button",href:i,variant:"solid",colorScheme:g,size:F?"md":"sm",onClick:()=>{o==null||o(),F&&j(!1)},style:F?{width:"100%"}:void 0,children:r}),!F&&a.jsx(We,{as:B?"a":"button",href:B,target:B&&B!==i?"_blank":void 0,rel:B&&B!==i?"noopener noreferrer":void 0,variant:"solid",colorScheme:g,size:"sm",onClick:A,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:a.jsx(X0,{})})]});return a.jsxs(h.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:w,borderBottom:"1px solid",borderColor:x==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...y,children:[a.jsxs(h.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(h.Box,{flexShrink:0,children:e??a.jsx(tr,{variant:g==="blue"?"blue":"purple",height:28})}),a.jsx(h.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(F=>a.jsx(h.Box,{as:"li",children:p(F,a.jsx(h.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:F.isActive?k.hover:"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:k.hover,bg:k.hoverBg},_dark:{_hover:{bg:k.hoverBgDark}},cursor:"pointer",children:F.label}))},F.href))}),a.jsx(h.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:f??a.jsx(M,{})}),a.jsx(h.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>j(!b),"aria-label":b?"Close menu":"Open menu","aria-expanded":b,style:{flexShrink:0,position:"relative",width:32,height:32},children:a.jsx(xo,{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(J0,{color:k.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(Z0,{color:k.solid})},"hamburger")})})]}),a.jsx(xo,{children:b&&a.jsx(Tt.div,{variants:$0,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:a.jsxs(h.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[a.jsx(Tt.ul,{variants:G0,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(F=>a.jsx(Tt.li,{variants:Y0,children:p(F,a.jsx(h.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:F.isActive?k.hover:"text.body",borderRadius:"md",_hover:{color:k.hover,bg:"bg.subtle"},cursor:"pointer",onClick:()=>j(!1),children:F.label}))},F.href))}),a.jsx(Tt.div,{variants:K0,initial:"hidden",animate:"visible",children:a.jsx(h.Box,{mt:"4",children:f??a.jsx(M,{mobile:!0})})})]})},"mobile-menu")})]})}const ty={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)"}},ny=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"})})]})}),ry="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",iy=[{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"}]}],oy=[{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"}],sy=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],ay=(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 Od({description:e=ry,logo:t,sections:n=iy,socialLinks:r=oy,copyright:i,bottomLinks:o=sy,newsletter:s,renderLink:l=ay,colorScheme:c="blue",certifications:d,...u}){const f=new Date().getFullYear(),p=i??`© ${f} MedixDeck Health Solution Ltd. All Rights Reserved.`,[m,g]=T.useState(""),[x,y]=T.useState(!1),[b,j]=T.useState(!1),k=ty[c],{mounted:B,themeMode:A,toggleThemeMode:w}=er(),M=F=>{F.preventDefault(),s!=null&&s.onSubmit&&m&&(s.onSubmit(m),g(""))};return a.jsx(h.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...u,children:a.jsxs(h.Container,{maxWidth:"7xl",children:[a.jsxs(h.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[a.jsxs(h.Box,{children:[a.jsx(h.Box,{mb:4,children:a.jsx(h.Link,{href:"/",children:t??a.jsx(tr,{variant:c==="blue"?"blue":"purple",height:28})})}),a.jsx(h.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),a.jsx(h.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const F=ny(k.solid);return r.map(E=>a.jsx(h.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:F[E.platform]},E.platform))})()})]}),a.jsx(h.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(F=>a.jsxs(h.Box,{children:[a.jsx(h.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:F.title}),a.jsx(h.VStack,{align:"flex-start",gap:3,children:F.links.map(E=>a.jsx(h.Box,{w:"full",children:l(E,a.jsx(h.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:k.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:E.label}))},E.label))})]},F.title))}),!(s!=null&&s.hide)&&a.jsx(h.Box,{children:a.jsxs(h.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[a.jsx(h.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(s==null?void 0:s.title)??"Newsletter"}),a.jsx(h.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(h.Box,{as:"form",onSubmit:M,position:"relative",display:"flex",children:[a.jsx(h.Box,{as:"input",type:"email",value:m,onChange:F=>g(F.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:k.token,boxShadow:`0 0 0 1px ${k.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?k.solidHover:k.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:b?`0 0 0 3px ${k.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:(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(h.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:a.jsxs(h.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[a.jsx(h.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:p}),a.jsxs(h.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[o.map(F=>a.jsx(h.Box,{children:l(F,a.jsx(h.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:F.label}))},F.label)),B&&a.jsx(h.Box,{as:"button",onClick:w,display:"inline-flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:"text.body",_hover:{color:"text.heading",bg:"bg"},cursor:"pointer",transition:"all 0.2s","aria-label":"Toggle theme",ml:2,children:A==="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(h.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:a.jsx(h.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:d.map(F=>{const E=a.jsxs(h.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:F.href?"pointer":"default"},children:[F.imageSrc?a.jsx("img",{src:F.imageSrc,alt:F.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):a.jsx(h.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(h.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:F.name})]},F.name);return F.href?a.jsx(h.Box,{children:l({href:F.href,isExternal:F.isExternal??!0},E)},F.name):a.jsx(h.Box,{children:E},F.name)})})})]})})}Od.displayName="MedixFooter";const ly=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"})}),cy=(e,t)=>e.href?a.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):a.jsx(a.Fragment,{children:t});function uy({items:e,separator:t=ly,renderLink:n=cy,...r}){return a.jsx(h.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(h.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(i,a.jsx(h.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(h.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},o)})})}const dy={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function fy({tabs:e,defaultActiveId:t,activeId:n,onChange:r,variant:i="line",size:o="md",renderContent:s=!0,...l}){var g;const[c,d]=T.useState(t??((g=e[0])==null?void 0:g.id)),u=n??c,f=x=>{d(x),r==null||r(x)},p=e.find(x=>x.id===u),m=dy[o];return a.jsxs(h.Box,{...l,children:[a.jsx(h.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===u;return a.jsxs(h.Box,{role:"tab","aria-selected":y,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onClick:()=>!x.disabled&&f(x.id),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&!x.disabled&&f(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(h.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:x.label}),x.badge!==void 0&&a.jsx(h.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(h.Box,{role:"tabpanel",mt:"4",children:p.content})]})}function hy(e,t,n){if(n*2+5>=t)return Array.from({length:t},(c,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 c=3+2*n;return[...Array.from({length:c},(d,u)=>u+1),"...",t]}if(s&&!l){const c=3+2*n;return[1,"...",...Array.from({length:c},(d,u)=>t-c+1+u)]}return[1,"...",...Array.from({length:o-i+1},(c,d)=>i+d),"...",t]}function zd({total:e,pageSize:t=10,currentPage:n=1,onChange:r,siblingCount:i=1,showEdges:o=!0,compact:s=!1,...l}){const c=Math.ceil(e/t);if(c<=1)return null;const d=hy(n,c,i),u={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"},f=({children:g,disabled:x,onClick:y,label:b,icon:j,isNext:k})=>a.jsxs(h.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:[!k&&j&&a.jsx(h.Box,{as:"span",display:"flex",alignItems:"center",children:j}),g,k&&j&&a.jsx(h.Box,{as:"span",display:"flex",alignItems:"center",children:j})]}),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(h.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...l,children:[o&&a.jsx(f,{disabled:n===1,onClick:()=>r==null?void 0:r(1),label:"First page",icon:p,children:"First"}),a.jsx(f,{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(h.Box,{...u,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${x}`):a.jsx(h.Box,{as:"button",...u,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(h.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",c]}),a.jsx(f,{disabled:n===c,onClick:()=>r==null?void 0:r(n+1),label:"Next page",icon:m,isNext:!0,children:"Next"}),o&&a.jsx(f,{disabled:n===c,onClick:()=>r==null?void 0:r(c),label:"Last page",icon:m,isNext:!0,children:"Last"})]})}const Sl=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 py({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(h.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...o,children:e.map((d,u)=>{const f=u+1<t,p=u+1===t,m=u===e.length-1,g=f||p?s:"var(--chakra-colors-border, #E2E8F0)";return a.jsxs(h.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[a.jsxs(h.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[a.jsx(h.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:f||p?s:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:f?Sl:d.icon??u+1}),!m&&a.jsx(h.Box,{w:"2px",flex:"1",minH:"8",bg:f?s:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&a.jsxs(h.Box,{pt:"1",pb:m?"0":"8",children:[a.jsx(h.Box,{fontSize:"sm",fontWeight:p?"semibold":"medium",color:f||p?s:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:d.title}),d.description&&a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:d.description})]})]},d.id)})}):a.jsx(h.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...o,children:e.map((d,u)=>{const f=u+1<t,p=u+1===t,m=u+1>t,g=u===e.length-1,x=m?"bg.subtle":s,y=f?Sl:d.icon?d.icon:a.jsx(h.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:u+1}),b=!m&&n!=="compact",j=m?"text.muted":s;return a.jsxs(T.Fragment,{children:[a.jsx(h.Box,{role:"listitem","aria-current":p?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:a.jsxs(h.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(h.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(h.Box,{as:"span",fontSize:"sm",fontWeight:p||f?"semibold":"medium",fontFamily:"var(--font-body)",color:j,whiteSpace:"nowrap",transition:"color 0.25s",children:d.title})]})}),!g&&a.jsx(h.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:a.jsx(h.Box,{h:"1.5px",w:"10",bg:f?s:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},d.id)})})}const my=`
|
|
351
|
+
`,document.head.appendChild(e),El=!0}function $0({items:e,renderLink:t,scheme:n}){return S.useEffect(()=>{U0()},[]),a.jsx(h.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:{height: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(h.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(h.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(h.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},children:t(s,o)},r.href)})})}const G0={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)"}},Y0=({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"})]}),K0=()=>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 q0({data:e,renderLink:t}){const n=G0[e.tier],r=e.name.split(" ").map(o=>o[0]).join("").slice(0,2).toUpperCase(),i=a.jsxs(h.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(h.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(h.Box,{flex:"1",minW:"0",children:[a.jsx(h.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(h.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(h.Box,{color:"text.muted",flexShrink:0,children:a.jsx(K0,{})})]}),a.jsx(h.Box,{borderTop:"1px solid",borderColor:"border"}),a.jsxs(h.Box,{px:"3",pt:"2",pb:"2.5",children:[a.jsx(h.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[a.jsx(Y0,{color:n.color}),a.jsx(h.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n.color,whiteSpace:"nowrap"},children:n.label}),a.jsxs(h.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 X0({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(h.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:r,"aria-hidden":"true"}),a.jsxs(h.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(h.Box,{px:"5",pt:"5",pb:"4",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",children:e}),u&&a.jsx(h.Box,{display:{base:"none",md:"block"},flexShrink:0,pt:"3",children:a.jsx(q0,{data:u,renderLink:o})}),a.jsx(h.Box,{flex:"1",overflowY:"auto",py:"3",px:"3",children:t.map((f,m)=>a.jsxs(h.Box,{mb:"4",children:[f.groupLabel&&a.jsx(h.Box,{px:"3",pb:"2",pt:m>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:f.groupLabel}),a.jsx(h.Box,{display:"flex",flexDirection:"column",gap:"0.5",children:f.items.map(p=>a.jsx(_d,{item:p,renderLink:o,onClick:r,scheme:l},p.href))})]},m))}),a.jsx(h.Box,{px:"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:a.jsxs(h.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?Pd:"transparent",color:Zt,transition:"background 0.15s ease"},children:[a.jsx(h.Box,{flexShrink:0,style:{color:Zt},children:a.jsx(zd,{})}),a.jsx(h.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Zt},children:"Log out"})]})})]})]})}function Z0({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:r,onMenuToggle:i,sidebarWidth:o,topBarSlot:s,dropdownItems:l,onLogout:u,scheme:d}){const[c,f]=S.useState(!1),m=S.useRef(null),p=S.useId(),g=`user-menu-button-${p}`,x=`user-menu-dropdown-${p}`;return S.useEffect(()=>{const y=v=>{m.current&&!m.current.contains(v.target)&&f(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[]),a.jsxs(h.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[a.jsx(h.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(M0,{}):a.jsx(R0,{})}),a.jsxs(h.Box,{flex:"1",minW:"0",children:[a.jsxs(h.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",a.jsx(h.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&a.jsx(h.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(W0,{scheme:d}),a.jsxs(h.Box,{position:"relative",ref:m,children:[a.jsxs(h.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:()=>f(y=>!y),"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?x:void 0,"aria-label":"User menu",children:[a.jsx(Uo,{name:e.name,src:e.avatarSrc,size:"sm"}),a.jsx(h.Box,{color:"text.muted",children:a.jsx(Od,{open:c})})]}),c&&a.jsxs(h.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(h.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[a.jsx(h.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!l&&a.jsxs(a.Fragment,{children:[a.jsx(Cr,{icon:a.jsx(P0,{}),label:"My Profile",onClick:()=>f(!1),scheme:d}),a.jsx(Cr,{icon:a.jsx(O0,{}),label:"Settings",onClick:()=>f(!1),scheme:d})]}),l==null?void 0:l.map((y,v)=>a.jsx(Cr,{icon:y.icon,label:y.label,isDanger:y.isDanger,onClick:()=>{var j;f(!1),(j=y.onClick)==null||j.call(y)},scheme:d},v)),a.jsx(h.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),a.jsx(Cr,{icon:a.jsx(zd,{}),label:"Log out",isDanger:!0,onClick:()=>{f(!1),u==null||u()},scheme:d})]})]})]})}function Cr({icon:e,label:t,isDanger:n,onClick:r,scheme:i}){const[o,s]=S.useState(!1);return a.jsxs(h.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?Pd:i.hoverBgLight:"transparent",color:n?Zt:void 0,transition:"background 0.12s ease"},children:[e&&a.jsx(h.Box,{flexShrink:0,style:{color:n?Zt:void 0},color:"text.muted",children:e}),a.jsx(h.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Zt:void 0},color:n?void 0:"text.body",children:t})]})}function Nd({children:e,logo:t,navGroups:n,user:r,greeting:i,greetingSubtext:o,onLogout:s,renderLink:l=V0,dropdownItems:u,topBarSlot:d,sidebarWidth:c=220,colorScheme:f="blue",mobileNavItems:m,scoreCard:p,...g}){const[x,y]=S.useState(!1),v=D0[f],j=!!(m&&m.length>0),k=i??H0(),F=t??a.jsx(ir,{variant:f,height:26});return a.jsxs(h.Box,{display:"flex",minH:"100vh",bg:"bg",...g,children:[a.jsx(X0,{logo:F,navGroups:n,isOpen:x,onClose:()=>y(!1),onLogout:s,renderLink:l,sidebarWidth:c,scheme:v,scoreCard:p}),a.jsxs(h.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(Z0,{user:r,greeting:k,greetingSubtext:o,isSidebarOpen:x,onMenuToggle:()=>y(B=>!B),sidebarWidth:c,topBarSlot:d,dropdownItems:u,onLogout:s,scheme:v}),a.jsx(h.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:j?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),j&&a.jsx($0,{items:m,renderLink:l,scheme:v})]})}Nd.displayName="MedixDashboardLayout";const Vd=[0,0,.2,1],J0=[.4,0,1,1],Q0=[.22,1,.36,1],ey={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Q0}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:J0}}},ty={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},ny={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Vd}}},ry={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Vd,delay:.18}}},iy={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)"}},oy=()=>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 sy({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 ay({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 ly=(e,t)=>a.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function cy({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:f,renderLink:m=ly,isSticky:p=!1,colorScheme:g="blue",variant:x="solid",...y}){const[v,j]=S.useState(!1),k=iy[g],F=s??i,B=l??o,T=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},O=({mobile:E=!1})=>a.jsxs(h.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:E?"column":"row",children:[u&&a.jsx(Ge,{as:d?"a":"button",href:d,variant:E?"outline":"ghost",colorScheme:g,size:E?"md":"sm",onClick:()=>{c==null||c(),E&&j(!1)},style:E?{width:"100%"}:void 0,children:u}),a.jsx(Ge,{as:i?"a":"button",href:i,variant:"solid",colorScheme:g,size:E?"md":"sm",onClick:()=>{o==null||o(),E&&j(!1)},style:E?{width:"100%"}:void 0,children:r}),!E&&a.jsx(Ge,{as:F?"a":"button",href:F,target:F&&F!==i?"_blank":void 0,rel:F&&F!==i?"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:a.jsx(oy,{})})]});return a.jsxs(h.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:p?"sticky":"relative",top:p?"0":void 0,zIndex:p?"sticky":void 0,bg:x==="transparent"?"transparent":x==="blur"?void 0:"bg",style:T,borderBottom:"1px solid",borderColor:x==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...y,children:[a.jsxs(h.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(h.Box,{flexShrink:0,children:e??a.jsx(ir,{variant:g==="blue"?"blue":"purple",height:28})}),a.jsx(h.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map(E=>a.jsx(h.Box,{as:"li",children:m(E,a.jsx(h.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:E.isActive?k.hover:"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:k.hover,bg:k.hoverBg},_dark:{_hover:{bg:k.hoverBgDark}},cursor:"pointer",children:E.label}))},E.href))}),a.jsx(h.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:f??a.jsx(O,{})}),a.jsx(h.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,style:{flexShrink:0,position:"relative",width:32,height:32},children:a.jsx(ko,{mode:"wait",initial:!1,children:v?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(ay,{color:k.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(sy,{color:k.solid})},"hamburger")})})]}),a.jsx(ko,{children:v&&a.jsx(Tt.div,{variants:ey,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:a.jsxs(h.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[a.jsx(Tt.ul,{variants:ty,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(E=>a.jsx(Tt.li,{variants:ny,children:m(E,a.jsx(h.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:E.isActive?k.hover:"text.body",borderRadius:"md",_hover:{color:k.hover,bg:"bg.subtle"},cursor:"pointer",onClick:()=>j(!1),children:E.label}))},E.href))}),a.jsx(Tt.div,{variants:ry,initial:"hidden",animate:"visible",children:a.jsx(h.Box,{mt:"4",children:f??a.jsx(O,{mobile:!0})})})]})},"mobile-menu")})]})}const uy={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)"}},dy=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"})})]})}),fy="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",hy=[{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"}]}],py=[{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"}],my=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],gy=(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 Hd({description:e=fy,logo:t,sections:n=hy,socialLinks:r=py,copyright:i,bottomLinks:o=my,newsletter:s,renderLink:l=gy,colorScheme:u="blue",certifications:d,...c}){const f=new Date().getFullYear(),m=i??`© ${f} MedixDeck Health Solution Ltd. All Rights Reserved.`,[p,g]=S.useState(""),[x,y]=S.useState(!1),[v,j]=S.useState(!1),k=uy[u],{mounted:F,themeMode:B,toggleThemeMode:T}=rr(),O=E=>{E.preventDefault(),s!=null&&s.onSubmit&&p&&(s.onSubmit(p),g(""))};return a.jsx(h.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...c,children:a.jsxs(h.Container,{maxWidth:"7xl",children:[a.jsxs(h.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[a.jsxs(h.Box,{children:[a.jsx(h.Box,{mb:4,children:a.jsx(h.Link,{href:"/",children:t??a.jsx(ir,{variant:u==="blue"?"blue":"purple",height:28})})}),a.jsx(h.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),a.jsx(h.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const E=dy(k.solid);return r.map(A=>a.jsx(h.Link,{href:A.href,target:"_blank",rel:"noopener noreferrer",display:"inline-flex",transition:"transform 0.2s ease, opacity 0.2s ease",_hover:{transform:"translateY(-2px)",opacity:.9},title:A.platform,"aria-label":A.platform,children:E[A.platform]},A.platform))})()})]}),a.jsx(h.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(E=>a.jsxs(h.Box,{children:[a.jsx(h.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:E.title}),a.jsx(h.VStack,{align:"flex-start",gap:3,children:E.links.map(A=>a.jsx(h.Box,{w:"full",children:l(A,a.jsx(h.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:k.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:A.label}))},A.label))})]},E.title))}),!(s!=null&&s.hide)&&a.jsx(h.Box,{children:a.jsxs(h.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[a.jsx(h.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(s==null?void 0:s.title)??"Newsletter"}),a.jsx(h.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(h.Box,{as:"form",onSubmit:O,position:"relative",display:"flex",children:[a.jsx(h.Box,{as:"input",type:"email",value:p,onChange:E=>g(E.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:k.token,boxShadow:`0 0 0 1px ${k.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?k.solidHover:k.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:v?`0 0 0 3px ${k.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:(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(h.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:a.jsxs(h.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[a.jsx(h.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:m}),a.jsxs(h.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[o.map(E=>a.jsx(h.Box,{children:l(E,a.jsx(h.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:E.label}))},E.label)),F&&a.jsx(h.Box,{as:"button",onClick:T,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"?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(h.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:a.jsx(h.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:d.map(E=>{const A=a.jsxs(h.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:E.href?"pointer":"default"},children:[E.imageSrc?a.jsx("img",{src:E.imageSrc,alt:E.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):a.jsx(h.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(h.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:E.name})]},E.name);return E.href?a.jsx(h.Box,{children:l({href:E.href,isExternal:E.isExternal??!0},A)},E.name):a.jsx(h.Box,{children:A},E.name)})})})]})})}Hd.displayName="MedixFooter";const xy=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"})}),yy=(e,t)=>e.href?a.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):a.jsx(a.Fragment,{children:t});function by({items:e,separator:t=xy,renderLink:n=yy,...r}){return a.jsx(h.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(h.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(i,a.jsx(h.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(h.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},o)})})}const vy={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function wy({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,f=x=>{d(x),r==null||r(x)},m=e.find(x=>x.id===c),p=vy[o];return a.jsxs(h.Box,{...l,children:[a.jsx(h.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(h.Box,{role:"tab","aria-selected":y,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onClick:()=>!x.disabled&&f(x.id),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&!x.disabled&&f(x.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:i==="pill"?"4":p.px,py:i==="pill"?"3":p.py,fontFamily:"var(--font-body)",fontWeight:y?"semibold":"medium",fontSize:i==="pill"?"sm":p.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(h.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:x.label}),x.badge!==void 0&&a.jsx(h.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&&(m==null?void 0:m.content)&&a.jsx(h.Box,{role:"tabpanel",mt:"4",children:m.content})]})}function ky(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 Wd({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=ky(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"},f=({children:g,disabled:x,onClick:y,label:v,icon:j,isNext:k})=>a.jsxs(h.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:[!k&&j&&a.jsx(h.Box,{as:"span",display:"flex",alignItems:"center",children:j}),g,k&&j&&a.jsx(h.Box,{as:"span",display:"flex",alignItems:"center",children:j})]}),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:"M15 18l-6-6 6-6"})}),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:"M9 18l6-6-6-6"})});return a.jsxs(h.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...l,children:[o&&a.jsx(f,{disabled:n===1,onClick:()=>r==null?void 0:r(1),label:"First page",icon:m,children:"First"}),a.jsx(f,{disabled:n===1,onClick:()=>r==null?void 0:r(n-1),label:"Previous page",icon:m,children:"Prev"}),!s&&d.map((g,x)=>g==="..."?a.jsx(h.Box,{...c,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${x}`):a.jsx(h.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(h.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",u]}),a.jsx(f,{disabled:n===u,onClick:()=>r==null?void 0:r(n+1),label:"Next page",icon:p,isNext:!0,children:"Next"}),o&&a.jsx(f,{disabled:n===u,onClick:()=>r==null?void 0:r(u),label:"Last page",icon:p,isNext:!0,children:"Last"})]})}const Al=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 Sy({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(h.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...o,children:e.map((d,c)=>{const f=c+1<t,m=c+1===t,p=c===e.length-1,g=f||m?s:"var(--chakra-colors-border, #E2E8F0)";return a.jsxs(h.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[a.jsxs(h.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[a.jsx(h.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:f||m?s:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:f?Al:d.icon??c+1}),!p&&a.jsx(h.Box,{w:"2px",flex:"1",minH:"8",bg:f?s:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&a.jsxs(h.Box,{pt:"1",pb:p?"0":"8",children:[a.jsx(h.Box,{fontSize:"sm",fontWeight:m?"semibold":"medium",color:f||m?s:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:d.title}),d.description&&a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:d.description})]})]},d.id)})}):a.jsx(h.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...o,children:e.map((d,c)=>{const f=c+1<t,m=c+1===t,p=c+1>t,g=c===e.length-1,x=p?"bg.subtle":s,y=f?Al:d.icon?d.icon:a.jsx(h.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:p?"text.muted":"white",lineHeight:"1",children:c+1}),v=!p&&n!=="compact",j=p?"text.muted":s;return a.jsxs(S.Fragment,{children:[a.jsx(h.Box,{role:"listitem","aria-current":m?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:a.jsxs(h.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:[a.jsx(h.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:x,border:p?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:y}),n!=="compact"&&a.jsx(h.Box,{as:"span",fontSize:"sm",fontWeight:m||f?"semibold":"medium",fontFamily:"var(--font-body)",color:j,whiteSpace:"nowrap",transition:"color 0.25s",children:d.title})]})}),!g&&a.jsx(h.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:a.jsx(h.Box,{h:"1.5px",w:"10",bg:f?s:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},d.id)})})}const Cy=`
|
|
326
352
|
@keyframes medix-shimmer {
|
|
327
353
|
0% { transform: translateX(-100%); }
|
|
328
354
|
100% { transform: translateX(100%); }
|
|
329
355
|
}
|
|
330
|
-
`;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=
|
|
356
|
+
`;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=Cy,document.head.appendChild(t)}}const Kt=S.forwardRef(({isLoaded:e=!1,children:t,...n},r)=>e?a.jsx(a.Fragment,{children:t}):a.jsx(h.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}));Kt.displayName="MedixSkeleton";function Ud({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...r}){return a.jsx(h.Box,{display:"flex",flexDirection:"column",gap:t,...r,children:Array.from({length:e}).map((i,o)=>a.jsx(Kt,{h:"3",w:o===e-1?n:"100%",borderRadius:"full"},o))})}function Ty({...e}){return a.jsxs(h.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[a.jsx(Kt,{h:"48",borderRadius:"md",mb:"4"}),a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[a.jsx(Kt,{w:"10",h:"10",borderRadius:"full"}),a.jsxs(h.Box,{flex:"1",children:[a.jsx(Kt,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),a.jsx(Kt,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),a.jsx(Ud,{lines:2})]})}const jy={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},Ey={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=`
|
|
331
357
|
@keyframes medix-indeterminate {
|
|
332
358
|
0% { left: -40%; }
|
|
333
359
|
100% { left: 100%; }
|
|
334
360
|
}
|
|
335
|
-
`,document.head.appendChild(t)}}const Nd=T.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:r=!1,animated:i=!0,isIndeterminate:o=!1,...s},l)=>{const c=Math.min(100,Math.max(0,e)),d=xy[t],u=yy[n];return a.jsxs(h.Box,{ref:l,w:"100%",...s,children:[r&&a.jsxs(h.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:[c,"%"]})]}),a.jsx(h.Box,{w:"100%",h:u,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:o?a.jsx(h.Box,{position:"absolute",h:"100%",w:"40%",bg:d,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):a.jsx(h.Box,{h:"100%",w:`${c}%`,bg:d,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});Nd.displayName="MedixProgress";const by={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function vy({isOpen:e,onClose:t,title:n,description:r,size:i="md",closeOnOverlayClick:o=!0,closeOnEscape:s=!0,footer:l,children:c}){const d=!!(n||r);return a.jsxs(h.DialogRoot,{open:e,onOpenChange:u=>{u.open||t()},closeOnInteractOutside:o,closeOnEscape:s,size:by[i],children:[a.jsx(h.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),a.jsx(h.DialogPositioner,{display:"flex",alignItems:"center",justifyContent:"center",children:a.jsxs(h.DialogContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"none",children:[a.jsxs(h.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:[d&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&a.jsx(h.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),r&&a.jsx(h.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:r})]}),a.jsx(h.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(h.DialogBody,{px:"6",py:"5",children:c}),l&&a.jsx(h.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:l})]})})]})}function wy({label:e,children:t,placement:n="top",...r}){return a.jsxs(h.Tooltip.Root,{positioning:{placement:n},...r,children:[a.jsx(h.Tooltip.Trigger,{asChild:!0,children:a.jsx("span",{style:{display:"inline-flex"},children:t})}),a.jsx(h.Tooltip.Positioner,{children:a.jsx(h.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 ky({icon:e,title:t,description:n,actionLabel:r,onAction:i,secondaryLabel:o,onSecondaryAction:s,...l}){return a.jsxs(h.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&a.jsx(h.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(h.Box,{children:[a.jsx(h.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&a.jsx(h.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(r||o)&&a.jsxs(h.Box,{display:"flex",gap:"3",mt:"2",children:[r&&a.jsx(We,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&a.jsx(We,{variant:"ghost",colorScheme:"blue",onClick:s,children:o})]})]})}function Sy({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(h.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[a.jsx(h.Box,{fontSize:"8xl",fontWeight:"bold",color:"blue.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),a.jsx(h.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),a.jsx(h.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(h.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(h.Box,{display:"flex",gap:"4",children:[r&&a.jsx(We,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&a.jsx(We,{variant:"outline",colorScheme:"blue",onClick:s,children:o})]})]})}function Cy({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(h.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[a.jsx(h.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(h.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),a.jsx(h.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(h.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(h.Box,{display:"flex",gap:"4",children:[r&&a.jsx(We,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&a.jsx(We,{variant:"outline",colorScheme:"blue",onClick:s,children:o})]})]})}const Ty={left:"start",right:"end",top:"top",bottom:"bottom"};function jy({isOpen:e,onClose:t,title:n,placement:r="right",size:i="md",closeOnOverlayClick:o=!0,closeOnEscape:s=!0,footer:l,children:c}){const d=Ty[r]??"end";return a.jsxs(h.DrawerRoot,{open:e,onOpenChange:u=>{u.open||t()},placement:d,size:i,closeOnInteractOutside:o,closeOnEscape:s,children:[a.jsx(h.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),a.jsx(h.DrawerPositioner,{children:a.jsxs(h.DrawerContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",children:[a.jsxs(h.DrawerHeader,{borderBottom:n?"1px solid":"none",borderColor:"border",px:"6",py:"4",position:"relative",minH:n?void 0:"12",children:[n&&a.jsx(h.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",pr:"8",children:n}),a.jsx(h.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(h.DrawerBody,{px:"6",py:"5",children:c}),l&&a.jsx(h.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 wr(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 Ay={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 vo(e,t){function n(i,o,s){if(!(typeof document>"u")){s=wr({},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 c in s)s[c]&&(l+="; "+c,s[c]!==!0&&(l+="="+s[c].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 c=o[l].split("="),d=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=e.read(d,u),i===u)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",wr({},o,{expires:-1}))},withAttributes:function(i){return vo(this.converter,wr({},this.attributes,i))},withConverter:function(i){return vo(wr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Gr=vo(Ay,{path:"/"});const Ey=({condition:e,wrapper:t,children:n})=>e?t(n):n,wo={TOP:"top",BOTTOM:"bottom"};var bs=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(bs||{});const ko={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},Vd="CookieConsent",Fy=({children:e,...t})=>T.createElement("button",{...t},e),Vn={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:wo.BOTTOM,visible:ko.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:Vd,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:bs.LAX,ButtonComponent:Fy,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:{}},By={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)"}},Ly=(e=Vd)=>{const t=Gr.get(e);return t===void 0?Gr.get(Hd(e)):t},Hd=e=>`${e}-legacy`,Wd=class extends T.Component{constructor(){super(...arguments),this.state=By,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...Vn,...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}={...Vn,...this.props};this.setCookie(n,r),o(t??!1),i&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...Vn,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:r,onDecline:i,setDeclineCookie:o}={...Vn,...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===bs.NONE&&Gr.set(Hd(t),n,l),Gr.set(t,n,l)}getCookieValue(){const{cookieName:t}=this.props;return Ly(t)}render(){switch(this.props.visible){case ko.HIDDEN:return null;case ko.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:c,containerClasses:d,contentClasses:u,buttonClasses:f,buttonWrapperClasses:p,declineButtonClasses:m,buttonId:g,declineButtonId:x,disableButtonStyles:y,enableDeclineButton:b,flipButtons:j,ButtonComponent:k,overlay:B,overlayClasses:A,overlayStyle:w,ariaAcceptLabel:M,ariaDeclineLabel:F,customContainerAttributes:E,customContentAttributes:L,customButtonProps:D,customDeclineButtonProps:P,customButtonWrapperAttributes:V}=this.props;let _={},I={},R={},W={},Y={};switch(s?(_=Object.assign({},n),I=Object.assign({},r),R=Object.assign({},i),W=Object.assign({},o),Y=Object.assign({},w)):(_=Object.assign({},{...this.state.style,...n}),W=Object.assign({},{...this.state.contentStyle,...o}),Y=Object.assign({},{...this.state.overlayStyle,...w}),y?(I=Object.assign({},r),R=Object.assign({},i)):(I=Object.assign({},{...this.state.buttonStyle,...r}),R=Object.assign({},{...this.state.declineButtonStyle,...i}))),t){case wo.TOP:_.top="0";break;case wo.BOTTOM:_.bottom="0";break}const Z=[];return b&&Z.push(T.createElement(k,{key:"declineButton",style:R,className:m,id:x,"aria-label":F,onClick:()=>{this.decline()},...P},c)),Z.push(T.createElement(k,{key:"acceptButton",style:I,className:f,id:g,"aria-label":M,onClick:()=>{this.accept()},...D},l)),j&&Z.reverse(),T.createElement(Ey,{condition:B,wrapper:S=>T.createElement("div",{style:Y,className:A,onClick:()=>{this.overlayClick()},onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},S)},T.createElement("div",{className:`${d}`,style:_,...E},T.createElement("div",{style:W,className:u,...L},this.props.children),T.createElement("div",{className:`${p}`,...V},Z.map(S=>S))))}};Wd.defaultProps=Vn;let Iy=Wd;function Ud({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:r=!0,children:i,...o}){const s=Oo(),l=s?"#152035":"#F6F6F6",c=s?"#ABC0D6":"#3D4F63",d=s?"#1E3050":"#E4E8F0";return a.jsxs(a.Fragment,{children:[a.jsx("style",{children:`
|
|
361
|
+
`,document.head.appendChild(t)}}const $d=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=jy[t],c=Ey[n];return a.jsxs(h.Box,{ref:l,w:"100%",...s,children:[r&&a.jsxs(h.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(h.Box,{w:"100%",h:c,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:o?a.jsx(h.Box,{position:"absolute",h:"100%",w:"40%",bg:d,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):a.jsx(h.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"})})]})});$d.displayName="MedixProgress";const Ay={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function Fy({isOpen:e,onClose:t,title:n,description:r,size:i="md",closeOnOverlayClick:o=!0,closeOnEscape:s=!0,footer:l,children:u}){const d=!!(n||r);return a.jsxs(h.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:o,closeOnEscape:s,size:Ay[i],children:[a.jsx(h.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),a.jsx(h.DialogPositioner,{display:"flex",alignItems:"center",justifyContent:"center",children:a.jsxs(h.DialogContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"none",children:[a.jsxs(h.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:[d&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&a.jsx(h.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),r&&a.jsx(h.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:r})]}),a.jsx(h.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(h.DialogBody,{px:"6",py:"5",children:u}),l&&a.jsx(h.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:l})]})})]})}function By({label:e,children:t,placement:n="top",...r}){return a.jsxs(h.Tooltip.Root,{positioning:{placement:n},...r,children:[a.jsx(h.Tooltip.Trigger,{asChild:!0,children:a.jsx("span",{style:{display:"inline-flex"},children:t})}),a.jsx(h.Tooltip.Positioner,{children:a.jsx(h.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 Ly({icon:e,title:t,description:n,actionLabel:r,onAction:i,secondaryLabel:o,onSecondaryAction:s,...l}){return a.jsxs(h.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&a.jsx(h.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(h.Box,{children:[a.jsx(h.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&a.jsx(h.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(r||o)&&a.jsxs(h.Box,{display:"flex",gap:"3",mt:"2",children:[r&&a.jsx(Ge,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&a.jsx(Ge,{variant:"ghost",colorScheme:"blue",onClick:s,children:o})]})]})}function Iy({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(h.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[a.jsx(h.Box,{fontSize:"8xl",fontWeight:"bold",color:"blue.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),a.jsx(h.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),a.jsx(h.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(h.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(h.Box,{display:"flex",gap:"4",children:[r&&a.jsx(Ge,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&a.jsx(Ge,{variant:"outline",colorScheme:"blue",onClick:s,children:o})]})]})}function Dy({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(h.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[a.jsx(h.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(h.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),a.jsx(h.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(h.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(h.Box,{display:"flex",gap:"4",children:[r&&a.jsx(Ge,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&a.jsx(Ge,{variant:"outline",colorScheme:"blue",onClick:s,children:o})]})]})}const Ry={left:"start",right:"end",top:"top",bottom:"bottom"};function My({isOpen:e,onClose:t,title:n,placement:r="right",size:i="md",closeOnOverlayClick:o=!0,closeOnEscape:s=!0,footer:l,children:u}){const d=Ry[r]??"end";return a.jsxs(h.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:d,size:i,closeOnInteractOutside:o,closeOnEscape:s,children:[a.jsx(h.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),a.jsx(h.DrawerPositioner,{children:a.jsxs(h.DrawerContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",children:[a.jsxs(h.DrawerHeader,{borderBottom:n?"1px solid":"none",borderColor:"border",px:"6",py:"4",position:"relative",minH:n?void 0:"12",children:[n&&a.jsx(h.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",pr:"8",children:n}),a.jsx(h.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(h.DrawerBody,{px:"6",py:"5",children:u}),l&&a.jsx(h.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 Tr(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 Py={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 To(e,t){function n(i,o,s){if(!(typeof document>"u")){s=Tr({},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,"",Tr({},o,{expires:-1}))},withAttributes:function(i){return To(this.converter,Tr({},this.attributes,i))},withConverter:function(i){return To(Tr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Xr=To(Py,{path:"/"});const Oy=({condition:e,wrapper:t,children:n})=>e?t(n):n,jo={TOP:"top",BOTTOM:"bottom"};var Cs=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(Cs||{});const Eo={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},Gd="CookieConsent",zy=({children:e,...t})=>S.createElement("button",{...t},e),Un={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:jo.BOTTOM,visible:Eo.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:Gd,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:Cs.LAX,ButtonComponent:zy,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:{}},_y={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)"}},Ny=(e=Gd)=>{const t=Xr.get(e);return t===void 0?Xr.get(Yd(e)):t},Yd=e=>`${e}-legacy`,Kd=class extends S.Component{constructor(){super(...arguments),this.state=_y,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...Un,...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}={...Un,...this.props};this.setCookie(n,r),o(t??!1),i&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...Un,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:r,onDecline:i,setDeclineCookie:o}={...Un,...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===Cs.NONE&&Xr.set(Yd(t),n,l),Xr.set(t,n,l)}getCookieValue(){const{cookieName:t}=this.props;return Ny(t)}render(){switch(this.props.visible){case Eo.HIDDEN:return null;case Eo.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:f,buttonWrapperClasses:m,declineButtonClasses:p,buttonId:g,declineButtonId:x,disableButtonStyles:y,enableDeclineButton:v,flipButtons:j,ButtonComponent:k,overlay:F,overlayClasses:B,overlayStyle:T,ariaAcceptLabel:O,ariaDeclineLabel:E,customContainerAttributes:A,customContentAttributes:L,customButtonProps:M,customDeclineButtonProps:R,customButtonWrapperAttributes:V}=this.props;let _={},I={},D={},U={},W={};switch(s?(_=Object.assign({},n),I=Object.assign({},r),D=Object.assign({},i),U=Object.assign({},o),W=Object.assign({},T)):(_=Object.assign({},{...this.state.style,...n}),U=Object.assign({},{...this.state.contentStyle,...o}),W=Object.assign({},{...this.state.overlayStyle,...T}),y?(I=Object.assign({},r),D=Object.assign({},i)):(I=Object.assign({},{...this.state.buttonStyle,...r}),D=Object.assign({},{...this.state.declineButtonStyle,...i}))),t){case jo.TOP:_.top="0";break;case jo.BOTTOM:_.bottom="0";break}const G=[];return v&&G.push(S.createElement(k,{key:"declineButton",style:D,className:p,id:x,"aria-label":E,onClick:()=>{this.decline()},...R},u)),G.push(S.createElement(k,{key:"acceptButton",style:I,className:f,id:g,"aria-label":O,onClick:()=>{this.accept()},...M},l)),j&&G.reverse(),S.createElement(Oy,{condition:F,wrapper:b=>S.createElement("div",{style:W,className:B,onClick:()=>{this.overlayClick()},onKeyDown:K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},b)},S.createElement("div",{className:`${d}`,style:_,...A},S.createElement("div",{style:U,className:c,...L},this.props.children),S.createElement("div",{className:`${m}`,...V},G.map(b=>b))))}};Kd.defaultProps=Un;let Vy=Kd;function qd({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:r=!0,children:i,...o}){const s=Ho(),l=s?"#152035":"#F6F6F6",u=s?"#ABC0D6":"#3D4F63",d=s?"#1E3050":"#E4E8F0";return a.jsxs(a.Fragment,{children:[a.jsx("style",{children:`
|
|
336
362
|
.medixdeck-cookie-banner {
|
|
337
363
|
background-color: ${l} !important;
|
|
338
|
-
color: ${
|
|
364
|
+
color: ${u} !important;
|
|
339
365
|
border-top: 1px solid ${d} !important;
|
|
340
366
|
padding: 1rem 1.5rem !important;
|
|
341
367
|
display: flex !important;
|
|
@@ -369,20 +395,20 @@
|
|
|
369
395
|
align-items: center !important;
|
|
370
396
|
flex-wrap: wrap !important;
|
|
371
397
|
}
|
|
372
|
-
`}),a.jsx(
|
|
373
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uy(e,t){return Vy(e)||Hy(e,t)||$y(e,t)||Wy()}function $y(e,t){if(e){if(typeof e=="string")return Cl(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)?Cl(e,t):void 0}}const Yd=Object.entries,Tl=Object.setPrototypeOf,Gy=Object.isFrozen,Yy=Object.getPrototypeOf,Ky=Object.getOwnPropertyDescriptor;let Ne=Object.freeze,rt=Object.seal,pn=Object.create,Kd=typeof Reflect<"u"&&Reflect,So=Kd.apply,Co=Kd.construct;Ne||(Ne=function(t){return t});rt||(rt=function(t){return t});So||(So=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)});Co||(Co=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 Wt=Se(Array.prototype.forEach),qy=Se(Array.prototype.lastIndexOf),jl=Se(Array.prototype.pop),an=Se(Array.prototype.push),Xy=Se(Array.prototype.splice),Oe=Array.isArray,Hn=Se(String.prototype.toLowerCase),Fi=Se(String.prototype.toString),Al=Se(String.prototype.match),ln=Se(String.prototype.replace),El=Se(String.prototype.indexOf),Zy=Se(String.prototype.trim),Jy=Se(Number.prototype.toString),Qy=Se(Boolean.prototype.toString),Fl=typeof BigInt>"u"?null:Se(BigInt.prototype.toString),Bl=typeof Symbol>"u"?null:Se(Symbol.prototype.toString),be=Se(Object.prototype.hasOwnProperty),Rn=Se(Object.prototype.toString),Le=Se(RegExp.prototype.test),cn=e2(TypeError);function Se(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 So(e,t,r)}}function e2(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Co(e,n)}}function te(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hn;if(Tl&&Tl(e,null),!Oe(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const o=n(i);o!==i&&(Gy(t)||(t[r]=o),i=o)}e[i]=!0}return e}function t2(e){for(let t=0;t<e.length;t++)be(e,t)||(e[t]=null);return e}function Me(e){const t=pn(null);for(const r of Yd(e)){var n=Uy(r,2);const i=n[0],o=n[1];be(e,i)&&(Oe(o)?t[i]=t2(o):o&&typeof o=="object"&&o.constructor===Object?t[i]=Me(o):t[i]=o)}return t}function n2(e){switch(typeof e){case"string":return e;case"number":return Jy(e);case"boolean":return Qy(e);case"bigint":return Fl?Fl(e):"0";case"symbol":return Bl?Bl(e):"Symbol()";case"undefined":return Rn(e);case"function":case"object":{if(e===null)return Rn(e);const t=e,n=pt(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Rn(r)}return Rn(e)}default:return Rn(e)}}function pt(e,t){for(;e!==null;){const r=Ky(e,t);if(r){if(r.get)return Se(r.get);if(typeof r.value=="function")return Se(r.value)}e=Yy(e)}function n(){return null}return n}function r2(e){try{return Le(e,""),!0}catch{return!1}}const Ll=Ne(["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"]),Bi=Ne(["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"]),Li=Ne(["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"]),i2=Ne(["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"]),Ii=Ne(["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"]),o2=Ne(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Il=Ne(["#text"]),Dl=Ne(["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"]),Di=Ne(["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"]),Rl=Ne(["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"]),kr=Ne(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),s2=rt(/{{[\w\W]*|^[\w\W]*}}/g),a2=rt(/<%[\w\W]*|^[\w\W]*%>/g),l2=rt(/\${[\w\W]*/g),c2=rt(/^data-[\-\w.\u00B7-\uFFFF]+$/),u2=rt(/^aria-[\-\w]+$/),Ml=rt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),d2=rt(/^(?:\w+script|data):/i),f2=rt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),h2=rt(/^html$/i),p2=rt(/^[a-z][.\w]*(-[.\w]+)+$/i),ht={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},m2=function(){return typeof window>"u"?null:window},g2=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}},Pl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function qd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m2();const t=X=>qd(X);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==ht.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,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const u=e.DOMParser,f=e.trustedTypes,p=l.prototype,m=pt(p,"cloneNode"),g=pt(p,"remove"),x=pt(p,"nextSibling"),y=pt(p,"childNodes"),b=pt(p,"parentNode"),j=pt(p,"shadowRoot"),k=pt(p,"attributes"),B=s&&s.prototype?pt(s.prototype,"nodeType"):null,A=s&&s.prototype?pt(s.prototype,"nodeName"):null;if(typeof o=="function"){const X=n.createElement("template");X.content&&X.content.ownerDocument&&(n=X.content.ownerDocument)}let w,M="",F=0;const E=function(v){if(F>0)throw cn('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.');F++;try{return w.createHTML(v)}finally{F--}},L=n,D=L.implementation,P=L.createNodeIterator,V=L.createDocumentFragment,_=L.getElementsByTagName,I=r.importNode;let R=Pl();t.isSupported=typeof Yd=="function"&&typeof b=="function"&&D&&D.createHTMLDocument!==void 0;const W=s2,Y=a2,Z=l2,S=c2,q=u2,oe=d2,C=f2,Re=p2;let Xe=Ml,$=null;const me=te({},[...Ll,...Bi,...Li,...Ii,...Il]);let ie=null;const ye=te({},[...Dl,...Di,...Rl,...kr]);let ce=Object.seal(pn(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,kt=null;const ct=Object.seal(pn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let lr=!0,Qt=!0,En=!1,Fn=!0,ut=!1,At=!0,dt=!1,Bn=!1,Ln=!1,Et=!1,en=!1,tn=!1,O=!0,U=!1;const Q="user-content-";let ne=!0,se=!1,Ae={},Ee=null;const Ye=te({},["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 Ft=null;const Bt=te({},["audio","video","img","source","image","track"]);let Be=null;const St=te({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",cr="http://www.w3.org/2000/svg",ft="http://www.w3.org/1999/xhtml";let nn=ft,ri=!1,ii=null;const Df=te({},[Ve,cr,ft],Fi);let oi=te({},["mi","mo","mn","ms","mtext"]),si=te({},["annotation-xml"]);const Rf=te({},["title","style","font","a","script"]);let In=null;const Mf=["application/xhtml+xml","text/html"],Pf="text/html";let ve=null,rn=null;const Of=n.createElement("form"),Rs=function(v){return v instanceof RegExp||v instanceof Function},ai=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(rn&&rn===v)return;(!v||typeof v!="object")&&(v={}),v=Me(v),In=Mf.indexOf(v.PARSER_MEDIA_TYPE)===-1?Pf:v.PARSER_MEDIA_TYPE,ve=In==="application/xhtml+xml"?Fi:Hn,$=be(v,"ALLOWED_TAGS")&&Oe(v.ALLOWED_TAGS)?te({},v.ALLOWED_TAGS,ve):me,ie=be(v,"ALLOWED_ATTR")&&Oe(v.ALLOWED_ATTR)?te({},v.ALLOWED_ATTR,ve):ye,ii=be(v,"ALLOWED_NAMESPACES")&&Oe(v.ALLOWED_NAMESPACES)?te({},v.ALLOWED_NAMESPACES,Fi):Df,Be=be(v,"ADD_URI_SAFE_ATTR")&&Oe(v.ADD_URI_SAFE_ATTR)?te(Me(St),v.ADD_URI_SAFE_ATTR,ve):St,Ft=be(v,"ADD_DATA_URI_TAGS")&&Oe(v.ADD_DATA_URI_TAGS)?te(Me(Bt),v.ADD_DATA_URI_TAGS,ve):Bt,Ee=be(v,"FORBID_CONTENTS")&&Oe(v.FORBID_CONTENTS)?te({},v.FORBID_CONTENTS,ve):Ye,Ze=be(v,"FORBID_TAGS")&&Oe(v.FORBID_TAGS)?te({},v.FORBID_TAGS,ve):Me({}),kt=be(v,"FORBID_ATTR")&&Oe(v.FORBID_ATTR)?te({},v.FORBID_ATTR,ve):Me({}),Ae=be(v,"USE_PROFILES")?v.USE_PROFILES&&typeof v.USE_PROFILES=="object"?Me(v.USE_PROFILES):v.USE_PROFILES:!1,lr=v.ALLOW_ARIA_ATTR!==!1,Qt=v.ALLOW_DATA_ATTR!==!1,En=v.ALLOW_UNKNOWN_PROTOCOLS||!1,Fn=v.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ut=v.SAFE_FOR_TEMPLATES||!1,At=v.SAFE_FOR_XML!==!1,dt=v.WHOLE_DOCUMENT||!1,Et=v.RETURN_DOM||!1,en=v.RETURN_DOM_FRAGMENT||!1,tn=v.RETURN_TRUSTED_TYPE||!1,Ln=v.FORCE_BODY||!1,O=v.SANITIZE_DOM!==!1,U=v.SANITIZE_NAMED_PROPS||!1,ne=v.KEEP_CONTENT!==!1,se=v.IN_PLACE||!1,Xe=r2(v.ALLOWED_URI_REGEXP)?v.ALLOWED_URI_REGEXP:Ml,nn=typeof v.NAMESPACE=="string"?v.NAMESPACE:ft,oi=be(v,"MATHML_TEXT_INTEGRATION_POINTS")&&v.MATHML_TEXT_INTEGRATION_POINTS&&typeof v.MATHML_TEXT_INTEGRATION_POINTS=="object"?Me(v.MATHML_TEXT_INTEGRATION_POINTS):te({},["mi","mo","mn","ms","mtext"]),si=be(v,"HTML_INTEGRATION_POINTS")&&v.HTML_INTEGRATION_POINTS&&typeof v.HTML_INTEGRATION_POINTS=="object"?Me(v.HTML_INTEGRATION_POINTS):te({},["annotation-xml"]);const z=be(v,"CUSTOM_ELEMENT_HANDLING")&&v.CUSTOM_ELEMENT_HANDLING&&typeof v.CUSTOM_ELEMENT_HANDLING=="object"?Me(v.CUSTOM_ELEMENT_HANDLING):pn(null);if(ce=pn(null),be(z,"tagNameCheck")&&Rs(z.tagNameCheck)&&(ce.tagNameCheck=z.tagNameCheck),be(z,"attributeNameCheck")&&Rs(z.attributeNameCheck)&&(ce.attributeNameCheck=z.attributeNameCheck),be(z,"allowCustomizedBuiltInElements")&&typeof z.allowCustomizedBuiltInElements=="boolean"&&(ce.allowCustomizedBuiltInElements=z.allowCustomizedBuiltInElements),ut&&(Qt=!1),en&&(Et=!0),Ae&&($=te({},Il),ie=pn(null),Ae.html===!0&&(te($,Ll),te(ie,Dl)),Ae.svg===!0&&(te($,Bi),te(ie,Di),te(ie,kr)),Ae.svgFilters===!0&&(te($,Li),te(ie,Di),te(ie,kr)),Ae.mathMl===!0&&(te($,Ii),te(ie,Rl),te(ie,kr))),ct.tagCheck=null,ct.attributeCheck=null,be(v,"ADD_TAGS")&&(typeof v.ADD_TAGS=="function"?ct.tagCheck=v.ADD_TAGS:Oe(v.ADD_TAGS)&&($===me&&($=Me($)),te($,v.ADD_TAGS,ve))),be(v,"ADD_ATTR")&&(typeof v.ADD_ATTR=="function"?ct.attributeCheck=v.ADD_ATTR:Oe(v.ADD_ATTR)&&(ie===ye&&(ie=Me(ie)),te(ie,v.ADD_ATTR,ve))),be(v,"ADD_URI_SAFE_ATTR")&&Oe(v.ADD_URI_SAFE_ATTR)&&te(Be,v.ADD_URI_SAFE_ATTR,ve),be(v,"FORBID_CONTENTS")&&Oe(v.FORBID_CONTENTS)&&(Ee===Ye&&(Ee=Me(Ee)),te(Ee,v.FORBID_CONTENTS,ve)),be(v,"ADD_FORBID_CONTENTS")&&Oe(v.ADD_FORBID_CONTENTS)&&(Ee===Ye&&(Ee=Me(Ee)),te(Ee,v.ADD_FORBID_CONTENTS,ve)),ne&&($["#text"]=!0),dt&&te($,["html","head","body"]),$.table&&(te($,["tbody"]),delete Ze.tbody),v.TRUSTED_TYPES_POLICY){if(typeof v.TRUSTED_TYPES_POLICY.createHTML!="function")throw cn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof v.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw cn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const G=w;w=v.TRUSTED_TYPES_POLICY;try{M=E("")}catch(ae){throw w=G,ae}}else w===void 0&&v.TRUSTED_TYPES_POLICY!==null&&(w=g2(f,i)),w&&typeof M=="string"&&(M=E(""));(R.uponSanitizeElement.length>0||R.uponSanitizeAttribute.length>0)&&$===me&&($=Me($)),R.uponSanitizeAttribute.length>0&&ie===ye&&(ie=Me(ie)),Ne&&Ne(v),rn=v},Ms=te({},[...Bi,...Li,...i2]),Ps=te({},[...Ii,...o2]),zf=function(v){let z=b(v);(!z||!z.tagName)&&(z={namespaceURI:nn,tagName:"template"});const G=Hn(v.tagName),ae=Hn(z.tagName);return ii[v.namespaceURI]?v.namespaceURI===cr?z.namespaceURI===ft?G==="svg":z.namespaceURI===Ve?G==="svg"&&(ae==="annotation-xml"||oi[ae]):!!Ms[G]:v.namespaceURI===Ve?z.namespaceURI===ft?G==="math":z.namespaceURI===cr?G==="math"&&si[ae]:!!Ps[G]:v.namespaceURI===ft?z.namespaceURI===cr&&!si[ae]||z.namespaceURI===Ve&&!oi[ae]?!1:!Ps[G]&&(Rf[G]||!Ms[G]):!!(In==="application/xhtml+xml"&&ii[v.namespaceURI]):!1},it=function(v){an(t.removed,{element:v});try{b(v).removeChild(v)}catch{g(v)}},_t=function(v,z){try{an(t.removed,{attribute:z.getAttributeNode(v),from:z})}catch{an(t.removed,{attribute:null,from:z})}if(z.removeAttribute(v),v==="is")if(Et||en)try{it(z)}catch{}else try{z.setAttribute(v,"")}catch{}},Os=function(v){let z=null,G=null;if(Ln)v="<remove></remove>"+v;else{const ue=Al(v,/^[\r\n\t ]+/);G=ue&&ue[0]}In==="application/xhtml+xml"&&nn===ft&&(v='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+v+"</body></html>");const ae=w?E(v):v;if(nn===ft)try{z=new u().parseFromString(ae,In)}catch{}if(!z||!z.documentElement){z=D.createDocument(nn,"template",null);try{z.documentElement.innerHTML=ri?M:ae}catch{}}const re=z.body||z.documentElement;return v&&G&&re.insertBefore(n.createTextNode(G),re.childNodes[0]||null),nn===ft?_.call(z,dt?"html":"body")[0]:dt?z.documentElement:re},zs=function(v){return P.call(v.ownerDocument||v,v,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},li=function(v){var z,G;v.normalize();const ae=P.call(v.ownerDocument||v,v,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let re=ae.nextNode();for(;re;){let Te=re.data;Wt([W,Y,Z],Je=>{Te=ln(Te,Je," ")}),re.data=Te,re=ae.nextNode()}const ue=(z=(G=v.querySelectorAll)===null||G===void 0?void 0:G.call(v,"template"))!==null&&z!==void 0?z:[];Wt(Array.from(ue),Te=>{on(Te.content)&&li(Te.content)})},ur=function(v){const z=A?A(v):null;return typeof z!="string"||ve(z)!=="form"?!1:typeof v.nodeName!="string"||typeof v.textContent!="string"||typeof v.removeChild!="function"||v.attributes!==k(v)||typeof v.removeAttribute!="function"||typeof v.setAttribute!="function"||typeof v.namespaceURI!="string"||typeof v.insertBefore!="function"||typeof v.hasChildNodes!="function"||v.nodeType!==B(v)||v.childNodes!==y(v)},on=function(v){if(!B||typeof v!="object"||v===null)return!1;try{return B(v)===ht.documentFragment}catch{return!1}},dr=function(v){if(!B||typeof v!="object"||v===null)return!1;try{return typeof B(v)=="number"}catch{return!1}};function Ct(X,v,z){Wt(X,G=>{G.call(t,v,z,rn)})}const _s=function(v){let z=null;if(Ct(R.beforeSanitizeElements,v,null),ur(v))return it(v),!0;const G=ve(A?A(v):v.nodeName);if(Ct(R.uponSanitizeElement,v,{tagName:G,allowedTags:$}),At&&v.hasChildNodes()&&!dr(v.firstElementChild)&&Le(/<[/\w!]/g,v.innerHTML)&&Le(/<[/\w!]/g,v.textContent)||At&&v.namespaceURI===ft&&G==="style"&&dr(v.firstElementChild)||v.nodeType===ht.progressingInstruction||At&&v.nodeType===ht.comment&&Le(/<[/\w]/g,v.data))return it(v),!0;if(Ze[G]||!(ct.tagCheck instanceof Function&&ct.tagCheck(G))&&!$[G]){if(!Ze[G]&&Vs(G)&&(ce.tagNameCheck instanceof RegExp&&Le(ce.tagNameCheck,G)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(G)))return!1;if(ne&&!Ee[G]){const re=b(v),ue=y(v);if(ue&&re){const Te=ue.length;for(let Je=Te-1;Je>=0;--Je){const ot=m(ue[Je],!0);re.insertBefore(ot,x(v))}}}return it(v),!0}return(B?B(v):v.nodeType)===ht.element&&!zf(v)||(G==="noscript"||G==="noembed"||G==="noframes")&&Le(/<\/no(script|embed|frames)/i,v.innerHTML)?(it(v),!0):(ut&&v.nodeType===ht.text&&(z=v.textContent,Wt([W,Y,Z],re=>{z=ln(z,re," ")}),v.textContent!==z&&(an(t.removed,{element:v.cloneNode()}),v.textContent=z)),Ct(R.afterSanitizeElements,v,null),!1)},Ns=function(v,z,G){if(kt[z]||O&&(z==="id"||z==="name")&&(G in n||G in Of))return!1;const ae=ie[z]||ct.attributeCheck instanceof Function&&ct.attributeCheck(z,v);if(!(Qt&&!kt[z]&&Le(S,z))){if(!(lr&&Le(q,z))){if(!ae||kt[z]){if(!(Vs(v)&&(ce.tagNameCheck instanceof RegExp&&Le(ce.tagNameCheck,v)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(v))&&(ce.attributeNameCheck instanceof RegExp&&Le(ce.attributeNameCheck,z)||ce.attributeNameCheck instanceof Function&&ce.attributeNameCheck(z,v))||z==="is"&&ce.allowCustomizedBuiltInElements&&(ce.tagNameCheck instanceof RegExp&&Le(ce.tagNameCheck,G)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(G))))return!1}else if(!Be[z]){if(!Le(Xe,ln(G,C,""))){if(!((z==="src"||z==="xlink:href"||z==="href")&&v!=="script"&&El(G,"data:")===0&&Ft[v])){if(!(En&&!Le(oe,ln(G,C,"")))){if(G)return!1}}}}}}return!0},_f=te({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Vs=function(v){return!_f[Hn(v)]&&Le(Re,v)},Hs=function(v){Ct(R.beforeSanitizeAttributes,v,null);const z=v.attributes;if(!z||ur(v))return;const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ie,forceKeepAttr:void 0};let ae=z.length;for(;ae--;){const re=z[ae],ue=re.name,Te=re.namespaceURI,Je=re.value,ot=ve(ue),ci=Je;let Fe=ue==="value"?ci:Zy(ci);if(G.attrName=ot,G.attrValue=Fe,G.keepAttr=!0,G.forceKeepAttr=void 0,Ct(R.uponSanitizeAttribute,v,G),Fe=G.attrValue,U&&(ot==="id"||ot==="name")&&El(Fe,Q)!==0&&(_t(ue,v),Fe=Q+Fe),At&&Le(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Fe)){_t(ue,v);continue}if(ot==="attributename"&&Al(Fe,"href")){_t(ue,v);continue}if(G.forceKeepAttr)continue;if(!G.keepAttr){_t(ue,v);continue}if(!Fn&&Le(/\/>/i,Fe)){_t(ue,v);continue}ut&&Wt([W,Y,Z],Us=>{Fe=ln(Fe,Us," ")});const Ws=ve(v.nodeName);if(!Ns(Ws,ot,Fe)){_t(ue,v);continue}if(w&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Te)switch(f.getAttributeType(Ws,ot)){case"TrustedHTML":{Fe=E(Fe);break}case"TrustedScriptURL":{Fe=w.createScriptURL(Fe);break}}if(Fe!==ci)try{Te?v.setAttributeNS(Te,ue,Fe):v.setAttribute(ue,Fe),ur(v)?it(v):jl(t.removed)}catch{_t(ue,v)}}Ct(R.afterSanitizeAttributes,v,null)},fr=function(v){let z=null;const G=zs(v);for(Ct(R.beforeSanitizeShadowDOM,v,null);z=G.nextNode();)if(Ct(R.uponSanitizeShadowNode,z,null),_s(z),Hs(z),on(z.content)&&fr(z.content),(B?B(z):z.nodeType)===ht.element){const re=j?j(z):z.shadowRoot;on(re)&&(sn(re),fr(re))}Ct(R.afterSanitizeShadowDOM,v,null)},sn=function(v){const z=B?B(v):v.nodeType;if(z===ht.element){const re=j?j(v):v.shadowRoot;on(re)&&(sn(re),fr(re))}const G=y?y(v):v.childNodes;if(!G)return;const ae=[];Wt(G,re=>{an(ae,re)});for(const re of ae)sn(re);if(z===ht.element){const re=A?A(v):null;if(typeof re=="string"&&ve(re)==="template"){const ue=v.content;on(ue)&&sn(ue)}}};return t.sanitize=function(X){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=null,G=null,ae=null,re=null;if(ri=!X,ri&&(X="<!-->"),typeof X!="string"&&!dr(X)&&(X=n2(X),typeof X!="string"))throw cn("dirty is not a string, aborting");if(!t.isSupported)return X;if(Bn||ai(v),t.removed=[],typeof X=="string"&&(se=!1),se){const Je=A?A(X):X.nodeName;if(typeof Je=="string"){const ot=ve(Je);if(!$[ot]||Ze[ot])throw cn("root node is forbidden and cannot be sanitized in-place")}if(ur(X))throw cn("root node is clobbered and cannot be sanitized in-place");sn(X)}else if(dr(X))z=Os("<!---->"),G=z.ownerDocument.importNode(X,!0),G.nodeType===ht.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?z=G:z.appendChild(G),sn(G);else{if(!Et&&!ut&&!dt&&X.indexOf("<")===-1)return w&&tn?E(X):X;if(z=Os(X),!z)return Et?null:tn?M:""}z&&Ln&&it(z.firstChild);const ue=zs(se?X:z);for(;ae=ue.nextNode();)_s(ae),Hs(ae),on(ae.content)&&fr(ae.content);if(se)return ut&&li(X),X;if(Et){if(ut&&li(z),en)for(re=V.call(z.ownerDocument);z.firstChild;)re.appendChild(z.firstChild);else re=z;return(ie.shadowroot||ie.shadowrootmode)&&(re=I.call(r,re,!0)),re}let Te=dt?z.outerHTML:z.innerHTML;return dt&&$["!doctype"]&&z.ownerDocument&&z.ownerDocument.doctype&&z.ownerDocument.doctype.name&&Le(h2,z.ownerDocument.doctype.name)&&(Te="<!DOCTYPE "+z.ownerDocument.doctype.name+`>
|
|
374
|
-
`+Te),ut&&Wt([W,Y,Z],Je=>{Te=ln(Te,Je," ")}),w&&tn?E(Te):Te},t.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ai(X),Bn=!0},t.clearConfig=function(){rn=null,Bn=!1},t.isValidAttribute=function(X,v,z){rn||ai({});const G=ve(X),ae=ve(v);return Ns(G,ae,z)},t.addHook=function(X,v){typeof v=="function"&&an(R[X],v)},t.removeHook=function(X,v){if(v!==void 0){const z=qy(R[X],v);return z===-1?void 0:Xy(R[X],z,1)[0]}return jl(R[X])},t.removeHooks=function(X){R[X]=[]},t.removeAllHooks=function(){R=Pl()},t}var Ce=qd(),x2=Ce;Ce.sanitize.bind(Ce);Ce.isSupported;Ce.addHook.bind(Ce);Ce.removeHook.bind(Ce);Ce.removeHooks.bind(Ce);Ce.removeAllHooks.bind(Ce);Ce.setConfig.bind(Ce);Ce.clearConfig.bind(Ce);Ce.isValidAttribute.bind(Ce);Ce.version;Ce.removed;function y2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const b2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,v2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w2={};function Ol(e,t){return(w2.jsx?v2:b2).test(e)}const k2=/[ \t\n\f\r]/g;function S2(e){return typeof e=="object"?e.type==="text"?zl(e.value):!1:zl(e)}function zl(e){return e.replace(k2,"")===""}class sr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}sr.prototype.normal={};sr.prototype.property={};sr.prototype.space=void 0;function Xd(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new sr(n,r,t)}function To(e){return e.toLowerCase()}class Ge{constructor(t,n){this.attribute=n,this.property=t}}Ge.prototype.attribute="";Ge.prototype.booleanish=!1;Ge.prototype.boolean=!1;Ge.prototype.commaOrSpaceSeparated=!1;Ge.prototype.commaSeparated=!1;Ge.prototype.defined=!1;Ge.prototype.mustUseProperty=!1;Ge.prototype.number=!1;Ge.prototype.overloadedBoolean=!1;Ge.prototype.property="";Ge.prototype.spaceSeparated=!1;Ge.prototype.space=void 0;let C2=0;const ee=Jt(),we=Jt(),jo=Jt(),H=Jt(),de=Jt(),Zt=Jt(),Ke=Jt();function Jt(){return 2**++C2}const Ao=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:we,commaOrSpaceSeparated:Ke,commaSeparated:Zt,number:H,overloadedBoolean:jo,spaceSeparated:de},Symbol.toStringTag,{value:"Module"})),Ri=Object.keys(Ao);class vs extends Ge{constructor(t,n,r,i){let o=-1;if(super(t,n),_l(this,"space",i),typeof r=="number")for(;++o<Ri.length;){const s=Ri[o];_l(this,Ri[o],(r&Ao[s])===Ao[s])}}}vs.prototype.defined=!0;function _l(e,t,n){n&&(e[t]=n)}function jn(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new vs(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[To(r)]=r,n[To(o.attribute)]=r}return new sr(t,n,e.space)}const Zd=jn({properties:{ariaActiveDescendant:null,ariaAtomic:we,ariaAutoComplete:null,ariaBusy:we,ariaChecked:we,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:de,ariaCurrent:null,ariaDescribedBy:de,ariaDetails:null,ariaDisabled:we,ariaDropEffect:de,ariaErrorMessage:null,ariaExpanded:we,ariaFlowTo:de,ariaGrabbed:we,ariaHasPopup:null,ariaHidden:we,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:de,ariaLevel:H,ariaLive:null,ariaModal:we,ariaMultiLine:we,ariaMultiSelectable:we,ariaOrientation:null,ariaOwns:de,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:we,ariaReadOnly:we,ariaRelevant:null,ariaRequired:we,ariaRoleDescription:de,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:we,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Jd(e,t){return t in e?e[t]:t}function Qd(e,t){return Jd(e,t.toLowerCase())}const T2=jn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zt,acceptCharset:de,accessKey:de,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alpha:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:de,autoFocus:ee,autoPlay:ee,blocking:de,capture:null,charSet:null,checked:ee,cite:null,className:de,closedBy:null,colorSpace:null,cols:H,colSpan:H,command:null,commandFor:null,content:null,contentEditable:we,controls:ee,controlsList:de,coords:H|Zt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:jo,draggable:we,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:de,height:H,hidden:jo,high:H,href:null,hrefLang:null,htmlFor:de,httpEquiv:de,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:de,itemRef:de,itemScope:ee,itemType:de,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:H,pattern:null,ping:de,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:de,required:ee,reversed:ee,rows:H,rowSpan:H,sandbox:de,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootCustomElementRegistry:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shadowRootSerializable:ee,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:we,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:we,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:de,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:we,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ee,disablePictureInPicture:ee,disableRemotePlayback:ee,exportParts:Zt,part:de,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:Qd}),j2=jn({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:Ke,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:de,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:Zt,g2:Zt,glyphName:Zt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:Ke,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:de,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ke,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ke,rev:Ke,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ke,requiredFeatures:Ke,requiredFonts:Ke,requiredFormats:Ke,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:Ke,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ke,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ke,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Jd}),ef=jn({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=jn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Qd}),nf=jn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),A2={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"},E2=/[A-Z]/g,Nl=/-[a-z]/g,F2=/^data[-\w.:]+$/i;function B2(e,t){const n=To(t);let r=t,i=Ge;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&F2.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Nl,I2);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Nl.test(o)){let s=o.replace(E2,L2);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=vs}return new i(r,t)}function L2(e){return"-"+e.toLowerCase()}function I2(e){return e.charAt(1).toUpperCase()}const D2=Xd([Zd,T2,ef,tf,nf],"html"),ws=Xd([Zd,j2,ef,tf,nf],"svg");function R2(e){return e.join(" ").trim()}function rf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var un={},Mi,Vl;function M2(){if(Vl)return Mi;Vl=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
|
|
375
|
-
`,d="/",u="*",f="",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 j=1,k=1;function B(_){var I=_.match(t);I&&(j+=I.length);var R=_.lastIndexOf(c);k=~R?_.length-R:k+_.length}function A(){var _={line:j,column:k};return function(I){return I.position=new w(_),E(),I}}function w(_){this.start=_,this.end={line:j,column:k},this.source=b.source}w.prototype.content=y;function M(_){var I=new Error(b.source+":"+j+":"+k+": "+_);if(I.reason=_,I.filename=b.source,I.line=j,I.column=k,I.source=y,!b.silent)throw I}function F(_){var I=_.exec(y);if(I){var R=I[0];return B(R),y=y.slice(R.length),I}}function E(){F(n)}function L(_){var I;for(_=_||[];I=D();)I!==!1&&_.push(I);return _}function D(){var _=A();if(!(d!=y.charAt(0)||u!=y.charAt(1))){for(var I=2;f!=y.charAt(I)&&(u!=y.charAt(I)||d!=y.charAt(I+1));)++I;if(I+=2,f===y.charAt(I-1))return M("End of comment missing");var R=y.slice(2,I-2);return k+=2,B(R),y=y.slice(I),k+=2,_({type:p,comment:R})}}function P(){var _=A(),I=F(r);if(I){if(D(),!F(i))return M("property missing ':'");var R=F(o),W=_({type:m,property:x(I[0].replace(e,f)),value:R?x(R[0].replace(e,f)):f});return F(s),W}}function V(){var _=[];L(_);for(var I;I=P();)I!==!1&&(_.push(I),L(_));return _}return E(),V()}function x(y){return y?y.replace(l,f):f}return Mi=g,Mi}var Hl;function P2(){if(Hl)return un;Hl=1;var e=un&&un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(un,"__esModule",{value:!0}),un.default=n;const t=e(M2());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(c=>{if(c.type!=="declaration")return;const{property:d,value:u}=c;l?i(d,u,c):u&&(o=o||{},o[d]=u)}),o}return un}var Mn={},Wl;function O2(){if(Wl)return Mn;Wl=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.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,u){return u.toUpperCase()},l=function(d,u){return"".concat(u,"-")},c=function(d,u){return u===void 0&&(u={}),o(d)?d:(d=d.toLowerCase(),u.reactCompat?d=d.replace(i,l):d=d.replace(r,l),d.replace(t,s))};return Mn.camelCase=c,Mn}var Pn,Ul;function z2(){if(Ul)return Pn;Ul=1;var e=Pn&&Pn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(P2()),n=O2();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(s[(0,n.camelCase)(l,o)]=c)}),s}return r.default=r,Pn=r,Pn}var _2=z2();const N2=rf(_2),of=sf("end"),ks=sf("start");function sf(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 V2(e){const t=ks(e),n=of(e);if(t&&n)return{start:t,end:n}}function Gn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?$l(e.position):"start"in e||"end"in e?$l(e):"line"in e||"column"in e?Eo(e):""}function Eo(e){return Gl(e&&e.line)+":"+Gl(e&&e.column)}function $l(e){return Eo(e&&e.start)+"-"+Eo(e&&e.end)}function Gl(e){return e&&typeof e=="number"?e:1}class Pe 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 c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.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=Gn(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}}Pe.prototype.file="";Pe.prototype.name="";Pe.prototype.reason="";Pe.prototype.message="";Pe.prototype.stack="";Pe.prototype.column=void 0;Pe.prototype.line=void 0;Pe.prototype.ancestors=void 0;Pe.prototype.cause=void 0;Pe.prototype.fatal=void 0;Pe.prototype.place=void 0;Pe.prototype.ruleId=void 0;Pe.prototype.source=void 0;const Ss={}.hasOwnProperty,H2=new Map,W2=/[A-Z]/g,U2=new Set(["table","tbody","thead","tfoot","tr"]),$2=new Set(["td","th"]),af="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function G2(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=eb(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=Q2(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"?ws:D2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=lf(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function lf(e,t,n){if(t.type==="element")return Y2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return K2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return X2(e,t,n);if(t.type==="mdxjsEsm")return q2(e,t);if(t.type==="root")return Z2(e,t,n);if(t.type==="text")return J2(e,t)}function Y2(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ws,e.schema=i),e.ancestors.push(t);const o=uf(e,t.tagName,!1),s=tb(e,t);let l=Ts(e,t);return U2.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!S2(c):!0})),cf(e,s,o,t),Cs(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function K2(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)}Qn(e,t.position)}function q2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qn(e,t.position)}function X2(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ws,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:uf(e,t.name,!0),s=nb(e,t),l=Ts(e,t);return cf(e,s,o,t),Cs(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function Z2(e,t,n){const r={};return Cs(r,Ts(e,t)),e.create(t,e.Fragment,r,n)}function J2(e,t){return t.value}function cf(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Cs(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Q2(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 eb(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),c=ks(r);return t(i,o,s,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function tb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ss.call(t.properties,i)){const o=rb(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&$2.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 nb(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 Qn(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 Qn(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Ts(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:H2;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const d=i.get(c)||0;s=c+"-"+d,i.set(c,d+1)}}const l=lf(e,o,s);l!==void 0&&n.push(l)}return n}function rb(e,t,n){const r=B2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?y2(n):R2(n)),r.property==="style"){let i=typeof n=="object"?n:ib(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ob(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?A2[r.property]||r.property:r.attribute,n]}}function ib(e,t){try{return N2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Pe("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=af+"#cannot-parse-style-attribute",i}}function uf(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=Ol(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=Ol(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ss.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Qn(e)}function Qn(e,t){const n=new Pe("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=af+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ob(e){const t={};let n;for(n in e)Ss.call(e,n)&&(t[sb(n)]=e[n]);return t}function sb(e){let t=e.replace(W2,ab);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ab(e){return"-"+e.toLowerCase()}const Pi={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"]},lb={};function cb(e,t){const n=lb,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return df(e,r,i)}function df(e,t,n){if(ub(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 Yl(e.children,t,n)}return Array.isArray(e)?Yl(e,t,n):""}function Yl(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=df(e[i],t,n);return r.join("")}function ub(e){return!!(e&&typeof e=="object")}const Kl=document.createElement("i");function js(e){const t="&"+e+";";Kl.innerHTML=t;const n=Kl.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wt(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 et(e,t){return e.length>0?(wt(e,e.length,0,t),e):t}const ql={}.hasOwnProperty;function db(e){const t={};let n=-1;for(;++n<e.length;)fb(t,e[n]);return t}function fb(e,t){let n;for(n in t){const i=(ql.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){ql.call(i,s)||(i[s]=[]);const l=o[s];hb(i[s],Array.isArray(l)?l:l?[l]:[])}}}function hb(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wt(e,0,0,r)}function ff(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 bn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yt=zt(/[A-Za-z]/),qe=zt(/[\dA-Za-z]/),pb=zt(/[#-'*+\--9=?A-Z^-~]/);function Fo(e){return e!==null&&(e<32||e===127)}const Bo=zt(/\d/),mb=zt(/[\dA-Fa-f]/),gb=zt(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function $e(e){return e!==null&&(e<0||e===32)}function le(e){return e===-2||e===-1||e===32}const xb=zt(new RegExp("\\p{P}|\\p{S}","u")),yb=zt(/\s/);function zt(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&&qe(e.charCodeAt(n+1))&&qe(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 he(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(c){return le(c)?(e.enter(n),l(c)):t(c)}function l(c){return le(c)&&o++<i?(e.consume(c),l):(e.exit(n),t(c))}}const bb={tokenize:vb};function vb(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"),he(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return J(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const wb={tokenize:kb},Xl={tokenize:Sb};function kb(e){const t=this,n=[];let r=0,i,o,s;return l;function l(k){if(r<n.length){const B=n[r];return t.containerState=B[1],e.attempt(B[0].continuation,c,d)(k)}return d(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&j();const B=t.events.length;let A=B,w;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){w=t.events[A][1].end;break}b(r);let M=B;for(;M<t.events.length;)t.events[M][1].end={...w},M++;return wt(t.events,A+1,0,t.events.slice(B)),t.events.length=M,d(k)}return l(k)}function d(k){if(r===n.length){if(!i)return p(k);if(i.currentConstruct&&i.currentConstruct.concrete)return g(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Xl,u,f)(k)}function u(k){return i&&j(),b(r),p(k)}function f(k){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(k)}function p(k){return t.containerState={},e.attempt(Xl,m,g)(k)}function m(k){return r++,n.push([t.currentConstruct,t.containerState]),p(k)}function g(k){if(k===null){i&&j(),b(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(k)}function x(k){if(k===null){y(e.exit("chunkFlow"),!0),b(0),e.consume(k);return}return J(k)?(e.consume(k),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(k),x)}function y(k,B){const A=t.sliceStream(k);if(B&&A.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(A),t.parser.lazy[k.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const M=t.events.length;let F=M,E,L;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(E){L=t.events[F][1].end;break}E=!0}for(b(r),w=M;w<t.events.length;)t.events[w][1].end={...L},w++;wt(t.events,F+1,0,t.events.slice(M)),t.events.length=w}}function b(k){let B=n.length;for(;B-- >k;){const A=n[B];t.containerState=A[1],A[0].exit.call(t,e)}n.length=k}function j(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Sb(e,t,n){return he(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zl(e){if(e===null||$e(e)||yb(e))return 1;if(xb(e))return 2}function As(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 Lo={name:"attention",resolveAll:Cb,tokenize:Tb};function Cb(e,t){let n=-1,r,i,o,s,l,c,d,u;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;c=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 f={...e[r][1].end},p={...e[n][1].start};Jl(f,-c),Jl(p,c),s={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>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=et(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=et(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),d=et(d,As(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=et(d,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,d=et(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,wt(e,r-1,n-r+3,d),n=r+d.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Tb(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Zl(r);let o;return s;function s(c){return o=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===o)return e.consume(c),l;const d=e.exit("attentionSequence"),u=Zl(c),f=!u||u===2&&i||n.includes(c),p=!i||i===2&&u||n.includes(r);return d._open=!!(o===42?f:f&&(i||!p)),d._close=!!(o===42?p:p&&(u||!f)),t(c)}}function Jl(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jb={name:"autolink",tokenize:Ab};function Ab(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 yt(m)?(e.consume(m),s):m===64?n(m):d(m)}function s(m){return m===43||m===45||m===46||qe(m)?(r=1,l(m)):d(m)}function l(m){return m===58?(e.consume(m),r=0,c):(m===43||m===45||m===46||qe(m))&&r++<32?(e.consume(m),l):(r=0,d(m))}function c(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||Fo(m)?n(m):(e.consume(m),c)}function d(m){return m===64?(e.consume(m),u):pb(m)?(e.consume(m),d):n(m)}function u(m){return qe(m)?f(m):n(m)}function f(m){return m===46?(e.consume(m),r=0,u):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||qe(m))&&r++<63){const g=m===45?p:f;return e.consume(m),g}return n(m)}}const ei={partial:!0,tokenize:Eb};function Eb(e,t,n){return r;function r(o){return le(o)?he(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||J(o)?t(o):n(o)}}const hf={continuation:{tokenize:Bb},exit:Lb,name:"blockQuote",tokenize:Fb};function Fb(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 le(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Bb(e,t,n){const r=this;return i;function i(s){return le(s)?he(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(hf,t,n)(s)}}function Lb(e){e.exit("blockQuote")}const pf={name:"characterEscape",tokenize:Ib};function Ib(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 gb(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const mf={name:"characterReference",tokenize:Db};function Db(e,t,n){const r=this;let i=0,o,s;return l;function l(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),o=31,s=qe,u(f))}function d(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=mb,u):(e.enter("characterReferenceValue"),o=7,s=Bo,u(f))}function u(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return s===qe&&!js(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<o?(e.consume(f),u):n(f)}}const Ql={partial:!0,tokenize:Mb},ec={concrete:!0,name:"codeFenced",tokenize:Rb};function Rb(e,t,n){const r=this,i={partial:!0,tokenize:A};let o=0,s=0,l;return c;function c(w){return d(w)}function d(w){const M=r.events[r.events.length-1];return o=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,l=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(w)}function u(w){return w===l?(s++,e.consume(w),u):s<3?n(w):(e.exit("codeFencedFenceSequence"),le(w)?he(e,f,"whitespace")(w):f(w))}function f(w){return w===null||J(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Ql,x,B)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||J(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(w)):le(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),he(e,m,"whitespace")(w)):w===96&&w===l?n(w):(e.consume(w),p)}function m(w){return w===null||J(w)?f(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===null||J(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(w)):w===96&&w===l?n(w):(e.consume(w),g)}function x(w){return e.attempt(i,B,y)(w)}function y(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),b}function b(w){return o>0&&le(w)?he(e,j,"linePrefix",o+1)(w):j(w)}function j(w){return w===null||J(w)?e.check(Ql,x,B)(w):(e.enter("codeFlowValue"),k(w))}function k(w){return w===null||J(w)?(e.exit("codeFlowValue"),j(w)):(e.consume(w),k)}function B(w){return e.exit("codeFenced"),t(w)}function A(w,M,F){let E=0;return L;function L(I){return w.enter("lineEnding"),w.consume(I),w.exit("lineEnding"),D}function D(I){return w.enter("codeFencedFence"),le(I)?he(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):P(I)}function P(I){return I===l?(w.enter("codeFencedFenceSequence"),V(I)):F(I)}function V(I){return I===l?(E++,w.consume(I),V):E>=s?(w.exit("codeFencedFenceSequence"),le(I)?he(w,_,"whitespace")(I):_(I)):F(I)}function _(I){return I===null||J(I)?(w.exit("codeFencedFence"),M(I)):F(I)}}}function Mb(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 Oi={name:"codeIndented",tokenize:Ob},Pb={partial:!0,tokenize:zb};function Ob(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),he(e,o,"linePrefix",5)(d)}function o(d){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?c(d):J(d)?e.attempt(Pb,s,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||J(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),t(d)}}function zb(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):J(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):he(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):J(s)?i(s):n(s)}}const _b={name:"codeText",previous:Vb,resolve:Nb,tokenize:Hb};function Nb(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 Vb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Hb(e,t,n){let r=0,i,o;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),r++,l):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(o=e.enter("codeTextSequence"),i=0,u(f)):J(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(f))}function d(f){return f===null||f===32||f===96||J(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),d)}function u(f){return f===96?(e.consume(f),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",d(f))}}class Wb{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&&On(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),On(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),On(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);On(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);On(this.left,n.reverse())}}}function On(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 gf(e){const t={};let n=-1,r,i,o,s,l,c,d;const u=new Wb(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ub(u,n)),n=t[n],d=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=u.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(u.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={...u.get(i)[1].start},l=u.slice(i,n),l.unshift(r),u.splice(i,n-i+1,l))}}return wt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!d}function Ub(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,c=[],d={};let u,f,p=-1,m=n,g=0,x=0;const y=[x];for(;m;){for(;e.get(++i)[1]!==m;);o.push(i),m._tokenizer||(u=r.sliceStream(m),m.next||u.push(null),f&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=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]),j=o.pop();c.push([j,j+b.length-1]),e.splice(j,2,b)}for(c.reverse(),p=-1;++p<c.length;)d[g+c[p][0]]=g+c[p][1],g+=c[p][1]-c[p][0]-1;return d}const $b={resolve:Yb,tokenize:Kb},Gb={partial:!0,tokenize:qb};function Yb(e){return gf(e),e}function Kb(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):J(l)?e.check(Gb,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 qb(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),he(e,o,"linePrefix")}function o(s){if(s===null||J(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 xf(e,t,n,r,i,o,s,l,c){const d=c||Number.POSITIVE_INFINITY;let u=0;return f;function f(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||Fo(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||J(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!u&&(b===null||b===41||$e(b))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(b)):u<d&&b===40?(e.consume(b),u++,x):b===41?(e.consume(b),u--,x):b===null||b===32||b===40||Fo(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 yf(e,t,n,r,i,o){const s=this;let l=0,c;return d;function d(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(o),u}function u(m){return l>999||m===null||m===91||m===93&&!c||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):J(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||J(m)||l++>999?(e.exit("chunkString"),u(m)):(e.consume(m),c||(c=!le(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}}function bf(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,c):n(p)}function c(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),c(s)):p===null?n(p):J(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),he(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===s||p===null||J(p)?(e.exit("chunkString"),d(p)):(e.consume(p),p===92?f:u)}function f(p){return p===s||p===92?(e.consume(p),u):u(p)}}function Yn(e,t){let n;return r;function r(i){return J(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):le(i)?he(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Xb={name:"definition",tokenize:Jb},Zb={partial:!0,tokenize:Qb};function Jb(e,t,n){const r=this;let i;return o;function o(m){return e.enter("definition"),s(m)}function s(m){return yf.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return i=bn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):n(m)}function c(m){return $e(m)?Yn(e,d)(m):d(m)}function d(m){return xf(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function u(m){return e.attempt(Zb,f,f)(m)}function f(m){return le(m)?he(e,p,"whitespace")(m):p(m)}function p(m){return m===null||J(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function Qb(e,t,n){return r;function r(l){return $e(l)?Yn(e,i)(l):n(l)}function i(l){return bf(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return le(l)?he(e,s,"whitespace")(l):s(l)}function s(l){return l===null||J(l)?t(l):n(l)}}const e5={name:"hardBreakEscape",tokenize:t5};function t5(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return J(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const n5={name:"headingAtx",resolve:r5,tokenize:i5};function r5(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"},wt(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(u){return e.enter("atxHeading"),o(u)}function o(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&r++<6?(e.consume(u),s):u===null||$e(u)?(e.exit("atxHeadingSequence"),l(u)):n(u)}function l(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||J(u)?(e.exit("atxHeading"),t(u)):le(u)?he(e,l,"whitespace")(u):(e.enter("atxHeadingText"),d(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),l(u))}function d(u){return u===null||u===35||$e(u)?(e.exit("atxHeadingText"),l(u)):(e.consume(u),d)}}const o5=["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"],tc=["pre","script","style","textarea"],s5={concrete:!0,name:"htmlFlow",resolveTo:c5,tokenize:u5},a5={partial:!0,tokenize:f5},l5={partial:!0,tokenize:d5};function c5(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 u5(e,t,n){const r=this;let i,o,s,l,c;return d;function d(C){return u(C)}function u(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),f}function f(C){return C===33?(e.consume(C),p):C===47?(e.consume(C),o=!0,x):C===63?(e.consume(C),i=3,r.interrupt?t:S):yt(C)?(e.consume(C),s=String.fromCharCode(C),y):n(C)}function p(C){return C===45?(e.consume(C),i=2,m):C===91?(e.consume(C),i=5,l=0,g):yt(C)?(e.consume(C),i=4,r.interrupt?t:S):n(C)}function m(C){return C===45?(e.consume(C),r.interrupt?t:S):n(C)}function g(C){const Re="CDATA[";return C===Re.charCodeAt(l++)?(e.consume(C),l===Re.length?r.interrupt?t:P:g):n(C)}function x(C){return yt(C)?(e.consume(C),s=String.fromCharCode(C),y):n(C)}function y(C){if(C===null||C===47||C===62||$e(C)){const Re=C===47,Xe=s.toLowerCase();return!Re&&!o&&tc.includes(Xe)?(i=1,r.interrupt?t(C):P(C)):o5.includes(s.toLowerCase())?(i=6,Re?(e.consume(C),b):r.interrupt?t(C):P(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):o?j(C):k(C))}return C===45||qe(C)?(e.consume(C),s+=String.fromCharCode(C),y):n(C)}function b(C){return C===62?(e.consume(C),r.interrupt?t:P):n(C)}function j(C){return le(C)?(e.consume(C),j):L(C)}function k(C){return C===47?(e.consume(C),L):C===58||C===95||yt(C)?(e.consume(C),B):le(C)?(e.consume(C),k):L(C)}function B(C){return C===45||C===46||C===58||C===95||qe(C)?(e.consume(C),B):A(C)}function A(C){return C===61?(e.consume(C),w):le(C)?(e.consume(C),A):k(C)}function w(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),c=C,M):le(C)?(e.consume(C),w):F(C)}function M(C){return C===c?(e.consume(C),c=null,E):C===null||J(C)?n(C):(e.consume(C),M)}function F(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||$e(C)?A(C):(e.consume(C),F)}function E(C){return C===47||C===62||le(C)?k(C):n(C)}function L(C){return C===62?(e.consume(C),D):n(C)}function D(C){return C===null||J(C)?P(C):le(C)?(e.consume(C),D):n(C)}function P(C){return C===45&&i===2?(e.consume(C),R):C===60&&i===1?(e.consume(C),W):C===62&&i===4?(e.consume(C),q):C===63&&i===3?(e.consume(C),S):C===93&&i===5?(e.consume(C),Z):J(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(a5,oe,V)(C)):C===null||J(C)?(e.exit("htmlFlowData"),V(C)):(e.consume(C),P)}function V(C){return e.check(l5,_,oe)(C)}function _(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),I}function I(C){return C===null||J(C)?V(C):(e.enter("htmlFlowData"),P(C))}function R(C){return C===45?(e.consume(C),S):P(C)}function W(C){return C===47?(e.consume(C),s="",Y):P(C)}function Y(C){if(C===62){const Re=s.toLowerCase();return tc.includes(Re)?(e.consume(C),q):P(C)}return yt(C)&&s.length<8?(e.consume(C),s+=String.fromCharCode(C),Y):P(C)}function Z(C){return C===93?(e.consume(C),S):P(C)}function S(C){return C===62?(e.consume(C),q):C===45&&i===2?(e.consume(C),S):P(C)}function q(C){return C===null||J(C)?(e.exit("htmlFlowData"),oe(C)):(e.consume(C),q)}function oe(C){return e.exit("htmlFlow"),t(C)}}function d5(e,t,n){const r=this;return i;function i(s){return J(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 f5(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ei,t,n)}}const h5={name:"htmlText",tokenize:p5};function p5(e,t,n){const r=this;let i,o,s;return l;function l(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),c}function c(S){return S===33?(e.consume(S),d):S===47?(e.consume(S),A):S===63?(e.consume(S),k):yt(S)?(e.consume(S),F):n(S)}function d(S){return S===45?(e.consume(S),u):S===91?(e.consume(S),o=0,g):yt(S)?(e.consume(S),j):n(S)}function u(S){return S===45?(e.consume(S),m):n(S)}function f(S){return S===null?n(S):S===45?(e.consume(S),p):J(S)?(s=f,W(S)):(e.consume(S),f)}function p(S){return S===45?(e.consume(S),m):f(S)}function m(S){return S===62?R(S):S===45?p(S):f(S)}function g(S){const q="CDATA[";return S===q.charCodeAt(o++)?(e.consume(S),o===q.length?x:g):n(S)}function x(S){return S===null?n(S):S===93?(e.consume(S),y):J(S)?(s=x,W(S)):(e.consume(S),x)}function y(S){return S===93?(e.consume(S),b):x(S)}function b(S){return S===62?R(S):S===93?(e.consume(S),b):x(S)}function j(S){return S===null||S===62?R(S):J(S)?(s=j,W(S)):(e.consume(S),j)}function k(S){return S===null?n(S):S===63?(e.consume(S),B):J(S)?(s=k,W(S)):(e.consume(S),k)}function B(S){return S===62?R(S):k(S)}function A(S){return yt(S)?(e.consume(S),w):n(S)}function w(S){return S===45||qe(S)?(e.consume(S),w):M(S)}function M(S){return J(S)?(s=M,W(S)):le(S)?(e.consume(S),M):R(S)}function F(S){return S===45||qe(S)?(e.consume(S),F):S===47||S===62||$e(S)?E(S):n(S)}function E(S){return S===47?(e.consume(S),R):S===58||S===95||yt(S)?(e.consume(S),L):J(S)?(s=E,W(S)):le(S)?(e.consume(S),E):R(S)}function L(S){return S===45||S===46||S===58||S===95||qe(S)?(e.consume(S),L):D(S)}function D(S){return S===61?(e.consume(S),P):J(S)?(s=D,W(S)):le(S)?(e.consume(S),D):E(S)}function P(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,V):J(S)?(s=P,W(S)):le(S)?(e.consume(S),P):(e.consume(S),_)}function V(S){return S===i?(e.consume(S),i=void 0,I):S===null?n(S):J(S)?(s=V,W(S)):(e.consume(S),V)}function _(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||$e(S)?E(S):(e.consume(S),_)}function I(S){return S===47||S===62||$e(S)?E(S):n(S)}function R(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function W(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),Y}function Y(S){return le(S)?he(e,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):Z(S)}function Z(S){return e.enter("htmlTextData"),s(S)}}const Es={name:"labelEnd",resolveAll:y5,resolveTo:b5,tokenize:v5},m5={tokenize:w5},g5={tokenize:k5},x5={tokenize:S5};function y5(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&&wt(e,0,e.length,n),e}function b5(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 c={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}},u={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",d,t]],l=et(l,e.slice(o+1,o+r+3)),l=et(l,[["enter",u,t]]),l=et(l,As(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=et(l,[["exit",u,t],e[s-2],e[s-1],["exit",d,t]]),l=et(l,e.slice(s+1)),l=et(l,[["exit",c,t]]),wt(e,o,e.length,l),e}function v5(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?f(p):(s=r.parser.defined.includes(bn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(m5,u,s?u:f)(p):p===91?e.attempt(g5,u,s?d:f)(p):s?u(p):f(p)}function d(p){return e.attempt(x5,u,f)(p)}function u(p){return t(p)}function f(p){return o._balanced=!0,n(p)}}function w5(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return $e(f)?Yn(e,o)(f):o(f)}function o(f){return f===41?u(f):xf(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return $e(f)?Yn(e,c)(f):u(f)}function l(f){return n(f)}function c(f){return f===34||f===39||f===40?bf(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function d(f){return $e(f)?Yn(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function k5(e,t,n){const r=this;return i;function i(l){return yf.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(bn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function S5(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 C5={name:"labelStartImage",resolveAll:Es.resolveAll,tokenize:T5};function T5(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 j5={name:"labelStartLink",resolveAll:Es.resolveAll,tokenize:A5};function A5(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 zi={name:"lineEnding",tokenize:E5};function E5(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),he(e,t,"linePrefix")}}const Rr={name:"thematicBreak",tokenize:F5};function F5(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"),c(d)):r>=3&&(d===null||J(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===i?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),le(d)?he(e,l,"whitespace")(d):l(d))}}const He={continuation:{tokenize:D5},exit:M5,name:"list",tokenize:I5},B5={partial:!0,tokenize:P5},L5={partial:!0,tokenize:R5};function I5(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:Bo(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(Rr,n,d)(m):d(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return n(m)}function c(m){return Bo(m)&&++s<10?(e.consume(m),c):(!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(ei,r.interrupt?n:u,e.attempt(B5,p,f))}function u(m){return r.containerState.initialBlankLine=!0,o++,p(m)}function f(m){return le(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 D5(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ei,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,he(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!le(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(L5,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,he(e,e.attempt(He,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function R5(e,t,n){const r=this;return he(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 M5(e){e.exit(this.containerState.type)}function P5(e,t,n){const r=this;return he(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!le(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const nc={name:"setextUnderline",resolveTo:O5,tokenize:z5};function O5(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 z5(e,t,n){const r=this;let i;return o;function o(d){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(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"),le(d)?he(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||J(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const _5={tokenize:N5};function N5(e){const t=this,n=e.attempt(ei,r,e.attempt(this.parser.constructs.flowInitial,i,he(e,e.attempt(this.parser.constructs.flow,i,e.attempt($b,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 V5={resolveAll:wf()},H5=vf("string"),W5=vf("text");function vf(e){return{resolveAll:wf(e==="text"?U5: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(u){return d(u)?o(u):l(u)}function l(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),c}function c(u){return d(u)?(n.exit("data"),o(u)):(n.consume(u),c)}function d(u){if(u===null)return!0;const f=i[u];let p=-1;if(f)for(;++p<f.length;){const m=f[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function wf(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 U5(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,c;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)c=!0,l++;else if(d!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const d={type:n===e.length||c||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 $5={42:He,43:He,45:He,48:He,49:He,50:He,51:He,52:He,53:He,54:He,55:He,56:He,57:He,62:hf},G5={91:Xb},Y5={[-2]:Oi,[-1]:Oi,32:Oi},K5={35:n5,42:Rr,45:[nc,Rr],60:s5,61:nc,95:Rr,96:ec,126:ec},q5={38:mf,92:pf},X5={[-5]:zi,[-4]:zi,[-3]:zi,33:C5,38:mf,42:Lo,60:[jb,h5],91:j5,92:[e5,pf],93:Es,95:Lo,96:_b},Z5={null:[Lo,V5]},J5={null:[42,95]},Q5={null:[]},e4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:J5,contentInitial:G5,disable:Q5,document:$5,flow:K5,flowInitial:Y5,insideSpan:Z5,string:q5,text:X5},Symbol.toStringTag,{value:"Module"}));function t4(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 c={attempt:M(A),check:M(w),consume:j,enter:k,exit:B,interrupt:M(w,{interrupt:!0})},d={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:f};let u=t.tokenize.call(d,c);return t.resolveAll&&o.push(t),d;function f(D){return s=et(s,D),y(),s[s.length-1]!==null?[]:(F(t,0),d.events=As(o,d.events,d),d.events)}function p(D,P){return r4(m(D),P)}function m(D){return n4(s,D)}function g(){const{_bufferIndex:D,_index:P,line:V,column:_,offset:I}=r;return{_bufferIndex:D,_index:P,line:V,column:_,offset:I}}function x(D){i[D.line]=D.column,L()}function y(){let D;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<P.length;)b(P.charCodeAt(r._bufferIndex));else b(P)}}function b(D){u=u(D)}function j(D){J(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,L()):D!==-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=D}function k(D,P){const V=P||{};return V.type=D,V.start=g(),d.events.push(["enter",V,d]),l.push(V),V}function B(D){const P=l.pop();return P.end=g(),d.events.push(["exit",P,d]),P}function A(D,P){F(D,P.from)}function w(D,P){P.restore()}function M(D,P){return V;function V(_,I,R){let W,Y,Z,S;return Array.isArray(_)?oe(_):"tokenize"in _?oe([_]):q(_);function q($){return me;function me(ie){const ye=ie!==null&&$[ie],ce=ie!==null&&$.null,Ze=[...Array.isArray(ye)?ye:ye?[ye]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return oe(Ze)(ie)}}function oe($){return W=$,Y=0,$.length===0?R:C($[Y])}function C($){return me;function me(ie){return S=E(),Z=$,$.partial||(d.currentConstruct=$),$.name&&d.parser.constructs.disable.null.includes($.name)?Xe():$.tokenize.call(P?Object.assign(Object.create(d),P):d,c,Re,Xe)(ie)}}function Re($){return D(Z,S),I}function Xe($){return S.restore(),++Y<W.length?C(W[Y]):R}}}function F(D,P){D.resolveAll&&!o.includes(D)&&o.push(D),D.resolve&&wt(d.events,P,d.events.length-P,D.resolve(d.events.slice(P),d)),D.resolveTo&&(d.events=D.resolveTo(d.events,d))}function E(){const D=g(),P=d.previous,V=d.currentConstruct,_=d.events.length,I=Array.from(l);return{from:_,restore:R};function R(){r=D,d.previous=P,d.currentConstruct=V,d.events.length=_,l=I,L()}}function L(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function n4(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 r4(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=`
|
|
398
|
+
`}),a.jsx(Vy,{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(Ge,{variant:"solid",colorScheme:"blue",size:"sm",onClick:c.onClick,id:c.id,children:c.children}),...o,children:a.jsxs(h.Box,{children:[e&&a.jsx(h.Text,{fontWeight:"600",color:"text.heading",mb:1,fontFamily:"var(--font-heading)",children:e}),a.jsx(h.Text,{fontSize:"sm",color:"text.muted",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.`})]})})]})}qd.displayName="MedixCookieConsentBanner";const Xd="medixdeck_pwa_dismissed",Hy=14,Wy=[.4,0,.2,1];function Uy(){if(typeof window>"u")return!1;const e=window.matchMedia("(display-mode: standalone)").matches,t=window.navigator.standalone===!0;return e||t}function $y(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream}function Gy(e){if(typeof localStorage>"u")return!1;try{const t=localStorage.getItem(Xd);if(!t)return!1;const n=e*24*60*60*1e3;return Date.now()-Number(t)<n}catch{return!1}}function Yy(){try{localStorage.setItem(Xd,String(Date.now()))}catch{}}function Ky({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 qy(){return a.jsx(h.Box,{flexShrink:0,children:a.jsx(ir,{type:"icon",height:44})})}function Zd({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=Hy,onInstall:o,onDismiss:s,appName:l="this app",icon:u,position:d="bottom",delaySeconds:c=0,forceVisible:f,forceIOS:m}){const p=Ho(),[g,x]=S.useState(!1),[y,v]=S.useState(!1),j=S.useRef(null),k=S.useRef(null);S.useEffect(()=>{const E=()=>{c>0?k.current=setTimeout(()=>x(!0),c*1e3):x(!0)},A=()=>{k.current&&clearTimeout(k.current)};if(f)return m&&v(!0),E(),A;if(Uy()||Gy(i))return A;if($y())return v(!0),E(),A;const L=R=>{R.preventDefault(),j.current=R,E()};window.addEventListener("beforeinstallprompt",L);const M=()=>x(!1);return window.addEventListener("appinstalled",M),()=>{window.removeEventListener("beforeinstallprompt",L),window.removeEventListener("appinstalled",M),A()}},[i,c,f,m]);const F=S.useCallback(async()=>{if(j.current){try{await j.current.prompt(),(await j.current.userChoice).outcome==="accepted"&&(o==null||o())}catch{}j.current=null}x(!1)},[o]),B=S.useCallback(()=>{Yy(),x(!1),s==null||s()},[s]),T=p?"#152035":"#FFFFFF",O=p?"#1E3050":"#E4E8F0";return a.jsx(ko,{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:Wy},style:{position:"fixed",[d]:16,left:"50%",zIndex:1e4,width:"calc(100% - 32px)",maxWidth:480,pointerEvents:"auto"},children:a.jsx(h.Box,{borderRadius:"16px",p:{base:"4",md:"5"},style:{background:T,border:`1px solid ${O}`,boxShadow:"none"},children:a.jsxs(h.Flex,{gap:"4",align:"flex-start",children:[u??a.jsx(qy,{}),a.jsxs(h.Box,{flex:"1",minW:"0",children:[a.jsx(h.Text,{fontWeight:"700",fontSize:"md",color:"text.heading",fontFamily:"var(--font-heading)",mb:"1",children:e}),y?a.jsxs(h.Box,{children:[a.jsxs(h.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(Ky,{size:16,color:p?"#70B6FF":"#0685FF"})})," ","Share button in Safari, then select"," ",a.jsx("span",{style:{fontWeight:700,color:p?"#F0F6FF":"#111926"},children:'"Add to Home Screen"'}),"."]}),a.jsx(h.Flex,{gap:"3",mb:"3",flexWrap:"wrap",children:[{step:"1",text:"Tap Share"},{step:"2",text:"Add to Home Screen"}].map(E=>a.jsxs(h.Flex,{align:"center",gap:"2",px:"3",py:"1.5",borderRadius:"8px",bg:"bg.subtle",children:[a.jsx(h.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:E.step}),a.jsx(h.Text,{fontSize:"xs",fontWeight:"600",color:"text.body",fontFamily:"var(--font-body)",children:E.text})]},E.step))})]}):a.jsx(h.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:t}),a.jsxs(h.Flex,{gap:"3",align:"center",children:[!y&&a.jsx(Ge,{variant:"solid",colorScheme:"blue",size:"sm",onClick:F,children:n}),a.jsx(Ge,{variant:"ghost",colorScheme:"gray",size:"sm",onClick:B,children:y?"Got it":r})]})]}),a.jsx(h.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: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"})]})})]})})})})}Zd.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 Fl(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 Xy(e){if(Array.isArray(e))return e}function Zy(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 Jy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
399
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qy(e,t){return Xy(e)||Zy(e,t)||e2(e,t)||Jy()}function e2(e,t){if(e){if(typeof e=="string")return Fl(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)?Fl(e,t):void 0}}const Jd=Object.entries,Bl=Object.setPrototypeOf,t2=Object.isFrozen,n2=Object.getPrototypeOf,r2=Object.getOwnPropertyDescriptor;let He=Object.freeze,rt=Object.seal,mn=Object.create,Qd=typeof Reflect<"u"&&Reflect,Ao=Qd.apply,Fo=Qd.construct;He||(He=function(t){return t});rt||(rt=function(t){return t});Ao||(Ao=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)});Fo||(Fo=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 Wt=Te(Array.prototype.forEach),i2=Te(Array.prototype.lastIndexOf),Ll=Te(Array.prototype.pop),ln=Te(Array.prototype.push),o2=Te(Array.prototype.splice),_e=Array.isArray,$n=Te(String.prototype.toLowerCase),Di=Te(String.prototype.toString),Il=Te(String.prototype.match),cn=Te(String.prototype.replace),Dl=Te(String.prototype.indexOf),s2=Te(String.prototype.trim),a2=Te(Number.prototype.toString),l2=Te(Boolean.prototype.toString),Rl=typeof BigInt>"u"?null:Te(BigInt.prototype.toString),Ml=typeof Symbol>"u"?null:Te(Symbol.prototype.toString),we=Te(Object.prototype.hasOwnProperty),Pn=Te(Object.prototype.toString),Re=Te(RegExp.prototype.test),un=c2(TypeError);function Te(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 Ao(e,t,r)}}function c2(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Fo(e,n)}}function re(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$n;if(Bl&&Bl(e,null),!_e(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const o=n(i);o!==i&&(t2(t)||(t[r]=o),i=o)}e[i]=!0}return e}function u2(e){for(let t=0;t<e.length;t++)we(e,t)||(e[t]=null);return e}function Oe(e){const t=mn(null);for(const r of Jd(e)){var n=Qy(r,2);const i=n[0],o=n[1];we(e,i)&&(_e(o)?t[i]=u2(o):o&&typeof o=="object"&&o.constructor===Object?t[i]=Oe(o):t[i]=o)}return t}function d2(e){switch(typeof e){case"string":return e;case"number":return a2(e);case"boolean":return l2(e);case"bigint":return Rl?Rl(e):"0";case"symbol":return Ml?Ml(e):"Symbol()";case"undefined":return Pn(e);case"function":case"object":{if(e===null)return Pn(e);const t=e,n=mt(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Pn(r)}return Pn(e)}default:return Pn(e)}}function mt(e,t){for(;e!==null;){const r=r2(e,t);if(r){if(r.get)return Te(r.get);if(typeof r.value=="function")return Te(r.value)}e=n2(e)}function n(){return null}return n}function f2(e){try{return Re(e,""),!0}catch{return!1}}const Pl=He(["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"]),Ri=He(["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"]),Mi=He(["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"]),h2=He(["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"]),Pi=He(["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"]),p2=He(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ol=He(["#text"]),zl=He(["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"]),Oi=He(["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"]),_l=He(["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"]),jr=He(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),m2=rt(/{{[\w\W]*|^[\w\W]*}}/g),g2=rt(/<%[\w\W]*|^[\w\W]*%>/g),x2=rt(/\${[\w\W]*/g),y2=rt(/^data-[\-\w.\u00B7-\uFFFF]+$/),b2=rt(/^aria-[\-\w]+$/),Nl=rt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),v2=rt(/^(?:\w+script|data):/i),w2=rt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),k2=rt(/^html$/i),S2=rt(/^[a-z][.\w]*(-[.\w]+)+$/i),pt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},C2=function(){return typeof window>"u"?null:window},T2=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}},Vl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ef(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:C2();const t=Z=>ef(Z);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==pt.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,f=e.trustedTypes,m=l.prototype,p=mt(m,"cloneNode"),g=mt(m,"remove"),x=mt(m,"nextSibling"),y=mt(m,"childNodes"),v=mt(m,"parentNode"),j=mt(m,"shadowRoot"),k=mt(m,"attributes"),F=s&&s.prototype?mt(s.prototype,"nodeType"):null,B=s&&s.prototype?mt(s.prototype,"nodeName"):null;if(typeof o=="function"){const Z=n.createElement("template");Z.content&&Z.content.ownerDocument&&(n=Z.content.ownerDocument)}let T,O="",E=0;const A=function(w){if(E>0)throw un('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.');E++;try{return T.createHTML(w)}finally{E--}},L=n,M=L.implementation,R=L.createNodeIterator,V=L.createDocumentFragment,_=L.getElementsByTagName,I=r.importNode;let D=Vl();t.isSupported=typeof Jd=="function"&&typeof v=="function"&&M&&M.createHTMLDocument!==void 0;const U=m2,W=g2,G=x2,b=y2,K=b2,te=v2,C=w2,ie=S2;let ae=Nl,H=null;const fe=re({},[...Pl,...Ri,...Mi,...Pi,...Ol]);let ne=null;const he=re({},[...zl,...Oi,..._l,...jr]);let le=Object.seal(mn(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}})),We=null,it=null;const ut=Object.seal(mn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let dr=!0,en=!0,Fn=!1,Bn=!0,dt=!1,Et=!0,ft=!1,Ln=!1,In=!1,At=!1,tn=!1,nn=!1,P=!0,Y=!1;const Q="user-content-";let oe=!0,ce=!1,Be={},Le=null;const Xe=re({},["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 Ft=null;const Bt=re({},["audio","video","img","source","image","track"]);let De=null;const St=re({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ue="http://www.w3.org/1998/Math/MathML",fr="http://www.w3.org/2000/svg",ht="http://www.w3.org/1999/xhtml";let rn=ht,ai=!1,li=null;const zf=re({},[Ue,fr,ht],Di);let ci=re({},["mi","mo","mn","ms","mtext"]),ui=re({},["annotation-xml"]);const _f=re({},["title","style","font","a","script"]);let Dn=null;const Nf=["application/xhtml+xml","text/html"],Vf="text/html";let ke=null,on=null;const Hf=n.createElement("form"),_s=function(w){return w instanceof RegExp||w instanceof Function},di=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(on&&on===w)return;(!w||typeof w!="object")&&(w={}),w=Oe(w),Dn=Nf.indexOf(w.PARSER_MEDIA_TYPE)===-1?Vf:w.PARSER_MEDIA_TYPE,ke=Dn==="application/xhtml+xml"?Di:$n,H=we(w,"ALLOWED_TAGS")&&_e(w.ALLOWED_TAGS)?re({},w.ALLOWED_TAGS,ke):fe,ne=we(w,"ALLOWED_ATTR")&&_e(w.ALLOWED_ATTR)?re({},w.ALLOWED_ATTR,ke):he,li=we(w,"ALLOWED_NAMESPACES")&&_e(w.ALLOWED_NAMESPACES)?re({},w.ALLOWED_NAMESPACES,Di):zf,De=we(w,"ADD_URI_SAFE_ATTR")&&_e(w.ADD_URI_SAFE_ATTR)?re(Oe(St),w.ADD_URI_SAFE_ATTR,ke):St,Ft=we(w,"ADD_DATA_URI_TAGS")&&_e(w.ADD_DATA_URI_TAGS)?re(Oe(Bt),w.ADD_DATA_URI_TAGS,ke):Bt,Le=we(w,"FORBID_CONTENTS")&&_e(w.FORBID_CONTENTS)?re({},w.FORBID_CONTENTS,ke):Xe,We=we(w,"FORBID_TAGS")&&_e(w.FORBID_TAGS)?re({},w.FORBID_TAGS,ke):Oe({}),it=we(w,"FORBID_ATTR")&&_e(w.FORBID_ATTR)?re({},w.FORBID_ATTR,ke):Oe({}),Be=we(w,"USE_PROFILES")?w.USE_PROFILES&&typeof w.USE_PROFILES=="object"?Oe(w.USE_PROFILES):w.USE_PROFILES:!1,dr=w.ALLOW_ARIA_ATTR!==!1,en=w.ALLOW_DATA_ATTR!==!1,Fn=w.ALLOW_UNKNOWN_PROTOCOLS||!1,Bn=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,dt=w.SAFE_FOR_TEMPLATES||!1,Et=w.SAFE_FOR_XML!==!1,ft=w.WHOLE_DOCUMENT||!1,At=w.RETURN_DOM||!1,tn=w.RETURN_DOM_FRAGMENT||!1,nn=w.RETURN_TRUSTED_TYPE||!1,In=w.FORCE_BODY||!1,P=w.SANITIZE_DOM!==!1,Y=w.SANITIZE_NAMED_PROPS||!1,oe=w.KEEP_CONTENT!==!1,ce=w.IN_PLACE||!1,ae=f2(w.ALLOWED_URI_REGEXP)?w.ALLOWED_URI_REGEXP:Nl,rn=typeof w.NAMESPACE=="string"?w.NAMESPACE:ht,ci=we(w,"MATHML_TEXT_INTEGRATION_POINTS")&&w.MATHML_TEXT_INTEGRATION_POINTS&&typeof w.MATHML_TEXT_INTEGRATION_POINTS=="object"?Oe(w.MATHML_TEXT_INTEGRATION_POINTS):re({},["mi","mo","mn","ms","mtext"]),ui=we(w,"HTML_INTEGRATION_POINTS")&&w.HTML_INTEGRATION_POINTS&&typeof w.HTML_INTEGRATION_POINTS=="object"?Oe(w.HTML_INTEGRATION_POINTS):re({},["annotation-xml"]);const z=we(w,"CUSTOM_ELEMENT_HANDLING")&&w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING=="object"?Oe(w.CUSTOM_ELEMENT_HANDLING):mn(null);if(le=mn(null),we(z,"tagNameCheck")&&_s(z.tagNameCheck)&&(le.tagNameCheck=z.tagNameCheck),we(z,"attributeNameCheck")&&_s(z.attributeNameCheck)&&(le.attributeNameCheck=z.attributeNameCheck),we(z,"allowCustomizedBuiltInElements")&&typeof z.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=z.allowCustomizedBuiltInElements),dt&&(en=!1),tn&&(At=!0),Be&&(H=re({},Ol),ne=mn(null),Be.html===!0&&(re(H,Pl),re(ne,zl)),Be.svg===!0&&(re(H,Ri),re(ne,Oi),re(ne,jr)),Be.svgFilters===!0&&(re(H,Mi),re(ne,Oi),re(ne,jr)),Be.mathMl===!0&&(re(H,Pi),re(ne,_l),re(ne,jr))),ut.tagCheck=null,ut.attributeCheck=null,we(w,"ADD_TAGS")&&(typeof w.ADD_TAGS=="function"?ut.tagCheck=w.ADD_TAGS:_e(w.ADD_TAGS)&&(H===fe&&(H=Oe(H)),re(H,w.ADD_TAGS,ke))),we(w,"ADD_ATTR")&&(typeof w.ADD_ATTR=="function"?ut.attributeCheck=w.ADD_ATTR:_e(w.ADD_ATTR)&&(ne===he&&(ne=Oe(ne)),re(ne,w.ADD_ATTR,ke))),we(w,"ADD_URI_SAFE_ATTR")&&_e(w.ADD_URI_SAFE_ATTR)&&re(De,w.ADD_URI_SAFE_ATTR,ke),we(w,"FORBID_CONTENTS")&&_e(w.FORBID_CONTENTS)&&(Le===Xe&&(Le=Oe(Le)),re(Le,w.FORBID_CONTENTS,ke)),we(w,"ADD_FORBID_CONTENTS")&&_e(w.ADD_FORBID_CONTENTS)&&(Le===Xe&&(Le=Oe(Le)),re(Le,w.ADD_FORBID_CONTENTS,ke)),oe&&(H["#text"]=!0),ft&&re(H,["html","head","body"]),H.table&&(re(H,["tbody"]),delete We.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw un('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw un('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const q=T;T=w.TRUSTED_TYPES_POLICY;try{O=A("")}catch(ue){throw T=q,ue}}else T===void 0&&w.TRUSTED_TYPES_POLICY!==null&&(T=T2(f,i)),T&&typeof O=="string"&&(O=A(""));(D.uponSanitizeElement.length>0||D.uponSanitizeAttribute.length>0)&&H===fe&&(H=Oe(H)),D.uponSanitizeAttribute.length>0&&ne===he&&(ne=Oe(ne)),He&&He(w),on=w},Ns=re({},[...Ri,...Mi,...h2]),Vs=re({},[...Pi,...p2]),Wf=function(w){let z=v(w);(!z||!z.tagName)&&(z={namespaceURI:rn,tagName:"template"});const q=$n(w.tagName),ue=$n(z.tagName);return li[w.namespaceURI]?w.namespaceURI===fr?z.namespaceURI===ht?q==="svg":z.namespaceURI===Ue?q==="svg"&&(ue==="annotation-xml"||ci[ue]):!!Ns[q]:w.namespaceURI===Ue?z.namespaceURI===ht?q==="math":z.namespaceURI===fr?q==="math"&&ui[ue]:!!Vs[q]:w.namespaceURI===ht?z.namespaceURI===fr&&!ui[ue]||z.namespaceURI===Ue&&!ci[ue]?!1:!Vs[q]&&(_f[q]||!Ns[q]):!!(Dn==="application/xhtml+xml"&&li[w.namespaceURI]):!1},ot=function(w){ln(t.removed,{element:w});try{v(w).removeChild(w)}catch{g(w)}},_t=function(w,z){try{ln(t.removed,{attribute:z.getAttributeNode(w),from:z})}catch{ln(t.removed,{attribute:null,from:z})}if(z.removeAttribute(w),w==="is")if(At||tn)try{ot(z)}catch{}else try{z.setAttribute(w,"")}catch{}},Hs=function(w){let z=null,q=null;if(In)w="<remove></remove>"+w;else{const pe=Il(w,/^[\r\n\t ]+/);q=pe&&pe[0]}Dn==="application/xhtml+xml"&&rn===ht&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const ue=T?A(w):w;if(rn===ht)try{z=new c().parseFromString(ue,Dn)}catch{}if(!z||!z.documentElement){z=M.createDocument(rn,"template",null);try{z.documentElement.innerHTML=ai?O:ue}catch{}}const se=z.body||z.documentElement;return w&&q&&se.insertBefore(n.createTextNode(q),se.childNodes[0]||null),rn===ht?_.call(z,ft?"html":"body")[0]:ft?z.documentElement:se},Ws=function(w){return R.call(w.ownerDocument||w,w,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},fi=function(w){var z,q;w.normalize();const ue=R.call(w.ownerDocument||w,w,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let se=ue.nextNode();for(;se;){let Ee=se.data;Wt([U,W,G],Qe=>{Ee=cn(Ee,Qe," ")}),se.data=Ee,se=ue.nextNode()}const pe=(z=(q=w.querySelectorAll)===null||q===void 0?void 0:q.call(w,"template"))!==null&&z!==void 0?z:[];Wt(Array.from(pe),Ee=>{sn(Ee.content)&&fi(Ee.content)})},hr=function(w){const z=B?B(w):null;return typeof z!="string"||ke(z)!=="form"?!1:typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||w.attributes!==k(w)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function"||w.nodeType!==F(w)||w.childNodes!==y(w)},sn=function(w){if(!F||typeof w!="object"||w===null)return!1;try{return F(w)===pt.documentFragment}catch{return!1}},pr=function(w){if(!F||typeof w!="object"||w===null)return!1;try{return typeof F(w)=="number"}catch{return!1}};function Ct(Z,w,z){Wt(Z,q=>{q.call(t,w,z,on)})}const Us=function(w){let z=null;if(Ct(D.beforeSanitizeElements,w,null),hr(w))return ot(w),!0;const q=ke(B?B(w):w.nodeName);if(Ct(D.uponSanitizeElement,w,{tagName:q,allowedTags:H}),Et&&w.hasChildNodes()&&!pr(w.firstElementChild)&&Re(/<[/\w!]/g,w.innerHTML)&&Re(/<[/\w!]/g,w.textContent)||Et&&w.namespaceURI===ht&&q==="style"&&pr(w.firstElementChild)||w.nodeType===pt.progressingInstruction||Et&&w.nodeType===pt.comment&&Re(/<[/\w]/g,w.data))return ot(w),!0;if(We[q]||!(ut.tagCheck instanceof Function&&ut.tagCheck(q))&&!H[q]){if(!We[q]&&Gs(q)&&(le.tagNameCheck instanceof RegExp&&Re(le.tagNameCheck,q)||le.tagNameCheck instanceof Function&&le.tagNameCheck(q)))return!1;if(oe&&!Le[q]){const se=v(w),pe=y(w);if(pe&&se){const Ee=pe.length;for(let Qe=Ee-1;Qe>=0;--Qe){const st=p(pe[Qe],!0);se.insertBefore(st,x(w))}}}return ot(w),!0}return(F?F(w):w.nodeType)===pt.element&&!Wf(w)||(q==="noscript"||q==="noembed"||q==="noframes")&&Re(/<\/no(script|embed|frames)/i,w.innerHTML)?(ot(w),!0):(dt&&w.nodeType===pt.text&&(z=w.textContent,Wt([U,W,G],se=>{z=cn(z,se," ")}),w.textContent!==z&&(ln(t.removed,{element:w.cloneNode()}),w.textContent=z)),Ct(D.afterSanitizeElements,w,null),!1)},$s=function(w,z,q){if(it[z]||P&&(z==="id"||z==="name")&&(q in n||q in Hf))return!1;const ue=ne[z]||ut.attributeCheck instanceof Function&&ut.attributeCheck(z,w);if(!(en&&!it[z]&&Re(b,z))){if(!(dr&&Re(K,z))){if(!ue||it[z]){if(!(Gs(w)&&(le.tagNameCheck instanceof RegExp&&Re(le.tagNameCheck,w)||le.tagNameCheck instanceof Function&&le.tagNameCheck(w))&&(le.attributeNameCheck instanceof RegExp&&Re(le.attributeNameCheck,z)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(z,w))||z==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&Re(le.tagNameCheck,q)||le.tagNameCheck instanceof Function&&le.tagNameCheck(q))))return!1}else if(!De[z]){if(!Re(ae,cn(q,C,""))){if(!((z==="src"||z==="xlink:href"||z==="href")&&w!=="script"&&Dl(q,"data:")===0&&Ft[w])){if(!(Fn&&!Re(te,cn(q,C,"")))){if(q)return!1}}}}}}return!0},Uf=re({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Gs=function(w){return!Uf[$n(w)]&&Re(ie,w)},Ys=function(w){Ct(D.beforeSanitizeAttributes,w,null);const z=w.attributes;if(!z||hr(w))return;const q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let ue=z.length;for(;ue--;){const se=z[ue],pe=se.name,Ee=se.namespaceURI,Qe=se.value,st=ke(pe),hi=Qe;let Ie=pe==="value"?hi:s2(hi);if(q.attrName=st,q.attrValue=Ie,q.keepAttr=!0,q.forceKeepAttr=void 0,Ct(D.uponSanitizeAttribute,w,q),Ie=q.attrValue,Y&&(st==="id"||st==="name")&&Dl(Ie,Q)!==0&&(_t(pe,w),Ie=Q+Ie),Et&&Re(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ie)){_t(pe,w);continue}if(st==="attributename"&&Il(Ie,"href")){_t(pe,w);continue}if(q.forceKeepAttr)continue;if(!q.keepAttr){_t(pe,w);continue}if(!Bn&&Re(/\/>/i,Ie)){_t(pe,w);continue}dt&&Wt([U,W,G],qs=>{Ie=cn(Ie,qs," ")});const Ks=ke(w.nodeName);if(!$s(Ks,st,Ie)){_t(pe,w);continue}if(T&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Ee)switch(f.getAttributeType(Ks,st)){case"TrustedHTML":{Ie=A(Ie);break}case"TrustedScriptURL":{Ie=T.createScriptURL(Ie);break}}if(Ie!==hi)try{Ee?w.setAttributeNS(Ee,pe,Ie):w.setAttribute(pe,Ie),hr(w)?ot(w):Ll(t.removed)}catch{_t(pe,w)}}Ct(D.afterSanitizeAttributes,w,null)},mr=function(w){let z=null;const q=Ws(w);for(Ct(D.beforeSanitizeShadowDOM,w,null);z=q.nextNode();)if(Ct(D.uponSanitizeShadowNode,z,null),Us(z),Ys(z),sn(z.content)&&mr(z.content),(F?F(z):z.nodeType)===pt.element){const se=j?j(z):z.shadowRoot;sn(se)&&(an(se),mr(se))}Ct(D.afterSanitizeShadowDOM,w,null)},an=function(w){const z=F?F(w):w.nodeType;if(z===pt.element){const se=j?j(w):w.shadowRoot;sn(se)&&(an(se),mr(se))}const q=y?y(w):w.childNodes;if(!q)return;const ue=[];Wt(q,se=>{ln(ue,se)});for(const se of ue)an(se);if(z===pt.element){const se=B?B(w):null;if(typeof se=="string"&&ke(se)==="template"){const pe=w.content;sn(pe)&&an(pe)}}};return t.sanitize=function(Z){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=null,q=null,ue=null,se=null;if(ai=!Z,ai&&(Z="<!-->"),typeof Z!="string"&&!pr(Z)&&(Z=d2(Z),typeof Z!="string"))throw un("dirty is not a string, aborting");if(!t.isSupported)return Z;if(Ln||di(w),t.removed=[],typeof Z=="string"&&(ce=!1),ce){const Qe=B?B(Z):Z.nodeName;if(typeof Qe=="string"){const st=ke(Qe);if(!H[st]||We[st])throw un("root node is forbidden and cannot be sanitized in-place")}if(hr(Z))throw un("root node is clobbered and cannot be sanitized in-place");an(Z)}else if(pr(Z))z=Hs("<!---->"),q=z.ownerDocument.importNode(Z,!0),q.nodeType===pt.element&&q.nodeName==="BODY"||q.nodeName==="HTML"?z=q:z.appendChild(q),an(q);else{if(!At&&!dt&&!ft&&Z.indexOf("<")===-1)return T&&nn?A(Z):Z;if(z=Hs(Z),!z)return At?null:nn?O:""}z&&In&&ot(z.firstChild);const pe=Ws(ce?Z:z);for(;ue=pe.nextNode();)Us(ue),Ys(ue),sn(ue.content)&&mr(ue.content);if(ce)return dt&&fi(Z),Z;if(At){if(dt&&fi(z),tn)for(se=V.call(z.ownerDocument);z.firstChild;)se.appendChild(z.firstChild);else se=z;return(ne.shadowroot||ne.shadowrootmode)&&(se=I.call(r,se,!0)),se}let Ee=ft?z.outerHTML:z.innerHTML;return ft&&H["!doctype"]&&z.ownerDocument&&z.ownerDocument.doctype&&z.ownerDocument.doctype.name&&Re(k2,z.ownerDocument.doctype.name)&&(Ee="<!DOCTYPE "+z.ownerDocument.doctype.name+`>
|
|
400
|
+
`+Ee),dt&&Wt([U,W,G],Qe=>{Ee=cn(Ee,Qe," ")}),T&&nn?A(Ee):Ee},t.setConfig=function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};di(Z),Ln=!0},t.clearConfig=function(){on=null,Ln=!1},t.isValidAttribute=function(Z,w,z){on||di({});const q=ke(Z),ue=ke(w);return $s(q,ue,z)},t.addHook=function(Z,w){typeof w=="function"&&ln(D[Z],w)},t.removeHook=function(Z,w){if(w!==void 0){const z=i2(D[Z],w);return z===-1?void 0:o2(D[Z],z,1)[0]}return Ll(D[Z])},t.removeHooks=function(Z){D[Z]=[]},t.removeAllHooks=function(){D=Vl()},t}var je=ef(),j2=je;je.sanitize.bind(je);je.isSupported;je.addHook.bind(je);je.removeHook.bind(je);je.removeHooks.bind(je);je.removeAllHooks.bind(je);je.setConfig.bind(je);je.clearConfig.bind(je);je.isValidAttribute.bind(je);je.version;je.removed;function E2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const A2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,F2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,B2={};function Hl(e,t){return(B2.jsx?F2:A2).test(e)}const L2=/[ \t\n\f\r]/g;function I2(e){return typeof e=="object"?e.type==="text"?Wl(e.value):!1:Wl(e)}function Wl(e){return e.replace(L2,"")===""}class cr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}cr.prototype.normal={};cr.prototype.property={};cr.prototype.space=void 0;function tf(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new cr(n,r,t)}function Bo(e){return e.toLowerCase()}class qe{constructor(t,n){this.attribute=n,this.property=t}}qe.prototype.attribute="";qe.prototype.booleanish=!1;qe.prototype.boolean=!1;qe.prototype.commaOrSpaceSeparated=!1;qe.prototype.commaSeparated=!1;qe.prototype.defined=!1;qe.prototype.mustUseProperty=!1;qe.prototype.number=!1;qe.prototype.overloadedBoolean=!1;qe.prototype.property="";qe.prototype.spaceSeparated=!1;qe.prototype.space=void 0;let D2=0;const ee=Qt(),Se=Qt(),Lo=Qt(),$=Qt(),me=Qt(),Jt=Qt(),Ze=Qt();function Qt(){return 2**++D2}const Io=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:Se,commaOrSpaceSeparated:Ze,commaSeparated:Jt,number:$,overloadedBoolean:Lo,spaceSeparated:me},Symbol.toStringTag,{value:"Module"})),zi=Object.keys(Io);class Ts extends qe{constructor(t,n,r,i){let o=-1;if(super(t,n),Ul(this,"space",i),typeof r=="number")for(;++o<zi.length;){const s=zi[o];Ul(this,zi[o],(r&Io[s])===Io[s])}}}Ts.prototype.defined=!0;function Ul(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 Ts(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Bo(r)]=r,n[Bo(o.attribute)]=r}return new cr(t,n,e.space)}const nf=En({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,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:$,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:me,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:me,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Se,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function rf(e,t){return t in e?e[t]:t}function of(e,t){return rf(e,t.toLowerCase())}const R2=En({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jt,acceptCharset:me,accessKey:me,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alpha:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:me,autoFocus:ee,autoPlay:ee,blocking:me,capture:null,charSet:null,checked:ee,cite:null,className:me,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:Se,controls:ee,controlsList:me,coords:$|Jt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:Lo,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:me,height:$,hidden:Lo,high:$,href:null,hrefLang:null,htmlFor:me,httpEquiv:me,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:me,itemRef:me,itemScope:ee,itemType:me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:$,pattern:null,ping:me,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:me,required:ee,reversed:ee,rows:$,rowSpan:$,sandbox:me,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootCustomElementRegistry:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shadowRootSerializable:ee,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:Se,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:me,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ee,disablePictureInPicture:ee,disableRemotePlayback:ee,exportParts:Jt,part:me,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:of}),M2=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:Ze,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className: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:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Jt,g2:Jt,glyphName:Jt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:Ze,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ze,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ze,rev:Ze,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ze,requiredFeatures:Ze,requiredFonts:Ze,requiredFormats:Ze,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:Ze,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ze,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ze,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rf}),sf=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()}}),af=En({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:of}),lf=En({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),P2={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"},O2=/[A-Z]/g,$l=/-[a-z]/g,z2=/^data[-\w.:]+$/i;function _2(e,t){const n=Bo(t);let r=t,i=qe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&z2.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace($l,V2);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!$l.test(o)){let s=o.replace(O2,N2);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ts}return new i(r,t)}function N2(e){return"-"+e.toLowerCase()}function V2(e){return e.charAt(1).toUpperCase()}const H2=tf([nf,R2,sf,af,lf],"html"),js=tf([nf,M2,sf,af,lf],"svg");function W2(e){return e.join(" ").trim()}function cf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dn={},_i,Gl;function U2(){if(Gl)return _i;Gl=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=`
|
|
401
|
+
`,d="/",c="*",f="",m="comment",p="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,k=1;function F(_){var I=_.match(t);I&&(j+=I.length);var D=_.lastIndexOf(u);k=~D?_.length-D:k+_.length}function B(){var _={line:j,column:k};return function(I){return I.position=new T(_),A(),I}}function T(_){this.start=_,this.end={line:j,column:k},this.source=v.source}T.prototype.content=y;function O(_){var I=new Error(v.source+":"+j+":"+k+": "+_);if(I.reason=_,I.filename=v.source,I.line=j,I.column=k,I.source=y,!v.silent)throw I}function E(_){var I=_.exec(y);if(I){var D=I[0];return F(D),y=y.slice(D.length),I}}function A(){E(n)}function L(_){var I;for(_=_||[];I=M();)I!==!1&&_.push(I);return _}function M(){var _=B();if(!(d!=y.charAt(0)||c!=y.charAt(1))){for(var I=2;f!=y.charAt(I)&&(c!=y.charAt(I)||d!=y.charAt(I+1));)++I;if(I+=2,f===y.charAt(I-1))return O("End of comment missing");var D=y.slice(2,I-2);return k+=2,F(D),y=y.slice(I),k+=2,_({type:m,comment:D})}}function R(){var _=B(),I=E(r);if(I){if(M(),!E(i))return O("property missing ':'");var D=E(o),U=_({type:p,property:x(I[0].replace(e,f)),value:D?x(D[0].replace(e,f)):f});return E(s),U}}function V(){var _=[];L(_);for(var I;I=R();)I!==!1&&(_.push(I),L(_));return _}return A(),V()}function x(y){return y?y.replace(l,f):f}return _i=g,_i}var Yl;function $2(){if(Yl)return dn;Yl=1;var e=dn&&dn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=n;const t=e(U2());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 dn}var On={},Kl;function G2(){if(Kl)return On;Kl=1,Object.defineProperty(On,"__esModule",{value:!0}),On.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 On.camelCase=u,On}var zn,ql;function Y2(){if(ql)return zn;ql=1;var e=zn&&zn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e($2()),n=G2();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,zn=r,zn}var K2=Y2();const q2=cf(K2),uf=df("end"),Es=df("start");function df(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 X2(e){const t=Es(e),n=uf(e);if(t&&n)return{start:t,end:n}}function qn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Xl(e.position):"start"in e||"end"in e?Xl(e):"line"in e||"column"in e?Do(e):""}function Do(e){return Zl(e&&e.line)+":"+Zl(e&&e.column)}function Xl(e){return Do(e&&e.start)+"-"+Do(e&&e.end)}function Zl(e){return e&&typeof e=="number"?e:1}class ze 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=qn(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}}ze.prototype.file="";ze.prototype.name="";ze.prototype.reason="";ze.prototype.message="";ze.prototype.stack="";ze.prototype.column=void 0;ze.prototype.line=void 0;ze.prototype.ancestors=void 0;ze.prototype.cause=void 0;ze.prototype.fatal=void 0;ze.prototype.place=void 0;ze.prototype.ruleId=void 0;ze.prototype.source=void 0;const As={}.hasOwnProperty,Z2=new Map,J2=/[A-Z]/g,Q2=new Set(["table","tbody","thead","tfoot","tr"]),eb=new Set(["td","th"]),ff="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tb(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=cb(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=lb(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"?js:H2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=hf(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function hf(e,t,n){if(t.type==="element")return nb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return rb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ob(e,t,n);if(t.type==="mdxjsEsm")return ib(e,t);if(t.type==="root")return sb(e,t,n);if(t.type==="text")return ab(e,t)}function nb(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=js,e.schema=i),e.ancestors.push(t);const o=mf(e,t.tagName,!1),s=ub(e,t);let l=Bs(e,t);return Q2.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!I2(u):!0})),pf(e,s,o,t),Fs(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function rb(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)}nr(e,t.position)}function ib(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);nr(e,t.position)}function ob(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=js,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:mf(e,t.name,!0),s=db(e,t),l=Bs(e,t);return pf(e,s,o,t),Fs(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function sb(e,t,n){const r={};return Fs(r,Bs(e,t)),e.create(t,e.Fragment,r,n)}function ab(e,t){return t.value}function pf(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Fs(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function lb(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 cb(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),u=Es(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 ub(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&As.call(t.properties,i)){const o=fb(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&eb.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 db(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 nr(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 nr(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Bs(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Z2;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=hf(e,o,s);l!==void 0&&n.push(l)}return n}function fb(e,t,n){const r=_2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?E2(n):W2(n)),r.property==="style"){let i=typeof n=="object"?n:hb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=pb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?P2[r.property]||r.property:r.attribute,n]}}function hb(e,t){try{return q2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ze("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=ff+"#cannot-parse-style-attribute",i}}function mf(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=Hl(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=Hl(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return As.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);nr(e)}function nr(e,t){const n=new ze("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=ff+"#cannot-handle-mdx-estrees-without-createevaluater",n}function pb(e){const t={};let n;for(n in e)As.call(e,n)&&(t[mb(n)]=e[n]);return t}function mb(e){let t=e.replace(J2,gb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function gb(e){return"-"+e.toLowerCase()}const Ni={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"]},xb={};function yb(e,t){const n=xb,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gf(e,r,i)}function gf(e,t,n){if(bb(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 Jl(e.children,t,n)}return Array.isArray(e)?Jl(e,t,n):""}function Jl(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=gf(e[i],t,n);return r.join("")}function bb(e){return!!(e&&typeof e=="object")}const Ql=document.createElement("i");function Ls(e){const t="&"+e+";";Ql.innerHTML=t;const n=Ql.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kt(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 et(e,t){return e.length>0?(kt(e,e.length,0,t),e):t}const ec={}.hasOwnProperty;function vb(e){const t={};let n=-1;for(;++n<e.length;)wb(t,e[n]);return t}function wb(e,t){let n;for(n in t){const i=(ec.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){ec.call(i,s)||(i[s]=[]);const l=o[s];kb(i[s],Array.isArray(l)?l:l?[l]:[])}}}function kb(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kt(e,0,0,r)}function xf(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 vn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const bt=zt(/[A-Za-z]/),Je=zt(/[\dA-Za-z]/),Sb=zt(/[#-'*+\--9=?A-Z^-~]/);function Ro(e){return e!==null&&(e<32||e===127)}const Mo=zt(/\d/),Cb=zt(/[\dA-Fa-f]/),Tb=zt(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function Ke(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const jb=zt(new RegExp("\\p{P}|\\p{S}","u")),Eb=zt(/\s/);function zt(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&&Je(e.charCodeAt(n+1))&&Je(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 de(u)?(e.enter(n),l(u)):t(u)}function l(u){return de(u)&&o++<i?(e.consume(u),l):(e.exit(n),t(u))}}const Ab={tokenize:Fb};function Fb(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 J(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const Bb={tokenize:Lb},tc={tokenize:Ib};function Lb(e){const t=this,n=[];let r=0,i,o,s;return l;function l(k){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,u,d)(k)}return d(k)}function u(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&j();const F=t.events.length;let B=F,T;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){T=t.events[B][1].end;break}v(r);let O=F;for(;O<t.events.length;)t.events[O][1].end={...T},O++;return kt(t.events,B+1,0,t.events.slice(F)),t.events.length=O,d(k)}return l(k)}function d(k){if(r===n.length){if(!i)return m(k);if(i.currentConstruct&&i.currentConstruct.concrete)return g(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tc,c,f)(k)}function c(k){return i&&j(),v(r),m(k)}function f(k){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(k)}function m(k){return t.containerState={},e.attempt(tc,p,g)(k)}function p(k){return r++,n.push([t.currentConstruct,t.containerState]),m(k)}function g(k){if(k===null){i&&j(),v(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(k)}function x(k){if(k===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(k);return}return J(k)?(e.consume(k),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(k),x)}function y(k,F){const B=t.sliceStream(k);if(F&&B.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(B),t.parser.lazy[k.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<s&&(!i.events[T][1].end||i.events[T][1].end.offset>s))return;const O=t.events.length;let E=O,A,L;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(A){L=t.events[E][1].end;break}A=!0}for(v(r),T=O;T<t.events.length;)t.events[T][1].end={...L},T++;kt(t.events,E+1,0,t.events.slice(O)),t.events.length=T}}function v(k){let F=n.length;for(;F-- >k;){const B=n[F];t.containerState=B[1],B[0].exit.call(t,e)}n.length=k}function j(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ib(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 nc(e){if(e===null||Ke(e)||Eb(e))return 1;if(jb(e))return 2}function Is(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 Po={name:"attention",resolveAll:Db,tokenize:Rb};function Db(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 f={...e[r][1].end},m={...e[n][1].start};rc(f,-u),rc(m,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},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=et(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=et(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),d=et(d,Is(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=et(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=et(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,kt(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 Rb(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=nc(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=nc(u),f=!c||c===2&&i||n.includes(u),m=!i||i===2&&c||n.includes(r);return d._open=!!(o===42?f:f&&(i||!m)),d._close=!!(o===42?m:m&&(c||!f)),t(u)}}function rc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Mb={name:"autolink",tokenize:Pb};function Pb(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return bt(p)?(e.consume(p),s):p===64?n(p):d(p)}function s(p){return p===43||p===45||p===46||Je(p)?(r=1,l(p)):d(p)}function l(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||Je(p))&&r++<32?(e.consume(p),l):(r=0,d(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Ro(p)?n(p):(e.consume(p),u)}function d(p){return p===64?(e.consume(p),c):Sb(p)?(e.consume(p),d):n(p)}function c(p){return Je(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):m(p)}function m(p){if((p===45||Je(p))&&r++<63){const g=p===45?m:f;return e.consume(p),g}return n(p)}}const ii={partial:!0,tokenize:Ob};function Ob(e,t,n){return r;function r(o){return de(o)?xe(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||J(o)?t(o):n(o)}}const yf={continuation:{tokenize:_b},exit:Nb,name:"blockQuote",tokenize:zb};function zb(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 de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function _b(e,t,n){const r=this;return i;function i(s){return de(s)?xe(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(yf,t,n)(s)}}function Nb(e){e.exit("blockQuote")}const bf={name:"characterEscape",tokenize:Vb};function Vb(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 Tb(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const vf={name:"characterReference",tokenize:Hb};function Hb(e,t,n){const r=this;let i=0,o,s;return l;function l(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),o=31,s=Je,c(f))}function d(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=Cb,c):(e.enter("characterReferenceValue"),o=7,s=Mo,c(f))}function c(f){if(f===59&&i){const m=e.exit("characterReferenceValue");return s===Je&&!Ls(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<o?(e.consume(f),c):n(f)}}const ic={partial:!0,tokenize:Ub},oc={concrete:!0,name:"codeFenced",tokenize:Wb};function Wb(e,t,n){const r=this,i={partial:!0,tokenize:B};let o=0,s=0,l;return u;function u(T){return d(T)}function d(T){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,l=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(T)}function c(T){return T===l?(s++,e.consume(T),c):s<3?n(T):(e.exit("codeFencedFenceSequence"),de(T)?xe(e,f,"whitespace")(T):f(T))}function f(T){return T===null||J(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(ic,x,F)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(T))}function m(T){return T===null||J(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(T)):de(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,p,"whitespace")(T)):T===96&&T===l?n(T):(e.consume(T),m)}function p(T){return T===null||J(T)?f(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(T))}function g(T){return T===null||J(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(T)):T===96&&T===l?n(T):(e.consume(T),g)}function x(T){return e.attempt(i,F,y)(T)}function y(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),v}function v(T){return o>0&&de(T)?xe(e,j,"linePrefix",o+1)(T):j(T)}function j(T){return T===null||J(T)?e.check(ic,x,F)(T):(e.enter("codeFlowValue"),k(T))}function k(T){return T===null||J(T)?(e.exit("codeFlowValue"),j(T)):(e.consume(T),k)}function F(T){return e.exit("codeFenced"),t(T)}function B(T,O,E){let A=0;return L;function L(I){return T.enter("lineEnding"),T.consume(I),T.exit("lineEnding"),M}function M(I){return T.enter("codeFencedFence"),de(I)?xe(T,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):R(I)}function R(I){return I===l?(T.enter("codeFencedFenceSequence"),V(I)):E(I)}function V(I){return I===l?(A++,T.consume(I),V):A>=s?(T.exit("codeFencedFenceSequence"),de(I)?xe(T,_,"whitespace")(I):_(I)):E(I)}function _(I){return I===null||J(I)?(T.exit("codeFencedFence"),O(I)):E(I)}}}function Ub(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 Vi={name:"codeIndented",tokenize:Gb},$b={partial:!0,tokenize:Yb};function Gb(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):J(d)?e.attempt($b,s,u)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||J(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),l)}function u(d){return e.exit("codeIndented"),t(d)}}function Yb(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):J(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):J(s)?i(s):n(s)}}const Kb={name:"codeText",previous:Xb,resolve:qb,tokenize:Zb};function qb(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 Xb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Zb(e,t,n){let r=0,i,o;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),r++,l):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(o=e.enter("codeTextSequence"),i=0,c(f)):J(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),d(f))}function d(f){return f===null||f===32||f===96||J(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),d)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",d(f))}}class Jb{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&&_n(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),_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 wf(e){const t={};let n=-1,r,i,o,s,l,u,d;const c=new Jb(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,Qb(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 kt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!d}function Qb(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,f,m=-1,p=n,g=0,x=0;const y=[x];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),f&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(x=m+1,y.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),m=y.length;m--;){const v=l.slice(y[m],y[m+1]),j=o.pop();u.push([j,j+v.length-1]),e.splice(j,2,v)}for(u.reverse(),m=-1;++m<u.length;)d[g+u[m][0]]=g+u[m][1],g+=u[m][1]-u[m][0]-1;return d}const e5={resolve:n5,tokenize:r5},t5={partial:!0,tokenize:i5};function n5(e){return wf(e),e}function r5(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):J(l)?e.check(t5,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 i5(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||J(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 kf(e,t,n,r,i,o,s,l,u){const d=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(v),e.exit(o),m):v===null||v===32||v===41||Ro(v)?n(v):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(v))}function m(v){return v===62?(e.enter(o),e.consume(v),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(l),m(v)):v===null||v===60||J(v)?n(v):(e.consume(v),v===92?g:p)}function g(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function x(v){return!c&&(v===null||v===41||Ke(v))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(v)):c<d&&v===40?(e.consume(v),c++,x):v===41?(e.consume(v),c--,x):v===null||v===32||v===40||Ro(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 Sf(e,t,n,r,i,o){const s=this;let l=0,u;return d;function d(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),c}function c(p){return l>999||p===null||p===91||p===93&&!u||p===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):J(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||J(p)||l++>999?(e.exit("chunkString"),c(p)):(e.consume(p),u||(u=!de(p)),p===92?m:f)}function m(p){return p===91||p===92||p===93?(e.consume(p),l++,f):f(p)}}function Cf(e,t,n,r,i,o){let s;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),s=m===40?41:m,u):n(m)}function u(m){return m===s?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(o),d(m))}function d(m){return m===s?(e.exit(o),u(s)):m===null?n(m):J(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),xe(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(m))}function c(m){return m===s||m===null||J(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?f:c)}function f(m){return m===s||m===92?(e.consume(m),c):c(m)}}function Xn(e,t){let n;return r;function r(i){return J(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):de(i)?xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const o5={name:"definition",tokenize:a5},s5={partial:!0,tokenize:l5};function a5(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return Sf.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Ke(p)?Xn(e,d)(p):d(p)}function d(p){return kf(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(s5,f,f)(p)}function f(p){return de(p)?xe(e,m,"whitespace")(p):m(p)}function m(p){return p===null||J(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function l5(e,t,n){return r;function r(l){return Ke(l)?Xn(e,i)(l):n(l)}function i(l){return Cf(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return de(l)?xe(e,s,"whitespace")(l):s(l)}function s(l){return l===null||J(l)?t(l):n(l)}}const c5={name:"hardBreakEscape",tokenize:u5};function u5(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return J(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const d5={name:"headingAtx",resolve:f5,tokenize:h5};function f5(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"},kt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function h5(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||Ke(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||J(c)?(e.exit("atxHeading"),t(c)):de(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||Ke(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),d)}}const p5=["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"],sc=["pre","script","style","textarea"],m5={concrete:!0,name:"htmlFlow",resolveTo:y5,tokenize:b5},g5={partial:!0,tokenize:w5},x5={partial:!0,tokenize:v5};function y5(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 b5(e,t,n){const r=this;let i,o,s,l,u;return d;function d(C){return c(C)}function c(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),f}function f(C){return C===33?(e.consume(C),m):C===47?(e.consume(C),o=!0,x):C===63?(e.consume(C),i=3,r.interrupt?t:b):bt(C)?(e.consume(C),s=String.fromCharCode(C),y):n(C)}function m(C){return C===45?(e.consume(C),i=2,p):C===91?(e.consume(C),i=5,l=0,g):bt(C)?(e.consume(C),i=4,r.interrupt?t:b):n(C)}function p(C){return C===45?(e.consume(C),r.interrupt?t:b):n(C)}function g(C){const ie="CDATA[";return C===ie.charCodeAt(l++)?(e.consume(C),l===ie.length?r.interrupt?t:R:g):n(C)}function x(C){return bt(C)?(e.consume(C),s=String.fromCharCode(C),y):n(C)}function y(C){if(C===null||C===47||C===62||Ke(C)){const ie=C===47,ae=s.toLowerCase();return!ie&&!o&&sc.includes(ae)?(i=1,r.interrupt?t(C):R(C)):p5.includes(s.toLowerCase())?(i=6,ie?(e.consume(C),v):r.interrupt?t(C):R(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):o?j(C):k(C))}return C===45||Je(C)?(e.consume(C),s+=String.fromCharCode(C),y):n(C)}function v(C){return C===62?(e.consume(C),r.interrupt?t:R):n(C)}function j(C){return de(C)?(e.consume(C),j):L(C)}function k(C){return C===47?(e.consume(C),L):C===58||C===95||bt(C)?(e.consume(C),F):de(C)?(e.consume(C),k):L(C)}function F(C){return C===45||C===46||C===58||C===95||Je(C)?(e.consume(C),F):B(C)}function B(C){return C===61?(e.consume(C),T):de(C)?(e.consume(C),B):k(C)}function T(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),u=C,O):de(C)?(e.consume(C),T):E(C)}function O(C){return C===u?(e.consume(C),u=null,A):C===null||J(C)?n(C):(e.consume(C),O)}function E(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Ke(C)?B(C):(e.consume(C),E)}function A(C){return C===47||C===62||de(C)?k(C):n(C)}function L(C){return C===62?(e.consume(C),M):n(C)}function M(C){return C===null||J(C)?R(C):de(C)?(e.consume(C),M):n(C)}function R(C){return C===45&&i===2?(e.consume(C),D):C===60&&i===1?(e.consume(C),U):C===62&&i===4?(e.consume(C),K):C===63&&i===3?(e.consume(C),b):C===93&&i===5?(e.consume(C),G):J(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(g5,te,V)(C)):C===null||J(C)?(e.exit("htmlFlowData"),V(C)):(e.consume(C),R)}function V(C){return e.check(x5,_,te)(C)}function _(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),I}function I(C){return C===null||J(C)?V(C):(e.enter("htmlFlowData"),R(C))}function D(C){return C===45?(e.consume(C),b):R(C)}function U(C){return C===47?(e.consume(C),s="",W):R(C)}function W(C){if(C===62){const ie=s.toLowerCase();return sc.includes(ie)?(e.consume(C),K):R(C)}return bt(C)&&s.length<8?(e.consume(C),s+=String.fromCharCode(C),W):R(C)}function G(C){return C===93?(e.consume(C),b):R(C)}function b(C){return C===62?(e.consume(C),K):C===45&&i===2?(e.consume(C),b):R(C)}function K(C){return C===null||J(C)?(e.exit("htmlFlowData"),te(C)):(e.consume(C),K)}function te(C){return e.exit("htmlFlow"),t(C)}}function v5(e,t,n){const r=this;return i;function i(s){return J(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 w5(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ii,t,n)}}const k5={name:"htmlText",tokenize:S5};function S5(e,t,n){const r=this;let i,o,s;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),d):b===47?(e.consume(b),B):b===63?(e.consume(b),k):bt(b)?(e.consume(b),E):n(b)}function d(b){return b===45?(e.consume(b),c):b===91?(e.consume(b),o=0,g):bt(b)?(e.consume(b),j):n(b)}function c(b){return b===45?(e.consume(b),p):n(b)}function f(b){return b===null?n(b):b===45?(e.consume(b),m):J(b)?(s=f,U(b)):(e.consume(b),f)}function m(b){return b===45?(e.consume(b),p):f(b)}function p(b){return b===62?D(b):b===45?m(b):f(b)}function g(b){const K="CDATA[";return b===K.charCodeAt(o++)?(e.consume(b),o===K.length?x:g):n(b)}function x(b){return b===null?n(b):b===93?(e.consume(b),y):J(b)?(s=x,U(b)):(e.consume(b),x)}function y(b){return b===93?(e.consume(b),v):x(b)}function v(b){return b===62?D(b):b===93?(e.consume(b),v):x(b)}function j(b){return b===null||b===62?D(b):J(b)?(s=j,U(b)):(e.consume(b),j)}function k(b){return b===null?n(b):b===63?(e.consume(b),F):J(b)?(s=k,U(b)):(e.consume(b),k)}function F(b){return b===62?D(b):k(b)}function B(b){return bt(b)?(e.consume(b),T):n(b)}function T(b){return b===45||Je(b)?(e.consume(b),T):O(b)}function O(b){return J(b)?(s=O,U(b)):de(b)?(e.consume(b),O):D(b)}function E(b){return b===45||Je(b)?(e.consume(b),E):b===47||b===62||Ke(b)?A(b):n(b)}function A(b){return b===47?(e.consume(b),D):b===58||b===95||bt(b)?(e.consume(b),L):J(b)?(s=A,U(b)):de(b)?(e.consume(b),A):D(b)}function L(b){return b===45||b===46||b===58||b===95||Je(b)?(e.consume(b),L):M(b)}function M(b){return b===61?(e.consume(b),R):J(b)?(s=M,U(b)):de(b)?(e.consume(b),M):A(b)}function R(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),i=b,V):J(b)?(s=R,U(b)):de(b)?(e.consume(b),R):(e.consume(b),_)}function V(b){return b===i?(e.consume(b),i=void 0,I):b===null?n(b):J(b)?(s=V,U(b)):(e.consume(b),V)}function _(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||Ke(b)?A(b):(e.consume(b),_)}function I(b){return b===47||b===62||Ke(b)?A(b):n(b)}function D(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function U(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),W}function W(b){return de(b)?xe(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):G(b)}function G(b){return e.enter("htmlTextData"),s(b)}}const Ds={name:"labelEnd",resolveAll:E5,resolveTo:A5,tokenize:F5},C5={tokenize:B5},T5={tokenize:L5},j5={tokenize:I5};function E5(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&&kt(e,0,e.length,n),e}function A5(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=et(l,e.slice(o+1,o+r+3)),l=et(l,[["enter",c,t]]),l=et(l,Is(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=et(l,[["exit",c,t],e[s-2],e[s-1],["exit",d,t]]),l=et(l,e.slice(s+1)),l=et(l,[["exit",u,t]]),kt(e,o,e.length,l),e}function F5(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(m){return o?o._inactive?f(m):(s=r.parser.defined.includes(vn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):n(m)}function u(m){return m===40?e.attempt(C5,c,s?c:f)(m):m===91?e.attempt(T5,c,s?d:f)(m):s?c(m):f(m)}function d(m){return e.attempt(j5,c,f)(m)}function c(m){return t(m)}function f(m){return o._balanced=!0,n(m)}}function B5(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Ke(f)?Xn(e,o)(f):o(f)}function o(f){return f===41?c(f):kf(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Ke(f)?Xn(e,u)(f):c(f)}function l(f){return n(f)}function u(f){return f===34||f===39||f===40?Cf(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function d(f){return Ke(f)?Xn(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function L5(e,t,n){const r=this;return i;function i(l){return Sf.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function I5(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 D5={name:"labelStartImage",resolveAll:Ds.resolveAll,tokenize:R5};function R5(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 M5={name:"labelStartLink",resolveAll:Ds.resolveAll,tokenize:P5};function P5(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 Hi={name:"lineEnding",tokenize:O5};function O5(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const zr={name:"thematicBreak",tokenize:z5};function z5(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||J(d))?(e.exit("thematicBreak"),t(d)):n(d)}function u(d){return d===i?(e.consume(d),r++,u):(e.exit("thematicBreakSequence"),de(d)?xe(e,l,"whitespace")(d):l(d))}}const $e={continuation:{tokenize:H5},exit:U5,name:"list",tokenize:V5},_5={partial:!0,tokenize:$5},N5={partial:!0,tokenize:W5};function V5(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(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Mo(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(zr,n,d)(p):d(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return Mo(p)&&++s<10?(e.consume(p),u):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),d(p)):n(p)}function d(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ii,r.interrupt?n:c,e.attempt(_5,m,f))}function c(p){return r.containerState.initialBlankLine=!0,o++,m(p)}function f(p){return de(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function H5(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ii,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||!de(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(N5,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt($e,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function W5(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 U5(e){e.exit(this.containerState.type)}function $5(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!de(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const ac={name:"setextUnderline",resolveTo:G5,tokenize:Y5};function G5(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 Y5(e,t,n){const r=this;let i;return o;function o(d){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(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"),de(d)?xe(e,u,"lineSuffix")(d):u(d))}function u(d){return d===null||J(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const K5={tokenize:q5};function q5(e){const t=this,n=e.attempt(ii,r,e.attempt(this.parser.constructs.flowInitial,i,xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(e5,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 X5={resolveAll:jf()},Z5=Tf("string"),J5=Tf("text");function Tf(e){return{resolveAll:jf(e==="text"?Q5: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 f=i[c];let m=-1;if(f)for(;++m<f.length;){const p=f[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function jf(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 Q5(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 e4={42:$e,43:$e,45:$e,48:$e,49:$e,50:$e,51:$e,52:$e,53:$e,54:$e,55:$e,56:$e,57:$e,62:yf},t4={91:o5},n4={[-2]:Vi,[-1]:Vi,32:Vi},r4={35:d5,42:zr,45:[ac,zr],60:m5,61:ac,95:zr,96:oc,126:oc},i4={38:vf,92:bf},o4={[-5]:Hi,[-4]:Hi,[-3]:Hi,33:D5,38:vf,42:Po,60:[Mb,k5],91:M5,92:[c5,bf],93:Ds,95:Po,96:Kb},s4={null:[Po,X5]},a4={null:[42,95]},l4={null:[]},c4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:a4,contentInitial:t4,disable:l4,document:e4,flow:r4,flowInitial:n4,insideSpan:s4,string:i4,text:o4},Symbol.toStringTag,{value:"Module"}));function u4(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(B),check:O(T),consume:j,enter:k,exit:F,interrupt:O(T,{interrupt:!0})},d={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:f};let c=t.tokenize.call(d,u);return t.resolveAll&&o.push(t),d;function f(M){return s=et(s,M),y(),s[s.length-1]!==null?[]:(E(t,0),d.events=Is(o,d.events,d),d.events)}function m(M,R){return f4(p(M),R)}function p(M){return d4(s,M)}function g(){const{_bufferIndex:M,_index:R,line:V,column:_,offset:I}=r;return{_bufferIndex:M,_index:R,line:V,column:_,offset:I}}function x(M){i[M.line]=M.column,L()}function y(){let M;for(;r._index<s.length;){const R=s[r._index];if(typeof R=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<R.length;)v(R.charCodeAt(r._bufferIndex));else v(R)}}function v(M){c=c(M)}function j(M){J(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,L()):M!==-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=M}function k(M,R){const V=R||{};return V.type=M,V.start=g(),d.events.push(["enter",V,d]),l.push(V),V}function F(M){const R=l.pop();return R.end=g(),d.events.push(["exit",R,d]),R}function B(M,R){E(M,R.from)}function T(M,R){R.restore()}function O(M,R){return V;function V(_,I,D){let U,W,G,b;return Array.isArray(_)?te(_):"tokenize"in _?te([_]):K(_);function K(H){return fe;function fe(ne){const he=ne!==null&&H[ne],le=ne!==null&&H.null,We=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(le)?le:le?[le]:[]];return te(We)(ne)}}function te(H){return U=H,W=0,H.length===0?D:C(H[W])}function C(H){return fe;function fe(ne){return b=A(),G=H,H.partial||(d.currentConstruct=H),H.name&&d.parser.constructs.disable.null.includes(H.name)?ae():H.tokenize.call(R?Object.assign(Object.create(d),R):d,u,ie,ae)(ne)}}function ie(H){return M(G,b),I}function ae(H){return b.restore(),++W<U.length?C(U[W]):D}}}function E(M,R){M.resolveAll&&!o.includes(M)&&o.push(M),M.resolve&&kt(d.events,R,d.events.length-R,M.resolve(d.events.slice(R),d)),M.resolveTo&&(d.events=M.resolveTo(d.events,d))}function A(){const M=g(),R=d.previous,V=d.currentConstruct,_=d.events.length,I=Array.from(l);return{from:_,restore:D};function D(){r=M,d.previous=R,d.currentConstruct=V,d.events.length=_,l=I,L()}}function L(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function d4(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 f4(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=`
|
|
376
402
|
`;break}case-3:{s=`\r
|
|
377
|
-
`;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:db([e4,...(e||{}).extensions||[]]),content:i(bb),defined:[],document:i(wb),flow:i(_5),lazy:{},string:i(H5),text:i(W5)};return r;function i(o){return s;function s(l){return t4(r,o,l)}}}function o4(e){for(;!gf(e););return e}const rc=/[\0\t\n\r]/g;function s4(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const c=[];let d,u,f,p,m;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(rc.lastIndex=f,d=rc.exec(o),p=d&&d.index!==void 0?d.index:o.length,m=o.charCodeAt(p),!d){t=o.slice(f);break}if(m===10&&f===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<p&&(c.push(o.slice(f,p)),e+=p-f),m){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const a4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function l4(e){return e.replace(a4,c4)}function c4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return ff(n.slice(o?2:1),o?16:10)}return js(n)||e}const kf={}.hasOwnProperty;function u4(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),d4(n)(o4(i4(n).document().write(s4()(e,t,!0))))}function d4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(At),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(Qt),blockQuote:o(ce),characterEscape:E,characterReference:E,codeFenced:o(Ze),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Ze,s),codeText:o(kt,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(ct),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(lr),hardBreakEscape:o(En),hardBreakTrailing:o(En),htmlFlow:o(Fn,s),htmlFlowData:E,htmlText:o(Fn,s),htmlTextData:E,image:o(ut),label:s,link:o(At),listItem:o(Bn),listItemValue:p,listOrdered:o(dt,f),listUnordered:o(dt),paragraph:o(Ln),reference:C,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Qt),strong:o(Et),thematicBreak:o(tn)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:ye,autolinkProtocol:ie,blockQuote:c(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:Xe,characterReferenceMarkerNumeric:Xe,characterReferenceValue:$,characterReference:me,codeFenced:c(y),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:L,codeIndented:c(b),codeText:c(I),codeTextData:L,data:L,definition:c(),definitionDestinationString:B,definitionLabelString:j,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(V),htmlFlowData:L,htmlText:c(_),htmlTextData:L,image:c(W),label:Z,labelText:Y,lineEnding:D,link:c(R),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Re,resourceDestinationString:S,resourceTitleString:q,resource:oe,setextHeading:c(F),setextHeadingLineSequence:M,setextHeadingText:w,strong:c(),thematicBreak:c()}};Sf(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let U={type:"root",children:[]};const Q={stack:[U],tokenStack:[],config:t,enter:l,exit:d,buffer:s,resume:u,data:n},ne=[];let se=-1;for(;++se<O.length;)if(O[se][1].type==="listOrdered"||O[se][1].type==="listUnordered")if(O[se][0]==="enter")ne.push(se);else{const Ae=ne.pop();se=i(O,Ae,se)}for(se=-1;++se<O.length;){const Ae=t[O[se][0]];kf.call(Ae,O[se][1].type)&&Ae[O[se][1].type].call(Object.assign({sliceSerialize:O[se][2].sliceSerialize},Q),O[se][1])}if(Q.tokenStack.length>0){const Ae=Q.tokenStack[Q.tokenStack.length-1];(Ae[1]||ic).call(Q,void 0,Ae[0])}for(U.position={start:Lt(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:Lt(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)U=t.transforms[se](U)||U;return U}function i(O,U,Q){let ne=U-1,se=-1,Ae=!1,Ee,Ye,Ft,Bt;for(;++ne<=Q;){const Be=O[ne];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?se++:se--,Bt=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(Ee&&!Bt&&!se&&!Ft&&(Ft=ne),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!se&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||se===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(Ee){let St=ne;for(Ye=void 0;St--;){const Ve=O[St];if(Ve[1].type==="lineEnding"||Ve[1].type==="lineEndingBlank"){if(Ve[0]==="exit")continue;Ye&&(O[Ye][1].type="lineEndingBlank",Ae=!0),Ve[1].type="lineEnding",Ye=St}else if(!(Ve[1].type==="linePrefix"||Ve[1].type==="blockQuotePrefix"||Ve[1].type==="blockQuotePrefixWhitespace"||Ve[1].type==="blockQuoteMarker"||Ve[1].type==="listItemIndent"))break}Ft&&(!Ye||Ft<Ye)&&(Ee._spread=!0),Ee.end=Object.assign({},Ye?O[Ye][1].start:Be[1].end),O.splice(Ye||ne,0,["exit",Ee,Be[2]]),ne++,Q++}if(Be[1].type==="listItemPrefix"){const St={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};Ee=St,O.splice(ne,0,["enter",St,Be[2]]),ne++,Q++,Ft=void 0,Bt=!0}}}return O[U][1]._spread=Ae,Q}function o(O,U){return Q;function Q(ne){l.call(this,O(ne),ne),U&&U.call(this,ne)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(O,U,Q){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([U,Q||void 0]),O.position={start:Lt(U.start),end:void 0}}function c(O){return U;function U(Q){O&&O.call(this,Q),d.call(this,Q)}}function d(O,U){const Q=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==O.type&&(U?U.call(this,O,ne[0]):(ne[1]||ic).call(this,O,ne[0]));else throw new Error("Cannot close `"+O.type+"` ("+Gn({start:O.start,end:O.end})+"): it’s not open");Q.position.end=Lt(O.end)}function u(){return cb(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(O){if(this.data.expectingFirstListItemValue){const U=this.stack[this.stack.length-2];U.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function m(){const O=this.resume(),U=this.stack[this.stack.length-1];U.lang=O}function g(){const O=this.resume(),U=this.stack[this.stack.length-1];U.meta=O}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const O=this.resume(),U=this.stack[this.stack.length-1];U.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const O=this.resume(),U=this.stack[this.stack.length-1];U.value=O.replace(/(\r?\n|\r)$/g,"")}function j(O){const U=this.resume(),Q=this.stack[this.stack.length-1];Q.label=U,Q.identifier=bn(this.sliceSerialize(O)).toLowerCase()}function k(){const O=this.resume(),U=this.stack[this.stack.length-1];U.title=O}function B(){const O=this.resume(),U=this.stack[this.stack.length-1];U.url=O}function A(O){const U=this.stack[this.stack.length-1];if(!U.depth){const Q=this.sliceSerialize(O).length;U.depth=Q}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function M(O){const U=this.stack[this.stack.length-1];U.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function E(O){const Q=this.stack[this.stack.length-1].children;let ne=Q[Q.length-1];(!ne||ne.type!=="text")&&(ne=en(),ne.position={start:Lt(O.start),end:void 0},Q.push(ne)),this.stack.push(ne)}function L(O){const U=this.stack.pop();U.value+=this.sliceSerialize(O),U.position.end=Lt(O.end)}function D(O){const U=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Q=U.children[U.children.length-1];Q.position.end=Lt(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(U.type)&&(E.call(this,O),L.call(this,O))}function P(){this.data.atHardBreak=!0}function V(){const O=this.resume(),U=this.stack[this.stack.length-1];U.value=O}function _(){const O=this.resume(),U=this.stack[this.stack.length-1];U.value=O}function I(){const O=this.resume(),U=this.stack[this.stack.length-1];U.value=O}function R(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=U,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function W(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=U,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function Y(O){const U=this.sliceSerialize(O),Q=this.stack[this.stack.length-2];Q.label=l4(U),Q.identifier=bn(U).toLowerCase()}function Z(){const O=this.stack[this.stack.length-1],U=this.resume(),Q=this.stack[this.stack.length-1];if(this.data.inReference=!0,Q.type==="link"){const ne=O.children;Q.children=ne}else Q.alt=U}function S(){const O=this.resume(),U=this.stack[this.stack.length-1];U.url=O}function q(){const O=this.resume(),U=this.stack[this.stack.length-1];U.title=O}function oe(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function Re(O){const U=this.resume(),Q=this.stack[this.stack.length-1];Q.label=U,Q.identifier=bn(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function Xe(O){this.data.characterReferenceType=O.type}function $(O){const U=this.sliceSerialize(O),Q=this.data.characterReferenceType;let ne;Q?(ne=ff(U,Q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=js(U);const se=this.stack[this.stack.length-1];se.value+=ne}function me(O){const U=this.stack.pop();U.position.end=Lt(O.end)}function ie(O){L.call(this,O);const U=this.stack[this.stack.length-1];U.url=this.sliceSerialize(O)}function ye(O){L.call(this,O);const U=this.stack[this.stack.length-1];U.url="mailto:"+this.sliceSerialize(O)}function ce(){return{type:"blockquote",children:[]}}function Ze(){return{type:"code",lang:null,meta:null,value:""}}function kt(){return{type:"inlineCode",value:""}}function ct(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function lr(){return{type:"emphasis",children:[]}}function Qt(){return{type:"heading",depth:0,children:[]}}function En(){return{type:"break"}}function Fn(){return{type:"html",value:""}}function ut(){return{type:"image",title:null,url:"",alt:null}}function At(){return{type:"link",title:null,url:"",children:[]}}function dt(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function Bn(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function Ln(){return{type:"paragraph",children:[]}}function Et(){return{type:"strong",children:[]}}function en(){return{type:"text",value:""}}function tn(){return{type:"thematicBreak"}}}function Lt(e){return{line:e.line,column:e.column,offset:e.offset}}function Sf(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Sf(e,r):f4(e,r)}}function f4(e,t){let n;for(n in t)if(kf.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 ic(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Gn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Gn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Gn({start:t.start,end:t.end})+") is still open")}function h4(e){const t=this;t.parser=n;function n(r){return u4(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function p4(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 m4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
378
|
-
`}]}function
|
|
379
|
-
`:"",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
|
|
380
|
-
`}),
|
|
381
|
-
`});const d={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,d),e.applyData(t,d)}function
|
|
403
|
+
`;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 h4(e){const r={constructs:vb([c4,...(e||{}).extensions||[]]),content:i(Ab),defined:[],document:i(Bb),flow:i(K5),lazy:{},string:i(Z5),text:i(J5)};return r;function i(o){return s;function s(l){return u4(r,o,l)}}}function p4(e){for(;!wf(e););return e}const lc=/[\0\t\n\r]/g;function m4(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const u=[];let d,c,f,m,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(lc.lastIndex=f,d=lc.exec(o),m=d&&d.index!==void 0?d.index:o.length,p=o.charCodeAt(m),!d){t=o.slice(f);break}if(p===10&&f===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<m&&(u.push(o.slice(f,m)),e+=m-f),p){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}f=m+1}return l&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const g4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function x4(e){return e.replace(g4,y4)}function y4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return xf(n.slice(o?2:1),o?16:10)}return Ls(n)||e}const Ef={}.hasOwnProperty;function b4(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),v4(n)(p4(h4(n).document().write(m4()(e,t,!0))))}function v4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Et),autolinkProtocol:A,autolinkEmail:A,atxHeading:o(en),blockQuote:o(le),characterEscape:A,characterReference:A,codeFenced:o(We),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(We,s),codeText:o(it,s),codeTextData:A,data:A,codeFlowValue:A,definition:o(ut),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(dr),hardBreakEscape:o(Fn),hardBreakTrailing:o(Fn),htmlFlow:o(Bn,s),htmlFlowData:A,htmlText:o(Bn,s),htmlTextData:A,image:o(dt),label:s,link:o(Et),listItem:o(Ln),listItemValue:m,listOrdered:o(ft,f),listUnordered:o(ft),paragraph:o(In),reference:C,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(en),strong:o(At),thematicBreak:o(nn)},exit:{atxHeading:u(),atxHeadingSequence:B,autolink:u(),autolinkEmail:he,autolinkProtocol:ne,blockQuote:u(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:H,characterReference:fe,codeFenced:u(y),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:L,codeIndented:u(v),codeText:u(I),codeTextData:L,data:L,definition:u(),definitionDestinationString:F,definitionLabelString:j,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(R),hardBreakTrailing:u(R),htmlFlow:u(V),htmlFlowData:L,htmlText:u(_),htmlTextData:L,image:u(U),label:G,labelText:W,lineEnding:M,link:u(D),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ie,resourceDestinationString:b,resourceTitleString:K,resource:te,setextHeading:u(E),setextHeadingLineSequence:O,setextHeadingText:T,strong:u(),thematicBreak:u()}};Af(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(P){let Y={type:"root",children:[]};const Q={stack:[Y],tokenStack:[],config:t,enter:l,exit:d,buffer:s,resume:c,data:n},oe=[];let ce=-1;for(;++ce<P.length;)if(P[ce][1].type==="listOrdered"||P[ce][1].type==="listUnordered")if(P[ce][0]==="enter")oe.push(ce);else{const Be=oe.pop();ce=i(P,Be,ce)}for(ce=-1;++ce<P.length;){const Be=t[P[ce][0]];Ef.call(Be,P[ce][1].type)&&Be[P[ce][1].type].call(Object.assign({sliceSerialize:P[ce][2].sliceSerialize},Q),P[ce][1])}if(Q.tokenStack.length>0){const Be=Q.tokenStack[Q.tokenStack.length-1];(Be[1]||cc).call(Q,void 0,Be[0])}for(Y.position={start:Lt(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:Lt(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)Y=t.transforms[ce](Y)||Y;return Y}function i(P,Y,Q){let oe=Y-1,ce=-1,Be=!1,Le,Xe,Ft,Bt;for(;++oe<=Q;){const De=P[oe];switch(De[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{De[0]==="enter"?ce++:ce--,Bt=void 0;break}case"lineEndingBlank":{De[0]==="enter"&&(Le&&!Bt&&!ce&&!Ft&&(Ft=oe),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!ce&&De[0]==="enter"&&De[1].type==="listItemPrefix"||ce===-1&&De[0]==="exit"&&(De[1].type==="listUnordered"||De[1].type==="listOrdered")){if(Le){let St=oe;for(Xe=void 0;St--;){const Ue=P[St];if(Ue[1].type==="lineEnding"||Ue[1].type==="lineEndingBlank"){if(Ue[0]==="exit")continue;Xe&&(P[Xe][1].type="lineEndingBlank",Be=!0),Ue[1].type="lineEnding",Xe=St}else if(!(Ue[1].type==="linePrefix"||Ue[1].type==="blockQuotePrefix"||Ue[1].type==="blockQuotePrefixWhitespace"||Ue[1].type==="blockQuoteMarker"||Ue[1].type==="listItemIndent"))break}Ft&&(!Xe||Ft<Xe)&&(Le._spread=!0),Le.end=Object.assign({},Xe?P[Xe][1].start:De[1].end),P.splice(Xe||oe,0,["exit",Le,De[2]]),oe++,Q++}if(De[1].type==="listItemPrefix"){const St={type:"listItem",_spread:!1,start:Object.assign({},De[1].start),end:void 0};Le=St,P.splice(oe,0,["enter",St,De[2]]),oe++,Q++,Ft=void 0,Bt=!0}}}return P[Y][1]._spread=Be,Q}function o(P,Y){return Q;function Q(oe){l.call(this,P(oe),oe),Y&&Y.call(this,oe)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(P,Y,Q){this.stack[this.stack.length-1].children.push(P),this.stack.push(P),this.tokenStack.push([Y,Q||void 0]),P.position={start:Lt(Y.start),end:void 0}}function u(P){return Y;function Y(Q){P&&P.call(this,Q),d.call(this,Q)}}function d(P,Y){const Q=this.stack.pop(),oe=this.tokenStack.pop();if(oe)oe[0].type!==P.type&&(Y?Y.call(this,P,oe[0]):(oe[1]||cc).call(this,P,oe[0]));else throw new Error("Cannot close `"+P.type+"` ("+qn({start:P.start,end:P.end})+"): it’s not open");Q.position.end=Lt(P.end)}function c(){return yb(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(P){if(this.data.expectingFirstListItemValue){const Y=this.stack[this.stack.length-2];Y.start=Number.parseInt(this.sliceSerialize(P),10),this.data.expectingFirstListItemValue=void 0}}function p(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.lang=P}function g(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.meta=P}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.value=P.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.value=P.replace(/(\r?\n|\r)$/g,"")}function j(P){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.label=Y,Q.identifier=vn(this.sliceSerialize(P)).toLowerCase()}function k(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.title=P}function F(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.url=P}function B(P){const Y=this.stack[this.stack.length-1];if(!Y.depth){const Q=this.sliceSerialize(P).length;Y.depth=Q}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function O(P){const Y=this.stack[this.stack.length-1];Y.depth=this.sliceSerialize(P).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function A(P){const Q=this.stack[this.stack.length-1].children;let oe=Q[Q.length-1];(!oe||oe.type!=="text")&&(oe=tn(),oe.position={start:Lt(P.start),end:void 0},Q.push(oe)),this.stack.push(oe)}function L(P){const Y=this.stack.pop();Y.value+=this.sliceSerialize(P),Y.position.end=Lt(P.end)}function M(P){const Y=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Q=Y.children[Y.children.length-1];Q.position.end=Lt(P.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Y.type)&&(A.call(this,P),L.call(this,P))}function R(){this.data.atHardBreak=!0}function V(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.value=P}function _(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.value=P}function I(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.value=P}function D(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=Y,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function U(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=Y,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function W(P){const Y=this.sliceSerialize(P),Q=this.stack[this.stack.length-2];Q.label=x4(Y),Q.identifier=vn(Y).toLowerCase()}function G(){const P=this.stack[this.stack.length-1],Y=this.resume(),Q=this.stack[this.stack.length-1];if(this.data.inReference=!0,Q.type==="link"){const oe=P.children;Q.children=oe}else Q.alt=Y}function b(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.url=P}function K(){const P=this.resume(),Y=this.stack[this.stack.length-1];Y.title=P}function te(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function ie(P){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.label=Y,Q.identifier=vn(this.sliceSerialize(P)).toLowerCase(),this.data.referenceType="full"}function ae(P){this.data.characterReferenceType=P.type}function H(P){const Y=this.sliceSerialize(P),Q=this.data.characterReferenceType;let oe;Q?(oe=xf(Y,Q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):oe=Ls(Y);const ce=this.stack[this.stack.length-1];ce.value+=oe}function fe(P){const Y=this.stack.pop();Y.position.end=Lt(P.end)}function ne(P){L.call(this,P);const Y=this.stack[this.stack.length-1];Y.url=this.sliceSerialize(P)}function he(P){L.call(this,P);const Y=this.stack[this.stack.length-1];Y.url="mailto:"+this.sliceSerialize(P)}function le(){return{type:"blockquote",children:[]}}function We(){return{type:"code",lang:null,meta:null,value:""}}function it(){return{type:"inlineCode",value:""}}function ut(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function dr(){return{type:"emphasis",children:[]}}function en(){return{type:"heading",depth:0,children:[]}}function Fn(){return{type:"break"}}function Bn(){return{type:"html",value:""}}function dt(){return{type:"image",title:null,url:"",alt:null}}function Et(){return{type:"link",title:null,url:"",children:[]}}function ft(P){return{type:"list",ordered:P.type==="listOrdered",start:null,spread:P._spread,children:[]}}function Ln(P){return{type:"listItem",spread:P._spread,checked:null,children:[]}}function In(){return{type:"paragraph",children:[]}}function At(){return{type:"strong",children:[]}}function tn(){return{type:"text",value:""}}function nn(){return{type:"thematicBreak"}}}function Lt(e){return{line:e.line,column:e.column,offset:e.offset}}function Af(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Af(e,r):w4(e,r)}}function w4(e,t){let n;for(n in t)if(Ef.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 cc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qn({start:t.start,end:t.end})+") is still open")}function k4(e){const t=this;t.parser=n;function n(r){return b4(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function S4(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 C4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
404
|
+
`}]}function T4(e,t){const n=t.value?t.value+`
|
|
405
|
+
`:"",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 j4(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function E4(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function A4(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 F4(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 B4(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ff(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 L4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ff(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 I4(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 D4(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 R4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ff(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 M4(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 P4(e,t,n){const r=e.all(t),i=n?O4(n):Bf(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.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:`
|
|
406
|
+
`}),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:`
|
|
407
|
+
`});const d={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,d),e.applyData(t,d)}function O4(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=Bf(n[r])}return t}function Bf(e){const t=e.spread;return t??e.children.length>1}function z4(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 _4(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function N4(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function V4(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function H4(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=Es(t.children[1]),u=uf(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 W4(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 f=t.children[u],m={},p=s?s[u]:void 0;p&&(m.align=p);let g={type:"element",tagName:o,properties:m,children:[]};f&&(g.children=e.all(f),e.patch(f,g),g=e.applyData(f,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 U4(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const uc=9,dc=32;function $4(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(fc(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(fc(t.slice(i),i>0,!1)),o.join("")}function fc(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===uc||o===dc;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===uc||o===dc;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function G4(e,t){const n={type:"text",value:$4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Y4(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const K4={blockquote:S4,break:C4,code:T4,delete:j4,emphasis:E4,footnoteReference:A4,heading:F4,html:B4,imageReference:L4,image:I4,inlineCode:D4,linkReference:R4,link:M4,listItem:P4,list:z4,paragraph:_4,root:N4,strong:V4,table:H4,tableCell:U4,tableRow:W4,text:G4,thematicBreak:Y4,toml:Er,yaml:Er,definition:Er,footnoteDefinition:Er};function Er(){}const Lf=-1,oi=0,Zn=1,Zr=2,Rs=3,Ms=4,Ps=5,Os=6,If=7,Df=8,q4=typeof self=="object"?self:globalThis,hc=(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 q4[e](t)},X4=(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 oi:case Lf:return n(s,i);case Zn:{const l=n([],i);for(const u of s)l.push(r(u));return l}case Zr:{const l=n({},i);for(const[u,d]of s)l[r(u)]=r(d);return l}case Rs:return n(new Date(s),i);case Ms:{const{source:l,flags:u}=s;return n(new RegExp(l,u),i)}case Ps:{const l=n(new Map,i);for(const[u,d]of s)l.set(r(u),r(d));return l}case Os:{const l=n(new Set,i);for(const u of s)l.add(r(u));return l}case If:{const{name:l,message:u}=s;return n(hc(l,u),i)}case Df: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(hc(o,s),i)};return r},pc=e=>X4(new Map,e)(0),fn="",{toString:Z4}={},{keys:J4}=Object,Nn=e=>{const t=typeof e;if(t!=="object"||!e)return[oi,t];const n=Z4.call(e).slice(8,-1);switch(n){case"Array":return[Zn,fn];case"Object":return[Zr,fn];case"Date":return[Rs,fn];case"RegExp":return[Ms,fn];case"Map":return[Ps,fn];case"Set":return[Os,fn];case"DataView":return[Zn,n]}return n.includes("Array")?[Zn,n]:n.includes("Error")?[If,n]:[Zr,n]},Ar=([e,t])=>e===oi&&(t==="function"||t==="symbol"),Q4=(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]=Nn(s);switch(l){case oi:{let c=s;switch(u){case"bigint":l=Df,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([Lf],s)}return i([l,c],s)}case Zn:{if(u){let m=s;return u==="DataView"?m=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(s)),i([u,[...m]],s)}const c=[],f=i([l,c],s);for(const m of s)c.push(o(m));return f}case Zr:{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=[],f=i([l,c],s);for(const m of J4(s))(e||!Ar(Nn(s[m])))&&c.push([o(m),o(s[m])]);return f}case Rs:return i([l,s.toISOString()],s);case Ms:{const{source:c,flags:f}=s;return i([l,{source:c,flags:f}],s)}case Ps:{const c=[],f=i([l,c],s);for(const[m,p]of s)(e||!(Ar(Nn(m))||Ar(Nn(p))))&&c.push([o(m),o(p)]);return f}case Os:{const c=[],f=i([l,c],s);for(const m of s)(e||!Ar(Nn(m)))&&c.push(o(m));return f}}const{message:d}=s;return i([l,{name:u,message:d}],s)};return o},mc=(e,{json:t,lossy:n}={})=>{const r=[];return Q4(!(t||n),!!t,new Map,r)(e),r},Jr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pc(mc(e,t)):structuredClone(e):(e,t)=>pc(mc(e,t));function ev(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 tv(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function nv(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ev,r=e.options.footnoteBackLabel||tv,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),f=String(d.identifier).toUpperCase(),m=An(f.toLowerCase());let p=0;const g=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++p<=x;){g.length>0&&g.push({type:"text",value:" "});let j=typeof n=="string"?n:n(u,p);typeof j=="string"&&(j={type:"text",value:j}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const y=c[c.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 c.push(...g);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(c,!0)};e.patch(d,v),l.push(v)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Jr(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
382
408
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
383
|
-
`}]}}const
|
|
409
|
+
`}]}}const Rf=(function(e){if(e==null)return sv;if(typeof e=="function")return si(e);if(typeof e=="object")return Array.isArray(e)?rv(e):iv(e);if(typeof e=="string")return ov(e);throw new Error("Expected function, string, or object as test")});function rv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Rf(e[n]);return si(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function iv(e){const t=e;return si(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function ov(e){return si(t);function t(n){return n&&n.type===e}}function si(e){return t;function t(n,r,i){return!!(av(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function sv(){return!0}function av(e){return e!==null&&typeof e=="object"&&"type"in e}const Mf=[],lv=!0,gc=!1,cv="skip";function uv(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Rf(i),s=r?-1:1;l(e,void 0,[])();function l(u,d,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=Mf,g,x,y;if((!t||o(u,d,c[c.length-1]||void 0))&&(p=dv(n(u,c)),p[0]===gc))return p;if("children"in u&&u.children){const v=u;if(v.children&&p[0]!==cv)for(x=(r?v.children.length:-1)+s,y=c.concat(v);x>-1&&x<v.children.length;){const j=v.children[x];if(g=l(j,x,y)(),g[0]===gc)return g;x=typeof g[1]=="number"?g[1]:x+s}}return p}}}function dv(e){return Array.isArray(e)?e:typeof e=="number"?[lv,e]:e==null?Mf:[e]}function Pf(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),uv(e,o,l,i);function l(u,d){const c=d[d.length-1],f=c?c.children.indexOf(u):void 0;return s(u,f,c)}}const Oo={}.hasOwnProperty,fv={};function hv(e,t){const n=t||fv,r=new Map,i=new Map,o=new Map,s={...K4,...n.handlers},l={all:d,applyData:mv,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:u,options:n,patch:pv,wrap:xv};return Pf(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,m=String(c.identifier).toUpperCase();f.has(m)||f.set(m,c)}}),l;function u(c,f){const m=c.type,p=l.handlers[m];if(Oo.call(l.handlers,m)&&p)return p(l,c,f);if(l.options.passThrough&&l.options.passThrough.includes(m)){if("children"in c){const{children:x,...y}=c,v=Jr(y);return v.children=l.all(c),v}return Jr(c)}return(l.options.unknownHandler||gv)(l,c,f)}function d(c){const f=[];if("children"in c){const m=c.children;let p=-1;for(;++p<m.length;){const g=l.one(m[p],c);if(g){if(p&&m[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=xc(g.value)),!Array.isArray(g)&&g.type==="element")){const x=g.children[0];x&&x.type==="text"&&(x.value=xc(x.value))}Array.isArray(g)?f.push(...g):f.push(g)}}}return f}}function pv(e,t){e.position&&(t.position=X2(e))}function mv(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,Jr(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function gv(e,t){const n=t.data||{},r="value"in t&&!(Oo.call(n,"hProperties")||Oo.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 xv(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
384
410
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
385
411
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
386
|
-
`}),n}function
|
|
387
|
-
`},i),o}function cv(e,t){return e&&"run"in e?async function(n,r){const i=hc(n,{file:r,...t});await e.run(i,r)}:function(n,r){return hc(n,{file:r,...e||t})}}function pc(e){if(e)throw e}var _i,mc;function uv(){if(mc)return _i;mc=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 u=e.call(d,"constructor"),f=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!u&&!f)return!1;var p;for(p in d);return typeof p>"u"||e.call(d,p)},s=function(d,u){n&&u.name==="__proto__"?n(d,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):d[u.name]=u.newValue},l=function(d,u){if(u==="__proto__")if(e.call(d,u)){if(r)return r(d,u).value}else return;return d[u]};return _i=function c(){var d,u,f,p,m,g,x=arguments[0],y=1,b=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<b;++y)if(d=arguments[y],d!=null)for(u in d)f=l(x,u),p=l(d,u),x!==p&&(j&&p&&(o(p)||(m=i(p)))?(m?(m=!1,g=f&&i(f)?f:[]):g=f&&o(f)?f:{},s(x,{name:u,newValue:c(j,g,p)})):typeof p<"u"&&s(x,{name:u,newValue:p}));return x},_i}var dv=uv();const Ni=rf(dv);function Do(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 fv(){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(c,...d){const u=e[++o];let f=-1;if(c){s(c);return}for(;++f<i.length;)(d[f]===null||d[f]===void 0)&&(d[f]=i[f]);i=d,u?hv(u,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 hv(e,t){let n;return r;function r(...s){const l=e.length>s.length;let c;l&&s.push(i);try{c=e.apply(this,s)}catch(d){const u=d;if(l&&n)throw u;return i(u)}l||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const gt={basename:pv,dirname:mv,extname:gv,join:xv,sep:"/"};function pv(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ar(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 mv(e){if(ar(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 gv(e){ar(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 xv(...e){let t=-1,n;for(;++t<e.length;)ar(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":yv(n)}function yv(e){ar(e);const t=e.codePointAt(0)===47;let n=bv(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bv(e,t){let n="",r=0,i=-1,o=0,s=-1,l,c;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(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),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 ar(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vv={cwd:wv};function wv(){return"/"}function Ro(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kv(e){if(typeof e=="string")e=new URL(e);else if(!Ro(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 Sv(e)}function Sv(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 Vi=["history","path","basename","stem","extname","dirname"];class If{constructor(t){let n;t?Ro(t)?n={path:t}:typeof t=="string"||Cv(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":vv.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Vi.length;){const o=Vi[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)Vi.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?gt.basename(this.path):void 0}set basename(t){Wi(t,"basename"),Hi(t,"basename"),this.path=gt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?gt.dirname(this.path):void 0}set dirname(t){gc(this.basename,"dirname"),this.path=gt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?gt.extname(this.path):void 0}set extname(t){if(Hi(t,"extname"),gc(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=gt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ro(t)&&(t=kv(t)),Wi(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?gt.basename(this.path,this.extname):void 0}set stem(t){Wi(t,"stem"),Hi(t,"stem"),this.path=gt.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 Pe(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 Hi(e,t){if(e&&e.includes(gt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+gt.sep+"`")}function Wi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function gc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Cv(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Tv=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),jv={}.hasOwnProperty;class Ds extends Tv{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=fv()}copy(){const t=new Ds;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ni(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Gi("data",this.frozen),this.namespace[t]=n,this):jv.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gi("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=Tr(t),r=this.parser||this.Parser;return Ui("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ui("process",this.parser||this.Parser),$i("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=Tr(t),c=r.parse(l);r.run(c,l,function(u,f,p){if(u||!f||!p)return d(u);const m=f,g=r.stringify(m,p);Fv(g)?p.value=g:p.result=g,d(u,p)});function d(u,f){u||!f?s(u):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Ui("processSync",this.parser||this.Parser),$i("processSync",this.compiler||this.Compiler),this.process(t,i),yc("processSync","process",n),r;function i(o,s){n=!0,pc(o),r=s}}run(t,n,r){xc(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 c=Tr(n);i.run(t,c,d);function d(u,f,p){const m=f||t;u?l(u):s?s(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),yc("runSync","run",r),i;function o(s,l){pc(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Tr(n),i=this.compiler||this.Compiler;return $i("stringify",i),xc(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Gi("use",this.frozen),t!=null)if(typeof t=="function")c(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")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[u,...f]=d;c(u,f)}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=Ni(!0,i.settings,d.settings))}function l(d){let u=-1;if(d!=null)if(Array.isArray(d))for(;++u<d.length;){const f=d[u];o(f)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,u){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===d){p=f;break}if(p===-1)r.push([d,...u]);else if(u.length>0){let[m,...g]=u;const x=r[p][1];Do(x)&&Do(m)&&(m=Ni(!0,x,m)),r[p]=[d,m,...g]}}}}const Av=new Ds().freeze();function Ui(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function $i(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gi(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 xc(e){if(!Do(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function yc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Tr(e){return Ev(e)?e:new If(e)}function Ev(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Fv(e){return typeof e=="string"||Bv(e)}function Bv(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Lv="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",bc=[],vc={allowDangerousHtml:!0},Iv=/^(https?|ircs?|mailto|xmpp)$/i,Dv=[{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 Rv(e){const t=Mv(e),n=Pv(e);return Ov(t.runSync(t.parse(n),n),e)}function Mv(e){const t=e.rehypePlugins||bc,n=e.remarkPlugins||bc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vc}:vc;return Av().use(h4).use(n).use(cv,r).use(t)}function Pv(e){const t=e.children||"",n=new If;return typeof t=="string"&&(n.value=t),n}function Ov(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||zv;for(const u of Dv)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+Lv+u.id,void 0);return Lf(e,d),G2(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function d(u,f,p){if(u.type==="raw"&&p&&typeof f=="number")return s?p.children.splice(f,1):p.children[f]={type:"text",value:u.value},f;if(u.type==="element"){let m;for(m in Pi)if(Object.hasOwn(Pi,m)&&Object.hasOwn(u.properties,m)){const g=u.properties[m],x=Pi[m];(x===null||x.includes(u.tagName))&&(u.properties[m]=c(String(g||""),m,u))}}if(u.type==="element"){let m=n?!n.includes(u.tagName):o?o.includes(u.tagName):!1;if(!m&&r&&typeof f=="number"&&(m=!r(u,f,p)),m&&p&&typeof f=="number")return l&&u.children?p.children.splice(f,1,...u.children):p.children.splice(f,1),f}}}function zv(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||Iv.test(e.slice(0,t))?e:""}const _v={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function Nv({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:r="blue",answerType:i="HTML",...o}){const s=_v[r],[l,c]=T.useState(new Set(n)),d=u=>{c(f=>{const p=new Set(f);return p.has(u)?p.delete(u):(t||p.clear(),p.add(u)),p})};return a.jsx(h.Box,{display:"flex",flexDirection:"column",gap:"4",...o,children:e.map(u=>{const f=l.has(u.id);return a.jsxs(h.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:f?s.ring:"border"},children:[a.jsxs(h.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(u.id),"aria-expanded":f,children:[a.jsx(h.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:u.question}),a.jsx(h.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:f?"none":"1.5px solid var(--medix-form-text)",background:f?s.solid:"transparent",color:f?"#ffffff":"inherit",flexShrink:0},children:f?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(h.Box,{overflow:"hidden",maxH:f?"800px":"0px",opacity:f?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:a.jsx(h.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:typeof u.answer=="string"?i==="MD"?a.jsx(Rv,{children:u.answer}):a.jsx("span",{dangerouslySetInnerHTML:{__html:x2.sanitize(u.answer)}}):u.answer})})]},u.id)})})}function Vv({quote:e,authorName:t,authorTitle:n,authorAvatar:r,rating:i,...o}){return a.jsxs(h.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(h.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((s,l)=>a.jsx(h.Box,{as:"span",fontSize:"sm",color:l<i?"#F59E0B":"text.muted",children:"★"},l))}),a.jsxs(h.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),a.jsxs(h.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(h.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(h.Box,{children:[a.jsx(h.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const Hv={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function Wv(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 Uv({title:e,excerpt:t,category:n,date:r,coverImage:i,href:o,onClick:s,colorScheme:l="blue",...c}){const d=!!(o||s),u=Wv(r),f=Hv[l],p={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:d?"pointer":"default",textAlign:"left"},m=a.jsxs(h.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,...c,children:[a.jsxs(h.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(h.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),u&&a.jsxs(h.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(h.Box,{style:{fontSize:22,fontWeight:700,color:f.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),a.jsx(h.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),a.jsxs(h.Box,{px:"0",pt:"3",pb:"4",children:[n&&a.jsx(h.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:f.token,color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),a.jsx(h.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&a.jsx(h.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 $v({columns:e,data:t,rowKey:n="id",isLoading:r=!1,emptyMessage:i="No data available",sortable:o=!1,sortKey:s,sortDirection:l="asc",onSort:c,striped:d=!1,onRowClick:u,caption:f,enablePagination:p=!1,pageSize:m=10,page:g,onPageChange:x,enableSearch:y=!1,searchPlaceholder:b="Search table...",searchQuery:j,onSearchChange:k,style:B,className:A}){const[w,M]=T.useState(""),F=j??w,[E,L]=T.useState(1),D=g??E,[P,V]=T.useState(s),[_,I]=T.useState(l),R=s??P,W=s?l:_,Y=$=>{M($),L(1),k==null||k($)},Z=$=>{const me=R===$&&W==="asc"?"desc":"asc";V($),I(me),c==null||c($,me)},S=$=>{L($),x==null||x($)},q=T.useMemo(()=>{if(!F.trim())return t;const $=F.toLowerCase().trim();return t.filter(me=>e.some(ie=>{const ye=me[ie.key];return ye==null?!1:String(ye).toLowerCase().includes($)}))},[t,e,F]),oe=T.useMemo(()=>!R||c?q:[...q].sort(($,me)=>{const ie=$[R],ye=me[R],ce=String(ie??""),Ze=String(ye??""),kt=ce.localeCompare(Ze,void 0,{numeric:!0,sensitivity:"base"});return W==="asc"?kt:-kt}),[q,R,W,c]),C=oe.length,Re=T.useMemo(()=>{if(!p)return oe;const $=(D-1)*m;return oe.slice($,$+m)},[oe,p,D,m]),Xe=({colKey:$})=>R!==$?a.jsx(h.Text,{as:"span",opacity:.3,ml:"1",fontSize:"xs",children:"↕"}):a.jsx(h.Text,{as:"span",ml:"1",color:"text.heading",fontSize:"xs",children:W==="asc"?"↑":"↓"});return a.jsxs(h.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"none",_dark:{boxShadow:"none"},style:B,className:A,children:[y&&a.jsx(h.Box,{p:"4",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsx(Vo,{placeholder:b,value:F,onChange:$=>Y($.target.value),maxW:"360px"})}),a.jsx(h.Box,{overflowX:"auto",children:a.jsxs(h.Box,{as:"table",w:"full",style:{borderCollapse:"collapse"},"aria-label":f,children:[f&&a.jsx("caption",{style:{display:"none"},children:f}),a.jsx(h.Box,{as:"thead",children:a.jsx(h.Box,{as:"tr",bg:"bg.subtle",borderBottom:"1px solid",borderColor:"border",children:e.map($=>a.jsx(h.Box,{as:"th",py:"3",px:"4",textAlign:$.align??"left",minW:$.minWidth,fontSize:"xs",fontWeight:"600",letterSpacing:"0.05em",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",whiteSpace:"nowrap",userSelect:"none",cursor:$.sortable||o?"pointer":"default",_hover:$.sortable||o?{color:"text.heading"}:void 0,onClick:()=>$.sortable||o?Z($.key):void 0,"aria-sort":R===$.key?W==="asc"?"ascending":"descending":void 0,children:a.jsxs(h.Flex,{as:"span",align:"center",justify:$.align==="right"?"flex-end":$.align==="center"?"center":"flex-start",children:[$.label,($.sortable||o)&&a.jsx(Xe,{colKey:$.key})]})},$.key))})}),a.jsx(h.Box,{as:"tbody",children:r?Array.from({length:5}).map(($,me)=>a.jsx(h.Box,{as:"tr",borderBottom:"1px solid",borderColor:"border",children:e.map(ie=>a.jsx(h.Box,{as:"td",py:"3.5",px:"4",children:a.jsx(h.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},ie.key))},me)):Re.length===0?a.jsx(h.Box,{as:"tr",children:a.jsx("td",{colSpan:e.length,style:{textAlign:"center",padding:"48px 16px"},children:a.jsx(h.Text,{color:"text.muted",fontFamily:"var(--font-body)",fontSize:"sm",children:i})})}):Re.map(($,me)=>{const ie=String($[n]??me);return a.jsx(h.Box,{as:"tr",onClick:()=>u==null?void 0:u($,me),bg:d&&me%2===1?"bg.subtle":"transparent",borderBottom:"1px solid",borderColor:"border",cursor:u?"pointer":"default",transition:"background 0.15s ease",_hover:{bg:"bg.subtle"},children:e.map(ye=>a.jsx(h.Box,{as:"td",py:"3.5",px:"4",textAlign:ye.align??"left",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",verticalAlign:"middle",children:ye.render?ye.render($[ye.key],$,me):String($[ye.key]??"—")},ye.key))},ie)})})]})}),p&&a.jsxs(h.Flex,{p:"4",borderTop:"1px solid",borderColor:"border",bg:"bg.surface",align:"center",justify:"space-between",flexWrap:"wrap",gap:"4",children:[a.jsxs(h.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:["Showing ",C===0?0:(D-1)*m+1," to"," ",Math.min(D*m,C)," of ",C," entries"]}),a.jsx(zd,{total:C,pageSize:m,currentPage:D,onChange:S,compact:!0})]})]})}function Gv({name:e,specialty:t,location:n,avatar:r,rating:i,reviewCount:o,experience:s,consultationFee:l,isVerified:c=!1,isAvailable:d=!1,availabilityLabel:u="Available",onBookClick:f,onViewClick:p,variant:m="standard",...g}){return m==="featured"?a.jsxs(h.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(h.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:a.jsx(h.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),a.jsxs(h.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[a.jsxs(h.Box,{children:[a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),c&&a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",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(h.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[d&&a.jsxs(h.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(h.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),u]}),d&&s&&a.jsx(h.Box,{w:"1px",h:"20px",bg:"border"}),s&&a.jsxs(h.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(h.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),a.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l&&a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),a.jsxs(h.Box,{display:"flex",gap:"3",alignItems:"center",children:[p&&a.jsx(h.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"}),f&&a.jsx(h.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:f,children:"Consult Now"})]})]})]})]}):m==="compact"?a.jsxs(h.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(h.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[a.jsxs(h.Box,{display:"flex",gap:"4",children:[a.jsx(h.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(h.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(h.Box,{pt:"1",children:[a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),a.jsxs(h.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&m!=="compact"?` • ${n}`:""]})]})]}),p&&a.jsx(h.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(h.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[a.jsx(h.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(h.Box,{as:"span",color:"text.heading",mr:"1",children:[(i==null?void 0:i.toFixed(1))||"New"," ",o?`(${o})`:""]}),n&&a.jsxs(h.Box,{as:"span",children:[" • ",n]}),s&&a.jsxs(h.Box,{as:"span",children:[" • ",s]})]}),a.jsx(h.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),a.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),f&&a.jsx(h.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:f,children:"Consult Now"})]})]}):a.jsxs(h.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(h.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[a.jsxs(h.Box,{display:"flex",gap:"4",children:[a.jsx(h.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(h.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(h.Box,{pt:"1",children:[a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),c&&a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",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(h.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n?` • ${n}`:""]})]})]}),a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[a.jsx(h.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(h.Box,{as:"span",color:"text.muted",children:["(",o,")"]}):null]})]}),a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[d&&a.jsxs(h.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(h.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),u]}),d&&s&&a.jsx(h.Box,{w:"1px",h:"20px",bg:"border"}),s&&a.jsxs(h.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(h.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),a.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),a.jsxs(h.Box,{display:"flex",gap:"3",alignItems:"center",children:[p&&a.jsx(h.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"}),f&&a.jsx(h.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:f,children:"Consult Now"})]})]})]})}const Yv={normal:{bg:"color-mix(in srgb, var(--chakra-colors-status-success) 8%, transparent)",dot:"status.success",border:"color-mix(in srgb, var(--chakra-colors-status-success) 20%, transparent)",text:"status.success"},warning:{bg:"color-mix(in srgb, var(--chakra-colors-status-warning) 8%, transparent)",dot:"status.warning",border:"color-mix(in srgb, var(--chakra-colors-status-warning) 20%, transparent)",text:"status.warning"},critical:{bg:"color-mix(in srgb, var(--chakra-colors-status-error) 8%, transparent)",dot:"status.error",border:"color-mix(in srgb, var(--chakra-colors-status-error) 20%, transparent)",text:"status.error"}};function Kv({label:e,value:t,unit:n,status:r="normal",...i}){const o=Yv[r];return a.jsxs(h.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(h.Box,{w:"2",h:"2",borderRadius:"full",bg:o.dot,flexShrink:0}),a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),a.jsxs(h.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[a.jsx(h.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&a.jsx(h.Box,{fontSize:"xs",color:o.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const qv={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function Xv({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:r,time:i,type:o="video",status:s="upcoming",onCancel:l,onReschedule:c,onJoin:d,...u}){const f=qv[s];return a.jsxs(h.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...u,children:[a.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[a.jsxs(h.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(h.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(h.Box,{children:[a.jsx(h.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&a.jsx(h.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),a.jsx(zo,{status:f.color,size:"sm",children:f.label})]}),a.jsxs(h.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),a.jsx(h.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),a.jsx(h.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),a.jsx(h.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(h.Box,{display:"flex",gap:"2",children:[d&&a.jsx(h.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"}),c&&a.jsx(h.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:c,children:"Reschedule"}),l&&a.jsx(h.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"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>h.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>h.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>h.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>h.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>h.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>h.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>h.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>h.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>h.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>h.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>h.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>h.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>h.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>h.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>h.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>h.WrapItem});exports.Accordion=Nv;exports.Alert=Po;exports.AppointmentCard=Xv;exports.Avatar=_o;exports.AvatarGroup=ph;exports.Badge=zo;exports.BlogCard=Uv;exports.Breadcrumb=uy;exports.Button=We;exports.Calendar=Ho;exports.Card=Vc;exports.CardBody=xp;exports.CardFooter=yp;exports.CardHeader=gp;exports.Checkbox=Oc;exports.Combobox=Kh;exports.Container=Wc;exports.CookieConsentBanner=Ud;exports.DashboardLayout=Md;exports.DataTable=$v;exports.DatePicker=$h;exports.DateRangePicker=Gh;exports.Divider=Rc;exports.DoctorCard=Gv;exports.Drawer=jy;exports.EmptyState=ky;exports.FileUpload=Xh;exports.Footer=Od;exports.FormControl=Ih;exports.FullPageSpinner=mh;exports.IconButton=Bc;exports.Input=No;exports.Logo=tr;exports.MedixProvider=lh;exports.Modal=vy;exports.Navbar=ey;exports.NotFoundPage=Sy;exports.OTPInput=_c;exports.PWAInstallPrompt=Gd;exports.Pagination=zd;exports.PhoneInput=Nh;exports.PinInput=Dh;exports.Progress=Nd;exports.RadioGroup=Eh;exports.RichTextEditor=mp;exports.RichTextInput=Wo;exports.SearchInput=Vo;exports.SectionHeader=vp;exports.Select=Ah;exports.ServerErrorPage=Cy;exports.Skeleton=Yt;exports.SkeletonCard=gy;exports.SkeletonText=_d;exports.Spinner=Ic;exports.StatCard=Hc;exports.Stepper=py;exports.Switch=zc;exports.Tabs=fy;exports.Tag=Dc;exports.TagInput=Zh;exports.TagsInput=Nc;exports.TestimonialCard=Vv;exports.Textarea=Mc;exports.ThemeColorPalette=Uc;exports.Toaster=Fc;exports.Tooltip=wy;exports.VitalBadge=Kv;exports.colorTokens=N;exports.dismissToast=rh;exports.medixConfig=Ac;exports.radiiTokens=Tc;exports.shadowTokens=jc;exports.spacingTokens=Cc;exports.system=Ec;exports.textStyleTokens=Sc;exports.toast=_n;exports.typographyTokens=fn;exports.useColorScheme=ch;exports.useIsDarkMode=Oo;exports.useThemeMode=er;
|
|
412
|
+
`}),n}function xc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function yc(e,t){const n=hv(e,t),r=n.one(e,void 0),i=nv(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
413
|
+
`},i),o}function yv(e,t){return e&&"run"in e?async function(n,r){const i=yc(n,{file:r,...t});await e.run(i,r)}:function(n,r){return yc(n,{file:r,...e||t})}}function bc(e){if(e)throw e}var Wi,vc;function bv(){if(vc)return Wi;vc=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"),f=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!c&&!f)return!1;var m;for(m in d);return typeof m>"u"||e.call(d,m)},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 Wi=function u(){var d,c,f,m,p,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(d=arguments[y],d!=null)for(c in d)f=l(x,c),m=l(d,c),x!==m&&(j&&m&&(o(m)||(p=i(m)))?(p?(p=!1,g=f&&i(f)?f:[]):g=f&&o(f)?f:{},s(x,{name:c,newValue:u(j,g,m)})):typeof m<"u"&&s(x,{name:c,newValue:m}));return x},Wi}var vv=bv();const Ui=cf(vv);function zo(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 wv(){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 f=-1;if(u){s(u);return}for(;++f<i.length;)(d[f]===null||d[f]===void 0)&&(d[f]=i[f]);i=d,c?kv(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 kv(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 xt={basename:Sv,dirname:Cv,extname:Tv,join:jv,sep:"/"};function Sv(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ur(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 Cv(e){if(ur(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 Tv(e){ur(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 jv(...e){let t=-1,n;for(;++t<e.length;)ur(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ev(n)}function Ev(e){ur(e);const t=e.codePointAt(0)===47;let n=Av(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Av(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 ur(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Fv={cwd:Bv};function Bv(){return"/"}function _o(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Lv(e){if(typeof e=="string")e=new URL(e);else if(!_o(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 Iv(e)}function Iv(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 $i=["history","path","basename","stem","extname","dirname"];class Of{constructor(t){let n;t?_o(t)?n={path:t}:typeof t=="string"||Dv(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Fv.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$i.length;){const o=$i[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)$i.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?xt.basename(this.path):void 0}set basename(t){Yi(t,"basename"),Gi(t,"basename"),this.path=xt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?xt.dirname(this.path):void 0}set dirname(t){wc(this.basename,"dirname"),this.path=xt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?xt.extname(this.path):void 0}set extname(t){if(Gi(t,"extname"),wc(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=xt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_o(t)&&(t=Lv(t)),Yi(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?xt.basename(this.path,this.extname):void 0}set stem(t){Yi(t,"stem"),Gi(t,"stem"),this.path=xt.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 ze(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 Gi(e,t){if(e&&e.includes(xt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+xt.sep+"`")}function Yi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function wc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Dv(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Rv=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Mv={}.hasOwnProperty;class zs extends Rv{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=wv()}copy(){const t=new zs;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ui(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Xi("data",this.frozen),this.namespace[t]=n,this):Mv.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Xi("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=Fr(t),r=this.parser||this.Parser;return Ki("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ki("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=Fr(t),u=r.parse(l);r.run(u,l,function(c,f,m){if(c||!f||!m)return d(c);const p=f,g=r.stringify(p,m);zv(g)?m.value=g:m.result=g,d(c,m)});function d(c,f){c||!f?s(c):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Ki("processSync",this.parser||this.Parser),qi("processSync",this.compiler||this.Compiler),this.process(t,i),Sc("processSync","process",n),r;function i(o,s){n=!0,bc(o),r=s}}run(t,n,r){kc(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=Fr(n);i.run(t,u,d);function d(c,f,m){const p=f||t;c?l(c):s?s(p):r(void 0,p,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Sc("runSync","run",r),i;function o(s,l){bc(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Fr(n),i=this.compiler||this.Compiler;return qi("stringify",i),kc(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Xi("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,...f]=d;u(c,f)}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=Ui(!0,i.settings,d.settings))}function l(d){let c=-1;if(d!=null)if(Array.isArray(d))for(;++c<d.length;){const f=d[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function u(d,c){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===d){m=f;break}if(m===-1)r.push([d,...c]);else if(c.length>0){let[p,...g]=c;const x=r[m][1];zo(x)&&zo(p)&&(p=Ui(!0,x,p)),r[m]=[d,p,...g]}}}}const Pv=new zs().freeze();function Ki(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 Xi(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 kc(e){if(!zo(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Sc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fr(e){return Ov(e)?e:new Of(e)}function Ov(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function zv(e){return typeof e=="string"||_v(e)}function _v(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Nv="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Cc=[],Tc={allowDangerousHtml:!0},Vv=/^(https?|ircs?|mailto|xmpp)$/i,Hv=[{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 Wv(e){const t=Uv(e),n=$v(e);return Gv(t.runSync(t.parse(n),n),e)}function Uv(e){const t=e.rehypePlugins||Cc,n=e.remarkPlugins||Cc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Tc}:Tc;return Pv().use(k4).use(n).use(yv,r).use(t)}function $v(e){const t=e.children||"",n=new Of;return typeof t=="string"&&(n.value=t),n}function Gv(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||Yv;for(const c of Hv)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+Nv+c.id,void 0);return Pf(e,d),tb(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function d(c,f,m){if(c.type==="raw"&&m&&typeof f=="number")return s?m.children.splice(f,1):m.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let p;for(p in Ni)if(Object.hasOwn(Ni,p)&&Object.hasOwn(c.properties,p)){const g=c.properties[p],x=Ni[p];(x===null||x.includes(c.tagName))&&(c.properties[p]=u(String(g||""),p,c))}}if(c.type==="element"){let p=n?!n.includes(c.tagName):o?o.includes(c.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(c,f,m)),p&&m&&typeof f=="number")return l&&c.children?m.children.splice(f,1,...c.children):m.children.splice(f,1),f}}}function Yv(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||Vv.test(e.slice(0,t))?e:""}const Kv={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function qv({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:r="blue",answerType:i="HTML",...o}){const s=Kv[r],[l,u]=S.useState(new Set(n)),d=c=>{u(f=>{const m=new Set(f);return m.has(c)?m.delete(c):(t||m.clear(),m.add(c)),m})};return a.jsx(h.Box,{display:"flex",flexDirection:"column",gap:"4",...o,children:e.map(c=>{const f=l.has(c.id);return a.jsxs(h.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:f?s.ring:"border"},children:[a.jsxs(h.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":f,children:[a.jsx(h.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:c.question}),a.jsx(h.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:f?"none":"1.5px solid var(--medix-form-text)",background:f?s.solid:"transparent",color:f?"#ffffff":"inherit",flexShrink:0},children:f?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(h.Box,{overflow:"hidden",maxH:f?"800px":"0px",opacity:f?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:a.jsx(h.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(Wv,{children:c.answer}):a.jsx("span",{dangerouslySetInnerHTML:{__html:j2.sanitize(c.answer)}}):c.answer})})]},c.id)})})}function Xv({quote:e,authorName:t,authorTitle:n,authorAvatar:r,rating:i,...o}){return a.jsxs(h.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(h.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((s,l)=>a.jsx(h.Box,{as:"span",fontSize:"sm",color:l<i?"#F59E0B":"text.muted",children:"★"},l))}),a.jsxs(h.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),a.jsxs(h.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(h.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(h.Box,{children:[a.jsx(h.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const Zv={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function Jv(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 Qv({title:e,excerpt:t,category:n,date:r,coverImage:i,href:o,onClick:s,colorScheme:l="blue",...u}){const d=!!(o||s),c=Jv(r),f=Zv[l],m={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:d?"pointer":"default",textAlign:"left"},p=a.jsxs(h.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(h.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(h.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),c&&a.jsxs(h.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(h.Box,{style:{fontSize:22,fontWeight:700,color:f.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:c.day}),a.jsx(h.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:c.weekday})]})]}),a.jsxs(h.Box,{px:"0",pt:"3",pb:"4",children:[n&&a.jsx(h.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:f.token,color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),a.jsx(h.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&a.jsx(h.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:m,onClick:s,children:p}):s?a.jsx("button",{type:"button",style:m,onClick:s,children:p}):p}function e6({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=!1,onRowClick:c,caption:f,enablePagination:m=!1,pageSize:p=10,page:g,onPageChange:x,enableSearch:y=!1,searchPlaceholder:v="Search table...",searchQuery:j,onSearchChange:k,style:F,className:B}){const[T,O]=S.useState(""),E=j??T,[A,L]=S.useState(1),M=g??A,[R,V]=S.useState(s),[_,I]=S.useState(l),D=s??R,U=s?l:_,W=H=>{O(H),L(1),k==null||k(H)},G=H=>{const fe=D===H&&U==="asc"?"desc":"asc";V(H),I(fe),u==null||u(H,fe)},b=H=>{L(H),x==null||x(H)},K=S.useMemo(()=>{if(!E.trim())return t;const H=E.toLowerCase().trim();return t.filter(fe=>e.some(ne=>{const he=fe[ne.key];return he==null?!1:String(he).toLowerCase().includes(H)}))},[t,e,E]),te=S.useMemo(()=>!D||u?K:[...K].sort((H,fe)=>{const ne=H[D],he=fe[D],le=String(ne??""),We=String(he??""),it=le.localeCompare(We,void 0,{numeric:!0,sensitivity:"base"});return U==="asc"?it:-it}),[K,D,U,u]),C=te.length,ie=S.useMemo(()=>{if(!m)return te;const H=(M-1)*p;return te.slice(H,H+p)},[te,m,M,p]),ae=({colKey:H})=>D!==H?a.jsx(h.Text,{as:"span",opacity:.3,ml:"1",fontSize:"xs",children:"↕"}):a.jsx(h.Text,{as:"span",ml:"1",color:"text.heading",fontSize:"xs",children:U==="asc"?"↑":"↓"});return a.jsxs(h.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"none",_dark:{boxShadow:"none"},style:F,className:B,children:[y&&a.jsx(h.Box,{p:"4",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:a.jsx(Go,{placeholder:v,value:E,onChange:H=>W(H.target.value),maxW:"360px"})}),a.jsx(h.Box,{overflowX:"auto",children:a.jsxs(h.Box,{as:"table",w:"full",style:{borderCollapse:"collapse"},"aria-label":f,children:[f&&a.jsx("caption",{style:{display:"none"},children:f}),a.jsx(h.Box,{as:"thead",children:a.jsx(h.Box,{as:"tr",bg:"bg.subtle",borderBottom:"1px solid",borderColor:"border",children:e.map(H=>a.jsx(h.Box,{as:"th",py:"3",px:"4",textAlign:H.align??"left",minW:H.minWidth,fontSize:"xs",fontWeight:"600",letterSpacing:"0.05em",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",whiteSpace:"nowrap",userSelect:"none",cursor:H.sortable||o?"pointer":"default",_hover:H.sortable||o?{color:"text.heading"}:void 0,onClick:()=>H.sortable||o?G(H.key):void 0,"aria-sort":D===H.key?U==="asc"?"ascending":"descending":void 0,children:a.jsxs(h.Flex,{as:"span",align:"center",justify:H.align==="right"?"flex-end":H.align==="center"?"center":"flex-start",children:[H.label,(H.sortable||o)&&a.jsx(ae,{colKey:H.key})]})},H.key))})}),a.jsx(h.Box,{as:"tbody",children:r?Array.from({length:5}).map((H,fe)=>a.jsx(h.Box,{as:"tr",borderBottom:"1px solid",borderColor:"border",children:e.map(ne=>a.jsx(h.Box,{as:"td",py:"3.5",px:"4",children:a.jsx(h.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},ne.key))},fe)):ie.length===0?a.jsx(h.Box,{as:"tr",children:a.jsx("td",{colSpan:e.length,style:{textAlign:"center",padding:"48px 16px"},children:a.jsx(h.Text,{color:"text.muted",fontFamily:"var(--font-body)",fontSize:"sm",children:i})})}):ie.map((H,fe)=>{const ne=String(H[n]??fe);return a.jsx(h.Box,{as:"tr",onClick:()=>c==null?void 0:c(H,fe),bg:d&&fe%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(he=>a.jsx(h.Box,{as:"td",py:"3.5",px:"4",textAlign:he.align??"left",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",verticalAlign:"middle",children:he.render?he.render(H[he.key],H,fe):String(H[he.key]??"—")},he.key))},ne)})})]})}),m&&a.jsxs(h.Flex,{p:"4",borderTop:"1px solid",borderColor:"border",bg:"bg.surface",align:"center",justify:"space-between",flexWrap:"wrap",gap:"4",children:[a.jsxs(h.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:["Showing ",C===0?0:(M-1)*p+1," to"," ",Math.min(M*p,C)," of ",C," entries"]}),a.jsx(Wd,{total:C,pageSize:p,currentPage:M,onChange:b,compact:!0})]})]})}function t6({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:f,onViewClick:m,variant:p="standard",...g}){return p==="featured"?a.jsxs(h.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(h.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:a.jsx(h.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),a.jsxs(h.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[a.jsxs(h.Box,{children:[a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),u&&a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",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(h.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[d&&a.jsxs(h.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(h.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),c]}),d&&s&&a.jsx(h.Box,{w:"1px",h:"20px",bg:"border"}),s&&a.jsxs(h.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(h.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),a.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l&&a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),a.jsxs(h.Box,{display:"flex",gap:"3",alignItems:"center",children:[m&&a.jsx(h.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:m,children:"view"}),f&&a.jsx(h.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:f,children:"Consult Now"})]})]})]})]}):p==="compact"?a.jsxs(h.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(h.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[a.jsxs(h.Box,{display:"flex",gap:"4",children:[a.jsx(h.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(h.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(h.Box,{pt:"1",children:[a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),a.jsxs(h.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&p!=="compact"?` • ${n}`:""]})]})]}),m&&a.jsx(h.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:m,pt:"1",children:"View"})]}),a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[a.jsx(h.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(h.Box,{as:"span",color:"text.heading",mr:"1",children:[(i==null?void 0:i.toFixed(1))||"New"," ",o?`(${o})`:""]}),n&&a.jsxs(h.Box,{as:"span",children:[" • ",n]}),s&&a.jsxs(h.Box,{as:"span",children:[" • ",s]})]}),a.jsx(h.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),a.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),f&&a.jsx(h.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:f,children:"Consult Now"})]})]}):a.jsxs(h.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(h.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[a.jsxs(h.Box,{display:"flex",gap:"4",children:[a.jsx(h.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(h.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(h.Box,{pt:"1",children:[a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),u&&a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",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(h.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n?` • ${n}`:""]})]})]}),a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[a.jsx(h.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(h.Box,{as:"span",color:"text.muted",children:["(",o,")"]}):null]})]}),a.jsxs(h.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[d&&a.jsxs(h.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(h.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),c]}),d&&s&&a.jsx(h.Box,{w:"1px",h:"20px",bg:"border"}),s&&a.jsxs(h.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(h.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),a.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),a.jsx(h.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),a.jsxs(h.Box,{display:"flex",gap:"3",alignItems:"center",children:[m&&a.jsx(h.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:m,children:"view"}),f&&a.jsx(h.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:f,children:"Consult Now"})]})]})]})}const n6={normal:{bg:"color-mix(in srgb, var(--chakra-colors-status-success) 8%, transparent)",dot:"status.success",border:"color-mix(in srgb, var(--chakra-colors-status-success) 20%, transparent)",text:"status.success"},warning:{bg:"color-mix(in srgb, var(--chakra-colors-status-warning) 8%, transparent)",dot:"status.warning",border:"color-mix(in srgb, var(--chakra-colors-status-warning) 20%, transparent)",text:"status.warning"},critical:{bg:"color-mix(in srgb, var(--chakra-colors-status-error) 8%, transparent)",dot:"status.error",border:"color-mix(in srgb, var(--chakra-colors-status-error) 20%, transparent)",text:"status.error"}};function r6({label:e,value:t,unit:n,status:r="normal",...i}){const o=n6[r];return a.jsxs(h.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(h.Box,{w:"2",h:"2",borderRadius:"full",bg:o.dot,flexShrink:0}),a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),a.jsxs(h.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[a.jsx(h.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&a.jsx(h.Box,{fontSize:"xs",color:o.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const i6={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function o6({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:r,time:i,type:o="video",status:s="upcoming",onCancel:l,onReschedule:u,onJoin:d,...c}){const f=i6[s];return a.jsxs(h.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...c,children:[a.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[a.jsxs(h.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(h.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(h.Box,{children:[a.jsx(h.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&a.jsx(h.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),a.jsx(Wo,{status:f.color,size:"sm",children:f.label})]}),a.jsxs(h.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),a.jsx(h.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),a.jsx(h.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),a.jsxs(h.Box,{children:[a.jsx(h.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),a.jsx(h.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(h.Box,{display:"flex",gap:"2",children:[d&&a.jsx(h.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(h.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(h.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"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>h.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>h.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>h.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>h.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>h.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>h.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>h.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>h.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>h.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>h.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>h.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>h.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>h.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>h.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>h.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>h.WrapItem});exports.Accordion=qv;exports.Alert=Vo;exports.AppointmentCard=o6;exports.Avatar=Uo;exports.AvatarGroup=bh;exports.Badge=Wo;exports.BlogCard=Qv;exports.Breadcrumb=by;exports.Button=Ge;exports.Calendar=Yo;exports.Card=Gc;exports.CardBody=jp;exports.CardFooter=Ep;exports.CardHeader=Tp;exports.Checkbox=Hc;exports.Combobox=np;exports.Container=Kc;exports.CookieConsentBanner=qd;exports.DashboardLayout=Nd;exports.DataTable=e6;exports.DatePicker=Qh;exports.DateRangePicker=ep;exports.Divider=_c;exports.DoctorCard=t6;exports.Drawer=My;exports.EmptyState=Ly;exports.FileUpload=ip;exports.Footer=Hd;exports.FormControl=Oh;exports.FullPageSpinner=vh;exports.IconButton=Mc;exports.Input=$o;exports.Logo=ir;exports.MedixProvider=hh;exports.Modal=Fy;exports.Navbar=cy;exports.NotFoundPage=Iy;exports.OTPInput=Uc;exports.PWAInstallPrompt=Zd;exports.Pagination=Wd;exports.PhoneInput=$h;exports.PinInput=zh;exports.Progress=$d;exports.RadioGroup=Dh;exports.RichTextEditor=Cp;exports.RichTextInput=Ko;exports.SearchInput=Go;exports.SectionHeader=Fp;exports.Select=Ih;exports.ServerErrorPage=Dy;exports.Skeleton=Kt;exports.SkeletonCard=Ty;exports.SkeletonText=Ud;exports.Spinner=Oc;exports.StatCard=Yc;exports.Stepper=Sy;exports.Switch=Wc;exports.Tabs=wy;exports.Tag=zc;exports.TagInput=op;exports.TagsInput=$c;exports.TestimonialCard=Xv;exports.Textarea=Nc;exports.ThemeColorPalette=qc;exports.Toaster=Rc;exports.Tooltip=By;exports.VitalBadge=r6;exports.colorTokens=N;exports.dismissToast=lh;exports.htmlToMarkdown=Hn;exports.markdownToHtml=Ut;exports.medixConfig=Ic;exports.radiiTokens=Bc;exports.shadowTokens=Lc;exports.spacingTokens=Fc;exports.system=Dc;exports.textStyleTokens=Ac;exports.toast=Vn;exports.typographyTokens=hn;exports.useColorScheme=ph;exports.useIsDarkMode=Ho;exports.useThemeMode=rr;
|
|
388
414
|
//# sourceMappingURL=index.cjs.map
|