@medixdeck/ui 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),w=require("react"),p=require("@chakra-ui/react");function Mr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const L=Mr(w);var Rr=(e,t,n,i,s,r,o,a)=>{let c=document.documentElement,u=["light","dark"];function d(m){(Array.isArray(e)?e:[e]).forEach(g=>{let x=g==="class",y=x&&r?s.map(b=>r[b]||b):s;x?(c.classList.remove(...y),c.classList.add(r&&r[m]?r[m]:m)):c.setAttribute(g,m)}),f(m)}function f(m){a&&u.includes(m)&&(c.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)d(i);else try{let m=localStorage.getItem(t)||n,g=o&&m==="system"?h():m;d(g)}catch{}},Un=["light","dark"],gs="(prefers-color-scheme: dark)",Vr=typeof window>"u",xs=L.createContext(void 0),Lr=e=>L.useContext(xs)?L.createElement(L.Fragment,null,e.children):L.createElement(zr,{...e}),Ir=["light","dark"],zr=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:i=!0,storageKey:s="theme",themes:r=Ir,defaultTheme:o=n?"system":"light",attribute:a="data-theme",value:c,children:u,nonce:d,scriptProps:f})=>{let[h,m]=L.useState(()=>Wr(s,o)),[g,x]=L.useState(()=>h==="system"?Ct():h),y=c?Object.values(c):r,b=L.useCallback(C=>{let k=C;if(!k)return;C==="system"&&n&&(k=Ct());let P=c?c[k]:k,A=t?Hr(d):null,F=document.documentElement,j=D=>{D==="class"?(F.classList.remove(...y),P&&F.classList.add(P)):D.startsWith("data-")&&(P?F.setAttribute(D,P):F.removeAttribute(D))};if(Array.isArray(a)?a.forEach(j):j(a),i){let D=Un.includes(o)?o:null,E=Un.includes(k)?k:D;F.style.colorScheme=E}A==null||A()},[d]),v=L.useCallback(C=>{let k=typeof C=="function"?C(h):C;m(k);try{localStorage.setItem(s,k)}catch{}},[h]),S=L.useCallback(C=>{let k=Ct(C);x(k),h==="system"&&n&&!e&&b("system")},[h,e]);L.useEffect(()=>{let C=window.matchMedia(gs);return C.addListener(S),S(C),()=>C.removeListener(S)},[S]),L.useEffect(()=>{let C=k=>{k.key===s&&(k.newValue?m(k.newValue):v(o))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[v]),L.useEffect(()=>{b(e??h)},[e,h]);let T=L.useMemo(()=>({theme:h,setTheme:v,forcedTheme:e,resolvedTheme:h==="system"?g:h,themes:n?[...r,"system"]:r,systemTheme:n?g:void 0}),[h,v,e,g,n,r]);return L.createElement(xs.Provider,{value:T},L.createElement(Or,{forcedTheme:e,storageKey:s,attribute:a,enableSystem:n,enableColorScheme:i,defaultTheme:o,value:c,themes:r,nonce:d,scriptProps:f}),u)},Or=L.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:i,enableColorScheme:s,defaultTheme:r,value:o,themes:a,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,r,e,a,o,i,s]).slice(1,-1);return L.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Rr.toString()})(${d})`}})}),Wr=(e,t)=>{if(Vr)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},Hr=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)}},Ct=e=>(e||(e=window.matchMedia(gs)),e.matches?"dark":"light");const re={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:"#1B7A38"},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"}}},Te={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:"0.625rem"},xs:{value:"0.6875rem"},sm:{value:"0.75rem"},md:{value:"0.875rem"},lg:{value:"1rem"},xl:{value:"1.125rem"},"2xl":{value:"1.3125rem"},"3xl":{value:"1.5rem"},"4xl":{value:"1.75rem"},"5xl":{value:"2.25rem"},"6xl":{value:"3.25rem"}},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"}}},ys={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)"}}},bs={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"}},vs={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%"}},Ss={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:"0 4px 24px 0 rgba(0, 0, 0, 0.40)"},"card-light":{value:"0 2px 12px 0 rgba(17, 25, 38, 0.08)"},none:{value:"none"}},ws=p.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:re.blue,purple:re.purple,green:re.green,amber:re.amber,red:re.red,neutralLight:re.neutralLight,neutralDark:re.neutralDark}},fonts:Te.fonts,fontSizes:Te.fontSizes,fontWeights:Te.fontWeights,lineHeights:Te.lineHeights,letterSpacings:Te.letterSpacings,spacing:bs,radii:vs,shadows:Ss},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:ys}}),Cs=p.createSystem(p.defaultConfig,ws),Nr=["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"],_r=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),w=require("react"),p=require("@chakra-ui/react");function Vr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const L=Vr(w);var Lr=(e,t,n,i,s,r,o,a)=>{let c=document.documentElement,u=["light","dark"];function d(m){(Array.isArray(e)?e:[e]).forEach(g=>{let x=g==="class",y=x&&r?s.map(b=>r[b]||b):s;x?(c.classList.remove(...y),c.classList.add(r&&r[m]?r[m]:m)):c.setAttribute(g,m)}),f(m)}function f(m){a&&u.includes(m)&&(c.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)d(i);else try{let m=localStorage.getItem(t)||n,g=o&&m==="system"?h():m;d(g)}catch{}},Un=["light","dark"],ys="(prefers-color-scheme: dark)",Ir=typeof window>"u",bs=L.createContext(void 0),zr=e=>L.useContext(bs)?L.createElement(L.Fragment,null,e.children):L.createElement(Wr,{...e}),Or=["light","dark"],Wr=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:i=!0,storageKey:s="theme",themes:r=Or,defaultTheme:o=n?"system":"light",attribute:a="data-theme",value:c,children:u,nonce:d,scriptProps:f})=>{let[h,m]=L.useState(()=>Nr(s,o)),[g,x]=L.useState(()=>h==="system"?Ct():h),y=c?Object.values(c):r,b=L.useCallback(C=>{let k=C;if(!k)return;C==="system"&&n&&(k=Ct());let P=c?c[k]:k,A=t?_r(d):null,F=document.documentElement,j=D=>{D==="class"?(F.classList.remove(...y),P&&F.classList.add(P)):D.startsWith("data-")&&(P?F.setAttribute(D,P):F.removeAttribute(D))};if(Array.isArray(a)?a.forEach(j):j(a),i){let D=Un.includes(o)?o:null,E=Un.includes(k)?k:D;F.style.colorScheme=E}A==null||A()},[d]),v=L.useCallback(C=>{let k=typeof C=="function"?C(h):C;m(k);try{localStorage.setItem(s,k)}catch{}},[h]),S=L.useCallback(C=>{let k=Ct(C);x(k),h==="system"&&n&&!e&&b("system")},[h,e]);L.useEffect(()=>{let C=window.matchMedia(ys);return C.addListener(S),S(C),()=>C.removeListener(S)},[S]),L.useEffect(()=>{let C=k=>{k.key===s&&(k.newValue?m(k.newValue):v(o))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[v]),L.useEffect(()=>{b(e??h)},[e,h]);let T=L.useMemo(()=>({theme:h,setTheme:v,forcedTheme:e,resolvedTheme:h==="system"?g:h,themes:n?[...r,"system"]:r,systemTheme:n?g:void 0}),[h,v,e,g,n,r]);return L.createElement(bs.Provider,{value:T},L.createElement(Hr,{forcedTheme:e,storageKey:s,attribute:a,enableSystem:n,enableColorScheme:i,defaultTheme:o,value:c,themes:r,nonce:d,scriptProps:f}),u)},Hr=L.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:i,enableColorScheme:s,defaultTheme:r,value:o,themes:a,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,r,e,a,o,i,s]).slice(1,-1);return L.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Lr.toString()})(${d})`}})}),Nr=(e,t)=>{if(Ir)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},_r=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)}},Ct=e=>(e||(e=window.matchMedia(ys)),e.matches?"dark":"light");const re={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:"#1B7A38"},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"}}},Te={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:"0.625rem"},xs:{value:"0.6875rem"},sm:{value:"0.75rem"},md:{value:"0.875rem"},lg:{value:"1rem"},xl:{value:"1.125rem"},"2xl":{value:"1.3125rem"},"3xl":{value:"1.5rem"},"4xl":{value:"1.75rem"},"5xl":{value:"2.25rem"},"6xl":{value:"3.25rem"}},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"}}},vs={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)"}}},Ss={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"}},ws={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%"}},Cs={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:"0 4px 24px 0 rgba(0, 0, 0, 0.40)"},"card-light":{value:"0 2px 12px 0 rgba(17, 25, 38, 0.08)"},none:{value:"none"}},Ts=p.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:re.blue,purple:re.purple,green:re.green,amber:re.amber,red:re.red,neutralLight:re.neutralLight,neutralDark:re.neutralDark}},fonts:Te.fonts,fontSizes:Te.fontSizes,fontWeights:Te.fontWeights,lineHeights:Te.lineHeights,letterSpacings:Te.letterSpacings,spacing:Ss,radii:ws,shadows:Cs},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:vs}}),Fs=p.createSystem(p.defaultConfig,Ts),$r=["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"],Ur=`
2
2
  /* ── Font custom properties ─────────────────────────────────────────────── */
3
3
  :root {
4
4
  --font-heading: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont,
@@ -56,7 +56,7 @@
56
56
  @keyframes medix-spin {
57
57
  to { transform: rotate(360deg); }
58
58
  }
59
- `;let Kn=!1,Gn=!1;function $r(){if(typeof document>"u"||Kn)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)}),Nr.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)}),Kn=!0}function Ur(){if(typeof document>"u"||Gn)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=_r,document.head.insertBefore(e,document.head.firstChild),Gn=!0}function Kr({children:e,defaultColorMode:t="system",forcedColorMode:n}){return w.useEffect(()=>{$r(),Ur()},[]),l.jsx(Lr,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:l.jsx(p.ChakraProvider,{value:Cs,children:e})})}const Gr={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"}},Yr={xs:{height:"28px",px:"12px",fontSize:"11px"},sm:{height:"32px",px:"14px",fontSize:"13px"},md:{height:"40px",px:"18px",fontSize:"14px"},lg:{height:"48px",px:"24px",fontSize:"16px"}},be=w.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:i=!1,leftIcon:s,rightIcon:r,disabled:o,children:a,style:c,...u},d)=>{const f=Gr[n],h=Yr[t],m={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:h.height,paddingLeft:h.px,paddingRight:h.px,fontSize:h.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:o||i?"not-allowed":"pointer",opacity:o||i?.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 g={};switch(e){case"solid":g={background:f.solid,color:"#FFFFFF"};break;case"outline":g={background:"transparent",color:f.fg,border:`1.5px solid ${f.solid}`};break;case"ghost":g={background:"transparent",color:f.fg,border:"none"};break;case"secondary":g={background:f.tint,color:f.fg,border:"none"};break;case"link":g={background:"transparent",color:f.fg,border:"none",padding:0,height:"auto",fontSize:h.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[x,y]=w.useState(!1),[b,v]=w.useState(!1);let S={};if((x||b)&&!o&&!i)switch(e){case"solid":S={background:b?f.solidActive:f.solidHover,boxShadow:b?"none":"0 4px 14px rgba(0,0,0,0.18)"};break;case"outline":S={background:f.tint,color:f.fgHover};break;case"ghost":S={background:f.tint};break;case"secondary":S={background:f.tintHover};break;case"link":S={color:f.fgHover};break}const T={...m,...g,...S,...c};return l.jsx("button",{ref:d,type:u.type??"button",disabled:o||i,style:T,onMouseEnter:()=>y(!0),onMouseLeave:()=>{y(!1),v(!1)},onMouseDown:()=>v(!0),onMouseUp:()=>v(!1),onFocus:C=>{C.currentTarget.style.boxShadow=`0 0 0 2px #FFFFFF, 0 0 0 4px ${f.solid}`},onBlur:C=>{C.currentTarget.style.boxShadow=S.boxShadow??g.boxShadow??"none"},...u,children:i?l.jsx(p.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"}}):l.jsxs(l.Fragment,{children:[s&&l.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:s}),a,r&&l.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:r})]})})});be.displayName="MedixButton";const Xr={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"}},Zr={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}},Ts=w.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:i=!1,disabled:s,children:r,style:o,...a},c)=>{const u=Xr[n],d=Zr[t],[f,h]=w.useState(!1),[m,g]=w.useState(!1);let x;switch(e){case"solid":x={background:f?m?u.solidActive:u.solidHover:u.solid,color:"#fff"};break;case"outline":x={background:f?u.tint:"transparent",color:u.fg,border:`1.5px solid ${u.solid}`};break;case"ghost":default:x={background:f?u.tint:"transparent",color:u.fg};break}return l.jsx("button",{ref:c,type:a.type??"button",disabled:s,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:s?"not-allowed":"pointer",opacity:s?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...d,...i?{borderRadius:"50%"}:{},...x,...o},onMouseEnter:()=>h(!0),onMouseLeave:()=>{h(!1),g(!1)},onMouseDown:()=>g(!0),onMouseUp:()=>g(!1),onFocus:y=>{y.currentTarget.style.boxShadow=`0 0 0 2px #fff, 0 0 0 4px ${u.solid}`},onBlur:y=>{y.currentTarget.style.boxShadow="none"},...a,children:r})});Ts.displayName="MedixIconButton";const qr={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"}},Jr={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},xt=w.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",children:i,style:s,...r},o)=>{const a=qr[t],c=Jr[n];let u,d,f="1px solid transparent";switch(e){case"solid":u=a.solid,d=a.solidText;break;case"outline":u="transparent",d=a.tintText,f=`1px solid ${a.border}`;break;case"surface":u=a.tint,d=a.tintText,f=`1px solid ${a.border}20`;break;case"subtle":default:u=a.tint,d=a.tintText;break}const h={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:4,border:f,background:u,color:d,whiteSpace:"nowrap",...c,...s};return l.jsx("span",{ref:o,style:h,...r,children:i})});xt.displayName="MedixBadge";const Fs={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},js=w.forwardRef(({src:e,name:t,size:n="md",showStatus:i=!1,statusColor:s="green",...r},o)=>l.jsxs(p.Avatar.Root,{ref:o,size:Fs[n],position:"relative",...r,children:[l.jsx(p.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&l.jsx(p.Avatar.Image,{src:e,alt:t??""}),i&&l.jsx(p.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:s,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));js.displayName="MedixAvatar";function Qr({children:e,max:t,size:n="md"}){const i=w.Children.toArray(e),s=t?i.slice(0,t):i,r=t?Math.max(0,i.length-t):0,o=Fs[n];return l.jsxs(p.Box,{display:"flex",alignItems:"center",children:[s.map((a,c)=>l.jsx(p.Box,{ml:c===0?"0":"-2",position:"relative",zIndex:s.length-c,children:w.isValidElement(a)?w.cloneElement(a,{size:n}):a},c)),r>0&&l.jsxs(p.Box,{ml:"-2",w:o==="sm"?"8":o==="lg"?"12":"10",h:o==="sm"?"8":o==="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:["+",r]})]})}function ks({size:e="md",label:t,color:n="blue.500",...i}){return l.jsxs(p.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[l.jsx(p.Spinner,{size:e,color:n,borderWidth:"2px",...i}),t&&l.jsx(p.Text,{textStyle:"small",color:"text.muted",children:t})]})}function ea({label:e}){return l.jsx(p.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:l.jsx(ks,{size:"xl",label:e??"Loading…"})})}const Bs=w.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:i,...s},r)=>l.jsxs(p.Box,{ref:r,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,...s,children:[i,n&&l.jsx(p.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:"×"})]}));Bs.displayName="MedixTag";const As=w.forwardRef(({orientation:e="horizontal",label:t,...n},i)=>t?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[l.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),l.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-muted)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),l.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):l.jsx(p.Separator,{ref:i,orientation:e,borderColor:"border",...n}));As.displayName="MedixDivider";const ta={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},na={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},ia={blue:"#FFFFFF",purple:"#FFFFFF",black:"#111926",white:"#FFFFFF"};function Yn(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")}function sa(){const[e,t]=w.useState(Yn);return w.useEffect(()=>{const n=document.documentElement,i=new MutationObserver(()=>t(Yn()));return i.observe(n,{attributeFilter:["class"]}),()=>i.disconnect()},[]),e}function oa({color:e,height:t}){return l.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:l.jsx("g",{children:l.jsx("path",{d:`
59
+ `;let Kn=!1,Gn=!1;function Kr(){if(typeof document>"u"||Kn)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)}),$r.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)}),Kn=!0}function Gr(){if(typeof document>"u"||Gn)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=Ur,document.head.insertBefore(e,document.head.firstChild),Gn=!0}function Yr({children:e,defaultColorMode:t="system",forcedColorMode:n}){return w.useEffect(()=>{Kr(),Gr()},[]),l.jsx(zr,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:l.jsx(p.ChakraProvider,{value:Fs,children:e})})}const Yn={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"}},Xn={xs:{height:"28px",px:"12px",fontSize:"11px"},sm:{height:"32px",px:"14px",fontSize:"13px"},md:{height:"40px",px:"18px",fontSize:"14px"},lg:{height:"48px",px:"24px",fontSize:"16px"}},be=w.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:i=!1,leftIcon:s,rightIcon:r,disabled:o,children:a,style:c,...u},d)=>{const f=Yn[n]||Yn.blue,h=Xn[t]||Xn.md,m={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:h.height,paddingLeft:h.px,paddingRight:h.px,fontSize:h.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:o||i?"not-allowed":"pointer",opacity:o||i?.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 g={};switch(e){case"solid":g={background:f.solid,color:"#FFFFFF"};break;case"outline":g={background:"transparent",color:f.fg,border:`1.5px solid ${f.solid}`};break;case"ghost":g={background:"transparent",color:f.fg,border:"none"};break;case"secondary":g={background:f.tint,color:f.fg,border:"none"};break;case"link":g={background:"transparent",color:f.fg,border:"none",padding:0,height:"auto",fontSize:h.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[x,y]=w.useState(!1),[b,v]=w.useState(!1);let S={};if((x||b)&&!o&&!i)switch(e){case"solid":S={background:b?f.solidActive:f.solidHover,boxShadow:b?"none":"0 4px 14px rgba(0,0,0,0.18)"};break;case"outline":S={background:f.tint,color:f.fgHover};break;case"ghost":S={background:f.tint};break;case"secondary":S={background:f.tintHover};break;case"link":S={color:f.fgHover};break}const T={...m,...g,...S,...c};return l.jsx("button",{ref:d,type:u.type??"button",disabled:o||i,style:T,onMouseEnter:()=>y(!0),onMouseLeave:()=>{y(!1),v(!1)},onMouseDown:()=>v(!0),onMouseUp:()=>v(!1),onFocus:C=>{C.currentTarget.style.boxShadow=`0 0 0 2px #FFFFFF, 0 0 0 4px ${f.solid}`},onBlur:C=>{C.currentTarget.style.boxShadow=S.boxShadow??g.boxShadow??"none"},...u,children:i?l.jsx(p.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"}}):l.jsxs(l.Fragment,{children:[s&&l.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:s}),a,r&&l.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:r})]})})});be.displayName="MedixButton";const Xr={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"}},Zr={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}},js=w.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:i=!1,disabled:s,children:r,style:o,...a},c)=>{const u=Xr[n],d=Zr[t],[f,h]=w.useState(!1),[m,g]=w.useState(!1);let x;switch(e){case"solid":x={background:f?m?u.solidActive:u.solidHover:u.solid,color:"#fff"};break;case"outline":x={background:f?u.tint:"transparent",color:u.fg,border:`1.5px solid ${u.solid}`};break;case"ghost":default:x={background:f?u.tint:"transparent",color:u.fg};break}return l.jsx("button",{ref:c,type:a.type??"button",disabled:s,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:s?"not-allowed":"pointer",opacity:s?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...d,...i?{borderRadius:"50%"}:{},...x,...o},onMouseEnter:()=>h(!0),onMouseLeave:()=>{h(!1),g(!1)},onMouseDown:()=>g(!0),onMouseUp:()=>g(!1),onFocus:y=>{y.currentTarget.style.boxShadow=`0 0 0 2px #fff, 0 0 0 4px ${u.solid}`},onBlur:y=>{y.currentTarget.style.boxShadow="none"},...a,children:r})});js.displayName="MedixIconButton";const qr={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"}},Jr={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},xt=w.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",children:i,style:s,...r},o)=>{const a=qr[t],c=Jr[n];let u,d,f="1px solid transparent";switch(e){case"solid":u=a.solid,d=a.solidText;break;case"outline":u="transparent",d=a.tintText,f=`1px solid ${a.border}`;break;case"surface":u=a.tint,d=a.tintText,f=`1px solid ${a.border}20`;break;case"subtle":default:u=a.tint,d=a.tintText;break}const h={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:4,border:f,background:u,color:d,whiteSpace:"nowrap",...c,...s};return l.jsx("span",{ref:o,style:h,...r,children:i})});xt.displayName="MedixBadge";const ks={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},Bs=w.forwardRef(({src:e,name:t,size:n="md",showStatus:i=!1,statusColor:s="green",...r},o)=>l.jsxs(p.Avatar.Root,{ref:o,size:ks[n],position:"relative",...r,children:[l.jsx(p.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&l.jsx(p.Avatar.Image,{src:e,alt:t??""}),i&&l.jsx(p.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:s,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));Bs.displayName="MedixAvatar";function Qr({children:e,max:t,size:n="md"}){const i=w.Children.toArray(e),s=t?i.slice(0,t):i,r=t?Math.max(0,i.length-t):0,o=ks[n];return l.jsxs(p.Box,{display:"flex",alignItems:"center",children:[s.map((a,c)=>l.jsx(p.Box,{ml:c===0?"0":"-2",position:"relative",zIndex:s.length-c,children:w.isValidElement(a)?w.cloneElement(a,{size:n}):a},c)),r>0&&l.jsxs(p.Box,{ml:"-2",w:o==="sm"?"8":o==="lg"?"12":"10",h:o==="sm"?"8":o==="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:["+",r]})]})}function As({size:e="md",label:t,color:n="blue.500",...i}){return l.jsxs(p.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[l.jsx(p.Spinner,{size:e,color:n,borderWidth:"2px",...i}),t&&l.jsx(p.Text,{textStyle:"small",color:"text.muted",children:t})]})}function ea({label:e}){return l.jsx(p.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:l.jsx(As,{size:"xl",label:e??"Loading…"})})}const Ds=w.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:i,...s},r)=>l.jsxs(p.Box,{ref:r,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,...s,children:[i,n&&l.jsx(p.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:"×"})]}));Ds.displayName="MedixTag";const Ps=w.forwardRef(({orientation:e="horizontal",label:t,...n},i)=>t?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[l.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),l.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-muted)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),l.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):l.jsx(p.Separator,{ref:i,orientation:e,borderColor:"border",...n}));Ps.displayName="MedixDivider";const ta={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},na={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},ia={blue:"#FFFFFF",purple:"#FFFFFF",black:"#111926",white:"#FFFFFF"};function Zn(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")}function sa(){const[e,t]=w.useState(Zn);return w.useEffect(()=>{const n=document.documentElement,i=new MutationObserver(()=>t(Zn()));return i.observe(n,{attributeFilter:["class"]}),()=>i.disconnect()},[]),e}function oa({color:e,height:t}){return l.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:l.jsx("g",{children:l.jsx("path",{d:`
60
60
  M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557
61
61
  C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490
62
62
  225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88
@@ -174,7 +174,7 @@
174
174
 
175
175
  M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281
176
176
  L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z
177
- `,fill:e})})}function Ds({variant:e="blue",type:t="full",height:n=32,className:i,style:s}){const r=sa(),o=ta[e],a=r?ia[e]:na[e],u={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,...s};return l.jsxs("span",{className:i,style:u,role:"img","aria-label":"MedixDeck logo",children:[l.jsx(oa,{color:o,height:n}),t==="full"&&l.jsx(ra,{color:a,height:n})]})}const Tt={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},mn=w.forwardRef(({size:e="md",leftElement:t,rightElement:n,isInvalid:i,errorMessage:s,...r},o)=>{const a=!!t,c=!!n;return l.jsxs(p.Box,{w:"100%",children:[l.jsxs(p.Box,{position:"relative",children:[a&&l.jsx(p.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:t}),l.jsx(p.Input,{ref:o,...Tt[e],pl:a?"10":Tt[e].px,pr:c?"10":Tt[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":"blue.500",boxShadow:i?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:i?"red.500":"border",color:"text.heading"},...r}),c&&l.jsx(p.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n})]}),i&&s&&l.jsx(p.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:s})]})});mn.displayName="MedixInput";const Ps=w.forwardRef(({placeholder:e="Search…",...t},n)=>l.jsx(mn,{ref:n,type:"search",placeholder:e,leftElement:l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("circle",{cx:"11",cy:"11",r:"8"}),l.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));Ps.displayName="MedixSearchInput";const Es=w.forwardRef(({isInvalid:e,errorMessage:t,maxLength:n,showCount:i=!1,onChange:s,value:r,...o},a)=>{const[c,u]=w.useState(typeof r=="string"?r.length:0),d=f=>{u(f.target.value.length),s==null||s(f)};return l.jsxs(p.Box,{w:"100%",children:[l.jsx(p.Textarea,{ref:a,bg:"bg.surface",border:"1px solid",borderColor:e?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:n,value:r,onChange:d,_placeholder:{color:"text.muted"},_focus:{borderColor:e?"red.500":"blue.500",boxShadow:e?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:e?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...o}),l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[e&&t?l.jsx(p.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:t}):l.jsx("span",{}),i&&n&&l.jsxs(p.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[c,"/",n]})]})]})});Es.displayName="MedixTextarea";const aa={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Ms=w.forwardRef(({options:e=[],placeholder:t,isInvalid:n,errorMessage:i,size:s="md",children:r,...o},a)=>{const c=aa[s];return l.jsxs(p.Box,{w:"100%",children:[l.jsxs(p.NativeSelect.Root,{...o,children:[l.jsxs(p.NativeSelect.Field,{ref:a,h:c.h,px:c.px,fontSize:c.fontSize,bg:"bg.surface",border:"1px solid",borderColor:n?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_focus:{borderColor:n?"red.500":"blue.500",boxShadow:n?"0 0 0 3px rgba(220,38,38,0.15)":"0 0 0 3px rgba(6,133,255,0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:n?"red.500":"border",color:"text.heading"},children:[t&&l.jsx("option",{value:"",disabled:!0,children:t}),e.map(u=>l.jsx("option",{value:u.value,disabled:u.disabled,children:u.label},u.value)),r]}),l.jsx(p.NativeSelect.Indicator,{})]}),n&&i&&l.jsx(p.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})});Ms.displayName="MedixSelect";const Rs={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"}},Vs=w.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:i,disabled:s=!1,indeterminate:r=!1,children:o,description:a,name:c,value:u,id:d},f)=>{const h=Rs[e],m=d??w.useId(),[g,x]=w.useState(n),[y,b]=w.useState(!1),v=t!==void 0?t:g,S=C=>{t===void 0&&x(C.target.checked),i==null||i(C.target.checked)},T={width:18,height:18,borderRadius:4,border:`2px solid ${v||r?h.solid:"var(--medix-form-border, #CBD5E1)"}`,background:v||r?h.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:y?`0 0 0 3px ${h.ring}`:"none",pointerEvents:"none"};return l.jsxs(p.Box,{opacity:s?.55:1,children:[l.jsxs("label",{htmlFor:m,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:s?"not-allowed":"pointer",userSelect:"none"},children:[l.jsx("input",{ref:f,id:m,type:"checkbox",name:c,value:u,checked:v,disabled:s,onChange:S,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{style:T,"aria-hidden":"true",children:r?l.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:l.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):v?l.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:l.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),o&&l.jsxs(p.Box,{children:[l.jsx(p.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:o}),a&&l.jsx(p.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:a})]})]}),!o&&a&&l.jsx(p.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:a})]})});Vs.displayName="MedixCheckbox";function la({name:e,value:t,onChange:n,options:i,colorScheme:s="blue",direction:r="column"}){const o=Rs[s],[a,c]=w.useState(""),u=t!==void 0?t:a,d=f=>{t===void 0&&c(f),n==null||n(f)};return l.jsx(p.Box,{display:"flex",flexDirection:r,gap:r==="row"?"5":"3",role:"radiogroup",children:i.map(f=>{const h=u===f.value;return l.jsx(ca,{option:f,name:e,isSelected:h,onChange:d,solidColor:o.solid,ring:o.ring},f.value)})})}function ca({option:e,name:t,isSelected:n,onChange:i,solidColor:s,ring:r}){const[o,a]=w.useState(!1);return l.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:[l.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>i(e.value),onFocus:()=>a(!0),onBlur:()=>a(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?s:"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:o?`0 0 0 3px ${r}`:"none",pointerEvents:"none"},children:l.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:s,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),l.jsxs(p.Box,{children:[l.jsx(p.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&l.jsx(p.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const da={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"}},ua={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}},Ls=w.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:i=!1,onChange:s,disabled:r=!1,label:o,description:a,name:c,id:u},d)=>{const f=da[e],h=ua[t],m=u??w.useId(),[g,x]=w.useState(i),[y,b]=w.useState(!1),v=n!==void 0?n:g,S=k=>{n===void 0&&x(k.target.checked),s==null||s(k.target.checked)},T={position:"relative",display:"inline-flex",alignItems:"center",width:h.width,height:h.height,borderRadius:h.height,background:v?f.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:y?`0 0 0 3px ${f.ring}`:"none",cursor:r?"not-allowed":"pointer",flexShrink:0},C={position:"absolute",width:h.thumbSize,height:h.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"0 1px 4px rgba(0,0,0,0.22)",top:h.thumbOffset,left:v?h.width-h.thumbSize-h.thumbOffset:h.thumbOffset,transition:"left 0.18s ease"};return l.jsxs(p.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:r?.55:1,children:[l.jsxs("label",{htmlFor:m,style:{display:"inline-flex",cursor:r?"not-allowed":"pointer"},children:[l.jsx("input",{ref:d,id:m,type:"checkbox",role:"switch",name:c,checked:v,disabled:r,onChange:S,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{style:T,"aria-hidden":"true",children:l.jsx("span",{style:C})})]}),(o||a)&&l.jsxs(p.Box,{children:[o&&l.jsx("label",{htmlFor:m,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:r?"not-allowed":"pointer",userSelect:"none"},children:o}),a&&l.jsx(p.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:a})]})]})});Ls.displayName="MedixSwitch";function fa({id:e,label:t,helperText:n,errorMessage:i,isRequired:s=!1,isDisabled:r=!1,children:o}){const a=!!i;return l.jsxs(p.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:r?.5:1,pointerEvents:r?"none":void 0,w:"100%",children:[t&&l.jsxs(p.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[l.jsx(p.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),s&&l.jsx(p.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),w.cloneElement(o,{id:e,isInvalid:a||void 0}),n&&!a&&l.jsx(p.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),a&&i&&l.jsx(p.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})}function Is({length:e=6,value:t="",onChange:n,onComplete:i,isInvalid:s=!1,isDisabled:r=!1,mask:o=!1,label:a,helperText:c,errorMessage:u}){const d=t.split("").slice(0,e),f=w.useRef([]),h=s?"#DC2626":"var(--medix-form-border)",m=s?"#DC2626":"#0685FF",g=(b,v)=>{var S,T,C;if(b.key==="Backspace"){b.preventDefault();const k=[...d];k[v]?(k[v]="",n==null||n(k.join(""))):v>0&&((S=f.current[v-1])==null||S.focus(),k[v-1]="",n==null||n(k.join("")))}else b.key==="ArrowLeft"&&v>0?(T=f.current[v-1])==null||T.focus():b.key==="ArrowRight"&&v<e-1&&((C=f.current[v+1])==null||C.focus())},x=(b,v)=>{var k,P;const S=b.target.value.replace(/\D/g,"");if(!S)return;if(S.length>1){const A=S.split("").slice(0,e),F=[...Array(e).fill("")];A.forEach((E,U)=>{F[U]=E});const j=F.join("");n==null||n(j);const D=Math.min(A.length,e-1);(k=f.current[D])==null||k.focus(),j.length===e&&(i==null||i(j));return}const T=[...d];for(;T.length<e;)T.push("");T[v]=S;const C=T.join("");n==null||n(C),v<e-1&&((P=f.current[v+1])==null||P.focus()),C.replace(/\s/g,"").length===e&&(i==null||i(C))},y=b=>b.target.select();return l.jsxs(p.Box,{w:"fit-content",children:[a&&l.jsx(p.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),l.jsx(p.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((b,v)=>l.jsx("input",{ref:S=>{f.current[v]=S},type:o?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:d[v]??"",onChange:S=>x(S,v),onKeyDown:S=>g(S,v),onFocus:y,disabled:r,"aria-label":`Digit ${v+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${h}`,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:r?"not-allowed":"text",opacity:r?.5:1},onFocusCapture:S=>{S.target.style.borderColor=m,S.target.style.boxShadow=`0 0 0 3px ${s?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`},onBlurCapture:S=>{S.target.style.borderColor=h,S.target.style.boxShadow="none"}},v))}),(c||u)&&l.jsx(p.Text,{mt:"2",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?u:c})]})}const ha=Is,Ft=[{code:"+234",flag:"🇳🇬",country:"NG"},{code:"+1",flag:"🇺🇸",country:"US"},{code:"+44",flag:"🇬🇧",country:"GB"},{code:"+233",flag:"🇬🇭",country:"GH"},{code:"+254",flag:"🇰🇪",country:"KE"},{code:"+27",flag:"🇿🇦",country:"ZA"},{code:"+251",flag:"🇪🇹",country:"ET"},{code:"+255",flag:"🇹🇿",country:"TZ"}];function pa({value:e="",onChange:t,showCountryCode:n=!0,defaultCountryCode:i="+234",placeholder:s="80 000 0000",isInvalid:r=!1,errorMessage:o,label:a,helperText:c,isDisabled:u=!1,id:d}){const[f,h]=w.useState(i),[m,g]=w.useState(e),[x,y]=w.useState(!1),b=Ft.find(k=>k.code===f)??Ft[0],v=k=>{const P=k.target.value.replace(/[^\d\s\-]/g,"");g(P),t==null||t(`${f}${P.replace(/\s/g,"")}`)},S=k=>{h(k.target.value),t==null||t(`${k.target.value}${m.replace(/\s/g,"")}`)},T=r?"#DC2626":x?"#0685FF":"var(--medix-form-border)",C=x?`0 0 0 3px ${r?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return l.jsxs(p.Box,{w:"100%",children:[a&&l.jsx(p.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),l.jsxs(p.Box,{display:"flex",alignItems:"center",overflow:"hidden",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:u?.5:1,pointerEvents:u?"none":void 0,style:{border:`1.5px solid ${T}`,boxShadow:C,background:"var(--medix-form-bg)"},children:[n&&l.jsxs("label",{htmlFor:`${d}-country`,style:{display:"flex",alignItems:"center",gap:"4px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",borderRight:"1px solid var(--medix-form-border)",cursor:"pointer",flexShrink:0,minWidth:"80px"},children:[l.jsx(p.Text,{fontSize:"lg",lineHeight:"1",children:b.flag}),l.jsx("select",{id:`${d}-country`,value:f,onChange:S,"aria-label":"Country code",style:{background:"transparent",border:"none",outline:"none",fontSize:"14px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",cursor:"pointer",width:"42px"},children:Ft.map(k=>l.jsx("option",{value:k.code,style:{background:"var(--medix-form-bg)",color:"var(--medix-form-text)"},children:k.code},k.code))})]}),l.jsx("input",{id:d,type:"tel",value:m,onChange:v,onFocus:()=>y(!0),onBlur:()=>y(!1),placeholder:s,disabled:u,"aria-invalid":r,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}})]}),(c||o)&&l.jsx(p.Text,{mt:"1.5",fontSize:"xs",color:r?"red.500":"text.muted",fontFamily:"var(--font-body)",children:r?o:c})]})}function ma({value:e,onChange:t,min:n,max:i,label:s,helperText:r,errorMessage:o,isInvalid:a=!1,isDisabled:c=!1,placeholder:u,id:d,includeTime:f=!1}){const[h,m]=w.useState(!1),g=a?"#DC2626":h?"#0685FF":"var(--medix-form-border)",x=h?`0 0 0 3px ${a?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return l.jsxs(p.Box,{w:"100%",children:[s&&l.jsx(p.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s}),l.jsxs(p.Box,{position:"relative",children:[l.jsx("input",{id:d,type:f?"datetime-local":"date",value:e??"",onChange:y=>t==null?void 0:t(y.target.value),min:n,max:i,placeholder:u,disabled:c,"aria-invalid":a,onFocus:()=>m(!0),onBlur:()=>m(!1),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${g}`,boxShadow:x,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"pointer",opacity:c?.5:1,colorScheme:"auto"}}),l.jsx(p.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:"📅"})]}),(r||o)&&l.jsx(p.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?o:r})]})}const zs=w.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...i},s)=>l.jsx(p.Box,{ref:s,bg:"bg.surface",borderRadius:"card",border:"1px solid",borderColor:"border",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},overflow:"hidden",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",...t&&{_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},cursor:"pointer"},...i,children:w.Children.map(n,r=>r||null)}));zs.displayName="MedixCard";function ga({title:e,subtitle:t,action:n,children:i,...s}){return l.jsxs(p.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...s,children:[l.jsxs(p.Box,{flex:"1",children:[e&&l.jsx(p.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&l.jsx(p.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),i]}),n&&l.jsx(p.Box,{flexShrink:0,children:n})]})}function xa({children:e,...t}){return l.jsx(p.Box,{px:"6",py:"5",...t,children:e})}function ya({children:e,...t}){return l.jsx(p.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Os=w.forwardRef(({value:e,label:t,unit:n,change:i,trend:s,icon:r,accentColor:o="blue.500",...a},c)=>{const u=s??(i!==void 0?i>=0?"up":"down":"neutral"),d=u==="up"?"green.500":u==="down"?"red.500":"text.muted";return l.jsxs(p.Box,{ref:c,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...a,children:[r&&l.jsx(p.Box,{w:"10",h:"10",borderRadius:"md",bg:`${o.split(".")[0]}.100`,color:o,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:r}),l.jsxs(p.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&l.jsx(p.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),l.jsx(p.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),i!==void 0&&l.jsxs(p.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:d,children:[l.jsx(p.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),l.jsxs(p.Box,{as:"span",children:[Math.abs(i),"%"]})]})]})});Os.displayName="MedixStatCard";const ba={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Ws=w.forwardRef(({maxWidth:e="xl",children:t,...n},i)=>l.jsx(p.Box,{ref:i,w:"100%",maxW:ba[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Ws.displayName="MedixContainer";function va({eyebrow:e,title:t,description:n,align:i="center",action:s,eyebrowColor:r="blue.500",...o}){const a=i,c=i==="center"?"center":i==="right"?"flex-end":"flex-start";return l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:c,textAlign:a,gap:"3",...o,children:[e&&l.jsx(p.Box,{as:"span",fontSize:"xs",fontWeight:"bold",color:r,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),l.jsx(p.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:i==="center"?"720px":void 0,children:t}),n&&l.jsx(p.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:i==="center"?"640px":void 0,children:n}),s&&l.jsx(p.Box,{mt:"2",children:s})]})}const gn=w.createContext({});function xn(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sa=typeof window<"u",Hs=Sa?w.useLayoutEffect:w.useEffect,yt=w.createContext(null);function yn(e,t){e.indexOf(t)===-1&&e.push(t)}function lt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const se=(e,t,n)=>n>t?t:n<e?e:n;function _t(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ee=()=>{},oe=()=>{};var ms;typeof process<"u"&&((ms=process.env)==null?void 0:ms.NODE_ENV)!=="production"&&(Ee=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(_t(t,n))},oe=(e,t,n)=>{if(!e)throw new Error(_t(t,n))});const de={},Ns=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function _s(e){return typeof e=="object"&&e!==null}const $s=e=>/^0[^.\s]+$/u.test(e);function Us(e){let t;return()=>(t===void 0&&(t=e()),t)}const Z=e=>e,wa=(e,t)=>n=>t(e(n)),Ue=(...e)=>e.reduce(wa),He=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class bn{constructor(){this.subscriptions=[]}add(t){return yn(this.subscriptions,t),()=>lt(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $=e=>e*1e3,X=e=>e/1e3;function Ks(e,t){return t?e*(1e3/t):0}const Xn=new Set;function vn(e,t,n){e||Xn.has(t)||(console.warn(_t(t,n)),Xn.add(t))}const Gs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ca=1e-7,Ta=12;function Fa(e,t,n,i,s){let r,o,a=0;do o=t+(n-t)/2,r=Gs(o,i,s)-e,r>0?n=o:t=o;while(Math.abs(r)>Ca&&++a<Ta);return o}function Ke(e,t,n,i){if(e===t&&n===i)return Z;const s=r=>Fa(r,0,1,e,n);return r=>r===0||r===1?r:Gs(s(r),t,i)}const Ys=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Xs=e=>t=>1-e(1-t),Zs=Ke(.33,1.53,.69,.99),Sn=Xs(Zs),qs=Ys(Sn),Js=e=>e>=1?1:(e*=2)<1?.5*Sn(e):.5*(2-Math.pow(2,-10*(e-1))),wn=e=>1-Math.sin(Math.acos(e)),Qs=Xs(wn),eo=Ys(wn),ja=Ke(.42,0,1,1),ka=Ke(0,0,.58,1),to=Ke(.42,0,.58,1),Ba=e=>Array.isArray(e)&&typeof e[0]!="number",no=e=>Array.isArray(e)&&typeof e[0]=="number",Zn={linear:Z,easeIn:ja,easeInOut:to,easeOut:ka,circIn:wn,circInOut:eo,circOut:Qs,backIn:Sn,backInOut:qs,backOut:Zs,anticipate:Js},Aa=e=>typeof e=="string",qn=e=>{if(no(e)){oe(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Ke(t,n,i,s)}else if(Aa(e))return oe(Zn[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Zn[e];return e},Xe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Da(e,t){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(d){o.has(d)&&(u.schedule(d),e()),d(a)}const u={schedule:(d,f=!1,h=!1)=>{const g=h&&s?n:i;return f&&o.add(d),g.add(d),d},cancel:d=>{i.delete(d),o.delete(d)},process:d=>{if(a=d,s){r=!0;return}s=!0;const f=n;n=i,i=f,n.forEach(c),n.clear(),s=!1,r&&(r=!1,u.process(d))}};return u}const Pa=40;function io(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Xe.reduce((S,T)=>(S[T]=Da(r),S),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:m,postRender:g}=o,x=()=>{const S=de.useManualTiming,T=S?s.timestamp:performance.now();n=!1,S||(s.delta=i?1e3/60:Math.max(Math.min(T-s.timestamp,Pa),1)),s.timestamp=T,s.isProcessing=!0,a.process(s),c.process(s),u.process(s),d.process(s),f.process(s),h.process(s),m.process(s),g.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(x))},y=()=>{n=!0,i=!0,s.isProcessing||e(x)};return{schedule:Xe.reduce((S,T)=>{const C=o[T];return S[T]=(k,P=!1,A=!1)=>(n||y(),C.schedule(k,P,A)),S},{}),cancel:S=>{for(let T=0;T<Xe.length;T++)o[Xe[T]].cancel(S)},state:s,steps:o}}const{schedule:M,cancel:ue,state:W,steps:jt}=io(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let et;function Ea(){et=void 0}const N={now:()=>(et===void 0&&N.set(W.isProcessing||de.useManualTiming?W.timestamp:performance.now()),et),set:e=>{et=e,queueMicrotask(Ea)}},so=e=>t=>typeof t=="string"&&t.startsWith(e),oo=so("--"),Ma=so("var(--"),Cn=e=>Ma(e)?Ra.test(e.split("/*")[0].trim()):!1,Ra=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Jn(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Me={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ne={...Me,transform:e=>se(0,1,e)},Ze={...Me,default:1},ze=e=>Math.round(e*1e5)/1e5,Tn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Va(e){return e==null}const La=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fn=(e,t)=>n=>!!(typeof n=="string"&&La.test(n)&&n.startsWith(e)||t&&!Va(n)&&Object.prototype.hasOwnProperty.call(n,t)),ro=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(Tn);return{[e]:parseFloat(s),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ia=e=>se(0,255,e),kt={...Me,transform:e=>Math.round(Ia(e))},ge={test:Fn("rgb","red"),parse:ro("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+kt.transform(e)+", "+kt.transform(t)+", "+kt.transform(n)+", "+ze(Ne.transform(i))+")"};function za(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const $t={test:Fn("#"),parse:za,transform:ge.transform},Ge=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ae=Ge("deg"),ie=Ge("%"),B=Ge("px"),Oa=Ge("vh"),Wa=Ge("vw"),Qn={...ie,parse:e=>ie.parse(e)/100,transform:e=>ie.transform(e*100)},je={test:Fn("hsl","hue"),parse:ro("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+ie.transform(ze(t))+", "+ie.transform(ze(n))+", "+ze(Ne.transform(i))+")"},I={test:e=>ge.test(e)||$t.test(e)||je.test(e),parse:e=>ge.test(e)?ge.parse(e):je.test(e)?je.parse(e):$t.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ge.transform(e):je.transform(e),getAnimatableNone:e=>{const t=I.parse(e);return t.alpha=0,I.transform(t)}},Ha=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Na(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Tn))==null?void 0:t.length)||0)+(((n=e.match(Ha))==null?void 0:n.length)||0)>0}const ao="number",lo="color",_a="var",$a="var(",ei="${}",Ua=/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 De(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=t.replace(Ua,c=>(I.test(c)?(i.color.push(r),s.push(lo),n.push(I.parse(c))):c.startsWith($a)?(i.var.push(r),s.push(_a),n.push(c)):(i.number.push(r),s.push(ao),n.push(parseFloat(c))),++r,ei)).split(ei);return{values:n,split:a,indexes:i,types:s}}function Ka(e){return De(e).values}function co({split:e,types:t}){const n=e.length;return i=>{let s="";for(let r=0;r<n;r++)if(s+=e[r],i[r]!==void 0){const o=t[r];o===ao?s+=ze(i[r]):o===lo?s+=I.transform(i[r]):s+=i[r]}return s}}function Ga(e){return co(De(e))}const Ya=e=>typeof e=="number"?0:I.test(e)?I.getAnimatableNone(e):e,Xa=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Ya(e);function Za(e){const t=De(e);return co(t)(t.values.map((i,s)=>Xa(i,t.split[s])))}const Q={test:Na,parse:Ka,createTransformer:Ga,getAnimatableNone:Za};function Bt(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 qa({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,r=0,o=0;if(!t)s=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=Bt(c,a,e+1/3),r=Bt(c,a,e),o=Bt(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function ct(e,t){return n=>n>0?t:e}const R=(e,t,n)=>e+(t-e)*n,At=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Ja=[$t,ge,je],Qa=e=>Ja.find(t=>t.test(e));function ti(e){const t=Qa(e);if(Ee(!!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===je&&(n=qa(n)),n}const ni=(e,t)=>{const n=ti(e),i=ti(t);if(!n||!i)return ct(e,t);const s={...n};return r=>(s.red=At(n.red,i.red,r),s.green=At(n.green,i.green,r),s.blue=At(n.blue,i.blue,r),s.alpha=R(n.alpha,i.alpha,r),ge.transform(s))},Ut=new Set(["none","hidden"]);function el(e,t){return Ut.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tl(e,t){return n=>R(e,t,n)}function jn(e){return typeof e=="number"?tl:typeof e=="string"?Cn(e)?ct:I.test(e)?ni:sl:Array.isArray(e)?uo:typeof e=="object"?I.test(e)?ni:nl:ct}function uo(e,t){const n=[...e],i=n.length,s=e.map((r,o)=>jn(r)(r,t[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function nl(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=jn(e[s])(e[s],t[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function il(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const r=t.types[s],o=e.indexes[r][i[r]],a=e.values[o]??0;n[s]=a,i[r]++}return n}const sl=(e,t)=>{const n=Q.createTransformer(t),i=De(e),s=De(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ut.has(e)&&!s.values.length||Ut.has(t)&&!i.values.length?el(e,t):Ue(uo(il(i,s),s.values),n):(Ee(!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"),ct(e,t))};function fo(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?R(e,t,n):jn(e)(e,t)}const ol=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>M.update(t,n),stop:()=>ue(t),now:()=>W.isProcessing?W.timestamp:N.now()}},ho=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let r=0;r<s;r++)i+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},dt=2e4;function kn(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<dt;)t+=n,i=e.next(t);return t>=dt?1/0:t}function rl(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(kn(i),dt);return{type:"keyframes",ease:r=>i.next(s*r).value/t,duration:X(s)}}const V={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 Kt(e,t){return e*Math.sqrt(1-t*t)}const al=12;function ll(e,t,n){let i=n;for(let s=1;s<al;s++)i=i-e(i)/t(i);return i}const Dt=.001;function cl({duration:e=V.duration,bounce:t=V.bounce,velocity:n=V.velocity,mass:i=V.mass}){let s,r;Ee(e<=$(V.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=se(V.minDamping,V.maxDamping,o),e=se(V.minDuration,V.maxDuration,X(e)),o<1?(s=u=>{const d=u*o,f=d*e,h=d-n,m=Kt(u,o),g=Math.exp(-f);return Dt-h/m*g},r=u=>{const f=u*o*e,h=f*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-f),x=Kt(Math.pow(u,2),o);return(-s(u)+Dt>0?-1:1)*((h-m)*g)/x}):(s=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-Dt+d*f},r=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const a=5/e,c=ll(s,r,a);if(e=$(e),isNaN(c))return{stiffness:V.stiffness,damping:V.damping,duration:e};{const u=Math.pow(c,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:e}}}const dl=["duration","bounce"],ul=["stiffness","damping","mass"];function ii(e,t){return t.some(n=>e[n]!==void 0)}function fl(e){let t={velocity:V.velocity,stiffness:V.stiffness,damping:V.damping,mass:V.mass,isResolvedFromDuration:!1,...e};if(!ii(e,ul)&&ii(e,dl))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*se(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:V.mass,stiffness:s,damping:r}}else{const n=cl({...e,velocity:0});t={...t,...n,mass:V.mass},t.isResolvedFromDuration=!0}return t}function ut(e=V.visualDuration,t=V.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:m}=fl({...n,velocity:-X(n.velocity||0)}),g=h||0,x=u/(2*Math.sqrt(c*d)),y=o-r,b=X(Math.sqrt(c/d)),v=Math.abs(y)<5;i||(i=v?V.restSpeed.granular:V.restSpeed.default),s||(s=v?V.restDelta.granular:V.restDelta.default);let S,T,C,k,P,A;if(x<1)C=Kt(b,x),k=(g+x*b*y)/C,S=j=>{const D=Math.exp(-x*b*j);return o-D*(k*Math.sin(C*j)+y*Math.cos(C*j))},P=x*b*k+y*C,A=x*b*y-k*C,T=j=>Math.exp(-x*b*j)*(P*Math.sin(C*j)+A*Math.cos(C*j));else if(x===1){S=D=>o-Math.exp(-b*D)*(y+(g+b*y)*D);const j=g+b*y;T=D=>Math.exp(-b*D)*(b*j*D-g)}else{const j=b*Math.sqrt(x*x-1);S=K=>{const G=Math.exp(-x*b*K),ee=Math.min(j*K,300);return o-G*((g+x*b*y)*Math.sinh(ee)+j*y*Math.cosh(ee))/j};const D=(g+x*b*y)/j,E=x*b*D-y*j,U=x*b*y-D*j;T=K=>{const G=Math.exp(-x*b*K),ee=Math.min(j*K,300);return G*(E*Math.sinh(ee)+U*Math.cosh(ee))}}const F={calculatedDuration:m&&f||null,velocity:j=>$(T(j)),next:j=>{if(!m&&x<1){const E=Math.exp(-x*b*j),U=Math.sin(C*j),K=Math.cos(C*j),G=o-E*(k*U+y*K),ee=$(E*(P*U+A*K));return a.done=Math.abs(ee)<=i&&Math.abs(o-G)<=s,a.value=a.done?o:G,a}const D=S(j);if(m)a.done=j>=f;else{const E=$(T(j));a.done=Math.abs(E)<=i&&Math.abs(o-D)<=s}return a.value=a.done?o:D,a},toString:()=>{const j=Math.min(kn(F),dt),D=ho(E=>F.next(j*E).value,j,30);return j+"ms "+D},toTransition:()=>{}};return F}ut.applyToOptions=e=>{const t=rl(e,100,ut);return e.ease=t.ease,e.duration=$(t.duration),e.type="keyframes",e};const hl=5;function po(e,t,n){const i=Math.max(t-hl,0);return Ks(n-e(i),t-i)}function Gt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},m=A=>a!==void 0&&A<a||c!==void 0&&A>c,g=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let x=n*t;const y=f+x,b=o===void 0?y:o(y);b!==y&&(x=b-f);const v=A=>-x*Math.exp(-A/i),S=A=>b+v(A),T=A=>{const F=v(A),j=S(A);h.done=Math.abs(F)<=u,h.value=h.done?b:j};let C,k;const P=A=>{m(h.value)&&(C=A,k=ut({keyframes:[h.value,g(h.value)],velocity:po(S,A,h.value),damping:s,stiffness:r,restDelta:u,restSpeed:d}))};return P(0),{calculatedDuration:null,next:A=>{let F=!1;return!k&&C===void 0&&(F=!0,T(A),P(A)),C!==void 0&&A>=C?k.next(A-C):(!F&&T(A),h)}}}function pl(e,t,n){const i=[],s=n||de.mix||fo,r=e.length-1;for(let o=0;o<r;o++){let a=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Z:t;a=Ue(c,a)}i.push(a)}return i}function ml(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const r=e.length;if(oe(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=pl(t,i,s),c=a.length,u=d=>{if(o&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=He(e[f],e[f+1],d);return a[f](h)};return n?d=>u(se(e[0],e[r-1],d)):u}function gl(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=He(0,t,i);e.push(R(n,1,s))}}function xl(e){const t=[0];return gl(t,e.length-1),t}function yl(e,t){return e.map(n=>n*t)}function bl(e,t){return e.map(()=>t||to).splice(0,e.length-1)}function ke({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=Ba(i)?i.map(qn):qn(i),r={done:!1,value:t[0]},o=yl(n&&n.length===t.length?n:xl(t),e),a=ml(o,t,{ease:Array.isArray(s)?s:bl(t,s)});return{calculatedDuration:e,next:c=>(r.value=a(c),r.done=c>=e,r)}}const vl=e=>e!==null;function bt(e,{repeat:t,repeatType:n="loop"},i,s=1){const r=e.filter(vl),a=s<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const Sl={decay:Gt,inertia:Gt,tween:ke,keyframes:ke,spring:ut};function mo(e){typeof e.type=="string"&&(e.type=Sl[e.type])}class Bn{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 wl=e=>e/100;class ft extends Bn{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 i,s;const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(i=this.options).onStop)==null||s.call(i))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;mo(t);const{type:n=ke,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const c=n||ke;process.env.NODE_ENV!=="production"&&c!==ke&&oe(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==ke&&typeof a[0]!="number"&&(this.mixKeyframes=Ue(wl,fo(a[0],a[1])),a=[0,100]);const u=c({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=kn(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}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:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:d,repeat:f,repeatType:h,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-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?b<0:b>s;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,T=i;if(f){const A=Math.min(this.currentTime,s)/a;let F=Math.floor(A),j=A%1;!j&&A>=1&&(j=1),j===1&&F--,F=Math.min(F,f+1),!!(F%2)&&(h==="reverse"?(j=1-j,m&&(j-=m/a)):h==="mirror"&&(T=o)),S=se(0,1,j)*a}let C;v?(this.delayState.value=d[0],C=this.delayState):C=T.next(S),r&&!v&&(C.value=r(C.value));let{done:k}=C;!v&&c!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return P&&g!==Gt&&(C.value=bt(d,this.options,y,this.speed)),x&&x(C.value),P&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return X(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+X(t)}get time(){return X(this.currentTime)}set time(t){t=$(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 po(i=>this.generator.next(i).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=X(this.currentTime))}play(){var s,r;if(this.isStopped)return;const{driver:t=ol,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(r=(s=this.options).onPlay)==null||r.call(s);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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(N.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 Cl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const xe=e=>e*180/Math.PI,Yt=e=>{const t=xe(Math.atan2(e[1],e[0]));return Xt(t)},Tl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yt,rotateZ:Yt,skewX:e=>xe(Math.atan(e[1])),skewY:e=>xe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xt=e=>(e=e%360,e<0&&(e+=360),e),si=Yt,oi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ri=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Fl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:oi,scaleY:ri,scale:e=>(oi(e)+ri(e))/2,rotateX:e=>Xt(xe(Math.atan2(e[6],e[5]))),rotateY:e=>Xt(xe(Math.atan2(-e[2],e[0]))),rotateZ:si,rotate:si,skewX:e=>xe(Math.atan(e[4])),skewY:e=>xe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Zt(e){return e.includes("scale")?1:0}function qt(e,t){if(!e||e==="none")return Zt(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Fl,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Tl,s=a}if(!s)return Zt(t);const r=i[t],o=s[1].split(",").map(kl);return typeof r=="function"?r(o):o[r]}const jl=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return qt(n,t)};function kl(e){return parseFloat(e.trim())}const Re=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ve=new Set(Re),ai=e=>e===Me||e===B,Bl=new Set(["x","y","z"]),Al=Re.filter(e=>!Bl.has(e));function Dl(e){const t=[];return Al.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const ce={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-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})=>qt(t,"x"),y:(e,{transform:t})=>qt(t,"y")};ce.translateX=ce.x;ce.translateY=ce.y;const ve=new Set;let Jt=!1,Qt=!1,en=!1;function go(){if(Qt){const e=Array.from(ve).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=Dl(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{var a;(a=i.getValue(r))==null||a.set(o)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Qt=!1,Jt=!1,ve.forEach(e=>e.complete(en)),ve.clear()}function xo(){ve.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qt=!0)})}function Pl(){en=!0,xo(),go(),en=!1}class An{constructor(t,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ve.add(this),Jt||(Jt=!0,M.read(xo),M.resolveKeyframes(go))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const r=s==null?void 0:s.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&r===void 0&&s.set(t[0])}Cl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ve.delete(this)}cancel(){this.state==="scheduled"&&(ve.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const El=e=>e.startsWith("--");function yo(e,t,n){El(t)?e.style.setProperty(t,n):e.style[t]=n}const Ml={};function bo(e,t){const n=Us(e);return()=>Ml[t]??n()}const Rl=bo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),vo=bo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ie=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,li={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ie([0,.65,.55,1]),circOut:Ie([.55,0,1,.45]),backIn:Ie([.31,.01,.66,-.59]),backOut:Ie([.33,1.53,.69,.99])};function So(e,t){if(e)return typeof e=="function"?vo()?ho(e,t):"ease-out":no(e)?Ie(e):Array.isArray(e)?e.map(n=>So(n,t)||li.easeOut):li[e]}function Vl(e,t,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=So(a,s);Array.isArray(f)&&(d.easing=f);const h={delay:i,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(d,h)}function wo(e){return typeof e=="function"&&"applyToOptions"in e}function Ll({type:e,...t}){return wo(e)&&vo()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Co extends Bn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,oe(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ll(t);this.animation=Vl(n,i,s,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const d=bt(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),yo(n,i,d),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,i,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(i=this.animation).commitStyles)==null||s.call(i))}get duration(){var n,i;const t=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.call(n).duration)||0;return X(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+X(t)}get time(){return X(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(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:i,observe:s}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Rl()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),Z):s(this)}}const To={anticipate:Js,backInOut:qs,circInOut:eo};function Il(e){return e in To}function zl(e){typeof e.ease=="string"&&Il(e.ease)&&(e.ease=To[e.ease])}const Pt=10;class Ol extends Co{constructor(t){zl(t),mo(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ft({...o,autoplay:!1}),c=Math.max(Pt,N.now()-this.startTime),u=se(0,Pt,c-Pt),d=a.sample(c).value,{name:f}=this.options;r&&f&&yo(r,f,d),n.setWithVelocity(a.sample(Math.max(0,c-u)).value,d,u),a.stop()}}const ci=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Q.test(e)||e==="0")&&!e.startsWith("url("));function Wl(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 Hl(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=ci(s,t),a=ci(r,t);return Ee(o===a,`You are trying to animate ${t} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Wl(e)||(n==="spring"||wo(n))&&i}function tn(e){e.duration=0,e.type="keyframes"}const Fo=new Set(["opacity","clipPath","filter","transform"]),Nl=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function _l(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Nl.test(e[t]))return!0;return!1}const $l=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Ul=Us(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Kl(e){var f;const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:r,type:o,keyframes:a}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return Ul()&&n&&(Fo.has(n)||$l.has(n)&&_l(a))&&(n!=="transform"||!d)&&!u&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Gl=40;class Yl extends Bn{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:u,element:d,...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=N.now();const h={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:c,motionValue:u,element:d,...f},m=(d==null?void 0:d.KeyframeResolver)||An;this.keyframeResolver=new m(a,(x,y,b)=>this.onKeyframesResolved(x,y,h,!b),c,u,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,i,s){var b,v;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:u,onUpdate:d}=i;this.resolvedAt=N.now();let f=!0;Hl(t,r,o,a)||(f=!1,(de.instantAnimations||!c)&&(d==null||d(bt(t,i,n))),t[0]=t[t.length-1],tn(i),i.repeat=0);const m={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Gl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},g=f&&!u&&Kl(m),x=(v=(b=m.motionValue)==null?void 0:b.owner)==null?void 0:v.current;let y;if(g)try{y=new Ol({...m,element:x})}catch{y=new ft(m)}else y=new ft(m);y.finished.then(()=>{this.notifyFinished()}).catch(Z),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(),Pl()),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 jo(e,t,n,i=0,s=1){const r=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const Xl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zl(e){const t=Xl.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const ql=4;function ko(e,t,n=1){oe(n<=ql,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=Zl(e);if(!i)return;const r=window.getComputedStyle(t).getPropertyValue(i);if(r){const o=r.trim();return Ns(o)?parseFloat(o):o}return Cn(s)?ko(s,t,n+1):s}const Jl={type:"spring",stiffness:500,damping:25,restSpeed:10},Ql=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ec={type:"keyframes",duration:.8},tc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nc=(e,{keyframes:t})=>t.length>2?ec:Ve.has(e)?e.startsWith("scale")?Ql(t[1]):Jl:tc;function Bo(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function Dn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Bo(n,e):n}const ic=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function sc(e){for(const t in e)if(!ic.has(t))return!0;return!1}const Pn=(e,t,n,i={},s,r)=>o=>{const a=Dn(i,e)||{},c=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-$(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:s};sc(a)||Object.assign(d,nc(e,d)),d.duration&&(d.duration=$(d.duration)),d.repeatDelay&&(d.repeatDelay=$(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(tn(d),d.delay===0&&(f=!0)),(de.instantAnimations||de.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(f=!0,tn(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,f&&!r&&t.get()!==void 0){const h=bt(d.keyframes,a);if(h!==void 0){M.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new ft(d):new Yl(d)};function di(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function En(e,t,n,i){if(typeof t=="function"){const[s,r]=di(i);t=t(n!==void 0?n:e.custom,s,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,r]=di(i);t=t(n!==void 0?n:e.custom,s,r)}return t}function Se(e,t,n){const i=e.getProps();return En(i,t,n!==void 0?n:i.custom,e)}const Ao=new Set(["width","height","top","left","right","bottom",...Re]),ui=30,oc=e=>!isNaN(parseFloat(e));class rc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var r;const s=N.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=N.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&vn(!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 bn);const i=this.events[t].add(n);return t==="change"?()=>{i(),M.read(()=>{this.events.change.getSize()||this.stop()})}:i}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,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}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=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ui)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ui);return Ks(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 Pe(e,t){return new rc(e,t)}const nn=e=>Array.isArray(e);function ac(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pe(n))}function lc(e){return nn(e)?e[e.length-1]||0:e}function cc(e,t){const n=Se(e,t);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=lc(r[o]);ac(e,o,a)}}const H=e=>!!(e&&e.getVelocity);function dc(e){return!!(H(e)&&e.add)}function sn(e,t){const n=e.getValue("willChange");if(dc(n))return n.add(t);if(!n&&de.WillChange){const i=new de.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Mn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const uc="framerAppearId",Do="data-"+Mn(uc);function Po(e){return e.props[Do]}function fc({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Eo(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=t;const c=e.getDefaultTransition();r=r?Bo(r,c):c;const u=r==null?void 0:r.reduceMotion;i&&(r=i);const d=[],f=s&&e.animationState&&e.animationState.getState()[s];for(const h in a){const m=e.getValue(h,e.latestValues[h]??null),g=a[h];if(g===void 0||f&&fc(f,h))continue;const x={delay:n,...Dn(r||{},h)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===y&&!x.velocity){M.update(()=>m.set(g));continue}let b=!1;if(window.MotionHandoffAnimation){const T=Po(e);if(T){const C=window.MotionHandoffAnimation(T,h,M);C!==null&&(x.startTime=C,b=!0)}}sn(e,h);const v=u??e.shouldReduceMotion;m.start(Pn(h,m,g,v&&Ao.has(h)?{type:!1}:x,e,b));const S=m.animation;S&&d.push(S)}if(o){const h=()=>M.update(()=>{o&&cc(e,o)});d.length?Promise.all(d).then(h):h()}return d}function on(e,t,n={}){var c;const i=Se(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Eo(e,i,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return hc(e,t,u,d,f,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,d]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>d())}else return Promise.all([r(),o(n.delay)])}function hc(e,t,n=0,i=0,s=0,r=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(on(c,t,{...o,delay:n+(typeof i=="function"?0:i)+jo(e.variantChildren,c,i,s,r)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function pc(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(r=>on(e,r,n));i=Promise.all(s)}else if(typeof t=="string")i=on(e,t,n);else{const s=typeof t=="function"?Se(e,t,n.custom):t;i=Promise.all(Eo(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const mc={test:e=>e==="auto",parse:e=>e},Mo=e=>t=>t.test(e),Ro=[Me,B,ie,ae,Wa,Oa,mc],fi=e=>Ro.find(Mo(e));function gc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$s(e):!0}const xc=new Set(["brightness","contrast","saturate","opacity"]);function yc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Tn)||[];if(!i)return e;const s=n.replace(i,"");let r=xc.has(t)?1:0;return i!==n&&(r*=100),t+"("+r+s+")"}const bc=/\b([a-z-]*)\(.*?\)/gu,rn={...Q,getAnimatableNone:e=>{const t=e.match(bc);return t?t.map(yc).join(" "):e}},an={...Q,getAnimatableNone:e=>{const t=Q.parse(e);return Q.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},hi={...Me,transform:Math.round},vc={rotate:ae,rotateX:ae,rotateY:ae,rotateZ:ae,scale:Ze,scaleX:Ze,scaleY:Ze,scaleZ:Ze,skew:ae,skewX:ae,skewY:ae,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:Ne,originX:Qn,originY:Qn,originZ:B},Rn={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,...vc,zIndex:hi,fillOpacity:Ne,strokeOpacity:Ne,numOctaves:hi},Sc={...Rn,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:rn,WebkitFilter:rn,mask:an,WebkitMask:an},Vo=e=>Sc[e],wc=new Set([rn,an]);function Lo(e,t){let n=Vo(e);return wc.has(n)||(n=Q),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Cc=new Set(["auto","none","0"]);function Tc(e,t,n){let i=0,s;for(;i<e.length&&!s;){const r=e[i];typeof r=="string"&&!Cc.has(r)&&De(r).values.length&&(s=e[i]),i++}if(s&&n)for(const r of t)e[r]=Lo(n,s)}class Fc extends An{constructor(t,n,i,s,r){super(t,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),Cn(f))){const h=ko(f,n.current);h!==void 0&&(t[d]=h),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Ao.has(i)||t.length!==2)return;const[s,r]=t,o=fi(s),a=fi(r),c=Jn(s),u=Jn(r);if(c!==u&&ce[i]){this.needsMeasurement=!0;return}if(o!==a)if(ai(o)&&ai(a))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else ce[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||gc(t[s]))&&i.push(s);i.length&&Tc(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ce[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=ce[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Io(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=(n==null?void 0:n[e])??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const zo=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function tt(e){return _s(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Vn}=io(queueMicrotask,!1),J={x:!1,y:!1};function Oo(){return J.x||J.y}function jc(e){return e==="x"||e==="y"?J[e]?null:(J[e]=!0,()=>{J[e]=!1}):J.x||J.y?null:(J.x=J.y=!0,()=>{J.x=J.y=!1})}function Wo(e,t){const n=Io(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function kc(e){return!(e.pointerType==="touch"||Oo())}function Bc(e,t,n={}){const[i,s,r]=Wo(e,n);return i.forEach(o=>{let a=!1,c=!1,u;const d=()=>{o.removeEventListener("pointerleave",g)},f=y=>{u&&(u(y),u=void 0),d()},h=y=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(y))},m=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},g=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}f(y)}},x=y=>{if(!kc(y))return;c=!1;const b=t(o,y);typeof b=="function"&&(u=b,o.addEventListener("pointerleave",g,s))};o.addEventListener("pointerenter",x,s),o.addEventListener("pointerdown",m,s)}),r}const Ho=(e,t)=>t?e===t?!0:Ho(e,t.parentElement):!1,Ln=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ac=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Dc(e){return Ac.has(e.tagName)||e.isContentEditable===!0}const Pc=new Set(["INPUT","SELECT","TEXTAREA"]);function Ec(e){return Pc.has(e.tagName)||e.isContentEditable===!0}const nt=new WeakSet;function pi(e){return t=>{t.key==="Enter"&&e(t)}}function Et(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Mc=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=pi(()=>{if(nt.has(n))return;Et(n,"down");const s=pi(()=>{Et(n,"up")}),r=()=>Et(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function mi(e){return Ln(e)&&!Oo()}const gi=new WeakSet;function Rc(e,t,n={}){const[i,s,r]=Wo(e,n),o=a=>{const c=a.currentTarget;if(!mi(a)||gi.has(a))return;nt.add(c),n.stopPropagation&&gi.add(a);const u=t(c,a),d=(m,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),nt.has(c)&&nt.delete(c),mi(m)&&typeof u=="function"&&u(m,{success:g})},f=m=>{d(m,c===window||c===document||n.useGlobalTarget||Ho(c,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),tt(a)&&(a.addEventListener("focus",u=>Mc(u,s)),!Dc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function In(e){return _s(e)&&"ownerSVGElement"in e}const it=new WeakMap;let le;const No=(e,t,n)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:In(i)&&"getBBox"in i?i.getBBox()[t]:i[n],Vc=No("inline","width","offsetWidth"),Lc=No("block","height","offsetHeight");function Ic({target:e,borderBoxSize:t}){var n;(n=it.get(e))==null||n.forEach(i=>{i(e,{get width(){return Vc(e,t)},get height(){return Lc(e,t)}})})}function zc(e){e.forEach(Ic)}function Oc(){typeof ResizeObserver>"u"||(le=new ResizeObserver(zc))}function Wc(e,t){le||Oc();const n=Io(e);return n.forEach(i=>{let s=it.get(i);s||(s=new Set,it.set(i,s)),s.add(t),le==null||le.observe(i)}),()=>{n.forEach(i=>{const s=it.get(i);s==null||s.delete(t),s!=null&&s.size||le==null||le.unobserve(i)})}}const st=new Set;let Be;function Hc(){Be=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};st.forEach(t=>t(e))},window.addEventListener("resize",Be)}function Nc(e){return st.add(e),Be||Hc(),()=>{st.delete(e),!st.size&&typeof Be=="function"&&(window.removeEventListener("resize",Be),Be=void 0)}}function xi(e,t){return typeof e=="function"?Nc(e):Wc(e,t)}function _c(e){return In(e)&&e.tagName==="svg"}const $c=[...Ro,I,Q],Uc=e=>$c.find(Mo(e)),yi=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ae=()=>({x:yi(),y:yi()}),bi=()=>({min:0,max:0}),z=()=>({x:bi(),y:bi()}),Kc=new WeakMap;function vt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _e(e){return typeof e=="string"||Array.isArray(e)}const zn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],On=["initial",...zn];function St(e){return vt(e.animate)||On.some(t=>_e(e[t]))}function _o(e){return!!(St(e)||e.variants)}function Gc(e,t,n){for(const i in t){const s=t[i],r=n[i];if(H(s))e.addValue(i,s);else if(H(r))e.addValue(i,Pe(s,{owner:e}));else if(r!==s)if(e.hasValue(i)){const o=e.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(i);e.addValue(i,Pe(o!==void 0?o:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const ln={current:null},$o={current:!1},Yc=typeof window<"u";function Xc(){if($o.current=!0,!!Yc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ln.current=e.matches;e.addEventListener("change",t),t()}else ln.current=!1}const vi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ht={};function Uo(e){ht=e}function Zc(){return ht}class qc{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},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=An,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=N.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,M.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=St(n),this.isVariantNode=_o(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const g=h[m];u[m]!==void 0&&H(g)&&g.set(u[m])}}mount(t){var n,i;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,Kc.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((s,r)=>this.bindToMotionValue(r,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:($o.current||Xc(),this.shouldReduceMotion=ln.current),process.env.NODE_ENV!=="production"&&vn(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,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ue(this.notifyUpdate),ue(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 i=this.features[n];i&&(i.unmount(),i.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&&Fo.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:u,duration:d}=n.accelerate,f=new Co({element:this.current,name:t,keyframes:a,times:c,ease:u,duration:$(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const i=Ve.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),r&&r(),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 ht){const n=ht[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}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 i=0;i<vi.length;i++){const s=vi[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=t[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Gc(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 i=this.values.get(t);n!==i&&(i&&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 i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Pe(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Ns(i)||$s(i))?i=parseFloat(i):!Uc(i)&&Q.test(n)&&(i=Lo(t,n)),this.setBaseTarget(t,H(i)?i.get():i)),H(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=En(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!H(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new bn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Vn.render(this.render)}}class Ko extends qc{constructor(){super(...arguments),this.KeyframeResolver=Fc}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;H(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class fe{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Go({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Jc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Qc(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Mt(e){return e===void 0||e===1}function cn({scale:e,scaleX:t,scaleY:n}){return!Mt(e)||!Mt(t)||!Mt(n)}function me(e){return cn(e)||Yo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yo(e){return Si(e.x)||Si(e.y)}function Si(e){return e&&e!=="0%"}function pt(e,t,n){const i=e-n,s=t*i;return n+s}function wi(e,t,n,i,s){return s!==void 0&&(e=pt(e,s,i)),pt(e,n,i)+t}function dn(e,t=0,n=1,i,s){e.min=wi(e.min,t,n,i,s),e.max=wi(e.max,t,n,i,s)}function Xo(e,{x:t,y:n}){dn(e.x,t.translate,t.scale,t.originPoint),dn(e.y,n.translate,n.scale,n.originPoint)}const Ci=.999999999999,Ti=1.0000000000001;function ed(e,t,n,i=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let r,o;for(let c=0;c<s;c++){r=n[c],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(ne(e.x,-r.scroll.offset.x),ne(e.y,-r.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Xo(e,o)),i&&me(r.latestValues)&&ot(e,r.latestValues,(a=r.layout)==null?void 0:a.layoutBox))}t.x<Ti&&t.x>Ci&&(t.x=1),t.y<Ti&&t.y>Ci&&(t.y=1)}function ne(e,t){e.min+=t,e.max+=t}function Fi(e,t,n,i,s=.5){const r=R(e.min,e.max,s);dn(e,t,n,r,i)}function ji(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function ot(e,t,n){const i=n??e;Fi(e.x,ji(t.x,i.x),t.scaleX,t.scale,t.originX),Fi(e.y,ji(t.y,i.y),t.scaleY,t.scale,t.originY)}function Zo(e,t){return Go(Qc(e.getBoundingClientRect(),t))}function td(e,t,n){const i=Zo(e,n),{scroll:s}=t;return s&&(ne(i.x,s.offset.x),ne(i.y,s.offset.y)),i}const nd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},id=Re.length;function sd(e,t,n){let i="",s=!0;for(let r=0;r<id;r++){const o=Re[r],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);c=o.startsWith("scale")?u===1:u===0}if(!c||n){const u=zo(a,Rn[o]);if(!c){s=!1;const d=nd[o]||o;i+=`${d}(${u}) `}n&&(t[o]=u)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function Wn(e,t,n){const{style:i,vars:s,transformOrigin:r}=e;let o=!1,a=!1;for(const c in t){const u=t[c];if(Ve.has(c)){o=!0;continue}else if(oo(c)){s[c]=u;continue}else{const d=zo(u,Rn[c]);c.startsWith("origin")?(a=!0,r[c]=d):i[c]=d}}if(t.transform||(o||n?i.transform=sd(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:d=0}=r;i.transformOrigin=`${c} ${u} ${d}`}}function qo(e,{style:t,vars:n},i,s){const r=e.style;let o;for(o in t)r[o]=t[o];s==null||s.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function ki(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Le={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=ki(e,t.target.x),i=ki(e,t.target.y);return`${n}% ${i}%`}},od={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Q.parse(e);if(s.length>5)return i;const r=Q.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=c;const u=R(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),r(s)}},un={borderRadius:{...Le,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Le,borderTopRightRadius:Le,borderBottomLeftRadius:Le,borderBottomRightRadius:Le,boxShadow:od};function Jo(e,{layout:t,layoutId:n}){return Ve.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!un[e]||e==="opacity")}function Hn(e,t,n){var o;const i=e.style,s=t==null?void 0:t.style,r={};if(!i)return r;for(const a in i)(H(i[a])||s&&H(s[a])||Jo(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=i[a]);return r}function rd(e){return window.getComputedStyle(e)}class ad extends Ko{constructor(){super(...arguments),this.type="html",this.renderInstance=qo}readValueFromInstance(t,n){var i;if(Ve.has(n))return(i=this.projection)!=null&&i.isProjecting?Zt(n):jl(t,n);{const s=rd(t),r=(oo(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zo(t,n)}build(t,n,i){Wn(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return Hn(t,n,i)}}const ld={offset:"stroke-dashoffset",array:"stroke-dasharray"},cd={offset:"strokeDashoffset",array:"strokeDasharray"};function dd(e,t,n=1,i=0,s=!0){e.pathLength=1;const r=s?ld:cd;e[r.offset]=`${-i}`,e[r.array]=`${t} ${n}`}const ud=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Qo(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},c,u,d){if(Wn(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox);for(const m of ud)f[m]!==void 0&&(h[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),s!==void 0&&dd(f,s,r,o,!1)}const er=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"]),tr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function fd(e,t,n,i){qo(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(er.has(s)?s:Mn(s),t.attrs[s])}function nr(e,t,n){const i=Hn(e,t,n);for(const s in e)if(H(e[s])||H(t[s])){const r=Re.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=e[s]}return i}class hd extends Ko{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ve.has(n)){const i=Vo(n);return i&&i.default||0}return n=er.has(n)?n:Mn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return nr(t,n,i)}build(t,n,i){Qo(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){fd(t,n,i,s)}mount(t){this.isSVGTag=tr(t.tagName),super.mount(t)}}const pd=On.length;function ir(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ir(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<pd;n++){const i=On[n],s=e.props[i];(_e(s)||s===!1)&&(t[i]=s)}return t}function sr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const md=[...zn].reverse(),gd=zn.length;function xd(e){return t=>Promise.all(t.map(({animation:n,options:i})=>pc(e,n,i)))}function yd(e){let t=xd(e),n=Bi(),i=!0,s=!1;const r=u=>(d,f)=>{var m;const h=Se(e,f,u==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:g,transitionEnd:x,...y}=h;d={...d,...y,...x}}return d};function o(u){t=u(e)}function a(u){const{props:d}=e,f=ir(e.parent)||{},h=[],m=new Set;let g={},x=1/0;for(let b=0;b<gd;b++){const v=md[b],S=n[v],T=d[v]!==void 0?d[v]:f[v],C=_e(T),k=v===u?S.isActive:null;k===!1&&(x=b);let P=T===f[v]&&T!==d[v]&&C;if(P&&(i||s)&&e.manuallyAnimateOnMount&&(P=!1),S.protectedKeys={...g},!S.isActive&&k===null||!T&&!S.prevProp||vt(T)||typeof T=="boolean")continue;if(v==="exit"&&S.isActive&&k!==!0){S.prevResolvedValues&&(g={...g,...S.prevResolvedValues});continue}const A=bd(S.prevProp,T);let F=A||v===u&&S.isActive&&!P&&C||b>x&&C,j=!1;const D=Array.isArray(T)?T:[T];let E=D.reduce(r(v),{});k===!1&&(E={});const{prevResolvedValues:U={}}=S,K={...U,...E},G=O=>{F=!0,m.has(O)&&(j=!0,m.delete(O)),S.needsAnimating[O]=!0;const Y=e.getValue(O);Y&&(Y.liveStyle=!1)};for(const O in K){const Y=E[O],he=U[O];if(g.hasOwnProperty(O))continue;let we=!1;nn(Y)&&nn(he)?we=!sr(Y,he):we=Y!==he,we?Y!=null?G(O):m.add(O):Y!==void 0&&m.has(O)?G(O):S.protectedKeys[O]=!0}S.prevProp=T,S.prevResolvedValues=E,S.isActive&&(g={...g,...E}),(i||s)&&e.blockInitialAnimation&&(F=!1);const ee=P&&A;F&&(!ee||j)&&h.push(...D.map(O=>{const Y={type:v};if(typeof O=="string"&&(i||s)&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:he}=e,we=Se(he,O);if(he.enteringChildren&&we){const{delayChildren:Er}=we.transition||{};Y.delay=jo(he.enteringChildren,e,Er)}}return{animation:O,options:Y}}))}if(m.size){const b={};if(typeof d.initial!="boolean"){const v=Se(e,Array.isArray(d.initial)?d.initial[0]:d.initial);v&&v.transition&&(b.transition=v.transition)}m.forEach(v=>{const S=e.getBaseTarget(v),T=e.getValue(v);T&&(T.liveStyle=!0),b[v]=S??null}),h.push({animation:b})}let y=!!h.length;return i&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(y=!1),i=!1,s=!1,y?t(h):Promise.resolve()}function c(u,d){var h;if(n[u].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(u,d)}),n[u].isActive=d;const f=a(u);for(const m in n)n[m].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Bi(),s=!0}}}function bd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!sr(t,e):!1}function pe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Bi(){return{animate:pe(!0),whileInView:pe(),whileHover:pe(),whileTap:pe(),whileDrag:pe(),whileFocus:pe(),exit:pe()}}function fn(e,t){e.min=t.min,e.max=t.max}function q(e,t){fn(e.x,t.x),fn(e.y,t.y)}function Ai(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const or=1e-4,vd=1-or,Sd=1+or,rr=.01,wd=0-rr,Cd=0+rr;function _(e){return e.max-e.min}function Td(e,t,n){return Math.abs(e-t)<=n}function Di(e,t,n,i=.5){e.origin=i,e.originPoint=R(t.min,t.max,e.origin),e.scale=_(n)/_(t),e.translate=R(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vd&&e.scale<=Sd||isNaN(e.scale))&&(e.scale=1),(e.translate>=wd&&e.translate<=Cd||isNaN(e.translate))&&(e.translate=0)}function Oe(e,t,n,i){Di(e.x,t.x,n.x,i?i.originX:void 0),Di(e.y,t.y,n.y,i?i.originY:void 0)}function Pi(e,t,n,i=0){const s=i?R(n.min,n.max,i):n.min;e.min=s+t.min,e.max=e.min+_(t)}function Fd(e,t,n,i){Pi(e.x,t.x,n.x,i==null?void 0:i.x),Pi(e.y,t.y,n.y,i==null?void 0:i.y)}function Ei(e,t,n,i=0){const s=i?R(n.min,n.max,i):n.min;e.min=t.min-s,e.max=e.min+_(t)}function mt(e,t,n,i){Ei(e.x,t.x,n.x,i==null?void 0:i.x),Ei(e.y,t.y,n.y,i==null?void 0:i.y)}function Mi(e,t,n,i,s){return e-=t,e=pt(e,1/n,i),s!==void 0&&(e=pt(e,1/s,i)),e}function jd(e,t=0,n=1,i=.5,s,r=e,o=e){if(ie.test(t)&&(t=parseFloat(t),t=R(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=R(r.min,r.max,i);e===r&&(a-=t),e.min=Mi(e.min,t,n,a,s),e.max=Mi(e.max,t,n,a,s)}function Ri(e,t,[n,i,s],r,o){jd(e,t[n],t[i],t[s],t.scale,r,o)}const kd=["x","scaleX","originX"],Bd=["y","scaleY","originY"];function Vi(e,t,n,i){Ri(e.x,t,kd,n?n.x:void 0,i?i.x:void 0),Ri(e.y,t,Bd,n?n.y:void 0,i?i.y:void 0)}function Li(e){return e.translate===0&&e.scale===1}function ar(e){return Li(e.x)&&Li(e.y)}function Ii(e,t){return e.min===t.min&&e.max===t.max}function Ad(e,t){return Ii(e.x,t.x)&&Ii(e.y,t.y)}function zi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function lr(e,t){return zi(e.x,t.x)&&zi(e.y,t.y)}function Oi(e){return _(e.x)/_(e.y)}function Wi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function te(e){return[e("x"),e("y")]}function Dd(e,t,n){let i="";const s=e.x.translate/t.x,r=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:m,skewY:g}=n;u&&(i=`perspective(${u}px) ${i}`),d&&(i+=`rotate(${d}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `),m&&(i+=`skewX(${m}deg) `),g&&(i+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(i+=`scale(${a}, ${c})`),i||"none"}const cr=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Pd=cr.length,Hi=e=>typeof e=="string"?parseFloat(e):e,Ni=e=>typeof e=="number"||B.test(e);function Ed(e,t,n,i,s,r){s?(e.opacity=R(0,n.opacity??1,Md(i)),e.opacityExit=R(t.opacity??1,0,Rd(i))):r&&(e.opacity=R(t.opacity??1,n.opacity??1,i));for(let o=0;o<Pd;o++){const a=cr[o];let c=_i(t,a),u=_i(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Ni(c)===Ni(u)?(e[a]=Math.max(R(Hi(c),Hi(u),i),0),(ie.test(u)||ie.test(c))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=R(t.rotate||0,n.rotate||0,i))}function _i(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Md=dr(0,.5,Qs),Rd=dr(.5,.95,Z);function dr(e,t,n){return i=>i<e?0:i>t?1:n(He(e,t,i))}function Vd(e,t,n){const i=H(e)?e:Pe(e);return i.start(Pn("",i,t,n)),i.animation}function $e(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const Ld=(e,t)=>e.depth-t.depth;class Id{constructor(){this.children=[],this.isDirty=!1}add(t){yn(this.children,t),this.isDirty=!0}remove(t){lt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ld),this.isDirty=!1,this.children.forEach(t)}}function zd(e,t){const n=N.now(),i=({timestamp:s})=>{const r=s-n;r>=t&&(ue(i),e(r-t))};return M.setup(i,!0),()=>ue(i)}function rt(e){return H(e)?e.get():e}class Od{constructor(){this.members=[]}add(t){yn(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(lt(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(lt(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 i=this.members.indexOf(t)-1;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:r}=i.options,{layoutDependency:o}=t.options;(r===void 0||r!==o)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,i,s,r,o;(i=(n=t.options).onExitComplete)==null||i.call(n),(o=(s=t.resumingFrom)==null?void 0:(r=s.options).onExitComplete)==null||o.call(r)})}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 at={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Rt=["","X","Y","Z"],Wd=1e3;let Hd=0;function Vt(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function ur(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Po(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(s||r))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&ur(i)}function fr({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=Hd++,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($d),this.nodes.forEach(Zd),this.nodes.forEach(qd),this.nodes.forEach(Ud)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Id)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new bn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=In(o)&&!_c(o),this.instance=o;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let d,f=0;const h=()=>this.root.updateBlockedByResize=!1;M.read(()=>{f=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=zd(h,250),at.hasAnimatedSinceResize&&(at.hasAnimatedSinceResize=!1,this.nodes.forEach(Ki)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||nu,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=u.getProps(),b=!this.targetLayout||!lr(this.targetLayout,m),v=!f&&h;if(this.options.layoutRoot||this.resumeFrom||v||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Dn(g,"layout"),onPlay:x,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(d,v)}else f||Ki(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ue(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(Jd),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ur(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];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:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&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(Gd),this.nodes.forEach($i);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ui);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Yd),this.nodes.forEach(Xd),this.nodes.forEach(Nd),this.nodes.forEach(_d)):this.nodes.forEach(Ui),this.clearAllSnapshots();const a=N.now();W.delta=se(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,jt.update.process(W),jt.preRender.process(W),jt.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Kd),this.sharedNodes.forEach(Qd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_(this.snapshot.measuredBox.x)&&!_(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 o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ar(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||me(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),iu(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return z();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(su))){const{scroll:d}=this.root;d&&(ne(a.x,d.offset.x),ne(a.y,d.offset.y))}return a}removeElementScroll(o){var c;const a=z();if(q(a,o),(c=this.scroll)!=null&&c.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&q(a,o),ne(a.x,f.offset.x),ne(a.y,f.offset.y))}return a}applyTransform(o,a=!1,c){var d,f;const u=c||z();q(u,o);for(let h=0;h<this.path.length;h++){const m=this.path[h];!a&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(ne(u.x,-m.scroll.offset.x),ne(u.y,-m.scroll.offset.y)),me(m.latestValues)&&ot(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return me(this.latestValues)&&ot(u,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),u}removeTransform(o){var c;const a=z();q(a,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!me(d.latestValues))continue;let f;d.instance&&(cn(d.latestValues)&&d.updateSnapshot(),f=z(),q(f,d.measurePageBox())),Vi(a,d.latestValues,(c=d.snapshot)==null?void 0:c.layoutBox,f)}return me(this.latestValues)&&Vi(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=W.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fd(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):q(this.target,this.layout.layoutBox),Xo(this.target,this.targetDelta)):q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||cn(this.parent.latestValues)||Yo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),mt(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),q(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===W.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;q(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;ed(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=z());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ai(this.prevProjectionDelta.x,this.projectionDelta.x),Ai(this.prevProjectionDelta.y,this.projectionDelta.y)),Oe(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Wi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Wi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ae(),this.projectionDelta=Ae(),this.projectionDeltaWithTransform=Ae()}setAnimationOrigin(o,a=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=Ae();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=z(),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,v=!!(x&&!b&&this.options.crossfade===!0&&!this.path.some(tu));this.animationProgress=0;let S;this.mixTargetDelta=T=>{const C=T/1e3;Gi(f.x,o.x,C),Gi(f.y,o.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),eu(this.relativeTarget,this.relativeTargetOrigin,h,C),S&&Ad(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=z()),q(S,this.relativeTarget)),x&&(this.animationValues=d,Ed(d,u,this.latestValues,C,v,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ue(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{at.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pe(0)),this.motionValue.jump(0,!1),this.currentAnimation=Vd(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Wd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:d}=o;if(!(!a||!c||!u)){if(this!==o&&this.layout&&u&&hr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||z();const f=_(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=_(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}q(a,c),ot(a,d),Oe(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Od),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&Vt("z",o,u,this.animationValues);for(let d=0;d<Rt.length;d++)Vt(`rotate${Rt[d]}`,o,u,this.animationValues),Vt(`skew${Rt[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=rt(a==null?void 0:a.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=rt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!me(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Dd(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),o.transform=f;const{x:h,y:m}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in un){if(d[g]===void 0)continue;const{correct:x,applyTo:y,isCSSVariable:b}=un[g],v=f==="none"?d[g]:x(d[g],u);if(y){const S=y.length;for(let T=0;T<S;T++)o[y[T]]=v}else b?this.options.visualElement.renderState.vars[g]=v:o[g]=v}this.options.layoutId&&(o.pointerEvents=u===this?rt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach($i),this.root.sharedNodes.clear()}}}function Nd(e){e.updateLayout()}function _d(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:i,measuredBox:s}=e.layout,{animationType:r}=e.options,o=t.source!==e.layout.source;if(r==="size")te(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],m=_(h);h.min=i[f].min,h.max=h.min+m});else if(r==="x"||r==="y"){const f=r==="x"?"y":"x";fn(o?t.measuredBox[f]:t.layoutBox[f],i[f])}else hr(r,t.layoutBox,i)&&te(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],m=_(i[f]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const a=Ae();Oe(a,i,t.layoutBox);const c=Ae();o?Oe(c,e.applyTransform(s,!0),t.measuredBox):Oe(c,i,t.layoutBox);const u=!ar(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const g=e.options.layoutAnchor||void 0,x=z();mt(x,t.layoutBox,h.layoutBox,g);const y=z();mt(y,i,m.layoutBox,g),lr(x,y)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function $d(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 Ud(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Kd(e){e.clearSnapshot()}function $i(e){e.clearMeasurements()}function Gd(e){e.isLayoutDirty=!0,e.updateLayout()}function Ui(e){e.isLayoutDirty=!1}function Yd(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Xd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ki(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Zd(e){e.resolveTargetDelta()}function qd(e){e.calcProjection()}function Jd(e){e.resetSkewAndRotation()}function Qd(e){e.removeLeadSnapshot()}function Gi(e,t,n){e.translate=R(t.translate,0,n),e.scale=R(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Yi(e,t,n,i){e.min=R(t.min,n.min,i),e.max=R(t.max,n.max,i)}function eu(e,t,n,i){Yi(e.x,t.x,n.x,i),Yi(e.y,t.y,n.y,i)}function tu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const nu={duration:.45,ease:[.4,0,.1,1]},Xi=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Zi=Xi("applewebkit/")&&!Xi("chrome/")?Math.round:Z;function qi(e){e.min=Zi(e.min),e.max=Zi(e.max)}function iu(e){qi(e.x),qi(e.y)}function hr(e,t,n){return e==="position"||e==="preserve-aspect"&&!Td(Oi(t),Oi(n),.2)}function su(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const ou=fr({attachResizeListener:(e,t)=>$e(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}),Lt={current:void 0},pr=fr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Lt.current){const e=new ou({});e.mount(window),e.setOptions({layoutScroll:!0}),Lt.current=e}return Lt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Nn=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ji(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ru(...e){return t=>{let n=!1;const i=e.map(s=>{const r=Ji(s,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<i.length;s++){const r=i[s];typeof r=="function"?r():Ji(e[s],null)}}}}function au(...e){return L.useCallback(ru(...e),e)}class lu extends L.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(tt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,s=tt(i)&&i.offsetWidth||0,r=tt(i)&&i.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function cu({children:e,isPresent:t,anchorX:n,anchorY:i,root:s,pop:r}){var h;const o=w.useId(),a=w.useRef(null),c=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=w.useContext(Nn),d=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),f=au(a,d);return w.useInsertionEffect(()=>{const{width:m,height:g,top:x,left:y,right:b,bottom:v}=c.current;if(t||r===!1||!a.current||!m||!g)return;const S=n==="left"?`left: ${y}`:`right: ${b}`,T=i==="bottom"?`bottom: ${v}`:`top: ${x}`;a.current.dataset.motionPopId=o;const C=document.createElement("style");u&&(C.nonce=u);const k=s??document.head;return k.appendChild(C),C.sheet&&C.sheet.insertRule(`
177
+ `,fill:e})})}function Es({variant:e="blue",type:t="full",height:n=32,className:i,style:s}){const r=sa(),o=ta[e],a=r?ia[e]:na[e],u={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,...s};return l.jsxs("span",{className:i,style:u,role:"img","aria-label":"MedixDeck logo",children:[l.jsx(oa,{color:o,height:n}),t==="full"&&l.jsx(ra,{color:a,height:n})]})}const Tt={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},mn=w.forwardRef(({size:e="md",leftElement:t,rightElement:n,isInvalid:i,errorMessage:s,...r},o)=>{const a=!!t,c=!!n;return l.jsxs(p.Box,{w:"100%",children:[l.jsxs(p.Box,{position:"relative",children:[a&&l.jsx(p.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:t}),l.jsx(p.Input,{ref:o,...Tt[e],pl:a?"10":Tt[e].px,pr:c?"10":Tt[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":"blue.500",boxShadow:i?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:i?"red.500":"border",color:"text.heading"},...r}),c&&l.jsx(p.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n})]}),i&&s&&l.jsx(p.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:s})]})});mn.displayName="MedixInput";const Ms=w.forwardRef(({placeholder:e="Search…",...t},n)=>l.jsx(mn,{ref:n,type:"search",placeholder:e,leftElement:l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("circle",{cx:"11",cy:"11",r:"8"}),l.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));Ms.displayName="MedixSearchInput";const Rs=w.forwardRef(({isInvalid:e,errorMessage:t,maxLength:n,showCount:i=!1,onChange:s,value:r,...o},a)=>{const[c,u]=w.useState(typeof r=="string"?r.length:0),d=f=>{u(f.target.value.length),s==null||s(f)};return l.jsxs(p.Box,{w:"100%",children:[l.jsx(p.Textarea,{ref:a,bg:"bg.surface",border:"1px solid",borderColor:e?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:n,value:r,onChange:d,_placeholder:{color:"text.muted"},_focus:{borderColor:e?"red.500":"blue.500",boxShadow:e?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:e?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...o}),l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[e&&t?l.jsx(p.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:t}):l.jsx("span",{}),i&&n&&l.jsxs(p.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[c,"/",n]})]})]})});Rs.displayName="MedixTextarea";const aa={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Vs=w.forwardRef(({options:e=[],placeholder:t,isInvalid:n,errorMessage:i,size:s="md",children:r,...o},a)=>{const c=aa[s];return l.jsxs(p.Box,{w:"100%",children:[l.jsxs(p.NativeSelect.Root,{...o,children:[l.jsxs(p.NativeSelect.Field,{ref:a,h:c.h,px:c.px,fontSize:c.fontSize,bg:"bg.surface",border:"1px solid",borderColor:n?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_focus:{borderColor:n?"red.500":"blue.500",boxShadow:n?"0 0 0 3px rgba(220,38,38,0.15)":"0 0 0 3px rgba(6,133,255,0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:n?"red.500":"border",color:"text.heading"},children:[t&&l.jsx("option",{value:"",disabled:!0,children:t}),e.map(u=>l.jsx("option",{value:u.value,disabled:u.disabled,children:u.label},u.value)),r]}),l.jsx(p.NativeSelect.Indicator,{})]}),n&&i&&l.jsx(p.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})});Vs.displayName="MedixSelect";const Ls={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"}},Is=w.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:i,disabled:s=!1,indeterminate:r=!1,children:o,description:a,name:c,value:u,id:d},f)=>{const h=Ls[e],m=d??w.useId(),[g,x]=w.useState(n),[y,b]=w.useState(!1),v=t!==void 0?t:g,S=C=>{t===void 0&&x(C.target.checked),i==null||i(C.target.checked)},T={width:18,height:18,borderRadius:4,border:`2px solid ${v||r?h.solid:"var(--medix-form-border, #CBD5E1)"}`,background:v||r?h.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:y?`0 0 0 3px ${h.ring}`:"none",pointerEvents:"none"};return l.jsxs(p.Box,{opacity:s?.55:1,children:[l.jsxs("label",{htmlFor:m,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:s?"not-allowed":"pointer",userSelect:"none"},children:[l.jsx("input",{ref:f,id:m,type:"checkbox",name:c,value:u,checked:v,disabled:s,onChange:S,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{style:T,"aria-hidden":"true",children:r?l.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:l.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):v?l.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:l.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),o&&l.jsxs(p.Box,{children:[l.jsx(p.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:o}),a&&l.jsx(p.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:a})]})]}),!o&&a&&l.jsx(p.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:a})]})});Is.displayName="MedixCheckbox";function la({name:e,value:t,onChange:n,options:i,colorScheme:s="blue",direction:r="column"}){const o=Ls[s],[a,c]=w.useState(""),u=t!==void 0?t:a,d=f=>{t===void 0&&c(f),n==null||n(f)};return l.jsx(p.Box,{display:"flex",flexDirection:r,gap:r==="row"?"5":"3",role:"radiogroup",children:i.map(f=>{const h=u===f.value;return l.jsx(ca,{option:f,name:e,isSelected:h,onChange:d,solidColor:o.solid,ring:o.ring},f.value)})})}function ca({option:e,name:t,isSelected:n,onChange:i,solidColor:s,ring:r}){const[o,a]=w.useState(!1);return l.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:[l.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>i(e.value),onFocus:()=>a(!0),onBlur:()=>a(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?s:"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:o?`0 0 0 3px ${r}`:"none",pointerEvents:"none"},children:l.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:s,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),l.jsxs(p.Box,{children:[l.jsx(p.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&l.jsx(p.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const da={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"}},ua={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}},zs=w.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:i=!1,onChange:s,disabled:r=!1,label:o,description:a,name:c,id:u},d)=>{const f=da[e],h=ua[t],m=u??w.useId(),[g,x]=w.useState(i),[y,b]=w.useState(!1),v=n!==void 0?n:g,S=k=>{n===void 0&&x(k.target.checked),s==null||s(k.target.checked)},T={position:"relative",display:"inline-flex",alignItems:"center",width:h.width,height:h.height,borderRadius:h.height,background:v?f.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:y?`0 0 0 3px ${f.ring}`:"none",cursor:r?"not-allowed":"pointer",flexShrink:0},C={position:"absolute",width:h.thumbSize,height:h.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"0 1px 4px rgba(0,0,0,0.22)",top:h.thumbOffset,left:v?h.width-h.thumbSize-h.thumbOffset:h.thumbOffset,transition:"left 0.18s ease"};return l.jsxs(p.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:r?.55:1,children:[l.jsxs("label",{htmlFor:m,style:{display:"inline-flex",cursor:r?"not-allowed":"pointer"},children:[l.jsx("input",{ref:d,id:m,type:"checkbox",role:"switch",name:c,checked:v,disabled:r,onChange:S,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{style:T,"aria-hidden":"true",children:l.jsx("span",{style:C})})]}),(o||a)&&l.jsxs(p.Box,{children:[o&&l.jsx("label",{htmlFor:m,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:r?"not-allowed":"pointer",userSelect:"none"},children:o}),a&&l.jsx(p.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:a})]})]})});zs.displayName="MedixSwitch";function fa({id:e,label:t,helperText:n,errorMessage:i,isRequired:s=!1,isDisabled:r=!1,children:o}){const a=!!i;return l.jsxs(p.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:r?.5:1,pointerEvents:r?"none":void 0,w:"100%",children:[t&&l.jsxs(p.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[l.jsx(p.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),s&&l.jsx(p.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),w.cloneElement(o,{id:e,isInvalid:a||void 0}),n&&!a&&l.jsx(p.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),a&&i&&l.jsx(p.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})}function Os({length:e=6,value:t="",onChange:n,onComplete:i,isInvalid:s=!1,isDisabled:r=!1,mask:o=!1,label:a,helperText:c,errorMessage:u}){const d=t.split("").slice(0,e),f=w.useRef([]),h=s?"#DC2626":"var(--medix-form-border)",m=s?"#DC2626":"#0685FF",g=(b,v)=>{var S,T,C;if(b.key==="Backspace"){b.preventDefault();const k=[...d];k[v]?(k[v]="",n==null||n(k.join(""))):v>0&&((S=f.current[v-1])==null||S.focus(),k[v-1]="",n==null||n(k.join("")))}else b.key==="ArrowLeft"&&v>0?(T=f.current[v-1])==null||T.focus():b.key==="ArrowRight"&&v<e-1&&((C=f.current[v+1])==null||C.focus())},x=(b,v)=>{var k,P;const S=b.target.value.replace(/\D/g,"");if(!S)return;if(S.length>1){const A=S.split("").slice(0,e),F=[...Array(e).fill("")];A.forEach((E,U)=>{F[U]=E});const j=F.join("");n==null||n(j);const D=Math.min(A.length,e-1);(k=f.current[D])==null||k.focus(),j.length===e&&(i==null||i(j));return}const T=[...d];for(;T.length<e;)T.push("");T[v]=S;const C=T.join("");n==null||n(C),v<e-1&&((P=f.current[v+1])==null||P.focus()),C.replace(/\s/g,"").length===e&&(i==null||i(C))},y=b=>b.target.select();return l.jsxs(p.Box,{w:"fit-content",children:[a&&l.jsx(p.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),l.jsx(p.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((b,v)=>l.jsx("input",{ref:S=>{f.current[v]=S},type:o?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:d[v]??"",onChange:S=>x(S,v),onKeyDown:S=>g(S,v),onFocus:y,disabled:r,"aria-label":`Digit ${v+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${h}`,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:r?"not-allowed":"text",opacity:r?.5:1},onFocusCapture:S=>{S.target.style.borderColor=m,S.target.style.boxShadow=`0 0 0 3px ${s?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`},onBlurCapture:S=>{S.target.style.borderColor=h,S.target.style.boxShadow="none"}},v))}),(c||u)&&l.jsx(p.Text,{mt:"2",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?u:c})]})}const ha=Os,Ft=[{code:"+234",flag:"🇳🇬",country:"NG"},{code:"+1",flag:"🇺🇸",country:"US"},{code:"+44",flag:"🇬🇧",country:"GB"},{code:"+233",flag:"🇬🇭",country:"GH"},{code:"+254",flag:"🇰🇪",country:"KE"},{code:"+27",flag:"🇿🇦",country:"ZA"},{code:"+251",flag:"🇪🇹",country:"ET"},{code:"+255",flag:"🇹🇿",country:"TZ"}];function pa({value:e="",onChange:t,showCountryCode:n=!0,defaultCountryCode:i="+234",placeholder:s="80 000 0000",isInvalid:r=!1,errorMessage:o,label:a,helperText:c,isDisabled:u=!1,id:d}){const[f,h]=w.useState(i),[m,g]=w.useState(e),[x,y]=w.useState(!1),b=Ft.find(k=>k.code===f)??Ft[0],v=k=>{const P=k.target.value.replace(/[^\d\s\-]/g,"");g(P),t==null||t(`${f}${P.replace(/\s/g,"")}`)},S=k=>{h(k.target.value),t==null||t(`${k.target.value}${m.replace(/\s/g,"")}`)},T=r?"#DC2626":x?"#0685FF":"var(--medix-form-border)",C=x?`0 0 0 3px ${r?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return l.jsxs(p.Box,{w:"100%",children:[a&&l.jsx(p.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),l.jsxs(p.Box,{display:"flex",alignItems:"center",overflow:"hidden",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:u?.5:1,pointerEvents:u?"none":void 0,style:{border:`1.5px solid ${T}`,boxShadow:C,background:"var(--medix-form-bg)"},children:[n&&l.jsxs("label",{htmlFor:`${d}-country`,style:{display:"flex",alignItems:"center",gap:"4px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",borderRight:"1px solid var(--medix-form-border)",cursor:"pointer",flexShrink:0,minWidth:"80px"},children:[l.jsx(p.Text,{fontSize:"lg",lineHeight:"1",children:b.flag}),l.jsx("select",{id:`${d}-country`,value:f,onChange:S,"aria-label":"Country code",style:{background:"transparent",border:"none",outline:"none",fontSize:"14px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",cursor:"pointer",width:"42px"},children:Ft.map(k=>l.jsx("option",{value:k.code,style:{background:"var(--medix-form-bg)",color:"var(--medix-form-text)"},children:k.code},k.code))})]}),l.jsx("input",{id:d,type:"tel",value:m,onChange:v,onFocus:()=>y(!0),onBlur:()=>y(!1),placeholder:s,disabled:u,"aria-invalid":r,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}})]}),(c||o)&&l.jsx(p.Text,{mt:"1.5",fontSize:"xs",color:r?"red.500":"text.muted",fontFamily:"var(--font-body)",children:r?o:c})]})}function ma({value:e,onChange:t,min:n,max:i,label:s,helperText:r,errorMessage:o,isInvalid:a=!1,isDisabled:c=!1,placeholder:u,id:d,includeTime:f=!1}){const[h,m]=w.useState(!1),g=a?"#DC2626":h?"#0685FF":"var(--medix-form-border)",x=h?`0 0 0 3px ${a?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return l.jsxs(p.Box,{w:"100%",children:[s&&l.jsx(p.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s}),l.jsxs(p.Box,{position:"relative",children:[l.jsx("input",{id:d,type:f?"datetime-local":"date",value:e??"",onChange:y=>t==null?void 0:t(y.target.value),min:n,max:i,placeholder:u,disabled:c,"aria-invalid":a,onFocus:()=>m(!0),onBlur:()=>m(!1),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${g}`,boxShadow:x,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"pointer",opacity:c?.5:1,colorScheme:"auto"}}),l.jsx(p.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:"📅"})]}),(r||o)&&l.jsx(p.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?o:r})]})}const Ws=w.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...i},s)=>l.jsx(p.Box,{ref:s,bg:"bg.surface",borderRadius:"card",border:"1px solid",borderColor:"border",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},overflow:"hidden",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",...t&&{_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},cursor:"pointer"},...i,children:w.Children.map(n,r=>r||null)}));Ws.displayName="MedixCard";function ga({title:e,subtitle:t,action:n,children:i,...s}){return l.jsxs(p.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...s,children:[l.jsxs(p.Box,{flex:"1",children:[e&&l.jsx(p.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&l.jsx(p.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),i]}),n&&l.jsx(p.Box,{flexShrink:0,children:n})]})}function xa({children:e,...t}){return l.jsx(p.Box,{px:"6",py:"5",...t,children:e})}function ya({children:e,...t}){return l.jsx(p.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Hs=w.forwardRef(({value:e,label:t,unit:n,change:i,trend:s,icon:r,accentColor:o="blue.500",...a},c)=>{const u=s??(i!==void 0?i>=0?"up":"down":"neutral"),d=u==="up"?"green.500":u==="down"?"red.500":"text.muted";return l.jsxs(p.Box,{ref:c,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...a,children:[r&&l.jsx(p.Box,{w:"10",h:"10",borderRadius:"md",bg:`${o.split(".")[0]}.100`,color:o,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:r}),l.jsxs(p.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&l.jsx(p.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),l.jsx(p.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),i!==void 0&&l.jsxs(p.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:d,children:[l.jsx(p.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),l.jsxs(p.Box,{as:"span",children:[Math.abs(i),"%"]})]})]})});Hs.displayName="MedixStatCard";const ba={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Ns=w.forwardRef(({maxWidth:e="xl",children:t,...n},i)=>l.jsx(p.Box,{ref:i,w:"100%",maxW:ba[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Ns.displayName="MedixContainer";function va({eyebrow:e,title:t,description:n,align:i="center",action:s,eyebrowColor:r="blue.500",...o}){const a=i,c=i==="center"?"center":i==="right"?"flex-end":"flex-start";return l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:c,textAlign:a,gap:"3",...o,children:[e&&l.jsx(p.Box,{as:"span",fontSize:"xs",fontWeight:"bold",color:r,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),l.jsx(p.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:i==="center"?"720px":void 0,children:t}),n&&l.jsx(p.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:i==="center"?"640px":void 0,children:n}),s&&l.jsx(p.Box,{mt:"2",children:s})]})}const gn=w.createContext({});function xn(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sa=typeof window<"u",_s=Sa?w.useLayoutEffect:w.useEffect,yt=w.createContext(null);function yn(e,t){e.indexOf(t)===-1&&e.push(t)}function lt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const se=(e,t,n)=>n>t?t:n<e?e:n;function _t(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ee=()=>{},oe=()=>{};var xs;typeof process<"u"&&((xs=process.env)==null?void 0:xs.NODE_ENV)!=="production"&&(Ee=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(_t(t,n))},oe=(e,t,n)=>{if(!e)throw new Error(_t(t,n))});const de={},$s=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Us(e){return typeof e=="object"&&e!==null}const Ks=e=>/^0[^.\s]+$/u.test(e);function Gs(e){let t;return()=>(t===void 0&&(t=e()),t)}const Z=e=>e,wa=(e,t)=>n=>t(e(n)),Ue=(...e)=>e.reduce(wa),He=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class bn{constructor(){this.subscriptions=[]}add(t){return yn(this.subscriptions,t),()=>lt(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $=e=>e*1e3,X=e=>e/1e3;function Ys(e,t){return t?e*(1e3/t):0}const qn=new Set;function vn(e,t,n){e||qn.has(t)||(console.warn(_t(t,n)),qn.add(t))}const Xs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ca=1e-7,Ta=12;function Fa(e,t,n,i,s){let r,o,a=0;do o=t+(n-t)/2,r=Xs(o,i,s)-e,r>0?n=o:t=o;while(Math.abs(r)>Ca&&++a<Ta);return o}function Ke(e,t,n,i){if(e===t&&n===i)return Z;const s=r=>Fa(r,0,1,e,n);return r=>r===0||r===1?r:Xs(s(r),t,i)}const Zs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qs=e=>t=>1-e(1-t),Js=Ke(.33,1.53,.69,.99),Sn=qs(Js),Qs=Zs(Sn),eo=e=>e>=1?1:(e*=2)<1?.5*Sn(e):.5*(2-Math.pow(2,-10*(e-1))),wn=e=>1-Math.sin(Math.acos(e)),to=qs(wn),no=Zs(wn),ja=Ke(.42,0,1,1),ka=Ke(0,0,.58,1),io=Ke(.42,0,.58,1),Ba=e=>Array.isArray(e)&&typeof e[0]!="number",so=e=>Array.isArray(e)&&typeof e[0]=="number",Jn={linear:Z,easeIn:ja,easeInOut:io,easeOut:ka,circIn:wn,circInOut:no,circOut:to,backIn:Sn,backInOut:Qs,backOut:Js,anticipate:eo},Aa=e=>typeof e=="string",Qn=e=>{if(so(e)){oe(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Ke(t,n,i,s)}else if(Aa(e))return oe(Jn[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Jn[e];return e},Xe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Da(e,t){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(d){o.has(d)&&(u.schedule(d),e()),d(a)}const u={schedule:(d,f=!1,h=!1)=>{const g=h&&s?n:i;return f&&o.add(d),g.add(d),d},cancel:d=>{i.delete(d),o.delete(d)},process:d=>{if(a=d,s){r=!0;return}s=!0;const f=n;n=i,i=f,n.forEach(c),n.clear(),s=!1,r&&(r=!1,u.process(d))}};return u}const Pa=40;function oo(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Xe.reduce((S,T)=>(S[T]=Da(r),S),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:m,postRender:g}=o,x=()=>{const S=de.useManualTiming,T=S?s.timestamp:performance.now();n=!1,S||(s.delta=i?1e3/60:Math.max(Math.min(T-s.timestamp,Pa),1)),s.timestamp=T,s.isProcessing=!0,a.process(s),c.process(s),u.process(s),d.process(s),f.process(s),h.process(s),m.process(s),g.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(x))},y=()=>{n=!0,i=!0,s.isProcessing||e(x)};return{schedule:Xe.reduce((S,T)=>{const C=o[T];return S[T]=(k,P=!1,A=!1)=>(n||y(),C.schedule(k,P,A)),S},{}),cancel:S=>{for(let T=0;T<Xe.length;T++)o[Xe[T]].cancel(S)},state:s,steps:o}}const{schedule:M,cancel:ue,state:W,steps:jt}=oo(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let et;function Ea(){et=void 0}const N={now:()=>(et===void 0&&N.set(W.isProcessing||de.useManualTiming?W.timestamp:performance.now()),et),set:e=>{et=e,queueMicrotask(Ea)}},ro=e=>t=>typeof t=="string"&&t.startsWith(e),ao=ro("--"),Ma=ro("var(--"),Cn=e=>Ma(e)?Ra.test(e.split("/*")[0].trim()):!1,Ra=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ei(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Me={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ne={...Me,transform:e=>se(0,1,e)},Ze={...Me,default:1},ze=e=>Math.round(e*1e5)/1e5,Tn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Va(e){return e==null}const La=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fn=(e,t)=>n=>!!(typeof n=="string"&&La.test(n)&&n.startsWith(e)||t&&!Va(n)&&Object.prototype.hasOwnProperty.call(n,t)),lo=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(Tn);return{[e]:parseFloat(s),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ia=e=>se(0,255,e),kt={...Me,transform:e=>Math.round(Ia(e))},ge={test:Fn("rgb","red"),parse:lo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+kt.transform(e)+", "+kt.transform(t)+", "+kt.transform(n)+", "+ze(Ne.transform(i))+")"};function za(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const $t={test:Fn("#"),parse:za,transform:ge.transform},Ge=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ae=Ge("deg"),ie=Ge("%"),B=Ge("px"),Oa=Ge("vh"),Wa=Ge("vw"),ti={...ie,parse:e=>ie.parse(e)/100,transform:e=>ie.transform(e*100)},je={test:Fn("hsl","hue"),parse:lo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+ie.transform(ze(t))+", "+ie.transform(ze(n))+", "+ze(Ne.transform(i))+")"},I={test:e=>ge.test(e)||$t.test(e)||je.test(e),parse:e=>ge.test(e)?ge.parse(e):je.test(e)?je.parse(e):$t.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ge.transform(e):je.transform(e),getAnimatableNone:e=>{const t=I.parse(e);return t.alpha=0,I.transform(t)}},Ha=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Na(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Tn))==null?void 0:t.length)||0)+(((n=e.match(Ha))==null?void 0:n.length)||0)>0}const co="number",uo="color",_a="var",$a="var(",ni="${}",Ua=/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 De(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=t.replace(Ua,c=>(I.test(c)?(i.color.push(r),s.push(uo),n.push(I.parse(c))):c.startsWith($a)?(i.var.push(r),s.push(_a),n.push(c)):(i.number.push(r),s.push(co),n.push(parseFloat(c))),++r,ni)).split(ni);return{values:n,split:a,indexes:i,types:s}}function Ka(e){return De(e).values}function fo({split:e,types:t}){const n=e.length;return i=>{let s="";for(let r=0;r<n;r++)if(s+=e[r],i[r]!==void 0){const o=t[r];o===co?s+=ze(i[r]):o===uo?s+=I.transform(i[r]):s+=i[r]}return s}}function Ga(e){return fo(De(e))}const Ya=e=>typeof e=="number"?0:I.test(e)?I.getAnimatableNone(e):e,Xa=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Ya(e);function Za(e){const t=De(e);return fo(t)(t.values.map((i,s)=>Xa(i,t.split[s])))}const Q={test:Na,parse:Ka,createTransformer:Ga,getAnimatableNone:Za};function Bt(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 qa({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,r=0,o=0;if(!t)s=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=Bt(c,a,e+1/3),r=Bt(c,a,e),o=Bt(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function ct(e,t){return n=>n>0?t:e}const R=(e,t,n)=>e+(t-e)*n,At=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Ja=[$t,ge,je],Qa=e=>Ja.find(t=>t.test(e));function ii(e){const t=Qa(e);if(Ee(!!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===je&&(n=qa(n)),n}const si=(e,t)=>{const n=ii(e),i=ii(t);if(!n||!i)return ct(e,t);const s={...n};return r=>(s.red=At(n.red,i.red,r),s.green=At(n.green,i.green,r),s.blue=At(n.blue,i.blue,r),s.alpha=R(n.alpha,i.alpha,r),ge.transform(s))},Ut=new Set(["none","hidden"]);function el(e,t){return Ut.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tl(e,t){return n=>R(e,t,n)}function jn(e){return typeof e=="number"?tl:typeof e=="string"?Cn(e)?ct:I.test(e)?si:sl:Array.isArray(e)?ho:typeof e=="object"?I.test(e)?si:nl:ct}function ho(e,t){const n=[...e],i=n.length,s=e.map((r,o)=>jn(r)(r,t[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function nl(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=jn(e[s])(e[s],t[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function il(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const r=t.types[s],o=e.indexes[r][i[r]],a=e.values[o]??0;n[s]=a,i[r]++}return n}const sl=(e,t)=>{const n=Q.createTransformer(t),i=De(e),s=De(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ut.has(e)&&!s.values.length||Ut.has(t)&&!i.values.length?el(e,t):Ue(ho(il(i,s),s.values),n):(Ee(!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"),ct(e,t))};function po(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?R(e,t,n):jn(e)(e,t)}const ol=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>M.update(t,n),stop:()=>ue(t),now:()=>W.isProcessing?W.timestamp:N.now()}},mo=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let r=0;r<s;r++)i+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},dt=2e4;function kn(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<dt;)t+=n,i=e.next(t);return t>=dt?1/0:t}function rl(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(kn(i),dt);return{type:"keyframes",ease:r=>i.next(s*r).value/t,duration:X(s)}}const V={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 Kt(e,t){return e*Math.sqrt(1-t*t)}const al=12;function ll(e,t,n){let i=n;for(let s=1;s<al;s++)i=i-e(i)/t(i);return i}const Dt=.001;function cl({duration:e=V.duration,bounce:t=V.bounce,velocity:n=V.velocity,mass:i=V.mass}){let s,r;Ee(e<=$(V.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=se(V.minDamping,V.maxDamping,o),e=se(V.minDuration,V.maxDuration,X(e)),o<1?(s=u=>{const d=u*o,f=d*e,h=d-n,m=Kt(u,o),g=Math.exp(-f);return Dt-h/m*g},r=u=>{const f=u*o*e,h=f*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-f),x=Kt(Math.pow(u,2),o);return(-s(u)+Dt>0?-1:1)*((h-m)*g)/x}):(s=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-Dt+d*f},r=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const a=5/e,c=ll(s,r,a);if(e=$(e),isNaN(c))return{stiffness:V.stiffness,damping:V.damping,duration:e};{const u=Math.pow(c,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:e}}}const dl=["duration","bounce"],ul=["stiffness","damping","mass"];function oi(e,t){return t.some(n=>e[n]!==void 0)}function fl(e){let t={velocity:V.velocity,stiffness:V.stiffness,damping:V.damping,mass:V.mass,isResolvedFromDuration:!1,...e};if(!oi(e,ul)&&oi(e,dl))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*se(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:V.mass,stiffness:s,damping:r}}else{const n=cl({...e,velocity:0});t={...t,...n,mass:V.mass},t.isResolvedFromDuration=!0}return t}function ut(e=V.visualDuration,t=V.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:m}=fl({...n,velocity:-X(n.velocity||0)}),g=h||0,x=u/(2*Math.sqrt(c*d)),y=o-r,b=X(Math.sqrt(c/d)),v=Math.abs(y)<5;i||(i=v?V.restSpeed.granular:V.restSpeed.default),s||(s=v?V.restDelta.granular:V.restDelta.default);let S,T,C,k,P,A;if(x<1)C=Kt(b,x),k=(g+x*b*y)/C,S=j=>{const D=Math.exp(-x*b*j);return o-D*(k*Math.sin(C*j)+y*Math.cos(C*j))},P=x*b*k+y*C,A=x*b*y-k*C,T=j=>Math.exp(-x*b*j)*(P*Math.sin(C*j)+A*Math.cos(C*j));else if(x===1){S=D=>o-Math.exp(-b*D)*(y+(g+b*y)*D);const j=g+b*y;T=D=>Math.exp(-b*D)*(b*j*D-g)}else{const j=b*Math.sqrt(x*x-1);S=K=>{const G=Math.exp(-x*b*K),ee=Math.min(j*K,300);return o-G*((g+x*b*y)*Math.sinh(ee)+j*y*Math.cosh(ee))/j};const D=(g+x*b*y)/j,E=x*b*D-y*j,U=x*b*y-D*j;T=K=>{const G=Math.exp(-x*b*K),ee=Math.min(j*K,300);return G*(E*Math.sinh(ee)+U*Math.cosh(ee))}}const F={calculatedDuration:m&&f||null,velocity:j=>$(T(j)),next:j=>{if(!m&&x<1){const E=Math.exp(-x*b*j),U=Math.sin(C*j),K=Math.cos(C*j),G=o-E*(k*U+y*K),ee=$(E*(P*U+A*K));return a.done=Math.abs(ee)<=i&&Math.abs(o-G)<=s,a.value=a.done?o:G,a}const D=S(j);if(m)a.done=j>=f;else{const E=$(T(j));a.done=Math.abs(E)<=i&&Math.abs(o-D)<=s}return a.value=a.done?o:D,a},toString:()=>{const j=Math.min(kn(F),dt),D=mo(E=>F.next(j*E).value,j,30);return j+"ms "+D},toTransition:()=>{}};return F}ut.applyToOptions=e=>{const t=rl(e,100,ut);return e.ease=t.ease,e.duration=$(t.duration),e.type="keyframes",e};const hl=5;function go(e,t,n){const i=Math.max(t-hl,0);return Ys(n-e(i),t-i)}function Gt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},m=A=>a!==void 0&&A<a||c!==void 0&&A>c,g=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let x=n*t;const y=f+x,b=o===void 0?y:o(y);b!==y&&(x=b-f);const v=A=>-x*Math.exp(-A/i),S=A=>b+v(A),T=A=>{const F=v(A),j=S(A);h.done=Math.abs(F)<=u,h.value=h.done?b:j};let C,k;const P=A=>{m(h.value)&&(C=A,k=ut({keyframes:[h.value,g(h.value)],velocity:go(S,A,h.value),damping:s,stiffness:r,restDelta:u,restSpeed:d}))};return P(0),{calculatedDuration:null,next:A=>{let F=!1;return!k&&C===void 0&&(F=!0,T(A),P(A)),C!==void 0&&A>=C?k.next(A-C):(!F&&T(A),h)}}}function pl(e,t,n){const i=[],s=n||de.mix||po,r=e.length-1;for(let o=0;o<r;o++){let a=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Z:t;a=Ue(c,a)}i.push(a)}return i}function ml(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const r=e.length;if(oe(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=pl(t,i,s),c=a.length,u=d=>{if(o&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=He(e[f],e[f+1],d);return a[f](h)};return n?d=>u(se(e[0],e[r-1],d)):u}function gl(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=He(0,t,i);e.push(R(n,1,s))}}function xl(e){const t=[0];return gl(t,e.length-1),t}function yl(e,t){return e.map(n=>n*t)}function bl(e,t){return e.map(()=>t||io).splice(0,e.length-1)}function ke({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=Ba(i)?i.map(Qn):Qn(i),r={done:!1,value:t[0]},o=yl(n&&n.length===t.length?n:xl(t),e),a=ml(o,t,{ease:Array.isArray(s)?s:bl(t,s)});return{calculatedDuration:e,next:c=>(r.value=a(c),r.done=c>=e,r)}}const vl=e=>e!==null;function bt(e,{repeat:t,repeatType:n="loop"},i,s=1){const r=e.filter(vl),a=s<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const Sl={decay:Gt,inertia:Gt,tween:ke,keyframes:ke,spring:ut};function xo(e){typeof e.type=="string"&&(e.type=Sl[e.type])}class Bn{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 wl=e=>e/100;class ft extends Bn{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 i,s;const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(i=this.options).onStop)==null||s.call(i))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;xo(t);const{type:n=ke,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const c=n||ke;process.env.NODE_ENV!=="production"&&c!==ke&&oe(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==ke&&typeof a[0]!="number"&&(this.mixKeyframes=Ue(wl,po(a[0],a[1])),a=[0,100]);const u=c({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=kn(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}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:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:d,repeat:f,repeatType:h,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-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?b<0:b>s;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,T=i;if(f){const A=Math.min(this.currentTime,s)/a;let F=Math.floor(A),j=A%1;!j&&A>=1&&(j=1),j===1&&F--,F=Math.min(F,f+1),!!(F%2)&&(h==="reverse"?(j=1-j,m&&(j-=m/a)):h==="mirror"&&(T=o)),S=se(0,1,j)*a}let C;v?(this.delayState.value=d[0],C=this.delayState):C=T.next(S),r&&!v&&(C.value=r(C.value));let{done:k}=C;!v&&c!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return P&&g!==Gt&&(C.value=bt(d,this.options,y,this.speed)),x&&x(C.value),P&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return X(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+X(t)}get time(){return X(this.currentTime)}set time(t){t=$(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 go(i=>this.generator.next(i).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=X(this.currentTime))}play(){var s,r;if(this.isStopped)return;const{driver:t=ol,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(r=(s=this.options).onPlay)==null||r.call(s);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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(N.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 Cl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const xe=e=>e*180/Math.PI,Yt=e=>{const t=xe(Math.atan2(e[1],e[0]));return Xt(t)},Tl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yt,rotateZ:Yt,skewX:e=>xe(Math.atan(e[1])),skewY:e=>xe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xt=e=>(e=e%360,e<0&&(e+=360),e),ri=Yt,ai=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),li=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Fl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ai,scaleY:li,scale:e=>(ai(e)+li(e))/2,rotateX:e=>Xt(xe(Math.atan2(e[6],e[5]))),rotateY:e=>Xt(xe(Math.atan2(-e[2],e[0]))),rotateZ:ri,rotate:ri,skewX:e=>xe(Math.atan(e[4])),skewY:e=>xe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Zt(e){return e.includes("scale")?1:0}function qt(e,t){if(!e||e==="none")return Zt(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Fl,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Tl,s=a}if(!s)return Zt(t);const r=i[t],o=s[1].split(",").map(kl);return typeof r=="function"?r(o):o[r]}const jl=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return qt(n,t)};function kl(e){return parseFloat(e.trim())}const Re=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ve=new Set(Re),ci=e=>e===Me||e===B,Bl=new Set(["x","y","z"]),Al=Re.filter(e=>!Bl.has(e));function Dl(e){const t=[];return Al.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const ce={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-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})=>qt(t,"x"),y:(e,{transform:t})=>qt(t,"y")};ce.translateX=ce.x;ce.translateY=ce.y;const ve=new Set;let Jt=!1,Qt=!1,en=!1;function yo(){if(Qt){const e=Array.from(ve).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=Dl(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{var a;(a=i.getValue(r))==null||a.set(o)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Qt=!1,Jt=!1,ve.forEach(e=>e.complete(en)),ve.clear()}function bo(){ve.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qt=!0)})}function Pl(){en=!0,bo(),yo(),en=!1}class An{constructor(t,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ve.add(this),Jt||(Jt=!0,M.read(bo),M.resolveKeyframes(yo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const r=s==null?void 0:s.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&r===void 0&&s.set(t[0])}Cl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ve.delete(this)}cancel(){this.state==="scheduled"&&(ve.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const El=e=>e.startsWith("--");function vo(e,t,n){El(t)?e.style.setProperty(t,n):e.style[t]=n}const Ml={};function So(e,t){const n=Gs(e);return()=>Ml[t]??n()}const Rl=So(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),wo=So(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ie=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,di={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ie([0,.65,.55,1]),circOut:Ie([.55,0,1,.45]),backIn:Ie([.31,.01,.66,-.59]),backOut:Ie([.33,1.53,.69,.99])};function Co(e,t){if(e)return typeof e=="function"?wo()?mo(e,t):"ease-out":so(e)?Ie(e):Array.isArray(e)?e.map(n=>Co(n,t)||di.easeOut):di[e]}function Vl(e,t,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=Co(a,s);Array.isArray(f)&&(d.easing=f);const h={delay:i,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(d,h)}function To(e){return typeof e=="function"&&"applyToOptions"in e}function Ll({type:e,...t}){return To(e)&&wo()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Fo extends Bn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,oe(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ll(t);this.animation=Vl(n,i,s,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const d=bt(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),vo(n,i,d),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,i,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(i=this.animation).commitStyles)==null||s.call(i))}get duration(){var n,i;const t=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.call(n).duration)||0;return X(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+X(t)}get time(){return X(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(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:i,observe:s}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Rl()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),Z):s(this)}}const jo={anticipate:eo,backInOut:Qs,circInOut:no};function Il(e){return e in jo}function zl(e){typeof e.ease=="string"&&Il(e.ease)&&(e.ease=jo[e.ease])}const Pt=10;class Ol extends Fo{constructor(t){zl(t),xo(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ft({...o,autoplay:!1}),c=Math.max(Pt,N.now()-this.startTime),u=se(0,Pt,c-Pt),d=a.sample(c).value,{name:f}=this.options;r&&f&&vo(r,f,d),n.setWithVelocity(a.sample(Math.max(0,c-u)).value,d,u),a.stop()}}const ui=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Q.test(e)||e==="0")&&!e.startsWith("url("));function Wl(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 Hl(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=ui(s,t),a=ui(r,t);return Ee(o===a,`You are trying to animate ${t} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Wl(e)||(n==="spring"||To(n))&&i}function tn(e){e.duration=0,e.type="keyframes"}const ko=new Set(["opacity","clipPath","filter","transform"]),Nl=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function _l(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Nl.test(e[t]))return!0;return!1}const $l=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Ul=Gs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Kl(e){var f;const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:r,type:o,keyframes:a}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return Ul()&&n&&(ko.has(n)||$l.has(n)&&_l(a))&&(n!=="transform"||!d)&&!u&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Gl=40;class Yl extends Bn{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:u,element:d,...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=N.now();const h={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:c,motionValue:u,element:d,...f},m=(d==null?void 0:d.KeyframeResolver)||An;this.keyframeResolver=new m(a,(x,y,b)=>this.onKeyframesResolved(x,y,h,!b),c,u,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,i,s){var b,v;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:u,onUpdate:d}=i;this.resolvedAt=N.now();let f=!0;Hl(t,r,o,a)||(f=!1,(de.instantAnimations||!c)&&(d==null||d(bt(t,i,n))),t[0]=t[t.length-1],tn(i),i.repeat=0);const m={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Gl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},g=f&&!u&&Kl(m),x=(v=(b=m.motionValue)==null?void 0:b.owner)==null?void 0:v.current;let y;if(g)try{y=new Ol({...m,element:x})}catch{y=new ft(m)}else y=new ft(m);y.finished.then(()=>{this.notifyFinished()}).catch(Z),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(),Pl()),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 Bo(e,t,n,i=0,s=1){const r=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const Xl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zl(e){const t=Xl.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const ql=4;function Ao(e,t,n=1){oe(n<=ql,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=Zl(e);if(!i)return;const r=window.getComputedStyle(t).getPropertyValue(i);if(r){const o=r.trim();return $s(o)?parseFloat(o):o}return Cn(s)?Ao(s,t,n+1):s}const Jl={type:"spring",stiffness:500,damping:25,restSpeed:10},Ql=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ec={type:"keyframes",duration:.8},tc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nc=(e,{keyframes:t})=>t.length>2?ec:Ve.has(e)?e.startsWith("scale")?Ql(t[1]):Jl:tc;function Do(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function Dn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Do(n,e):n}const ic=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function sc(e){for(const t in e)if(!ic.has(t))return!0;return!1}const Pn=(e,t,n,i={},s,r)=>o=>{const a=Dn(i,e)||{},c=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-$(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:s};sc(a)||Object.assign(d,nc(e,d)),d.duration&&(d.duration=$(d.duration)),d.repeatDelay&&(d.repeatDelay=$(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(tn(d),d.delay===0&&(f=!0)),(de.instantAnimations||de.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(f=!0,tn(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,f&&!r&&t.get()!==void 0){const h=bt(d.keyframes,a);if(h!==void 0){M.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new ft(d):new Yl(d)};function fi(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function En(e,t,n,i){if(typeof t=="function"){const[s,r]=fi(i);t=t(n!==void 0?n:e.custom,s,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,r]=fi(i);t=t(n!==void 0?n:e.custom,s,r)}return t}function Se(e,t,n){const i=e.getProps();return En(i,t,n!==void 0?n:i.custom,e)}const Po=new Set(["width","height","top","left","right","bottom",...Re]),hi=30,oc=e=>!isNaN(parseFloat(e));class rc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var r;const s=N.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=N.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&vn(!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 bn);const i=this.events[t].add(n);return t==="change"?()=>{i(),M.read(()=>{this.events.change.getSize()||this.stop()})}:i}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,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}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=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>hi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,hi);return Ys(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 Pe(e,t){return new rc(e,t)}const nn=e=>Array.isArray(e);function ac(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pe(n))}function lc(e){return nn(e)?e[e.length-1]||0:e}function cc(e,t){const n=Se(e,t);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=lc(r[o]);ac(e,o,a)}}const H=e=>!!(e&&e.getVelocity);function dc(e){return!!(H(e)&&e.add)}function sn(e,t){const n=e.getValue("willChange");if(dc(n))return n.add(t);if(!n&&de.WillChange){const i=new de.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Mn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const uc="framerAppearId",Eo="data-"+Mn(uc);function Mo(e){return e.props[Eo]}function fc({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Ro(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=t;const c=e.getDefaultTransition();r=r?Do(r,c):c;const u=r==null?void 0:r.reduceMotion;i&&(r=i);const d=[],f=s&&e.animationState&&e.animationState.getState()[s];for(const h in a){const m=e.getValue(h,e.latestValues[h]??null),g=a[h];if(g===void 0||f&&fc(f,h))continue;const x={delay:n,...Dn(r||{},h)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===y&&!x.velocity){M.update(()=>m.set(g));continue}let b=!1;if(window.MotionHandoffAnimation){const T=Mo(e);if(T){const C=window.MotionHandoffAnimation(T,h,M);C!==null&&(x.startTime=C,b=!0)}}sn(e,h);const v=u??e.shouldReduceMotion;m.start(Pn(h,m,g,v&&Po.has(h)?{type:!1}:x,e,b));const S=m.animation;S&&d.push(S)}if(o){const h=()=>M.update(()=>{o&&cc(e,o)});d.length?Promise.all(d).then(h):h()}return d}function on(e,t,n={}){var c;const i=Se(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Ro(e,i,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return hc(e,t,u,d,f,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,d]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>d())}else return Promise.all([r(),o(n.delay)])}function hc(e,t,n=0,i=0,s=0,r=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(on(c,t,{...o,delay:n+(typeof i=="function"?0:i)+Bo(e.variantChildren,c,i,s,r)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function pc(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(r=>on(e,r,n));i=Promise.all(s)}else if(typeof t=="string")i=on(e,t,n);else{const s=typeof t=="function"?Se(e,t,n.custom):t;i=Promise.all(Ro(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const mc={test:e=>e==="auto",parse:e=>e},Vo=e=>t=>t.test(e),Lo=[Me,B,ie,ae,Wa,Oa,mc],pi=e=>Lo.find(Vo(e));function gc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ks(e):!0}const xc=new Set(["brightness","contrast","saturate","opacity"]);function yc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Tn)||[];if(!i)return e;const s=n.replace(i,"");let r=xc.has(t)?1:0;return i!==n&&(r*=100),t+"("+r+s+")"}const bc=/\b([a-z-]*)\(.*?\)/gu,rn={...Q,getAnimatableNone:e=>{const t=e.match(bc);return t?t.map(yc).join(" "):e}},an={...Q,getAnimatableNone:e=>{const t=Q.parse(e);return Q.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},mi={...Me,transform:Math.round},vc={rotate:ae,rotateX:ae,rotateY:ae,rotateZ:ae,scale:Ze,scaleX:Ze,scaleY:Ze,scaleZ:Ze,skew:ae,skewX:ae,skewY:ae,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:Ne,originX:ti,originY:ti,originZ:B},Rn={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,...vc,zIndex:mi,fillOpacity:Ne,strokeOpacity:Ne,numOctaves:mi},Sc={...Rn,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:rn,WebkitFilter:rn,mask:an,WebkitMask:an},Io=e=>Sc[e],wc=new Set([rn,an]);function zo(e,t){let n=Io(e);return wc.has(n)||(n=Q),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Cc=new Set(["auto","none","0"]);function Tc(e,t,n){let i=0,s;for(;i<e.length&&!s;){const r=e[i];typeof r=="string"&&!Cc.has(r)&&De(r).values.length&&(s=e[i]),i++}if(s&&n)for(const r of t)e[r]=zo(n,s)}class Fc extends An{constructor(t,n,i,s,r){super(t,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),Cn(f))){const h=Ao(f,n.current);h!==void 0&&(t[d]=h),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Po.has(i)||t.length!==2)return;const[s,r]=t,o=pi(s),a=pi(r),c=ei(s),u=ei(r);if(c!==u&&ce[i]){this.needsMeasurement=!0;return}if(o!==a)if(ci(o)&&ci(a))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else ce[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||gc(t[s]))&&i.push(s);i.length&&Tc(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ce[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=ce[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Oo(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=(n==null?void 0:n[e])??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const Wo=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function tt(e){return Us(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Vn}=oo(queueMicrotask,!1),J={x:!1,y:!1};function Ho(){return J.x||J.y}function jc(e){return e==="x"||e==="y"?J[e]?null:(J[e]=!0,()=>{J[e]=!1}):J.x||J.y?null:(J.x=J.y=!0,()=>{J.x=J.y=!1})}function No(e,t){const n=Oo(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function kc(e){return!(e.pointerType==="touch"||Ho())}function Bc(e,t,n={}){const[i,s,r]=No(e,n);return i.forEach(o=>{let a=!1,c=!1,u;const d=()=>{o.removeEventListener("pointerleave",g)},f=y=>{u&&(u(y),u=void 0),d()},h=y=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(y))},m=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},g=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}f(y)}},x=y=>{if(!kc(y))return;c=!1;const b=t(o,y);typeof b=="function"&&(u=b,o.addEventListener("pointerleave",g,s))};o.addEventListener("pointerenter",x,s),o.addEventListener("pointerdown",m,s)}),r}const _o=(e,t)=>t?e===t?!0:_o(e,t.parentElement):!1,Ln=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ac=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Dc(e){return Ac.has(e.tagName)||e.isContentEditable===!0}const Pc=new Set(["INPUT","SELECT","TEXTAREA"]);function Ec(e){return Pc.has(e.tagName)||e.isContentEditable===!0}const nt=new WeakSet;function gi(e){return t=>{t.key==="Enter"&&e(t)}}function Et(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Mc=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=gi(()=>{if(nt.has(n))return;Et(n,"down");const s=gi(()=>{Et(n,"up")}),r=()=>Et(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function xi(e){return Ln(e)&&!Ho()}const yi=new WeakSet;function Rc(e,t,n={}){const[i,s,r]=No(e,n),o=a=>{const c=a.currentTarget;if(!xi(a)||yi.has(a))return;nt.add(c),n.stopPropagation&&yi.add(a);const u=t(c,a),d=(m,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),nt.has(c)&&nt.delete(c),xi(m)&&typeof u=="function"&&u(m,{success:g})},f=m=>{d(m,c===window||c===document||n.useGlobalTarget||_o(c,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),tt(a)&&(a.addEventListener("focus",u=>Mc(u,s)),!Dc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function In(e){return Us(e)&&"ownerSVGElement"in e}const it=new WeakMap;let le;const $o=(e,t,n)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:In(i)&&"getBBox"in i?i.getBBox()[t]:i[n],Vc=$o("inline","width","offsetWidth"),Lc=$o("block","height","offsetHeight");function Ic({target:e,borderBoxSize:t}){var n;(n=it.get(e))==null||n.forEach(i=>{i(e,{get width(){return Vc(e,t)},get height(){return Lc(e,t)}})})}function zc(e){e.forEach(Ic)}function Oc(){typeof ResizeObserver>"u"||(le=new ResizeObserver(zc))}function Wc(e,t){le||Oc();const n=Oo(e);return n.forEach(i=>{let s=it.get(i);s||(s=new Set,it.set(i,s)),s.add(t),le==null||le.observe(i)}),()=>{n.forEach(i=>{const s=it.get(i);s==null||s.delete(t),s!=null&&s.size||le==null||le.unobserve(i)})}}const st=new Set;let Be;function Hc(){Be=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};st.forEach(t=>t(e))},window.addEventListener("resize",Be)}function Nc(e){return st.add(e),Be||Hc(),()=>{st.delete(e),!st.size&&typeof Be=="function"&&(window.removeEventListener("resize",Be),Be=void 0)}}function bi(e,t){return typeof e=="function"?Nc(e):Wc(e,t)}function _c(e){return In(e)&&e.tagName==="svg"}const $c=[...Lo,I,Q],Uc=e=>$c.find(Vo(e)),vi=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ae=()=>({x:vi(),y:vi()}),Si=()=>({min:0,max:0}),z=()=>({x:Si(),y:Si()}),Kc=new WeakMap;function vt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _e(e){return typeof e=="string"||Array.isArray(e)}const zn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],On=["initial",...zn];function St(e){return vt(e.animate)||On.some(t=>_e(e[t]))}function Uo(e){return!!(St(e)||e.variants)}function Gc(e,t,n){for(const i in t){const s=t[i],r=n[i];if(H(s))e.addValue(i,s);else if(H(r))e.addValue(i,Pe(s,{owner:e}));else if(r!==s)if(e.hasValue(i)){const o=e.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(i);e.addValue(i,Pe(o!==void 0?o:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const ln={current:null},Ko={current:!1},Yc=typeof window<"u";function Xc(){if(Ko.current=!0,!!Yc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ln.current=e.matches;e.addEventListener("change",t),t()}else ln.current=!1}const wi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ht={};function Go(e){ht=e}function Zc(){return ht}class qc{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},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=An,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=N.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,M.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=St(n),this.isVariantNode=Uo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const g=h[m];u[m]!==void 0&&H(g)&&g.set(u[m])}}mount(t){var n,i;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,Kc.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((s,r)=>this.bindToMotionValue(r,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ko.current||Xc(),this.shouldReduceMotion=ln.current),process.env.NODE_ENV!=="production"&&vn(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,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ue(this.notifyUpdate),ue(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 i=this.features[n];i&&(i.unmount(),i.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&&ko.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:u,duration:d}=n.accelerate,f=new Fo({element:this.current,name:t,keyframes:a,times:c,ease:u,duration:$(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const i=Ve.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),r&&r(),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 ht){const n=ht[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}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 i=0;i<wi.length;i++){const s=wi[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=t[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Gc(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 i=this.values.get(t);n!==i&&(i&&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 i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Pe(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&($s(i)||Ks(i))?i=parseFloat(i):!Uc(i)&&Q.test(n)&&(i=zo(t,n)),this.setBaseTarget(t,H(i)?i.get():i)),H(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=En(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!H(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new bn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Vn.render(this.render)}}class Yo extends qc{constructor(){super(...arguments),this.KeyframeResolver=Fc}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;H(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class fe{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Xo({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Jc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Qc(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Mt(e){return e===void 0||e===1}function cn({scale:e,scaleX:t,scaleY:n}){return!Mt(e)||!Mt(t)||!Mt(n)}function me(e){return cn(e)||Zo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Zo(e){return Ci(e.x)||Ci(e.y)}function Ci(e){return e&&e!=="0%"}function pt(e,t,n){const i=e-n,s=t*i;return n+s}function Ti(e,t,n,i,s){return s!==void 0&&(e=pt(e,s,i)),pt(e,n,i)+t}function dn(e,t=0,n=1,i,s){e.min=Ti(e.min,t,n,i,s),e.max=Ti(e.max,t,n,i,s)}function qo(e,{x:t,y:n}){dn(e.x,t.translate,t.scale,t.originPoint),dn(e.y,n.translate,n.scale,n.originPoint)}const Fi=.999999999999,ji=1.0000000000001;function ed(e,t,n,i=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let r,o;for(let c=0;c<s;c++){r=n[c],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(ne(e.x,-r.scroll.offset.x),ne(e.y,-r.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,qo(e,o)),i&&me(r.latestValues)&&ot(e,r.latestValues,(a=r.layout)==null?void 0:a.layoutBox))}t.x<ji&&t.x>Fi&&(t.x=1),t.y<ji&&t.y>Fi&&(t.y=1)}function ne(e,t){e.min+=t,e.max+=t}function ki(e,t,n,i,s=.5){const r=R(e.min,e.max,s);dn(e,t,n,r,i)}function Bi(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function ot(e,t,n){const i=n??e;ki(e.x,Bi(t.x,i.x),t.scaleX,t.scale,t.originX),ki(e.y,Bi(t.y,i.y),t.scaleY,t.scale,t.originY)}function Jo(e,t){return Xo(Qc(e.getBoundingClientRect(),t))}function td(e,t,n){const i=Jo(e,n),{scroll:s}=t;return s&&(ne(i.x,s.offset.x),ne(i.y,s.offset.y)),i}const nd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},id=Re.length;function sd(e,t,n){let i="",s=!0;for(let r=0;r<id;r++){const o=Re[r],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);c=o.startsWith("scale")?u===1:u===0}if(!c||n){const u=Wo(a,Rn[o]);if(!c){s=!1;const d=nd[o]||o;i+=`${d}(${u}) `}n&&(t[o]=u)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function Wn(e,t,n){const{style:i,vars:s,transformOrigin:r}=e;let o=!1,a=!1;for(const c in t){const u=t[c];if(Ve.has(c)){o=!0;continue}else if(ao(c)){s[c]=u;continue}else{const d=Wo(u,Rn[c]);c.startsWith("origin")?(a=!0,r[c]=d):i[c]=d}}if(t.transform||(o||n?i.transform=sd(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:d=0}=r;i.transformOrigin=`${c} ${u} ${d}`}}function Qo(e,{style:t,vars:n},i,s){const r=e.style;let o;for(o in t)r[o]=t[o];s==null||s.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function Ai(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Le={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=Ai(e,t.target.x),i=Ai(e,t.target.y);return`${n}% ${i}%`}},od={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Q.parse(e);if(s.length>5)return i;const r=Q.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=c;const u=R(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),r(s)}},un={borderRadius:{...Le,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Le,borderTopRightRadius:Le,borderBottomLeftRadius:Le,borderBottomRightRadius:Le,boxShadow:od};function er(e,{layout:t,layoutId:n}){return Ve.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!un[e]||e==="opacity")}function Hn(e,t,n){var o;const i=e.style,s=t==null?void 0:t.style,r={};if(!i)return r;for(const a in i)(H(i[a])||s&&H(s[a])||er(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=i[a]);return r}function rd(e){return window.getComputedStyle(e)}class ad extends Yo{constructor(){super(...arguments),this.type="html",this.renderInstance=Qo}readValueFromInstance(t,n){var i;if(Ve.has(n))return(i=this.projection)!=null&&i.isProjecting?Zt(n):jl(t,n);{const s=rd(t),r=(ao(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Jo(t,n)}build(t,n,i){Wn(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return Hn(t,n,i)}}const ld={offset:"stroke-dashoffset",array:"stroke-dasharray"},cd={offset:"strokeDashoffset",array:"strokeDasharray"};function dd(e,t,n=1,i=0,s=!0){e.pathLength=1;const r=s?ld:cd;e[r.offset]=`${-i}`,e[r.array]=`${t} ${n}`}const ud=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tr(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},c,u,d){if(Wn(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox);for(const m of ud)f[m]!==void 0&&(h[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),s!==void 0&&dd(f,s,r,o,!1)}const nr=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"]),ir=e=>typeof e=="string"&&e.toLowerCase()==="svg";function fd(e,t,n,i){Qo(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(nr.has(s)?s:Mn(s),t.attrs[s])}function sr(e,t,n){const i=Hn(e,t,n);for(const s in e)if(H(e[s])||H(t[s])){const r=Re.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=e[s]}return i}class hd extends Yo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ve.has(n)){const i=Io(n);return i&&i.default||0}return n=nr.has(n)?n:Mn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return sr(t,n,i)}build(t,n,i){tr(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){fd(t,n,i,s)}mount(t){this.isSVGTag=ir(t.tagName),super.mount(t)}}const pd=On.length;function or(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?or(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<pd;n++){const i=On[n],s=e.props[i];(_e(s)||s===!1)&&(t[i]=s)}return t}function rr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const md=[...zn].reverse(),gd=zn.length;function xd(e){return t=>Promise.all(t.map(({animation:n,options:i})=>pc(e,n,i)))}function yd(e){let t=xd(e),n=Di(),i=!0,s=!1;const r=u=>(d,f)=>{var m;const h=Se(e,f,u==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:g,transitionEnd:x,...y}=h;d={...d,...y,...x}}return d};function o(u){t=u(e)}function a(u){const{props:d}=e,f=or(e.parent)||{},h=[],m=new Set;let g={},x=1/0;for(let b=0;b<gd;b++){const v=md[b],S=n[v],T=d[v]!==void 0?d[v]:f[v],C=_e(T),k=v===u?S.isActive:null;k===!1&&(x=b);let P=T===f[v]&&T!==d[v]&&C;if(P&&(i||s)&&e.manuallyAnimateOnMount&&(P=!1),S.protectedKeys={...g},!S.isActive&&k===null||!T&&!S.prevProp||vt(T)||typeof T=="boolean")continue;if(v==="exit"&&S.isActive&&k!==!0){S.prevResolvedValues&&(g={...g,...S.prevResolvedValues});continue}const A=bd(S.prevProp,T);let F=A||v===u&&S.isActive&&!P&&C||b>x&&C,j=!1;const D=Array.isArray(T)?T:[T];let E=D.reduce(r(v),{});k===!1&&(E={});const{prevResolvedValues:U={}}=S,K={...U,...E},G=O=>{F=!0,m.has(O)&&(j=!0,m.delete(O)),S.needsAnimating[O]=!0;const Y=e.getValue(O);Y&&(Y.liveStyle=!1)};for(const O in K){const Y=E[O],he=U[O];if(g.hasOwnProperty(O))continue;let we=!1;nn(Y)&&nn(he)?we=!rr(Y,he):we=Y!==he,we?Y!=null?G(O):m.add(O):Y!==void 0&&m.has(O)?G(O):S.protectedKeys[O]=!0}S.prevProp=T,S.prevResolvedValues=E,S.isActive&&(g={...g,...E}),(i||s)&&e.blockInitialAnimation&&(F=!1);const ee=P&&A;F&&(!ee||j)&&h.push(...D.map(O=>{const Y={type:v};if(typeof O=="string"&&(i||s)&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:he}=e,we=Se(he,O);if(he.enteringChildren&&we){const{delayChildren:Rr}=we.transition||{};Y.delay=Bo(he.enteringChildren,e,Rr)}}return{animation:O,options:Y}}))}if(m.size){const b={};if(typeof d.initial!="boolean"){const v=Se(e,Array.isArray(d.initial)?d.initial[0]:d.initial);v&&v.transition&&(b.transition=v.transition)}m.forEach(v=>{const S=e.getBaseTarget(v),T=e.getValue(v);T&&(T.liveStyle=!0),b[v]=S??null}),h.push({animation:b})}let y=!!h.length;return i&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(y=!1),i=!1,s=!1,y?t(h):Promise.resolve()}function c(u,d){var h;if(n[u].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(u,d)}),n[u].isActive=d;const f=a(u);for(const m in n)n[m].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Di(),s=!0}}}function bd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rr(t,e):!1}function pe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Di(){return{animate:pe(!0),whileInView:pe(),whileHover:pe(),whileTap:pe(),whileDrag:pe(),whileFocus:pe(),exit:pe()}}function fn(e,t){e.min=t.min,e.max=t.max}function q(e,t){fn(e.x,t.x),fn(e.y,t.y)}function Pi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const ar=1e-4,vd=1-ar,Sd=1+ar,lr=.01,wd=0-lr,Cd=0+lr;function _(e){return e.max-e.min}function Td(e,t,n){return Math.abs(e-t)<=n}function Ei(e,t,n,i=.5){e.origin=i,e.originPoint=R(t.min,t.max,e.origin),e.scale=_(n)/_(t),e.translate=R(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vd&&e.scale<=Sd||isNaN(e.scale))&&(e.scale=1),(e.translate>=wd&&e.translate<=Cd||isNaN(e.translate))&&(e.translate=0)}function Oe(e,t,n,i){Ei(e.x,t.x,n.x,i?i.originX:void 0),Ei(e.y,t.y,n.y,i?i.originY:void 0)}function Mi(e,t,n,i=0){const s=i?R(n.min,n.max,i):n.min;e.min=s+t.min,e.max=e.min+_(t)}function Fd(e,t,n,i){Mi(e.x,t.x,n.x,i==null?void 0:i.x),Mi(e.y,t.y,n.y,i==null?void 0:i.y)}function Ri(e,t,n,i=0){const s=i?R(n.min,n.max,i):n.min;e.min=t.min-s,e.max=e.min+_(t)}function mt(e,t,n,i){Ri(e.x,t.x,n.x,i==null?void 0:i.x),Ri(e.y,t.y,n.y,i==null?void 0:i.y)}function Vi(e,t,n,i,s){return e-=t,e=pt(e,1/n,i),s!==void 0&&(e=pt(e,1/s,i)),e}function jd(e,t=0,n=1,i=.5,s,r=e,o=e){if(ie.test(t)&&(t=parseFloat(t),t=R(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=R(r.min,r.max,i);e===r&&(a-=t),e.min=Vi(e.min,t,n,a,s),e.max=Vi(e.max,t,n,a,s)}function Li(e,t,[n,i,s],r,o){jd(e,t[n],t[i],t[s],t.scale,r,o)}const kd=["x","scaleX","originX"],Bd=["y","scaleY","originY"];function Ii(e,t,n,i){Li(e.x,t,kd,n?n.x:void 0,i?i.x:void 0),Li(e.y,t,Bd,n?n.y:void 0,i?i.y:void 0)}function zi(e){return e.translate===0&&e.scale===1}function cr(e){return zi(e.x)&&zi(e.y)}function Oi(e,t){return e.min===t.min&&e.max===t.max}function Ad(e,t){return Oi(e.x,t.x)&&Oi(e.y,t.y)}function Wi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function dr(e,t){return Wi(e.x,t.x)&&Wi(e.y,t.y)}function Hi(e){return _(e.x)/_(e.y)}function Ni(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function te(e){return[e("x"),e("y")]}function Dd(e,t,n){let i="";const s=e.x.translate/t.x,r=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:m,skewY:g}=n;u&&(i=`perspective(${u}px) ${i}`),d&&(i+=`rotate(${d}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `),m&&(i+=`skewX(${m}deg) `),g&&(i+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(i+=`scale(${a}, ${c})`),i||"none"}const ur=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Pd=ur.length,_i=e=>typeof e=="string"?parseFloat(e):e,$i=e=>typeof e=="number"||B.test(e);function Ed(e,t,n,i,s,r){s?(e.opacity=R(0,n.opacity??1,Md(i)),e.opacityExit=R(t.opacity??1,0,Rd(i))):r&&(e.opacity=R(t.opacity??1,n.opacity??1,i));for(let o=0;o<Pd;o++){const a=ur[o];let c=Ui(t,a),u=Ui(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||$i(c)===$i(u)?(e[a]=Math.max(R(_i(c),_i(u),i),0),(ie.test(u)||ie.test(c))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=R(t.rotate||0,n.rotate||0,i))}function Ui(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Md=fr(0,.5,to),Rd=fr(.5,.95,Z);function fr(e,t,n){return i=>i<e?0:i>t?1:n(He(e,t,i))}function Vd(e,t,n){const i=H(e)?e:Pe(e);return i.start(Pn("",i,t,n)),i.animation}function $e(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const Ld=(e,t)=>e.depth-t.depth;class Id{constructor(){this.children=[],this.isDirty=!1}add(t){yn(this.children,t),this.isDirty=!0}remove(t){lt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ld),this.isDirty=!1,this.children.forEach(t)}}function zd(e,t){const n=N.now(),i=({timestamp:s})=>{const r=s-n;r>=t&&(ue(i),e(r-t))};return M.setup(i,!0),()=>ue(i)}function rt(e){return H(e)?e.get():e}class Od{constructor(){this.members=[]}add(t){yn(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(lt(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(lt(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 i=this.members.indexOf(t)-1;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:r}=i.options,{layoutDependency:o}=t.options;(r===void 0||r!==o)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,i,s,r,o;(i=(n=t.options).onExitComplete)==null||i.call(n),(o=(s=t.resumingFrom)==null?void 0:(r=s.options).onExitComplete)==null||o.call(r)})}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 at={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Rt=["","X","Y","Z"],Wd=1e3;let Hd=0;function Vt(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function hr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mo(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(s||r))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&hr(i)}function pr({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=Hd++,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($d),this.nodes.forEach(Zd),this.nodes.forEach(qd),this.nodes.forEach(Ud)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Id)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new bn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=In(o)&&!_c(o),this.instance=o;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let d,f=0;const h=()=>this.root.updateBlockedByResize=!1;M.read(()=>{f=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=zd(h,250),at.hasAnimatedSinceResize&&(at.hasAnimatedSinceResize=!1,this.nodes.forEach(Yi)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||nu,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=u.getProps(),b=!this.targetLayout||!dr(this.targetLayout,m),v=!f&&h;if(this.options.layoutRoot||this.resumeFrom||v||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Dn(g,"layout"),onPlay:x,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(d,v)}else f||Yi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ue(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(Jd),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];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:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&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(Gd),this.nodes.forEach(Ki);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Gi);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Yd),this.nodes.forEach(Xd),this.nodes.forEach(Nd),this.nodes.forEach(_d)):this.nodes.forEach(Gi),this.clearAllSnapshots();const a=N.now();W.delta=se(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,jt.update.process(W),jt.preRender.process(W),jt.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Kd),this.sharedNodes.forEach(Qd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_(this.snapshot.measuredBox.x)&&!_(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 o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!cr(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||me(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),iu(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return z();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(su))){const{scroll:d}=this.root;d&&(ne(a.x,d.offset.x),ne(a.y,d.offset.y))}return a}removeElementScroll(o){var c;const a=z();if(q(a,o),(c=this.scroll)!=null&&c.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&q(a,o),ne(a.x,f.offset.x),ne(a.y,f.offset.y))}return a}applyTransform(o,a=!1,c){var d,f;const u=c||z();q(u,o);for(let h=0;h<this.path.length;h++){const m=this.path[h];!a&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(ne(u.x,-m.scroll.offset.x),ne(u.y,-m.scroll.offset.y)),me(m.latestValues)&&ot(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return me(this.latestValues)&&ot(u,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),u}removeTransform(o){var c;const a=z();q(a,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!me(d.latestValues))continue;let f;d.instance&&(cn(d.latestValues)&&d.updateSnapshot(),f=z(),q(f,d.measurePageBox())),Ii(a,d.latestValues,(c=d.snapshot)==null?void 0:c.layoutBox,f)}return me(this.latestValues)&&Ii(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=W.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fd(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):q(this.target,this.layout.layoutBox),qo(this.target,this.targetDelta)):q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||cn(this.parent.latestValues)||Zo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),mt(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),q(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===W.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;q(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;ed(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=z());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Pi(this.prevProjectionDelta.x,this.projectionDelta.x),Pi(this.prevProjectionDelta.y,this.projectionDelta.y)),Oe(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Ni(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ni(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ae(),this.projectionDelta=Ae(),this.projectionDeltaWithTransform=Ae()}setAnimationOrigin(o,a=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=Ae();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=z(),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,v=!!(x&&!b&&this.options.crossfade===!0&&!this.path.some(tu));this.animationProgress=0;let S;this.mixTargetDelta=T=>{const C=T/1e3;Xi(f.x,o.x,C),Xi(f.y,o.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),eu(this.relativeTarget,this.relativeTargetOrigin,h,C),S&&Ad(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=z()),q(S,this.relativeTarget)),x&&(this.animationValues=d,Ed(d,u,this.latestValues,C,v,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ue(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{at.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pe(0)),this.motionValue.jump(0,!1),this.currentAnimation=Vd(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Wd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:d}=o;if(!(!a||!c||!u)){if(this!==o&&this.layout&&u&&mr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||z();const f=_(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=_(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}q(a,c),ot(a,d),Oe(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Od),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&Vt("z",o,u,this.animationValues);for(let d=0;d<Rt.length;d++)Vt(`rotate${Rt[d]}`,o,u,this.animationValues),Vt(`skew${Rt[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=rt(a==null?void 0:a.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=rt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!me(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Dd(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),o.transform=f;const{x:h,y:m}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in un){if(d[g]===void 0)continue;const{correct:x,applyTo:y,isCSSVariable:b}=un[g],v=f==="none"?d[g]:x(d[g],u);if(y){const S=y.length;for(let T=0;T<S;T++)o[y[T]]=v}else b?this.options.visualElement.renderState.vars[g]=v:o[g]=v}this.options.layoutId&&(o.pointerEvents=u===this?rt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ki),this.root.sharedNodes.clear()}}}function Nd(e){e.updateLayout()}function _d(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:i,measuredBox:s}=e.layout,{animationType:r}=e.options,o=t.source!==e.layout.source;if(r==="size")te(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],m=_(h);h.min=i[f].min,h.max=h.min+m});else if(r==="x"||r==="y"){const f=r==="x"?"y":"x";fn(o?t.measuredBox[f]:t.layoutBox[f],i[f])}else mr(r,t.layoutBox,i)&&te(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],m=_(i[f]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const a=Ae();Oe(a,i,t.layoutBox);const c=Ae();o?Oe(c,e.applyTransform(s,!0),t.measuredBox):Oe(c,i,t.layoutBox);const u=!cr(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const g=e.options.layoutAnchor||void 0,x=z();mt(x,t.layoutBox,h.layoutBox,g);const y=z();mt(y,i,m.layoutBox,g),dr(x,y)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function $d(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 Ud(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Kd(e){e.clearSnapshot()}function Ki(e){e.clearMeasurements()}function Gd(e){e.isLayoutDirty=!0,e.updateLayout()}function Gi(e){e.isLayoutDirty=!1}function Yd(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Xd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Yi(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Zd(e){e.resolveTargetDelta()}function qd(e){e.calcProjection()}function Jd(e){e.resetSkewAndRotation()}function Qd(e){e.removeLeadSnapshot()}function Xi(e,t,n){e.translate=R(t.translate,0,n),e.scale=R(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zi(e,t,n,i){e.min=R(t.min,n.min,i),e.max=R(t.max,n.max,i)}function eu(e,t,n,i){Zi(e.x,t.x,n.x,i),Zi(e.y,t.y,n.y,i)}function tu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const nu={duration:.45,ease:[.4,0,.1,1]},qi=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ji=qi("applewebkit/")&&!qi("chrome/")?Math.round:Z;function Qi(e){e.min=Ji(e.min),e.max=Ji(e.max)}function iu(e){Qi(e.x),Qi(e.y)}function mr(e,t,n){return e==="position"||e==="preserve-aspect"&&!Td(Hi(t),Hi(n),.2)}function su(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const ou=pr({attachResizeListener:(e,t)=>$e(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}),Lt={current:void 0},gr=pr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Lt.current){const e=new ou({});e.mount(window),e.setOptions({layoutScroll:!0}),Lt.current=e}return Lt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Nn=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function es(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ru(...e){return t=>{let n=!1;const i=e.map(s=>{const r=es(s,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<i.length;s++){const r=i[s];typeof r=="function"?r():es(e[s],null)}}}}function au(...e){return L.useCallback(ru(...e),e)}class lu extends L.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(tt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,s=tt(i)&&i.offsetWidth||0,r=tt(i)&&i.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function cu({children:e,isPresent:t,anchorX:n,anchorY:i,root:s,pop:r}){var h;const o=w.useId(),a=w.useRef(null),c=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=w.useContext(Nn),d=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),f=au(a,d);return w.useInsertionEffect(()=>{const{width:m,height:g,top:x,left:y,right:b,bottom:v}=c.current;if(t||r===!1||!a.current||!m||!g)return;const S=n==="left"?`left: ${y}`:`right: ${b}`,T=i==="bottom"?`bottom: ${v}`:`top: ${x}`;a.current.dataset.motionPopId=o;const C=document.createElement("style");u&&(C.nonce=u);const k=s??document.head;return k.appendChild(C),C.sheet&&C.sheet.insertRule(`
178
178
  [data-motion-pop-id="${o}"] {
179
179
  position: absolute !important;
180
180
  width: ${m}px !important;
@@ -182,15 +182,15 @@
182
182
  ${S}px !important;
183
183
  ${T}px !important;
184
184
  }
185
- `),()=>{var P;(P=a.current)==null||P.removeAttribute("data-motion-pop-id"),k.contains(C)&&k.removeChild(C)}},[t]),l.jsx(lu,{isPresent:t,childRef:a,sizeRef:c,pop:r,children:r===!1?e:L.cloneElement(e,{ref:f})})}const du=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:c,root:u})=>{const d=xn(uu),f=w.useId();let h=!0,m=w.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:s,onExitComplete:g=>{d.set(g,!0);for(const x of d.values())if(!x)return;i&&i()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,i]);return r&&h&&(m={...m}),w.useMemo(()=>{d.forEach((g,x)=>d.set(x,!1))},[n]),L.useEffect(()=>{!n&&!d.size&&i&&i()},[n]),e=l.jsx(cu,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:e}),l.jsx(yt.Provider,{value:m,children:e})};function uu(){return new Map}function mr(e=!0){const t=w.useContext(yt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,r=w.useId();w.useEffect(()=>{if(e)return s(r)},[e]);const o=w.useCallback(()=>e&&i&&i(r),[r,i,e]);return!n&&i?[!1,o]:[!0]}const qe=e=>e.key||"";function Qi(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const es=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:c="top",root:u})=>{const[d,f]=mr(o),h=w.useMemo(()=>Qi(e),[e]),m=o&&!d?[]:h.map(qe),g=w.useRef(!0),x=w.useRef(h),y=xn(()=>new Map),b=w.useRef(new Set),[v,S]=w.useState(h),[T,C]=w.useState(h);Hs(()=>{g.current=!1,x.current=h;for(let A=0;A<T.length;A++){const F=qe(T[A]);m.includes(F)?(y.delete(F),b.current.delete(F)):y.get(F)!==!0&&y.set(F,!1)}},[T,m.length,m.join("-")]);const k=[];if(h!==v){let A=[...h];for(let F=0;F<T.length;F++){const j=T[F],D=qe(j);m.includes(D)||(A.splice(F,0,j),k.push(j))}return r==="wait"&&k.length&&(A=k),C(Qi(A)),S(h),null}process.env.NODE_ENV!=="production"&&r==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:P}=w.useContext(gn);return l.jsx(l.Fragment,{children:T.map(A=>{const F=qe(A),j=o&&!d?!1:h===T||m.includes(F),D=()=>{if(b.current.has(F))return;if(y.has(F))b.current.add(F),y.set(F,!0);else return;let E=!0;y.forEach(U=>{U||(E=!1)}),E&&(P==null||P(),C(x.current),o&&(f==null||f()),i&&i())};return l.jsx(du,{isPresent:j,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:r,root:u,onExitComplete:j?void 0:D,anchorX:a,anchorY:c,children:A},F)})})},gr=w.createContext({strict:!1}),ts={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 ns=!1;function fu(){if(ns)return;const e={};for(const t in ts)e[t]={isEnabled:n=>ts[t].some(i=>!!n[i])};Uo(e),ns=!0}function xr(){return fu(),Zc()}function hu(e){const t=xr();for(const n in e)t[n]={...t[n],...e[n]};Uo(t)}const pu=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 gt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pu.has(e)}let yr=e=>!gt(e);function mu(e){typeof e=="function"&&(yr=t=>t.startsWith("on")?!gt(t):e(t))}try{mu(require("@emotion/is-prop-valid").default)}catch{}function gu(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||H(e[s])||(yr(s)||n===!0&&gt(s)||!t&&!gt(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const wt=w.createContext({});function xu(e,t){if(St(e)){const{initial:n,animate:i}=e;return{initial:n===!1||_e(n)?n:void 0,animate:_e(i)?i:void 0}}return e.inherit!==!1?t:{}}function yu(e){const{initial:t,animate:n}=xu(e,w.useContext(wt));return w.useMemo(()=>({initial:t,animate:n}),[is(t),is(n)])}function is(e){return Array.isArray(e)?e.join(" "):e}const _n=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function br(e,t,n){for(const i in t)!H(t[i])&&!Jo(i,n)&&(e[i]=t[i])}function bu({transformTemplate:e},t){return w.useMemo(()=>{const n=_n();return Wn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function vu(e,t){const n=e.style||{},i={};return br(i,n,e),Object.assign(i,bu(e,t)),i}function Su(e,t){const n={},i=vu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const vr=()=>({..._n(),attrs:{}});function wu(e,t,n,i){const s=w.useMemo(()=>{const r=vr();return Qo(r,t,tr(i),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};br(r,e.style,e),s.style={...r,...s.style}}return s}const Cu=["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 $n(e){return typeof e!="string"||e.includes("-")?!1:!!(Cu.indexOf(e)>-1||/[A-Z]/u.test(e))}function Tu(e,t,n,{latestValues:i},s,r=!1,o){const c=(o??$n(e)?wu:Su)(t,i,s,e),u=gu(t,typeof e=="string",r),d=e!==w.Fragment?{...u,...c,ref:n}:{},{children:f}=t,h=w.useMemo(()=>H(f)?f.get():f,[f]);return w.createElement(e,{...d,children:h})}function Fu({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:ju(n,i,s,e),renderState:t()}}function ju(e,t,n,i){const s={},r=i(e,{});for(const h in r)s[h]=rt(r[h]);let{initial:o,animate:a}=e;const c=St(e),u=_o(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;if(f&&typeof f!="boolean"&&!vt(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const g=En(e,h[m]);if(g){const{transitionEnd:x,transition:y,...b}=g;for(const v in b){let S=b[v];if(Array.isArray(S)){const T=d?S.length-1:0;S=S[T]}S!==null&&(s[v]=S)}for(const v in x)s[v]=x[v]}}}return s}const Sr=e=>(t,n)=>{const i=w.useContext(wt),s=w.useContext(yt),r=()=>Fu(e,t,i,s);return n?r():xn(r)},ku=Sr({scrapeMotionValuesFromProps:Hn,createRenderState:_n}),Bu=Sr({scrapeMotionValuesFromProps:nr,createRenderState:vr}),Au=Symbol.for("motionComponentSymbol");function Du(e,t,n){const i=w.useRef(n);w.useInsertionEffect(()=>{i.current=n});const s=w.useRef(null);return w.useCallback(r=>{var a;r&&((a=e.onMount)==null||a.call(e,r));const o=i.current;if(typeof o=="function")if(r){const c=o(r);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):o(r);else o&&(o.current=r);t&&(r?t.mount(r):t.unmount())},[t])}const wr=w.createContext({});function Fe(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pu(e,t,n,i,s,r){var S,T;const{visualElement:o}=w.useContext(wt),a=w.useContext(gr),c=w.useContext(yt),u=w.useContext(Nn),d=u.reducedMotion,f=u.skipAnimations,h=w.useRef(null),m=w.useRef(!1);i=i||a.renderer,!h.current&&i&&(h.current=i(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:r}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,x=w.useContext(wr);g&&!g.projection&&s&&(g.type==="html"||g.type==="svg")&&Eu(h.current,n,s,x);const y=w.useRef(!1);w.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const b=n[Do],v=w.useRef(!!b&&typeof window<"u"&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,b))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,b)));return Hs(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),v.current&&g.animationState&&g.animationState.animateChanges())}),w.useEffect(()=>{g&&(!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,b)}),v.current=!1),g.enteringChildren=void 0)}),g}function Eu(e,t,n,i){const{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Cr(e.parent)),e.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&Fe(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:i,crossfade:f,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function Cr(e){if(e)return e.options.allowProjection!==!1?e.projection:Cr(e.parent)}function It(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&&hu(i);const r=n?n==="svg":$n(e),o=r?Bu:ku;function a(u,d){let f;const h={...w.useContext(Nn),...u,layoutId:Mu(u)},{isStatic:m}=h,g=yu(u),x=o(u,m);if(!m&&typeof window<"u"){Ru(h,i);const y=Vu(h);f=y.MeasureLayout,g.visualElement=Pu(e,x,h,s,y.ProjectionNode,r)}return l.jsxs(wt.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,Tu(e,u,Du(x,g.visualElement,d),x,m,t,r)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(a);return c[Au]=e,c}function Mu({layoutId:e}){const t=w.useContext(gn).id;return t&&e!==void 0?t+"-"+e:e}function Ru(e,t){const n=w.useContext(gr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ee(!1,i,"lazy-strict-mode"):oe(!1,i,"lazy-strict-mode")}}function Vu(e){const t=xr(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(e)||i!=null&&i.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Lu(e,t){if(typeof Proxy>"u")return It;const n=new Map,i=(r,o)=>It(r,o,e,t),s=(r,o)=>(process.env.NODE_ENV!=="production"&&vn(!1,"motion() is deprecated. Use motion.create() instead."),i(r,o));return new Proxy(s,{get:(r,o)=>o==="create"?i:(n.has(o)||n.set(o,It(o,void 0,e,t)),n.get(o))})}const Iu=(e,t)=>t.isSVG??$n(e)?new hd(t):new ad(t,{allowProjection:e!==w.Fragment});class zu extends fe{constructor(t){super(t),t.animationState||(t.animationState=yd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vt(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 Ou=0;class Wu extends fe{constructor(){super(...arguments),this.id=Ou++,this.isExitComplete=!1}update(){var r;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&i===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const c=Se(this.node,o,a);if(c){const{transition:u,transitionEnd:d,...f}=c;for(const h in f)(r=this.node.getValue(h))==null||r.jump(f[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.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 Hu={animation:{Feature:zu},exit:{Feature:Wu}};function Ye(e){return{point:{x:e.pageX,y:e.pageY}}}const Nu=e=>t=>Ln(t)&&e(t,Ye(t));function We(e,t,n,i){return $e(e,t,Nu(n),i)}const Tr=({current:e})=>e?e.ownerDocument.defaultView:null,ss=(e,t)=>Math.abs(e-t);function _u(e,t){const n=ss(e.x,t.x),i=ss(e.y,t.y);return Math.sqrt(n**2+i**2)}const os=new Set(["auto","scroll"]);class Fr{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){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=Je(this.lastRawMoveEventInfo,this.transformPagePoint));const m=zt(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=_u(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:y}=m,{timestamp:b}=W;this.history.push({...y,timestamp:b});const{onStart:v,onMove:S}=this.handlers;g||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Je(g,this.transformPagePoint),M.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 v=zt(m.type==="pointercancel"?this.lastMoveEventInfo:Je(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,v),y&&y(m,v)},!Ln(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=s||window;const c=Ye(t),u=Je(c,this.transformPagePoint),{point:d}=u,{timestamp:f}=W;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,zt(u,this.history)),this.removeListeners=Ue(We(this.contextWindow,"pointermove",this.handlePointerMove),We(this.contextWindow,"pointerup",this.handlePointerUp),We(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(os.has(i.overflowX)||os.has(i.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 i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:s.x-n.x,y:s.y-n.y};r.x===0&&r.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,s),M.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ue(this.updatePoint)}}function Je(e,t){return t?{point:t(e.point)}:e}function rs(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zt({point:e},t){return{point:e,delta:rs(e,jr(t)),offset:rs(e,$u(t)),velocity:Uu(t,.1)}}function $u(e){return e[0]}function jr(e){return e[e.length-1]}function Uu(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=jr(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>$(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>$(t)*2&&(i=e[1]);const r=X(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ku(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?R(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?R(n,e,i.max):Math.min(e,n)),e}function as(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 Gu(e,{top:t,left:n,bottom:i,right:s}){return{x:as(e.x,n,s),y:as(e.y,t,i)}}function ls(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function Yu(e,t){return{x:ls(e.x,t.x),y:ls(e.y,t.y)}}function Xu(e,t){let n=.5;const i=_(e),s=_(t);return s>i?n=He(t.min,t.max-i,e.min):i>s&&(n=He(e.min,e.max-s,t.min)),se(0,1,n)}function Zu(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 hn=.35;function qu(e=hn){return e===!1?e=0:e===!0&&(e=hn),{x:cs(e,"left","right"),y:cs(e,"top","bottom")}}function cs(e,t,n){return{min:ds(e,t),max:ds(e,n)}}function ds(e,t){return typeof e=="number"?e:e[t]||0}const Ju=new WeakMap;class Qu{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=z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const r=f=>{n&&this.snapToCursor(Ye(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:m,dragPropagation:g,onDragStart:x}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jc(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),te(b=>{let v=this.getAxisMotionValue(b).get()||0;if(ie.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const T=S.layout.layoutBox[b];T&&(v=_(T)*(parseFloat(v)/100))}}this.originPoint[b]=v}),x&&M.update(()=>x(f,h),!1,!0),sn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:x,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=h;if(g&&this.currentDirection===null){this.currentDirection=tf(b),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",h.point,b),this.updateAxis("y",h.point,b),this.visualElement.render(),y&&M.update(()=>y(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new Fr(t,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:i,contextWindow:Tr(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!s||!i)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&M.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&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,i){const{drag:s}=this.getProps();if(!i||!Qe(t,s,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(o=Ku(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,s=this.constraints;t&&Fe(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Gu(i.layoutBox,t):this.constraints=!1,this.elastic=qu(n),s!==this.constraints&&!Fe(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&te(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Zu(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fe(t))return!1;const i=t.current;oe(i!==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:s}=this.visualElement;if(!s||!s.layout)return!1;const r=td(i,s.root,this.visualElement.getTransformPagePoint());let o=Yu(s.layout.layoutBox,r);if(n){const a=n(Jc(o));this.hasMutatedConstraints=!!a,a&&(o=Go(a))}return o}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=te(d=>{if(!Qe(d,n,this.currentDirection))return;let f=c&&c[d]||{};(o===!0||o===d)&&(f={min:0,max:0});const h=s?200:1e6,m=s?40:1e7,g={type:"inertia",velocity:i?t[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return sn(this.visualElement,t),i.start(Pn(t,i,0,n,this.visualElement,!1))}stopAnimation(){te(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){te(n=>{const{drag:i}=this.getProps();if(!Qe(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],c=r.get()||0;r.set(t[n]-R(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Fe(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};te(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();s[o]=Xu({min:c,max:c},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),te(o=>{if(!Qe(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];a.set(R(c,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ju.set(this.visualElement,this);const t=this.visualElement.current,n=We(t,"pointerdown",u=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=u.target,m=h!==t&&Ec(h);d&&f&&!m&&this.start(u)});let i;const s=()=>{const{dragConstraints:u}=this.getProps();Fe(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),i||(i=ef(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M.read(s);const a=$e(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(te(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),c&&c(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:o=hn,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function us(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function ef(e,t,n){const i=xi(e,us(n)),s=xi(t,us(n));return()=>{i(),s()}}function Qe(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function tf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class nf extends fe{constructor(t){super(t),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Qu(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Z}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 Ot=e=>(t,n)=>{e&&M.update(()=>e(t,n),!1,!0)};class sf extends fe{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(t){this.session=new Fr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Tr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ot(t),onStart:Ot(n),onMove:Ot(i),onEnd:(r,o)=>{delete this.session,s&&M.postRender(()=>s(r,o))}}}mount(){this.removePointerDownListener=We(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 Wt=!1;class of extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=t;r&&(n.group&&n.group.add(r),i&&i.register&&s&&i.register(r),Wt&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),at.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:r}=this.props,{projection:o}=i;return o&&(o.isPresent=r,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Wt=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=n,i.root.didUpdate(),Vn.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;Wt=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function kr(e){const[t,n]=mr(),i=w.useContext(gn);return l.jsx(of,{...e,layoutGroup:i,switchLayoutGroup:w.useContext(wr),isPresent:t,safeToRemove:n})}const rf={pan:{Feature:sf},drag:{Feature:nf,ProjectionNode:pr,MeasureLayout:kr}};function fs(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,r=i[s];r&&M.postRender(()=>r(t,Ye(t)))}class af extends fe{mount(){const{current:t}=this.node;t&&(this.unmount=Bc(t,(n,i)=>(fs(this.node,i,"Start"),s=>fs(this.node,s,"End"))))}unmount(){}}class lf extends fe{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=Ue($e(this.node.current,"focus",()=>this.onFocus()),$e(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function hs(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),r=i[s];r&&M.postRender(()=>r(t,Ye(t)))}class cf extends fe{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=Rc(t,(s,r)=>(hs(this.node,r,"Start"),(o,{success:a})=>hs(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const pn=new WeakMap,Ht=new WeakMap,df=e=>{const t=pn.get(e.target);t&&t(e)},uf=e=>{e.forEach(df)};function ff({root:e,...t}){const n=e||document;Ht.has(n)||Ht.set(n,{});const i=Ht.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(uf,{root:e,...t})),i[s]}function hf(e,t,n){const i=ff(t);return pn.set(e,n),i.observe(e),()=>{pn.delete(e),i.unobserve(e)}}const pf={some:0,all:1};class mf extends fe{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:i,amount:s="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:pf[s]},a=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,r&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),m=d?f:h;m&&m(u)};this.stopObserver=hf(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(gf(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function gf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xf={inView:{Feature:mf},tap:{Feature:cf},focus:{Feature:lf},hover:{Feature:af}},yf={layout:{ProjectionNode:pr,MeasureLayout:kr}},bf={...Hu,...xf,...rf,...yf},Ce=Lu(bf,Iu),Br=[0,0,.2,1],vf=[.4,0,1,1],Sf=[.22,1,.36,1],wf={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Sf}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:vf}}},Cf={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Tf={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Br}}},Ff={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Br,delay:.18}}},jf=()=>l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),l.jsx("polyline",{points:"7 7 17 7 17 17"})]}),kf=()=>l.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),l.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Bf=()=>l.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),l.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"})]}),Af=(e,t)=>l.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function Nt({href:e,children:t,target:n,rel:i}){return e?l.jsx("a",{href:e,target:n,rel:i,style:{textDecoration:"none",display:"contents"},children:t}):l.jsx(l.Fragment,{children:t})}function Df({logo:e,navItems:t=[],ctaLabel:n="Get Started",ctaHref:i,onCtaClick:s,ctaIconHref:r,onCtaIconClick:o,secondaryCtaLabel:a,secondaryCtaHref:c,onSecondaryCtaClick:u,ctaSlot:d,renderLink:f=Af,isSticky:h=!1,variant:m="solid",...g}){const[x,y]=w.useState(!1),b=r??i,v=o??s,S=m==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},T=({mobile:C=!1})=>l.jsxs(p.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:C?"column":"row",children:[a&&l.jsx(Nt,{href:c,children:l.jsx(be,{variant:C?"outline":"ghost",colorScheme:"blue",size:C?"md":"sm",onClick:()=>{u==null||u(),C&&y(!1)},style:C?{width:"100%"}:void 0,children:a})}),l.jsx(Nt,{href:i,children:l.jsx(be,{variant:"solid",colorScheme:"blue",size:C?"md":"sm",onClick:()=>{s==null||s(),C&&y(!1)},style:C?{width:"100%"}:void 0,children:n})}),!C&&l.jsx(Nt,{href:b,target:b&&b!==i?"_blank":void 0,rel:b&&b!==i?"noopener noreferrer":void 0,children:l.jsx(be,{variant:"solid",colorScheme:"blue",size:"sm",onClick:v,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:l.jsx(jf,{})})})]});return l.jsxs(p.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:h?"sticky":"relative",top:h?"0":void 0,zIndex:h?"sticky":void 0,bg:m==="transparent"?"transparent":m==="blur"?void 0:"bg",style:S,borderBottom:"1px solid",borderColor:m==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...g,children:[l.jsxs(p.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[l.jsx(p.Box,{flexShrink:0,children:e??l.jsx(Ds,{height:28})}),l.jsx(p.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map(C=>l.jsx(p.Box,{as:"li",children:f(C,l.jsx(p.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:C.isActive?"blue.500":"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:"blue.500",bg:"blue.50"},_dark:{_hover:{bg:"rgba(6,133,255,0.10)"}},cursor:"pointer",children:C.label}))},C.href))}),l.jsx(p.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:d??l.jsx(T,{})}),l.jsx(p.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>y(!x),"aria-label":x?"Close menu":"Open menu","aria-expanded":x,style:{flexShrink:0,position:"relative",width:32,height:32},children:l.jsx(es,{mode:"wait",initial:!1,children:x?l.jsx(Ce.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:l.jsx(Bf,{})},"close"):l.jsx(Ce.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:l.jsx(kf,{})},"hamburger")})})]}),l.jsx(es,{children:x&&l.jsx(Ce.div,{variants:wf,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:l.jsxs(p.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[l.jsx(Ce.ul,{variants:Cf,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(C=>l.jsx(Ce.li,{variants:Tf,children:f(C,l.jsx(p.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:C.isActive?"blue.500":"text.body",borderRadius:"md",_hover:{color:"blue.500",bg:"bg.subtle"},cursor:"pointer",onClick:()=>y(!1),children:C.label}))},C.href))}),l.jsx(Ce.div,{variants:Ff,initial:"hidden",animate:"visible",children:l.jsx(p.Box,{mt:"4",children:d??l.jsx(T,{mobile:!0})})})]})},"mobile-menu")})]})}const Pf=l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"m9 18 6-6-6-6"})}),Ef=(e,t)=>e.href?l.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):l.jsx(l.Fragment,{children:t});function Mf({items:e,separator:t=Pf,renderLink:n=Ef,...i}){return l.jsx(p.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",alignItems:"center",gap:"1.5",...i,children:e.map((s,r)=>{const o=r===e.length-1;return l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(s,l.jsx(p.Box,{as:"span",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:o?"medium":"normal",color:o?"text.heading":"text.muted",_hover:o?void 0:{color:"blue.500"},cursor:!o&&s.href?"pointer":"default",transition:"color 0.15s",children:s.label})),!o&&l.jsx(p.Box,{color:"text.muted",display:"flex",alignItems:"center",children:t})]},r)})})}const Rf={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function Vf({tabs:e,defaultActiveId:t,activeId:n,onChange:i,variant:s="line",size:r="md",renderContent:o=!0,...a}){var g;const[c,u]=w.useState(t??((g=e[0])==null?void 0:g.id)),d=n??c,f=x=>{u(x),i==null||i(x)},h=e.find(x=>x.id===d),m=Rf[r];return l.jsxs(p.Box,{...a,children:[l.jsx(p.Box,{role:"tablist",display:"flex",gap:s==="pill"?"1":"0",borderBottom:s==="line"?"1px solid":"none",borderColor:"border",bg:s==="pill"?"bg.subtle":"transparent",p:s==="pill"?"1":"0",borderRadius:s==="pill"?"md":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(x=>{const y=x.id===d;return l.jsxs(p.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",px:m.px,py:m.py,fontFamily:"var(--font-body)",fontWeight:y?"semibold":"medium",fontSize:m.fontSize,color:x.disabled?"text.muted":y?"blue.500":"text.body",cursor:x.disabled?"not-allowed":"pointer",opacity:x.disabled?.5:1,transition:"all 0.15s",whiteSpace:"nowrap",flexShrink:0,bg:s==="pill"&&y?"bg":"transparent",borderRadius:s==="pill"?"md":"none",boxShadow:s==="pill"&&y?"sm":"none",borderBottom:s==="line"?"2px solid":"none",borderColor:s==="line"?y?"blue.500":"transparent":void 0,mb:s==="line"?"-1px":"0",_hover:x.disabled?void 0:s==="line"?{color:"blue.500"}:{bg:"bg"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:"sm"},children:[x.label,x.badge!==void 0&&l.jsx(p.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:y?"blue.100":"bg.subtle",color:y?"blue.700":"text.muted",children:x.badge})]},x.id)})}),o&&(h==null?void 0:h.content)&&l.jsx(p.Box,{role:"tabpanel",mt:"4",children:h.content})]})}function Lf(e,t,n){if(n*2+5>=t)return Array.from({length:t},(c,u)=>u+1);const s=Math.max(e-n,1),r=Math.min(e+n,t),o=s>2,a=r<t-2;if(!o&&a){const c=3+2*n;return[...Array.from({length:c},(u,d)=>d+1),"...",t]}if(o&&!a){const c=3+2*n;return[1,"...",...Array.from({length:c},(u,d)=>t-c+1+d)]}return[1,"...",...Array.from({length:r-s+1},(c,u)=>s+u),"...",t]}function If({total:e,pageSize:t=10,currentPage:n=1,onChange:i,siblingCount:s=1,showEdges:r=!0,compact:o=!1,...a}){const c=Math.ceil(e/t);if(c<=1)return null;const u=Lf(n,c,s),d={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",border:"1px solid",userSelect:"none"},f=({children:h,disabled:m,onClick:g,label:x})=>l.jsx(p.Box,{as:"button",...d,borderColor:"border",bg:"bg.surface",color:m?"text.muted":"text.body",opacity:m?.4:1,pointerEvents:m?"none":void 0,onClick:g,"aria-label":x,_hover:{borderColor:"blue.400",color:"blue.500"},children:h});return l.jsxs(p.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"1",flexWrap:"wrap",...a,children:[r&&l.jsx(f,{disabled:n===1,onClick:()=>i==null?void 0:i(1),label:"First page",children:"«"}),l.jsx(f,{disabled:n===1,onClick:()=>i==null?void 0:i(n-1),label:"Previous page",children:"‹"}),!o&&u.map((h,m)=>h==="..."?l.jsx(p.Box,{...d,border:"none",bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${m}`):l.jsx(p.Box,{as:"button",...d,borderColor:n===h?"blue.500":"border",bg:n===h?"blue.500":"bg.surface",color:n===h?"white":"text.body",onClick:()=>i==null?void 0:i(h),"aria-label":`Page ${h}`,"aria-current":n===h?"page":void 0,_hover:n!==h?{borderColor:"blue.400",color:"blue.500"}:void 0,children:h},h)),o&&l.jsxs(p.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",c]}),l.jsx(f,{disabled:n===c,onClick:()=>i==null?void 0:i(n+1),label:"Next page",children:"›"}),r&&l.jsx(f,{disabled:n===c,onClick:()=>i==null?void 0:i(c),label:"Last page",children:"»"})]})}const ps=l.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:l.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function zf({steps:e,currentStep:t,variant:n="default",orientation:i="horizontal",colorScheme:s="blue",...r}){const o=s==="blue"?"#0685FF":"#7700CC",a=s==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return i==="vertical"?l.jsx(p.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...r,children:e.map((u,d)=>{const f=d+1<t,h=d+1===t,m=d===e.length-1,g=f||h?o:"var(--chakra-colors-border, #E2E8F0)";return l.jsxs(p.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[l.jsx(p.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:f||h?o:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:f?ps:u.icon??d+1}),!m&&l.jsx(p.Box,{w:"2px",flex:"1",minH:"8",bg:f?o:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&l.jsxs(p.Box,{pt:"1",pb:m?"0":"8",children:[l.jsx(p.Box,{fontSize:"sm",fontWeight:h?"semibold":"medium",color:f||h?o:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:u.title}),u.description&&l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u.description})]})]},u.id)})}):l.jsx(p.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...r,children:e.map((u,d)=>{const f=d+1<t,h=d+1===t,m=d+1>t,g=d===e.length-1,x=m?"bg.subtle":o,y=f?ps:u.icon?u.icon:l.jsx(p.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:d+1}),b=!m&&n!=="compact",v=m?"text.muted":o;return l.jsxs(w.Fragment,{children:[l.jsx(p.Box,{role:"listitem","aria-current":h?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:l.jsxs(p.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:b?"2":"0",py:b?"1.5":"0",bg:b?a:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[l.jsx(p.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"&&l.jsx(p.Box,{as:"span",fontSize:"sm",fontWeight:h||f?"semibold":"medium",fontFamily:"var(--font-body)",color:v,whiteSpace:"nowrap",transition:"color 0.25s",children:u.title})]})}),!g&&l.jsx(p.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:l.jsx(p.Box,{h:"1.5px",w:"10",bg:f?o:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},u.id)})})}const Of={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:"✕"}},Ar=w.forwardRef(({status:e="info",variant:t="subtle",title:n,description:i,icon:s,onClose:r,closable:o=!1,children:a,...c},u)=>{const d=Of[e],f=t==="solid"?d.color:d.bg,h=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${d.color}`:void 0,g=t==="subtle"?`1px solid ${d.border}`:void 0;return l.jsxs(p.Box,{ref:u,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:f,border:g,borderLeft:m,color:h,...c,children:[l.jsx(p.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":d.color,color:"white",mt:"0.5",children:s??d.icon}),l.jsxs(p.Box,{flex:"1",children:[n&&l.jsx(p.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":d.color,children:n}),i&&l.jsx(p.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:i}),a]}),o&&l.jsx(p.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:r,"aria-label":"Dismiss alert",children:"×"})]})});Ar.displayName="MedixAlert";const Wf=`
185
+ `),()=>{var P;(P=a.current)==null||P.removeAttribute("data-motion-pop-id"),k.contains(C)&&k.removeChild(C)}},[t]),l.jsx(lu,{isPresent:t,childRef:a,sizeRef:c,pop:r,children:r===!1?e:L.cloneElement(e,{ref:f})})}const du=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:c,root:u})=>{const d=xn(uu),f=w.useId();let h=!0,m=w.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:s,onExitComplete:g=>{d.set(g,!0);for(const x of d.values())if(!x)return;i&&i()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,i]);return r&&h&&(m={...m}),w.useMemo(()=>{d.forEach((g,x)=>d.set(x,!1))},[n]),L.useEffect(()=>{!n&&!d.size&&i&&i()},[n]),e=l.jsx(cu,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:e}),l.jsx(yt.Provider,{value:m,children:e})};function uu(){return new Map}function xr(e=!0){const t=w.useContext(yt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,r=w.useId();w.useEffect(()=>{if(e)return s(r)},[e]);const o=w.useCallback(()=>e&&i&&i(r),[r,i,e]);return!n&&i?[!1,o]:[!0]}const qe=e=>e.key||"";function ts(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const ns=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:c="top",root:u})=>{const[d,f]=xr(o),h=w.useMemo(()=>ts(e),[e]),m=o&&!d?[]:h.map(qe),g=w.useRef(!0),x=w.useRef(h),y=xn(()=>new Map),b=w.useRef(new Set),[v,S]=w.useState(h),[T,C]=w.useState(h);_s(()=>{g.current=!1,x.current=h;for(let A=0;A<T.length;A++){const F=qe(T[A]);m.includes(F)?(y.delete(F),b.current.delete(F)):y.get(F)!==!0&&y.set(F,!1)}},[T,m.length,m.join("-")]);const k=[];if(h!==v){let A=[...h];for(let F=0;F<T.length;F++){const j=T[F],D=qe(j);m.includes(D)||(A.splice(F,0,j),k.push(j))}return r==="wait"&&k.length&&(A=k),C(ts(A)),S(h),null}process.env.NODE_ENV!=="production"&&r==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:P}=w.useContext(gn);return l.jsx(l.Fragment,{children:T.map(A=>{const F=qe(A),j=o&&!d?!1:h===T||m.includes(F),D=()=>{if(b.current.has(F))return;if(y.has(F))b.current.add(F),y.set(F,!0);else return;let E=!0;y.forEach(U=>{U||(E=!1)}),E&&(P==null||P(),C(x.current),o&&(f==null||f()),i&&i())};return l.jsx(du,{isPresent:j,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:r,root:u,onExitComplete:j?void 0:D,anchorX:a,anchorY:c,children:A},F)})})},yr=w.createContext({strict:!1}),is={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 ss=!1;function fu(){if(ss)return;const e={};for(const t in is)e[t]={isEnabled:n=>is[t].some(i=>!!n[i])};Go(e),ss=!0}function br(){return fu(),Zc()}function hu(e){const t=br();for(const n in e)t[n]={...t[n],...e[n]};Go(t)}const pu=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 gt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pu.has(e)}let vr=e=>!gt(e);function mu(e){typeof e=="function"&&(vr=t=>t.startsWith("on")?!gt(t):e(t))}try{mu(require("@emotion/is-prop-valid").default)}catch{}function gu(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||H(e[s])||(vr(s)||n===!0&&gt(s)||!t&&!gt(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const wt=w.createContext({});function xu(e,t){if(St(e)){const{initial:n,animate:i}=e;return{initial:n===!1||_e(n)?n:void 0,animate:_e(i)?i:void 0}}return e.inherit!==!1?t:{}}function yu(e){const{initial:t,animate:n}=xu(e,w.useContext(wt));return w.useMemo(()=>({initial:t,animate:n}),[os(t),os(n)])}function os(e){return Array.isArray(e)?e.join(" "):e}const _n=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Sr(e,t,n){for(const i in t)!H(t[i])&&!er(i,n)&&(e[i]=t[i])}function bu({transformTemplate:e},t){return w.useMemo(()=>{const n=_n();return Wn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function vu(e,t){const n=e.style||{},i={};return Sr(i,n,e),Object.assign(i,bu(e,t)),i}function Su(e,t){const n={},i=vu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const wr=()=>({..._n(),attrs:{}});function wu(e,t,n,i){const s=w.useMemo(()=>{const r=wr();return tr(r,t,ir(i),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};Sr(r,e.style,e),s.style={...r,...s.style}}return s}const Cu=["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 $n(e){return typeof e!="string"||e.includes("-")?!1:!!(Cu.indexOf(e)>-1||/[A-Z]/u.test(e))}function Tu(e,t,n,{latestValues:i},s,r=!1,o){const c=(o??$n(e)?wu:Su)(t,i,s,e),u=gu(t,typeof e=="string",r),d=e!==w.Fragment?{...u,...c,ref:n}:{},{children:f}=t,h=w.useMemo(()=>H(f)?f.get():f,[f]);return w.createElement(e,{...d,children:h})}function Fu({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:ju(n,i,s,e),renderState:t()}}function ju(e,t,n,i){const s={},r=i(e,{});for(const h in r)s[h]=rt(r[h]);let{initial:o,animate:a}=e;const c=St(e),u=Uo(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;if(f&&typeof f!="boolean"&&!vt(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const g=En(e,h[m]);if(g){const{transitionEnd:x,transition:y,...b}=g;for(const v in b){let S=b[v];if(Array.isArray(S)){const T=d?S.length-1:0;S=S[T]}S!==null&&(s[v]=S)}for(const v in x)s[v]=x[v]}}}return s}const Cr=e=>(t,n)=>{const i=w.useContext(wt),s=w.useContext(yt),r=()=>Fu(e,t,i,s);return n?r():xn(r)},ku=Cr({scrapeMotionValuesFromProps:Hn,createRenderState:_n}),Bu=Cr({scrapeMotionValuesFromProps:sr,createRenderState:wr}),Au=Symbol.for("motionComponentSymbol");function Du(e,t,n){const i=w.useRef(n);w.useInsertionEffect(()=>{i.current=n});const s=w.useRef(null);return w.useCallback(r=>{var a;r&&((a=e.onMount)==null||a.call(e,r));const o=i.current;if(typeof o=="function")if(r){const c=o(r);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):o(r);else o&&(o.current=r);t&&(r?t.mount(r):t.unmount())},[t])}const Tr=w.createContext({});function Fe(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pu(e,t,n,i,s,r){var S,T;const{visualElement:o}=w.useContext(wt),a=w.useContext(yr),c=w.useContext(yt),u=w.useContext(Nn),d=u.reducedMotion,f=u.skipAnimations,h=w.useRef(null),m=w.useRef(!1);i=i||a.renderer,!h.current&&i&&(h.current=i(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:r}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,x=w.useContext(Tr);g&&!g.projection&&s&&(g.type==="html"||g.type==="svg")&&Eu(h.current,n,s,x);const y=w.useRef(!1);w.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const b=n[Eo],v=w.useRef(!!b&&typeof window<"u"&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,b))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,b)));return _s(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),v.current&&g.animationState&&g.animationState.animateChanges())}),w.useEffect(()=>{g&&(!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,b)}),v.current=!1),g.enteringChildren=void 0)}),g}function Eu(e,t,n,i){const{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Fr(e.parent)),e.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&Fe(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:i,crossfade:f,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function Fr(e){if(e)return e.options.allowProjection!==!1?e.projection:Fr(e.parent)}function It(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&&hu(i);const r=n?n==="svg":$n(e),o=r?Bu:ku;function a(u,d){let f;const h={...w.useContext(Nn),...u,layoutId:Mu(u)},{isStatic:m}=h,g=yu(u),x=o(u,m);if(!m&&typeof window<"u"){Ru(h,i);const y=Vu(h);f=y.MeasureLayout,g.visualElement=Pu(e,x,h,s,y.ProjectionNode,r)}return l.jsxs(wt.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,Tu(e,u,Du(x,g.visualElement,d),x,m,t,r)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(a);return c[Au]=e,c}function Mu({layoutId:e}){const t=w.useContext(gn).id;return t&&e!==void 0?t+"-"+e:e}function Ru(e,t){const n=w.useContext(yr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ee(!1,i,"lazy-strict-mode"):oe(!1,i,"lazy-strict-mode")}}function Vu(e){const t=br(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(e)||i!=null&&i.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Lu(e,t){if(typeof Proxy>"u")return It;const n=new Map,i=(r,o)=>It(r,o,e,t),s=(r,o)=>(process.env.NODE_ENV!=="production"&&vn(!1,"motion() is deprecated. Use motion.create() instead."),i(r,o));return new Proxy(s,{get:(r,o)=>o==="create"?i:(n.has(o)||n.set(o,It(o,void 0,e,t)),n.get(o))})}const Iu=(e,t)=>t.isSVG??$n(e)?new hd(t):new ad(t,{allowProjection:e!==w.Fragment});class zu extends fe{constructor(t){super(t),t.animationState||(t.animationState=yd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vt(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 Ou=0;class Wu extends fe{constructor(){super(...arguments),this.id=Ou++,this.isExitComplete=!1}update(){var r;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&i===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const c=Se(this.node,o,a);if(c){const{transition:u,transitionEnd:d,...f}=c;for(const h in f)(r=this.node.getValue(h))==null||r.jump(f[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.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 Hu={animation:{Feature:zu},exit:{Feature:Wu}};function Ye(e){return{point:{x:e.pageX,y:e.pageY}}}const Nu=e=>t=>Ln(t)&&e(t,Ye(t));function We(e,t,n,i){return $e(e,t,Nu(n),i)}const jr=({current:e})=>e?e.ownerDocument.defaultView:null,rs=(e,t)=>Math.abs(e-t);function _u(e,t){const n=rs(e.x,t.x),i=rs(e.y,t.y);return Math.sqrt(n**2+i**2)}const as=new Set(["auto","scroll"]);class kr{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){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=Je(this.lastRawMoveEventInfo,this.transformPagePoint));const m=zt(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=_u(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:y}=m,{timestamp:b}=W;this.history.push({...y,timestamp:b});const{onStart:v,onMove:S}=this.handlers;g||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Je(g,this.transformPagePoint),M.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 v=zt(m.type==="pointercancel"?this.lastMoveEventInfo:Je(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,v),y&&y(m,v)},!Ln(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=s||window;const c=Ye(t),u=Je(c,this.transformPagePoint),{point:d}=u,{timestamp:f}=W;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,zt(u,this.history)),this.removeListeners=Ue(We(this.contextWindow,"pointermove",this.handlePointerMove),We(this.contextWindow,"pointerup",this.handlePointerUp),We(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(as.has(i.overflowX)||as.has(i.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 i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:s.x-n.x,y:s.y-n.y};r.x===0&&r.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,s),M.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ue(this.updatePoint)}}function Je(e,t){return t?{point:t(e.point)}:e}function ls(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zt({point:e},t){return{point:e,delta:ls(e,Br(t)),offset:ls(e,$u(t)),velocity:Uu(t,.1)}}function $u(e){return e[0]}function Br(e){return e[e.length-1]}function Uu(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=Br(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>$(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>$(t)*2&&(i=e[1]);const r=X(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ku(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?R(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?R(n,e,i.max):Math.min(e,n)),e}function cs(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 Gu(e,{top:t,left:n,bottom:i,right:s}){return{x:cs(e.x,n,s),y:cs(e.y,t,i)}}function ds(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function Yu(e,t){return{x:ds(e.x,t.x),y:ds(e.y,t.y)}}function Xu(e,t){let n=.5;const i=_(e),s=_(t);return s>i?n=He(t.min,t.max-i,e.min):i>s&&(n=He(e.min,e.max-s,t.min)),se(0,1,n)}function Zu(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 hn=.35;function qu(e=hn){return e===!1?e=0:e===!0&&(e=hn),{x:us(e,"left","right"),y:us(e,"top","bottom")}}function us(e,t,n){return{min:fs(e,t),max:fs(e,n)}}function fs(e,t){return typeof e=="number"?e:e[t]||0}const Ju=new WeakMap;class Qu{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=z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const r=f=>{n&&this.snapToCursor(Ye(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:m,dragPropagation:g,onDragStart:x}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jc(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),te(b=>{let v=this.getAxisMotionValue(b).get()||0;if(ie.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const T=S.layout.layoutBox[b];T&&(v=_(T)*(parseFloat(v)/100))}}this.originPoint[b]=v}),x&&M.update(()=>x(f,h),!1,!0),sn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:x,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=h;if(g&&this.currentDirection===null){this.currentDirection=tf(b),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",h.point,b),this.updateAxis("y",h.point,b),this.visualElement.render(),y&&M.update(()=>y(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new kr(t,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:i,contextWindow:jr(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!s||!i)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&M.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&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,i){const{drag:s}=this.getProps();if(!i||!Qe(t,s,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(o=Ku(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,s=this.constraints;t&&Fe(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Gu(i.layoutBox,t):this.constraints=!1,this.elastic=qu(n),s!==this.constraints&&!Fe(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&te(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Zu(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fe(t))return!1;const i=t.current;oe(i!==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:s}=this.visualElement;if(!s||!s.layout)return!1;const r=td(i,s.root,this.visualElement.getTransformPagePoint());let o=Yu(s.layout.layoutBox,r);if(n){const a=n(Jc(o));this.hasMutatedConstraints=!!a,a&&(o=Xo(a))}return o}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=te(d=>{if(!Qe(d,n,this.currentDirection))return;let f=c&&c[d]||{};(o===!0||o===d)&&(f={min:0,max:0});const h=s?200:1e6,m=s?40:1e7,g={type:"inertia",velocity:i?t[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return sn(this.visualElement,t),i.start(Pn(t,i,0,n,this.visualElement,!1))}stopAnimation(){te(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){te(n=>{const{drag:i}=this.getProps();if(!Qe(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],c=r.get()||0;r.set(t[n]-R(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Fe(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};te(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();s[o]=Xu({min:c,max:c},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),te(o=>{if(!Qe(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];a.set(R(c,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ju.set(this.visualElement,this);const t=this.visualElement.current,n=We(t,"pointerdown",u=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=u.target,m=h!==t&&Ec(h);d&&f&&!m&&this.start(u)});let i;const s=()=>{const{dragConstraints:u}=this.getProps();Fe(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),i||(i=ef(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M.read(s);const a=$e(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(te(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),c&&c(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:o=hn,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function hs(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function ef(e,t,n){const i=bi(e,hs(n)),s=bi(t,hs(n));return()=>{i(),s()}}function Qe(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function tf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class nf extends fe{constructor(t){super(t),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Qu(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Z}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 Ot=e=>(t,n)=>{e&&M.update(()=>e(t,n),!1,!0)};class sf extends fe{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(t){this.session=new kr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ot(t),onStart:Ot(n),onMove:Ot(i),onEnd:(r,o)=>{delete this.session,s&&M.postRender(()=>s(r,o))}}}mount(){this.removePointerDownListener=We(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 Wt=!1;class of extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=t;r&&(n.group&&n.group.add(r),i&&i.register&&s&&i.register(r),Wt&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),at.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:r}=this.props,{projection:o}=i;return o&&(o.isPresent=r,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Wt=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=n,i.root.didUpdate(),Vn.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;Wt=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ar(e){const[t,n]=xr(),i=w.useContext(gn);return l.jsx(of,{...e,layoutGroup:i,switchLayoutGroup:w.useContext(Tr),isPresent:t,safeToRemove:n})}const rf={pan:{Feature:sf},drag:{Feature:nf,ProjectionNode:gr,MeasureLayout:Ar}};function ps(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,r=i[s];r&&M.postRender(()=>r(t,Ye(t)))}class af extends fe{mount(){const{current:t}=this.node;t&&(this.unmount=Bc(t,(n,i)=>(ps(this.node,i,"Start"),s=>ps(this.node,s,"End"))))}unmount(){}}class lf extends fe{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=Ue($e(this.node.current,"focus",()=>this.onFocus()),$e(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ms(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),r=i[s];r&&M.postRender(()=>r(t,Ye(t)))}class cf extends fe{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=Rc(t,(s,r)=>(ms(this.node,r,"Start"),(o,{success:a})=>ms(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const pn=new WeakMap,Ht=new WeakMap,df=e=>{const t=pn.get(e.target);t&&t(e)},uf=e=>{e.forEach(df)};function ff({root:e,...t}){const n=e||document;Ht.has(n)||Ht.set(n,{});const i=Ht.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(uf,{root:e,...t})),i[s]}function hf(e,t,n){const i=ff(t);return pn.set(e,n),i.observe(e),()=>{pn.delete(e),i.unobserve(e)}}const pf={some:0,all:1};class mf extends fe{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:i,amount:s="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:pf[s]},a=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,r&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),m=d?f:h;m&&m(u)};this.stopObserver=hf(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(gf(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function gf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xf={inView:{Feature:mf},tap:{Feature:cf},focus:{Feature:lf},hover:{Feature:af}},yf={layout:{ProjectionNode:gr,MeasureLayout:Ar}},bf={...Hu,...xf,...rf,...yf},Ce=Lu(bf,Iu),Dr=[0,0,.2,1],vf=[.4,0,1,1],Sf=[.22,1,.36,1],wf={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Sf}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:vf}}},Cf={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Tf={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Dr}}},Ff={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Dr,delay:.18}}},jf=()=>l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),l.jsx("polyline",{points:"7 7 17 7 17 17"})]}),kf=()=>l.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),l.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Bf=()=>l.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),l.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"})]}),Af=(e,t)=>l.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function Nt({href:e,children:t,target:n,rel:i}){return e?l.jsx("a",{href:e,target:n,rel:i,style:{textDecoration:"none",display:"contents"},children:t}):l.jsx(l.Fragment,{children:t})}function Df({logo:e,navItems:t=[],ctaLabel:n="Get Started",ctaHref:i,onCtaClick:s,ctaIconHref:r,onCtaIconClick:o,secondaryCtaLabel:a,secondaryCtaHref:c,onSecondaryCtaClick:u,ctaSlot:d,renderLink:f=Af,isSticky:h=!1,variant:m="solid",...g}){const[x,y]=w.useState(!1),b=r??i,v=o??s,S=m==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},T=({mobile:C=!1})=>l.jsxs(p.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:C?"column":"row",children:[a&&l.jsx(Nt,{href:c,children:l.jsx(be,{variant:C?"outline":"ghost",colorScheme:"blue",size:C?"md":"sm",onClick:()=>{u==null||u(),C&&y(!1)},style:C?{width:"100%"}:void 0,children:a})}),l.jsx(Nt,{href:i,children:l.jsx(be,{variant:"solid",colorScheme:"blue",size:C?"md":"sm",onClick:()=>{s==null||s(),C&&y(!1)},style:C?{width:"100%"}:void 0,children:n})}),!C&&l.jsx(Nt,{href:b,target:b&&b!==i?"_blank":void 0,rel:b&&b!==i?"noopener noreferrer":void 0,children:l.jsx(be,{variant:"solid",colorScheme:"blue",size:"sm",onClick:v,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:l.jsx(jf,{})})})]});return l.jsxs(p.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:h?"sticky":"relative",top:h?"0":void 0,zIndex:h?"sticky":void 0,bg:m==="transparent"?"transparent":m==="blur"?void 0:"bg",style:S,borderBottom:"1px solid",borderColor:m==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...g,children:[l.jsxs(p.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[l.jsx(p.Box,{flexShrink:0,children:e??l.jsx(Es,{height:28})}),l.jsx(p.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map(C=>l.jsx(p.Box,{as:"li",children:f(C,l.jsx(p.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:C.isActive?"blue.500":"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:"blue.500",bg:"blue.50"},_dark:{_hover:{bg:"rgba(6,133,255,0.10)"}},cursor:"pointer",children:C.label}))},C.href))}),l.jsx(p.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:d??l.jsx(T,{})}),l.jsx(p.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>y(!x),"aria-label":x?"Close menu":"Open menu","aria-expanded":x,style:{flexShrink:0,position:"relative",width:32,height:32},children:l.jsx(ns,{mode:"wait",initial:!1,children:x?l.jsx(Ce.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:l.jsx(Bf,{})},"close"):l.jsx(Ce.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:l.jsx(kf,{})},"hamburger")})})]}),l.jsx(ns,{children:x&&l.jsx(Ce.div,{variants:wf,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:l.jsxs(p.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[l.jsx(Ce.ul,{variants:Cf,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(C=>l.jsx(Ce.li,{variants:Tf,children:f(C,l.jsx(p.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:C.isActive?"blue.500":"text.body",borderRadius:"md",_hover:{color:"blue.500",bg:"bg.subtle"},cursor:"pointer",onClick:()=>y(!1),children:C.label}))},C.href))}),l.jsx(Ce.div,{variants:Ff,initial:"hidden",animate:"visible",children:l.jsx(p.Box,{mt:"4",children:d??l.jsx(T,{mobile:!0})})})]})},"mobile-menu")})]})}const Pf=l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"m9 18 6-6-6-6"})}),Ef=(e,t)=>e.href?l.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):l.jsx(l.Fragment,{children:t});function Mf({items:e,separator:t=Pf,renderLink:n=Ef,...i}){return l.jsx(p.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",alignItems:"center",gap:"1.5",...i,children:e.map((s,r)=>{const o=r===e.length-1;return l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(s,l.jsx(p.Box,{as:"span",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:o?"medium":"normal",color:o?"text.heading":"text.muted",_hover:o?void 0:{color:"blue.500"},cursor:!o&&s.href?"pointer":"default",transition:"color 0.15s",children:s.label})),!o&&l.jsx(p.Box,{color:"text.muted",display:"flex",alignItems:"center",children:t})]},r)})})}const Rf={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function Vf({tabs:e,defaultActiveId:t,activeId:n,onChange:i,variant:s="line",size:r="md",renderContent:o=!0,...a}){var g;const[c,u]=w.useState(t??((g=e[0])==null?void 0:g.id)),d=n??c,f=x=>{u(x),i==null||i(x)},h=e.find(x=>x.id===d),m=Rf[r];return l.jsxs(p.Box,{...a,children:[l.jsx(p.Box,{role:"tablist",display:"flex",gap:s==="pill"?"1":"0",borderBottom:s==="line"?"1px solid":"none",borderColor:"border",bg:s==="pill"?"bg.subtle":"transparent",p:s==="pill"?"1":"0",borderRadius:s==="pill"?"md":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(x=>{const y=x.id===d;return l.jsxs(p.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",px:m.px,py:m.py,fontFamily:"var(--font-body)",fontWeight:y?"semibold":"medium",fontSize:m.fontSize,color:x.disabled?"text.muted":y?"blue.500":"text.body",cursor:x.disabled?"not-allowed":"pointer",opacity:x.disabled?.5:1,transition:"all 0.15s",whiteSpace:"nowrap",flexShrink:0,bg:s==="pill"&&y?"bg":"transparent",borderRadius:s==="pill"?"md":"none",boxShadow:s==="pill"&&y?"sm":"none",borderBottom:s==="line"?"2px solid":"none",borderColor:s==="line"?y?"blue.500":"transparent":void 0,mb:s==="line"?"-1px":"0",_hover:x.disabled?void 0:s==="line"?{color:"blue.500"}:{bg:"bg"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:"sm"},children:[x.label,x.badge!==void 0&&l.jsx(p.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:y?"blue.100":"bg.subtle",color:y?"blue.700":"text.muted",children:x.badge})]},x.id)})}),o&&(h==null?void 0:h.content)&&l.jsx(p.Box,{role:"tabpanel",mt:"4",children:h.content})]})}function Lf(e,t,n){if(n*2+5>=t)return Array.from({length:t},(c,u)=>u+1);const s=Math.max(e-n,1),r=Math.min(e+n,t),o=s>2,a=r<t-2;if(!o&&a){const c=3+2*n;return[...Array.from({length:c},(u,d)=>d+1),"...",t]}if(o&&!a){const c=3+2*n;return[1,"...",...Array.from({length:c},(u,d)=>t-c+1+d)]}return[1,"...",...Array.from({length:r-s+1},(c,u)=>s+u),"...",t]}function If({total:e,pageSize:t=10,currentPage:n=1,onChange:i,siblingCount:s=1,showEdges:r=!0,compact:o=!1,...a}){const c=Math.ceil(e/t);if(c<=1)return null;const u=Lf(n,c,s),d={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",border:"1px solid",userSelect:"none"},f=({children:h,disabled:m,onClick:g,label:x})=>l.jsx(p.Box,{as:"button",...d,borderColor:"border",bg:"bg.surface",color:m?"text.muted":"text.body",opacity:m?.4:1,pointerEvents:m?"none":void 0,onClick:g,"aria-label":x,_hover:{borderColor:"blue.400",color:"blue.500"},children:h});return l.jsxs(p.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"1",flexWrap:"wrap",...a,children:[r&&l.jsx(f,{disabled:n===1,onClick:()=>i==null?void 0:i(1),label:"First page",children:"«"}),l.jsx(f,{disabled:n===1,onClick:()=>i==null?void 0:i(n-1),label:"Previous page",children:"‹"}),!o&&u.map((h,m)=>h==="..."?l.jsx(p.Box,{...d,border:"none",bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${m}`):l.jsx(p.Box,{as:"button",...d,borderColor:n===h?"blue.500":"border",bg:n===h?"blue.500":"bg.surface",color:n===h?"white":"text.body",onClick:()=>i==null?void 0:i(h),"aria-label":`Page ${h}`,"aria-current":n===h?"page":void 0,_hover:n!==h?{borderColor:"blue.400",color:"blue.500"}:void 0,children:h},h)),o&&l.jsxs(p.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",c]}),l.jsx(f,{disabled:n===c,onClick:()=>i==null?void 0:i(n+1),label:"Next page",children:"›"}),r&&l.jsx(f,{disabled:n===c,onClick:()=>i==null?void 0:i(c),label:"Last page",children:"»"})]})}const gs=l.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:l.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function zf({steps:e,currentStep:t,variant:n="default",orientation:i="horizontal",colorScheme:s="blue",...r}){const o=s==="blue"?"#0685FF":"#7700CC",a=s==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return i==="vertical"?l.jsx(p.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...r,children:e.map((u,d)=>{const f=d+1<t,h=d+1===t,m=d===e.length-1,g=f||h?o:"var(--chakra-colors-border, #E2E8F0)";return l.jsxs(p.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[l.jsx(p.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:f||h?o:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:f?gs:u.icon??d+1}),!m&&l.jsx(p.Box,{w:"2px",flex:"1",minH:"8",bg:f?o:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&l.jsxs(p.Box,{pt:"1",pb:m?"0":"8",children:[l.jsx(p.Box,{fontSize:"sm",fontWeight:h?"semibold":"medium",color:f||h?o:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:u.title}),u.description&&l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u.description})]})]},u.id)})}):l.jsx(p.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...r,children:e.map((u,d)=>{const f=d+1<t,h=d+1===t,m=d+1>t,g=d===e.length-1,x=m?"bg.subtle":o,y=f?gs:u.icon?u.icon:l.jsx(p.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:d+1}),b=!m&&n!=="compact",v=m?"text.muted":o;return l.jsxs(w.Fragment,{children:[l.jsx(p.Box,{role:"listitem","aria-current":h?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:l.jsxs(p.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:b?"2":"0",py:b?"1.5":"0",bg:b?a:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[l.jsx(p.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"&&l.jsx(p.Box,{as:"span",fontSize:"sm",fontWeight:h||f?"semibold":"medium",fontFamily:"var(--font-body)",color:v,whiteSpace:"nowrap",transition:"color 0.25s",children:u.title})]})}),!g&&l.jsx(p.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:l.jsx(p.Box,{h:"1.5px",w:"10",bg:f?o:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},u.id)})})}const Of={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:"✕"}},Pr=w.forwardRef(({status:e="info",variant:t="subtle",title:n,description:i,icon:s,onClose:r,closable:o=!1,children:a,...c},u)=>{const d=Of[e],f=t==="solid"?d.color:d.bg,h=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${d.color}`:void 0,g=t==="subtle"?`1px solid ${d.border}`:void 0;return l.jsxs(p.Box,{ref:u,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:f,border:g,borderLeft:m,color:h,...c,children:[l.jsx(p.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":d.color,color:"white",mt:"0.5",children:s??d.icon}),l.jsxs(p.Box,{flex:"1",children:[n&&l.jsx(p.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":d.color,children:n}),i&&l.jsx(p.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:i}),a]}),o&&l.jsx(p.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:r,"aria-label":"Dismiss alert",children:"×"})]})});Pr.displayName="MedixAlert";const Wf=`
186
186
  @keyframes medix-shimmer {
187
187
  0% { transform: translateX(-100%); }
188
188
  100% { transform: translateX(100%); }
189
189
  }
190
- `;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=Wf,document.head.appendChild(t)}}const ye=w.forwardRef(({isLoaded:e=!1,children:t,...n},i)=>e?l.jsx(l.Fragment,{children:t}):l.jsx(p.Box,{ref:i,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}));ye.displayName="MedixSkeleton";function Dr({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...i}){return l.jsx(p.Box,{display:"flex",flexDirection:"column",gap:t,...i,children:Array.from({length:e}).map((s,r)=>l.jsx(ye,{h:"3",w:r===e-1?n:"100%",borderRadius:"full"},r))})}function Hf({...e}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[l.jsx(ye,{h:"48",borderRadius:"md",mb:"4"}),l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[l.jsx(ye,{w:"10",h:"10",borderRadius:"full"}),l.jsxs(p.Box,{flex:"1",children:[l.jsx(ye,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),l.jsx(ye,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),l.jsx(Dr,{lines:2})]})}const Nf={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},_f={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=`
190
+ `;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=Wf,document.head.appendChild(t)}}const ye=w.forwardRef(({isLoaded:e=!1,children:t,...n},i)=>e?l.jsx(l.Fragment,{children:t}):l.jsx(p.Box,{ref:i,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}));ye.displayName="MedixSkeleton";function Er({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...i}){return l.jsx(p.Box,{display:"flex",flexDirection:"column",gap:t,...i,children:Array.from({length:e}).map((s,r)=>l.jsx(ye,{h:"3",w:r===e-1?n:"100%",borderRadius:"full"},r))})}function Hf({...e}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[l.jsx(ye,{h:"48",borderRadius:"md",mb:"4"}),l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[l.jsx(ye,{w:"10",h:"10",borderRadius:"full"}),l.jsxs(p.Box,{flex:"1",children:[l.jsx(ye,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),l.jsx(ye,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),l.jsx(Er,{lines:2})]})}const Nf={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},_f={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=`
191
191
  @keyframes medix-indeterminate {
192
192
  0% { left: -40%; }
193
193
  100% { left: 100%; }
194
194
  }
195
- `,document.head.appendChild(t)}}const Pr=w.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:i=!1,animated:s=!0,isIndeterminate:r=!1,...o},a)=>{const c=Math.min(100,Math.max(0,e)),u=Nf[t],d=_f[n];return l.jsxs(p.Box,{ref:a,w:"100%",...o,children:[i&&l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx("span",{children:"Progress"}),l.jsxs("span",{children:[c,"%"]})]}),l.jsx(p.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:r?l.jsx(p.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):l.jsx(p.Box,{h:"100%",w:`${c}%`,bg:u,borderRadius:"full",transition:s?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});Pr.displayName="MedixProgress";const $f={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function Uf({isOpen:e,onClose:t,title:n,description:i,size:s="md",closeOnOverlayClick:r=!0,footer:o,children:a}){return l.jsxs(p.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:r,size:$f[s],children:[l.jsx(p.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),l.jsx(p.DialogPositioner,{children:l.jsxs(p.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||i)&&l.jsxs(p.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[n&&l.jsx(p.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),i&&l.jsx(p.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i}),l.jsx(p.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"})]}),l.jsx(p.DialogBody,{px:"6",py:"5",children:a}),o&&l.jsx(p.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:o})]})})]})}function Kf({label:e,children:t,placement:n="top",...i}){return l.jsxs(p.Tooltip.Root,{positioning:{placement:n},...i,children:[l.jsx(p.Tooltip.Trigger,{asChild:!0,children:l.jsx("span",{style:{display:"inline-flex"},children:t})}),l.jsx(p.Tooltip.Positioner,{children:l.jsx(p.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",boxShadow:"lg",children:e})})]})}function Gf({icon:e,title:t,description:n,actionLabel:i,onAction:s,secondaryLabel:r,onSecondaryAction:o,...a}){return l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...a,children:[e&&l.jsx(p.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}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&l.jsx(p.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(i||r)&&l.jsxs(p.Box,{display:"flex",gap:"3",mt:"2",children:[i&&l.jsx(be,{variant:"solid",colorScheme:"blue",onClick:s,children:i}),r&&l.jsx(be,{variant:"ghost",colorScheme:"blue",onClick:o,children:r})]})]})}function Yf({isOpen:e,onClose:t,title:n,placement:i="right",size:s="md",closeOnOverlayClick:r=!0,footer:o,children:a}){return l.jsxs(p.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:i,size:s,closeOnInteractOutside:r,children:[l.jsx(p.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),l.jsx(p.DrawerPositioner,{children:l.jsxs(p.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&l.jsxs(p.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[l.jsx(p.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),l.jsx(p.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"})]}),l.jsx(p.DrawerBody,{px:"6",py:"5",children:a}),o&&l.jsx(p.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:o})]})})]})}function Xf({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],...i}){const[s,r]=w.useState(new Set(n)),o=a=>{r(c=>{const u=new Set(c);return u.has(a)?u.delete(a):(t||u.clear(),u.add(a)),u})};return l.jsx(p.Box,{display:"flex",flexDirection:"column",gap:"4",...i,children:e.map(a=>{const c=s.has(a.id);return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:c?"blue.500":"border"},children:[l.jsxs(p.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:()=>o(a.id),"aria-expanded":c,children:[l.jsx(p.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:a.question}),l.jsx(p.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:c?"none":"1.5px solid var(--medix-form-border, #E2E8F0)",background:c?"#0685FF":"transparent",color:c?"#ffffff":"inherit",flexShrink:0},children:c?l.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:l.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:"currentColor"})}):l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[l.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:"currentColor"}),l.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:"currentColor"})]})})]}),l.jsx(p.Box,{overflow:"hidden",maxH:c?"800px":"0px",opacity:c?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:l.jsx(p.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:a.answer})})]},a.id)})})}function Zf({quote:e,authorName:t,authorTitle:n,authorAvatar:i,rating:s,...r}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...r,children:[s!==void 0&&l.jsx(p.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((o,a)=>l.jsx(p.Box,{as:"span",fontSize:"sm",color:a<s?"#F59E0B":"text.muted",children:"★"},a))}),l.jsxs(p.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[i?l.jsx("img",{src:i,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):l.jsx(p.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()}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}function qf(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 Jf({title:e,excerpt:t,category:n,date:i,coverImage:s,href:r,onClick:o,...a}){const c=!!(r||o),u=qf(i),d={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",width:"100%",textAlign:"left"},f=l.jsxs(p.Box,{bg:"bg.surface",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",boxShadow:"0 2px 12px rgba(0,0,0,0.07)",_dark:{bg:"bg.surface",boxShadow:"0 2px 14px rgba(0,0,0,0.32)"},_hover:c?{transform:"translateY(-4px)",boxShadow:"0 12px 32px rgba(0,0,0,0.13)"}:void 0,...a,children:[l.jsxs(p.Box,{position:"relative",overflow:"hidden",children:[s?l.jsx("img",{src:s,alt:e,style:{width:"100%",height:220,objectFit:"cover",display:"block"}}):l.jsx(p.Box,{h:"220px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)"}}),u&&l.jsxs(p.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",boxShadow:"0 2px 8px rgba(0,0,0,0.16)",children:[l.jsx(p.Box,{style:{fontSize:22,fontWeight:700,color:"#0685FF",lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),l.jsx(p.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),l.jsxs(p.Box,{px:"4",pt:"3",pb:"4",children:[n&&l.jsx(p.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:"blue.500",color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&l.jsx(p.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 r?l.jsx("a",{href:r,style:d,onClick:o,children:f}):o?l.jsx("button",{type:"button",style:d,onClick:o,children:f}):f}function Qf({columns:e,data:t,rowKey:n="id",isLoading:i=!1,emptyMessage:s="No data available",sortable:r=!1,sortKey:o,sortDirection:a="asc",onSort:c,striped:u=!1,onRowClick:d,caption:f,style:h,className:m}){const[g,x]=w.useState(o),[y,b]=w.useState(a),v=o??g,S=o?a:y,T=F=>{const j=v===F&&S==="asc"?"desc":"asc";x(F),b(j),c==null||c(F,j)},C=w.useMemo(()=>!v||c?t:[...t].sort((F,j)=>{const D=F[v],E=j[v],U=String(D??""),K=String(E??""),G=U.localeCompare(K,void 0,{numeric:!0,sensitivity:"base"});return S==="asc"?G:-G}),[t,v,S,c]),k=({colKey:F})=>v!==F?l.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):l.jsx("span",{style:{marginLeft:4},children:S==="asc"?"↑":"↓"}),P={padding:"12px 16px",textAlign:"left",fontSize:"12px",fontWeight:600,letterSpacing:"0.05em",textTransform:"uppercase",color:"var(--chakra-colors-text-muted, #6B7280)",fontFamily:"var(--font-body)",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",whiteSpace:"nowrap",userSelect:"none"},A={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return l.jsx(p.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},style:h,className:m,children:l.jsx(p.Box,{overflowX:"auto",children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},"aria-label":f,children:[f&&l.jsx("caption",{style:{display:"none"},children:f}),l.jsx("thead",{children:l.jsx("tr",{style:{background:"var(--chakra-colors-bg-subtle, #F6F6F6)"},children:e.map(F=>l.jsx("th",{style:{...P,textAlign:F.align??"left",minWidth:F.minWidth,cursor:F.sortable||r?"pointer":"default"},onClick:()=>F.sortable||r?T(F.key):void 0,"aria-sort":v===F.key?S==="asc"?"ascending":"descending":void 0,children:l.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[F.label,(F.sortable||r)&&l.jsx(k,{colKey:F.key})]})},F.key))})}),l.jsx("tbody",{children:i?Array.from({length:5}).map((F,j)=>l.jsx("tr",{children:e.map(D=>l.jsx("td",{style:A,children:l.jsx(p.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},D.key))},j)):C.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,style:{...A,textAlign:"center",padding:"48px 16px"},children:l.jsx(p.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:s})})}):C.map((F,j)=>{const D=String(F[n]??j);return l.jsx("tr",{onClick:()=>d==null?void 0:d(F,j),style:{background:u&&j%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:d?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:E=>{d&&(E.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:E=>{d&&(E.currentTarget.style.background="")},children:e.map(E=>l.jsx("td",{style:{...A,textAlign:E.align??"left"},children:E.render?E.render(F[E.key],F,j):String(F[E.key]??"—")},E.key))},D)})})]})})})}function eh({name:e,specialty:t,location:n,avatar:i,rating:s,reviewCount:r,consultationFee:o,isVerified:a=!1,isAvailable:c=!1,availabilityLabel:u="Available today",onBookClick:d,onViewClick:f,...h}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},...h,children:[l.jsxs(p.Box,{display:"flex",gap:"3",alignItems:"flex-start",children:[l.jsxs(p.Box,{position:"relative",flexShrink:0,children:[i?l.jsx("img",{src:i,alt:e,style:{width:56,height:56,borderRadius:"50%",objectFit:"cover",border:"2px solid var(--chakra-colors-border)",display:"block"}}):l.jsx(p.Box,{w:"14",h:"14",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xl",fontWeight:"bold",color:"white",border:"2px solid",borderColor:"blue.200",children:e.charAt(0)}),c&&l.jsx(p.Box,{position:"absolute",bottom:"0",right:"0",w:"3.5",h:"3.5",bg:"green.500",borderRadius:"full",border:"2px solid",borderColor:"bg.surface"})]}),l.jsxs(p.Box,{flex:"1",children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1.5",flexWrap:"wrap",children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),a&&l.jsx(p.Box,{color:"blue.500",fontSize:"md",title:"MDCN Verified",children:"✓"})]}),l.jsx(p.Box,{fontSize:"sm",color:"blue.500",fontFamily:"var(--font-body)",mt:"0.5",children:t}),n&&l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1",mt:"0.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx(p.Box,{as:"span",children:"📍"}),l.jsx(p.Box,{as:"span",children:n})]})]}),c&&l.jsx(xt,{status:"success",size:"sm",children:u})]}),s!==void 0&&l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"2",children:[l.jsx(p.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((m,g)=>l.jsx(p.Box,{as:"span",fontSize:"sm",color:g<Math.round(s)?"#F59E0B":"text.muted",children:"★"},g))}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:s.toFixed(1)}),r!==void 0&&l.jsxs(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["(",r," reviews)"]})]}),o&&l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",pt:"3",borderTop:"1px solid",borderColor:"border",mt:"auto",children:[l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),l.jsx(p.Box,{fontSize:"lg",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:o})]}),l.jsxs(p.Box,{display:"flex",gap:"2",children:[f&&l.jsx(p.Box,{as:"button",px:"3",py:"1.5",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"border",borderRadius:"md",bg:"transparent",color:"text.body",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:f,children:"View"}),d&&l.jsx(p.Box,{as:"button",px:"4",py:"1.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:d,children:"Book"})]})]})]})}const th={normal:{bg:"rgba(27, 122, 56, 0.08)",dot:"#1B7A38",text:"#1B7A38"},warning:{bg:"rgba(217, 119, 6, 0.08)",dot:"#D97706",text:"#D97706"},critical:{bg:"rgba(220, 38, 38, 0.08)",dot:"#DC2626",text:"#DC2626"}};function nh({label:e,value:t,unit:n,status:i="normal",...s}){const r=th[i];return l.jsxs(p.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:r.bg,border:"1px solid",borderColor:`${r.dot}33`,...s,children:[l.jsx(p.Box,{w:"2",h:"2",borderRadius:"full",bg:r.dot,flexShrink:0}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),l.jsxs(p.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&l.jsx(p.Box,{fontSize:"xs",color:r.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const ih={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function sh({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:i,time:s,type:r="video",status:o="upcoming",onCancel:a,onReschedule:c,onJoin:u,...d}){const f=ih[o];return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?l.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):l.jsx(p.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)}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&l.jsx(p.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),l.jsx(xt,{status:f.color,size:"sm",children:f.label})]}),l.jsxs(p.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s})]}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:r==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),o==="upcoming"&&l.jsxs(p.Box,{display:"flex",gap:"2",children:[u&&l.jsx(p.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),c&&l.jsx(p.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"}),a&&l.jsx(p.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:a,children:"Cancel"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>p.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>p.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>p.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>p.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>p.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>p.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>p.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>p.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>p.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>p.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>p.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>p.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>p.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>p.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>p.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>p.WrapItem});exports.Accordion=Xf;exports.Alert=Ar;exports.AppointmentCard=sh;exports.Avatar=js;exports.AvatarGroup=Qr;exports.Badge=xt;exports.BlogCard=Jf;exports.Breadcrumb=Mf;exports.Button=be;exports.Card=zs;exports.CardBody=xa;exports.CardFooter=ya;exports.CardHeader=ga;exports.Checkbox=Vs;exports.Container=Ws;exports.DataTable=Qf;exports.DatePicker=ma;exports.Divider=As;exports.DoctorCard=eh;exports.Drawer=Yf;exports.EmptyState=Gf;exports.FormControl=fa;exports.FullPageSpinner=ea;exports.IconButton=Ts;exports.Input=mn;exports.Logo=Ds;exports.MedixProvider=Kr;exports.Modal=Uf;exports.Navbar=Df;exports.OTPInput=Is;exports.Pagination=If;exports.PhoneInput=pa;exports.PinInput=ha;exports.Progress=Pr;exports.RadioGroup=la;exports.SearchInput=Ps;exports.SectionHeader=va;exports.Select=Ms;exports.Skeleton=ye;exports.SkeletonCard=Hf;exports.SkeletonText=Dr;exports.Spinner=ks;exports.StatCard=Os;exports.Stepper=zf;exports.Switch=Ls;exports.Tabs=Vf;exports.Tag=Bs;exports.TestimonialCard=Zf;exports.Textarea=Es;exports.Tooltip=Kf;exports.VitalBadge=nh;exports.colorTokens=re;exports.medixConfig=ws;exports.radiiTokens=vs;exports.shadowTokens=Ss;exports.spacingTokens=bs;exports.system=Cs;exports.textStyleTokens=ys;exports.typographyTokens=Te;
195
+ `,document.head.appendChild(t)}}const Mr=w.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:i=!1,animated:s=!0,isIndeterminate:r=!1,...o},a)=>{const c=Math.min(100,Math.max(0,e)),u=Nf[t],d=_f[n];return l.jsxs(p.Box,{ref:a,w:"100%",...o,children:[i&&l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx("span",{children:"Progress"}),l.jsxs("span",{children:[c,"%"]})]}),l.jsx(p.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:r?l.jsx(p.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):l.jsx(p.Box,{h:"100%",w:`${c}%`,bg:u,borderRadius:"full",transition:s?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});Mr.displayName="MedixProgress";const $f={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function Uf({isOpen:e,onClose:t,title:n,description:i,size:s="md",closeOnOverlayClick:r=!0,footer:o,children:a}){return l.jsxs(p.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:r,size:$f[s],children:[l.jsx(p.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),l.jsx(p.DialogPositioner,{children:l.jsxs(p.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||i)&&l.jsxs(p.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[n&&l.jsx(p.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),i&&l.jsx(p.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i}),l.jsx(p.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"})]}),l.jsx(p.DialogBody,{px:"6",py:"5",children:a}),o&&l.jsx(p.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:o})]})})]})}function Kf({label:e,children:t,placement:n="top",...i}){return l.jsxs(p.Tooltip.Root,{positioning:{placement:n},...i,children:[l.jsx(p.Tooltip.Trigger,{asChild:!0,children:l.jsx("span",{style:{display:"inline-flex"},children:t})}),l.jsx(p.Tooltip.Positioner,{children:l.jsx(p.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",boxShadow:"lg",children:e})})]})}function Gf({icon:e,title:t,description:n,actionLabel:i,onAction:s,secondaryLabel:r,onSecondaryAction:o,...a}){return l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...a,children:[e&&l.jsx(p.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}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&l.jsx(p.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(i||r)&&l.jsxs(p.Box,{display:"flex",gap:"3",mt:"2",children:[i&&l.jsx(be,{variant:"solid",colorScheme:"blue",onClick:s,children:i}),r&&l.jsx(be,{variant:"ghost",colorScheme:"blue",onClick:o,children:r})]})]})}function Yf({isOpen:e,onClose:t,title:n,placement:i="right",size:s="md",closeOnOverlayClick:r=!0,footer:o,children:a}){return l.jsxs(p.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:i,size:s,closeOnInteractOutside:r,children:[l.jsx(p.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),l.jsx(p.DrawerPositioner,{children:l.jsxs(p.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&l.jsxs(p.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[l.jsx(p.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),l.jsx(p.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"})]}),l.jsx(p.DrawerBody,{px:"6",py:"5",children:a}),o&&l.jsx(p.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:o})]})})]})}function Xf({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],...i}){const[s,r]=w.useState(new Set(n)),o=a=>{r(c=>{const u=new Set(c);return u.has(a)?u.delete(a):(t||u.clear(),u.add(a)),u})};return l.jsx(p.Box,{display:"flex",flexDirection:"column",gap:"4",...i,children:e.map(a=>{const c=s.has(a.id);return l.jsxs(p.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:c?"blue.500":"border"},children:[l.jsxs(p.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:()=>o(a.id),"aria-expanded":c,children:[l.jsx(p.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:a.question}),l.jsx(p.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:c?"none":"1.5px solid var(--medix-form-text)",background:c?"#0685FF":"transparent",color:c?"#ffffff":"inherit",flexShrink:0},children:c?l.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:l.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[l.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),l.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),l.jsx(p.Box,{overflow:"hidden",maxH:c?"800px":"0px",opacity:c?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:l.jsx(p.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:a.answer})})]},a.id)})})}function Zf({quote:e,authorName:t,authorTitle:n,authorAvatar:i,rating:s,...r}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...r,children:[s!==void 0&&l.jsx(p.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((o,a)=>l.jsx(p.Box,{as:"span",fontSize:"sm",color:a<s?"#F59E0B":"text.muted",children:"★"},a))}),l.jsxs(p.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[i?l.jsx("img",{src:i,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):l.jsx(p.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()}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}function qf(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 Jf({title:e,excerpt:t,category:n,date:i,coverImage:s,href:r,onClick:o,...a}){const c=!!(r||o),u=qf(i),d={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",width:"100%",textAlign:"left"},f=l.jsxs(p.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:c?{transform:"translateY(-4px)"}:void 0,...a,children:[l.jsxs(p.Box,{position:"relative",overflow:"hidden",children:[s?l.jsx("img",{src:s,alt:e,style:{width:"100%",height:220,objectFit:"cover",display:"block"}}):l.jsx(p.Box,{borderRadius:"card",h:"220px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)"}}),u&&l.jsxs(p.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",boxShadow:"0 2px 8px rgba(0,0,0,0.16)",children:[l.jsx(p.Box,{style:{fontSize:22,fontWeight:700,color:"#0685FF",lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),l.jsx(p.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),l.jsxs(p.Box,{px:"4",pt:"3",pb:"4",children:[n&&l.jsx(p.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:"blue.500",color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&l.jsx(p.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 r?l.jsx("a",{href:r,style:d,onClick:o,children:f}):o?l.jsx("button",{type:"button",style:d,onClick:o,children:f}):f}function Qf({columns:e,data:t,rowKey:n="id",isLoading:i=!1,emptyMessage:s="No data available",sortable:r=!1,sortKey:o,sortDirection:a="asc",onSort:c,striped:u=!1,onRowClick:d,caption:f,style:h,className:m}){const[g,x]=w.useState(o),[y,b]=w.useState(a),v=o??g,S=o?a:y,T=F=>{const j=v===F&&S==="asc"?"desc":"asc";x(F),b(j),c==null||c(F,j)},C=w.useMemo(()=>!v||c?t:[...t].sort((F,j)=>{const D=F[v],E=j[v],U=String(D??""),K=String(E??""),G=U.localeCompare(K,void 0,{numeric:!0,sensitivity:"base"});return S==="asc"?G:-G}),[t,v,S,c]),k=({colKey:F})=>v!==F?l.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):l.jsx("span",{style:{marginLeft:4},children:S==="asc"?"↑":"↓"}),P={padding:"12px 16px",textAlign:"left",fontSize:"12px",fontWeight:600,letterSpacing:"0.05em",textTransform:"uppercase",color:"var(--chakra-colors-text-muted, #6B7280)",fontFamily:"var(--font-body)",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",whiteSpace:"nowrap",userSelect:"none"},A={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return l.jsx(p.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},style:h,className:m,children:l.jsx(p.Box,{overflowX:"auto",children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},"aria-label":f,children:[f&&l.jsx("caption",{style:{display:"none"},children:f}),l.jsx("thead",{children:l.jsx("tr",{style:{background:"var(--chakra-colors-bg-subtle, #F6F6F6)"},children:e.map(F=>l.jsx("th",{style:{...P,textAlign:F.align??"left",minWidth:F.minWidth,cursor:F.sortable||r?"pointer":"default"},onClick:()=>F.sortable||r?T(F.key):void 0,"aria-sort":v===F.key?S==="asc"?"ascending":"descending":void 0,children:l.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[F.label,(F.sortable||r)&&l.jsx(k,{colKey:F.key})]})},F.key))})}),l.jsx("tbody",{children:i?Array.from({length:5}).map((F,j)=>l.jsx("tr",{children:e.map(D=>l.jsx("td",{style:A,children:l.jsx(p.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},D.key))},j)):C.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,style:{...A,textAlign:"center",padding:"48px 16px"},children:l.jsx(p.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:s})})}):C.map((F,j)=>{const D=String(F[n]??j);return l.jsx("tr",{onClick:()=>d==null?void 0:d(F,j),style:{background:u&&j%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:d?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:E=>{d&&(E.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:E=>{d&&(E.currentTarget.style.background="")},children:e.map(E=>l.jsx("td",{style:{...A,textAlign:E.align??"left"},children:E.render?E.render(F[E.key],F,j):String(F[E.key]??"—")},E.key))},D)})})]})})})}function eh({name:e,specialty:t,location:n,avatar:i,rating:s,reviewCount:r,consultationFee:o,isVerified:a=!1,isAvailable:c=!1,availabilityLabel:u="Available today",onBookClick:d,onViewClick:f,...h}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},...h,children:[l.jsxs(p.Box,{display:"flex",gap:"3",alignItems:"flex-start",children:[l.jsxs(p.Box,{position:"relative",flexShrink:0,children:[i?l.jsx("img",{src:i,alt:e,style:{width:56,height:56,borderRadius:"50%",objectFit:"cover",border:"2px solid var(--chakra-colors-border)",display:"block"}}):l.jsx(p.Box,{w:"14",h:"14",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xl",fontWeight:"bold",color:"white",border:"2px solid",borderColor:"blue.200",children:e.charAt(0)}),c&&l.jsx(p.Box,{position:"absolute",bottom:"0",right:"0",w:"3.5",h:"3.5",bg:"green.500",borderRadius:"full",border:"2px solid",borderColor:"bg.surface"})]}),l.jsxs(p.Box,{flex:"1",children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1.5",flexWrap:"wrap",children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),a&&l.jsx(p.Box,{color:"blue.500",fontSize:"md",title:"MDCN Verified",children:"✓"})]}),l.jsx(p.Box,{fontSize:"sm",color:"blue.500",fontFamily:"var(--font-body)",mt:"0.5",children:t}),n&&l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1",mt:"0.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx(p.Box,{as:"span",children:"📍"}),l.jsx(p.Box,{as:"span",children:n})]})]}),c&&l.jsx(xt,{status:"success",size:"sm",children:u})]}),s!==void 0&&l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"2",children:[l.jsx(p.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((m,g)=>l.jsx(p.Box,{as:"span",fontSize:"sm",color:g<Math.round(s)?"#F59E0B":"text.muted",children:"★"},g))}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:s.toFixed(1)}),r!==void 0&&l.jsxs(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["(",r," reviews)"]})]}),o&&l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",pt:"3",borderTop:"1px solid",borderColor:"border",mt:"auto",children:[l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),l.jsx(p.Box,{fontSize:"lg",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:o})]}),l.jsxs(p.Box,{display:"flex",gap:"2",children:[f&&l.jsx(p.Box,{as:"button",px:"3",py:"1.5",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"border",borderRadius:"md",bg:"transparent",color:"text.body",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:f,children:"View"}),d&&l.jsx(p.Box,{as:"button",px:"4",py:"1.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:d,children:"Book"})]})]})]})}const th={normal:{bg:"rgba(27, 122, 56, 0.08)",dot:"#1B7A38",text:"#1B7A38"},warning:{bg:"rgba(217, 119, 6, 0.08)",dot:"#D97706",text:"#D97706"},critical:{bg:"rgba(220, 38, 38, 0.08)",dot:"#DC2626",text:"#DC2626"}};function nh({label:e,value:t,unit:n,status:i="normal",...s}){const r=th[i];return l.jsxs(p.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:r.bg,border:"1px solid",borderColor:`${r.dot}33`,...s,children:[l.jsx(p.Box,{w:"2",h:"2",borderRadius:"full",bg:r.dot,flexShrink:0}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),l.jsxs(p.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&l.jsx(p.Box,{fontSize:"xs",color:r.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const ih={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function sh({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:i,time:s,type:r="video",status:o="upcoming",onCancel:a,onReschedule:c,onJoin:u,...d}){const f=ih[o];return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?l.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):l.jsx(p.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)}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&l.jsx(p.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),l.jsx(xt,{status:f.color,size:"sm",children:f.label})]}),l.jsxs(p.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s})]}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:r==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),o==="upcoming"&&l.jsxs(p.Box,{display:"flex",gap:"2",children:[u&&l.jsx(p.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),c&&l.jsx(p.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"}),a&&l.jsx(p.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:a,children:"Cancel"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>p.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>p.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>p.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>p.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>p.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>p.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>p.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>p.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>p.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>p.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>p.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>p.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>p.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>p.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>p.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>p.WrapItem});exports.Accordion=Xf;exports.Alert=Pr;exports.AppointmentCard=sh;exports.Avatar=Bs;exports.AvatarGroup=Qr;exports.Badge=xt;exports.BlogCard=Jf;exports.Breadcrumb=Mf;exports.Button=be;exports.Card=Ws;exports.CardBody=xa;exports.CardFooter=ya;exports.CardHeader=ga;exports.Checkbox=Is;exports.Container=Ns;exports.DataTable=Qf;exports.DatePicker=ma;exports.Divider=Ps;exports.DoctorCard=eh;exports.Drawer=Yf;exports.EmptyState=Gf;exports.FormControl=fa;exports.FullPageSpinner=ea;exports.IconButton=js;exports.Input=mn;exports.Logo=Es;exports.MedixProvider=Yr;exports.Modal=Uf;exports.Navbar=Df;exports.OTPInput=Os;exports.Pagination=If;exports.PhoneInput=pa;exports.PinInput=ha;exports.Progress=Mr;exports.RadioGroup=la;exports.SearchInput=Ms;exports.SectionHeader=va;exports.Select=Vs;exports.Skeleton=ye;exports.SkeletonCard=Hf;exports.SkeletonText=Er;exports.Spinner=As;exports.StatCard=Hs;exports.Stepper=zf;exports.Switch=zs;exports.Tabs=Vf;exports.Tag=Ds;exports.TestimonialCard=Zf;exports.Textarea=Rs;exports.Tooltip=Kf;exports.VitalBadge=nh;exports.colorTokens=re;exports.medixConfig=Ts;exports.radiiTokens=ws;exports.shadowTokens=Cs;exports.spacingTokens=Ss;exports.system=Fs;exports.textStyleTokens=vs;exports.typographyTokens=Te;
196
196
  //# sourceMappingURL=index.cjs.map