@plyaz/ui 0.7.1 → 0.7.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/client.cjs.js +73 -31
- package/dist/client.es.js +18380 -4034
- package/dist/{constant-BgZiatEy.js → index-BFruSSsn.js} +1162 -544
- package/dist/index-Cs64egIu.cjs +37 -0
- package/dist/index.cjs.js +7 -13
- package/dist/index.es.js +792 -583
- package/dist/types/components/Accordion/Accordion.d.ts +8 -0
- package/dist/types/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/types/components/Accordion/Accordion.stories.d.ts +44 -0
- package/dist/types/components/Accordion/Accordion.stories.d.ts.map +1 -0
- package/dist/types/components/Alert/Alert.d.ts +10 -0
- package/dist/types/components/Alert/Alert.d.ts.map +1 -0
- package/dist/types/components/Alert/Alert.stories.d.ts +33 -0
- package/dist/types/components/Alert/Alert.stories.d.ts.map +1 -0
- package/dist/types/components/AlertDialog/AlertDialog.stories.d.ts.map +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +7 -0
- package/dist/types/components/Avatar/Avatar.d.ts.map +1 -0
- package/dist/types/components/Avatar/Avatar.stories.d.ts +22 -0
- package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -0
- package/dist/types/components/Badge/Badge.stories.d.ts +7 -12
- package/dist/types/components/Badge/Badge.stories.d.ts.map +1 -1
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/types/components/Breadcrumb/Breadcrumb.stories.d.ts +27 -0
- package/dist/types/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -0
- package/dist/types/components/Calendar/Calendar.d.ts +9 -0
- package/dist/types/components/Calendar/Calendar.d.ts.map +1 -0
- package/dist/types/components/Carousel/Carousel.d.ts +20 -0
- package/dist/types/components/Carousel/Carousel.d.ts.map +1 -0
- package/dist/types/components/Carousel/Carousel.stories.d.ts +18 -0
- package/dist/types/components/Carousel/Carousel.stories.d.ts.map +1 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/types/components/Checkbox/Checkbox.stories.d.ts +18 -0
- package/dist/types/components/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/dist/types/components/Combobox/Combobox.d.ts +24 -0
- package/dist/types/components/Combobox/Combobox.d.ts.map +1 -0
- package/dist/types/components/Combobox/Combobox.stories.d.ts +17 -0
- package/dist/types/components/Combobox/Combobox.stories.d.ts.map +1 -0
- package/dist/types/components/Command/Command.d.ts +19 -0
- package/dist/types/components/Command/Command.d.ts.map +1 -0
- package/dist/types/components/Command/Command.stories.d.ts +42 -0
- package/dist/types/components/Command/Command.stories.d.ts.map +1 -0
- package/dist/types/components/ContextMenu/ContextMenu.d.ts +26 -0
- package/dist/types/components/ContextMenu/ContextMenu.d.ts.map +1 -0
- package/dist/types/components/ContextMenu/ContextMenu.stories.d.ts +41 -0
- package/dist/types/components/ContextMenu/ContextMenu.stories.d.ts.map +1 -0
- package/dist/types/components/Dialog/Dialog.d.ts +16 -0
- package/dist/types/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/types/components/Dialog/Dialog.stories.d.ts +26 -0
- package/dist/types/components/Dialog/Dialog.stories.d.ts.map +1 -0
- package/dist/types/components/Drawer/Drawer.d.ts +14 -0
- package/dist/types/components/Drawer/Drawer.d.ts.map +1 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +26 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.stories.d.ts +40 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -0
- package/dist/types/components/HoverCard/HoverCard.d.ts +7 -0
- package/dist/types/components/HoverCard/HoverCard.d.ts.map +1 -0
- package/dist/types/components/HoverCard/HoverCard.stories.d.ts +29 -0
- package/dist/types/components/HoverCard/HoverCard.stories.d.ts.map +1 -0
- package/dist/types/components/InputOTP/InputOTP.d.ts +12 -0
- package/dist/types/components/InputOTP/InputOTP.d.ts.map +1 -0
- package/dist/types/components/Label/Label.d.ts +5 -0
- package/dist/types/components/Label/Label.d.ts.map +1 -0
- package/dist/types/components/Label/Label.stories.d.ts +28 -0
- package/dist/types/components/Label/Label.stories.d.ts.map +1 -0
- package/dist/types/components/MenuBar/Menubar.stories.d.ts +30 -6
- package/dist/types/components/MenuBar/Menubar.stories.d.ts.map +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +14 -0
- package/dist/types/components/Pagination/Pagination.d.ts.map +1 -0
- package/dist/types/components/Pagination/Pagination.stories.d.ts +22 -0
- package/dist/types/components/Pagination/Pagination.stories.d.ts.map +1 -0
- package/dist/types/components/Popover/Popover.d.ts +8 -0
- package/dist/types/components/Popover/Popover.d.ts.map +1 -0
- package/dist/types/components/Popover/Popover.stories.d.ts +23 -0
- package/dist/types/components/Popover/Popover.stories.d.ts.map +1 -0
- package/dist/types/components/Progress/Progress.d.ts +5 -0
- package/dist/types/components/Progress/Progress.d.ts.map +1 -0
- package/dist/types/components/Progress/Progress.stories.d.ts +32 -0
- package/dist/types/components/Progress/Progress.stories.d.ts.map +1 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +6 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/types/components/RadioGroup/RadioGroup.stories.d.ts +25 -0
- package/dist/types/components/RadioGroup/RadioGroup.stories.d.ts.map +1 -0
- package/dist/types/components/ScrollArea/ScrollArea.d.ts +6 -0
- package/dist/types/components/ScrollArea/ScrollArea.d.ts.map +1 -0
- package/dist/types/components/ScrollArea/ScrollArea.stories.d.ts +42 -0
- package/dist/types/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -0
- package/dist/types/components/Separator/Separator.d.ts +5 -0
- package/dist/types/components/Separator/Separator.d.ts.map +1 -0
- package/dist/types/components/Separator/Separator.stories.d.ts +22 -0
- package/dist/types/components/Separator/Separator.stories.d.ts.map +1 -0
- package/dist/types/components/Sheet/Sheet.d.ts +14 -0
- package/dist/types/components/Sheet/Sheet.d.ts.map +1 -0
- package/dist/types/components/Sheet/Sheet.stories.d.ts +17 -0
- package/dist/types/components/Sheet/Sheet.stories.d.ts.map +1 -0
- package/dist/types/components/Skeleton/Skeleton.d.ts +4 -0
- package/dist/types/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/types/components/Skeleton/Skeleton.stories.d.ts +21 -0
- package/dist/types/components/Skeleton/Skeleton.stories.d.ts.map +1 -0
- package/dist/types/components/Slider/Slider.d.ts +5 -0
- package/dist/types/components/Slider/Slider.d.ts.map +1 -0
- package/dist/types/components/Slider/Slider.stories.d.ts +18 -0
- package/dist/types/components/Slider/Slider.stories.d.ts.map +1 -0
- package/dist/types/components/Switch/Switch.d.ts +5 -0
- package/dist/types/components/Switch/Switch.d.ts.map +1 -0
- package/dist/types/components/Switch/Switch.stories.d.ts +27 -0
- package/dist/types/components/Switch/Switch.stories.d.ts.map +1 -0
- package/dist/types/components/Table/Table.d.ts +11 -0
- package/dist/types/components/Table/Table.d.ts.map +1 -0
- package/dist/types/components/Table/Table.stories.d.ts +19 -0
- package/dist/types/components/Table/Table.stories.d.ts.map +1 -0
- package/dist/types/components/Tabs/Tabs.d.ts +8 -0
- package/dist/types/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/types/components/Tabs/Tabs.stories.d.ts +28 -0
- package/dist/types/components/Tabs/Tabs.stories.d.ts.map +1 -0
- package/dist/types/components/Textarea/Textarea.d.ts +4 -0
- package/dist/types/components/Textarea/Textarea.d.ts.map +1 -0
- package/dist/types/components/Textarea/Textarea.stories.d.ts +41 -0
- package/dist/types/components/Textarea/Textarea.stories.d.ts.map +1 -0
- package/dist/types/components/Toaster/Toaster.d.ts +4 -0
- package/dist/types/components/Toaster/Toaster.d.ts.map +1 -0
- package/dist/types/components/Toaster/Toaster.stories.d.ts +15 -0
- package/dist/types/components/Toaster/Toaster.stories.d.ts.map +1 -0
- package/dist/types/components/Toggle/Toggle.d.ts +7 -0
- package/dist/types/components/Toggle/Toggle.d.ts.map +1 -0
- package/dist/types/components/Toggle/Toggle.stories.d.ts +36 -0
- package/dist/types/components/Toggle/Toggle.stories.d.ts.map +1 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/types/components/Tooltip/Tooltip.stories.d.ts +27 -0
- package/dist/types/components/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/dist/types/components/client.d.ts +25 -0
- package/dist/types/components/client.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +10 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/constants/constant.d.ts +3 -0
- package/dist/types/constants/constant.d.ts.map +1 -1
- package/dist/types/constants/toggle-variants.d.ts +5 -0
- package/dist/types/constants/toggle-variants.d.ts.map +1 -0
- package/dist/ui.css +1 -1
- package/package.json +29 -2
- package/styles/main.css +65 -28
- package/dist/constant-B-tpIxtm.cjs +0 -31
package/dist/client.cjs.js
CHANGED
|
@@ -1,51 +1,93 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),A=require("react"),Y=require("./constant-B-tpIxtm.cjs"),er=require("react-dom"),On=require("@radix-ui/react-slot");function nr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const p=nr(A),ja=nr(er),sr=A.createContext({});function Me(t){const e=A.useRef(null);return e.current===null&&(e.current=t()),e.current}const Nn=typeof window<"u",kn=Nn?A.useLayoutEffect:A.useEffect,In=A.createContext(null);function Fn(t,e){t.indexOf(e)===-1&&t.push(e)}function jn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const et=(t,e,n)=>n>e?e:n<t?t:n;function cn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Ft=()=>{},X=()=>{};process.env.NODE_ENV!=="production"&&(Ft=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(cn(e,n))},X=(t,e,n)=>{if(!t)throw new Error(cn(e,n))});const st={},ir=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function rr(t){return typeof t=="object"&&t!==null}const or=t=>/^0[^.\s]+$/u.test(t);function Bn(t){let e;return()=>(e===void 0&&(e=t()),e)}const W=t=>t,Ba=(t,e)=>n=>e(t(n)),ne=(...t)=>t.reduce(Ba),kt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class _n{constructor(){this.subscriptions=[]}add(e){return Fn(this.subscriptions,e),()=>jn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const G=t=>t*1e3,J=t=>t/1e3;function Wn(t,e){return e?t*(1e3/e):0}const ws=new Set;function Re(t,e,n){t||ws.has(e)||(console.warn(cn(e,n)),ws.add(e))}const ar=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,_a=1e-7,Wa=12;function Ua(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ar(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>_a&&++a<Wa);return r}function se(t,e,n,s){if(t===e&&n===s)return W;const i=o=>Ua(o,0,1,t,n);return o=>o===0||o===1?o:ar(i(o),e,s)}const cr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,lr=t=>e=>1-t(1-e),ur=se(.33,1.53,.69,.99),Un=lr(ur),fr=cr(Un),dr=t=>(t*=2)<1?.5*Un(t):.5*(2-Math.pow(2,-10*(t-1))),$n=t=>1-Math.sin(Math.acos(t)),hr=lr($n),mr=cr($n),$a=se(.42,0,1,1),Ka=se(0,0,.58,1),pr=se(.42,0,.58,1),za=t=>Array.isArray(t)&&typeof t[0]!="number",gr=t=>Array.isArray(t)&&typeof t[0]=="number",Ss={linear:W,easeIn:$a,easeInOut:pr,easeOut:Ka,circIn:$n,circInOut:mr,circOut:hr,backIn:Un,backInOut:fr,backOut:ur,anticipate:dr},Ha=t=>typeof t=="string",As=t=>{if(gr(t)){X(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return se(e,n,s,i)}else if(Ha(t))return X(Ss[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Ss[t];return t},oe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ga(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){r.has(u)&&(l.schedule(u),t()),u(a)}const l={schedule:(u,f=!1,d=!1)=>{const v=d&&i?n:s;return f&&r.add(u),v.has(u)||v.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(u))}};return l}const Ya=40;function yr(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=oe.reduce((x,S)=>(x[S]=Ga(o),x),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:f,preRender:d,render:h,postRender:v}=r,m=()=>{const x=st.useManualTiming?i.timestamp:performance.now();n=!1,st.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(x-i.timestamp,Ya),1)),i.timestamp=x,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),f.process(i),d.process(i),h.process(i),v.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},y=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:oe.reduce((x,S)=>{const w=r[S];return x[S]=(D,E=!1,C=!1)=>(n||y(),w.schedule(D,E,C)),x},{}),cancel:x=>{for(let S=0;S<oe.length;S++)r[oe[S]].cancel(x)},state:i,steps:r}}const{schedule:M,cancel:q,state:k,steps:Fe}=yr(typeof requestAnimationFrame<"u"?requestAnimationFrame:W,!0);let pe;function Xa(){pe=void 0}const _={now:()=>(pe===void 0&&_.set(k.isProcessing||st.useManualTiming?k.timestamp:performance.now()),pe),set:t=>{pe=t,queueMicrotask(Xa)}},vr=t=>e=>typeof e=="string"&&e.startsWith(t),Kn=vr("--"),qa=vr("var(--"),zn=t=>qa(t)?Za.test(t.split("/*")[0].trim()):!1,Za=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,jt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Xt={...jt,transform:t=>et(0,1,t)},ae={...jt,default:1},Kt=t=>Math.round(t*1e5)/1e5,Hn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qa(t){return t==null}const Ja=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gn=(t,e)=>n=>!!(typeof n=="string"&&Ja.test(n)&&n.startsWith(t)||e&&!Qa(n)&&Object.prototype.hasOwnProperty.call(n,e)),xr=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Hn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},tc=t=>et(0,255,t),je={...jt,transform:t=>Math.round(tc(t))},pt={test:Gn("rgb","red"),parse:xr("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+je.transform(t)+", "+je.transform(e)+", "+je.transform(n)+", "+Kt(Xt.transform(s))+")"};function ec(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ln={test:Gn("#"),parse:ec,transform:pt.transform},ie=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),at=ie("deg"),tt=ie("%"),P=ie("px"),nc=ie("vh"),sc=ie("vw"),Ps={...tt,parse:t=>tt.parse(t)/100,transform:t=>tt.transform(t*100)},Pt={test:Gn("hsl","hue"),parse:xr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+tt.transform(Kt(e))+", "+tt.transform(Kt(n))+", "+Kt(Xt.transform(s))+")"},N={test:t=>pt.test(t)||ln.test(t)||Pt.test(t),parse:t=>pt.test(t)?pt.parse(t):Pt.test(t)?Pt.parse(t):ln.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?pt.transform(t):Pt.transform(t),getAnimatableNone:t=>{const e=N.parse(t);return e.alpha=0,N.transform(e)}},ic=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function rc(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Hn))==null?void 0:e.length)||0)+(((n=t.match(ic))==null?void 0:n.length)||0)>0}const Tr="number",br="color",oc="var",ac="var(",Es="${}",cc=/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 qt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(cc,c=>(N.test(c)?(s.color.push(o),i.push(br),n.push(N.parse(c))):c.startsWith(ac)?(s.var.push(o),i.push(oc),n.push(c)):(s.number.push(o),i.push(Tr),n.push(parseFloat(c))),++o,Es)).split(Es);return{values:n,split:a,indexes:s,types:i}}function wr(t){return qt(t).values}function Sr(t){const{split:e,types:n}=qt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Tr?o+=Kt(i[r]):a===br?o+=N.transform(i[r]):o+=i[r]}return o}}const lc=t=>typeof t=="number"?0:N.test(t)?N.getAnimatableNone(t):t;function uc(t){const e=wr(t);return Sr(t)(e.map(lc))}const ut={test:rc,parse:wr,createTransformer:Sr,getAnimatableNone:uc};function Be(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function fc({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=Be(c,a,t+1/3),o=Be(c,a,t),r=Be(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Se(t,e){return n=>n>0?e:t}const V=(t,e,n)=>t+(e-t)*n,_e=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},dc=[ln,pt,Pt],hc=t=>dc.find(e=>e.test(t));function Cs(t){const e=hc(t);if(Ft(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Pt&&(n=fc(n)),n}const Ds=(t,e)=>{const n=Cs(t),s=Cs(e);if(!n||!s)return Se(t,e);const i={...n};return o=>(i.red=_e(n.red,s.red,o),i.green=_e(n.green,s.green,o),i.blue=_e(n.blue,s.blue,o),i.alpha=V(n.alpha,s.alpha,o),pt.transform(i))},un=new Set(["none","hidden"]);function mc(t,e){return un.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function pc(t,e){return n=>V(t,e,n)}function Yn(t){return typeof t=="number"?pc:typeof t=="string"?zn(t)?Se:N.test(t)?Ds:vc:Array.isArray(t)?Ar:typeof t=="object"?N.test(t)?Ds:gc:Se}function Ar(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Yn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function gc(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Yn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function yc(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const vc=(t,e)=>{const n=ut.createTransformer(e),s=qt(t),i=qt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?un.has(t)&&!i.values.length||un.has(e)&&!s.values.length?mc(t,e):ne(Ar(yc(s,i),i.values),n):(Ft(!0,`Complex values '${t}' and '${e}' 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"),Se(t,e))};function Pr(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):Yn(t)(t,e)}const xc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>q(e),now:()=>k.isProcessing?k.timestamp:_.now()}},Er=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ae=2e4;function Xn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Ae;)e+=n,s=t.next(e);return e>=Ae?1/0:e}function Tc(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Xn(s),Ae);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:J(i)}}const bc=5;function Cr(t,e,n){const s=Math.max(e-bc,0);return Wn(n-t(s),e-s)}const R={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},We=.001;function wc({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,o;Ft(t<=G(R.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=et(R.minDamping,R.maxDamping,r),t=et(R.minDuration,R.maxDuration,J(t)),r<1?(i=l=>{const u=l*r,f=u*t,d=u-n,h=fn(l,r),v=Math.exp(-f);return We-d/h*v},o=l=>{const f=l*r*t,d=f*n+n,h=Math.pow(r,2)*Math.pow(l,2)*t,v=Math.exp(-f),m=fn(Math.pow(l,2),r);return(-i(l)+We>0?-1:1)*((d-h)*v)/m}):(i=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-We+u*f},o=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=Ac(i,o,a);if(t=G(t),isNaN(c))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:r*2*Math.sqrt(s*l),duration:t}}}const Sc=12;function Ac(t,e,n){let s=n;for(let i=1;i<Sc;i++)s=s-t(s)/e(s);return s}function fn(t,e){return t*Math.sqrt(1-e*e)}const Pc=["duration","bounce"],Ec=["stiffness","damping","mass"];function Ms(t,e){return e.some(n=>t[n]!==void 0)}function Cc(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!Ms(t,Ec)&&Ms(t,Pc))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*et(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:o}}else{const n=wc(t);e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function Pe(t=R.visualDuration,e=R.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:l,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=Cc({...n,velocity:-J(n.velocity||0)}),v=d||0,m=l/(2*Math.sqrt(c*u)),y=r-o,g=J(Math.sqrt(c/u)),T=Math.abs(y)<5;s||(s=T?R.restSpeed.granular:R.restSpeed.default),i||(i=T?R.restDelta.granular:R.restDelta.default);let x;if(m<1){const w=fn(g,m);x=D=>{const E=Math.exp(-m*g*D);return r-E*((v+m*g*y)/w*Math.sin(w*D)+y*Math.cos(w*D))}}else if(m===1)x=w=>r-Math.exp(-g*w)*(y+(v+g*y)*w);else{const w=g*Math.sqrt(m*m-1);x=D=>{const E=Math.exp(-m*g*D),C=Math.min(w*D,300);return r-E*((v+m*g*y)*Math.sinh(C)+w*y*Math.cosh(C))/w}}const S={calculatedDuration:h&&f||null,next:w=>{const D=x(w);if(h)a.done=w>=f;else{let E=w===0?v:0;m<1&&(E=w===0?G(v):Cr(x,w,D));const C=Math.abs(E)<=s,O=Math.abs(r-D)<=i;a.done=C&&O}return a.value=a.done?r:D,a},toString:()=>{const w=Math.min(Xn(S),Ae),D=Er(E=>S.next(w*E).value,w,30);return w+"ms "+D},toTransition:()=>{}};return S}Pe.applyToOptions=t=>{const e=Tc(t,100,Pe);return t.ease=e.ease,t.duration=G(e.duration),t.type="keyframes",t};function dn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=C=>a!==void 0&&C<a||c!==void 0&&C>c,v=C=>a===void 0?c:c===void 0||Math.abs(a-C)<Math.abs(c-C)?a:c;let m=n*e;const y=f+m,g=r===void 0?y:r(y);g!==y&&(m=g-f);const T=C=>-m*Math.exp(-C/s),x=C=>g+T(C),S=C=>{const O=T(C),F=x(C);d.done=Math.abs(O)<=l,d.value=d.done?g:F};let w,D;const E=C=>{h(d.value)&&(w=C,D=Pe({keyframes:[d.value,v(d.value)],velocity:Cr(x,C,d.value),damping:i,stiffness:o,restDelta:l,restSpeed:u}))};return E(0),{calculatedDuration:null,next:C=>{let O=!1;return!D&&w===void 0&&(O=!0,S(C),E(C)),w!==void 0&&C>=w?D.next(C-w):(!O&&S(C),d)}}}function Dc(t,e,n){const s=[],i=n||st.mix||Pr,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const c=Array.isArray(e)?e[r]||W:e;a=ne(c,a)}s.push(a)}return s}function qn(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(X(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Dc(e,s,i),c=a.length,l=u=>{if(r&&u<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const d=kt(t[f],t[f+1],u);return a[f](d)};return n?u=>l(et(t[0],t[o-1],u)):l}function Mc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=kt(0,e,s);t.push(V(n,1,i))}}function Dr(t){const e=[0];return Mc(e,t.length-1),e}function Rc(t,e){return t.map(n=>n*e)}function Vc(t,e){return t.map(()=>e||pr).splice(0,t.length-1)}function Et({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=za(s)?s.map(As):As(s),o={done:!1,value:e[0]},r=Rc(n&&n.length===e.length?n:Dr(e),t),a=qn(r,e,{ease:Array.isArray(i)?i:Vc(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const Lc=t=>t!==null;function Zn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Lc),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Oc={decay:dn,inertia:dn,tween:Et,keyframes:Et,spring:Pe};function Mr(t){typeof t.type=="string"&&(t.type=Oc[t.type])}class Qn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Nc=t=>t/100;class Jn extends Qn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==_.now()&&this.tick(_.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Mr(e);const{type:n=Et,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const c=n||Et;process.env.NODE_ENV!=="production"&&c!==Et&&X(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Et&&typeof a[0]!="number"&&(this.mixKeyframes=ne(Nc,Pr(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-r})),l.calculatedDuration===null&&(l.calculatedDuration=Xn(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:u,repeat:f,repeatType:d,repeatDelay:h,type:v,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,S=s;if(f){const C=Math.min(this.currentTime,i)/a;let O=Math.floor(C),F=C%1;!F&&C>=1&&(F=1),F===1&&O--,O=Math.min(O,f+1),!!(O%2)&&(d==="reverse"?(F=1-F,h&&(F-=h/a)):d==="mirror"&&(S=r)),x=et(0,1,F)*a}const w=T?{done:!1,value:u[0]}:S.next(x);o&&(w.value=o(w.value));let{done:D}=w;!T&&c!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return E&&v!==dn&&(w.value=Zn(u,this.options,y,this.speed)),m&&m(w.value),E&&this.finish(),w}then(e,n){return this.finished.then(e,n)}get duration(){return J(this.calculatedDuration)}get time(){return J(this.currentTime)}set time(e){var n;e=G(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(_.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=J(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=xc,startTime:n}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),(o=(i=this.options).onPlay)==null||o.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(_.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function kc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const gt=t=>t*180/Math.PI,hn=t=>{const e=gt(Math.atan2(t[1],t[0]));return mn(e)},Ic={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:hn,rotateZ:hn,skewX:t=>gt(Math.atan(t[1])),skewY:t=>gt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},mn=t=>(t=t%360,t<0&&(t+=360),t),Rs=hn,Vs=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ls=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Fc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Vs,scaleY:Ls,scale:t=>(Vs(t)+Ls(t))/2,rotateX:t=>mn(gt(Math.atan2(t[6],t[5]))),rotateY:t=>mn(gt(Math.atan2(-t[2],t[0]))),rotateZ:Rs,rotate:Rs,skewX:t=>gt(Math.atan(t[4])),skewY:t=>gt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function pn(t){return t.includes("scale")?1:0}function gn(t,e){if(!t||t==="none")return pn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Fc,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ic,i=a}if(!i)return pn(e);const o=s[e],r=i[1].split(",").map(Bc);return typeof o=="function"?o(r):r[o]}const jc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return gn(n,e)};function Bc(t){return parseFloat(t.trim())}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_t=new Set(Bt),Os=t=>t===jt||t===P,_c=new Set(["x","y","z"]),Wc=Bt.filter(t=>!_c.has(t));function Uc(t){const e=[];return Wc.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const yt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>gn(e,"x"),y:(t,{transform:e})=>gn(e,"y")};yt.translateX=yt.x;yt.translateY=yt.y;const vt=new Set;let yn=!1,vn=!1,xn=!1;function Rr(){if(vn){const t=Array.from(vt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Uc(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))==null||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}vn=!1,yn=!1,vt.forEach(t=>t.complete(xn)),vt.clear()}function Vr(){vt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(vn=!0)})}function $c(){xn=!0,Vr(),Rr(),xn=!1}class ts{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(vt.add(this),yn||(yn=!0,M.read(Vr),M.resolveKeyframes(Rr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0:i.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}kc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),vt.delete(this)}cancel(){this.state==="scheduled"&&(vt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Kc=t=>t.startsWith("--");function zc(t,e,n){Kc(e)?t.style.setProperty(e,n):t.style[e]=n}const Lr=Bn(()=>window.ScrollTimeline!==void 0),Hc={};function Gc(t,e){const n=Bn(t);return()=>Hc[e]??n()}const Or=Gc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$t=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ns={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$t([0,.65,.55,1]),circOut:$t([.55,0,1,.45]),backIn:$t([.31,.01,.66,-.59]),backOut:$t([.33,1.53,.69,.99])};function Nr(t,e){if(t)return typeof t=="function"?Or()?Er(t,e):"ease-out":gr(t)?$t(t):Array.isArray(t)?t.map(n=>Nr(n,e)||Ns.easeOut):Ns[t]}function Yc(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const f=Nr(a,i);Array.isArray(f)&&(u.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return l&&(d.pseudoElement=l),t.animate(u,d)}function kr(t){return typeof t=="function"&&"applyToOptions"in t}function Xc({type:t,...e}){return kr(t)&&Or()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class qc extends Qn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,X(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=Xc(e);this.animation=Yc(n,s,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Zn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):zc(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return J(Number(e))}get time(){return J(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=G(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Lr()?(this.animation.timeline=e,W):n(this)}}const Ir={anticipate:dr,backInOut:fr,circInOut:mr};function Zc(t){return t in Ir}function Qc(t){typeof t.ease=="string"&&Zc(t.ease)&&(t.ease=Ir[t.ease])}const ks=10;class Jc extends qc{constructor(e){Qc(e),Mr(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Jn({...r,autoplay:!1}),c=G(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-ks).value,a.sample(c).value,ks),a.stop()}}const Is=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ut.test(t)||t==="0")&&!t.startsWith("url("));function tl(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function el(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Is(i,e),a=Is(o,e);return Ft(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:tl(t)||(n==="spring"||kr(n))&&s}function Tn(t){t.duration=0,t.type}const nl=new Set(["opacity","clipPath","filter","transform"]),sl=Bn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function il(t){var u;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return sl()&&n&&nl.has(n)&&(n!=="transform"||!l)&&!c&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const rl=40;class ol extends Qn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:c,motionValue:l,element:u,...f}){var v;super(),this.stop=()=>{var m,y;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=_.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:c,motionValue:l,element:u,...f},h=(u==null?void 0:u.KeyframeResolver)||ts;this.keyframeResolver=new h(a,(m,y,g)=>this.onKeyframesResolved(m,y,d,!g),c,l,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=_.now(),el(e,o,r,a)||((st.instantAnimations||!c)&&(u==null||u(Zn(e,s,n))),e[0]=e[e.length-1],Tn(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>rl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!l&&il(d)?new Jc({...d,element:d.motionValue.owner.current}):new Jn(d);h.finished.then(()=>this.notifyFinished()).catch(W),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),$c()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const al=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cl(t){const e=al.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const ll=4;function Fr(t,e,n=1){X(n<=ll,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=cl(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ir(r)?parseFloat(r):r}return zn(i)?Fr(i,e,n+1):i}function es(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const jr=new Set(["width","height","top","left","right","bottom",...Bt]),ul={test:t=>t==="auto",parse:t=>t},Br=t=>e=>e.test(t),_r=[jt,P,tt,at,sc,nc,ul],Fs=t=>_r.find(Br(t));function fl(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||or(t):!0}const dl=new Set(["brightness","contrast","saturate","opacity"]);function hl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Hn)||[];if(!s)return t;const i=n.replace(s,"");let o=dl.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const ml=/\b([a-z-]*)\(.*?\)/gu,bn={...ut,getAnimatableNone:t=>{const e=t.match(ml);return e?e.map(hl).join(" "):t}},js={...jt,transform:Math.round},pl={rotate:at,rotateX:at,rotateY:at,rotateZ:at,scale:ae,scaleX:ae,scaleY:ae,scaleZ:ae,skew:at,skewX:at,skewY:at,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:Xt,originX:Ps,originY:Ps,originZ:P},ns={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,backgroundPositionX:P,backgroundPositionY:P,...pl,zIndex:js,fillOpacity:Xt,strokeOpacity:Xt,numOctaves:js},gl={...ns,color:N,backgroundColor:N,outlineColor:N,fill:N,stroke:N,borderColor:N,borderTopColor:N,borderRightColor:N,borderBottomColor:N,borderLeftColor:N,filter:bn,WebkitFilter:bn},Wr=t=>gl[t];function Ur(t,e){let n=Wr(t);return n!==bn&&(n=ut),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const yl=new Set(["auto","none","0"]);function vl(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!yl.has(o)&&qt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ur(n,i)}class xl extends ts{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let l=e[c];if(typeof l=="string"&&(l=l.trim(),zn(l))){const u=Fr(l,n.current);u!==void 0&&(e[c]=u),c===e.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!jr.has(s)||e.length!==2)return;const[i,o]=e,r=Fs(i),a=Fs(o);if(r!==a)if(Os(r)&&Os(a))for(let c=0;c<e.length;c++){const l=e[c];typeof l=="string"&&(e[c]=parseFloat(l))}else yt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||fl(e[i]))&&s.push(i);s.length&&vl(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=yt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=yt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,l])=>{e.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function $r(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Kr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function zr(t){return rr(t)&&"offsetHeight"in t}const Bs=30,Tl=t=>!isNaN(parseFloat(t)),zt={current:void 0};class bl{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const i=_.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=_.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Tl(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Re(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new _n);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return zt.current&&zt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=_.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Bs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bs);return Wn(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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 e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function H(t,e){return new bl(t,e)}const{schedule:ss}=yr(queueMicrotask,!1),z={x:!1,y:!1};function Hr(){return z.x||z.y}function wl(t){return t==="x"||t==="y"?z[t]?null:(z[t]=!0,()=>{z[t]=!1}):z.x||z.y?null:(z.x=z.y=!0,()=>{z.x=z.y=!1})}function Gr(t,e){const n=$r(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function _s(t){return!(t.pointerType==="touch"||Hr())}function Sl(t,e,n={}){const[s,i,o]=Gr(t,n),r=a=>{if(!_s(a))return;const{target:c}=a,l=e(c,a);if(typeof l!="function"||!c)return;const u=f=>{_s(f)&&(l(f),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Yr=(t,e)=>e?t===e?!0:Yr(t,e.parentElement):!1,is=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Al=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pl(t){return Al.has(t.tagName)||t.tabIndex!==-1}const ge=new WeakSet;function Ws(t){return e=>{e.key==="Enter"&&t(e)}}function Ue(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const El=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ws(()=>{if(ge.has(n))return;Ue(n,"down");const i=Ws(()=>{Ue(n,"up")}),o=()=>Ue(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Us(t){return is(t)&&!Hr()}function Cl(t,e,n={}){const[s,i,o]=Gr(t,n),r=a=>{const c=a.currentTarget;if(!Us(a))return;ge.add(c);const l=e(c,a),u=(h,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),ge.has(c)&&ge.delete(c),Us(h)&&typeof l=="function"&&l(h,{success:v})},f=h=>{u(h,c===window||c===document||n.useGlobalTarget||Yr(c,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),zr(a)&&(a.addEventListener("focus",l=>El(l,i)),!Pl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function rs(t){return rr(t)&&"ownerSVGElement"in t}const ye=new WeakMap;let ct;const Xr=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:rs(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Dl=Xr("inline","width","offsetWidth"),Ml=Xr("block","height","offsetHeight");function Rl({target:t,borderBoxSize:e}){var n;(n=ye.get(t))==null||n.forEach(s=>{s(t,{get width(){return Dl(t,e)},get height(){return Ml(t,e)}})})}function Vl(t){t.forEach(Rl)}function Ll(){typeof ResizeObserver>"u"||(ct=new ResizeObserver(Vl))}function Ol(t,e){ct||Ll();const n=$r(t);return n.forEach(s=>{let i=ye.get(s);i||(i=new Set,ye.set(s,i)),i.add(e),ct==null||ct.observe(s)}),()=>{n.forEach(s=>{const i=ye.get(s);i==null||i.delete(e),i!=null&&i.size||ct==null||ct.unobserve(s)})}}const ve=new Set;let Ct;function Nl(){Ct=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ve.forEach(e=>e(t))},window.addEventListener("resize",Ct)}function kl(t){return ve.add(t),Ct||Nl(),()=>{ve.delete(t),!ve.size&&typeof Ct=="function"&&(window.removeEventListener("resize",Ct),Ct=void 0)}}function Il(t,e){return typeof t=="function"?kl(t):Ol(t,e)}function qr(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return M.preUpdate(s,!0),()=>q(s)}function Fl(t){return rs(t)&&t.tagName==="svg"}function jl(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=qn(i,o,r);return e?a(s):a}const j=t=>!!(t&&t.getVelocity),Bl=[..._r,N,ut],_l=t=>Bl.find(Br(t)),os=A.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Wl(t=!0){const e=A.useContext(In);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=A.useId();A.useEffect(()=>{if(t)return i(o)},[t]);const r=A.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Zr=A.createContext({strict:!1}),$s={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"]},It={};for(const t in $s)It[t]={isEnabled:e=>$s[t].some(n=>!!e[n])};function Ul(t){for(const e in t)It[e]={...It[e],...t[e]}}const $l=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","ignoreStrict","viewport"]);function Ee(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$l.has(t)}let Qr=t=>!Ee(t);function Kl(t){typeof t=="function"&&(Qr=e=>e.startsWith("on")?!Ee(e):t(e))}try{Kl(require("@emotion/is-prop-valid").default)}catch{}function zl(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Qr(i)||n===!0&&Ee(i)||!e&&!Ee(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ve=A.createContext({});function Le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Zt(t){return typeof t=="string"||Array.isArray(t)}const as=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cs=["initial",...as];function Oe(t){return Le(t.animate)||cs.some(e=>Zt(t[e]))}function Jr(t){return!!(Oe(t)||t.variants)}function Hl(t,e){if(Oe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Zt(n)?n:void 0,animate:Zt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Gl(t){const{initial:e,animate:n}=Hl(t,A.useContext(Ve));return A.useMemo(()=>({initial:e,animate:n}),[Ks(e),Ks(n)])}function Ks(t){return Array.isArray(t)?t.join(" "):t}const Qt={};function Yl(t){for(const e in t)Qt[e]=t[e],Kn(e)&&(Qt[e].isCSSVariable=!0)}function to(t,{layout:e,layoutId:n}){return _t.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Qt[t]||t==="opacity")}const Xl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ql=Bt.length;function Zl(t,e,n){let s="",i=!0;for(let o=0;o<ql;o++){const r=Bt[o],a=t[r];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(r.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const l=Kr(a,ns[r]);if(!c){i=!1;const u=Xl[r]||r;s+=`${u}(${l}) `}n&&(e[r]=l)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function ls(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const c in e){const l=e[c];if(_t.has(c)){r=!0;continue}else if(Kn(c)){i[c]=l;continue}else{const u=Kr(l,ns[c]);c.startsWith("origin")?(a=!0,o[c]=u):s[c]=u}}if(e.transform||(r||n?s.transform=Zl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=o;s.transformOrigin=`${c} ${l} ${u}`}}const us=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function eo(t,e,n){for(const s in e)!j(e[s])&&!to(s,n)&&(t[s]=e[s])}function Ql({transformTemplate:t},e){return A.useMemo(()=>{const n=us();return ls(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Jl(t,e){const n=t.style||{},s={};return eo(s,n,t),Object.assign(s,Ql(t,e)),s}function tu(t,e){const n={},s=Jl(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const eu={offset:"stroke-dashoffset",array:"stroke-dasharray"},nu={offset:"strokeDashoffset",array:"strokeDasharray"};function su(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?eu:nu;t[o.offset]=P.transform(-s);const r=P.transform(e),a=P.transform(n);t[o.array]=`${r} ${a}`}function no(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},c,l,u){if(ls(t,a,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&su(f,i,o,r,!1)}const so=()=>({...us(),attrs:{}}),io=t=>typeof t=="string"&&t.toLowerCase()==="svg";function iu(t,e,n,s){const i=A.useMemo(()=>{const o=so();return no(o,e,io(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};eo(o,t.style,t),i.style={...o,...i.style}}return i}const ru=["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 fs(t){return typeof t!="string"||t.includes("-")?!1:!!(ru.indexOf(t)>-1||/[A-Z]/u.test(t))}function ou(t,e,n,{latestValues:s},i,o=!1){const a=(fs(t)?iu:tu)(e,s,i,t),c=zl(e,typeof t=="string",o),l=t!==A.Fragment?{...c,...a,ref:n}:{},{children:u}=e,f=A.useMemo(()=>j(u)?u.get():u,[u]);return A.createElement(t,{...l,children:f})}function zs(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function ds(t,e,n,s){if(typeof e=="function"){const[i,o]=zs(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=zs(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function xe(t){return j(t)?t.get():t}function au({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:cu(n,s,i,t),renderState:e()}}function cu(t,e,n,s){const i={},o=s(t,{});for(const d in o)i[d]=xe(o[d]);let{initial:r,animate:a}=t;const c=Oe(t),l=Jr(t);e&&l&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const f=u?a:r;if(f&&typeof f!="boolean"&&!Le(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const v=ds(t,d[h]);if(v){const{transitionEnd:m,transition:y,...g}=v;for(const T in g){let x=g[T];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(i[T]=x)}for(const T in m)i[T]=m[T]}}}return i}const ro=t=>(e,n)=>{const s=A.useContext(Ve),i=A.useContext(In),o=()=>au(t,e,s,i);return n?o():Me(o)};function hs(t,e,n){var o;const{style:s}=t,i={};for(const r in s)(j(s[r])||e.style&&j(e.style[r])||to(r,t)||((o=n==null?void 0:n.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=s[r]);return i}const lu=ro({scrapeMotionValuesFromProps:hs,createRenderState:us});function oo(t,e,n){const s=hs(t,e,n);for(const i in t)if(j(t[i])||j(e[i])){const o=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const uu=ro({scrapeMotionValuesFromProps:oo,createRenderState:so}),fu=Symbol.for("motionComponentSymbol");function Dt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function du(t,e,n){return A.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Dt(n)&&(n.current=s))},[e])}const ms=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hu="framerAppearId",ao="data-"+ms(hu),co=A.createContext({});function mu(t,e,n,s,i){var m,y;const{visualElement:o}=A.useContext(Ve),r=A.useContext(Zr),a=A.useContext(In),c=A.useContext(os).reducedMotion,l=A.useRef(null);s=s||r.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=l.current,f=A.useContext(co);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&pu(l.current,n,i,f);const d=A.useRef(!1);A.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[ao],v=A.useRef(!!h&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,h))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,h)));return kn(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),v.current&&u.animationState&&u.animationState.animateChanges())}),A.useEffect(()=>{u&&(!v.current&&u.animationState&&u.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,h)}),v.current=!1),u.enteringChildren=void 0)}),u}function pu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:lo(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Dt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:c,layoutRoot:l})}function lo(t){if(t)return t.options.allowProjection!==!1?t.projection:lo(t.parent)}function $e(t,{forwardMotionProps:e=!1}={},n,s){n&&Ul(n);const i=fs(t)?uu:lu;function o(a,c){let l;const u={...A.useContext(os),...a,layoutId:gu(a)},{isStatic:f}=u,d=Gl(a),h=i(a,f);if(!f&&Nn){yu(u,n);const v=vu(u);l=v.MeasureLayout,d.visualElement=mu(t,h,u,s,v.ProjectionNode)}return b.jsxs(Ve.Provider,{value:d,children:[l&&d.visualElement?b.jsx(l,{visualElement:d.visualElement,...u}):null,ou(t,a,du(h,d.visualElement,c),h,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=A.forwardRef(o);return r[fu]=t,r}function gu({layoutId:t}){const e=A.useContext(sr).id;return e&&t!==void 0?e+"-"+t:t}function yu(t,e){const n=A.useContext(Zr).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Ft(!1,s,"lazy-strict-mode"):X(!1,s,"lazy-strict-mode")}}function vu(t){const{drag:e,layout:n}=It;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function xu(t,e){if(typeof Proxy>"u")return $e;const n=new Map,s=(o,r)=>$e(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&Re(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,$e(r,void 0,t,e)),n.get(r))})}function uo({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Tu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function bu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ke(t){return t===void 0||t===1}function wn({scale:t,scaleX:e,scaleY:n}){return!Ke(t)||!Ke(e)||!Ke(n)}function mt(t){return wn(t)||fo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function fo(t){return Hs(t.x)||Hs(t.y)}function Hs(t){return t&&t!=="0%"}function Ce(t,e,n){const s=t-n,i=e*s;return n+i}function Gs(t,e,n,s,i){return i!==void 0&&(t=Ce(t,i,s)),Ce(t,n,s)+e}function Sn(t,e=0,n=1,s,i){t.min=Gs(t.min,e,n,s,i),t.max=Gs(t.max,e,n,s,i)}function ho(t,{x:e,y:n}){Sn(t.x,e.translate,e.scale,e.originPoint),Sn(t.y,n.translate,n.scale,n.originPoint)}const Ys=.999999999999,Xs=1.0000000000001;function wu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Rt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ho(t,r)),s&&mt(o.latestValues)&&Rt(t,o.latestValues))}e.x<Xs&&e.x>Ys&&(e.x=1),e.y<Xs&&e.y>Ys&&(e.y=1)}function Mt(t,e){t.min=t.min+e,t.max=t.max+e}function qs(t,e,n,s,i=.5){const o=V(t.min,t.max,i);Sn(t,e,n,o,s)}function Rt(t,e){qs(t.x,e.x,e.scaleX,e.scale,e.originX),qs(t.y,e.y,e.scaleY,e.scale,e.originY)}function mo(t,e){return uo(bu(t.getBoundingClientRect(),e))}function Su(t,e,n){const s=mo(t,n),{scroll:i}=e;return i&&(Mt(s.x,i.offset.x),Mt(s.y,i.offset.y)),s}const Zs=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vt=()=>({x:Zs(),y:Zs()}),Qs=()=>({min:0,max:0}),L=()=>({x:Qs(),y:Qs()}),An={current:null},po={current:!1};function Au(){if(po.current=!0,!!Nn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>An.current=t.matches;t.addEventListener("change",e),e()}else An.current=!1}const Pu=new WeakMap;function Eu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(j(i))t.addValue(s,i);else if(j(o))t.addValue(s,H(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,H(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Js=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Cu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ts,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 d=_.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,M.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=r;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Oe(n),this.isVariantNode=Jr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];c[d]!==void 0&&j(h)&&h.set(c[d])}}mount(e){var n;this.current=e,Pu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),po.current||Au(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:An.current,process.env.NODE_ENV!=="production"&&Re(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),q(this.notifyUpdate),q(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=_t.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in It){const n=It[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Js.length;s++){const i=Js[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Eu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=H(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(ir(s)||or(s))?s=parseFloat(s):!_l(s)&&ut.test(n)&&(s=Ur(e,n)),this.setBaseTarget(e,j(s)?s.get():s)),j(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=ds(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!j(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new _n),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ss.render(this.render)}}class go extends Cu{constructor(){super(...arguments),this.KeyframeResolver=xl}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;j(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function yo(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i==null||i.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Du(t){return window.getComputedStyle(t)}class Mu extends go{constructor(){super(...arguments),this.type="html",this.renderInstance=yo}readValueFromInstance(e,n){var s;if(_t.has(n))return(s=this.projection)!=null&&s.isProjecting?pn(n):jc(e,n);{const i=Du(e),o=(Kn(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return mo(e,n)}build(e,n,s){ls(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return hs(e,n,s)}}const vo=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"]);function Ru(t,e,n,s){yo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(vo.has(i)?i:ms(i),e.attrs[i])}class Vu extends go{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_t.has(n)){const s=Wr(n);return s&&s.default||0}return n=vo.has(n)?n:ms(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return oo(e,n,s)}build(e,n,s){no(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Ru(e,n,s,i)}mount(e){this.isSVGTag=io(e.tagName),super.mount(e)}}const Lu=(t,e)=>fs(t)?new Vu(e):new Mu(e,{allowProjection:t!==A.Fragment});function Lt(t,e,n){const s=t.getProps();return ds(s,e,n!==void 0?n:s.custom,t)}const Pn=t=>Array.isArray(t);function Ou(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,H(n))}function Nu(t){return Pn(t)?t[t.length-1]||0:t}function ku(t,e){const n=Lt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Nu(o[r]);Ou(t,r,a)}}function Iu(t){return!!(j(t)&&t.add)}function En(t,e){const n=t.getValue("willChange");if(Iu(n))return n.add(e);if(!n&&st.WillChange){const s=new st.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function xo(t){return t.props[ao]}const Fu=t=>t!==null;function ju(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Fu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Bu={type:"spring",stiffness:500,damping:25,restSpeed:10},_u=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Wu={type:"keyframes",duration:.8},Uu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$u=(t,{keyframes:e})=>e.length>2?Wu:_t.has(t)?t.startsWith("scale")?_u(e[1]):Bu:Uu;function Ku({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const ps=(t,e,n,s={},i,o)=>r=>{const a=es(s,t)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-G(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Ku(a)||Object.assign(u,$u(t,u)),u.duration&&(u.duration=G(u.duration)),u.repeatDelay&&(u.repeatDelay=G(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Tn(u),u.delay===0&&(f=!0)),(st.instantAnimations||st.skipAnimations)&&(f=!0,Tn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=ju(u.keyframes,a);if(d!==void 0){M.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Jn(u):new ol(u)};function zu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function To(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const c=[],l=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const f=t.getValue(u,t.latestValues[u]??null),d=a[u];if(d===void 0||l&&zu(l,u))continue;const h={delay:n,...es(o||{},u)},v=f.get();if(v!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===v&&!h.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const g=xo(t);if(g){const T=window.MotionHandoffAnimation(g,u,M);T!==null&&(h.startTime=T,m=!0)}}En(t,u),f.start(ps(u,f,d,t.shouldReduceMotion&&jr.has(u)?{type:!1}:h,t,m));const y=f.animation;y&&c.push(y)}return r&&Promise.all(c).then(()=>{M.update(()=>{r&&ku(t,r)})}),c}function bo(t,e,n,s=0,i=1){const o=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Cn(t,e,n={}){var c;const s=Lt(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(To(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return Hu(t,e,l,u,f,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function Hu(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Cn(c,e,{...r,delay:n+(typeof s=="function"?0:s)+bo(t.variantChildren,c,s,i,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function Gu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Cn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Cn(t,e,n);else{const i=typeof e=="function"?Lt(t,e,n.custom):e;s=Promise.all(To(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function wo(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Yu=cs.length;function So(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?So(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Yu;n++){const s=cs[n],i=t.props[s];(Zt(i)||i===!1)&&(e[s]=i)}return e}const Xu=[...as].reverse(),qu=as.length;function Zu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Gu(t,n,s)))}function Qu(t){let e=Zu(t),n=ti(),s=!0;const i=c=>(l,u)=>{var d;const f=Lt(t,u,c==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:v,...m}=f;l={...l,...m,...v}}return l};function o(c){e=c(t)}function r(c){const{props:l}=t,u=So(t.parent)||{},f=[],d=new Set;let h={},v=1/0;for(let y=0;y<qu;y++){const g=Xu[y],T=n[g],x=l[g]!==void 0?l[g]:u[g],S=Zt(x),w=g===c?T.isActive:null;w===!1&&(v=y);let D=x===u[g]&&x!==l[g]&&S;if(D&&s&&t.manuallyAnimateOnMount&&(D=!1),T.protectedKeys={...h},!T.isActive&&w===null||!x&&!T.prevProp||Le(x)||typeof x=="boolean")continue;const E=Ju(T.prevProp,x);let C=E||g===c&&T.isActive&&!D&&S||y>v&&S,O=!1;const F=Array.isArray(x)?x:[x];let Tt=F.reduce(i(g),{});w===!1&&(Tt={});const{prevResolvedValues:xs={}}=T,Ia={...xs,...Tt},Ts=I=>{C=!0,d.has(I)&&(O=!0,d.delete(I)),T.needsAnimating[I]=!0;const U=t.getValue(I);U&&(U.liveStyle=!1)};for(const I in Ia){const U=Tt[I],dt=xs[I];if(h.hasOwnProperty(I))continue;let bt=!1;Pn(U)&&Pn(dt)?bt=!wo(U,dt):bt=U!==dt,bt?U!=null?Ts(I):d.add(I):U!==void 0&&d.has(I)?Ts(I):T.protectedKeys[I]=!0}T.prevProp=x,T.prevResolvedValues=Tt,T.isActive&&(h={...h,...Tt}),s&&t.blockInitialAnimation&&(C=!1);const bs=D&&E;C&&(!bs||O)&&f.push(...F.map(I=>{const U={type:g};if(typeof I=="string"&&s&&!bs&&t.manuallyAnimateOnMount&&t.parent){const{parent:dt}=t,bt=Lt(dt,I);if(dt.enteringChildren&&bt){const{delayChildren:Fa}=bt.transition||{};U.delay=bo(dt.enteringChildren,t,Fa)}}return{animation:I,options:U}}))}if(d.size){const y={};if(typeof l.initial!="boolean"){const g=Lt(t,Array.isArray(l.initial)?l.initial[0]:l.initial);g&&g.transition&&(y.transition=g.transition)}d.forEach(g=>{const T=t.getBaseTarget(g),x=t.getValue(g);x&&(x.liveStyle=!0),y[g]=T??null}),f.push({animation:y})}let m=!!f.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(f):Promise.resolve()}function a(c,l){var f;if(n[c].isActive===l)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(c,l)}),n[c].isActive=l;const u=r(c);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ti(),s=!0}}}function Ju(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!wo(e,t):!1}function ht(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ti(){return{animate:ht(!0),whileInView:ht(),whileHover:ht(),whileTap:ht(),whileDrag:ht(),whileFocus:ht(),exit:ht()}}class ft{constructor(e){this.isMounted=!1,this.node=e}update(){}}class tf extends ft{constructor(e){super(e),e.animationState||(e.animationState=Qu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Le(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let ef=0;class nf extends ft{constructor(){super(...arguments),this.id=ef++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const sf={animation:{Feature:tf},exit:{Feature:nf}};function Jt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function re(t){return{point:{x:t.pageX,y:t.pageY}}}const rf=t=>e=>is(e)&&t(e,re(e));function Ht(t,e,n,s){return Jt(t,e,rf(n),s)}const Ao=1e-4,of=1-Ao,af=1+Ao,Po=.01,cf=0-Po,lf=0+Po;function B(t){return t.max-t.min}function uf(t,e,n){return Math.abs(t-e)<=n}function ei(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=B(n)/B(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=of&&t.scale<=af||isNaN(t.scale))&&(t.scale=1),(t.translate>=cf&&t.translate<=lf||isNaN(t.translate))&&(t.translate=0)}function Gt(t,e,n,s){ei(t.x,e.x,n.x,s?s.originX:void 0),ei(t.y,e.y,n.y,s?s.originY:void 0)}function ni(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function ff(t,e,n){ni(t.x,e.x,n.x),ni(t.y,e.y,n.y)}function si(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function Yt(t,e,n){si(t.x,e.x,n.x),si(t.y,e.y,n.y)}function K(t){return[t("x"),t("y")]}const Eo=({current:t})=>t?t.ownerDocument.defaultView:null,ii=(t,e)=>Math.abs(t-e);function df(t,e){const n=ii(t.x,e.x),s=ii(t.y,e.y);return Math.sqrt(n**2+s**2)}class Co{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=He(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,v=df(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!v)return;const{point:m}=d,{timestamp:y}=k;this.history.push({...m,timestamp:y});const{onStart:g,onMove:T}=this.handlers;h||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ze(h,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:v,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=He(d.type==="pointercancel"?this.lastMoveEventInfo:ze(h,this.transformPagePoint),this.history);this.startEvent&&v&&v(d,g),m&&m(d,g)},!is(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=re(e),c=ze(a,this.transformPagePoint),{point:l}=c,{timestamp:u}=k;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(e,He(c,this.history)),this.removeListeners=ne(Ht(this.contextWindow,"pointermove",this.handlePointerMove),Ht(this.contextWindow,"pointerup",this.handlePointerUp),Ht(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),q(this.updatePoint)}}function ze(t,e){return e?{point:e(t.point)}:t}function ri(t,e){return{x:t.x-e.x,y:t.y-e.y}}function He({point:t},e){return{point:t,delta:ri(t,Do(e)),offset:ri(t,hf(e)),velocity:mf(e,.1)}}function hf(t){return t[0]}function Do(t){return t[t.length-1]}function mf(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Do(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>G(e)));)n--;if(!s)return{x:0,y:0};const o=J(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function pf(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?V(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function oi(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function gf(t,{top:e,left:n,bottom:s,right:i}){return{x:oi(t.x,n,i),y:oi(t.y,e,s)}}function ai(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function yf(t,e){return{x:ai(t.x,e.x),y:ai(t.y,e.y)}}function vf(t,e){let n=.5;const s=B(t),i=B(e);return i>s?n=kt(e.min,e.max-s,t.min):s>i&&(n=kt(t.min,t.max-i,e.min)),et(0,1,n)}function xf(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Dn=.35;function Tf(t=Dn){return t===!1?t=0:t===!0&&(t=Dn),{x:ci(t,"left","right"),y:ci(t,"top","bottom")}}function ci(t,e,n){return{min:li(t,e),max:li(t,n)}}function li(t,e){return typeof t=="number"?t:t[e]||0}const bf=new WeakMap;class wf{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=L(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(re(f).point)},r=(f,d)=>{const{drag:h,dragPropagation:v,onDragStart:m}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wl(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),K(g=>{let T=this.getAxisMotionValue(g).get()||0;if(tt.test(T)){const{projection:x}=this.visualElement;if(x&&x.layout){const S=x.layout.layoutBox[g];S&&(T=B(S)*(parseFloat(T)/100))}}this.originPoint[g]=T}),m&&M.postRender(()=>m(f,d)),En(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:m,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:g}=d;if(v&&this.currentDirection===null){this.currentDirection=Sf(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),y&&y(f,d)},c=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>K(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Co(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:Eo(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&M.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!ce(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=pf(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&Dt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=gf(s.layoutBox,e):this.constraints=!1,this.elastic=Tf(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&K(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=xf(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Dt(e))return!1;const s=e.current;X(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Su(s,i.root,this.visualElement.getTransformPagePoint());let r=yf(i.layout.layoutBox,o);if(n){const a=n(Tu(r));this.hasMutatedConstraints=!!a,a&&(r=uo(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=K(u=>{if(!ce(u,n,this.currentDirection))return;let f=c&&c[u]||{};r&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,v={type:"inertia",velocity:s?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(u,v)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return En(this.visualElement,e),s.start(ps(e,s,0,n,this.visualElement,!1))}stopAnimation(){K(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){K(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){K(n=>{const{drag:s}=this.getProps();if(!ce(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-V(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Dt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};K(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const c=a.get();i[r]=vf({min:c,max:c},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),K(r=>{if(!ce(r,e,null))return;const a=this.getAxisMotionValue(r),{min:c,max:l}=this.constraints[r];a.set(V(c,l,i[r]))})}addListeners(){if(!this.visualElement.current)return;bf.set(this.visualElement,this);const e=this.visualElement.current,n=Ht(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Dt(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),M.read(s);const r=Jt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(K(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Dn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ce(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Sf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Af extends ft{constructor(e){super(e),this.removeGroupControls=W,this.removeListeners=W,this.controls=new wf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||W}unmount(){this.removeGroupControls(),this.removeListeners()}}const ui=t=>(e,n)=>{t&&M.postRender(()=>t(e,n))};class Pf extends ft{constructor(){super(...arguments),this.removePointerDownListener=W}onPointerDown(e){this.session=new Co(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Eo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:ui(e),onStart:ui(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&M.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Ht(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Te={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Wt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=fi(t,e.target.x),s=fi(t,e.target.y);return`${n}% ${s}%`}},Ef={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=ut.parse(t);if(i.length>5)return s;const o=ut.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const l=V(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=l),typeof i[3+r]=="number"&&(i[3+r]/=l),o(i)}};let Ge=!1;class Cf extends A.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Yl(Df),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Ge&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Te.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Ge=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||M.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),ss.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ge=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Mo(t){const[e,n]=Wl(),s=A.useContext(sr);return b.jsx(Cf,{...t,layoutGroup:s,switchLayoutGroup:A.useContext(co),isPresent:e,safeToRemove:n})}const Df={borderRadius:{...Wt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wt,borderTopRightRadius:Wt,borderBottomLeftRadius:Wt,borderBottomRightRadius:Wt,boxShadow:Ef};function Mf(t,e,n){const s=j(t)?t:H(t);return s.start(ps("",s,e,n)),s.animation}const Rf=(t,e)=>t.depth-e.depth;class Vf{constructor(){this.children=[],this.isDirty=!1}add(e){Fn(this.children,e),this.isDirty=!0}remove(e){jn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Rf),this.isDirty=!1,this.children.forEach(e)}}function Lf(t,e){const n=_.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(q(s),t(o-e))};return M.setup(s,!0),()=>q(s)}const Ro=["TopLeft","TopRight","BottomLeft","BottomRight"],Of=Ro.length,di=t=>typeof t=="string"?parseFloat(t):t,hi=t=>typeof t=="number"||P.test(t);function Nf(t,e,n,s,i,o){i?(t.opacity=V(0,n.opacity??1,kf(s)),t.opacityExit=V(e.opacity??1,0,If(s))):o&&(t.opacity=V(e.opacity??1,n.opacity??1,s));for(let r=0;r<Of;r++){const a=`border${Ro[r]}Radius`;let c=mi(e,a),l=mi(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||hi(c)===hi(l)?(t[a]=Math.max(V(di(c),di(l),s),0),(tt.test(l)||tt.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,s))}function mi(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const kf=Vo(0,.5,hr),If=Vo(.5,.95,W);function Vo(t,e,n){return s=>s<t?0:s>e?1:n(kt(t,e,s))}function pi(t,e){t.min=e.min,t.max=e.max}function $(t,e){pi(t.x,e.x),pi(t.y,e.y)}function gi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function yi(t,e,n,s,i){return t-=e,t=Ce(t,1/n,s),i!==void 0&&(t=Ce(t,1/i,s)),t}function Ff(t,e=0,n=1,s=.5,i,o=t,r=t){if(tt.test(e)&&(e=parseFloat(e),e=V(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=V(o.min,o.max,s);t===o&&(a-=e),t.min=yi(t.min,e,n,a,i),t.max=yi(t.max,e,n,a,i)}function vi(t,e,[n,s,i],o,r){Ff(t,e[n],e[s],e[i],e.scale,o,r)}const jf=["x","scaleX","originX"],Bf=["y","scaleY","originY"];function xi(t,e,n,s){vi(t.x,e,jf,n?n.x:void 0,s?s.x:void 0),vi(t.y,e,Bf,n?n.y:void 0,s?s.y:void 0)}function Ti(t){return t.translate===0&&t.scale===1}function Lo(t){return Ti(t.x)&&Ti(t.y)}function bi(t,e){return t.min===e.min&&t.max===e.max}function _f(t,e){return bi(t.x,e.x)&&bi(t.y,e.y)}function wi(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Oo(t,e){return wi(t.x,e.x)&&wi(t.y,e.y)}function Si(t){return B(t.x)/B(t.y)}function Ai(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Wf{constructor(){this.members=[]}add(e){Fn(this.members,e),e.scheduleRender()}remove(e){if(jn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Uf(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:v}=n;l&&(s=`perspective(${l}px) ${s}`),u&&(s+=`rotate(${u}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),h&&(s+=`skewX(${h}deg) `),v&&(s+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Ye=["","X","Y","Z"],$f=1e3;let Kf=0;function Xe(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function No(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=xo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&No(s)}function ko({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Kf++,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.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(Gf),this.nodes.forEach(Zf),this.nodes.forEach(Qf),this.nodes.forEach(Yf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,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 Vf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new _n),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const c=this.eventHandlers.get(r);c&&c.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=rs(r)&&!Fl(r),this.instance=r;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const d=()=>this.root.updateBlockedByResize=!1;M.read(()=>{f=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=Lf(d,250),Te.hasAnimatedSinceResize&&(Te.hasAnimatedSinceResize=!1,this.nodes.forEach(Ci)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||l.getDefaultTransition()||sd,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=l.getProps(),g=!this.targetLayout||!Oo(this.targetLayout,h),T=!f&&d;if(this.options.layoutRoot||this.resumeFrom||T||f&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...es(v,"layout"),onPlay:m,onComplete:y};(l.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,T)}else f||Ci(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),q(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(Jf),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&No(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Pi);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ei);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qf),this.nodes.forEach(zf),this.nodes.forEach(Hf)):this.nodes.forEach(Ei),this.clearAllSnapshots();const a=_.now();k.delta=et(0,1e3/60,a-k.timestamp),k.timestamp=a,k.isProcessing=!0,Fe.update.process(k),Fe.preRender.process(k),Fe.render.process(k),k.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ss.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xf),this.sharedNodes.forEach(td)}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&&!B(this.snapshot.measuredBox.x)&&!B(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 r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=L(),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,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Lo(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;r&&this.instance&&(a||mt(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return r&&(c=this.removeTransform(c)),id(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:r}=this.options;if(!r)return L();const a=r.measureViewportBox();if(!(((l=this.scroll)==null?void 0:l.wasRoot)||this.path.some(rd))){const{scroll:u}=this.root;u&&(Mt(a.x,u.offset.x),Mt(a.y,u.offset.y))}return a}removeElementScroll(r){var c;const a=L();if($(a,r),(c=this.scroll)!=null&&c.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:f,options:d}=u;u!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&$(a,r),Mt(a.x,f.offset.x),Mt(a.y,f.offset.y))}return a}applyTransform(r,a=!1){const c=L();$(c,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Rt(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),mt(u.latestValues)&&Rt(c,u.latestValues)}return mt(this.latestValues)&&Rt(c,this.latestValues),c}removeTransform(r){const a=L();$(a,r);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!mt(l.latestValues))continue;wn(l.latestValues)&&l.updateSnapshot();const u=L(),f=l.measurePageBox();$(u,f),xi(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return mt(this.latestValues)&&xi(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==k.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var d;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(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!(!this.layout||!(u||f))){if(this.resolvedRelativeTargetAt=k.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),Yt(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ff(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$(this.target,this.layout.layoutBox),ho(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),Yt(this.relativeTargetOrigin,this.target,h.target),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||wn(this.parent.latestValues)||fo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var v;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let c=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===k.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;$(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;wu(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=L());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gi(this.prevProjectionDelta.x,this.projectionDelta.x),gi(this.prevProjectionDelta.y,this.projectionDelta.y)),Gt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Ai(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ai(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Vt(),this.projectionDelta=Vt(),this.projectionDeltaWithTransform=Vt()}setAnimationOrigin(r,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},f=Vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=L(),h=c?c.source:void 0,v=this.layout?this.layout.source:void 0,m=h!==v,y=this.getStack(),g=!y||y.members.length<=1,T=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(nd));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const w=S/1e3;Di(f.x,r.x,w),Di(f.y,r.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Yt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ed(this.relativeTarget,this.relativeTargetOrigin,d,w),x&&_f(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=L()),$(x,this.relativeTarget)),m&&(this.animationValues=u,Nf(u,l,this.latestValues,w,T,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,c,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(l=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||l.stop(),this.pendingAnimation&&(q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Te.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=H(0)),this.currentAnimation=Mf(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($f),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=r;if(!(!a||!c||!l)){if(this!==r&&this.layout&&l&&Io(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||L();const f=B(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+f;const d=B(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+d}$(a,c),Rt(a,u),Gt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Wf),this.sharedNodes.get(r).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Xe("z",r,l,this.animationValues);for(let u=0;u<Ye.length;u++)Xe(`rotate${Ye[u]}`,r,l,this.animationValues),Xe(`skew${Ye[u]}`,r,l,this.animationValues);r.render();for(const u in l)r.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=xe(a==null?void 0:a.pointerEvents)||"",r.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=xe(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!mt(this.latestValues)&&(r.transform=c?c({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=Uf(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,l.animationValues?r.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in Qt){if(u[v]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:g}=Qt[v],T=f==="none"?u[v]:m(u[v],l);if(y){const x=y.length;for(let S=0;S<x;S++)r[y[S]]=T}else g?this.options.visualElement.renderState.vars[v]=T:r[v]=T}this.options.layoutId&&(r.pointerEvents=l===this?xe(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Pi),this.root.sharedNodes.clear()}}}function zf(t){t.updateLayout()}function Hf(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?K(f=>{const d=r?e.measuredBox[f]:e.layoutBox[f],h=B(d);d.min=s[f].min,d.max=d.min+h}):Io(o,e.layoutBox,s)&&K(f=>{const d=r?e.measuredBox[f]:e.layoutBox[f],h=B(s[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=Vt();Gt(a,s,e.layoutBox);const c=Vt();r?Gt(c,t.applyTransform(i,!0),e.measuredBox):Gt(c,s,e.layoutBox);const l=!Lo(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const v=L();Yt(v,e.layoutBox,d.layoutBox);const m=L();Yt(m,s,h.layoutBox),Oo(v,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=v,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Gf(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Yf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Xf(t){t.clearSnapshot()}function Pi(t){t.clearMeasurements()}function Ei(t){t.isLayoutDirty=!1}function qf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ci(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Zf(t){t.resolveTargetDelta()}function Qf(t){t.calcProjection()}function Jf(t){t.resetSkewAndRotation()}function td(t){t.removeLeadSnapshot()}function Di(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Mi(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function ed(t,e,n,s){Mi(t.x,e.x,n.x,s),Mi(t.y,e.y,n.y,s)}function nd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const sd={duration:.45,ease:[.4,0,.1,1]},Ri=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vi=Ri("applewebkit/")&&!Ri("chrome/")?Math.round:W;function Li(t){t.min=Vi(t.min),t.max=Vi(t.max)}function id(t){Li(t.x),Li(t.y)}function Io(t,e,n){return t==="position"||t==="preserve-aspect"&&!uf(Si(e),Si(n),.2)}function rd(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const od=ko({attachResizeListener:(t,e)=>Jt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qe={current:void 0},Fo=ko({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!qe.current){const t=new od({});t.mount(window),t.setOptions({layoutScroll:!0}),qe.current=t}return qe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ad={pan:{Feature:Pf},drag:{Feature:Af,ProjectionNode:Fo,MeasureLayout:Mo}};function Oi(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&M.postRender(()=>o(e,re(e)))}class cd extends ft{mount(){const{current:e}=this.node;e&&(this.unmount=Sl(e,(n,s)=>(Oi(this.node,s,"Start"),i=>Oi(this.node,i,"End"))))}unmount(){}}class ld extends ft{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=ne(Jt(this.node.current,"focus",()=>this.onFocus()),Jt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ni(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&M.postRender(()=>o(e,re(e)))}class ud extends ft{mount(){const{current:e}=this.node;e&&(this.unmount=Cl(e,(n,s)=>(Ni(this.node,s,"Start"),(i,{success:o})=>Ni(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mn=new WeakMap,Ze=new WeakMap,fd=t=>{const e=Mn.get(t.target);e&&e(t)},dd=t=>{t.forEach(fd)};function hd({root:t,...e}){const n=t||document;Ze.has(n)||Ze.set(n,{});const s=Ze.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(dd,{root:t,...e})),s[i]}function md(t,e,n){const s=hd(e);return Mn.set(t,n),s.observe(t),()=>{Mn.delete(t),s.unobserve(t)}}const pd={some:0,all:1};class gd extends ft{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:pd[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=l?u:f;d&&d(c)};return md(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(yd(e,n))&&this.startObserver()}unmount(){}}function yd({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const vd={inView:{Feature:gd},tap:{Feature:ud},focus:{Feature:ld},hover:{Feature:cd}},xd={layout:{ProjectionNode:Fo,MeasureLayout:Mo}},Td={...sf,...vd,...ad,...xd},bd=xu(Td,Lu),wd=50,ki=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Sd=()=>({time:0,x:ki(),y:ki()}),Ad={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Ii(t,e,n,s){const i=n[e],{length:o,position:r}=Ad[e],a=i.current,c=n.time;i.current=t[`scroll${r}`],i.scrollLength=t[`scroll${o}`]-t[`client${o}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=kt(0,i.scrollLength,i.current);const l=s-c;i.velocity=l>wd?0:Wn(i.current-a,l)}function Pd(t,e,n){Ii(t,"x",e,n),Ii(t,"y",e,n),e.time=n}function Ed(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(zr(s))n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const i=s.getBoundingClientRect();s=s.parentElement;const o=s.getBoundingClientRect();n.x+=i.left-o.left,n.y+=i.top-o.top}else if(s instanceof SVGGraphicsElement){const{x:i,y:o}=s.getBBox();n.x+=i,n.y+=o;let r=null,a=s.parentNode;for(;!r;)a.tagName==="svg"&&(r=a),a=s.parentNode;s=r}else break;return n}const Rn={start:0,center:.5,end:1};function Fi(t,e,n=0){let s=0;if(t in Rn&&(t=Rn[t]),typeof t=="string"){const i=parseFloat(t);t.endsWith("px")?s=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?s=i/100*document.documentElement.clientWidth:t.endsWith("vh")?s=i/100*document.documentElement.clientHeight:t=i}return typeof t=="number"&&(s=e*t),n+s}const Cd=[0,0];function Dd(t,e,n,s){let i=Array.isArray(t)?t:Cd,o=0,r=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,Rn[t]?t:"0"]),o=Fi(i[0],n,s),r=Fi(i[1],e),o-r}const Md={All:[[0,0],[1,1]]},Rd={x:0,y:0};function Vd(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function Ld(t,e,n){const{offset:s=Md.All}=n,{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?Ed(i,t):Rd,c=i===t?{width:t.scrollWidth,height:t.scrollHeight}:Vd(i),l={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const f=s.length;for(let d=0;d<f;d++){const h=Dd(s[d],l[r],c[r],a[o]);!u&&h!==e[o].interpolatorOffsets[d]&&(u=!0),e[o].offset[d]=h}u&&(e[o].interpolate=qn(e[o].offset,Dr(s),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=et(0,1,e[o].interpolate(e[o].current))}function Od(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight,process.env.NODE_ENV!=="production"&&t&&e&&e!==t&&Re(getComputedStyle(t).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function Nd(t,e,n,s={}){return{measure:i=>{Od(t,s.target,n),Pd(t,n,i),(s.offset||s.target)&&Ld(t,n,s)},notify:()=>e(n)}}const Ut=new WeakMap,ji=new WeakMap,Qe=new WeakMap,Bi=t=>t===document.scrollingElement?window:t;function jo(t,{container:e=document.scrollingElement,...n}={}){if(!e)return W;let s=Qe.get(e);s||(s=new Set,Qe.set(e,s));const i=Sd(),o=Nd(e,t,i,n);if(s.add(o),!Ut.has(e)){const a=()=>{for(const f of s)f.measure(k.timestamp);M.preUpdate(c)},c=()=>{for(const f of s)f.notify()},l=()=>M.read(a);Ut.set(e,l);const u=Bi(e);window.addEventListener("resize",l,{passive:!0}),e!==document.documentElement&&ji.set(e,Il(e,l)),u.addEventListener("scroll",l,{passive:!0}),l()}const r=Ut.get(e);return M.read(r,!1,!0),()=>{var l;q(r);const a=Qe.get(e);if(!a||(a.delete(o),a.size))return;const c=Ut.get(e);Ut.delete(e),c&&(Bi(e).removeEventListener("scroll",c),(l=ji.get(e))==null||l(),window.removeEventListener("resize",c))}}const _i=new Map;function kd(t){const e={value:0},n=jo(s=>{e.value=s[t.axis].progress*100},t);return{currentTime:e,cancel:n}}function Bo({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);const i=_i.get(e)??new Map;_i.set(e,i);const o=n.target??"self",r=i.get(o)??{},a=s+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&Lr()?new ScrollTimeline({source:e,axis:s}):kd({container:e,...n})),r[a]}function Id(t,e){const n=Bo(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:s=>(s.pause(),qr(i=>{s.time=s.duration*i},n))})}function Fd(t){return t.length===2}function jd(t,e){return Fd(t)?jo(n=>{t(n[e.axis].progress,n)},e):qr(t,Bo(e))}function Bd(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return W;const i={axis:e,container:n,...s};return typeof t=="function"?jd(t,i):Id(t,i)}const _d=()=>({scrollX:H(0),scrollY:H(0),scrollXProgress:H(0),scrollYProgress:H(0)}),le=t=>t?!t.current:!1;function Wd({container:t,target:e,...n}={}){const s=Me(_d),i=A.useRef(null),o=A.useRef(!1),r=A.useCallback(()=>(i.current=Bd((a,{x:c,y:l})=>{s.scrollX.set(c.current),s.scrollXProgress.set(c.progress),s.scrollY.set(l.current),s.scrollYProgress.set(l.progress)},{...n,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0}),()=>{var a;(a=i.current)==null||a.call(i)}),[t,e,JSON.stringify(n.offset)]);return kn(()=>{if(o.current=!1,le(t)||le(e)){o.current=!0;return}else return r()},[r]),A.useEffect(()=>{if(o.current)return X(!le(t),"Container ref is defined but not hydrated","use-scroll-ref"),X(!le(e),"Target ref is defined but not hydrated","use-scroll-ref"),r()},[r]),s}function Ud(t){const e=Me(()=>H(t)),{isStatic:n}=A.useContext(os);if(n){const[,s]=A.useState(t);A.useEffect(()=>e.on("change",s),[])}return e}function _o(t,e){const n=Ud(e()),s=()=>n.set(e());return s(),kn(()=>{const i=()=>M.preRender(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),q(s)}}),n}function $d(t){zt.current=[],t();const e=_o(zt.current,t);return zt.current=void 0,e}function Kd(t,e,n,s){if(typeof t=="function")return $d(t);const i=typeof e=="function"?e:jl(e,n,s);return Array.isArray(t)?Wi(t,i):Wi([t],([o])=>i(o))}function Wi(t,e){const n=Me(()=>[]);return _o(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}const zd=({children:t,className:e})=>{const n=A.useRef(null),{scrollYProgress:s}=Wd({target:n});if(typeof t!="string")throw new Error("TextReveal: children must be a string");const i=t.split(" ");return b.jsx("div",{ref:n,className:Y.cn("z-0 relative h-[200vh]",e),children:b.jsx("div",{className:"sticky top-0 mx-auto flex h-[50%] max-w-4xl items-center bg-transparent px-[1rem] py-[5rem]",children:b.jsx("span",{ref:n,className:"flex flex-wrap p-5 text-2xl font-bold text-black/20 dark:text-white/20 md:p-8 md:text-3xl lg:p-10 lg:text-4xl xl:text-5xl",children:i.map((o,r)=>{const a=r/i.length,c=a+1/i.length;return b.jsx(Hd,{progress:s,range:[a,c],children:o},r)})})})})},Hd=({children:t,progress:e,range:n})=>{const s=Kd(e,n,[0,1]);return b.jsxs("span",{className:"relative mx-1 lg:mx-1.5",children:[b.jsx("span",{className:"absolute opacity-30",children:t}),b.jsx(bd.span,{style:{opacity:s},className:"text-black dark:text-white",children:t})]})};function Gd(t,e){const n=p.createContext(e),s=o=>{const{children:r,...a}=o,c=p.useMemo(()=>a,Object.values(a));return b.jsx(n.Provider,{value:c,children:r})};s.displayName=t+"Provider";function i(o){const r=p.useContext(n);if(r)return r;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[s,i]}function Wo(t,e=[]){let n=[];function s(o,r){const a=p.createContext(r),c=n.length;n=[...n,r];const l=f=>{var g;const{scope:d,children:h,...v}=f,m=((g=d==null?void 0:d[t])==null?void 0:g[c])||a,y=p.useMemo(()=>v,Object.values(v));return b.jsx(m.Provider,{value:y,children:h})};l.displayName=o+"Provider";function u(f,d){var m;const h=((m=d==null?void 0:d[t])==null?void 0:m[c])||a,v=p.useContext(h);if(v)return v;if(r!==void 0)return r;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,u]}const i=()=>{const o=n.map(r=>p.createContext(r));return function(a){const c=(a==null?void 0:a[t])||o;return p.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[s,Yd(i,...e)]}function Yd(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const s=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const r=s.reduce((a,{useScope:c,scopeName:l})=>{const f=c(o)[`__scope${l}`];return{...a,...f}},{});return p.useMemo(()=>({[`__scope${e.scopeName}`]:r}),[r])}};return n.scopeName=e.scopeName,n}function Ui(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Xd(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Ui(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():Ui(t[i],null)}}}}function it(...t){return p.useCallback(Xd(...t),t)}function nt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}var te=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},qd=p[" useId ".trim().toString()]||(()=>{}),Zd=0;function Je(t){const[e,n]=p.useState(qd());return te(()=>{n(s=>s??String(Zd++))},[t]),t||(e?`radix-${e}`:"")}var Qd=p[" useInsertionEffect ".trim().toString()]||te;function Jd({prop:t,defaultProp:e,onChange:n=()=>{},caller:s}){const[i,o,r]=th({defaultProp:e,onChange:n}),a=t!==void 0,c=a?t:i;{const u=p.useRef(t!==void 0);p.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${s} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,s])}const l=p.useCallback(u=>{var f;if(a){const d=eh(u)?u(t):u;d!==t&&((f=r.current)==null||f.call(r,d))}else o(u)},[a,t,o,r]);return[c,l]}function th({defaultProp:t,onChange:e}){const[n,s]=p.useState(t),i=p.useRef(n),o=p.useRef(e);return Qd(()=>{o.current=e},[e]),p.useEffect(()=>{var r;i.current!==n&&((r=o.current)==null||r.call(o,n),i.current=n)},[n,i]),[n,s,o]}function eh(t){return typeof t=="function"}var nh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rt=nh.reduce((t,e)=>{const n=On.createSlot(`Primitive.${e}`),s=p.forwardRef((i,o)=>{const{asChild:r,...a}=i,c=r?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...a,ref:o})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function sh(t,e){t&&ja.flushSync(()=>t.dispatchEvent(e))}function ee(t){const e=p.useRef(t);return p.useEffect(()=>{e.current=t}),p.useMemo(()=>(...n)=>{var s;return(s=e.current)==null?void 0:s.call(e,...n)},[])}function ih(t,e=globalThis==null?void 0:globalThis.document){const n=ee(t);p.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[n,e])}var rh="DismissableLayer",Vn="dismissableLayer.update",oh="dismissableLayer.pointerDownOutside",ah="dismissableLayer.focusOutside",$i,Uo=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$o=p.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:r,onDismiss:a,...c}=t,l=p.useContext(Uo),[u,f]=p.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=p.useState({}),v=it(e,E=>f(E)),m=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),T=u?m.indexOf(u):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=T>=g,w=uh(E=>{const C=E.target,O=[...l.branches].some(F=>F.contains(C));!S||O||(i==null||i(E),r==null||r(E),E.defaultPrevented||a==null||a())},d),D=fh(E=>{const C=E.target;[...l.branches].some(F=>F.contains(C))||(o==null||o(E),r==null||r(E),E.defaultPrevented||a==null||a())},d);return ih(E=>{T===l.layers.size-1&&(s==null||s(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},d),p.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&($i=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Ki(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=$i)}},[u,d,n,l]),p.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Ki())},[u,l]),p.useEffect(()=>{const E=()=>h({});return document.addEventListener(Vn,E),()=>document.removeEventListener(Vn,E)},[]),b.jsx(rt.div,{...c,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...t.style},onFocusCapture:nt(t.onFocusCapture,D.onFocusCapture),onBlurCapture:nt(t.onBlurCapture,D.onBlurCapture),onPointerDownCapture:nt(t.onPointerDownCapture,w.onPointerDownCapture)})});$o.displayName=rh;var ch="DismissableLayerBranch",lh=p.forwardRef((t,e)=>{const n=p.useContext(Uo),s=p.useRef(null),i=it(e,s);return p.useEffect(()=>{const o=s.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),b.jsx(rt.div,{...t,ref:i})});lh.displayName=ch;function uh(t,e=globalThis==null?void 0:globalThis.document){const n=ee(t),s=p.useRef(!1),i=p.useRef(()=>{});return p.useEffect(()=>{const o=a=>{if(a.target&&!s.current){let c=function(){Ko(oh,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=c,e.addEventListener("click",i.current,{once:!0})):c()}else e.removeEventListener("click",i.current);s.current=!1},r=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(r),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>s.current=!0}}function fh(t,e=globalThis==null?void 0:globalThis.document){const n=ee(t),s=p.useRef(!1);return p.useEffect(()=>{const i=o=>{o.target&&!s.current&&Ko(ah,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Ki(){const t=new CustomEvent(Vn);document.dispatchEvent(t)}function Ko(t,e,n,{discrete:s}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),s?sh(i,o):i.dispatchEvent(o)}var tn="focusScope.autoFocusOnMount",en="focusScope.autoFocusOnUnmount",zi={bubbles:!1,cancelable:!0},dh="FocusScope",zo=p.forwardRef((t,e)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...r}=t,[a,c]=p.useState(null),l=ee(i),u=ee(o),f=p.useRef(null),d=it(e,m=>c(m)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(s){let m=function(x){if(h.paused||!a)return;const S=x.target;a.contains(S)?f.current=S:lt(f.current,{select:!0})},y=function(x){if(h.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||lt(f.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&<(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const T=new MutationObserver(g);return a&&T.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),T.disconnect()}}},[s,a,h.paused]),p.useEffect(()=>{if(a){Gi.add(h);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(tn,zi);a.addEventListener(tn,l),a.dispatchEvent(g),g.defaultPrevented||(hh(vh(Ho(a)),{select:!0}),document.activeElement===m&<(a))}return()=>{a.removeEventListener(tn,l),setTimeout(()=>{const g=new CustomEvent(en,zi);a.addEventListener(en,u),a.dispatchEvent(g),g.defaultPrevented||lt(m??document.body,{select:!0}),a.removeEventListener(en,u),Gi.remove(h)},0)}}},[a,l,u,h]);const v=p.useCallback(m=>{if(!n&&!s||h.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(y&&g){const T=m.currentTarget,[x,S]=mh(T);x&&S?!m.shiftKey&&g===S?(m.preventDefault(),n&<(x,{select:!0})):m.shiftKey&&g===x&&(m.preventDefault(),n&<(S,{select:!0})):g===T&&m.preventDefault()}},[n,s,h.paused]);return b.jsx(rt.div,{tabIndex:-1,...r,ref:d,onKeyDown:v})});zo.displayName=dh;function hh(t,{select:e=!1}={}){const n=document.activeElement;for(const s of t)if(lt(s,{select:e}),document.activeElement!==n)return}function mh(t){const e=Ho(t),n=Hi(e,t),s=Hi(e.reverse(),t);return[n,s]}function Ho(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Hi(t,e){for(const n of t)if(!ph(n,{upTo:e}))return n}function ph(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function gh(t){return t instanceof HTMLInputElement&&"select"in t}function lt(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&gh(t)&&e&&t.select()}}var Gi=yh();function yh(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Yi(t,e),t.unshift(e)},remove(e){var n;t=Yi(t,e),(n=t[0])==null||n.resume()}}}function Yi(t,e){const n=[...t],s=n.indexOf(e);return s!==-1&&n.splice(s,1),n}function vh(t){return t.filter(e=>e.tagName!=="A")}var xh="Portal",Go=p.forwardRef((t,e)=>{var a;const{container:n,...s}=t,[i,o]=p.useState(!1);te(()=>o(!0),[]);const r=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return r?er.createPortal(b.jsx(rt.div,{...s,ref:e}),r):null});Go.displayName=xh;function Th(t,e){return p.useReducer((n,s)=>e[n][s]??n,t)}var Ne=t=>{const{present:e,children:n}=t,s=bh(e),i=typeof n=="function"?n({present:s.isPresent}):p.Children.only(n),o=it(s.ref,wh(i));return typeof n=="function"||s.isPresent?p.cloneElement(i,{ref:o}):null};Ne.displayName="Presence";function bh(t){const[e,n]=p.useState(),s=p.useRef(null),i=p.useRef(t),o=p.useRef("none"),r=t?"mounted":"unmounted",[a,c]=Th(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const l=ue(s.current);o.current=a==="mounted"?l:"none"},[a]),te(()=>{const l=s.current,u=i.current;if(u!==t){const d=o.current,h=ue(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),te(()=>{if(e){let l;const u=e.ownerDocument.defaultView??window,f=h=>{const m=ue(s.current).includes(CSS.escape(h.animationName));if(h.target===e&&m&&(c("ANIMATION_END"),!i.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",l=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},d=h=>{h.target===e&&(o.current=ue(s.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{u.clearTimeout(l),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(l=>{s.current=l?getComputedStyle(l):null,n(l)},[])}}function ue(t){return(t==null?void 0:t.animationName)||"none"}function wh(t){var s,i;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var nn=0;function Sh(){p.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Xi()),document.body.insertAdjacentElement("beforeend",t[1]??Xi()),nn++,()=>{nn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),nn--}},[])}function Xi(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Q=function(){return Q=Object.assign||function(e){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Q.apply(this,arguments)};function Yo(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(n[s[i]]=t[s[i]]);return n}function Ah(t,e,n){if(n||arguments.length===2)for(var s=0,i=e.length,o;s<i;s++)(o||!(s in e))&&(o||(o=Array.prototype.slice.call(e,0,s)),o[s]=e[s]);return t.concat(o||Array.prototype.slice.call(e))}var be="right-scroll-bar-position",we="width-before-scroll-bar",Ph="with-scroll-bars-hidden",Eh="--removed-body-scroll-bar-size";function sn(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Ch(t,e){var n=A.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(s){var i=n.value;i!==s&&(n.value=s,n.callback(s,i))}}}})[0];return n.callback=e,n.facade}var Dh=typeof window<"u"?p.useLayoutEffect:p.useEffect,qi=new WeakMap;function Mh(t,e){var n=Ch(null,function(s){return t.forEach(function(i){return sn(i,s)})});return Dh(function(){var s=qi.get(n);if(s){var i=new Set(s),o=new Set(t),r=n.current;i.forEach(function(a){o.has(a)||sn(a,null)}),o.forEach(function(a){i.has(a)||sn(a,r)})}qi.set(n,t)},[t]),n}function Rh(t){return t}function Vh(t,e){e===void 0&&(e=Rh);var n=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var r=e(o,s);return n.push(r),function(){n=n.filter(function(a){return a!==r})}},assignSyncMedium:function(o){for(s=!0;n.length;){var r=n;n=[],r.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){s=!0;var r=[];if(n.length){var a=n;n=[],a.forEach(o),r=n}var c=function(){var u=r;r=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){r.push(u),l()},filter:function(u){return r=r.filter(u),n}}}};return i}function Lh(t){t===void 0&&(t={});var e=Vh(null);return e.options=Q({async:!0,ssr:!1},t),e}var Xo=function(t){var e=t.sideCar,n=Yo(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=e.read();if(!s)throw new Error("Sidecar medium not found");return p.createElement(s,Q({},n))};Xo.isSideCarExport=!0;function Oh(t,e){return t.useMedium(e),Xo}var qo=Lh(),rn=function(){},ke=p.forwardRef(function(t,e){var n=p.useRef(null),s=p.useState({onScrollCapture:rn,onWheelCapture:rn,onTouchMoveCapture:rn}),i=s[0],o=s[1],r=t.forwardProps,a=t.children,c=t.className,l=t.removeScrollBar,u=t.enabled,f=t.shards,d=t.sideCar,h=t.noRelative,v=t.noIsolation,m=t.inert,y=t.allowPinchZoom,g=t.as,T=g===void 0?"div":g,x=t.gapMode,S=Yo(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,D=Mh([n,e]),E=Q(Q({},S),i);return p.createElement(p.Fragment,null,u&&p.createElement(w,{sideCar:qo,removeScrollBar:l,shards:f,noRelative:h,noIsolation:v,inert:m,setCallbacks:o,allowPinchZoom:!!y,lockRef:n,gapMode:x}),r?p.cloneElement(p.Children.only(a),Q(Q({},E),{ref:D})):p.createElement(T,Q({},E,{className:c,ref:D}),a))});ke.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ke.classNames={fullWidth:we,zeroRight:be};var Nh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kh(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Nh();return e&&t.setAttribute("nonce",e),t}function Ih(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Fh(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var jh=function(){var t=0,e=null;return{add:function(n){t==0&&(e=kh())&&(Ih(e,n),Fh(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Bh=function(){var t=jh();return function(e,n){p.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Zo=function(){var t=Bh(),e=function(n){var s=n.styles,i=n.dynamic;return t(s,i),null};return e},_h={left:0,top:0,right:0,gap:0},on=function(t){return parseInt(t||"",10)||0},Wh=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],s=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[on(n),on(s),on(i)]},Uh=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return _h;var e=Wh(t),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,s-n+e[2]-e[0])}},$h=Zo(),Ot="data-scroll-locked",Kh=function(t,e,n,s){var i=t.left,o=t.top,r=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(
|
|
3
|
-
overflow: hidden `).concat(
|
|
4
|
-
padding-right: `).concat(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),S=require("react"),T=require("./index-Cs64egIu.cjs"),Bi=require("react-dom"),kn=require("@radix-ui/react-slot"),ke=require("lucide-react");require("@radix-ui/react-select");require("next-intl");require("clsx");function hf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=hf(S),xx=hf(Bi),mf=S.createContext({});function vs(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Vi=typeof window<"u",Wi=Vi?S.useLayoutEffect:S.useEffect,Hi=S.createContext(null);function zi(e,t){e.indexOf(t)===-1&&e.push(t)}function Yi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const zt=(e,t,n)=>n>t?t:n<e?e:n;function Ga(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ur=()=>{},Rt=()=>{};process.env.NODE_ENV!=="production"&&(ur=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ga(t,n))},Rt=(e,t,n)=>{if(!e)throw new Error(Ga(t,n))});const Jt={},pf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function gf(e){return typeof e=="object"&&e!==null}const vf=e=>/^0[^.\s]+$/u.test(e);function Ui(e){let t;return()=>(t===void 0&&(t=e()),t)}const ut=e=>e,wx=(e,t)=>n=>t(e(n)),Jr=(...e)=>e.reduce(wx),rr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Gi{constructor(){this.subscriptions=[]}add(t){return zi(this.subscriptions,t),()=>Yi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const a=this.subscriptions[s];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Pt=e=>e*1e3,bt=e=>e/1e3;function Ki(e,t){return t?e*(1e3/t):0}const Wl=new Set;function ys(e,t,n){e||Wl.has(t)||(console.warn(Ga(t,n)),Wl.add(t))}const yf=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Sx=1e-7,Cx=12;function Mx(e,t,n,r,o){let s,a,i=0;do a=t+(n-t)/2,s=yf(a,r,o)-e,s>0?n=a:t=a;while(Math.abs(s)>Sx&&++i<Cx);return a}function eo(e,t,n,r){if(e===t&&n===r)return ut;const o=s=>Mx(s,0,1,e,n);return s=>s===0||s===1?s:yf(o(s),t,r)}const bf=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xf=e=>t=>1-e(1-t),wf=eo(.33,1.53,.69,.99),qi=xf(wf),Sf=bf(qi),Cf=e=>(e*=2)<1?.5*qi(e):.5*(2-Math.pow(2,-10*(e-1))),Xi=e=>1-Math.sin(Math.acos(e)),Mf=xf(Xi),Ef=bf(Xi),Ex=eo(.42,0,1,1),Tx=eo(0,0,.58,1),Tf=eo(.42,0,.58,1),Px=e=>Array.isArray(e)&&typeof e[0]!="number",Pf=e=>Array.isArray(e)&&typeof e[0]=="number",Hl={linear:ut,easeIn:Ex,easeInOut:Tf,easeOut:Tx,circIn:Xi,circInOut:Ef,circOut:Mf,backIn:qi,backInOut:Sf,backOut:wf,anticipate:Cf},Dx=e=>typeof e=="string",zl=e=>{if(Pf(e)){Rt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return eo(t,n,r,o)}else if(Dx(e))return Rt(Hl[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Hl[e];return e},Po=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Rx(e,t){let n=new Set,r=new Set,o=!1,s=!1;const a=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(u.schedule(d),e()),d(i)}const u={schedule:(d,l=!1,f=!1)=>{const g=f&&o?n:r;return l&&a.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(i=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const Ax=40;function Df(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=Po.reduce((w,M)=>(w[M]=Rx(s),w),{}),{setup:i,read:c,resolveKeyframes:u,preUpdate:d,update:l,preRender:f,render:p,postRender:g}=a,y=()=>{const w=Jt.useManualTiming?o.timestamp:performance.now();n=!1,Jt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(w-o.timestamp,Ax),1)),o.timestamp=w,o.isProcessing=!0,i.process(o),c.process(o),u.process(o),d.process(o),l.process(o),f.process(o),p.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(y))},b=()=>{n=!0,r=!0,o.isProcessing||e(y)};return{schedule:Po.reduce((w,M)=>{const C=a[M];return w[M]=(P,E=!1,D=!1)=>(n||b(),C.schedule(P,E,D)),w},{}),cancel:w=>{for(let M=0;M<Po.length;M++)a[Po[M]].cancel(w)},state:o,steps:a}}const{schedule:Ce,cancel:At,state:qe,steps:aa}=Df(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0);let Wo;function Ox(){Wo=void 0}const lt={now:()=>(Wo===void 0&<.set(qe.isProcessing||Jt.useManualTiming?qe.timestamp:performance.now()),Wo),set:e=>{Wo=e,queueMicrotask(Ox)}},Rf=e=>t=>typeof t=="string"&&t.startsWith(e),Zi=Rf("--"),kx=Rf("var(--"),Qi=e=>kx(e)?Nx.test(e.split("/*")[0].trim()):!1,Nx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,dr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fr={...dr,transform:e=>zt(0,1,e)},Do={...dr,default:1},kr=e=>Math.round(e*1e5)/1e5,Ji=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _x(e){return e==null}const Ix=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ec=(e,t)=>n=>!!(typeof n=="string"&&Ix.test(n)&&n.startsWith(e)||t&&!_x(n)&&Object.prototype.hasOwnProperty.call(n,t)),Af=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,a,i]=r.match(Ji);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(a),alpha:i!==void 0?parseFloat(i):1}},jx=e=>zt(0,255,e),ia={...dr,transform:e=>Math.round(jx(e))},Pn={test:ec("rgb","red"),parse:Af("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ia.transform(e)+", "+ia.transform(t)+", "+ia.transform(n)+", "+kr(Fr.transform(r))+")"};function Lx(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Ka={test:ec("#"),parse:Lx,transform:Pn.transform},to=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),on=to("deg"),Wt=to("%"),ie=to("px"),Fx=to("vh"),$x=to("vw"),Yl={...Wt,parse:e=>Wt.parse(e)/100,transform:e=>Wt.transform(e*100)},Un={test:ec("hsl","hue"),parse:Af("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Wt.transform(kr(t))+", "+Wt.transform(kr(n))+", "+kr(Fr.transform(r))+")"},Ve={test:e=>Pn.test(e)||Ka.test(e)||Un.test(e),parse:e=>Pn.test(e)?Pn.parse(e):Un.test(e)?Un.parse(e):Ka.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Pn.transform(e):Un.transform(e),getAnimatableNone:e=>{const t=Ve.parse(e);return t.alpha=0,Ve.transform(t)}},Bx=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vx(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ji))==null?void 0:t.length)||0)+(((n=e.match(Bx))==null?void 0:n.length)||0)>0}const Of="number",kf="color",Wx="var",Hx="var(",Ul="${}",zx=/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 $r(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const i=t.replace(zx,c=>(Ve.test(c)?(r.color.push(s),o.push(kf),n.push(Ve.parse(c))):c.startsWith(Hx)?(r.var.push(s),o.push(Wx),n.push(c)):(r.number.push(s),o.push(Of),n.push(parseFloat(c))),++s,Ul)).split(Ul);return{values:n,split:i,indexes:r,types:o}}function Nf(e){return $r(e).values}function _f(e){const{split:t,types:n}=$r(e),r=t.length;return o=>{let s="";for(let a=0;a<r;a++)if(s+=t[a],o[a]!==void 0){const i=n[a];i===Of?s+=kr(o[a]):i===kf?s+=Ve.transform(o[a]):s+=o[a]}return s}}const Yx=e=>typeof e=="number"?0:Ve.test(e)?Ve.getAnimatableNone(e):e;function Ux(e){const t=Nf(e);return _f(e)(t.map(Yx))}const ln={test:Vx,parse:Nf,createTransformer:_f,getAnimatableNone:Ux};function ca(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 Gx({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,a=0;if(!t)o=s=a=n;else{const i=n<.5?n*(1+t):n+t-n*t,c=2*n-i;o=ca(c,i,e+1/3),s=ca(c,i,e),a=ca(c,i,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}function Zo(e,t){return n=>n>0?t:e}const Ae=(e,t,n)=>e+(t-e)*n,la=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Kx=[Ka,Pn,Un],qx=e=>Kx.find(t=>t.test(e));function Gl(e){const t=qx(e);if(ur(!!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===Un&&(n=Gx(n)),n}const Kl=(e,t)=>{const n=Gl(e),r=Gl(t);if(!n||!r)return Zo(e,t);const o={...n};return s=>(o.red=la(n.red,r.red,s),o.green=la(n.green,r.green,s),o.blue=la(n.blue,r.blue,s),o.alpha=Ae(n.alpha,r.alpha,s),Pn.transform(o))},qa=new Set(["none","hidden"]);function Xx(e,t){return qa.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Zx(e,t){return n=>Ae(e,t,n)}function tc(e){return typeof e=="number"?Zx:typeof e=="string"?Qi(e)?Zo:Ve.test(e)?Kl:ew:Array.isArray(e)?If:typeof e=="object"?Ve.test(e)?Kl:Qx:Zo}function If(e,t){const n=[...e],r=n.length,o=e.map((s,a)=>tc(s)(s,t[a]));return s=>{for(let a=0;a<r;a++)n[a]=o[a](s);return n}}function Qx(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=tc(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function Jx(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][r[s]],i=e.values[a]??0;n[o]=i,r[s]++}return n}const ew=(e,t)=>{const n=ln.createTransformer(t),r=$r(e),o=$r(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?qa.has(e)&&!o.values.length||qa.has(t)&&!r.values.length?Xx(e,t):Jr(If(Jx(r,o),o.values),n):(ur(!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"),Zo(e,t))};function jf(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ae(e,t,n):tc(e)(e,t)}const tw=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ce.update(t,n),stop:()=>At(t),now:()=>qe.isProcessing?qe.timestamp:lt.now()}},Lf=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Qo=2e4;function nc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Qo;)t+=n,r=e.next(t);return t>=Qo?1/0:t}function nw(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(nc(r),Qo);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:bt(o)}}const rw=5;function Ff(e,t,n){const r=Math.max(t-rw,0);return Ki(n-e(r),t-r)}const De={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},ua=.001;function ow({duration:e=De.duration,bounce:t=De.bounce,velocity:n=De.velocity,mass:r=De.mass}){let o,s;ur(e<=Pt(De.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=zt(De.minDamping,De.maxDamping,a),e=zt(De.minDuration,De.maxDuration,bt(e)),a<1?(o=u=>{const d=u*a,l=d*e,f=d-n,p=Xa(u,a),g=Math.exp(-l);return ua-f/p*g},s=u=>{const l=u*a*e,f=l*n+n,p=Math.pow(a,2)*Math.pow(u,2)*e,g=Math.exp(-l),y=Xa(Math.pow(u,2),a);return(-o(u)+ua>0?-1:1)*((f-p)*g)/y}):(o=u=>{const d=Math.exp(-u*e),l=(u-n)*e+1;return-ua+d*l},s=u=>{const d=Math.exp(-u*e),l=(n-u)*(e*e);return d*l});const i=5/e,c=aw(o,s,i);if(e=Pt(e),isNaN(c))return{stiffness:De.stiffness,damping:De.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const sw=12;function aw(e,t,n){let r=n;for(let o=1;o<sw;o++)r=r-e(r)/t(r);return r}function Xa(e,t){return e*Math.sqrt(1-t*t)}const iw=["duration","bounce"],cw=["stiffness","damping","mass"];function ql(e,t){return t.some(n=>e[n]!==void 0)}function lw(e){let t={velocity:De.velocity,stiffness:De.stiffness,damping:De.damping,mass:De.mass,isResolvedFromDuration:!1,...e};if(!ql(e,cw)&&ql(e,iw))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*zt(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:De.mass,stiffness:o,damping:s}}else{const n=ow(e);t={...t,...n,mass:De.mass},t.isResolvedFromDuration=!0}return t}function Jo(e=De.visualDuration,t=De.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],i={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:l,velocity:f,isResolvedFromDuration:p}=lw({...n,velocity:-bt(n.velocity||0)}),g=f||0,y=u/(2*Math.sqrt(c*d)),b=a-s,v=bt(Math.sqrt(c/d)),x=Math.abs(b)<5;r||(r=x?De.restSpeed.granular:De.restSpeed.default),o||(o=x?De.restDelta.granular:De.restDelta.default);let w;if(y<1){const C=Xa(v,y);w=P=>{const E=Math.exp(-y*v*P);return a-E*((g+y*v*b)/C*Math.sin(C*P)+b*Math.cos(C*P))}}else if(y===1)w=C=>a-Math.exp(-v*C)*(b+(g+v*b)*C);else{const C=v*Math.sqrt(y*y-1);w=P=>{const E=Math.exp(-y*v*P),D=Math.min(C*P,300);return a-E*((g+y*v*b)*Math.sinh(D)+C*b*Math.cosh(D))/C}}const M={calculatedDuration:p&&l||null,next:C=>{const P=w(C);if(p)i.done=C>=l;else{let E=C===0?g:0;y<1&&(E=C===0?Pt(g):Ff(w,C,P));const D=Math.abs(E)<=r,R=Math.abs(a-P)<=o;i.done=D&&R}return i.value=i.done?a:P,i},toString:()=>{const C=Math.min(nc(M),Qo),P=Lf(E=>M.next(C*E).value,C,30);return C+"ms "+P},toTransition:()=>{}};return M}Jo.applyToOptions=e=>{const t=nw(e,100,Jo);return e.ease=t.ease,e.duration=Pt(t.duration),e.type="keyframes",e};function Za({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:a,min:i,max:c,restDelta:u=.5,restSpeed:d}){const l=e[0],f={done:!1,value:l},p=D=>i!==void 0&&D<i||c!==void 0&&D>c,g=D=>i===void 0?c:c===void 0||Math.abs(i-D)<Math.abs(c-D)?i:c;let y=n*t;const b=l+y,v=a===void 0?b:a(b);v!==b&&(y=v-l);const x=D=>-y*Math.exp(-D/r),w=D=>v+x(D),M=D=>{const R=x(D),A=w(D);f.done=Math.abs(R)<=u,f.value=f.done?v:A};let C,P;const E=D=>{p(f.value)&&(C=D,P=Jo({keyframes:[f.value,g(f.value)],velocity:Ff(w,D,f.value),damping:o,stiffness:s,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:D=>{let R=!1;return!P&&C===void 0&&(R=!0,M(D),E(D)),C!==void 0&&D>=C?P.next(D-C):(!R&&M(D),f)}}}function uw(e,t,n){const r=[],o=n||Jt.mix||jf,s=e.length-1;for(let a=0;a<s;a++){let i=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||ut:t;i=Jr(c,i)}r.push(i)}return r}function rc(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Rt(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=uw(t,r,o),c=i.length,u=d=>{if(a&&d<e[0])return t[0];let l=0;if(c>1)for(;l<e.length-2&&!(d<e[l+1]);l++);const f=rr(e[l],e[l+1],d);return i[l](f)};return n?d=>u(zt(e[0],e[s-1],d)):u}function dw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=rr(0,t,r);e.push(Ae(n,1,o))}}function $f(e){const t=[0];return dw(t,e.length-1),t}function fw(e,t){return e.map(n=>n*t)}function hw(e,t){return e.map(()=>t||Tf).splice(0,e.length-1)}function Gn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Px(r)?r.map(zl):zl(r),s={done:!1,value:t[0]},a=fw(n&&n.length===t.length?n:$f(t),e),i=rc(a,t,{ease:Array.isArray(o)?o:hw(t,o)});return{calculatedDuration:e,next:c=>(s.value=i(c),s.done=c>=e,s)}}const mw=e=>e!==null;function oc(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(mw),i=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const pw={decay:Za,inertia:Za,tween:Gn,keyframes:Gn,spring:Jo};function Bf(e){typeof e.type=="string"&&(e.type=pw[e.type])}class sc{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 gw=e=>e/100;class ac extends sc{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==lt.now()&&this.tick(lt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Bf(t);const{type:n=Gn,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:a=0}=t;let{keyframes:i}=t;const c=n||Gn;process.env.NODE_ENV!=="production"&&c!==Gn&&Rt(i.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`,"spring-two-frames"),c!==Gn&&typeof i[0]!="number"&&(this.mixKeyframes=Jr(gw,jf(i[0],i[1])),i=[0,100]);const u=c({...t,keyframes:i});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...i].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=nc(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+o,this.totalDuration=this.resolvedDuration*(r+1)-o,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:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:i,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:l,repeatType:f,repeatDelay:p,type:g,onUpdate:y,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,M=r;if(l){const D=Math.min(this.currentTime,o)/i;let R=Math.floor(D),A=D%1;!A&&D>=1&&(A=1),A===1&&R--,R=Math.min(R,l+1),!!(R%2)&&(f==="reverse"?(A=1-A,p&&(A-=p/i)):f==="mirror"&&(M=a)),w=zt(0,1,A)*i}const C=x?{done:!1,value:d[0]}:M.next(w);s&&(C.value=s(C.value));let{done:P}=C;!x&&c!==null&&(P=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return E&&g!==Za&&(C.value=oc(d,this.options,b,this.speed)),y&&y(C.value),E&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return bt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bt(t)}get time(){return bt(this.currentTime)}set time(t){var n;t=Pt(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(lt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=bt(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=tw,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(s=(o=this.options).onPlay)==null||s.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(lt.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 vw(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Dn=e=>e*180/Math.PI,Qa=e=>{const t=Dn(Math.atan2(e[1],e[0]));return Ja(t)},yw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Qa,rotateZ:Qa,skewX:e=>Dn(Math.atan(e[1])),skewY:e=>Dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ja=e=>(e=e%360,e<0&&(e+=360),e),Xl=Qa,Zl=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ql=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),bw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Zl,scaleY:Ql,scale:e=>(Zl(e)+Ql(e))/2,rotateX:e=>Ja(Dn(Math.atan2(e[6],e[5]))),rotateY:e=>Ja(Dn(Math.atan2(-e[2],e[0]))),rotateZ:Xl,rotate:Xl,skewX:e=>Dn(Math.atan(e[4])),skewY:e=>Dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ei(e){return e.includes("scale")?1:0}function ti(e,t){if(!e||e==="none")return ei(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=bw,o=n;else{const i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=yw,o=i}if(!o)return ei(t);const s=r[t],a=o[1].split(",").map(ww);return typeof s=="function"?s(a):a[s]}const xw=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ti(n,t)};function ww(e){return parseFloat(e.trim())}const fr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hr=new Set(fr),Jl=e=>e===dr||e===ie,Sw=new Set(["x","y","z"]),Cw=fr.filter(e=>!Sw.has(e));function Mw(e){const t=[];return Cw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const An={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-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})=>ti(t,"x"),y:(e,{transform:t})=>ti(t,"y")};An.translateX=An.x;An.translateY=An.y;const On=new Set;let ni=!1,ri=!1,oi=!1;function Vf(){if(ri){const e=Array.from(On).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Mw(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,a])=>{var i;(i=r.getValue(s))==null||i.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ri=!1,ni=!1,On.forEach(e=>e.complete(oi)),On.clear()}function Wf(){On.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ri=!0)})}function Ew(){oi=!0,Wf(),Vf(),oi=!1}class ic{constructor(t,n,r,o,s,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(On.add(this),ni||(ni=!0,Ce.read(Wf),Ce.resolveKeyframes(Vf))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const i=r.readValue(n,a);i!=null&&(t[0]=i)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}vw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),On.delete(this)}cancel(){this.state==="scheduled"&&(On.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Tw=e=>e.startsWith("--");function Pw(e,t,n){Tw(t)?e.style.setProperty(t,n):e.style[t]=n}const Hf=Ui(()=>window.ScrollTimeline!==void 0),Dw={};function Rw(e,t){const n=Ui(e);return()=>Dw[t]??n()}const zf=Rw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,eu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dr([0,.65,.55,1]),circOut:Dr([.55,0,1,.45]),backIn:Dr([.31,.01,.66,-.59]),backOut:Dr([.33,1.53,.69,.99])};function Yf(e,t){if(e)return typeof e=="function"?zf()?Lf(e,t):"ease-out":Pf(e)?Dr(e):Array.isArray(e)?e.map(n=>Yf(n,t)||eu.easeOut):eu[e]}function Aw(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:a="loop",ease:i="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const l=Yf(i,o);Array.isArray(l)&&(d.easing=l);const f={delay:r,duration:o,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function Uf(e){return typeof e=="function"&&"applyToOptions"in e}function Ow({type:e,...t}){return Uf(e)&&zf()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class kw extends sc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:a=!1,finalKeyframe:i,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=a,this.options=t,Rt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ow(t);this.animation=Aw(n,r,o,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const d=oc(o,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(d):Pw(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(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 t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return bt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+bt(t)}get time(){return bt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Pt(t)}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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Hf()?(this.animation.timeline=t,ut):n(this)}}const Gf={anticipate:Cf,backInOut:Sf,circInOut:Ef};function Nw(e){return e in Gf}function _w(e){typeof e.ease=="string"&&Nw(e.ease)&&(e.ease=Gf[e.ease])}const tu=10;class Iw extends kw{constructor(t){_w(t),Bf(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const i=new ac({...a,autoplay:!1}),c=Pt(this.finishedTime??this.time);n.setWithVelocity(i.sample(c-tu).value,i.sample(c).value,tu),i.stop()}}const nu=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ln.test(e)||e==="0")&&!e.startsWith("url("));function jw(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 Lw(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=nu(o,t),i=nu(s,t);return ur(a===i,`You are trying to animate ${t} from "${o}" to "${s}". "${a?s:o}" is not an animatable value.`,"value-not-animatable"),!a||!i?!1:jw(e)||(n==="spring"||Uf(n))&&r}function si(e){e.duration=0,e.type="keyframes"}const Fw=new Set(["opacity","clipPath","filter","transform"]),$w=Ui(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Bw(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return $w()&&n&&Fw.has(n)&&(n!=="transform"||!u)&&!c&&!r&&o!=="mirror"&&s!==0&&a!=="inertia"}const Vw=40;class Ww extends sc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",keyframes:i,name:c,motionValue:u,element:d,...l}){var g;super(),this.stop=()=>{var y,b;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=lt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:a,name:c,motionValue:u,element:d,...l},p=(d==null?void 0:d.KeyframeResolver)||ic;this.keyframeResolver=new p(i,(y,b,v)=>this.onKeyframesResolved(y,b,f,!v),c,u,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:a,velocity:i,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=lt.now(),Lw(t,s,a,i)||((Jt.instantAnimations||!c)&&(d==null||d(oc(t,r,n))),t[0]=t[t.length-1],si(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Vw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!u&&Bw(f)?new Iw({...f,element:f.motionValue.owner.current}):new ac(f);p.finished.then(()=>this.notifyFinished()).catch(ut),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}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(),Ew()),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()}}const Hw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zw(e){const t=Hw.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Yw=4;function Kf(e,t,n=1){Rt(n<=Yw,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=zw(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return pf(a)?parseFloat(a):a}return Qi(o)?Kf(o,t,n+1):o}function cc(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const qf=new Set(["width","height","top","left","right","bottom",...fr]),Uw={test:e=>e==="auto",parse:e=>e},Xf=e=>t=>t.test(e),Zf=[dr,ie,Wt,on,$x,Fx,Uw],ru=e=>Zf.find(Xf(e));function Gw(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||vf(e):!0}const Kw=new Set(["brightness","contrast","saturate","opacity"]);function qw(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ji)||[];if(!r)return e;const o=n.replace(r,"");let s=Kw.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const Xw=/\b([a-z-]*)\(.*?\)/gu,ai={...ln,getAnimatableNone:e=>{const t=e.match(Xw);return t?t.map(qw).join(" "):e}},ou={...dr,transform:Math.round},Zw={rotate:on,rotateX:on,rotateY:on,rotateZ:on,scale:Do,scaleX:Do,scaleY:Do,scaleZ:Do,skew:on,skewX:on,skewY:on,distance:ie,translateX:ie,translateY:ie,translateZ:ie,x:ie,y:ie,z:ie,perspective:ie,transformPerspective:ie,opacity:Fr,originX:Yl,originY:Yl,originZ:ie},lc={borderWidth:ie,borderTopWidth:ie,borderRightWidth:ie,borderBottomWidth:ie,borderLeftWidth:ie,borderRadius:ie,radius:ie,borderTopLeftRadius:ie,borderTopRightRadius:ie,borderBottomRightRadius:ie,borderBottomLeftRadius:ie,width:ie,maxWidth:ie,height:ie,maxHeight:ie,top:ie,right:ie,bottom:ie,left:ie,padding:ie,paddingTop:ie,paddingRight:ie,paddingBottom:ie,paddingLeft:ie,margin:ie,marginTop:ie,marginRight:ie,marginBottom:ie,marginLeft:ie,backgroundPositionX:ie,backgroundPositionY:ie,...Zw,zIndex:ou,fillOpacity:Fr,strokeOpacity:Fr,numOctaves:ou},Qw={...lc,color:Ve,backgroundColor:Ve,outlineColor:Ve,fill:Ve,stroke:Ve,borderColor:Ve,borderTopColor:Ve,borderRightColor:Ve,borderBottomColor:Ve,borderLeftColor:Ve,filter:ai,WebkitFilter:ai},Qf=e=>Qw[e];function Jf(e,t){let n=Qf(e);return n!==ai&&(n=ln),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Jw=new Set(["auto","none","0"]);function e0(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!Jw.has(s)&&$r(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Jf(n,o)}class t0 extends ic{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),Qi(u))){const d=Kf(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!qf.has(r)||t.length!==2)return;const[o,s]=t,a=ru(o),i=ru(s);if(a!==i)if(Jl(a)&&Jl(i))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else An[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Gw(t[o]))&&r.push(o);r.length&&e0(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=An[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var i;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,a=r[s];r[s]=An[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(i=this.removedTransforms)!=null&&i.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function eh(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const o=document.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const th=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function nh(e){return gf(e)&&"offsetHeight"in e}const su=30,n0=e=>!isNaN(parseFloat(e)),Nr={current:void 0};class r0{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const o=lt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=lt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=n0(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ys(!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 Gi);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ce.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Nr.current&&Nr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>su)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,su);return Ki(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 Et(e,t){return new r0(e,t)}const{schedule:uc}=Df(queueMicrotask,!1),Mt={x:!1,y:!1};function rh(){return Mt.x||Mt.y}function o0(e){return e==="x"||e==="y"?Mt[e]?null:(Mt[e]=!0,()=>{Mt[e]=!1}):Mt.x||Mt.y?null:(Mt.x=Mt.y=!0,()=>{Mt.x=Mt.y=!1})}function oh(e,t){const n=eh(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function au(e){return!(e.pointerType==="touch"||rh())}function s0(e,t,n={}){const[r,o,s]=oh(e,n),a=i=>{if(!au(i))return;const{target:c}=i,u=t(c,i);if(typeof u!="function"||!c)return;const d=l=>{au(l)&&(u(l),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,o)};return r.forEach(i=>{i.addEventListener("pointerenter",a,o)}),s}const sh=(e,t)=>t?e===t?!0:sh(e,t.parentElement):!1,dc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,a0=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function i0(e){return a0.has(e.tagName)||e.tabIndex!==-1}const Ho=new WeakSet;function iu(e){return t=>{t.key==="Enter"&&e(t)}}function da(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const c0=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=iu(()=>{if(Ho.has(n))return;da(n,"down");const o=iu(()=>{da(n,"up")}),s=()=>da(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function cu(e){return dc(e)&&!rh()}function l0(e,t,n={}){const[r,o,s]=oh(e,n),a=i=>{const c=i.currentTarget;if(!cu(i))return;Ho.add(c);const u=t(c,i),d=(p,g)=>{window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",f),Ho.has(c)&&Ho.delete(c),cu(p)&&typeof u=="function"&&u(p,{success:g})},l=p=>{d(p,c===window||c===document||n.useGlobalTarget||sh(c,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",l,o),window.addEventListener("pointercancel",f,o)};return r.forEach(i=>{(n.useGlobalTarget?window:i).addEventListener("pointerdown",a,o),nh(i)&&(i.addEventListener("focus",u=>c0(u,o)),!i0(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),s}function fc(e){return gf(e)&&"ownerSVGElement"in e}const zo=new WeakMap;let sn;const ah=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:fc(r)&&"getBBox"in r?r.getBBox()[t]:r[n],u0=ah("inline","width","offsetWidth"),d0=ah("block","height","offsetHeight");function f0({target:e,borderBoxSize:t}){var n;(n=zo.get(e))==null||n.forEach(r=>{r(e,{get width(){return u0(e,t)},get height(){return d0(e,t)}})})}function h0(e){e.forEach(f0)}function m0(){typeof ResizeObserver>"u"||(sn=new ResizeObserver(h0))}function p0(e,t){sn||m0();const n=eh(e);return n.forEach(r=>{let o=zo.get(r);o||(o=new Set,zo.set(r,o)),o.add(t),sn==null||sn.observe(r)}),()=>{n.forEach(r=>{const o=zo.get(r);o==null||o.delete(t),o!=null&&o.size||sn==null||sn.unobserve(r)})}}const Yo=new Set;let Kn;function g0(){Kn=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Yo.forEach(t=>t(e))},window.addEventListener("resize",Kn)}function v0(e){return Yo.add(e),Kn||g0(),()=>{Yo.delete(e),!Yo.size&&typeof Kn=="function"&&(window.removeEventListener("resize",Kn),Kn=void 0)}}function y0(e,t){return typeof e=="function"?v0(e):p0(e,t)}function ih(e,t){let n;const r=()=>{const{currentTime:o}=t,a=(o===null?0:o.value)/100;n!==a&&e(a),n=a};return Ce.preUpdate(r,!0),()=>At(r)}function b0(e){return fc(e)&&e.tagName==="svg"}function x0(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],a=e[3+n],i=rc(o,s,a);return t?i(r):i}const et=e=>!!(e&&e.getVelocity),w0=[...Zf,Ve,ln],S0=e=>w0.find(Xf(e)),hc=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function C0(e=!0){const t=S.useContext(Hi);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=S.useId();S.useEffect(()=>{if(e)return o(s)},[e]);const a=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const ch=S.createContext({strict:!1}),lu={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"]},or={};for(const e in lu)or[e]={isEnabled:t=>lu[e].some(n=>!!t[n])};function M0(e){for(const t in e)or[t]={...or[t],...e[t]}}const E0=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","ignoreStrict","viewport"]);function es(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||E0.has(e)}let lh=e=>!es(e);function T0(e){typeof e=="function"&&(lh=t=>t.startsWith("on")?!es(t):e(t))}try{T0(require("@emotion/is-prop-valid").default)}catch{}function P0(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(lh(o)||n===!0&&es(o)||!t&&!es(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const bs=S.createContext({});function xs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Br(e){return typeof e=="string"||Array.isArray(e)}const mc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pc=["initial",...mc];function ws(e){return xs(e.animate)||pc.some(t=>Br(e[t]))}function uh(e){return!!(ws(e)||e.variants)}function D0(e,t){if(ws(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Br(n)?n:void 0,animate:Br(r)?r:void 0}}return e.inherit!==!1?t:{}}function R0(e){const{initial:t,animate:n}=D0(e,S.useContext(bs));return S.useMemo(()=>({initial:t,animate:n}),[uu(t),uu(n)])}function uu(e){return Array.isArray(e)?e.join(" "):e}const Vr={};function A0(e){for(const t in e)Vr[t]=e[t],Zi(t)&&(Vr[t].isCSSVariable=!0)}function dh(e,{layout:t,layoutId:n}){return hr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Vr[e]||e==="opacity")}const O0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},k0=fr.length;function N0(e,t,n){let r="",o=!0;for(let s=0;s<k0;s++){const a=fr[s],i=e[a];if(i===void 0)continue;let c=!0;if(typeof i=="number"?c=i===(a.startsWith("scale")?1:0):c=parseFloat(i)===0,!c||n){const u=th(i,lc[a]);if(!c){o=!1;const d=O0[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function gc(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let a=!1,i=!1;for(const c in t){const u=t[c];if(hr.has(c)){a=!0;continue}else if(Zi(c)){o[c]=u;continue}else{const d=th(u,lc[c]);c.startsWith("origin")?(i=!0,s[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=N0(t,e.transform,n):r.transform&&(r.transform="none")),i){const{originX:c="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${c} ${u} ${d}`}}const vc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function fh(e,t,n){for(const r in t)!et(t[r])&&!dh(r,n)&&(e[r]=t[r])}function _0({transformTemplate:e},t){return S.useMemo(()=>{const n=vc();return gc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function I0(e,t){const n=e.style||{},r={};return fh(r,n,e),Object.assign(r,_0(e,t)),r}function j0(e,t){const n={},r=I0(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const L0={offset:"stroke-dashoffset",array:"stroke-dasharray"},F0={offset:"strokeDashoffset",array:"strokeDasharray"};function $0(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?L0:F0;e[s.offset]=ie.transform(-r);const a=ie.transform(t),i=ie.transform(n);e[s.array]=`${a} ${i}`}function hh(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:a=0,...i},c,u,d){if(gc(e,i,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:l,style:f}=e;l.transform&&(f.transform=l.transform,delete l.transform),(f.transform||l.transformOrigin)&&(f.transformOrigin=l.transformOrigin??"50% 50%",delete l.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete l.transformBox),t!==void 0&&(l.x=t),n!==void 0&&(l.y=n),r!==void 0&&(l.scale=r),o!==void 0&&$0(l,o,s,a,!1)}const mh=()=>({...vc(),attrs:{}}),ph=e=>typeof e=="string"&&e.toLowerCase()==="svg";function B0(e,t,n,r){const o=S.useMemo(()=>{const s=mh();return hh(s,t,ph(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};fh(s,e.style,e),o.style={...s,...o.style}}return o}const V0=["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 yc(e){return typeof e!="string"||e.includes("-")?!1:!!(V0.indexOf(e)>-1||/[A-Z]/u.test(e))}function W0(e,t,n,{latestValues:r},o,s=!1){const i=(yc(e)?B0:j0)(t,r,o,e),c=P0(t,typeof e=="string",s),u=e!==S.Fragment?{...c,...i,ref:n}:{},{children:d}=t,l=S.useMemo(()=>et(d)?d.get():d,[d]);return S.createElement(e,{...u,children:l})}function du(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function bc(e,t,n,r){if(typeof t=="function"){const[o,s]=du(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=du(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Uo(e){return et(e)?e.get():e}function H0({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:z0(n,r,o,e),renderState:t()}}function z0(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=Uo(s[f]);let{initial:a,animate:i}=e;const c=ws(e),u=uh(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),i===void 0&&(i=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const l=d?i:a;if(l&&typeof l!="boolean"&&!xs(l)){const f=Array.isArray(l)?l:[l];for(let p=0;p<f.length;p++){const g=bc(e,f[p]);if(g){const{transitionEnd:y,transition:b,...v}=g;for(const x in v){let w=v[x];if(Array.isArray(w)){const M=d?w.length-1:0;w=w[M]}w!==null&&(o[x]=w)}for(const x in y)o[x]=y[x]}}}return o}const gh=e=>(t,n)=>{const r=S.useContext(bs),o=S.useContext(Hi),s=()=>H0(e,t,r,o);return n?s():vs(s)};function xc(e,t,n){var s;const{style:r}=e,o={};for(const a in r)(et(r[a])||t.style&&et(t.style[a])||dh(a,e)||((s=n==null?void 0:n.getValue(a))==null?void 0:s.liveStyle)!==void 0)&&(o[a]=r[a]);return o}const Y0=gh({scrapeMotionValuesFromProps:xc,createRenderState:vc});function vh(e,t,n){const r=xc(e,t,n);for(const o in e)if(et(e[o])||et(t[o])){const s=fr.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const U0=gh({scrapeMotionValuesFromProps:vh,createRenderState:mh}),G0=Symbol.for("motionComponentSymbol");function qn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function K0(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):qn(n)&&(n.current=r))},[t])}const wc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),q0="framerAppearId",yh="data-"+wc(q0),bh=S.createContext({});function X0(e,t,n,r,o){var y,b;const{visualElement:s}=S.useContext(bs),a=S.useContext(ch),i=S.useContext(Hi),c=S.useContext(hc).reducedMotion,u=S.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:i,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,l=S.useContext(bh);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&Z0(u.current,n,o,l);const f=S.useRef(!1);S.useInsertionEffect(()=>{d&&f.current&&d.update(n,i)});const p=n[yh],g=S.useRef(!!p&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return Wi(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,p)}),g.current=!1),d.enteringChildren=void 0)}),d}function Z0(e,t,n,r){const{layoutId:o,layout:s,drag:a,dragConstraints:i,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:xh(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!a||i&&qn(i),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function xh(e){if(e)return e.options.allowProjection!==!1?e.projection:xh(e.parent)}function fa(e,{forwardMotionProps:t=!1}={},n,r){n&&M0(n);const o=yc(e)?U0:Y0;function s(i,c){let u;const d={...S.useContext(hc),...i,layoutId:Q0(i)},{isStatic:l}=d,f=R0(i),p=o(i,l);if(!l&&Vi){J0(d,n);const g=eS(d);u=g.MeasureLayout,f.visualElement=X0(e,p,d,r,g.ProjectionNode)}return m.jsxs(bs.Provider,{value:f,children:[u&&f.visualElement?m.jsx(u,{visualElement:f.visualElement,...d}):null,W0(e,i,K0(p,f.visualElement,c),p,l,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=S.forwardRef(s);return a[G0]=e,a}function Q0({layoutId:e}){const t=S.useContext(mf).id;return t&&e!==void 0?t+"-"+e:e}function J0(e,t){const n=S.useContext(ch).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ur(!1,r,"lazy-strict-mode"):Rt(!1,r,"lazy-strict-mode")}}function eS(e){const{drag:t,layout:n}=or;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function tS(e,t){if(typeof Proxy>"u")return fa;const n=new Map,r=(s,a)=>fa(s,a,e,t),o=(s,a)=>(process.env.NODE_ENV!=="production"&&ys(!1,"motion() is deprecated. Use motion.create() instead."),r(s,a));return new Proxy(o,{get:(s,a)=>a==="create"?r:(n.has(a)||n.set(a,fa(a,void 0,e,t)),n.get(a))})}function wh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nS({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rS(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ha(e){return e===void 0||e===1}function ii({scale:e,scaleX:t,scaleY:n}){return!ha(e)||!ha(t)||!ha(n)}function En(e){return ii(e)||Sh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Sh(e){return fu(e.x)||fu(e.y)}function fu(e){return e&&e!=="0%"}function ts(e,t,n){const r=e-n,o=t*r;return n+o}function hu(e,t,n,r,o){return o!==void 0&&(e=ts(e,o,r)),ts(e,n,r)+t}function ci(e,t=0,n=1,r,o){e.min=hu(e.min,t,n,r,o),e.max=hu(e.max,t,n,r,o)}function Ch(e,{x:t,y:n}){ci(e.x,t.translate,t.scale,t.originPoint),ci(e.y,n.translate,n.scale,n.originPoint)}const mu=.999999999999,pu=1.0000000000001;function oS(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,a;for(let i=0;i<o;i++){s=n[i],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Zn(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Ch(e,a)),r&&En(s.latestValues)&&Zn(e,s.latestValues))}t.x<pu&&t.x>mu&&(t.x=1),t.y<pu&&t.y>mu&&(t.y=1)}function Xn(e,t){e.min=e.min+t,e.max=e.max+t}function gu(e,t,n,r,o=.5){const s=Ae(e.min,e.max,o);ci(e,t,n,s,r)}function Zn(e,t){gu(e.x,t.x,t.scaleX,t.scale,t.originX),gu(e.y,t.y,t.scaleY,t.scale,t.originY)}function Mh(e,t){return wh(rS(e.getBoundingClientRect(),t))}function sS(e,t,n){const r=Mh(e,n),{scroll:o}=t;return o&&(Xn(r.x,o.offset.x),Xn(r.y,o.offset.y)),r}const vu=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qn=()=>({x:vu(),y:vu()}),yu=()=>({min:0,max:0}),je=()=>({x:yu(),y:yu()}),li={current:null},Eh={current:!1};function aS(){if(Eh.current=!0,!!Vi)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>li.current=e.matches;e.addEventListener("change",t),t()}else li.current=!1}const iS=new WeakMap;function cS(e,t,n){for(const r in t){const o=t[r],s=n[r];if(et(o))e.addValue(r,o);else if(et(s))e.addValue(r,Et(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,Et(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const bu=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lS{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:a},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ic,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 f=lt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Ce.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=i,this.blockInitialAnimation=!!s,this.isControllingVariants=ws(n),this.isVariantNode=uh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...l}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in l){const p=l[f];c[f]!==void 0&&et(p)&&p.set(c[f])}}mount(t){var n;this.current=t,iS.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((r,o)=>this.bindToMotionValue(o,r)),Eh.current||aS(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:li.current,process.env.NODE_ENV!=="production"&&ys(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),At(this.notifyUpdate),At(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=hr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ce.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in or){const n=or[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):je()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<bu.length;r++){const o=bu[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,a=t[s];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=cS(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Et(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(pf(r)||vf(r))?r=parseFloat(r):!S0(r)&&ln.test(n)&&(r=Jf(t,n)),this.setBaseTarget(t,et(r)?r.get():r)),et(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=bc(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!et(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Gi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){uc.render(this.render)}}class Th extends lS{constructor(){super(...arguments),this.KeyframeResolver=t0}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;et(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ph(e,{style:t,vars:n},r,o){const s=e.style;let a;for(a in t)s[a]=t[a];o==null||o.applyProjectionStyles(s,r);for(a in n)s.setProperty(a,n[a])}function uS(e){return window.getComputedStyle(e)}class dS extends Th{constructor(){super(...arguments),this.type="html",this.renderInstance=Ph}readValueFromInstance(t,n){var r;if(hr.has(n))return(r=this.projection)!=null&&r.isProjecting?ei(n):xw(t,n);{const o=uS(t),s=(Zi(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Mh(t,n)}build(t,n,r){gc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return xc(t,n,r)}}const Dh=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"]);function fS(e,t,n,r){Ph(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Dh.has(o)?o:wc(o),t.attrs[o])}class hS extends Th{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(hr.has(n)){const r=Qf(n);return r&&r.default||0}return n=Dh.has(n)?n:wc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return vh(t,n,r)}build(t,n,r){hh(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){fS(t,n,r,o)}mount(t){this.isSVGTag=ph(t.tagName),super.mount(t)}}const mS=(e,t)=>yc(e)?new hS(t):new dS(t,{allowProjection:e!==S.Fragment});function Jn(e,t,n){const r=e.getProps();return bc(r,t,n!==void 0?n:r.custom,e)}const ui=e=>Array.isArray(e);function pS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Et(n))}function gS(e){return ui(e)?e[e.length-1]||0:e}function vS(e,t){const n=Jn(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const a in s){const i=gS(s[a]);pS(e,a,i)}}function yS(e){return!!(et(e)&&e.add)}function di(e,t){const n=e.getValue("willChange");if(yS(n))return n.add(t);if(!n&&Jt.WillChange){const r=new Jt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Rh(e){return e.props[yh]}const bS=e=>e!==null;function xS(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(bS),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const wS={type:"spring",stiffness:500,damping:25,restSpeed:10},SS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),CS={type:"keyframes",duration:.8},MS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ES=(e,{keyframes:t})=>t.length>2?CS:hr.has(e)?e.startsWith("scale")?SS(t[1]):wS:MS;function TS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:a,repeatDelay:i,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Sc=(e,t,n,r={},o,s)=>a=>{const i=cc(r,e)||{},c=i.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Pt(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-u,onUpdate:f=>{t.set(f),i.onUpdate&&i.onUpdate(f)},onComplete:()=>{a(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:s?void 0:o};TS(i)||Object.assign(d,ES(e,d)),d.duration&&(d.duration=Pt(d.duration)),d.repeatDelay&&(d.repeatDelay=Pt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let l=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(si(d),d.delay===0&&(l=!0)),(Jt.instantAnimations||Jt.skipAnimations)&&(l=!0,si(d),d.delay=0),d.allowFlatten=!i.type&&!i.ease,l&&!s&&t.get()!==void 0){const f=xS(d.keyframes,i);if(f!==void 0){Ce.update(()=>{d.onUpdate(f),d.onComplete()});return}}return i.isSync?new ac(d):new Ww(d)};function PS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ah(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...i}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in i){const l=e.getValue(d,e.latestValues[d]??null),f=i[d];if(f===void 0||u&&PS(u,d))continue;const p={delay:n,...cc(s||{},d)},g=l.get();if(g!==void 0&&!l.isAnimating&&!Array.isArray(f)&&f===g&&!p.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const v=Rh(e);if(v){const x=window.MotionHandoffAnimation(v,d,Ce);x!==null&&(p.startTime=x,y=!0)}}di(e,d),l.start(Sc(d,l,f,e.shouldReduceMotion&&qf.has(d)?{type:!1}:p,e,y));const b=l.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{Ce.update(()=>{a&&vS(e,a)})}),c}function Oh(e,t,n,r=0,o=1){const s=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),a=e.size,i=(a-1)*r;return typeof n=="function"?n(s,a):o===1?s*r:i-s*r}function fi(e,t,n={}){var c;const r=Jn(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(Ah(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:l,staggerDirection:f}=o;return DS(e,t,u,d,l,f,n)}:()=>Promise.resolve(),{when:i}=o;if(i){const[u,d]=i==="beforeChildren"?[s,a]:[a,s];return u().then(()=>d())}else return Promise.all([s(),a(n.delay)])}function DS(e,t,n=0,r=0,o=0,s=1,a){const i=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),i.push(fi(c,t,{...a,delay:n+(typeof r=="function"?0:r)+Oh(e.variantChildren,c,r,o,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(i)}function RS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>fi(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=fi(e,t,n);else{const o=typeof t=="function"?Jn(e,t,n.custom):t;r=Promise.all(Ah(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function kh(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const AS=pc.length;function Nh(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Nh(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<AS;n++){const r=pc[n],o=e.props[r];(Br(o)||o===!1)&&(t[r]=o)}return t}const OS=[...mc].reverse(),kS=mc.length;function NS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>RS(e,n,r)))}function _S(e){let t=NS(e),n=xu(),r=!0;const o=c=>(u,d)=>{var f;const l=Jn(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(l){const{transition:p,transitionEnd:g,...y}=l;u={...u,...y,...g}}return u};function s(c){t=c(e)}function a(c){const{props:u}=e,d=Nh(e.parent)||{},l=[],f=new Set;let p={},g=1/0;for(let b=0;b<kS;b++){const v=OS[b],x=n[v],w=u[v]!==void 0?u[v]:d[v],M=Br(w),C=v===c?x.isActive:null;C===!1&&(g=b);let P=w===d[v]&&w!==u[v]&&M;if(P&&r&&e.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...p},!x.isActive&&C===null||!w&&!x.prevProp||xs(w)||typeof w=="boolean")continue;const E=IS(x.prevProp,w);let D=E||v===c&&x.isActive&&!P&&M||b>g&&M,R=!1;const A=Array.isArray(w)?w:[w];let N=A.reduce(o(v),{});C===!1&&(N={});const{prevResolvedValues:H={}}=x,O={...H,...N},U=F=>{D=!0,f.has(F)&&(R=!0,f.delete(F)),x.needsAnimating[F]=!0;const j=e.getValue(F);j&&(j.liveStyle=!1)};for(const F in O){const j=N[F],_=H[F];if(p.hasOwnProperty(F))continue;let Z=!1;ui(j)&&ui(_)?Z=!kh(j,_):Z=j!==_,Z?j!=null?U(F):f.add(F):j!==void 0&&f.has(F)?U(F):x.protectedKeys[F]=!0}x.prevProp=w,x.prevResolvedValues=N,x.isActive&&(p={...p,...N}),r&&e.blockInitialAnimation&&(D=!1);const K=P&&E;D&&(!K||R)&&l.push(...A.map(F=>{const j={type:v};if(typeof F=="string"&&r&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:_}=e,Z=Jn(_,F);if(_.enteringChildren&&Z){const{delayChildren:se}=Z.transition||{};j.delay=Oh(_.enteringChildren,e,se)}}return{animation:F,options:j}}))}if(f.size){const b={};if(typeof u.initial!="boolean"){const v=Jn(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(b.transition=v.transition)}f.forEach(v=>{const x=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),b[v]=x??null}),l.push({animation:b})}let y=!!l.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(l):Promise.resolve()}function i(c,u){var l;if(n[c].isActive===u)return Promise.resolve();(l=e.variantChildren)==null||l.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:i,setAnimateFunction:s,getState:()=>n,reset:()=>{n=xu()}}}function IS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kh(t,e):!1}function Cn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xu(){return{animate:Cn(!0),whileInView:Cn(),whileHover:Cn(),whileTap:Cn(),whileDrag:Cn(),whileFocus:Cn(),exit:Cn()}}class mn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class jS extends mn{constructor(t){super(t),t.animationState||(t.animationState=_S(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();xs(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 LS=0;class FS extends mn{constructor(){super(...arguments),this.id=LS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const $S={animation:{Feature:jS},exit:{Feature:FS}};function Wr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function no(e){return{point:{x:e.pageX,y:e.pageY}}}const BS=e=>t=>dc(t)&&e(t,no(t));function _r(e,t,n,r){return Wr(e,t,BS(n),r)}const _h=1e-4,VS=1-_h,WS=1+_h,Ih=.01,HS=0-Ih,zS=0+Ih;function ot(e){return e.max-e.min}function YS(e,t,n){return Math.abs(e-t)<=n}function wu(e,t,n,r=.5){e.origin=r,e.originPoint=Ae(t.min,t.max,e.origin),e.scale=ot(n)/ot(t),e.translate=Ae(n.min,n.max,e.origin)-e.originPoint,(e.scale>=VS&&e.scale<=WS||isNaN(e.scale))&&(e.scale=1),(e.translate>=HS&&e.translate<=zS||isNaN(e.translate))&&(e.translate=0)}function Ir(e,t,n,r){wu(e.x,t.x,n.x,r?r.originX:void 0),wu(e.y,t.y,n.y,r?r.originY:void 0)}function Su(e,t,n){e.min=n.min+t.min,e.max=e.min+ot(t)}function US(e,t,n){Su(e.x,t.x,n.x),Su(e.y,t.y,n.y)}function Cu(e,t,n){e.min=t.min-n.min,e.max=e.min+ot(t)}function jr(e,t,n){Cu(e.x,t.x,n.x),Cu(e.y,t.y,n.y)}function yt(e){return[e("x"),e("y")]}const jh=({current:e})=>e?e.ownerDocument.defaultView:null,Mu=(e,t)=>Math.abs(e-t);function GS(e,t){const n=Mu(e.x,t.x),r=Mu(e.y,t.y);return Math.sqrt(n**2+r**2)}class Lh{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=pa(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=GS(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;const{point:y}=f,{timestamp:b}=qe;this.history.push({...y,timestamp:b});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ma(p,this.transformPagePoint),Ce.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=pa(f.type==="pointercancel"?this.lastMoveEventInfo:ma(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,v),y&&y(f,v)},!dc(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const i=no(t),c=ma(i,this.transformPagePoint),{point:u}=c,{timestamp:d}=qe;this.history=[{...u,timestamp:d}];const{onSessionStart:l}=n;l&&l(t,pa(c,this.history)),this.removeListeners=Jr(_r(this.contextWindow,"pointermove",this.handlePointerMove),_r(this.contextWindow,"pointerup",this.handlePointerUp),_r(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),At(this.updatePoint)}}function ma(e,t){return t?{point:t(e.point)}:e}function Eu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pa({point:e},t){return{point:e,delta:Eu(e,Fh(t)),offset:Eu(e,KS(t)),velocity:qS(t,.1)}}function KS(e){return e[0]}function Fh(e){return e[e.length-1]}function qS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Fh(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Pt(t)));)n--;if(!r)return{x:0,y:0};const s=bt(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function XS(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ae(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ae(n,e,r.max):Math.min(e,n)),e}function Tu(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 ZS(e,{top:t,left:n,bottom:r,right:o}){return{x:Tu(e.x,n,o),y:Tu(e.y,t,r)}}function Pu(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function QS(e,t){return{x:Pu(e.x,t.x),y:Pu(e.y,t.y)}}function JS(e,t){let n=.5;const r=ot(e),o=ot(t);return o>r?n=rr(t.min,t.max-r,e.min):r>o&&(n=rr(e.min,e.max-o,t.min)),zt(0,1,n)}function eC(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 hi=.35;function tC(e=hi){return e===!1?e=0:e===!0&&(e=hi),{x:Du(e,"left","right"),y:Du(e,"top","bottom")}}function Du(e,t,n){return{min:Ru(e,t),max:Ru(e,n)}}function Ru(e,t){return typeof e=="number"?e:e[t]||0}const nC=new WeakMap;class rC{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=je(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=l=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(no(l).point)},a=(l,f)=>{const{drag:p,dragPropagation:g,onDragStart:y}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=o0(p),!this.openDragLock))return;this.latestPointerEvent=l,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yt(v=>{let x=this.getAxisMotionValue(v).get()||0;if(Wt.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const M=w.layout.layoutBox[v];M&&(x=ot(M)*(parseFloat(x)/100))}}this.originPoint[v]=x}),y&&Ce.postRender(()=>y(l,f)),di(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},i=(l,f)=>{this.latestPointerEvent=l,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:y,onDrag:b}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(g&&this.currentDirection===null){this.currentDirection=oC(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),b&&b(l,f)},c=(l,f)=>{this.latestPointerEvent=l,this.latestPanInfo=f,this.stop(l,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>yt(l=>{var f;return this.getAnimationState(l)==="paused"&&((f=this.getAxisMotionValue(l).animation)==null?void 0:f.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Lh(t,{onSessionStart:s,onStart:a,onMove:i,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:jh(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&Ce.postRender(()=>i(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ro(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=XS(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&qn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=ZS(r.layoutBox,t):this.constraints=!1,this.elastic=tC(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&yt(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=eC(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!qn(t))return!1;const r=t.current;Rt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=sS(r,o.root,this.visualElement.getTransformPagePoint());let a=QS(o.layout.layoutBox,s);if(n){const i=n(nS(a));this.hasMutatedConstraints=!!i,i&&(a=wh(i))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:i}=this.getProps(),c=this.constraints||{},u=yt(d=>{if(!Ro(d,n,this.currentDirection))return;let l=c&&c[d]||{};a&&(l={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(i)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return di(this.visualElement,t),r.start(Sc(t,r,0,n,this.visualElement,!1))}stopAnimation(){yt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){yt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){yt(n=>{const{drag:r}=this.getProps();if(!Ro(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:i}=o.layout.layoutBox[n];s.set(t[n]-Ae(a,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!qn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};yt(a=>{const i=this.getAxisMotionValue(a);if(i&&this.constraints!==!1){const c=i.get();o[a]=JS({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),yt(a=>{if(!Ro(a,t,null))return;const i=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];i.set(Ae(c,u,o[a]))})}addListeners(){if(!this.visualElement.current)return;nC.set(this.visualElement,this);const t=this.visualElement.current,n=_r(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();qn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ce.read(r);const a=Wr(window,"resize",()=>this.scalePositionWithinConstraints()),i=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(yt(d=>{const l=this.getAxisMotionValue(d);l&&(this.originPoint[d]+=c[d].translate,l.set(l.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:a=hi,dragMomentum:i=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:a,dragMomentum:i}}}function Ro(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function oC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sC extends mn{constructor(t){super(t),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new rC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const Au=e=>(t,n)=>{e&&Ce.postRender(()=>e(t,n))};class aC extends mn{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(t){this.session=new Lh(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jh(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Au(t),onStart:Au(n),onMove:r,onEnd:(s,a)=>{delete this.session,o&&Ce.postRender(()=>o(s,a))}}}mount(){this.removePointerDownListener=_r(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Go={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ou(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ie.test(e))e=parseFloat(e);else return e;const n=Ou(e,t.target.x),r=Ou(e,t.target.y);return`${n}% ${r}%`}},iC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ln.parse(e);if(o.length>5)return r;const s=ln.createTransformer(e),a=typeof o[0]!="number"?1:0,i=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=i,o[1+a]/=c;const u=Ae(i,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=u),typeof o[3+a]=="number"&&(o[3+a]/=u),s(o)}};let ga=!1;class cC extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;A0(lC),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),ga&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Go.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:a}=r;return a&&(a.isPresent=s,ga=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Ce.postRender(()=>{const i=a.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),uc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;ga=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function $h(e){const[t,n]=C0(),r=S.useContext(mf);return m.jsx(cC,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(bh),isPresent:t,safeToRemove:n})}const lC={borderRadius:{...xr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xr,borderTopRightRadius:xr,borderBottomLeftRadius:xr,borderBottomRightRadius:xr,boxShadow:iC};function uC(e,t,n){const r=et(e)?e:Et(e);return r.start(Sc("",r,t,n)),r.animation}const dC=(e,t)=>e.depth-t.depth;class fC{constructor(){this.children=[],this.isDirty=!1}add(t){zi(this.children,t),this.isDirty=!0}remove(t){Yi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dC),this.isDirty=!1,this.children.forEach(t)}}function hC(e,t){const n=lt.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(At(r),e(s-t))};return Ce.setup(r,!0),()=>At(r)}const Bh=["TopLeft","TopRight","BottomLeft","BottomRight"],mC=Bh.length,ku=e=>typeof e=="string"?parseFloat(e):e,Nu=e=>typeof e=="number"||ie.test(e);function pC(e,t,n,r,o,s){o?(e.opacity=Ae(0,n.opacity??1,gC(r)),e.opacityExit=Ae(t.opacity??1,0,vC(r))):s&&(e.opacity=Ae(t.opacity??1,n.opacity??1,r));for(let a=0;a<mC;a++){const i=`border${Bh[a]}Radius`;let c=_u(t,i),u=_u(n,i);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Nu(c)===Nu(u)?(e[i]=Math.max(Ae(ku(c),ku(u),r),0),(Wt.test(u)||Wt.test(c))&&(e[i]+="%")):e[i]=u}(t.rotate||n.rotate)&&(e.rotate=Ae(t.rotate||0,n.rotate||0,r))}function _u(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const gC=Vh(0,.5,Mf),vC=Vh(.5,.95,ut);function Vh(e,t,n){return r=>r<e?0:r>t?1:n(rr(e,t,r))}function Iu(e,t){e.min=t.min,e.max=t.max}function vt(e,t){Iu(e.x,t.x),Iu(e.y,t.y)}function ju(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Lu(e,t,n,r,o){return e-=t,e=ts(e,1/n,r),o!==void 0&&(e=ts(e,1/o,r)),e}function yC(e,t=0,n=1,r=.5,o,s=e,a=e){if(Wt.test(t)&&(t=parseFloat(t),t=Ae(a.min,a.max,t/100)-a.min),typeof t!="number")return;let i=Ae(s.min,s.max,r);e===s&&(i-=t),e.min=Lu(e.min,t,n,i,o),e.max=Lu(e.max,t,n,i,o)}function Fu(e,t,[n,r,o],s,a){yC(e,t[n],t[r],t[o],t.scale,s,a)}const bC=["x","scaleX","originX"],xC=["y","scaleY","originY"];function $u(e,t,n,r){Fu(e.x,t,bC,n?n.x:void 0,r?r.x:void 0),Fu(e.y,t,xC,n?n.y:void 0,r?r.y:void 0)}function Bu(e){return e.translate===0&&e.scale===1}function Wh(e){return Bu(e.x)&&Bu(e.y)}function Vu(e,t){return e.min===t.min&&e.max===t.max}function wC(e,t){return Vu(e.x,t.x)&&Vu(e.y,t.y)}function Wu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Hh(e,t){return Wu(e.x,t.x)&&Wu(e.y,t.y)}function Hu(e){return ot(e.x)/ot(e.y)}function zu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class SC{constructor(){this.members=[]}add(t){zi(this.members,t),t.scheduleRender()}remove(t){if(Yi(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){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function CC(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||s||a)&&(r=`translate3d(${o}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:l,rotateY:f,skewX:p,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),l&&(r+=`rotateX(${l}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const i=e.x.scale*t.x,c=e.y.scale*t.y;return(i!==1||c!==1)&&(r+=`scale(${i}, ${c})`),r||"none"}const va=["","X","Y","Z"],MC=1e3;let EC=0;function ya(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function zh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Rh(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ce,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&zh(r)}function Yh({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},i=t==null?void 0:t()){this.id=EC++,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.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(DC),this.nodes.forEach(kC),this.nodes.forEach(NC),this.nodes.forEach(RC)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new fC)}addEventListener(a,i){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Gi),this.eventHandlers.get(a).add(i)}notifyListeners(a,...i){const c=this.eventHandlers.get(a);c&&c.notify(...i)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=fc(a)&&!b0(a),this.instance=a;const{layoutId:i,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||i)&&(this.isLayoutDirty=!0),e){let d,l=0;const f=()=>this.root.updateBlockedByResize=!1;Ce.read(()=>{l=window.innerWidth}),e(a,()=>{const p=window.innerWidth;p!==l&&(l=p,this.root.updateBlockedByResize=!0,d&&d(),d=hC(f,250),Go.hasAnimatedSinceResize&&(Go.hasAnimatedSinceResize=!1,this.nodes.forEach(Gu)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&u&&(i||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:l,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||FC,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=u.getProps(),v=!this.targetLayout||!Hh(this.targetLayout,p),x=!l&&f;if(this.options.layoutRoot||this.resumeFrom||x||l&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...cc(g,"layout"),onPlay:y,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,x)}else l||Gu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),At(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(_C),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&zh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const l=this.path[d];l.shouldResetTransform=!0,l.updateScroll("snapshot"),l.options.layoutRoot&&l.willUpdate(!1)}const{layoutId:i,layout:c}=this.options;if(i===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Yu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Uu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(OC),this.nodes.forEach(TC),this.nodes.forEach(PC)):this.nodes.forEach(Uu),this.clearAllSnapshots();const i=lt.now();qe.delta=zt(0,1e3/60,i-qe.timestamp),qe.timestamp=i,qe.isProcessing=!0,aa.update.process(qe),aa.preRender.process(qe),aa.render.process(qe),qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,uc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(AC),this.sharedNodes.forEach(IC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ot(this.snapshot.measuredBox.x)&&!ot(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 a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=je(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(i=!1),i&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!Wh(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&this.instance&&(i||En(this.latestValues)||d)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const i=this.measurePageBox();let c=this.removeElementScroll(i);return a&&(c=this.removeTransform(c)),$C(c),{animationId:this.root.animationId,measuredBox:i,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return je();const i=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(BC))){const{scroll:d}=this.root;d&&(Xn(i.x,d.offset.x),Xn(i.y,d.offset.y))}return i}removeElementScroll(a){var c;const i=je();if(vt(i,a),(c=this.scroll)!=null&&c.wasRoot)return i;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:l,options:f}=d;d!==this.root&&l&&f.layoutScroll&&(l.wasRoot&&vt(i,a),Xn(i.x,l.offset.x),Xn(i.y,l.offset.y))}return i}applyTransform(a,i=!1){const c=je();vt(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!i&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Zn(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),En(d.latestValues)&&Zn(c,d.latestValues)}return En(this.latestValues)&&Zn(c,this.latestValues),c}removeTransform(a){const i=je();vt(i,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!En(u.latestValues))continue;ii(u.latestValues)&&u.updateSnapshot();const d=je(),l=u.measurePageBox();vt(d,l),$u(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return En(this.latestValues)&&$u(i,this.latestValues),i}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var f;const i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==i;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:l}=this.options;if(!(!this.layout||!(d||l))){if(this.resolvedRelativeTargetAt=qe.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),jr(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=je(),this.targetWithTransforms=je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),US(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vt(this.target,this.layout.layoutBox),Ch(this.target,this.targetDelta)):vt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),jr(this.relativeTargetOrigin,this.target,p.target),vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ii(this.parent.latestValues)||Sh(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var g;const a=this.getLead(),i=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===qe.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;vt(this.layoutCorrected,this.layout.layoutBox);const l=this.treeScale.x,f=this.treeScale.y;oS(this.layoutCorrected,this.treeScale,this.path,i),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=je());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ju(this.prevProjectionDelta.x,this.projectionDelta.x),ju(this.prevProjectionDelta.y,this.projectionDelta.y)),Ir(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==l||this.treeScale.y!==f||!zu(this.projectionDelta.x,this.prevProjectionDelta.x)||!zu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var i;if((i=this.options.visualElement)==null||i.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Qn(),this.projectionDelta=Qn(),this.projectionDeltaWithTransform=Qn()}setAnimationOrigin(a,i=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},l=Qn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const f=je(),p=c?c.source:void 0,g=this.layout?this.layout.source:void 0,y=p!==g,b=this.getStack(),v=!b||b.members.length<=1,x=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(LC));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const C=M/1e3;Ku(l.x,a.x,C),Ku(l.y,a.y,C),this.setTargetDelta(l),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jr(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),jC(this.relativeTarget,this.relativeTargetOrigin,f,C),w&&wC(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=je()),vt(w,this.relativeTarget)),y&&(this.animationValues=d,pC(d,u,this.latestValues,C,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var i,c,u;this.notifyListeners("animationStart"),(i=this.currentAnimation)==null||i.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(At(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ce.update(()=>{Go.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Et(0)),this.currentAnimation=uC(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),a.onUpdate&&a.onUpdate(d)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(MC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:i,target:c,layout:u,latestValues:d}=a;if(!(!i||!c||!u)){if(this!==a&&this.layout&&u&&Uh(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||je();const l=ot(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+l;const f=ot(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}vt(i,c),Zn(i,d),Ir(this.projectionDeltaWithTransform,this.layoutCorrected,i,d)}}registerSharedNode(a,i){this.sharedNodes.has(a)||this.sharedNodes.set(a,new SC),this.sharedNodes.get(a).add(i);const u=i.options.initialPromotionConfig;i.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(i):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())==null?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())==null?void 0:i.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:i,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let i=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(i=!0),!i)return;const u={};c.z&&ya("z",a,u,this.animationValues);for(let d=0;d<va.length;d++)ya(`rotate${va[d]}`,a,u,this.animationValues),ya(`skew${va[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}applyProjectionStyles(a,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=Uo(i==null?void 0:i.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=Uo(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!En(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let l=CC(this.projectionDeltaWithTransform,this.treeScale,d);c&&(l=c(d,l)),a.transform=l;const{x:f,y:p}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in Vr){if(d[g]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:v}=Vr[g],x=l==="none"?d[g]:y(d[g],u);if(b){const w=b.length;for(let M=0;M<w;M++)a[b[M]]=x}else v?this.options.visualElement.renderState.vars[g]=x:a[g]=x}this.options.layoutId&&(a.pointerEvents=u===this?Uo(i==null?void 0:i.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var i;return(i=a.currentAnimation)==null?void 0:i.stop()}),this.root.nodes.forEach(Yu),this.root.sharedNodes.clear()}}}function TC(e){e.updateLayout()}function PC(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,a=t.source!==e.layout.source;s==="size"?yt(l=>{const f=a?t.measuredBox[l]:t.layoutBox[l],p=ot(f);f.min=r[l].min,f.max=f.min+p}):Uh(s,t.layoutBox,r)&&yt(l=>{const f=a?t.measuredBox[l]:t.layoutBox[l],p=ot(r[l]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[l].max=e.relativeTarget[l].min+p)});const i=Qn();Ir(i,r,t.layoutBox);const c=Qn();a?Ir(c,e.applyTransform(o,!0),t.measuredBox):Ir(c,r,t.layoutBox);const u=!Wh(i);let d=!1;if(!e.resumeFrom){const l=e.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:f,layout:p}=l;if(f&&p){const g=je();jr(g,t.layoutBox,f.layoutBox);const y=je();jr(y,r,p.layoutBox),Hh(g,y)||(d=!0),l.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=l)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:i,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function DC(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 RC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function AC(e){e.clearSnapshot()}function Yu(e){e.clearMeasurements()}function Uu(e){e.isLayoutDirty=!1}function OC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Gu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function kC(e){e.resolveTargetDelta()}function NC(e){e.calcProjection()}function _C(e){e.resetSkewAndRotation()}function IC(e){e.removeLeadSnapshot()}function Ku(e,t,n){e.translate=Ae(t.translate,0,n),e.scale=Ae(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qu(e,t,n,r){e.min=Ae(t.min,n.min,r),e.max=Ae(t.max,n.max,r)}function jC(e,t,n,r){qu(e.x,t.x,n.x,r),qu(e.y,t.y,n.y,r)}function LC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const FC={duration:.45,ease:[.4,0,.1,1]},Xu=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Zu=Xu("applewebkit/")&&!Xu("chrome/")?Math.round:ut;function Qu(e){e.min=Zu(e.min),e.max=Zu(e.max)}function $C(e){Qu(e.x),Qu(e.y)}function Uh(e,t,n){return e==="position"||e==="preserve-aspect"&&!YS(Hu(t),Hu(n),.2)}function BC(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const VC=Yh({attachResizeListener:(e,t)=>Wr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ba={current:void 0},Gh=Yh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ba.current){const e=new VC({});e.mount(window),e.setOptions({layoutScroll:!0}),ba.current=e}return ba.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),WC={pan:{Feature:aC},drag:{Feature:sC,ProjectionNode:Gh,MeasureLayout:$h}};function Ju(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&Ce.postRender(()=>s(t,no(t)))}class HC extends mn{mount(){const{current:t}=this.node;t&&(this.unmount=s0(t,(n,r)=>(Ju(this.node,r,"Start"),o=>Ju(this.node,o,"End"))))}unmount(){}}class zC extends mn{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=Jr(Wr(this.node.current,"focus",()=>this.onFocus()),Wr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ed(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&Ce.postRender(()=>s(t,no(t)))}class YC extends mn{mount(){const{current:t}=this.node;t&&(this.unmount=l0(t,(n,r)=>(ed(this.node,r,"Start"),(o,{success:s})=>ed(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const mi=new WeakMap,xa=new WeakMap,UC=e=>{const t=mi.get(e.target);t&&t(e)},GC=e=>{e.forEach(UC)};function KC({root:e,...t}){const n=e||document;xa.has(n)||xa.set(n,{});const r=xa.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(GC,{root:e,...t})),r[o]}function qC(e,t,n){const r=KC(t);return mi.set(e,n),r.observe(e),()=>{mi.delete(e),r.unobserve(e)}}const XC={some:0,all:1};class ZC extends mn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:XC[o]},i=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:l}=this.node.getProps(),f=u?d:l;f&&f(c)};return qC(this.node.current,a,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(QC(t,n))&&this.startObserver()}unmount(){}}function QC({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const JC={inView:{Feature:ZC},tap:{Feature:YC},focus:{Feature:zC},hover:{Feature:HC}},eM={layout:{ProjectionNode:Gh,MeasureLayout:$h}},tM={...$S,...JC,...WC,...eM},nM=tS(tM,mS),rM=50,td=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),oM=()=>({time:0,x:td(),y:td()}),sM={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function nd(e,t,n,r){const o=n[t],{length:s,position:a}=sM[t],i=o.current,c=n.time;o.current=e[`scroll${a}`],o.scrollLength=e[`scroll${s}`]-e[`client${s}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=rr(0,o.scrollLength,o.current);const u=r-c;o.velocity=u>rM?0:Ki(o.current-i,u)}function aM(e,t,n){nd(e,"x",t,n),nd(e,"y",t,n),t.time=n}function iM(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(nh(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const o=r.getBoundingClientRect();r=r.parentElement;const s=r.getBoundingClientRect();n.x+=o.left-s.left,n.y+=o.top-s.top}else if(r instanceof SVGGraphicsElement){const{x:o,y:s}=r.getBBox();n.x+=o,n.y+=s;let a=null,i=r.parentNode;for(;!a;)i.tagName==="svg"&&(a=i),i=r.parentNode;r=a}else break;return n}const pi={start:0,center:.5,end:1};function rd(e,t,n=0){let r=0;if(e in pi&&(e=pi[e]),typeof e=="string"){const o=parseFloat(e);e.endsWith("px")?r=o:e.endsWith("%")?e=o/100:e.endsWith("vw")?r=o/100*document.documentElement.clientWidth:e.endsWith("vh")?r=o/100*document.documentElement.clientHeight:e=o}return typeof e=="number"&&(r=t*e),n+r}const cM=[0,0];function lM(e,t,n,r){let o=Array.isArray(e)?e:cM,s=0,a=0;return typeof e=="number"?o=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?o=e.split(" "):o=[e,pi[e]?e:"0"]),s=rd(o[0],n,r),a=rd(o[1],t),s-a}const uM={All:[[0,0],[1,1]]},dM={x:0,y:0};function fM(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function hM(e,t,n){const{offset:r=uM.All}=n,{target:o=e,axis:s="y"}=n,a=s==="y"?"height":"width",i=o!==e?iM(o,e):dM,c=o===e?{width:e.scrollWidth,height:e.scrollHeight}:fM(o),u={width:e.clientWidth,height:e.clientHeight};t[s].offset.length=0;let d=!t[s].interpolate;const l=r.length;for(let f=0;f<l;f++){const p=lM(r[f],u[a],c[a],i[s]);!d&&p!==t[s].interpolatorOffsets[f]&&(d=!0),t[s].offset[f]=p}d&&(t[s].interpolate=rc(t[s].offset,$f(r),{clamp:!1}),t[s].interpolatorOffsets=[...t[s].offset]),t[s].progress=zt(0,1,t[s].interpolate(t[s].current))}function mM(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight,process.env.NODE_ENV!=="production"&&e&&t&&t!==e&&ys(getComputedStyle(e).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function pM(e,t,n,r={}){return{measure:o=>{mM(e,r.target,n),aM(e,n,o),(r.offset||r.target)&&hM(e,n,r)},notify:()=>t(n)}}const wr=new WeakMap,od=new WeakMap,wa=new WeakMap,sd=e=>e===document.scrollingElement?window:e;function Kh(e,{container:t=document.scrollingElement,...n}={}){if(!t)return ut;let r=wa.get(t);r||(r=new Set,wa.set(t,r));const o=oM(),s=pM(t,e,o,n);if(r.add(s),!wr.has(t)){const i=()=>{for(const l of r)l.measure(qe.timestamp);Ce.preUpdate(c)},c=()=>{for(const l of r)l.notify()},u=()=>Ce.read(i);wr.set(t,u);const d=sd(t);window.addEventListener("resize",u,{passive:!0}),t!==document.documentElement&&od.set(t,y0(t,u)),d.addEventListener("scroll",u,{passive:!0}),u()}const a=wr.get(t);return Ce.read(a,!1,!0),()=>{var u;At(a);const i=wa.get(t);if(!i||(i.delete(s),i.size))return;const c=wr.get(t);wr.delete(t),c&&(sd(t).removeEventListener("scroll",c),(u=od.get(t))==null||u(),window.removeEventListener("resize",c))}}const ad=new Map;function gM(e){const t={value:0},n=Kh(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function qh({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);const o=ad.get(t)??new Map;ad.set(t,o);const s=n.target??"self",a=o.get(s)??{},i=r+(n.offset??[]).join(",");return a[i]||(a[i]=!n.target&&Hf()?new ScrollTimeline({source:t,axis:r}):gM({container:t,...n})),a[i]}function vM(e,t){const n=qh(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:r=>(r.pause(),ih(o=>{r.time=r.iterationDuration*o},n))})}function yM(e){return e.length===2}function bM(e,t){return yM(e)?Kh(n=>{e(n[t.axis].progress,n)},t):ih(e,qh(t))}function xM(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return ut;const o={axis:t,container:n,...r};return typeof e=="function"?bM(e,o):vM(e,o)}const wM=()=>({scrollX:Et(0),scrollY:Et(0),scrollXProgress:Et(0),scrollYProgress:Et(0)}),Ao=e=>e?!e.current:!1;function SM({container:e,target:t,...n}={}){const r=vs(wM),o=S.useRef(null),s=S.useRef(!1),a=S.useCallback(()=>(o.current=xM((i,{x:c,y:u})=>{r.scrollX.set(c.current),r.scrollXProgress.set(c.progress),r.scrollY.set(u.current),r.scrollYProgress.set(u.progress)},{...n,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var i;(i=o.current)==null||i.call(o)}),[e,t,JSON.stringify(n.offset)]);return Wi(()=>{if(s.current=!1,Ao(e)||Ao(t)){s.current=!0;return}else return a()},[a]),S.useEffect(()=>{if(s.current)return Rt(!Ao(e),"Container ref is defined but not hydrated","use-scroll-ref"),Rt(!Ao(t),"Target ref is defined but not hydrated","use-scroll-ref"),a()},[a]),r}function CM(e){const t=vs(()=>Et(e)),{isStatic:n}=S.useContext(hc);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function Xh(e,t){const n=CM(t()),r=()=>n.set(t());return r(),Wi(()=>{const o=()=>Ce.preRender(r,!1,!0),s=e.map(a=>a.on("change",o));return()=>{s.forEach(a=>a()),At(r)}}),n}function MM(e){Nr.current=[],e();const t=Xh(Nr.current,e);return Nr.current=void 0,t}function EM(e,t,n,r){if(typeof e=="function")return MM(e);const o=typeof t=="function"?t:x0(t,n,r);return Array.isArray(e)?id(e,o):id([e],([s])=>o(s))}function id(e,t){const n=vs(()=>[]);return Xh(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}const TM=({children:e,className:t})=>{const n=S.useRef(null),{scrollYProgress:r}=SM({target:n});if(typeof e!="string")throw new Error("TextReveal: children must be a string");const o=e.split(" ");return m.jsx("div",{ref:n,className:T.cn("z-0 relative h-[200vh]",t),children:m.jsx("div",{className:"sticky top-0 mx-auto flex h-[50%] max-w-4xl items-center bg-transparent px-[1rem] py-[5rem]",children:m.jsx("span",{ref:n,className:"flex flex-wrap p-5 text-2xl font-bold text-black/20 dark:text-white/20 md:p-8 md:text-3xl lg:p-10 lg:text-4xl xl:text-5xl",children:o.map((s,a)=>{const i=a/o.length,c=i+1/o.length;return m.jsx(PM,{progress:r,range:[i,c],children:s},a)})})})})},PM=({children:e,progress:t,range:n})=>{const r=EM(t,n,[0,1]);return m.jsxs("span",{className:"relative mx-1 lg:mx-1.5",children:[m.jsx("span",{className:"absolute opacity-30",children:e}),m.jsx(nM.span,{style:{opacity:r},className:"text-black dark:text-white",children:e})]})};function DM(e,t){const n=h.createContext(t),r=s=>{const{children:a,...i}=s,c=h.useMemo(()=>i,Object.values(i));return m.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function o(s){const a=h.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Ne(e,t=[]){let n=[];function r(s,a){const i=h.createContext(a),c=n.length;n=[...n,a];const u=l=>{var v;const{scope:f,children:p,...g}=l,y=((v=f==null?void 0:f[e])==null?void 0:v[c])||i,b=h.useMemo(()=>g,Object.values(g));return m.jsx(y.Provider,{value:b,children:p})};u.displayName=s+"Provider";function d(l,f){var y;const p=((y=f==null?void 0:f[e])==null?void 0:y[c])||i,g=h.useContext(p);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${l}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(a=>h.createContext(a));return function(i){const c=(i==null?void 0:i[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,RM(o,...t)]}function RM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:c,scopeName:u})=>{const l=c(s)[`__scope${u}`];return{...i,...l}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function cd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function un(...e){return t=>{let n=!1;const r=e.map(o=>{const s=cd(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():cd(e[o],null)}}}}function ce(...e){return h.useCallback(un(...e),e)}function $(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var mt=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},AM=h[" useId ".trim().toString()]||(()=>{}),OM=0;function _e(e){const[t,n]=h.useState(AM());return mt(()=>{n(r=>r??String(OM++))},[e]),t?`radix-${t}`:""}var kM=h[" useInsertionEffect ".trim().toString()]||mt;function Ge({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=NM({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o;{const d=h.useRef(e!==void 0);h.useEffect(()=>{const l=d.current;l!==i&&console.warn(`${r} is changing from ${l?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,r])}const u=h.useCallback(d=>{var l;if(i){const f=_M(d)?d(e):d;f!==e&&((l=a.current)==null||l.call(a,f))}else s(d)},[i,e,s,a]);return[c,u]}function NM({defaultProp:e,onChange:t}){const[n,r]=h.useState(e),o=h.useRef(n),s=h.useRef(t);return kM(()=>{s.current=t},[t]),h.useEffect(()=>{var a;o.current!==n&&((a=s.current)==null||a.call(s,n),o.current=n)},[n,o]),[n,r,s]}function _M(e){return typeof e=="function"}function Ue(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function IM(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e);h.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var jM="DismissableLayer",gi="dismissableLayer.update",LM="dismissableLayer.pointerDownOutside",FM="dismissableLayer.focusOutside",ld,Zh=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mr=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,u=h.useContext(Zh),[d,l]=h.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=h.useState({}),g=ce(t,E=>l(E)),y=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(b),x=d?y.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,M=x>=v,C=VM(E=>{const D=E.target,R=[...u.branches].some(A=>A.contains(D));!M||R||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},f),P=WM(E=>{const D=E.target;[...u.branches].some(A=>A.contains(D))||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},f);return IM(E=>{x===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},f),h.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ld=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ud(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ld)}},[d,f,n,u]),h.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ud())},[d,u]),h.useEffect(()=>{const E=()=>p({});return document.addEventListener(gi,E),()=>document.removeEventListener(gi,E)},[]),m.jsx(T.Primitive.div,{...c,ref:g,style:{pointerEvents:w?M?"auto":"none":void 0,...e.style},onFocusCapture:$(e.onFocusCapture,P.onFocusCapture),onBlurCapture:$(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:$(e.onPointerDownCapture,C.onPointerDownCapture)})});mr.displayName=jM;var $M="DismissableLayerBranch",BM=h.forwardRef((e,t)=>{const n=h.useContext(Zh),r=h.useRef(null),o=ce(t,r);return h.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(T.Primitive.div,{...e,ref:o})});BM.displayName=$M;function VM(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e),r=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let c=function(){Qh(LM,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function WM(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e),r=h.useRef(!1);return h.useEffect(()=>{const o=s=>{s.target&&!r.current&&Qh(FM,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ud(){const e=new CustomEvent(gi);document.dispatchEvent(e)}function Qh(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?T.dispatchDiscreteCustomEvent(o,s):o.dispatchEvent(s)}var Sa="focusScope.autoFocusOnMount",Ca="focusScope.autoFocusOnUnmount",dd={bubbles:!1,cancelable:!0},HM="FocusScope",Ss=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=h.useState(null),u=Ue(o),d=Ue(s),l=h.useRef(null),f=ce(t,y=>c(y)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let y=function(w){if(p.paused||!i)return;const M=w.target;i.contains(M)?l.current=M:an(l.current,{select:!0})},b=function(w){if(p.paused||!i)return;const M=w.relatedTarget;M!==null&&(i.contains(M)||an(l.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&an(i)};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const x=new MutationObserver(v);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),x.disconnect()}}},[r,i,p.paused]),h.useEffect(()=>{if(i){hd.add(p);const y=document.activeElement;if(!i.contains(y)){const v=new CustomEvent(Sa,dd);i.addEventListener(Sa,u),i.dispatchEvent(v),v.defaultPrevented||(zM(qM(Jh(i)),{select:!0}),document.activeElement===y&&an(i))}return()=>{i.removeEventListener(Sa,u),setTimeout(()=>{const v=new CustomEvent(Ca,dd);i.addEventListener(Ca,d),i.dispatchEvent(v),v.defaultPrevented||an(y??document.body,{select:!0}),i.removeEventListener(Ca,d),hd.remove(p)},0)}}},[i,u,d,p]);const g=h.useCallback(y=>{if(!n&&!r||p.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,v=document.activeElement;if(b&&v){const x=y.currentTarget,[w,M]=YM(x);w&&M?!y.shiftKey&&v===M?(y.preventDefault(),n&&an(w,{select:!0})):y.shiftKey&&v===w&&(y.preventDefault(),n&&an(M,{select:!0})):v===x&&y.preventDefault()}},[n,r,p.paused]);return m.jsx(T.Primitive.div,{tabIndex:-1,...a,ref:f,onKeyDown:g})});Ss.displayName=HM;function zM(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(an(r,{select:t}),document.activeElement!==n)return}function YM(e){const t=Jh(e),n=fd(t,e),r=fd(t.reverse(),e);return[n,r]}function Jh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fd(e,t){for(const n of e)if(!UM(n,{upTo:t}))return n}function UM(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function GM(e){return e instanceof HTMLInputElement&&"select"in e}function an(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&GM(e)&&t&&e.select()}}var hd=KM();function KM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=md(e,t),e.unshift(t)},remove(t){var n;e=md(e,t),(n=e[0])==null||n.resume()}}}function md(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function qM(e){return e.filter(t=>t.tagName!=="A")}var XM="Portal",pr=h.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=h.useState(!1);mt(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Bi.createPortal(m.jsx(T.Primitive.div,{...r,ref:t}),a):null});pr.displayName=XM;function ZM(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Ie=e=>{const{present:t,children:n}=e,r=QM(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),s=ce(r.ref,JM(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:s}):null};Ie.displayName="Presence";function QM(e){const[t,n]=h.useState(),r=h.useRef(null),o=h.useRef(e),s=h.useRef("none"),a=e?"mounted":"unmounted",[i,c]=ZM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=Oo(r.current);s.current=i==="mounted"?u:"none"},[i]),mt(()=>{const u=r.current,d=o.current;if(d!==e){const f=s.current,p=Oo(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),mt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,l=p=>{const y=Oo(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&y&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=p=>{p.target===t&&(s.current=Oo(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:h.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Oo(e){return(e==null?void 0:e.animationName)||"none"}function JM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ma=0;function Cc(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pd()),document.body.insertAdjacentElement("beforeend",e[1]??pd()),Ma++,()=>{Ma===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ma--}},[])}function pd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var $t=function(){return $t=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},$t.apply(this,arguments)};function em(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function eE(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Ko="right-scroll-bar-position",qo="width-before-scroll-bar",tE="with-scroll-bars-hidden",nE="--removed-body-scroll-bar-size";function Ea(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function rE(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var oE=typeof window<"u"?h.useLayoutEffect:h.useEffect,gd=new WeakMap;function sE(e,t){var n=rE(null,function(r){return e.forEach(function(o){return Ea(o,r)})});return oE(function(){var r=gd.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||Ea(i,null)}),s.forEach(function(i){o.has(i)||Ea(i,a)})}gd.set(n,e)},[e]),n}function aE(e){return e}function iE(e,t){t===void 0&&(t=aE);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var c=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return o}function cE(e){e===void 0&&(e={});var t=iE(null);return t.options=$t({async:!0,ssr:!1},e),t}var tm=function(e){var t=e.sideCar,n=em(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,$t({},n))};tm.isSideCarExport=!0;function lE(e,t){return e.useMedium(t),tm}var nm=cE(),Ta=function(){},Cs=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:Ta,onWheelCapture:Ta,onTouchMoveCapture:Ta}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,l=e.shards,f=e.sideCar,p=e.noRelative,g=e.noIsolation,y=e.inert,b=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,w=e.gapMode,M=em(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,P=sE([n,t]),E=$t($t({},M),o);return h.createElement(h.Fragment,null,d&&h.createElement(C,{sideCar:nm,removeScrollBar:u,shards:l,noRelative:p,noIsolation:g,inert:y,setCallbacks:s,allowPinchZoom:!!b,lockRef:n,gapMode:w}),a?h.cloneElement(h.Children.only(i),$t($t({},E),{ref:P})):h.createElement(x,$t({},E,{className:c,ref:P}),i))});Cs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Cs.classNames={fullWidth:qo,zeroRight:Ko};var uE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=uE();return t&&e.setAttribute("nonce",t),e}function fE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hE(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var mE=function(){var e=0,t=null;return{add:function(n){e==0&&(t=dE())&&(fE(t,n),hE(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pE=function(){var e=mE();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rm=function(){var e=pE(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},gE={left:0,top:0,right:0,gap:0},Pa=function(e){return parseInt(e||"",10)||0},vE=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Pa(n),Pa(r),Pa(o)]},yE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return gE;var t=vE(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},bE=rm(),er="data-scroll-locked",xE=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(tE,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
5
5
|
}
|
|
6
|
-
body[`).concat(
|
|
7
|
-
overflow: hidden `).concat(
|
|
6
|
+
body[`).concat(er,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
|
-
`).concat([
|
|
10
|
-
padding-left: `.concat(
|
|
11
|
-
padding-top: `).concat(
|
|
12
|
-
padding-right: `).concat(
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(o,`px;
|
|
11
|
+
padding-top: `).concat(s,`px;
|
|
12
|
+
padding-right: `).concat(a,`px;
|
|
13
13
|
margin-left:0;
|
|
14
14
|
margin-top:0;
|
|
15
|
-
margin-right: `).concat(
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(
|
|
15
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
20
|
-
right: `).concat(
|
|
19
|
+
.`).concat(Ko,` {
|
|
20
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
24
|
-
margin-right: `).concat(
|
|
23
|
+
.`).concat(qo,` {
|
|
24
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
28
|
-
right: 0 `).concat(
|
|
27
|
+
.`).concat(Ko," .").concat(Ko,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
32
|
-
margin-right: 0 `).concat(
|
|
31
|
+
.`).concat(qo," .").concat(qo,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
body[`).concat(
|
|
36
|
-
`).concat(
|
|
35
|
+
body[`).concat(er,`] {
|
|
36
|
+
`).concat(nE,": ").concat(i,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
39
|
-
.block-interactivity-`.concat(
|
|
40
|
-
.allow-interactivity-`).concat(
|
|
41
|
-
`)},
|
|
38
|
+
`)},vd=function(){var e=parseInt(document.body.getAttribute(er)||"0",10);return isFinite(e)?e:0},wE=function(){h.useEffect(function(){return document.body.setAttribute(er,(vd()+1).toString()),function(){var e=vd()-1;e<=0?document.body.removeAttribute(er):document.body.setAttribute(er,e.toString())}},[])},SE=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;wE();var s=h.useMemo(function(){return yE(o)},[o]);return h.createElement(bE,{styles:xE(s,!t,o,n?"":"!important")})},vi=!1;if(typeof window<"u")try{var ko=Object.defineProperty({},"passive",{get:function(){return vi=!0,!0}});window.addEventListener("test",ko,ko),window.removeEventListener("test",ko,ko)}catch{vi=!1}var Bn=vi?{passive:!1}:!1,CE=function(e){return e.tagName==="TEXTAREA"},om=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!CE(e)&&n[t]==="visible")},ME=function(e){return om(e,"overflowY")},EE=function(e){return om(e,"overflowX")},yd=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=sm(e,r);if(o){var s=am(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},TE=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},PE=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},sm=function(e,t){return e==="v"?ME(t):EE(t)},am=function(e,t){return e==="v"?TE(t):PE(t)},DE=function(e,t){return e==="h"&&t==="rtl"?-1:1},RE=function(e,t,n,r,o){var s=DE(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,c=t.contains(i),u=!1,d=a>0,l=0,f=0;do{if(!i)break;var p=am(e,i),g=p[0],y=p[1],b=p[2],v=y-b-s*g;(g||v)&&sm(e,i)&&(l+=v,f+=g);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(d&&Math.abs(l)<1||!d&&Math.abs(f)<1)&&(u=!0),u},No=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bd=function(e){return[e.deltaX,e.deltaY]},xd=function(e){return e&&"current"in e?e.current:e},AE=function(e,t){return e[0]===t[0]&&e[1]===t[1]},OE=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},kE=0,Vn=[];function NE(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(kE++)[0],s=h.useState(rm)[0],a=h.useRef(e);h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=eE([e.lockRef.current],(e.shards||[]).map(xd),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=h.useCallback(function(y,b){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var v=No(y),x=n.current,w="deltaX"in y?y.deltaX:x[0]-v[0],M="deltaY"in y?y.deltaY:x[1]-v[1],C,P=y.target,E=Math.abs(w)>Math.abs(M)?"h":"v";if("touches"in y&&E==="h"&&P.type==="range")return!1;var D=yd(E,P);if(!D)return!0;if(D?C=E:(C=E==="v"?"h":"v",D=yd(E,P)),!D)return!1;if(!r.current&&"changedTouches"in y&&(w||M)&&(r.current=C),!C)return!0;var R=r.current||C;return RE(R,b,y,R==="h"?w:M)},[]),c=h.useCallback(function(y){var b=y;if(!(!Vn.length||Vn[Vn.length-1]!==s)){var v="deltaY"in b?bd(b):No(b),x=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&AE(C.delta,v)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(xd).filter(Boolean).filter(function(C){return C.contains(b.target)}),M=w.length>0?i(b,w[0]):!a.current.noIsolation;M&&b.cancelable&&b.preventDefault()}}},[]),u=h.useCallback(function(y,b,v,x){var w={name:y,delta:b,target:v,should:x,shadowParent:_E(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(M){return M!==w})},1)},[]),d=h.useCallback(function(y){n.current=No(y),r.current=void 0},[]),l=h.useCallback(function(y){u(y.type,bd(y),y.target,i(y,e.lockRef.current))},[]),f=h.useCallback(function(y){u(y.type,No(y),y.target,i(y,e.lockRef.current))},[]);h.useEffect(function(){return Vn.push(s),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Bn),document.addEventListener("touchmove",c,Bn),document.addEventListener("touchstart",d,Bn),function(){Vn=Vn.filter(function(y){return y!==s}),document.removeEventListener("wheel",c,Bn),document.removeEventListener("touchmove",c,Bn),document.removeEventListener("touchstart",d,Bn)}},[]);var p=e.removeScrollBar,g=e.inert;return h.createElement(h.Fragment,null,g?h.createElement(s,{styles:OE(o)}):null,p?h.createElement(SE,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _E(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const IE=lE(nm,NE);var Ms=h.forwardRef(function(e,t){return h.createElement(Cs,$t({},e,{ref:t,sideCar:IE}))});Ms.classNames=Cs.classNames;var jE=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wn=new WeakMap,_o=new WeakMap,Io={},Da=0,im=function(e){return e&&(e.host||im(e.parentNode))},LE=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=im(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},FE=function(e,t,n,r){var o=LE(t,Array.isArray(e)?e:[e]);Io[n]||(Io[n]=new WeakMap);var s=Io[n],a=[],i=new Set,c=new Set(o),u=function(l){!l||i.has(l)||(i.add(l),u(l.parentNode))};o.forEach(u);var d=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(f){if(i.has(f))d(f);else try{var p=f.getAttribute(r),g=p!==null&&p!=="false",y=(Wn.get(f)||0)+1,b=(s.get(f)||0)+1;Wn.set(f,y),s.set(f,b),a.push(f),y===1&&g&&_o.set(f,!0),b===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return d(t),i.clear(),Da++,function(){a.forEach(function(l){var f=Wn.get(l)-1,p=s.get(l)-1;Wn.set(l,f),s.set(l,p),f||(_o.has(l)||l.removeAttribute(r),_o.delete(l)),p||l.removeAttribute(n)}),Da--,Da||(Wn=new WeakMap,Wn=new WeakMap,_o=new WeakMap,Io={})}},Mc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=jE(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),FE(r,o,n,"aria-hidden")):function(){return null}},Es="Dialog",[cm,lm]=Ne(Es),[$E,Nt]=cm(Es),um=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=h.useRef(null),c=h.useRef(null),[u,d]=Ge({prop:r,defaultProp:o??!1,onChange:s,caller:Es});return m.jsx($E,{scope:t,triggerRef:i,contentRef:c,contentId:_e(),titleId:_e(),descriptionId:_e(),open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(l=>!l),[d]),modal:a,children:n})};um.displayName=Es;var dm="DialogTrigger",fm=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nt(dm,n),s=ce(t,o.triggerRef);return m.jsx(T.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Pc(o.open),...r,ref:s,onClick:$(e.onClick,o.onOpenToggle)})});fm.displayName=dm;var Ec="DialogPortal",[BE,hm]=cm(Ec,{forceMount:void 0}),mm=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Nt(Ec,t);return m.jsx(BE,{scope:t,forceMount:n,children:h.Children.map(r,a=>m.jsx(Ie,{present:n||s.open,children:m.jsx(pr,{asChild:!0,container:o,children:a})}))})};mm.displayName=Ec;var ns="DialogOverlay",pm=h.forwardRef((e,t)=>{const n=hm(ns,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Nt(ns,e.__scopeDialog);return s.modal?m.jsx(Ie,{present:r||s.open,children:m.jsx(WE,{...o,ref:t})}):null});pm.displayName=ns;var VE=kn.createSlot("DialogOverlay.RemoveScroll"),WE=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nt(ns,n);return m.jsx(Ms,{as:VE,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(T.Primitive.div,{"data-state":Pc(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Nn="DialogContent",gm=h.forwardRef((e,t)=>{const n=hm(Nn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Nt(Nn,e.__scopeDialog);return m.jsx(Ie,{present:r||s.open,children:s.modal?m.jsx(HE,{...o,ref:t}):m.jsx(zE,{...o,ref:t})})});gm.displayName=Nn;var HE=h.forwardRef((e,t)=>{const n=Nt(Nn,e.__scopeDialog),r=h.useRef(null),o=ce(t,n.contentRef,r);return h.useEffect(()=>{const s=r.current;if(s)return Mc(s)},[]),m.jsx(vm,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:$(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:$(e.onFocusOutside,s=>s.preventDefault())})}),zE=h.forwardRef((e,t)=>{const n=Nt(Nn,e.__scopeDialog),r=h.useRef(!1),o=h.useRef(!1);return m.jsx(vm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),vm=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=Nt(Nn,n),c=h.useRef(null),u=ce(t,c);return Cc(),m.jsxs(m.Fragment,{children:[m.jsx(Ss,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:m.jsx(mr,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Pc(i.open),...a,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(UE,{titleId:i.titleId}),m.jsx(KE,{contentRef:c,descriptionId:i.descriptionId})]})]})}),Tc="DialogTitle",ym=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nt(Tc,n);return m.jsx(T.Primitive.h2,{id:o.titleId,...r,ref:t})});ym.displayName=Tc;var bm="DialogDescription",xm=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nt(bm,n);return m.jsx(T.Primitive.p,{id:o.descriptionId,...r,ref:t})});xm.displayName=bm;var wm="DialogClose",Sm=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Nt(wm,n);return m.jsx(T.Primitive.button,{type:"button",...r,ref:t,onClick:$(e.onClick,()=>o.onOpenChange(!1))})});Sm.displayName=wm;function Pc(e){return e?"open":"closed"}var Cm="DialogTitleWarning",[YE,Mm]=DM(Cm,{contentName:Nn,titleName:Tc,docsSlug:"dialog"}),UE=({titleId:e})=>{const t=Mm(Cm),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
42
|
|
|
43
|
-
If you want to hide the \`${
|
|
43
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},GE="DialogDescriptionWarning",KE=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mm(GE).contentName}}.`;return h.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ro=um,Ts=fm,oo=mm,so=pm,ao=gm,Ps=ym,Ds=xm,Ln=Sm,Em="AlertDialog",[qE]=Ne(Em,[lm]),nn=lm(),Tm=e=>{const{__scopeAlertDialog:t,...n}=e,r=nn(t);return m.jsx(ro,{...r,...n,modal:!0})};Tm.displayName=Em;var XE="AlertDialogTrigger",Pm=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=nn(n);return m.jsx(Ts,{...o,...r,ref:t})});Pm.displayName=XE;var ZE="AlertDialogPortal",Dm=e=>{const{__scopeAlertDialog:t,...n}=e,r=nn(t);return m.jsx(oo,{...r,...n})};Dm.displayName=ZE;var QE="AlertDialogOverlay",Rm=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=nn(n);return m.jsx(so,{...o,...r,ref:t})});Rm.displayName=QE;var tr="AlertDialogContent",[JE,eT]=qE(tr),tT=kn.createSlottable("AlertDialogContent"),Am=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=nn(n),a=h.useRef(null),i=ce(t,a),c=h.useRef(null);return m.jsx(YE,{contentName:tr,titleName:Om,docsSlug:"alert-dialog",children:m.jsx(JE,{scope:n,cancelRef:c,children:m.jsxs(ao,{role:"alertdialog",...s,...o,ref:i,onOpenAutoFocus:$(o.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[m.jsx(tT,{children:r}),m.jsx(rT,{contentRef:a})]})})})});Am.displayName=tr;var Om="AlertDialogTitle",km=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=nn(n);return m.jsx(Ps,{...o,...r,ref:t})});km.displayName=Om;var Nm="AlertDialogDescription",_m=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=nn(n);return m.jsx(Ds,{...o,...r,ref:t})});_m.displayName=Nm;var nT="AlertDialogAction",Im=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=nn(n);return m.jsx(Ln,{...o,...r,ref:t})});Im.displayName=nT;var jm="AlertDialogCancel",Lm=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=eT(jm,n),s=nn(n),a=ce(t,o);return m.jsx(Ln,{...s,...r,ref:a})});Lm.displayName=jm;var rT=({contentRef:e})=>{const t=`\`${tr}\` requires a description for the component to be accessible for screen reader users.
|
|
46
46
|
|
|
47
|
-
You can add a description to the \`${
|
|
47
|
+
You can add a description to the \`${tr}\` by passing a \`${Nm}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
48
48
|
|
|
49
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${
|
|
49
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${tr}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
50
50
|
|
|
51
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{var s;document.getElementById((s=t.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},Im=wa,Fm=Sa,jm=Aa,Bm=Pa,_m=Ea,Wm=Va,Um=Oa,$m=Da,Km=Ra;function zm({...t}){return b.jsx(Im,{"data-slot":"alert-dialog",...t})}function Hm({...t}){return b.jsx(Fm,{"data-slot":"alert-dialog-trigger",...t})}function Na({...t}){return b.jsx(jm,{"data-slot":"alert-dialog-portal",...t})}function ka({className:t,...e}){return b.jsx(Bm,{"data-slot":"alert-dialog-overlay",className:Y.cn("z-50 fixed inset-0 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e})}function Gm({className:t,...e}){return b.jsxs(Na,{children:[b.jsx(ka,{}),b.jsx(_m,{"data-slot":"alert-dialog-content",className:Y.cn("top-[50%] left-[50%] z-50 fixed gap-4 grid bg-background shadow-lg p-6 border rounded-lg w-full max-w-[calc(100%-2rem)] sm:max-w-lg translate-x-[-50%] translate-y-[-50%] data-[state=closed]:animate-out data-[state=open]:animate-in duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...e})]})}function Ym({className:t,...e}){return b.jsx("div",{"data-slot":"alert-dialog-header",className:Y.cn("flex flex-col gap-2 sm:text-left text-center",t),...e})}function Xm({className:t,...e}){return b.jsx("div",{"data-slot":"alert-dialog-footer",className:Y.cn("flex sm:flex-row flex-col-reverse sm:justify-end gap-2",t),...e})}function qm({className:t,...e}){return b.jsx($m,{"data-slot":"alert-dialog-title",className:Y.cn("font-semibold text-lg",t),...e})}function Zm({className:t,...e}){return b.jsx(Km,{"data-slot":"alert-dialog-description",className:Y.cn("text-muted-foreground text-sm",t),...e})}function Qm({className:t,...e}){return b.jsx(Wm,{className:Y.cn(Y.buttonVariants(),t),...e})}function Jm({className:t,...e}){return b.jsx(Um,{className:Y.cn(Y.buttonVariants({variant:"outline"}),t),...e})}exports.AlertDialog=zm;exports.AlertDialogAction=Qm;exports.AlertDialogCancel=Jm;exports.AlertDialogContent=Gm;exports.AlertDialogDescription=Zm;exports.AlertDialogFooter=Xm;exports.AlertDialogHeader=Ym;exports.AlertDialogOverlay=ka;exports.AlertDialogPortal=Na;exports.AlertDialogTitle=qm;exports.AlertDialogTrigger=Hm;exports.TextReveal=zd;
|
|
51
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return h.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},oT=Tm,sT=Pm,aT=Dm,iT=Rm,cT=Am,lT=Im,uT=Lm,dT=km,fT=_m;function hT({...e}){return m.jsx(oT,{"data-slot":"alert-dialog",...e})}function mT({...e}){return m.jsx(sT,{"data-slot":"alert-dialog-trigger",...e})}function Fm({...e}){return m.jsx(aT,{"data-slot":"alert-dialog-portal",...e})}function $m({className:e,...t}){return m.jsx(iT,{"data-slot":"alert-dialog-overlay",className:T.cn("z-50 fixed inset-0 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function pT({className:e,...t}){return m.jsxs(Fm,{children:[m.jsx($m,{}),m.jsx(cT,{"data-slot":"alert-dialog-content",className:T.cn("top-[50%] left-[50%] z-50 fixed gap-4 grid bg-background shadow-lg p-6 border border-subtle rounded-md w-full max-w-[calc(100%-2rem)] sm:max-w-lg translate-x-[-50%] translate-y-[-50%] data-[state=closed]:animate-out data-[state=open]:animate-in duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...t})]})}function gT({className:e,...t}){return m.jsx("div",{"data-slot":"alert-dialog-header",className:T.cn("flex flex-col gap-2 sm:text-left text-center",e),...t})}function vT({className:e,...t}){return m.jsx("div",{"data-slot":"alert-dialog-footer",className:T.cn("flex sm:flex-row flex-col-reverse sm:justify-end gap-2",e),...t})}function yT({className:e,...t}){return m.jsx(dT,{"data-slot":"alert-dialog-title",className:T.cn("text-primary-foreground font-semibold text-lg",e),...t})}function bT({className:e,...t}){return m.jsx(fT,{"data-slot":"alert-dialog-description",className:T.cn("text-secondary-foreground text-sm",e),...t})}function xT({className:e,...t}){return m.jsx(lT,{className:T.cn(T.buttonVariants(),e),...t})}function wT({className:e,...t}){return m.jsx(uT,{className:T.cn(T.buttonVariants({variant:"outline"}),e),...t})}function ST(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const Ra={},Rr={};function Rn(e,t){try{const r=(Ra[e]||(Ra[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in Rr?Rr[r]:wd(r,r.split(":"))}catch{if(e in Rr)return Rr[e];const n=e==null?void 0:e.match(CT);return n?wd(e,n.slice(1)):NaN}}const CT=/([+-]\d\d):?(\d\d)?/;function wd(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Rr[e]=n*60+r>0?n*60+r+o:n*60-r-o}class Bt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Rn(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Bm(this),yi(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Bt(...n,t):new Bt(Date.now(),t)}withTimeZone(t){return new Bt(+this,t)}getTimezoneOffset(){const t=-Rn(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),yi(this),+this}[Symbol.for("constructDateFrom")](t){return new Bt(+new Date(t),this.timeZone)}}const Sd=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Sd.test(e))return;const t=e.replace(Sd,"$1UTC");Bt.prototype[t]&&(e.startsWith("get")?Bt.prototype[e]=function(){return this.internal[t]()}:(Bt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),MT(this),+this},Bt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),yi(this),+this}))});function yi(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Rn(e.timeZone,e)*60))}function MT(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Bm(e)}function Bm(e){const t=Rn(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),s=-new Date(+r).getTimezoneOffset(),a=o-s,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const c=o-n;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const u=new Date(+e);u.setUTCSeconds(0);const d=o>0?u.getSeconds():(u.getSeconds()-60)%60,l=Math.round(-(Rn(e.timeZone,e)*60))%60;(l||d)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+l),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+l+d));const f=Rn(e.timeZone,e),p=f>0?Math.floor(f):Math.ceil(f),y=-new Date(+e).getTimezoneOffset()-p,b=p!==n,v=y-c;if(b&&v){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);const x=Rn(e.timeZone,e),w=x>0?Math.floor(x):Math.ceil(x),M=p-w;M&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+M),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+M))}}class Je extends Bt{static tz(t,...n){return n.length?new Je(...n,t):new Je(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${ST(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Je(+this,t)}[Symbol.for("constructDateFrom")](t){return new Je(+new Date(t),this.timeZone)}}const Vm=6048e5,ET=864e5,Cd=Symbol.for("constructDateFrom");function We(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Cd in e?e[Cd](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ee(e,t){return We(t||e,e)}function Wm(e,t,n){const r=Ee(e,n==null?void 0:n.in);return isNaN(t)?We(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Hm(e,t,n){const r=Ee(e,n==null?void 0:n.in);if(isNaN(t))return We(e,NaN);if(!t)return r;const o=r.getDate(),s=We(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const a=s.getDate();return o>=a?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let TT={};function io(){return TT}function sr(e,t){var i,c,u,d;const n=io(),r=(t==null?void 0:t.weekStartsOn)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=Ee(e,t==null?void 0:t.in),s=o.getDay(),a=(s<r?7:0)+s-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Hr(e,t){return sr(e,{...t,weekStartsOn:1})}function zm(e,t){const n=Ee(e,t==null?void 0:t.in),r=n.getFullYear(),o=We(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=Hr(o),a=We(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const i=Hr(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Md(e){const t=Ee(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function gr(e,...t){const n=We.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function zr(e,t){const n=Ee(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Ym(e,t,n){const[r,o]=gr(n==null?void 0:n.in,e,t),s=zr(r),a=zr(o),i=+s-Md(s),c=+a-Md(a);return Math.round((i-c)/ET)}function PT(e,t){const n=zm(e,t),r=We(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Hr(r)}function DT(e,t,n){return Wm(e,t*7,n)}function RT(e,t,n){return Hm(e,t*12,n)}function AT(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=We.bind(null,o));const s=Ee(o,r);(!n||n<s||isNaN(+s))&&(n=s)}),We(r,n||NaN)}function OT(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=We.bind(null,o));const s=Ee(o,r);(!n||n>s||isNaN(+s))&&(n=s)}),We(r,n||NaN)}function kT(e,t,n){const[r,o]=gr(n==null?void 0:n.in,e,t);return+zr(r)==+zr(o)}function Um(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function NT(e){return!(!Um(e)&&typeof e!="number"||isNaN(+Ee(e)))}function _T(e,t,n){const[r,o]=gr(n==null?void 0:n.in,e,t),s=r.getFullYear()-o.getFullYear(),a=r.getMonth()-o.getMonth();return s*12+a}function IT(e,t){const n=Ee(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Gm(e,t){const[n,r]=gr(e,t.start,t.end);return{start:n,end:r}}function jT(e,t){const{start:n,end:r}=Gm(t==null?void 0:t.in,e);let o=+n>+r;const s=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let i=1;const c=[];for(;+a<=s;)c.push(We(n,a)),a.setMonth(a.getMonth()+i);return o?c.reverse():c}function LT(e,t){const n=Ee(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function FT(e,t){const n=Ee(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Km(e,t){const n=Ee(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $T(e,t){const{start:n,end:r}=Gm(t==null?void 0:t.in,e);let o=+n>+r;const s=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let i=1;const c=[];for(;+a<=s;)c.push(We(n,a)),a.setFullYear(a.getFullYear()+i);return o?c.reverse():c}function qm(e,t){var i,c,u,d;const n=io(),r=(t==null?void 0:t.weekStartsOn)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=Ee(e,t==null?void 0:t.in),s=o.getDay(),a=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function BT(e,t){return qm(e,{...t,weekStartsOn:1})}const VT={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},WT=(e,t,n)=>{let r;const o=VT[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Aa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const HT={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zT={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},YT={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},UT={date:Aa({formats:HT,defaultWidth:"full"}),time:Aa({formats:zT,defaultWidth:"full"}),dateTime:Aa({formats:YT,defaultWidth:"full"})},GT={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},KT=(e,t,n,r)=>GT[e];function Sr(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):a;o=e.formattingValues[i]||e.formattingValues[a]}else{const a=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const qT={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},XT={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ZT={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},QT={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},JT={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},eP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},tP=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},nP={ordinalNumber:tP,era:Sr({values:qT,defaultWidth:"wide"}),quarter:Sr({values:XT,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Sr({values:ZT,defaultWidth:"wide"}),day:Sr({values:QT,defaultWidth:"wide"}),dayPeriod:Sr({values:JT,defaultWidth:"wide",formattingValues:eP,defaultFormattingWidth:"wide"})};function Cr(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const a=s[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(i)?oP(i,l=>l.test(a)):rP(i,l=>l.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function rP(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function oP(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function sP(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const i=t.slice(o.length);return{value:a,rest:i}}}const aP=/^(\d+)(th|st|nd|rd)?/i,iP=/\d+/i,cP={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},lP={any:[/^b/i,/^(a|c)/i]},uP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},dP={any:[/1/i,/2/i,/3/i,/4/i]},fP={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hP={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},mP={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pP={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},gP={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},vP={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},yP={ordinalNumber:sP({matchPattern:aP,parsePattern:iP,valueCallback:e=>parseInt(e,10)}),era:Cr({matchPatterns:cP,defaultMatchWidth:"wide",parsePatterns:lP,defaultParseWidth:"any"}),quarter:Cr({matchPatterns:uP,defaultMatchWidth:"wide",parsePatterns:dP,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cr({matchPatterns:fP,defaultMatchWidth:"wide",parsePatterns:hP,defaultParseWidth:"any"}),day:Cr({matchPatterns:mP,defaultMatchWidth:"wide",parsePatterns:pP,defaultParseWidth:"any"}),dayPeriod:Cr({matchPatterns:gP,defaultMatchWidth:"any",parsePatterns:vP,defaultParseWidth:"any"})},Dc={code:"en-US",formatDistance:WT,formatLong:UT,formatRelative:KT,localize:nP,match:yP,options:{weekStartsOn:0,firstWeekContainsDate:1}};function bP(e,t){const n=Ee(e,t==null?void 0:t.in);return Ym(n,Km(n))+1}function Xm(e,t){const n=Ee(e,t==null?void 0:t.in),r=+Hr(n)-+PT(n);return Math.round(r/Vm)+1}function Zm(e,t){var d,l,f,p;const n=Ee(e,t==null?void 0:t.in),r=n.getFullYear(),o=io(),s=(t==null?void 0:t.firstWeekContainsDate)??((l=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:l.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(f=o.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,a=We((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const i=sr(a,t),c=We((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const u=sr(c,t);return+n>=+i?r+1:+n>=+u?r:r-1}function xP(e,t){var i,c,u,d;const n=io(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=Zm(e,t),s=We((t==null?void 0:t.in)||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),sr(s,t)}function Qm(e,t){const n=Ee(e,t==null?void 0:t.in),r=+sr(n,t)-+xP(n,t);return Math.round(r/Vm)+1}function Se(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Se(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Se(n+1,2)},d(e,t){return Se(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Se(e.getHours()%12||12,t.length)},H(e,t){return Se(e.getHours(),t.length)},m(e,t){return Se(e.getMinutes(),t.length)},s(e,t){return Se(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Se(o,t.length)}},Hn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ed={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return rn.y(e,t)},Y:function(e,t,n,r){const o=Zm(e,r),s=o>0?o:1-o;if(t==="YY"){const a=s%100;return Se(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Se(s,t.length)},R:function(e,t){const n=zm(e);return Se(n,t.length)},u:function(e,t){const n=e.getFullYear();return Se(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Se(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Se(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return rn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Se(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Qm(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Se(o,t.length)},I:function(e,t,n){const r=Xm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Se(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rn.d(e,t)},D:function(e,t,n){const r=bP(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Se(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Se(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Se(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Se(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Hn.noon:r===0?o=Hn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Hn.evening:r>=12?o=Hn.afternoon:r>=4?o=Hn.morning:o=Hn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return rn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Se(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Se(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rn.s(e,t)},S:function(e,t){return rn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Pd(r);case"XXXX":case"XX":return Tn(r);case"XXXXX":case"XXX":default:return Tn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Pd(r);case"xxxx":case"xx":return Tn(r);case"xxxxx":case"xxx":default:return Tn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Td(r,":");case"OOOO":default:return"GMT"+Tn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Td(r,":");case"zzzz":default:return"GMT"+Tn(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Se(r,t.length)},T:function(e,t,n){return Se(+e,t.length)}};function Td(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Se(s,2)}function Pd(e,t){return e%60===0?(e>0?"-":"+")+Se(Math.abs(e)/60,2):Tn(e,t)}function Tn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Se(Math.trunc(r/60),2),s=Se(r%60,2);return n+o+t+s}const Dd=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Jm=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},wP=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Dd(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Dd(r,t)).replace("{{time}}",Jm(o,t))},SP={p:Jm,P:wP},CP=/^D+$/,MP=/^Y+$/,EP=["D","DD","YY","YYYY"];function TP(e){return CP.test(e)}function PP(e){return MP.test(e)}function DP(e,t,n){const r=RP(e,t,n);if(console.warn(r),EP.includes(e))throw new RangeError(r)}function RP(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const AP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,OP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kP=/^'([^]*?)'?$/,NP=/''/g,_P=/[a-zA-Z]/;function IP(e,t,n){var d,l,f,p,g,y,b,v;const r=io(),o=(n==null?void 0:n.locale)??r.locale??Dc,s=(n==null?void 0:n.firstWeekContainsDate)??((l=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((y=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??r.weekStartsOn??((v=(b=r.locale)==null?void 0:b.options)==null?void 0:v.weekStartsOn)??0,i=Ee(e,n==null?void 0:n.in);if(!NT(i))throw new RangeError("Invalid time value");let c=t.match(OP).map(x=>{const w=x[0];if(w==="p"||w==="P"){const M=SP[w];return M(x,o.formatLong)}return x}).join("").match(AP).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:jP(x)};if(Ed[w])return{isToken:!0,value:x};if(w.match(_P))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(c=o.localize.preprocessor(i,c));const u={firstWeekContainsDate:s,weekStartsOn:a,locale:o};return c.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&PP(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&TP(w))&&DP(w,t,String(e));const M=Ed[w[0]];return M(i,w,o.localize,u)}).join("")}function jP(e){const t=e.match(kP);return t?t[1].replace(NP,"'"):e}function LP(e,t){const n=Ee(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),s=We(n,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function FP(e,t){return Ee(e,t==null?void 0:t.in).getMonth()}function $P(e,t){return Ee(e,t==null?void 0:t.in).getFullYear()}function BP(e,t){return+Ee(e)>+Ee(t)}function VP(e,t){return+Ee(e)<+Ee(t)}function WP(e,t,n){const[r,o]=gr(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function HP(e,t,n){const[r,o]=gr(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function zP(e,t,n){const r=Ee(e,n==null?void 0:n.in),o=r.getFullYear(),s=r.getDate(),a=We(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const i=LP(a);return r.setMonth(t,Math.min(s,i)),r}function YP(e,t,n){const r=Ee(e,n==null?void 0:n.in);return isNaN(+r)?We(e,NaN):(r.setFullYear(t),r)}const Rd=5,UP=4;function GP(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),s=t.addDays(o,Rd*7-1);return t.getMonth(e)===t.getMonth(s)?Rd:UP}function ep(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function KP(e,t){const n=ep(e,t),r=GP(e,t);return t.addDays(n,r*7-1)}class pt{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Je.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,s)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(r,o,s):this.options.timeZone?new Je(r,o,s,this.options.timeZone):new Date(r,o,s)},this.addDays=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(r,o):Wm(r,o)},this.addMonths=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(r,o):Hm(r,o)},this.addWeeks=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(r,o):DT(r,o)},this.addYears=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(r,o):RT(r,o)},this.differenceInCalendarDays=(r,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Ym(r,o)},this.differenceInCalendarMonths=(r,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):_T(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):jT(r)},this.eachYearOfInterval=r=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):$T(r),s=new Set(o.map(c=>this.getYear(c)));if(s.size===o.length)return o;const a=[];return s.forEach(c=>{a.push(new Date(c,0,1))}),a},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):KP(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):BT(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):IT(r)},this.endOfWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(r,o):qm(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):FT(r)},this.format=(r,o,s)=>{var i;const a=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):IP(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Xm(r)},this.getMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(r,this.options):FP(r,this.options)},this.getYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(r,this.options):$P(r,this.options)},this.getWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(r,this.options):Qm(r,this.options)},this.isAfter=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(r,o):BP(r,o)},this.isBefore=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(r,o):VP(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Um(r)},this.isSameDay=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(r,o):kT(r,o)},this.isSameMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(r,o):WP(r,o)},this.isSameYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(r,o):HP(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):AT(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):OT(r)},this.setMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(r,o):zP(r,o)},this.setYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(r,o):YP(r,o)},this.startOfBroadcastWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ep(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):zr(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Hr(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):LT(r)},this.startOfWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(r,this.options):sr(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Km(r)},this.options={locale:Dc,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&pt.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,s=n==null?void 0:n.code;if(s&&pt.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}pt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Ut=new pt;class tp{constructor(t,n,r=Ut){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class qP{constructor(t,n){this.date=t,this.weeks=n}}class XP{constructor(t,n){this.days=n,this.weekNumber=t}}function ZP(e){return S.createElement("button",{...e})}function QP(e){return S.createElement("span",{...e})}function JP(e){const{size:t=24,orientation:n="left",className:r}=e;return S.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&S.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&S.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&S.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&S.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function eD(e){const{day:t,modifiers:n,...r}=e;return S.createElement("td",{...r})}function tD(e){const{day:t,modifiers:n,...r}=e,o=S.useRef(null);return S.useEffect(()=>{var s;n.focused&&((s=o.current)==null||s.focus())},[n.focused]),S.createElement("button",{ref:o,...r})}var oe;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(oe||(oe={}));var Re;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Re||(Re={}));var Tt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Tt||(Tt={}));var dt;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(dt||(dt={}));function nD(e){const{options:t,className:n,components:r,classNames:o,...s}=e,a=[o[oe.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:c})=>c===s.value);return S.createElement("span",{"data-disabled":s.disabled,className:o[oe.DropdownRoot]},S.createElement(r.Select,{className:a,...s},t==null?void 0:t.map(({value:c,label:u,disabled:d})=>S.createElement(r.Option,{key:c,value:c,disabled:d},u))),S.createElement("span",{className:o[oe.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,S.createElement(r.Chevron,{orientation:"down",size:18,className:o[oe.Chevron]})))}function rD(e){return S.createElement("div",{...e})}function oD(e){return S.createElement("div",{...e})}function sD(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r},e.children)}function aD(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r})}function iD(e){return S.createElement("table",{...e})}function cD(e){return S.createElement("div",{...e})}const np=S.createContext(void 0);function co(){const e=S.useContext(np);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function lD(e){const{components:t}=co();return S.createElement(t.Dropdown,{...e})}function uD(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...s}=e,{components:a,classNames:i,labels:{labelPrevious:c,labelNext:u}}=co(),d=S.useCallback(f=>{o&&(n==null||n(f))},[o,n]),l=S.useCallback(f=>{r&&(t==null||t(f))},[r,t]);return S.createElement("nav",{...s},S.createElement(a.PreviousMonthButton,{type:"button",className:i[oe.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:l},S.createElement(a.Chevron,{disabled:r?void 0:!0,className:i[oe.Chevron],orientation:"left"})),S.createElement(a.NextMonthButton,{type:"button",className:i[oe.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:d},S.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[oe.Chevron]})))}function dD(e){const{components:t}=co();return S.createElement(t.Button,{...e})}function fD(e){return S.createElement("option",{...e})}function hD(e){const{components:t}=co();return S.createElement(t.Button,{...e})}function mD(e){const{rootRef:t,...n}=e;return S.createElement("div",{...n,ref:t})}function pD(e){return S.createElement("select",{...e})}function gD(e){const{week:t,...n}=e;return S.createElement("tr",{...n})}function vD(e){return S.createElement("th",{...e})}function yD(e){return S.createElement("thead",{"aria-hidden":!0},S.createElement("tr",{...e}))}function bD(e){const{week:t,...n}=e;return S.createElement("th",{...n})}function xD(e){return S.createElement("th",{...e})}function wD(e){return S.createElement("tbody",{...e})}function SD(e){const{components:t}=co();return S.createElement(t.Dropdown,{...e})}const CD=Object.freeze(Object.defineProperty({__proto__:null,Button:ZP,CaptionLabel:QP,Chevron:JP,Day:eD,DayButton:tD,Dropdown:nD,DropdownNav:rD,Footer:oD,Month:sD,MonthCaption:aD,MonthGrid:iD,Months:cD,MonthsDropdown:lD,Nav:uD,NextMonthButton:dD,Option:fD,PreviousMonthButton:hD,Root:mD,Select:pD,Week:gD,WeekNumber:bD,WeekNumberHeader:xD,Weekday:vD,Weekdays:yD,Weeks:wD,YearsDropdown:SD},Symbol.toStringTag,{value:"Module"}));function Zt(e,t,n=!1,r=Ut){let{from:o,to:s}=e;const{differenceInCalendarDays:a,isSameDay:i}=r;return o&&s?(a(s,o)<0&&([o,s]=[s,o]),a(t,o)>=(n?1:0)&&a(s,t)>=(n?1:0)):!n&&s?i(s,t):!n&&o?i(o,t):!1}function rp(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Rc(e){return!!(e&&typeof e=="object"&&"from"in e)}function op(e){return!!(e&&typeof e=="object"&&"after"in e)}function sp(e){return!!(e&&typeof e=="object"&&"before"in e)}function ap(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function ip(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Qt(e,t,n=Ut){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:a}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(ip(i,n))return i.includes(e);if(Rc(i))return Zt(i,e,!1,n);if(ap(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(rp(i)){const c=s(i.before,e),u=s(i.after,e),d=c>0,l=u<0;return a(i.before,i.after)?l&&d:d||l}return op(i)?s(e,i.after)>0:sp(i)?s(i.before,e)>0:typeof i=="function"?i(e):!1})}function MD(e,t,n,r,o){const{disabled:s,hidden:a,modifiers:i,showOutsideDays:c,broadcastCalendar:u,today:d}=t,{isSameDay:l,isSameMonth:f,startOfMonth:p,isBefore:g,endOfMonth:y,isAfter:b}=o,v=n&&p(n),x=r&&y(r),w={[Re.focused]:[],[Re.outside]:[],[Re.disabled]:[],[Re.hidden]:[],[Re.today]:[]},M={};for(const C of e){const{date:P,displayMonth:E}=C,D=!!(E&&!f(P,E)),R=!!(v&&g(P,v)),A=!!(x&&b(P,x)),N=!!(s&&Qt(P,s,o)),H=!!(a&&Qt(P,a,o))||R||A||!u&&!c&&D||u&&c===!1&&D,O=l(P,d??o.today());D&&w.outside.push(C),N&&w.disabled.push(C),H&&w.hidden.push(C),O&&w.today.push(C),i&&Object.keys(i).forEach(U=>{const K=i==null?void 0:i[U];K&&Qt(P,K,o)&&(M[U]?M[U].push(C):M[U]=[C])})}return C=>{const P={[Re.focused]:!1,[Re.disabled]:!1,[Re.hidden]:!1,[Re.outside]:!1,[Re.today]:!1},E={};for(const D in w){const R=w[D];P[D]=R.some(A=>A===C)}for(const D in M)E[D]=M[D].some(R=>R===C);return{...P,...E}}}function ED(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(n[s]?o.push(n[s]):t[Re[s]]?o.push(t[Re[s]]):t[Tt[s]]&&o.push(t[Tt[s]]),o),[t[oe.Day]])}function TD(e){return{...CD,...e}}function PD(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Ac(){const e={};for(const t in oe)e[oe[t]]=`rdp-${oe[t]}`;for(const t in Re)e[Re[t]]=`rdp-${Re[t]}`;for(const t in Tt)e[Tt[t]]=`rdp-${Tt[t]}`;for(const t in dt)e[dt[t]]=`rdp-${dt[t]}`;return e}function cp(e,t,n){return(n??new pt(t)).formatMonthYear(e)}const DD=cp;function RD(e,t,n){return(n??new pt(t)).format(e,"d")}function AD(e,t=Ut){return t.format(e,"LLLL")}function OD(e,t,n){return(n??new pt(t)).format(e,"cccccc")}function kD(e,t=Ut){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function ND(){return""}function lp(e,t=Ut){return t.format(e,"yyyy")}const _D=lp,ID=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:cp,formatDay:RD,formatMonthCaption:DD,formatMonthDropdown:AD,formatWeekNumber:kD,formatWeekNumberHeader:ND,formatWeekdayName:OD,formatYearCaption:_D,formatYearDropdown:lp},Symbol.toStringTag,{value:"Module"}));function jD(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...ID,...e}}function LD(e,t,n,r,o){const{startOfMonth:s,startOfYear:a,endOfYear:i,eachMonthOfInterval:c,getMonth:u}=o;return c({start:a(e),end:i(e)}).map(f=>{const p=r.formatMonthDropdown(f,o),g=u(f),y=t&&f<s(t)||n&&f>s(n)||!1;return{value:g,label:p,disabled:y}})}function FD(e,t={},n={}){let r={...t==null?void 0:t[oe.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function $D(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),s=[];for(let a=0;a<7;a++){const i=e.addDays(o,a);s.push(i)}return s}function BD(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:a,eachYearOfInterval:i,getYear:c}=r,u=s(e),d=a(t),l=i({start:u,end:d});return o&&l.reverse(),l.map(f=>{const p=n.formatYearDropdown(f,r);return{value:c(f),label:p,disabled:!1}})}function up(e,t,n,r){let o=(r??new pt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const VD=up;function dp(e,t,n){return(n??new pt(t)).formatMonthYear(e)}const WD=dp;function HD(e,t,n,r){let o=(r??new pt(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function zD(e){return"Choose the Month"}function YD(){return""}function UD(e){return"Go to the Next Month"}function GD(e){return"Go to the Previous Month"}function KD(e,t,n){return(n??new pt(t)).format(e,"cccc")}function qD(e,t){return`Week ${e}`}function XD(e){return"Week Number"}function ZD(e){return"Choose the Year"}const QD=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:WD,labelDay:VD,labelDayButton:up,labelGrid:dp,labelGridcell:HD,labelMonthDropdown:zD,labelNav:YD,labelNext:UD,labelPrevious:GD,labelWeekNumber:qD,labelWeekNumberHeader:XD,labelWeekday:KD,labelYearDropdown:ZD},Symbol.toStringTag,{value:"Module"})),lo=e=>e instanceof HTMLElement?e:null,Oa=e=>[...e.querySelectorAll("[data-animated-month]")??[]],JD=e=>lo(e.querySelector("[data-animated-month]")),ka=e=>lo(e.querySelector("[data-animated-caption]")),Na=e=>lo(e.querySelector("[data-animated-weeks]")),eR=e=>lo(e.querySelector("[data-animated-nav]")),tR=e=>lo(e.querySelector("[data-animated-weekdays]"));function nR(e,t,{classNames:n,months:r,focused:o,dateLib:s}){const a=S.useRef(null),i=S.useRef(r),c=S.useRef(!1);S.useLayoutEffect(()=>{const u=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const d=s.isSameMonth(r[0].date,u[0].date),l=s.isAfter(r[0].date,u[0].date),f=l?n[dt.caption_after_enter]:n[dt.caption_before_enter],p=l?n[dt.weeks_after_enter]:n[dt.weeks_before_enter],g=a.current,y=e.current.cloneNode(!0);if(y instanceof HTMLElement?(Oa(y).forEach(w=>{if(!(w instanceof HTMLElement))return;const M=JD(w);M&&w.contains(M)&&w.removeChild(M);const C=ka(w);C&&C.classList.remove(f);const P=Na(w);P&&P.classList.remove(p)}),a.current=y):a.current=null,c.current||d||o)return;const b=g instanceof HTMLElement?Oa(g):[],v=Oa(e.current);if(v!=null&&v.every(x=>x instanceof HTMLElement)&&b&&b.every(x=>x instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const x=eR(e.current);x&&(x.style.zIndex="1"),v.forEach((w,M)=>{const C=b[M];if(!C)return;w.style.position="relative",w.style.overflow="hidden";const P=ka(w);P&&P.classList.add(f);const E=Na(w);E&&E.classList.add(p);const D=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),P&&P.classList.remove(f),E&&E.classList.remove(p),w.style.position="",w.style.overflow="",w.contains(C)&&w.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const R=tR(C);R&&(R.style.opacity="0");const A=ka(C);A&&(A.classList.add(l?n[dt.caption_before_exit]:n[dt.caption_after_exit]),A.addEventListener("animationend",D));const N=Na(C);N&&N.classList.add(l?n[dt.weeks_before_exit]:n[dt.weeks_after_exit]),w.insertBefore(C,w.firstChild)})}})}function rR(e,t,n,r){const o=e[0],s=e[e.length-1],{ISOWeek:a,fixedWeeks:i,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:l,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:g,endOfWeek:y,isAfter:b,startOfBroadcastWeek:v,startOfISOWeek:x,startOfWeek:w}=r,M=c?v(o,r):a?x(o):w(o),C=c?f(s):a?p(g(s)):y(g(s)),P=d(C,M),E=l(s,o)+1,D=[];for(let N=0;N<=P;N++){const H=u(M,N);if(t&&b(H,t))break;D.push(H)}const A=(c?35:42)*E;if(i&&D.length<A){const N=A-D.length;for(let H=0;H<N;H++){const O=u(D[D.length-1],1);D.push(O)}}return D}function oR(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((s,a)=>s.concat(a.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function sR(e,t,n,r){const{numberOfMonths:o=1}=n,s=[];for(let a=0;a<o;a++){const i=r.addMonths(e,a);if(t&&i>t)break;s.push(i)}return s}function Ad(e,t,n,r){const{month:o,defaultMonth:s,today:a=r.today(),numberOfMonths:i=1}=e;let c=o||s||a;const{differenceInCalendarMonths:u,addMonths:d,startOfMonth:l}=r;if(n&&u(n,c)<i-1){const f=-1*(i-1);c=d(n,f)}return t&&u(c,t)<0&&(c=t),l(c)}function aR(e,t,n,r){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:i,endOfWeek:c,getISOWeek:u,getWeek:d,startOfBroadcastWeek:l,startOfISOWeek:f,startOfWeek:p}=r,g=e.reduce((y,b)=>{const v=n.broadcastCalendar?l(b,r):n.ISOWeek?f(b):p(b),x=n.broadcastCalendar?s(b):n.ISOWeek?a(i(b)):c(i(b)),w=t.filter(E=>E>=v&&E<=x),M=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<M){const E=t.filter(D=>{const R=M-w.length;return D>x&&D<=o(x,R)});w.push(...E)}const C=w.reduce((E,D)=>{const R=n.ISOWeek?u(D):d(D),A=E.find(H=>H.weekNumber===R),N=new tp(D,b,r);return A?A.days.push(N):E.push(new XP(R,[N])),E},[]),P=new qP(b,C);return y.push(P),y},[]);return n.reverseMonths?g.reverse():g}function iR(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:s,startOfMonth:a,endOfMonth:i,addYears:c,endOfYear:u,newDate:d,today:l}=t,{fromYear:f,toYear:p,fromMonth:g,toMonth:y}=e;!n&&g&&(n=g),!n&&f&&(n=t.newDate(f,0,1)),!r&&y&&(r=y),!r&&p&&(r=d(p,11,31));const b=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):f?n=d(f,0,1):!n&&b&&(n=o(c(e.today??l(),-100))),r?r=i(r):p?r=d(p,11,31):!r&&b&&(r=u(e.today??l())),[n&&s(n),r&&s(r)]}function cR(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=n,{startOfMonth:a,addMonths:i,differenceInCalendarMonths:c}=r,u=o?s:1,d=a(e);if(!t)return i(d,u);if(!(c(t,e)<s))return i(d,u)}function lR(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=n,{startOfMonth:a,addMonths:i,differenceInCalendarMonths:c}=r,u=o?s??1:1,d=a(e);if(!t)return i(d,-u);if(!(c(d,t)<=0))return i(d,-u)}function uR(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Rs(e,t){const[n,r]=S.useState(e);return[t===void 0?n:t,r]}function dR(e,t){const[n,r]=iR(e,t),{startOfMonth:o,endOfMonth:s}=t,a=Ad(e,n,r,t),[i,c]=Rs(a,e.month?a:void 0);S.useEffect(()=>{const P=Ad(e,n,r,t);c(P)},[e.timeZone]);const u=sR(i,r,e,t),d=rR(u,e.endMonth?s(e.endMonth):void 0,e,t),l=aR(u,d,e,t),f=uR(l),p=oR(l),g=lR(i,n,e,t),y=cR(i,r,e,t),{disableNavigation:b,onMonthChange:v}=e,x=P=>f.some(E=>E.days.some(D=>D.isEqualTo(P))),w=P=>{if(b)return;let E=o(P);n&&E<o(n)&&(E=o(n)),r&&E>o(r)&&(E=o(r)),c(E),v==null||v(E)};return{months:l,weeks:f,days:p,navStart:n,navEnd:r,previousMonth:g,nextMonth:y,goToMonth:w,goToDay:P=>{x(P)||w(P.date)}}}var Ft;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ft||(Ft={}));function Od(e){return!e[Re.disabled]&&!e[Re.hidden]&&!e[Re.outside]}function fR(e,t,n,r){let o,s=-1;for(const a of e){const i=t(a);Od(i)&&(i[Re.focused]&&s<Ft.FocusedModifier?(o=a,s=Ft.FocusedModifier):r!=null&&r.isEqualTo(a)&&s<Ft.LastFocused?(o=a,s=Ft.LastFocused):n(a.date)&&s<Ft.Selected?(o=a,s=Ft.Selected):i[Re.today]&&s<Ft.Today&&(o=a,s=Ft.Today))}return o||(o=e.find(a=>Od(t(a)))),o}function hR(e,t,n,r,o,s,a){const{ISOWeek:i,broadcastCalendar:c}=s,{addDays:u,addMonths:d,addWeeks:l,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:g,endOfWeek:y,max:b,min:v,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:M}=a;let P={day:u,week:l,month:d,year:f,startOfWeek:E=>c?x(E,a):i?w(E):M(E),endOfWeek:E=>c?p(E):i?g(E):y(E)}[e](n,t==="after"?1:-1);return t==="before"&&r?P=b([r,P]):t==="after"&&o&&(P=v([o,P])),P}function fp(e,t,n,r,o,s,a,i=0){if(i>365)return;const c=hR(e,t,n.date,r,o,s,a),u=!!(s.disabled&&Qt(c,s.disabled,a)),d=!!(s.hidden&&Qt(c,s.hidden,a)),l=c,f=new tp(c,l,a);return!u&&!d?f:fp(e,t,f,r,o,s,a,i+1)}function mR(e,t,n,r,o){const{autoFocus:s}=e,[a,i]=S.useState(),c=fR(t.days,n,r||(()=>!1),a),[u,d]=S.useState(s?c:void 0);return{isFocusTarget:y=>!!(c!=null&&c.isEqualTo(y)),setFocused:d,focused:u,blur:()=>{i(u),d(void 0)},moveFocus:(y,b)=>{if(!u)return;const v=fp(y,b,u,t.navStart,t.navEnd,e,o);v&&(e.disableNavigation&&!t.days.some(w=>w.isEqualTo(v))||(t.goToDay(v),d(v)))}}}function pR(e,t){const{selected:n,required:r,onSelect:o}=e,[s,a]=Rs(n,o?n:void 0),i=o?n:s,{isSameDay:c}=t,u=p=>(i==null?void 0:i.some(g=>c(g,p)))??!1,{min:d,max:l}=e;return{selected:i,select:(p,g,y)=>{let b=[...i??[]];if(u(p)){if((i==null?void 0:i.length)===d||r&&(i==null?void 0:i.length)===1)return;b=i==null?void 0:i.filter(v=>!c(v,p))}else(i==null?void 0:i.length)===l?b=[p]:b=[...b,p];return o||a(b),o==null||o(b,p,g,y),b},isSelected:u}}function gR(e,t,n=0,r=0,o=!1,s=Ut){const{from:a,to:i}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=s;let l;if(!a&&!i)l={from:e,to:n>0?void 0:e};else if(a&&!i)c(a,e)?n===0?l={from:a,to:e}:o?l={from:a,to:void 0}:l=void 0:d(e,a)?l={from:e,to:a}:l={from:a,to:e};else if(a&&i)if(c(a,e)&&c(i,e))o?l={from:a,to:i}:l=void 0;else if(c(a,e))l={from:a,to:n>0?void 0:e};else if(c(i,e))l={from:e,to:n>0?void 0:e};else if(d(e,a))l={from:e,to:i};else if(u(e,a))l={from:a,to:e};else if(u(e,i))l={from:a,to:e};else throw new Error("Invalid range");if(l!=null&&l.from&&(l!=null&&l.to)){const f=s.differenceInCalendarDays(l.to,l.from);r>0&&f>r?l={from:e,to:void 0}:n>1&&f<n&&(l={from:e,to:void 0})}return l}function vR(e,t,n=Ut){const r=Array.isArray(t)?t:[t];let o=e.from;const s=n.differenceInCalendarDays(e.to,e.from),a=Math.min(s,6);for(let i=0;i<=a;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function kd(e,t,n=Ut){return Zt(e,t.from,!1,n)||Zt(e,t.to,!1,n)||Zt(t,e.from,!1,n)||Zt(t,e.to,!1,n)}function yR(e,t,n=Ut){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?Zt(e,i,!1,n):ip(i,n)?i.some(c=>Zt(e,c,!1,n)):Rc(i)?i.from&&i.to?kd(e,{from:i.from,to:i.to},n):!1:ap(i)?vR(e,i.dayOfWeek,n):rp(i)?n.isAfter(i.before,i.after)?kd(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):Qt(e.from,i,n)||Qt(e.to,i,n):op(i)||sp(i)?Qt(e.from,i,n)||Qt(e.to,i,n):!1))return!0;const a=r.filter(i=>typeof i=="function");if(a.length){let i=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(a.some(d=>d(i)))return!0;i=n.addDays(i,1)}}return!1}function bR(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:s,onSelect:a}=e,[i,c]=Rs(o,a?o:void 0),u=a?o:i;return{selected:u,select:(f,p,g)=>{const{min:y,max:b}=e,v=f?gR(f,u,y,b,s,t):void 0;return r&&n&&(v!=null&&v.from)&&v.to&&yR({from:v.from,to:v.to},n,t)&&(v.from=f,v.to=void 0),a||c(v),a==null||a(v,f,p,g),v},isSelected:f=>u&&Zt(u,f,!1,t)}}function xR(e,t){const{selected:n,required:r,onSelect:o}=e,[s,a]=Rs(n,o?n:void 0),i=o?n:s,{isSameDay:c}=t;return{selected:i,select:(l,f,p)=>{let g=l;return!r&&i&&i&&c(l,i)&&(g=void 0),o||a(g),o==null||o(g,l,f,p),g},isSelected:l=>i?c(i,l):!1}}function wR(e,t){const n=xR(e,t),r=pR(e,t),o=bR(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function SR(e){var jt;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new Je(t.today,t.timeZone)),t.month&&(t.month=new Je(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new Je(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new Je(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new Je(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new Je(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(jt=t.selected)==null?void 0:jt.map(W=>new Je(W,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new Je(t.selected.from,t.timeZone):void 0,to:t.selected.to?new Je(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:s,locale:a,classNames:i}=S.useMemo(()=>{const W={...Dc,...t.locale};return{dateLib:new pt({locale:W,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:TD(t.components),formatters:jD(t.formatters),labels:{...QD,...t.labels},locale:W,classNames:{...Ac(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:u,navLayout:d,numberOfMonths:l=1,onDayBlur:f,onDayClick:p,onDayFocus:g,onDayKeyDown:y,onDayMouseEnter:b,onDayMouseLeave:v,onNextClick:x,onPrevClick:w,showWeekNumber:M,styles:C}=t,{formatCaption:P,formatDay:E,formatMonthDropdown:D,formatWeekNumber:R,formatWeekNumberHeader:A,formatWeekdayName:N,formatYearDropdown:H}=r,O=dR(t,s),{days:U,months:K,navStart:B,navEnd:F,previousMonth:j,nextMonth:_,goToMonth:Z}=O,se=MD(U,t,B,F,s),{isSelected:k,select:L,selected:Y}=wR(t,s)??{},{blur:V,focused:Q,isFocusTarget:J,moveFocus:X,setFocused:re}=mR(t,O,se,k??(()=>!1),s),{labelDayButton:he,labelGridcell:le,labelGrid:G,labelMonthDropdown:ue,labelNav:I,labelPrevious:te,labelNext:me,labelWeekday:pe,labelWeekNumber:xe,labelWeekNumberHeader:ae,labelYearDropdown:ve}=o,Xe=S.useMemo(()=>$D(s,t.ISOWeek),[s,t.ISOWeek]),ge=u!==void 0||p!==void 0,Me=S.useCallback(()=>{j&&(Z(j),w==null||w(j))},[j,Z,w]),Le=S.useCallback(()=>{_&&(Z(_),x==null||x(_))},[Z,_,x]),Ke=S.useCallback((W,ne)=>q=>{q.preventDefault(),q.stopPropagation(),re(W),L==null||L(W.date,ne,q),p==null||p(W.date,ne,q)},[L,p,re]),He=S.useCallback((W,ne)=>q=>{re(W),g==null||g(W.date,ne,q)},[g,re]),Ze=S.useCallback((W,ne)=>q=>{V(),f==null||f(W.date,ne,q)},[V,f]),st=S.useCallback((W,ne)=>q=>{const ee={ArrowLeft:[q.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[q.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[q.shiftKey?"year":"week","after"],ArrowUp:[q.shiftKey?"year":"week","before"],PageUp:[q.shiftKey?"year":"month","before"],PageDown:[q.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ee[q.key]){q.preventDefault(),q.stopPropagation();const[de,z]=ee[q.key];X(de,z)}y==null||y(W.date,ne,q)},[X,y,t.dir]),at=S.useCallback((W,ne)=>q=>{b==null||b(W.date,ne,q)},[b]),Fe=S.useCallback((W,ne)=>q=>{v==null||v(W.date,ne,q)},[v]),gt=S.useCallback(W=>ne=>{const q=Number(ne.target.value),ee=s.setMonth(s.startOfMonth(W),q);Z(ee)},[s,Z]),$e=S.useCallback(W=>ne=>{const q=Number(ne.target.value),ee=s.setYear(s.startOfMonth(W),q);Z(ee)},[s,Z]),{className:ze,style:St}=S.useMemo(()=>({className:[i[oe.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[oe.Root],...t.style}}),[i,t.className,t.style,C]),It=PD(t),qt=S.useRef(null);nR(qt,!!t.animate,{classNames:i,months:K,focused:Q,dateLib:s});const wn={dayPickerProps:t,selected:Y,select:L,isSelected:k,months:K,nextMonth:_,previousMonth:j,goToMonth:Z,getModifiers:se,components:n,classNames:i,styles:C,labels:o,formatters:r};return S.createElement(np.Provider,{value:wn},S.createElement(n.Root,{rootRef:t.animate?qt:void 0,className:ze,style:St,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...It},S.createElement(n.Months,{className:i[oe.Months],style:C==null?void 0:C[oe.Months]},!t.hideNavigation&&!d&&S.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[oe.Nav],style:C==null?void 0:C[oe.Nav],"aria-label":I(),onPreviousClick:Me,onNextClick:Le,previousMonth:j,nextMonth:_}),K.map((W,ne)=>S.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:i[oe.Month],style:C==null?void 0:C[oe.Month],key:ne,displayIndex:ne,calendarMonth:W},d==="around"&&!t.hideNavigation&&ne===0&&S.createElement(n.PreviousMonthButton,{type:"button",className:i[oe.PreviousMonthButton],tabIndex:j?void 0:-1,"aria-disabled":j?void 0:!0,"aria-label":te(j),onClick:Me,"data-animated-button":t.animate?"true":void 0},S.createElement(n.Chevron,{disabled:j?void 0:!0,className:i[oe.Chevron],orientation:t.dir==="rtl"?"right":"left"})),S.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:i[oe.MonthCaption],style:C==null?void 0:C[oe.MonthCaption],calendarMonth:W,displayIndex:ne},c!=null&&c.startsWith("dropdown")?S.createElement(n.DropdownNav,{className:i[oe.Dropdowns],style:C==null?void 0:C[oe.Dropdowns]},(()=>{const q=c==="dropdown"||c==="dropdown-months"?S.createElement(n.MonthsDropdown,{key:"month",className:i[oe.MonthsDropdown],"aria-label":ue(),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:gt(W.date),options:LD(W.date,B,F,r,s),style:C==null?void 0:C[oe.Dropdown],value:s.getMonth(W.date)}):S.createElement("span",{key:"month"},D(W.date,s)),ee=c==="dropdown"||c==="dropdown-years"?S.createElement(n.YearsDropdown,{key:"year",className:i[oe.YearsDropdown],"aria-label":ve(s.options),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:$e(W.date),options:BD(B,F,r,s,!!t.reverseYears),style:C==null?void 0:C[oe.Dropdown],value:s.getYear(W.date)}):S.createElement("span",{key:"year"},H(W.date,s));return s.getMonthYearOrder()==="year-first"?[ee,q]:[q,ee]})(),S.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},P(W.date,s.options,s))):S.createElement(n.CaptionLabel,{className:i[oe.CaptionLabel],role:"status","aria-live":"polite"},P(W.date,s.options,s))),d==="around"&&!t.hideNavigation&&ne===l-1&&S.createElement(n.NextMonthButton,{type:"button",className:i[oe.NextMonthButton],tabIndex:_?void 0:-1,"aria-disabled":_?void 0:!0,"aria-label":me(_),onClick:Le,"data-animated-button":t.animate?"true":void 0},S.createElement(n.Chevron,{disabled:_?void 0:!0,className:i[oe.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ne===l-1&&d==="after"&&!t.hideNavigation&&S.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[oe.Nav],style:C==null?void 0:C[oe.Nav],"aria-label":I(),onPreviousClick:Me,onNextClick:Le,previousMonth:j,nextMonth:_}),S.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":G(W.date,s.options,s)||void 0,className:i[oe.MonthGrid],style:C==null?void 0:C[oe.MonthGrid]},!t.hideWeekdays&&S.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:i[oe.Weekdays],style:C==null?void 0:C[oe.Weekdays]},M&&S.createElement(n.WeekNumberHeader,{"aria-label":ae(s.options),className:i[oe.WeekNumberHeader],style:C==null?void 0:C[oe.WeekNumberHeader],scope:"col"},A()),Xe.map(q=>S.createElement(n.Weekday,{"aria-label":pe(q,s.options,s),className:i[oe.Weekday],key:String(q),style:C==null?void 0:C[oe.Weekday],scope:"col"},N(q,s.options,s)))),S.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:i[oe.Weeks],style:C==null?void 0:C[oe.Weeks]},W.weeks.map(q=>S.createElement(n.Week,{className:i[oe.Week],key:q.weekNumber,style:C==null?void 0:C[oe.Week],week:q},M&&S.createElement(n.WeekNumber,{week:q,style:C==null?void 0:C[oe.WeekNumber],"aria-label":xe(q.weekNumber,{locale:a}),className:i[oe.WeekNumber],scope:"row",role:"rowheader"},R(q.weekNumber,s)),q.days.map(ee=>{const{date:de}=ee,z=se(ee);if(z[Re.focused]=!z.hidden&&!!(Q!=null&&Q.isEqualTo(ee)),z[Tt.selected]=(k==null?void 0:k(de))||z.selected,Rc(Y)){const{from:Qe,to:be}=Y;z[Tt.range_start]=!!(Qe&&be&&s.isSameDay(de,Qe)),z[Tt.range_end]=!!(Qe&&be&&s.isSameDay(de,be)),z[Tt.range_middle]=Zt(Y,de,!0,s)}const fe=FD(z,C,t.modifiersStyles),ye=ED(z,i,t.modifiersClassNames),we=!ge&&!z.hidden?le(de,z,s.options,s):void 0;return S.createElement(n.Day,{key:`${s.format(de,"yyyy-MM-dd")}_${s.format(ee.displayMonth,"yyyy-MM")}`,day:ee,modifiers:z,className:ye.join(" "),style:fe,role:"gridcell","aria-selected":z.selected||void 0,"aria-label":we,"data-day":s.format(de,"yyyy-MM-dd"),"data-month":ee.outside?s.format(de,"yyyy-MM"):void 0,"data-selected":z.selected||void 0,"data-disabled":z.disabled||void 0,"data-hidden":z.hidden||void 0,"data-outside":ee.outside||void 0,"data-focused":z.focused||void 0,"data-today":z.today||void 0},!z.hidden&&ge?S.createElement(n.DayButton,{className:i[oe.DayButton],style:C==null?void 0:C[oe.DayButton],type:"button",day:ee,modifiers:z,disabled:z.disabled||void 0,tabIndex:J(ee)?0:-1,"aria-label":he(de,z,s.options,s),onClick:Ke(ee,z),onBlur:Ze(ee,z),onFocus:He(ee,z),onKeyDown:st(ee,z),onMouseEnter:at(ee,z),onMouseLeave:Fe(ee,z)},E(de,s.options,s)):!z.hidden&&E(ee.date,s.options,s))})))))))),t.footer&&S.createElement(n.Footer,{className:i[oe.Footer],style:C==null?void 0:C[oe.Footer],role:"status","aria-live":"polite"},t.footer)))}function CR({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:s,components:a,...i}){const c=Ac();return m.jsx(SR,{showOutsideDays:n,className:T.cn("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...s},classNames:{root:T.cn("w-fit",c.root),months:T.cn("flex gap-4 flex-col md:flex-row relative",c.months),month:T.cn("flex flex-col w-full gap-4",c.month),nav:T.cn("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",c.nav),button_previous:T.cn(T.buttonVariants({variant:o}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_previous),button_next:T.cn(T.buttonVariants({variant:o}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_next),month_caption:T.cn("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",c.month_caption),dropdowns:T.cn("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",c.dropdowns),dropdown_root:T.cn("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",c.dropdown_root),dropdown:T.cn("absolute bg-popover inset-0 opacity-0",c.dropdown),caption_label:T.cn("select-none font-medium",r==="label"?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:T.cn("flex",c.weekdays),weekday:T.cn("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",c.weekday),week:T.cn("flex w-full mt-2",c.week),week_number_header:T.cn("select-none w-(--cell-size)",c.week_number_header),week_number:T.cn("text-[0.8rem] select-none text-muted-foreground",c.week_number),day:T.cn("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",c.day),range_start:T.cn("rounded-l-md bg-accent",c.range_start),range_middle:T.cn("rounded-none",c.range_middle),range_end:T.cn("rounded-r-md bg-accent",c.range_end),today:T.cn("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:T.cn("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:T.cn("text-muted-foreground opacity-50",c.disabled),hidden:T.cn("invisible",c.hidden),...t},components:{Root:({className:u,rootRef:d,...l})=>m.jsx("div",{"data-slot":"calendar",ref:d,className:T.cn(u),...l}),Chevron:({className:u,orientation:d,...l})=>d==="left"?m.jsx(ke.ChevronLeftIcon,{className:T.cn("size-4",u),...l}):d==="right"?m.jsx(ke.ChevronRightIcon,{className:T.cn("size-4",u),...l}):m.jsx(ke.ChevronDownIcon,{className:T.cn("size-4",u),...l}),DayButton:hp,WeekNumber:({children:u,...d})=>m.jsx("td",{...d,children:m.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:u})}),...a},...i})}function hp({className:e,day:t,modifiers:n,...r}){const o=Ac(),s=h.useRef(null);return h.useEffect(()=>{var a;n.focused&&((a=s.current)==null||a.focus())},[n.focused]),m.jsx(T.Button,{ref:s,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:T.cn("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}function MR(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nd(e){return MR(e)||Array.isArray(e)}function ER(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Oc(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==s?!1:n.every(a=>{const i=e[a],c=t[a];return typeof i=="function"?`${i}`==`${c}`:!Nd(i)||!Nd(c)?i===c:Oc(i,c)})}function _d(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function TR(e,t){if(e.length!==t.length)return!1;const n=_d(e),r=_d(t);return n.every((o,s)=>{const a=r[s];return Oc(o,a)})}function kc(e){return typeof e=="number"}function bi(e){return typeof e=="string"}function As(e){return typeof e=="boolean"}function Id(e){return Object.prototype.toString.call(e)==="[object Object]"}function Oe(e){return Math.abs(e)}function Nc(e){return Math.sign(e)}function Lr(e,t){return Oe(e-t)}function PR(e,t){if(e===0||t===0||Oe(e)<=Oe(t))return 0;const n=Lr(Oe(e),Oe(t));return Oe(n/e)}function DR(e){return Math.round(e*100)/100}function Yr(e){return Ur(e).map(Number)}function Dt(e){return e[uo(e)]}function uo(e){return Math.max(0,e.length-1)}function _c(e,t){return t===uo(e)}function jd(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function Ur(e){return Object.keys(e)}function mp(e,t){return[e,t].reduce((n,r)=>(Ur(r).forEach(o=>{const s=n[o],a=r[o],i=Id(s)&&Id(a);n[o]=i?mp(s,a):a}),n),{})}function xi(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function RR(e,t){const n={start:r,center:o,end:s};function r(){return 0}function o(c){return s(c)/2}function s(c){return t-c}function a(c,u){return bi(e)?n[e](c):e(t,c,u)}return{measure:a}}function Gr(){let e=[];function t(o,s,a,i={passive:!0}){let c;if("addEventListener"in o)o.addEventListener(s,a,i),c=()=>o.removeEventListener(s,a,i);else{const u=o;u.addListener(a),c=()=>u.removeListener(a)}return e.push(c),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function AR(e,t,n,r){const o=Gr(),s=1e3/60;let a=null,i=0,c=0;function u(){o.add(e,"visibilitychange",()=>{e.hidden&&g()})}function d(){p(),o.clear()}function l(b){if(!c)return;a||(a=b,n(),n());const v=b-a;for(a=b,i+=v;i>=s;)n(),i-=s;const x=i/s;r(x),c&&(c=t.requestAnimationFrame(l))}function f(){c||(c=t.requestAnimationFrame(l))}function p(){t.cancelAnimationFrame(c),a=null,i=0,c=0}function g(){a=null,i=0}return{init:u,destroy:d,start:f,stop:p,update:n,render:r}}function OR(e,t){const n=t==="rtl",r=e==="y",o=r?"y":"x",s=r?"x":"y",a=!r&&n?-1:1,i=d(),c=l();function u(g){const{height:y,width:b}=g;return r?y:b}function d(){return r?"top":n?"right":"left"}function l(){return r?"bottom":n?"left":"right"}function f(g){return g*a}return{scroll:o,cross:s,startEdge:i,endEdge:c,measureSize:u,direction:f}}function _n(e=0,t=0){const n=Oe(e-t);function r(u){return u<e}function o(u){return u>t}function s(u){return r(u)||o(u)}function a(u){return s(u)?r(u)?e:t:u}function i(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:a,reachedAny:s,reachedMax:o,reachedMin:r,removeOffset:i}}function pp(e,t,n){const{constrain:r}=_n(0,e),o=e+1;let s=a(t);function a(f){return n?Oe((o+f)%o):r(f)}function i(){return s}function c(f){return s=a(f),l}function u(f){return d().set(i()+f)}function d(){return pp(e,i(),n)}const l={get:i,set:c,add:u,clone:d};return l}function kR(e,t,n,r,o,s,a,i,c,u,d,l,f,p,g,y,b,v,x){const{cross:w,direction:M}=e,C=["INPUT","SELECT","TEXTAREA"],P={passive:!1},E=Gr(),D=Gr(),R=_n(50,225).constrain(p.measure(20)),A={mouse:300,touch:400},N={mouse:500,touch:600},H=g?43:25;let O=!1,U=0,K=0,B=!1,F=!1,j=!1,_=!1;function Z(G){if(!x)return;function ue(te){(As(x)||x(G,te))&&Q(te)}const I=t;E.add(I,"dragstart",te=>te.preventDefault(),P).add(I,"touchmove",()=>{},P).add(I,"touchend",()=>{}).add(I,"touchstart",ue).add(I,"mousedown",ue).add(I,"touchcancel",X).add(I,"contextmenu",X).add(I,"click",re,!0)}function se(){E.clear(),D.clear()}function k(){const G=_?n:t;D.add(G,"touchmove",J,P).add(G,"touchend",X).add(G,"mousemove",J,P).add(G,"mouseup",X)}function L(G){const ue=G.nodeName||"";return C.includes(ue)}function Y(){return(g?N:A)[_?"mouse":"touch"]}function V(G,ue){const I=l.add(Nc(G)*-1),te=d.byDistance(G,!g).distance;return g||Oe(G)<R?te:b&&ue?te*.5:d.byIndex(I.get(),0).distance}function Q(G){const ue=xi(G,r);_=ue,j=g&&ue&&!G.buttons&&O,O=Lr(o.get(),a.get())>=2,!(ue&&G.button!==0)&&(L(G.target)||(B=!0,s.pointerDown(G),u.useFriction(0).useDuration(0),o.set(a),k(),U=s.readPoint(G),K=s.readPoint(G,w),f.emit("pointerDown")))}function J(G){if(!xi(G,r)&&G.touches.length>=2)return X(G);const I=s.readPoint(G),te=s.readPoint(G,w),me=Lr(I,U),pe=Lr(te,K);if(!F&&!_&&(!G.cancelable||(F=me>pe,!F)))return X(G);const xe=s.pointerMove(G);me>y&&(j=!0),u.useFriction(.3).useDuration(.75),i.start(),o.add(M(xe)),G.preventDefault()}function X(G){const I=d.byDistance(0,!1).index!==l.get(),te=s.pointerUp(G)*Y(),me=V(M(te),I),pe=PR(te,me),xe=H-10*pe,ae=v+pe/50;F=!1,B=!1,D.clear(),u.useDuration(xe).useFriction(ae),c.distance(me,!g),_=!1,f.emit("pointerUp")}function re(G){j&&(G.stopPropagation(),G.preventDefault(),j=!1)}function he(){return B}return{init:Z,destroy:se,pointerDown:he}}function NR(e,t){let r,o;function s(l){return l.timeStamp}function a(l,f){const g=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(xi(l,t)?l:l.touches[0])[g]}function i(l){return r=l,o=l,a(l)}function c(l){const f=a(l)-a(o),p=s(l)-s(r)>170;return o=l,p&&(r=l),f}function u(l){if(!r||!o)return 0;const f=a(o)-a(r),p=s(l)-s(r),g=s(l)-s(o)>170,y=f/p;return p&&!g&&Oe(y)>.1?y:0}return{pointerDown:i,pointerMove:c,pointerUp:u,readPoint:a}}function _R(){function e(n){const{offsetTop:r,offsetLeft:o,offsetWidth:s,offsetHeight:a}=n;return{top:r,right:o+s,bottom:r+a,left:o,width:s,height:a}}return{measure:e}}function IR(e){function t(r){return e*(r/100)}return{measure:t}}function jR(e,t,n,r,o,s,a){const i=[e].concat(r);let c,u,d=[],l=!1;function f(b){return o.measureSize(a.measure(b))}function p(b){if(!s)return;u=f(e),d=r.map(f);function v(x){for(const w of x){if(l)return;const M=w.target===e,C=r.indexOf(w.target),P=M?u:d[C],E=f(M?e:r[C]);if(Oe(E-P)>=.5){b.reInit(),t.emit("resize");break}}}c=new ResizeObserver(x=>{(As(s)||s(b,x))&&v(x)}),n.requestAnimationFrame(()=>{i.forEach(x=>c.observe(x))})}function g(){l=!0,c&&c.disconnect()}return{init:p,destroy:g}}function LR(e,t,n,r,o,s){let a=0,i=0,c=o,u=s,d=e.get(),l=0;function f(){const P=r.get()-e.get(),E=!c;let D=0;return E?(a=0,n.set(r),e.set(r),D=P):(n.set(e),a+=P/c,a*=u,d+=a,e.add(a),D=d-l),i=Nc(D),l=d,C}function p(){const P=r.get()-t.get();return Oe(P)<.001}function g(){return c}function y(){return i}function b(){return a}function v(){return w(o)}function x(){return M(s)}function w(P){return c=P,C}function M(P){return u=P,C}const C={direction:y,duration:g,velocity:b,seek:f,settled:p,useBaseFriction:x,useBaseDuration:v,useFriction:M,useDuration:w};return C}function FR(e,t,n,r,o){const s=o.measure(10),a=o.measure(50),i=_n(.1,.99);let c=!1;function u(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function d(p){if(!u())return;const g=e.reachedMin(t.get())?"min":"max",y=Oe(e[g]-t.get()),b=n.get()-t.get(),v=i.constrain(y/a);n.subtract(b*v),!p&&Oe(b)<s&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function l(p){c=!p}return{shouldConstrain:u,constrain:d,toggleActive:l}}function $R(e,t,n,r,o){const s=_n(-t+e,0),a=l(),i=d(),c=f();function u(g,y){return Lr(g,y)<=1}function d(){const g=a[0],y=Dt(a),b=a.lastIndexOf(g),v=a.indexOf(y)+1;return _n(b,v)}function l(){return n.map((g,y)=>{const{min:b,max:v}=s,x=s.constrain(g),w=!y,M=_c(n,y);return w?v:M||u(b,x)?b:u(v,x)?v:x}).map(g=>parseFloat(g.toFixed(3)))}function f(){if(t<=e+o)return[s.max];if(r==="keepSnaps")return a;const{min:g,max:y}=i;return a.slice(g,y)}return{snapsContained:c,scrollContainLimit:i}}function BR(e,t,n){const r=t[0],o=n?r-e:Dt(t);return{limit:_n(o,r)}}function VR(e,t,n,r){const s=t.min+.1,a=t.max+.1,{reachedMin:i,reachedMax:c}=_n(s,a);function u(f){return f===1?c(n.get()):f===-1?i(n.get()):!1}function d(f){if(!u(f))return;const p=e*(f*-1);r.forEach(g=>g.add(p))}return{loop:d}}function WR(e){const{max:t,length:n}=e;function r(s){const a=s-t;return n?a/-n:0}return{get:r}}function HR(e,t,n,r,o){const{startEdge:s,endEdge:a}=e,{groupSlides:i}=o,c=l().map(t.measure),u=f(),d=p();function l(){return i(r).map(y=>Dt(y)[a]-y[0][s]).map(Oe)}function f(){return r.map(y=>n[s]-y[s]).map(y=>-Oe(y))}function p(){return i(u).map(y=>y[0]).map((y,b)=>y+c[b])}return{snaps:u,snapsAligned:d}}function zR(e,t,n,r,o,s){const{groupSlides:a}=o,{min:i,max:c}=r,u=d();function d(){const f=a(s),p=!e||t==="keepSnaps";return n.length===1?[s]:p?f:f.slice(i,c).map((g,y,b)=>{const v=!y,x=_c(b,y);if(v){const w=Dt(b[0])+1;return jd(w)}if(x){const w=uo(s)-Dt(b)[0]+1;return jd(w,Dt(b)[0])}return g})}return{slideRegistry:u}}function YR(e,t,n,r,o){const{reachedAny:s,removeOffset:a,constrain:i}=r;function c(g){return g.concat().sort((y,b)=>Oe(y)-Oe(b))[0]}function u(g){const y=e?a(g):i(g),b=t.map((x,w)=>({diff:d(x-y,0),index:w})).sort((x,w)=>Oe(x.diff)-Oe(w.diff)),{index:v}=b[0];return{index:v,distance:y}}function d(g,y){const b=[g,g+n,g-n];if(!e)return g;if(!y)return c(b);const v=b.filter(x=>Nc(x)===y);return v.length?c(v):Dt(b)-n}function l(g,y){const b=t[g]-o.get(),v=d(b,y);return{index:g,distance:v}}function f(g,y){const b=o.get()+g,{index:v,distance:x}=u(b),w=!e&&s(b);if(!y||w)return{index:v,distance:g};const M=t[v]-x,C=g+d(M,0);return{index:v,distance:C}}return{byDistance:f,byIndex:l,shortcut:d}}function UR(e,t,n,r,o,s,a){function i(l){const f=l.distance,p=l.index!==t.get();s.add(f),f&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(l.index),a.emit("select"))}function c(l,f){const p=o.byDistance(l,f);i(p)}function u(l,f){const p=t.clone().set(l),g=o.byIndex(p.get(),f);i(g)}return{distance:c,index:u}}function GR(e,t,n,r,o,s,a,i){const c={passive:!0,capture:!0};let u=0;function d(p){if(!i)return;function g(y){if(new Date().getTime()-u>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const x=n.findIndex(w=>w.includes(y));kc(x)&&(o.useDuration(0),r.index(x,0),a.emit("slideFocus"))}s.add(document,"keydown",l,!1),t.forEach((y,b)=>{s.add(y,"focus",v=>{(As(i)||i(p,v))&&g(b)},c)})}function l(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:d}}function Ar(e){let t=e;function n(){return t}function r(c){t=a(c)}function o(c){t+=a(c)}function s(c){t-=a(c)}function a(c){return kc(c)?c:c.get()}return{get:n,set:r,add:o,subtract:s}}function gp(e,t){const n=e.scroll==="x"?a:i,r=t.style;let o=null,s=!1;function a(f){return`translate3d(${f}px,0px,0px)`}function i(f){return`translate3d(0px,${f}px,0px)`}function c(f){if(s)return;const p=DR(e.direction(f));p!==o&&(r.transform=n(p),o=p)}function u(f){s=!f}function d(){s||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:d,to:c,toggleActive:u}}function KR(e,t,n,r,o,s,a,i,c){const d=Yr(o),l=Yr(o).reverse(),f=v().concat(x());function p(E,D){return E.reduce((R,A)=>R-o[A],D)}function g(E,D){return E.reduce((R,A)=>p(R,D)>0?R.concat([A]):R,[])}function y(E){return s.map((D,R)=>({start:D-r[R]+.5+E,end:D+t-.5+E}))}function b(E,D,R){const A=y(D);return E.map(N=>{const H=R?0:-n,O=R?n:0,U=R?"end":"start",K=A[N][U];return{index:N,loopPoint:K,slideLocation:Ar(-1),translate:gp(e,c[N]),target:()=>i.get()>K?H:O}})}function v(){const E=a[0],D=g(l,E);return b(D,n,!1)}function x(){const E=t-a[0]-1,D=g(d,E);return b(D,-n,!0)}function w(){return f.every(({index:E})=>{const D=d.filter(R=>R!==E);return p(D,t)<=.1})}function M(){f.forEach(E=>{const{target:D,translate:R,slideLocation:A}=E,N=D();N!==A.get()&&(R.to(N),A.set(N))})}function C(){f.forEach(E=>E.translate.clear())}return{canLoop:w,clear:C,loop:M,loopPoints:f}}function qR(e,t,n){let r,o=!1;function s(c){if(!n)return;function u(d){for(const l of d)if(l.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(d=>{o||(As(n)||n(c,d))&&u(d)}),r.observe(e,{childList:!0})}function a(){r&&r.disconnect(),o=!0}return{init:s,destroy:a}}function XR(e,t,n,r){const o={};let s=null,a=null,i,c=!1;function u(){i=new IntersectionObserver(g=>{c||(g.forEach(y=>{const b=t.indexOf(y.target);o[b]=y}),s=null,a=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(g=>i.observe(g))}function d(){i&&i.disconnect(),c=!0}function l(g){return Ur(o).reduce((y,b)=>{const v=parseInt(b),{isIntersecting:x}=o[v];return(g&&x||!g&&!x)&&y.push(v),y},[])}function f(g=!0){if(g&&s)return s;if(!g&&a)return a;const y=l(g);return g&&(s=y),g||(a=y),y}return{init:u,destroy:d,get:f}}function ZR(e,t,n,r,o,s){const{measureSize:a,startEdge:i,endEdge:c}=e,u=n[0]&&o,d=g(),l=y(),f=n.map(a),p=b();function g(){if(!u)return 0;const x=n[0];return Oe(t[i]-x[i])}function y(){if(!u)return 0;const x=s.getComputedStyle(Dt(r));return parseFloat(x.getPropertyValue(`margin-${c}`))}function b(){return n.map((x,w,M)=>{const C=!w,P=_c(M,w);return C?f[w]+d:P?f[w]+l:M[w+1][i]-x[i]}).map(Oe)}return{slideSizes:f,slideSizesWithGaps:p,startGap:d,endGap:l}}function QR(e,t,n,r,o,s,a,i,c){const{startEdge:u,endEdge:d,direction:l}=e,f=kc(n);function p(v,x){return Yr(v).filter(w=>w%x===0).map(w=>v.slice(w,w+x))}function g(v){return v.length?Yr(v).reduce((x,w,M)=>{const C=Dt(x)||0,P=C===0,E=w===uo(v),D=o[u]-s[C][u],R=o[u]-s[w][d],A=!r&&P?l(a):0,N=!r&&E?l(i):0,H=Oe(R-N-(D+A));return M&&H>t+c&&x.push(w),E&&x.push(v.length),x},[]).map((x,w,M)=>{const C=Math.max(M[w-1]||0);return v.slice(C,x)}):[]}function y(v){return f?p(v,n):g(v)}return{groupSlides:y}}function JR(e,t,n,r,o,s,a){const{align:i,axis:c,direction:u,startIndex:d,loop:l,duration:f,dragFree:p,dragThreshold:g,inViewThreshold:y,slidesToScroll:b,skipSnaps:v,containScroll:x,watchResize:w,watchSlides:M,watchDrag:C,watchFocus:P}=s,E=2,D=_R(),R=D.measure(t),A=n.map(D.measure),N=OR(c,u),H=N.measureSize(R),O=IR(H),U=RR(i,H),K=!l&&!!x,B=l||!!x,{slideSizes:F,slideSizesWithGaps:j,startGap:_,endGap:Z}=ZR(N,R,A,n,B,o),se=QR(N,H,b,l,R,A,_,Z,E),{snaps:k,snapsAligned:L}=HR(N,U,R,A,se),Y=-Dt(k)+Dt(j),{snapsContained:V,scrollContainLimit:Q}=$R(H,Y,L,x,E),J=K?V:L,{limit:X}=BR(Y,J,l),re=pp(uo(J),d,l),he=re.clone(),le=Yr(n),G=({dragHandler:Fe,scrollBody:gt,scrollBounds:$e,options:{loop:ze}})=>{ze||$e.constrain(Fe.pointerDown()),gt.seek()},ue=({scrollBody:Fe,translate:gt,location:$e,offsetLocation:ze,previousLocation:St,scrollLooper:It,slideLooper:qt,dragHandler:wn,animation:jt,eventHandler:W,scrollBounds:ne,options:{loop:q}},ee)=>{const de=Fe.settled(),z=!ne.shouldConstrain(),fe=q?de:de&&z,ye=fe&&!wn.pointerDown();ye&&jt.stop();const we=$e.get()*ee+St.get()*(1-ee);ze.set(we),q&&(It.loop(Fe.direction()),qt.loop()),gt.to(ze.get()),ye&&W.emit("settle"),fe||W.emit("scroll")},I=AR(r,o,()=>G(at),Fe=>ue(at,Fe)),te=.68,me=J[re.get()],pe=Ar(me),xe=Ar(me),ae=Ar(me),ve=Ar(me),Xe=LR(pe,ae,xe,ve,f,te),ge=YR(l,J,Y,X,ve),Me=UR(I,re,he,Xe,ge,ve,a),Le=WR(X),Ke=Gr(),He=XR(t,n,a,y),{slideRegistry:Ze}=zR(K,x,J,Q,se,le),st=GR(e,n,Ze,Me,Xe,Ke,a,P),at={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:R,slideRects:A,animation:I,axis:N,dragHandler:kR(N,e,r,o,ve,NR(N,o),pe,I,Me,Xe,ge,re,a,O,p,g,v,te,C),eventStore:Ke,percentOfView:O,index:re,indexPrevious:he,limit:X,location:pe,offsetLocation:ae,previousLocation:xe,options:s,resizeHandler:jR(t,a,o,n,N,w,D),scrollBody:Xe,scrollBounds:FR(X,ae,ve,Xe,O),scrollLooper:VR(Y,X,ae,[pe,ae,xe,ve]),scrollProgress:Le,scrollSnapList:J.map(Le.get),scrollSnaps:J,scrollTarget:ge,scrollTo:Me,slideLooper:KR(N,H,Y,F,j,k,J,ae,n),slideFocus:st,slidesHandler:qR(t,a,M),slidesInView:He,slideIndexes:le,slideRegistry:Ze,slidesToScroll:se,target:ve,translate:gp(N,t)};return at}function eA(){let e={},t;function n(u){t=u}function r(u){return e[u]||[]}function o(u){return r(u).forEach(d=>d(t,u)),c}function s(u,d){return e[u]=r(u).concat([d]),c}function a(u,d){return e[u]=r(u).filter(l=>l!==d),c}function i(){e={}}const c={init:n,emit:o,off:a,on:s,clear:i};return c}const tA={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function nA(e){function t(s,a){return mp(s,a||{})}function n(s){const a=s.breakpoints||{},i=Ur(a).filter(c=>e.matchMedia(c).matches).map(c=>a[c]).reduce((c,u)=>t(c,u),{});return t(s,i)}function r(s){return s.map(a=>Ur(a.breakpoints||{})).reduce((a,i)=>a.concat(i),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function rA(e){let t=[];function n(s,a){return t=a.filter(({options:i})=>e.optionsAtMedia(i).active!==!1),t.forEach(i=>i.init(s,e)),a.reduce((i,c)=>Object.assign(i,{[c.name]:c}),{})}function r(){t=t.filter(s=>s.destroy())}return{init:n,destroy:r}}function rs(e,t,n){const r=e.ownerDocument,o=r.defaultView,s=nA(o),a=rA(s),i=Gr(),c=eA(),{mergeOptions:u,optionsAtMedia:d,optionsMediaQueries:l}=s,{on:f,off:p,emit:g}=c,y=N;let b=!1,v,x=u(tA,rs.globalOptions),w=u(x),M=[],C,P,E;function D(){const{container:le,slides:G}=w;P=(bi(le)?e.querySelector(le):le)||e.children[0];const I=bi(G)?P.querySelectorAll(G):G;E=[].slice.call(I||P.children)}function R(le){const G=JR(e,P,E,r,o,le,c);if(le.loop&&!G.slideLooper.canLoop()){const ue=Object.assign({},le,{loop:!1});return R(ue)}return G}function A(le,G){b||(x=u(x,le),w=d(x),M=G||M,D(),v=R(w),l([x,...M.map(({options:ue})=>ue)]).forEach(ue=>i.add(ue,"change",N)),w.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(he),v.eventHandler.init(he),v.resizeHandler.init(he),v.slidesHandler.init(he),v.options.loop&&v.slideLooper.loop(),P.offsetParent&&E.length&&v.dragHandler.init(he),C=a.init(he,M)))}function N(le,G){const ue=se();H(),A(u({startIndex:ue},le),G),c.emit("reInit")}function H(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),a.destroy(),i.clear()}function O(){b||(b=!0,i.clear(),H(),c.emit("destroy"),c.clear())}function U(le,G,ue){!w.active||b||(v.scrollBody.useBaseFriction().useDuration(G===!0?0:w.duration),v.scrollTo.index(le,ue||0))}function K(le){const G=v.index.add(1).get();U(G,le,-1)}function B(le){const G=v.index.add(-1).get();U(G,le,1)}function F(){return v.index.add(1).get()!==se()}function j(){return v.index.add(-1).get()!==se()}function _(){return v.scrollSnapList}function Z(){return v.scrollProgress.get(v.offsetLocation.get())}function se(){return v.index.get()}function k(){return v.indexPrevious.get()}function L(){return v.slidesInView.get()}function Y(){return v.slidesInView.get(!1)}function V(){return C}function Q(){return v}function J(){return e}function X(){return P}function re(){return E}const he={canScrollNext:F,canScrollPrev:j,containerNode:X,internalEngine:Q,destroy:O,off:p,on:f,emit:g,plugins:V,previousScrollSnap:k,reInit:y,rootNode:J,scrollNext:K,scrollPrev:B,scrollProgress:Z,scrollSnapList:_,scrollTo:U,selectedScrollSnap:se,slideNodes:re,slidesInView:L,slidesNotInView:Y};return A(t,n),setTimeout(()=>c.emit("init"),0),he}rs.globalOptions=void 0;function Ic(e={},t=[]){const n=S.useRef(e),r=S.useRef(t),[o,s]=S.useState(),[a,i]=S.useState(),c=S.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return S.useEffect(()=>{Oc(n.current,e)||(n.current=e,c())},[e,c]),S.useEffect(()=>{TR(r.current,t)||(r.current=t,c())},[t,c]),S.useEffect(()=>{if(ER()&&a){rs.globalOptions=Ic.globalOptions;const u=rs(a,n.current,r.current);return s(u),()=>u.destroy()}else s(void 0)},[a,s]),[i,o]}Ic.globalOptions=void 0;const vp=h.createContext(null);function Os(){const e=h.useContext(vp);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function oA({orientation:e="horizontal",opts:t,setApi:n,plugins:r,className:o,children:s,...a}){const[i,c]=Ic({...t,axis:e==="horizontal"?"x":"y"},r),[u,d]=h.useState(!1),[l,f]=h.useState(!1),p=h.useCallback(v=>{v&&(d(v.canScrollPrev()),f(v.canScrollNext()))},[]),g=h.useCallback(()=>{c==null||c.scrollPrev()},[c]),y=h.useCallback(()=>{c==null||c.scrollNext()},[c]),b=h.useCallback(v=>{v.key==="ArrowLeft"?(v.preventDefault(),g()):v.key==="ArrowRight"&&(v.preventDefault(),y())},[g,y]);return h.useEffect(()=>{!c||!n||n(c)},[c,n]),h.useEffect(()=>{if(c)return p(c),c.on("reInit",p),c.on("select",p),()=>{c==null||c.off("select",p)}},[c,p]),m.jsx(vp.Provider,{value:{carouselRef:i,api:c,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:y,canScrollPrev:u,canScrollNext:l},children:m.jsx("div",{onKeyDownCapture:b,className:T.cn("relative",o),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...a,children:s})})}function sA({className:e,...t}){const{carouselRef:n,orientation:r}=Os();return m.jsx("div",{ref:n,className:"overflow-hidden","data-slot":"carousel-content",children:m.jsx("div",{className:T.cn("flex",r==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})}function aA({className:e,...t}){const{orientation:n}=Os();return m.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:T.cn("min-w-0 shrink-0 grow-0 basis-full",n==="horizontal"?"pl-4":"pt-4",e),...t})}function iA({className:e,variant:t="outline",size:n="icon",...r}){const{orientation:o,scrollPrev:s,canScrollPrev:a}=Os();return m.jsxs(T.Button,{"data-slot":"carousel-previous",variant:t,size:n,className:T.cn("absolute size-8 rounded-full",o==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!a,onClick:s,...r,children:[m.jsx(ke.ArrowLeft,{}),m.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function cA({className:e,variant:t="outline",size:n="icon",...r}){const{orientation:o,scrollNext:s,canScrollNext:a}=Os();return m.jsxs(T.Button,{"data-slot":"carousel-next",variant:t,size:n,className:T.cn("absolute size-8 rounded-full",o==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!a,onClick:s,...r,children:[m.jsx(ke.ArrowRight,{}),m.jsx("span",{className:"sr-only",children:"Next slide"})]})}var Ld=1,lA=.9,uA=.8,dA=.17,_a=.1,Ia=.999,fA=.9999,hA=.99,mA=/[\\\/_+.#"@\[\(\{&]/,pA=/[\\\/_+.#"@\[\(\{&]/g,gA=/[\s-]/,yp=/[\s-]/g;function wi(e,t,n,r,o,s,a){if(s===t.length)return o===e.length?Ld:hA;var i=`${o},${s}`;if(a[i]!==void 0)return a[i];for(var c=r.charAt(s),u=n.indexOf(c,o),d=0,l,f,p,g;u>=0;)l=wi(e,t,n,r,u+1,s+1,a),l>d&&(u===o?l*=Ld:mA.test(e.charAt(u-1))?(l*=uA,p=e.slice(o,u-1).match(pA),p&&o>0&&(l*=Math.pow(Ia,p.length))):gA.test(e.charAt(u-1))?(l*=lA,g=e.slice(o,u-1).match(yp),g&&o>0&&(l*=Math.pow(Ia,g.length))):(l*=dA,o>0&&(l*=Math.pow(Ia,u-o))),e.charAt(u)!==t.charAt(s)&&(l*=fA)),(l<_a&&n.charAt(u-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(u-1)!==r.charAt(s))&&(f=wi(e,t,n,r,u+1,s+2,a),f*_a>l&&(l=f*_a)),l>d&&(d=l),u=n.indexOf(c,u+1);return a[i]=d,d}function Fd(e){return e.toLowerCase().replace(yp," ")}function vA(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,wi(e,t,Fd(e),Fd(t),0,0,{})}var Mr='[cmdk-group=""]',ja='[cmdk-group-items=""]',yA='[cmdk-group-heading=""]',bp='[cmdk-item=""]',$d=`${bp}:not([aria-disabled="true"])`,Si="cmdk-item-select",zn="data-value",bA=(e,t,n)=>vA(e,t,n),xp=h.createContext(void 0),fo=()=>h.useContext(xp),wp=h.createContext(void 0),jc=()=>h.useContext(wp),Sp=h.createContext(void 0),Cp=h.forwardRef((e,t)=>{let n=Yn(()=>{var k,L;return{search:"",value:(L=(k=e.value)!=null?k:e.defaultValue)!=null?L:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Yn(()=>new Set),o=Yn(()=>new Map),s=Yn(()=>new Map),a=Yn(()=>new Set),i=Mp(e),{label:c,children:u,value:d,onValueChange:l,filter:f,shouldFilter:p,loop:g,disablePointerSelection:y=!1,vimBindings:b=!0,...v}=e,x=_e(),w=_e(),M=_e(),C=h.useRef(null),P=AA();In(()=>{if(d!==void 0){let k=d.trim();n.current.value=k,E.emit()}},[d]),In(()=>{P(6,O)},[]);let E=h.useMemo(()=>({subscribe:k=>(a.current.add(k),()=>a.current.delete(k)),snapshot:()=>n.current,setState:(k,L,Y)=>{var V,Q,J,X;if(!Object.is(n.current[k],L)){if(n.current[k]=L,k==="search")H(),A(),P(1,N);else if(k==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let re=document.getElementById(M);re?re.focus():(V=document.getElementById(x))==null||V.focus()}if(P(7,()=>{var re;n.current.selectedItemId=(re=U())==null?void 0:re.id,E.emit()}),Y||P(5,O),((Q=i.current)==null?void 0:Q.value)!==void 0){let re=L??"";(X=(J=i.current).onValueChange)==null||X.call(J,re);return}}E.emit()}},emit:()=>{a.current.forEach(k=>k())}}),[]),D=h.useMemo(()=>({value:(k,L,Y)=>{var V;L!==((V=s.current.get(k))==null?void 0:V.value)&&(s.current.set(k,{value:L,keywords:Y}),n.current.filtered.items.set(k,R(L,Y)),P(2,()=>{A(),E.emit()}))},item:(k,L)=>(r.current.add(k),L&&(o.current.has(L)?o.current.get(L).add(k):o.current.set(L,new Set([k]))),P(3,()=>{H(),A(),n.current.value||N(),E.emit()}),()=>{s.current.delete(k),r.current.delete(k),n.current.filtered.items.delete(k);let Y=U();P(4,()=>{H(),(Y==null?void 0:Y.getAttribute("id"))===k&&N(),E.emit()})}),group:k=>(o.current.has(k)||o.current.set(k,new Set),()=>{s.current.delete(k),o.current.delete(k)}),filter:()=>i.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:x,inputId:M,labelId:w,listInnerRef:C}),[]);function R(k,L){var Y,V;let Q=(V=(Y=i.current)==null?void 0:Y.filter)!=null?V:bA;return k?Q(k,n.current.search,L):0}function A(){if(!n.current.search||i.current.shouldFilter===!1)return;let k=n.current.filtered.items,L=[];n.current.filtered.groups.forEach(V=>{let Q=o.current.get(V),J=0;Q.forEach(X=>{let re=k.get(X);J=Math.max(re,J)}),L.push([V,J])});let Y=C.current;K().sort((V,Q)=>{var J,X;let re=V.getAttribute("id"),he=Q.getAttribute("id");return((J=k.get(he))!=null?J:0)-((X=k.get(re))!=null?X:0)}).forEach(V=>{let Q=V.closest(ja);Q?Q.appendChild(V.parentElement===Q?V:V.closest(`${ja} > *`)):Y.appendChild(V.parentElement===Y?V:V.closest(`${ja} > *`))}),L.sort((V,Q)=>Q[1]-V[1]).forEach(V=>{var Q;let J=(Q=C.current)==null?void 0:Q.querySelector(`${Mr}[${zn}="${encodeURIComponent(V[0])}"]`);J==null||J.parentElement.appendChild(J)})}function N(){let k=K().find(Y=>Y.getAttribute("aria-disabled")!=="true"),L=k==null?void 0:k.getAttribute(zn);E.setState("value",L||void 0)}function H(){var k,L,Y,V;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Q=0;for(let J of r.current){let X=(L=(k=s.current.get(J))==null?void 0:k.value)!=null?L:"",re=(V=(Y=s.current.get(J))==null?void 0:Y.keywords)!=null?V:[],he=R(X,re);n.current.filtered.items.set(J,he),he>0&&Q++}for(let[J,X]of o.current)for(let re of X)if(n.current.filtered.items.get(re)>0){n.current.filtered.groups.add(J);break}n.current.filtered.count=Q}function O(){var k,L,Y;let V=U();V&&(((k=V.parentElement)==null?void 0:k.firstChild)===V&&((Y=(L=V.closest(Mr))==null?void 0:L.querySelector(yA))==null||Y.scrollIntoView({block:"nearest"})),V.scrollIntoView({block:"nearest"}))}function U(){var k;return(k=C.current)==null?void 0:k.querySelector(`${bp}[aria-selected="true"]`)}function K(){var k;return Array.from(((k=C.current)==null?void 0:k.querySelectorAll($d))||[])}function B(k){let L=K()[k];L&&E.setState("value",L.getAttribute(zn))}function F(k){var L;let Y=U(),V=K(),Q=V.findIndex(X=>X===Y),J=V[Q+k];(L=i.current)!=null&&L.loop&&(J=Q+k<0?V[V.length-1]:Q+k===V.length?V[0]:V[Q+k]),J&&E.setState("value",J.getAttribute(zn))}function j(k){let L=U(),Y=L==null?void 0:L.closest(Mr),V;for(;Y&&!V;)Y=k>0?DA(Y,Mr):RA(Y,Mr),V=Y==null?void 0:Y.querySelector($d);V?E.setState("value",V.getAttribute(zn)):F(k)}let _=()=>B(K().length-1),Z=k=>{k.preventDefault(),k.metaKey?_():k.altKey?j(1):F(1)},se=k=>{k.preventDefault(),k.metaKey?B(0):k.altKey?j(-1):F(-1)};return h.createElement(T.Primitive.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:k=>{var L;(L=v.onKeyDown)==null||L.call(v,k);let Y=k.nativeEvent.isComposing||k.keyCode===229;if(!(k.defaultPrevented||Y))switch(k.key){case"n":case"j":{b&&k.ctrlKey&&Z(k);break}case"ArrowDown":{Z(k);break}case"p":case"k":{b&&k.ctrlKey&&se(k);break}case"ArrowUp":{se(k);break}case"Home":{k.preventDefault(),B(0);break}case"End":{k.preventDefault(),_();break}case"Enter":{k.preventDefault();let V=U();if(V){let Q=new Event(Si);V.dispatchEvent(Q)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:kA},c),ks(e,k=>h.createElement(wp.Provider,{value:E},h.createElement(xp.Provider,{value:D},k))))}),xA=h.forwardRef((e,t)=>{var n,r;let o=_e(),s=h.useRef(null),a=h.useContext(Sp),i=fo(),c=Mp(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;In(()=>{if(!u)return i.item(o,a==null?void 0:a.id)},[u]);let d=Ep(o,s,[e.value,e.children,s],e.keywords),l=jc(),f=dn(P=>P.value&&P.value===d.current),p=dn(P=>u||i.filter()===!1?!0:P.search?P.filtered.items.get(o)>0:!0);h.useEffect(()=>{let P=s.current;if(!(!P||e.disabled))return P.addEventListener(Si,g),()=>P.removeEventListener(Si,g)},[p,e.onSelect,e.disabled]);function g(){var P,E;y(),(E=(P=c.current).onSelect)==null||E.call(P,d.current)}function y(){l.setState("value",d.current,!0)}if(!p)return null;let{disabled:b,value:v,onSelect:x,forceMount:w,keywords:M,...C}=e;return h.createElement(T.Primitive.div,{ref:un(s,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!f,"data-disabled":!!b,"data-selected":!!f,onPointerMove:b||i.getDisablePointerSelection()?void 0:y,onClick:b?void 0:g},e.children)}),wA=h.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,a=_e(),i=h.useRef(null),c=h.useRef(null),u=_e(),d=fo(),l=dn(p=>o||d.filter()===!1?!0:p.search?p.filtered.groups.has(a):!0);In(()=>d.group(a),[]),Ep(a,i,[e.value,e.heading,c]);let f=h.useMemo(()=>({id:a,forceMount:o}),[o]);return h.createElement(T.Primitive.div,{ref:un(i,t),...s,"cmdk-group":"",role:"presentation",hidden:l?void 0:!0},n&&h.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),ks(e,p=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},h.createElement(Sp.Provider,{value:f},p))))}),SA=h.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=h.useRef(null),s=dn(a=>!a.search);return!n&&!s?null:h.createElement(T.Primitive.div,{ref:un(o,t),...r,"cmdk-separator":"",role:"separator"})}),CA=h.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=jc(),a=dn(u=>u.search),i=dn(u=>u.selectedItemId),c=fo();return h.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),h.createElement(T.Primitive.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":i,id:c.inputId,type:"text",value:o?e.value:a,onChange:u=>{o||s.setState("search",u.target.value),n==null||n(u.target.value)}})}),MA=h.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=h.useRef(null),a=h.useRef(null),i=dn(u=>u.selectedItemId),c=fo();return h.useEffect(()=>{if(a.current&&s.current){let u=a.current,d=s.current,l,f=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let p=u.offsetHeight;d.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(u),()=>{cancelAnimationFrame(l),f.unobserve(u)}}},[]),h.createElement(T.Primitive.div,{ref:un(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:c.listId},ks(e,u=>h.createElement("div",{ref:un(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),EA=h.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:a,...i}=e;return h.createElement(ro,{open:n,onOpenChange:r},h.createElement(oo,{container:a},h.createElement(so,{"cmdk-overlay":"",className:o}),h.createElement(ao,{"aria-label":e.label,"cmdk-dialog":"",className:s},h.createElement(Cp,{ref:t,...i}))))}),TA=h.forwardRef((e,t)=>dn(n=>n.filtered.count===0)?h.createElement(T.Primitive.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),PA=h.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return h.createElement(T.Primitive.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},ks(e,a=>h.createElement("div",{"aria-hidden":!0},a)))}),Fn=Object.assign(Cp,{List:MA,Item:xA,Input:CA,Group:wA,Separator:SA,Dialog:EA,Empty:TA,Loading:PA});function DA(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function RA(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Mp(e){let t=h.useRef(e);return In(()=>{t.current=e}),t}var In=typeof window>"u"?h.useEffect:h.useLayoutEffect;function Yn(e){let t=h.useRef();return t.current===void 0&&(t.current=e()),t}function dn(e){let t=jc(),n=()=>e(t.snapshot());return h.useSyncExternalStore(t.subscribe,n,n)}function Ep(e,t,n,r=[]){let o=h.useRef(),s=fo();return In(()=>{var a;let i=(()=>{var u;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(u=d.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());s.value(e,i,c),(a=t.current)==null||a.setAttribute(zn,i),o.current=i}),o}var AA=()=>{let[e,t]=h.useState(),n=Yn(()=>new Map);return In(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function OA(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ks({asChild:e,children:t},n){return e&&h.isValidElement(t)?h.cloneElement(OA(t),{ref:t.ref},n(t.props.children)):n(t)}var kA={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Tp({...e}){return m.jsx(ro,{"data-slot":"dialog",...e})}function NA({...e}){return m.jsx(Ts,{"data-slot":"dialog-trigger",...e})}function Pp({...e}){return m.jsx(oo,{"data-slot":"dialog-portal",...e})}function _A({...e}){return m.jsx(Ln,{"data-slot":"dialog-close",...e})}function Dp({className:e,...t}){return m.jsx(so,{"data-slot":"dialog-overlay",className:T.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Rp({className:e,children:t,showCloseButton:n=!0,...r}){return m.jsxs(Pp,{"data-slot":"dialog-portal",children:[m.jsx(Dp,{}),m.jsxs(ao,{"data-slot":"dialog-content",className:T.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,n&&m.jsxs(Ln,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[m.jsx(ke.XIcon,{}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Ap({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-header",className:T.cn("flex flex-col gap-2 text-center sm:text-left",e),...t})}function IA({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-footer",className:T.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Op({className:e,...t}){return m.jsx(Ps,{"data-slot":"dialog-title",className:T.cn("text-lg leading-none font-semibold",e),...t})}function kp({className:e,...t}){return m.jsx(Ds,{"data-slot":"dialog-description",className:T.cn("text-muted-foreground text-sm",e),...t})}function Lc({className:e,...t}){return m.jsx(Fn,{"data-slot":"command",className:T.cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function jA({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:o=!0,...s}){return m.jsxs(Tp,{...s,children:[m.jsxs(Ap,{className:"sr-only",children:[m.jsx(Op,{children:e}),m.jsx(kp,{children:t})]}),m.jsx(Rp,{className:T.cn("overflow-hidden p-0",r),showCloseButton:o,children:m.jsx(Lc,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n})})]})}function Np({className:e,...t}){return m.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[m.jsx(ke.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),m.jsx(Fn.Input,{"data-slot":"command-input",className:T.cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function _p({className:e,...t}){return m.jsx(Fn.List,{"data-slot":"command-list",className:T.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Ip({...e}){return m.jsx(Fn.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function jp({className:e,...t}){return m.jsx(Fn.Group,{"data-slot":"command-group",className:T.cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function LA({className:e,...t}){return m.jsx(Fn.Separator,{"data-slot":"command-separator",className:T.cn("bg-border -mx-1 h-px",e),...t})}function Lp({className:e,...t}){return m.jsx(Fn.Item,{"data-slot":"command-item",className:T.cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function FA({className:e,...t}){return m.jsx("span",{"data-slot":"command-shortcut",className:T.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}const $A=["top","right","bottom","left"],fn=Math.min,ft=Math.max,os=Math.round,jo=Math.floor,Ht=e=>({x:e,y:e}),BA={left:"right",right:"left",bottom:"top",top:"bottom"},VA={start:"end",end:"start"};function Ci(e,t,n){return ft(e,fn(t,n))}function en(e,t){return typeof e=="function"?e(t):e}function tn(e){return e.split("-")[0]}function vr(e){return e.split("-")[1]}function Fc(e){return e==="x"?"y":"x"}function $c(e){return e==="y"?"height":"width"}const WA=new Set(["top","bottom"]);function Vt(e){return WA.has(tn(e))?"y":"x"}function Bc(e){return Fc(Vt(e))}function HA(e,t,n){n===void 0&&(n=!1);const r=vr(e),o=Bc(e),s=$c(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=ss(a)),[a,ss(a)]}function zA(e){const t=ss(e);return[Mi(e),t,Mi(t)]}function Mi(e){return e.replace(/start|end/g,t=>VA[t])}const Bd=["left","right"],Vd=["right","left"],YA=["top","bottom"],UA=["bottom","top"];function GA(e,t,n){switch(e){case"top":case"bottom":return n?t?Vd:Bd:t?Bd:Vd;case"left":case"right":return t?YA:UA;default:return[]}}function KA(e,t,n,r){const o=vr(e);let s=GA(tn(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Mi)))),s}function ss(e){return e.replace(/left|right|bottom|top/g,t=>BA[t])}function qA(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fp(e){return typeof e!="number"?qA(e):{top:e,right:e,bottom:e,left:e}}function as(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Wd(e,t,n){let{reference:r,floating:o}=e;const s=Vt(t),a=Bc(t),i=$c(a),c=tn(t),u=s==="y",d=r.x+r.width/2-o.width/2,l=r.y+r.height/2-o.height/2,f=r[i]/2-o[i]/2;let p;switch(c){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:l};break;case"left":p={x:r.x-o.width,y:l};break;default:p={x:r.x,y:r.y}}switch(vr(t)){case"start":p[a]-=f*(n&&u?-1:1);break;case"end":p[a]+=f*(n&&u?-1:1);break}return p}const XA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:l}=Wd(u,r,c),f=r,p={},g=0;for(let y=0;y<i.length;y++){const{name:b,fn:v}=i[y],{x,y:w,data:M,reset:C}=await v({x:d,y:l,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});d=x??d,l=w??l,p={...p,[b]:{...p[b],...M}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:l}=Wd(u,f,c)),y=-1)}return{x:d,y:l,placement:f,strategy:o,middlewareData:p}};async function Kr(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:l="floating",altBoundary:f=!1,padding:p=0}=en(t,e),g=Fp(p),b=i[f?l==="floating"?"reference":"floating":l],v=as(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:u,rootBoundary:d,strategy:c})),x=l==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),M=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=as(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:w,strategy:c}):x);return{top:(v.top-C.top+g.top)/M.y,bottom:(C.bottom-v.bottom+g.bottom)/M.y,left:(v.left-C.left+g.left)/M.x,right:(C.right-v.right+g.right)/M.x}}const ZA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:u,padding:d=0}=en(e,t)||{};if(u==null)return{};const l=Fp(d),f={x:n,y:r},p=Bc(o),g=$c(p),y=await a.getDimensions(u),b=p==="y",v=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",M=s.reference[g]+s.reference[p]-f[p]-s.floating[g],C=f[p]-s.reference[p],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=P?P[w]:0;(!E||!await(a.isElement==null?void 0:a.isElement(P)))&&(E=i.floating[w]||s.floating[g]);const D=M/2-C/2,R=E/2-y[g]/2-1,A=fn(l[v],R),N=fn(l[x],R),H=A,O=E-y[g]-N,U=E/2-y[g]/2+D,K=Ci(H,U,O),B=!c.arrow&&vr(o)!=null&&U!==K&&s.reference[g]/2-(U<H?A:N)-y[g]/2<0,F=B?U<H?U-H:U-O:0;return{[p]:f[p]+F,data:{[p]:K,centerOffset:U-K-F,...B&&{alignmentOffset:F}},reset:B}}}),QA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:l=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...b}=en(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=tn(o),x=Vt(i),w=tn(i)===i,M=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=f||(w||!y?[ss(i)]:zA(i)),P=g!=="none";!f&&P&&C.push(...KA(i,y,g,M));const E=[i,...C],D=await Kr(t,b),R=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&R.push(D[v]),l){const U=HA(o,a,M);R.push(D[U[0]],D[U[1]])}if(A=[...A,{placement:o,overflows:R}],!R.every(U=>U<=0)){var N,H;const U=(((N=s.flip)==null?void 0:N.index)||0)+1,K=E[U];if(K&&(!(l==="alignment"?x!==Vt(K):!1)||A.every(j=>Vt(j.placement)===x?j.overflows[0]>0:!0)))return{data:{index:U,overflows:A},reset:{placement:K}};let B=(H=A.filter(F=>F.overflows[0]<=0).sort((F,j)=>F.overflows[1]-j.overflows[1])[0])==null?void 0:H.placement;if(!B)switch(p){case"bestFit":{var O;const F=(O=A.filter(j=>{if(P){const _=Vt(j.placement);return _===x||_==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(_=>_>0).reduce((_,Z)=>_+Z,0)]).sort((j,_)=>j[1]-_[1])[0])==null?void 0:O[0];F&&(B=F);break}case"initialPlacement":B=i;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function Hd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zd(e){return $A.some(t=>e[t]>=0)}const JA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=en(e,t);switch(r){case"referenceHidden":{const s=await Kr(t,{...o,elementContext:"reference"}),a=Hd(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:zd(a)}}}case"escaped":{const s=await Kr(t,{...o,altBoundary:!0}),a=Hd(s,n.floating);return{data:{escapedOffsets:a,escaped:zd(a)}}}default:return{}}}}},$p=new Set(["left","top"]);async function e1(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=tn(n),i=vr(n),c=Vt(n)==="y",u=$p.has(a)?-1:1,d=s&&c?-1:1,l=en(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return i&&typeof g=="number"&&(p=i==="end"?g*-1:g),c?{x:p*d,y:f*u}:{x:f*u,y:p*d}}const t1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await e1(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},n1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:b=>{let{x:v,y:x}=b;return{x:v,y:x}}},...c}=en(e,t),u={x:n,y:r},d=await Kr(t,c),l=Vt(tn(o)),f=Fc(l);let p=u[f],g=u[l];if(s){const b=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=p+d[b],w=p-d[v];p=Ci(x,p,w)}if(a){const b=l==="y"?"top":"left",v=l==="y"?"bottom":"right",x=g+d[b],w=g-d[v];g=Ci(x,g,w)}const y=i.fn({...t,[f]:p,[l]:g});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:s,[l]:a}}}}}},r1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=en(e,t),d={x:n,y:r},l=Vt(o),f=Fc(l);let p=d[f],g=d[l];const y=en(i,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=f==="y"?"height":"width",M=s.reference[f]-s.floating[w]+b.mainAxis,C=s.reference[f]+s.reference[w]-b.mainAxis;p<M?p=M:p>C&&(p=C)}if(u){var v,x;const w=f==="y"?"width":"height",M=$p.has(tn(o)),C=s.reference[l]-s.floating[w]+(M&&((v=a.offset)==null?void 0:v[l])||0)+(M?0:b.crossAxis),P=s.reference[l]+s.reference[w]+(M?0:((x=a.offset)==null?void 0:x[l])||0)-(M?b.crossAxis:0);g<C?g=C:g>P&&(g=P)}return{[f]:p,[l]:g}}}},o1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...u}=en(e,t),d=await Kr(t,u),l=tn(o),f=vr(o),p=Vt(o)==="y",{width:g,height:y}=s.floating;let b,v;l==="top"||l==="bottom"?(b=l,v=f===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(v=l,b=f==="end"?"top":"bottom");const x=y-d.top-d.bottom,w=g-d.left-d.right,M=fn(y-d[b],x),C=fn(g-d[v],w),P=!t.middlewareData.shift;let E=M,D=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=x),P&&!f){const A=ft(d.left,0),N=ft(d.right,0),H=ft(d.top,0),O=ft(d.bottom,0);p?D=g-2*(A!==0||N!==0?A+N:ft(d.left,d.right)):E=y-2*(H!==0||O!==0?H+O:ft(d.top,d.bottom))}await c({...t,availableWidth:D,availableHeight:E});const R=await a.getDimensions(i.floating);return g!==R.width||y!==R.height?{reset:{rects:!0}}:{}}}};function Ns(){return typeof window<"u"}function yr(e){return Bp(e)?(e.nodeName||"").toLowerCase():"#document"}function ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gt(e){var t;return(t=(Bp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bp(e){return Ns()?e instanceof Node||e instanceof ht(e).Node:!1}function Ot(e){return Ns()?e instanceof Element||e instanceof ht(e).Element:!1}function Yt(e){return Ns()?e instanceof HTMLElement||e instanceof ht(e).HTMLElement:!1}function Yd(e){return!Ns()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ht(e).ShadowRoot}const s1=new Set(["inline","contents"]);function ho(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!s1.has(o)}const a1=new Set(["table","td","th"]);function i1(e){return a1.has(yr(e))}const c1=[":popover-open",":modal"];function _s(e){return c1.some(t=>{try{return e.matches(t)}catch{return!1}})}const l1=["transform","translate","scale","rotate","perspective"],u1=["transform","translate","scale","rotate","perspective","filter"],d1=["paint","layout","strict","content"];function Vc(e){const t=Wc(),n=Ot(e)?kt(e):e;return l1.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||u1.some(r=>(n.willChange||"").includes(r))||d1.some(r=>(n.contain||"").includes(r))}function f1(e){let t=hn(e);for(;Yt(t)&&!ar(t);){if(Vc(t))return t;if(_s(t))return null;t=hn(t)}return null}function Wc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const h1=new Set(["html","body","#document"]);function ar(e){return h1.has(yr(e))}function kt(e){return ht(e).getComputedStyle(e)}function Is(e){return Ot(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hn(e){if(yr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yd(e)&&e.host||Gt(e);return Yd(t)?t.host:t}function Vp(e){const t=hn(e);return ar(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yt(t)&&ho(t)?t:Vp(t)}function qr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Vp(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=ht(o);if(s){const i=Ei(a);return t.concat(a,a.visualViewport||[],ho(o)?o:[],i&&n?qr(i):[])}return t.concat(o,qr(o,[],n))}function Ei(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wp(e){const t=kt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Yt(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=os(n)!==s||os(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function Hc(e){return Ot(e)?e:e.contextElement}function nr(e){const t=Hc(e);if(!Yt(t))return Ht(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Wp(t);let a=(s?os(n.width):n.width)/r,i=(s?os(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const m1=Ht(0);function Hp(e){const t=ht(e);return!Wc()||!t.visualViewport?m1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function p1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ht(e)?!1:t}function jn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Hc(e);let a=Ht(1);t&&(r?Ot(r)&&(a=nr(r)):a=nr(e));const i=p1(s,n,r)?Hp(s):Ht(0);let c=(o.left+i.x)/a.x,u=(o.top+i.y)/a.y,d=o.width/a.x,l=o.height/a.y;if(s){const f=ht(s),p=r&&Ot(r)?ht(r):r;let g=f,y=Ei(g);for(;y&&r&&p!==g;){const b=nr(y),v=y.getBoundingClientRect(),x=kt(y),w=v.left+(y.clientLeft+parseFloat(x.paddingLeft))*b.x,M=v.top+(y.clientTop+parseFloat(x.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,l*=b.y,c+=w,u+=M,g=ht(y),y=Ei(g)}}return as({width:d,height:l,x:c,y:u})}function js(e,t){const n=Is(e).scrollLeft;return t?t.left+n:jn(Gt(e)).left+n}function zp(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-js(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function g1(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=Gt(r),i=t?_s(t.floating):!1;if(r===a||i&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Ht(1);const d=Ht(0),l=Yt(r);if((l||!l&&!s)&&((yr(r)!=="body"||ho(a))&&(c=Is(r)),Yt(r))){const p=jn(r);u=nr(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const f=a&&!l&&!s?zp(a,c):Ht(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-c.scrollTop*u.y+d.y+f.y}}function v1(e){return Array.from(e.getClientRects())}function y1(e){const t=Gt(e),n=Is(e),r=e.ownerDocument.body,o=ft(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ft(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+js(e);const i=-n.scrollTop;return kt(r).direction==="rtl"&&(a+=ft(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}const Ud=25;function b1(e,t){const n=ht(e),r=Gt(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const d=Wc();(!d||d&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const u=js(r);if(u<=0){const d=r.ownerDocument,l=d.body,f=getComputedStyle(l),p=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-l.clientWidth-p);g<=Ud&&(s-=g)}else u<=Ud&&(s+=u);return{width:s,height:a,x:i,y:c}}const x1=new Set(["absolute","fixed"]);function w1(e,t){const n=jn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Yt(e)?nr(e):Ht(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:a,height:i,x:c,y:u}}function Gd(e,t,n){let r;if(t==="viewport")r=b1(e,n);else if(t==="document")r=y1(Gt(e));else if(Ot(t))r=w1(t,n);else{const o=Hp(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return as(r)}function Yp(e,t){const n=hn(e);return n===t||!Ot(n)||ar(n)?!1:kt(n).position==="fixed"||Yp(n,t)}function S1(e,t){const n=t.get(e);if(n)return n;let r=qr(e,[],!1).filter(i=>Ot(i)&&yr(i)!=="body"),o=null;const s=kt(e).position==="fixed";let a=s?hn(e):e;for(;Ot(a)&&!ar(a);){const i=kt(a),c=Vc(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&x1.has(o.position)||ho(a)&&!c&&Yp(e,a))?r=r.filter(d=>d!==a):o=i,a=hn(a)}return t.set(e,r),r}function C1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?_s(t)?[]:S1(t,this._c):[].concat(n),r],i=a[0],c=a.reduce((u,d)=>{const l=Gd(t,d,o);return u.top=ft(l.top,u.top),u.right=fn(l.right,u.right),u.bottom=fn(l.bottom,u.bottom),u.left=ft(l.left,u.left),u},Gd(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function M1(e){const{width:t,height:n}=Wp(e);return{width:t,height:n}}function E1(e,t,n){const r=Yt(t),o=Gt(t),s=n==="fixed",a=jn(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=Ht(0);function u(){c.x=js(o)}if(r||!r&&!s)if((yr(t)!=="body"||ho(o))&&(i=Is(t)),r){const p=jn(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?zp(o,i):Ht(0),l=a.left+i.scrollLeft-c.x-d.x,f=a.top+i.scrollTop-c.y-d.y;return{x:l,y:f,width:a.width,height:a.height}}function La(e){return kt(e).position==="static"}function Kd(e,t){if(!Yt(e)||kt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Gt(e)===n&&(n=n.ownerDocument.body),n}function Up(e,t){const n=ht(e);if(_s(e))return n;if(!Yt(e)){let o=hn(e);for(;o&&!ar(o);){if(Ot(o)&&!La(o))return o;o=hn(o)}return n}let r=Kd(e,t);for(;r&&i1(r)&&La(r);)r=Kd(r,t);return r&&ar(r)&&La(r)&&!Vc(r)?n:r||f1(e)||n}const T1=async function(e){const t=this.getOffsetParent||Up,n=this.getDimensions,r=await n(e.floating);return{reference:E1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function P1(e){return kt(e).direction==="rtl"}const D1={convertOffsetParentRelativeRectToViewportRelativeRect:g1,getDocumentElement:Gt,getClippingRect:C1,getOffsetParent:Up,getElementRects:T1,getClientRects:v1,getDimensions:M1,getScale:nr,isElement:Ot,isRTL:P1};function Gp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function R1(e,t){let n=null,r;const o=Gt(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:l,width:f,height:p}=u;if(i||t(),!f||!p)return;const g=jo(l),y=jo(o.clientWidth-(d+f)),b=jo(o.clientHeight-(l+p)),v=jo(d),w={rootMargin:-g+"px "+-y+"px "+-b+"px "+-v+"px",threshold:ft(0,fn(1,c))||1};let M=!0;function C(P){const E=P[0].intersectionRatio;if(E!==c){if(!M)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Gp(u,e.getBoundingClientRect())&&a(),M=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return a(!0),s}function A1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Hc(e),d=o||s?[...u?qr(u):[],...qr(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const l=u&&i?R1(u,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(v=>{let[x]=v;x&&x.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let g,y=c?jn(e):null;c&&b();function b(){const v=jn(e);y&&!Gp(y,v)&&n(),y=v,g=requestAnimationFrame(b)}return n(),()=>{var v;d.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),l==null||l(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const O1=t1,k1=n1,N1=QA,_1=o1,I1=JA,qd=ZA,j1=r1,L1=(e,t,n)=>{const r=new Map,o={platform:D1,...n},s={...o.platform,_c:r};return XA(e,t,{...o,platform:s})};var F1=typeof document<"u",$1=function(){},Xo=F1?S.useLayoutEffect:$1;function is(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!is(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!is(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Kp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xd(e,t){const n=Kp(e);return Math.round(t*n)/n}function Fa(e){const t=h.useRef(e);return Xo(()=>{t.current=e}),t}function B1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[d,l]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=h.useState(r);is(f,r)||p(r);const[g,y]=h.useState(null),[b,v]=h.useState(null),x=h.useCallback(j=>{j!==P.current&&(P.current=j,y(j))},[]),w=h.useCallback(j=>{j!==E.current&&(E.current=j,v(j))},[]),M=s||g,C=a||b,P=h.useRef(null),E=h.useRef(null),D=h.useRef(d),R=c!=null,A=Fa(c),N=Fa(o),H=Fa(u),O=h.useCallback(()=>{if(!P.current||!E.current)return;const j={placement:t,strategy:n,middleware:f};N.current&&(j.platform=N.current),L1(P.current,E.current,j).then(_=>{const Z={..._,isPositioned:H.current!==!1};U.current&&!is(D.current,Z)&&(D.current=Z,xx.flushSync(()=>{l(Z)}))})},[f,t,n,N,H]);Xo(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,l(j=>({...j,isPositioned:!1})))},[u]);const U=h.useRef(!1);Xo(()=>(U.current=!0,()=>{U.current=!1}),[]),Xo(()=>{if(M&&(P.current=M),C&&(E.current=C),M&&C){if(A.current)return A.current(M,C,O);O()}},[M,C,O,A,R]);const K=h.useMemo(()=>({reference:P,floating:E,setReference:x,setFloating:w}),[x,w]),B=h.useMemo(()=>({reference:M,floating:C}),[M,C]),F=h.useMemo(()=>{const j={position:n,left:0,top:0};if(!B.floating)return j;const _=Xd(B.floating,d.x),Z=Xd(B.floating,d.y);return i?{...j,transform:"translate("+_+"px, "+Z+"px)",...Kp(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:Z}},[n,i,B.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:O,refs:K,elements:B,floatingStyles:F}),[d,O,K,B,F])}const V1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qd({element:r.current,padding:o}).fn(n):{}:r?qd({element:r,padding:o}).fn(n):{}}}},W1=(e,t)=>({...O1(e),options:[e,t]}),H1=(e,t)=>({...k1(e),options:[e,t]}),z1=(e,t)=>({...j1(e),options:[e,t]}),Y1=(e,t)=>({...N1(e),options:[e,t]}),U1=(e,t)=>({..._1(e),options:[e,t]}),G1=(e,t)=>({...I1(e),options:[e,t]}),K1=(e,t)=>({...V1(e),options:[e,t]});var q1="Arrow",qp=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return m.jsx(T.Primitive.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});qp.displayName=q1;var X1=qp;function mo(e){const[t,n]=h.useState(void 0);return mt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var zc="Popper",[Xp,pn]=Ne(zc),[Z1,Zp]=Xp(zc),Qp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=h.useState(null);return m.jsx(Z1,{scope:t,anchor:r,onAnchorChange:o,children:n})};Qp.displayName=zc;var Jp="PopperAnchor",eg=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Zp(Jp,n),a=h.useRef(null),i=ce(t,a),c=h.useRef(null);return h.useEffect(()=>{const u=c.current;c.current=(r==null?void 0:r.current)||a.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:m.jsx(T.Primitive.div,{...o,ref:i})});eg.displayName=Jp;var Yc="PopperContent",[Q1,J1]=Xp(Yc),tg=h.forwardRef((e,t)=>{var J,X,re,he,le,G;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:l="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:g,...y}=e,b=Zp(Yc,n),[v,x]=h.useState(null),w=ce(t,ue=>x(ue)),[M,C]=h.useState(null),P=mo(M),E=(P==null?void 0:P.width)??0,D=(P==null?void 0:P.height)??0,R=r+(s!=="center"?"-"+s:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},N=Array.isArray(u)?u:[u],H=N.length>0,O={padding:A,boundary:N.filter(tO),altBoundary:H},{refs:U,floatingStyles:K,placement:B,isPositioned:F,middlewareData:j}=B1({strategy:"fixed",placement:R,whileElementsMounted:(...ue)=>A1(...ue,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[W1({mainAxis:o+D,alignmentAxis:a}),c&&H1({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?z1():void 0,...O}),c&&Y1({...O}),U1({...O,apply:({elements:ue,rects:I,availableWidth:te,availableHeight:me})=>{const{width:pe,height:xe}=I.reference,ae=ue.floating.style;ae.setProperty("--radix-popper-available-width",`${te}px`),ae.setProperty("--radix-popper-available-height",`${me}px`),ae.setProperty("--radix-popper-anchor-width",`${pe}px`),ae.setProperty("--radix-popper-anchor-height",`${xe}px`)}}),M&&K1({element:M,padding:i}),nO({arrowWidth:E,arrowHeight:D}),f&&G1({strategy:"referenceHidden",...O})]}),[_,Z]=og(B),se=Ue(g);mt(()=>{F&&(se==null||se())},[F,se]);const k=(J=j.arrow)==null?void 0:J.x,L=(X=j.arrow)==null?void 0:X.y,Y=((re=j.arrow)==null?void 0:re.centerOffset)!==0,[V,Q]=h.useState();return mt(()=>{v&&Q(window.getComputedStyle(v).zIndex)},[v]),m.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:F?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[(he=j.transformOrigin)==null?void 0:he.x,(le=j.transformOrigin)==null?void 0:le.y].join(" "),...((G=j.hide)==null?void 0:G.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Q1,{scope:n,placedSide:_,onArrowChange:C,arrowX:k,arrowY:L,shouldHideArrow:Y,children:m.jsx(T.Primitive.div,{"data-side":_,"data-align":Z,...y,ref:w,style:{...y.style,animation:F?void 0:"none"}})})})});tg.displayName=Yc;var ng="PopperArrow",eO={top:"bottom",right:"left",bottom:"top",left:"right"},rg=h.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=J1(ng,r),a=eO[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(X1,{...o,ref:n,style:{...o.style,display:"block"}})})});rg.displayName=ng;function tO(e){return e!==null}var nO=e=>({name:"transformOrigin",options:e,fn(t){var b,v,x;const{placement:n,rects:r,middlewareData:o}=t,a=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=og(n),l={start:"0%",center:"50%",end:"100%"}[d],f=(((v=o.arrow)==null?void 0:v.x)??0)+i/2,p=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let g="",y="";return u==="bottom"?(g=a?l:`${f}px`,y=`${-c}px`):u==="top"?(g=a?l:`${f}px`,y=`${r.floating.height+c}px`):u==="right"?(g=`${-c}px`,y=a?l:`${p}px`):u==="left"&&(g=`${r.floating.width+c}px`,y=a?l:`${p}px`),{data:{x:g,y}}}});function og(e){const[t,n="center"]=e.split("-");return[t,n]}var po=Qp,go=eg,Ls=tg,Fs=rg,$s="Popover",[sg]=Ne($s,[pn]),vo=pn(),[rO,gn]=sg($s),ag=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!1}=e,i=vo(t),c=h.useRef(null),[u,d]=h.useState(!1),[l,f]=Ge({prop:r,defaultProp:o??!1,onChange:s,caller:$s});return m.jsx(po,{...i,children:m.jsx(rO,{scope:t,contentId:_e(),triggerRef:c,open:l,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:h.useCallback(()=>d(!0),[]),onCustomAnchorRemove:h.useCallback(()=>d(!1),[]),modal:a,children:n})})};ag.displayName=$s;var ig="PopoverAnchor",cg=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gn(ig,n),s=vo(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return h.useEffect(()=>(a(),()=>i()),[a,i]),m.jsx(go,{...s,...r,ref:t})});cg.displayName=ig;var lg="PopoverTrigger",ug=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gn(lg,n),s=vo(n),a=ce(t,o.triggerRef),i=m.jsx(T.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":pg(o.open),...r,ref:a,onClick:$(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:m.jsx(go,{asChild:!0,...s,children:i})});ug.displayName=lg;var Uc="PopoverPortal",[oO,sO]=sg(Uc,{forceMount:void 0}),dg=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=gn(Uc,t);return m.jsx(oO,{scope:t,forceMount:n,children:m.jsx(Ie,{present:n||s.open,children:m.jsx(pr,{asChild:!0,container:o,children:r})})})};dg.displayName=Uc;var ir="PopoverContent",fg=h.forwardRef((e,t)=>{const n=sO(ir,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=gn(ir,e.__scopePopover);return m.jsx(Ie,{present:r||s.open,children:s.modal?m.jsx(iO,{...o,ref:t}):m.jsx(cO,{...o,ref:t})})});fg.displayName=ir;var aO=kn.createSlot("PopoverContent.RemoveScroll"),iO=h.forwardRef((e,t)=>{const n=gn(ir,e.__scopePopover),r=h.useRef(null),o=ce(t,r),s=h.useRef(!1);return h.useEffect(()=>{const a=r.current;if(a)return Mc(a)},[]),m.jsx(Ms,{as:aO,allowPinchZoom:!0,children:m.jsx(hg,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),s.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:$(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0,u=i.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:$(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),cO=h.forwardRef((e,t)=>{const n=gn(ir,e.__scopePopover),r=h.useRef(!1),o=h.useRef(!1);return m.jsx(hg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),hg=h.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...l}=e,f=gn(ir,n),p=vo(n);return Cc(),m.jsx(Ss,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:m.jsx(mr,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:m.jsx(Ls,{"data-state":pg(f.open),role:"dialog",id:f.contentId,...p,...l,ref:t,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),mg="PopoverClose",lO=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gn(mg,n);return m.jsx(T.Primitive.button,{type:"button",...r,ref:t,onClick:$(e.onClick,()=>o.onOpenChange(!1))})});lO.displayName=mg;var uO="PopoverArrow",dO=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=vo(n);return m.jsx(Fs,{...o,...r,ref:t})});dO.displayName=uO;function pg(e){return e?"open":"closed"}var fO=ag,hO=cg,mO=ug,pO=dg,gO=fg;function gg({...e}){return m.jsx(fO,{"data-slot":"popover",...e})}function vg({...e}){return m.jsx(mO,{"data-slot":"popover-trigger",...e})}function yg({className:e,align:t="center",sideOffset:n=4,...r}){return m.jsx(pO,{children:m.jsx(gO,{"data-slot":"popover-content",align:t,sideOffset:n,className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}function vO({...e}){return m.jsx(hO,{"data-slot":"popover-anchor",...e})}function yO({options:e,value:t,onValueChange:n,placeholder:r="Select option...",searchPlaceholder:o="Search...",emptyText:s="No option found.",disabled:a=!1,triggerClassName:i,contentClassName:c,buttonVariant:u="outline",buttonSize:d="default"}){const[l,f]=h.useState(!1),p=e.find(y=>y.value===t),g=y=>{const b=y===t?"":y;n==null||n(b),f(!1)};return m.jsxs(gg,{open:l,onOpenChange:f,children:[m.jsx(vg,{asChild:!0,children:m.jsxs(T.Button,{variant:u,size:d,role:"combobox","aria-expanded":l,disabled:a,className:T.cn("w-full justify-between",i),children:[p?p.label:r,m.jsx(ke.ChevronsUpDownIcon,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(yg,{className:T.cn("w-full p-0",c),children:m.jsxs(Lc,{children:[m.jsx(Np,{placeholder:o}),m.jsxs(_p,{children:[m.jsx(Ip,{children:s}),m.jsx(jp,{children:e.map(y=>m.jsxs(Lp,{value:y.value,disabled:y.disabled,onSelect:()=>g(y.value),children:[m.jsx(ke.CheckIcon,{className:T.cn("mr-2 h-4 w-4",t===y.value?"opacity-100":"opacity-0")}),y.label]},y.value))})]})]})})]})}var bO=Object.defineProperty,xO=Object.defineProperties,wO=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,bg=Object.prototype.hasOwnProperty,xg=Object.prototype.propertyIsEnumerable,Zd=(e,t,n)=>t in e?bO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SO=(e,t)=>{for(var n in t||(t={}))bg.call(t,n)&&Zd(e,n,t[n]);if(cs)for(var n of cs(t))xg.call(t,n)&&Zd(e,n,t[n]);return e},CO=(e,t)=>xO(e,wO(t)),MO=(e,t)=>{var n={};for(var r in e)bg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cs)for(var r of cs(e))t.indexOf(r)<0&&xg.call(e,r)&&(n[r]=e[r]);return n};function EO(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function TO(e){let t=h.useRef();return h.useEffect(()=>{t.current=e}),t.current}var PO=18,wg=40,DO=`${wg}px`,RO=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function AO({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[o,s]=h.useState(!1),[a,i]=h.useState(!1),[c,u]=h.useState(!1),d=h.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&a,[o,a,n]),l=h.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||c||n==="none")return;let g=f,y=g.getBoundingClientRect().left+g.offsetWidth,b=g.getBoundingClientRect().top+g.offsetHeight/2,v=y-PO,x=b;document.querySelectorAll(RO).length===0&&document.elementFromPoint(v,x)===f||(s(!0),u(!0))},[e,t,c,n]);return h.useEffect(()=>{let f=e.current;if(!f||n==="none")return;function p(){let y=window.innerWidth-f.getBoundingClientRect().right;i(y>=wg)}p();let g=setInterval(p,1e3);return()=>{clearInterval(g)}},[e,n]),h.useEffect(()=>{let f=r||document.activeElement===t.current;if(n==="none"||!f)return;let p=setTimeout(l,0),g=setTimeout(l,2e3),y=setTimeout(l,5e3),b=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(p),clearTimeout(g),clearTimeout(y),clearTimeout(b)}},[t,r,n,l]),{hasPWMBadge:o,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:DO}}var Sg=h.createContext({}),Cg=h.forwardRef((e,t)=>{var n=e,{value:r,onChange:o,maxLength:s,textAlign:a="left",pattern:i,placeholder:c,inputMode:u="numeric",onComplete:d,pushPasswordManagerStrategy:l="increase-width",pasteTransformer:f,containerClassName:p,noScriptCSSFallback:g=OO,render:y,children:b}=n,v=MO(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),x,w,M,C,P;let[E,D]=h.useState(typeof v.defaultValue=="string"?v.defaultValue:""),R=r??E,A=TO(R),N=h.useCallback(I=>{o==null||o(I),D(I)},[o]),H=h.useMemo(()=>i?typeof i=="string"?new RegExp(i):i:null,[i]),O=h.useRef(null),U=h.useRef(null),K=h.useRef({value:R,onChange:N,isIOS:typeof window<"u"&&((w=(x=window==null?void 0:window.CSS)==null?void 0:x.supports)==null?void 0:w.call(x,"-webkit-touch-callout","none"))}),B=h.useRef({prev:[(M=O.current)==null?void 0:M.selectionStart,(C=O.current)==null?void 0:C.selectionEnd,(P=O.current)==null?void 0:P.selectionDirection]});h.useImperativeHandle(t,()=>O.current,[]),h.useEffect(()=>{let I=O.current,te=U.current;if(!I||!te)return;K.current.value!==I.value&&K.current.onChange(I.value),B.current.prev=[I.selectionStart,I.selectionEnd,I.selectionDirection];function me(){if(document.activeElement!==I){k(null),Y(null);return}let ae=I.selectionStart,ve=I.selectionEnd,Xe=I.selectionDirection,ge=I.maxLength,Me=I.value,Le=B.current.prev,Ke=-1,He=-1,Ze;if(Me.length!==0&&ae!==null&&ve!==null){let gt=ae===ve,$e=ae===Me.length&&Me.length<ge;if(gt&&!$e){let ze=ae;if(ze===0)Ke=0,He=1,Ze="forward";else if(ze===ge)Ke=ze-1,He=ze,Ze="backward";else if(ge>1&&Me.length>1){let St=0;if(Le[0]!==null&&Le[1]!==null){Ze=ze<Le[1]?"backward":"forward";let It=Le[0]===Le[1]&&Le[0]<ge;Ze==="backward"&&!It&&(St=-1)}Ke=St+ze,He=St+ze+1}}Ke!==-1&&He!==-1&&Ke!==He&&O.current.setSelectionRange(Ke,He,Ze)}let st=Ke!==-1?Ke:ae,at=He!==-1?He:ve,Fe=Ze??Xe;k(st),Y(at),B.current.prev=[st,at,Fe]}if(document.addEventListener("selectionchange",me,{capture:!0}),me(),document.activeElement===I&&Z(!0),!document.getElementById("input-otp-style")){let ae=document.createElement("style");if(ae.id="input-otp-style",document.head.appendChild(ae),ae.sheet){let ve="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Er(ae.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Er(ae.sheet,`[data-input-otp]:autofill { ${ve} }`),Er(ae.sheet,`[data-input-otp]:-webkit-autofill { ${ve} }`),Er(ae.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Er(ae.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let pe=()=>{te&&te.style.setProperty("--root-height",`${I.clientHeight}px`)};pe();let xe=new ResizeObserver(pe);return xe.observe(I),()=>{document.removeEventListener("selectionchange",me,{capture:!0}),xe.disconnect()}},[]);let[F,j]=h.useState(!1),[_,Z]=h.useState(!1),[se,k]=h.useState(null),[L,Y]=h.useState(null);h.useEffect(()=>{EO(()=>{var I,te,me,pe;(I=O.current)==null||I.dispatchEvent(new Event("input"));let xe=(te=O.current)==null?void 0:te.selectionStart,ae=(me=O.current)==null?void 0:me.selectionEnd,ve=(pe=O.current)==null?void 0:pe.selectionDirection;xe!==null&&ae!==null&&(k(xe),Y(ae),B.current.prev=[xe,ae,ve])})},[R,_]),h.useEffect(()=>{A!==void 0&&R!==A&&A.length<s&&R.length===s&&(d==null||d(R))},[s,d,A,R]);let V=AO({containerRef:U,inputRef:O,pushPasswordManagerStrategy:l,isFocused:_}),Q=h.useCallback(I=>{let te=I.currentTarget.value.slice(0,s);if(te.length>0&&H&&!H.test(te)){I.preventDefault();return}typeof A=="string"&&te.length<A.length&&document.dispatchEvent(new Event("selectionchange")),N(te)},[s,N,A,H]),J=h.useCallback(()=>{var I;if(O.current){let te=Math.min(O.current.value.length,s-1),me=O.current.value.length;(I=O.current)==null||I.setSelectionRange(te,me),k(te),Y(me)}Z(!0)},[s]),X=h.useCallback(I=>{var te,me;let pe=O.current;if(!f&&(!K.current.isIOS||!I.clipboardData||!pe))return;let xe=I.clipboardData.getData("text/plain"),ae=f?f(xe):xe;I.preventDefault();let ve=(te=O.current)==null?void 0:te.selectionStart,Xe=(me=O.current)==null?void 0:me.selectionEnd,ge=(ve!==Xe?R.slice(0,ve)+ae+R.slice(Xe):R.slice(0,ve)+ae+R.slice(ve)).slice(0,s);if(ge.length>0&&H&&!H.test(ge))return;pe.value=ge,N(ge);let Me=Math.min(ge.length,s-1),Le=ge.length;pe.setSelectionRange(Me,Le),k(Me),Y(Le)},[s,N,H,R]),re=h.useMemo(()=>({position:"relative",cursor:v.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[v.disabled]),he=h.useMemo(()=>({position:"absolute",inset:0,width:V.willPushPWMBadge?`calc(100% + ${V.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:V.willPushPWMBadge?`inset(0 ${V.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:a,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[V.PWM_BADGE_SPACE_WIDTH,V.willPushPWMBadge,a]),le=h.useMemo(()=>h.createElement("input",CO(SO({autoComplete:v.autoComplete||"one-time-code"},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":R.length===0||void 0,"data-input-otp-mss":se,"data-input-otp-mse":L,inputMode:u,pattern:H==null?void 0:H.source,"aria-placeholder":c,style:he,maxLength:s,value:R,ref:O,onPaste:I=>{var te;X(I),(te=v.onPaste)==null||te.call(v,I)},onChange:Q,onMouseOver:I=>{var te;j(!0),(te=v.onMouseOver)==null||te.call(v,I)},onMouseLeave:I=>{var te;j(!1),(te=v.onMouseLeave)==null||te.call(v,I)},onFocus:I=>{var te;J(),(te=v.onFocus)==null||te.call(v,I)},onBlur:I=>{var te;Z(!1),(te=v.onBlur)==null||te.call(v,I)}})),[Q,J,X,u,he,s,L,se,v,H==null?void 0:H.source,R]),G=h.useMemo(()=>({slots:Array.from({length:s}).map((I,te)=>{var me;let pe=_&&se!==null&&L!==null&&(se===L&&te===se||te>=se&&te<L),xe=R[te]!==void 0?R[te]:null,ae=R[0]!==void 0?null:(me=c==null?void 0:c[te])!=null?me:null;return{char:xe,placeholderChar:ae,isActive:pe,hasFakeCaret:pe&&xe===null}}),isFocused:_,isHovering:!v.disabled&&F}),[_,F,s,L,se,v.disabled,R]),ue=h.useMemo(()=>y?y(G):h.createElement(Sg.Provider,{value:G},b),[b,G,y]);return h.createElement(h.Fragment,null,g!==null&&h.createElement("noscript",null,h.createElement("style",null,g)),h.createElement("div",{ref:U,"data-input-otp-container":!0,style:re,className:p},ue,h.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},le)))});Cg.displayName="Input";function Er(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var OO=`
|
|
52
|
+
[data-input-otp] {
|
|
53
|
+
--nojs-bg: white !important;
|
|
54
|
+
--nojs-fg: black !important;
|
|
55
|
+
|
|
56
|
+
background-color: var(--nojs-bg) !important;
|
|
57
|
+
color: var(--nojs-fg) !important;
|
|
58
|
+
caret-color: var(--nojs-fg) !important;
|
|
59
|
+
letter-spacing: .25em !important;
|
|
60
|
+
text-align: center !important;
|
|
61
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
62
|
+
border-radius: 4px !important;
|
|
63
|
+
width: 100% !important;
|
|
64
|
+
}
|
|
65
|
+
@media (prefers-color-scheme: dark) {
|
|
66
|
+
[data-input-otp] {
|
|
67
|
+
--nojs-bg: black !important;
|
|
68
|
+
--nojs-fg: white !important;
|
|
69
|
+
}
|
|
70
|
+
}`;function kO({className:e,containerClassName:t,...n}){return m.jsx(Cg,{"data-slot":"input-otp",containerClassName:T.cn("flex items-center gap-2 has-disabled:opacity-50",t),className:T.cn("disabled:cursor-not-allowed",e),...n})}function NO({className:e,...t}){return m.jsx("div",{"data-slot":"input-otp-group",className:T.cn("flex items-center",e),...t})}function _O({index:e,className:t,...n}){const r=h.useContext(Sg),{char:o,hasFakeCaret:s,isActive:a}=(r==null?void 0:r.slots[e])??{};return m.jsxs("div",{"data-slot":"input-otp-slot","data-active":a,className:T.cn("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[o,s&&m.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:m.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function IO({...e}){return m.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:m.jsx(ke.MinusIcon,{})})}function Gc(e,[t,n]){return Math.min(n,Math.max(t,e))}var jO=h.createContext(void 0);function vn(e){const t=h.useContext(jO);return e||t||"ltr"}function Bs(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function yo(e){const t=e+"CollectionProvider",[n,r]=Ne(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:b,children:v}=y,x=S.useRef(null),w=S.useRef(new Map).current;return m.jsx(o,{scope:b,itemMap:w,collectionRef:x,children:v})};a.displayName=t;const i=e+"CollectionSlot",c=kn.createSlot(i),u=S.forwardRef((y,b)=>{const{scope:v,children:x}=y,w=s(i,v),M=ce(b,w.collectionRef);return m.jsx(c,{ref:M,children:x})});u.displayName=i;const d=e+"CollectionItemSlot",l="data-radix-collection-item",f=kn.createSlot(d),p=S.forwardRef((y,b)=>{const{scope:v,children:x,...w}=y,M=S.useRef(null),C=ce(b,M),P=s(d,v);return S.useEffect(()=>(P.itemMap.set(M,{ref:M,...w}),()=>void P.itemMap.delete(M))),m.jsx(f,{[l]:"",ref:C,children:x})});p.displayName=d;function g(y){const b=s(e+"CollectionConsumer",y);return S.useCallback(()=>{const x=b.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${l}]`));return Array.from(b.itemMap.values()).sort((P,E)=>w.indexOf(P.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:u,ItemSlot:p},g,r]}var Mg=["PageUp","PageDown"],Eg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Tg={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},br="Slider",[Ti,LO,FO]=yo(br),[Pg]=Ne(br,[FO]),[$O,Vs]=Pg(br),Dg=h.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:a="horizontal",disabled:i=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:d,onValueChange:l=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:g,...y}=e,b=h.useRef(new Set),v=h.useRef(0),w=a==="horizontal"?BO:VO,[M=[],C]=Ge({prop:d,defaultProp:u,onChange:N=>{var O;(O=[...b.current][v.current])==null||O.focus(),l(N)}}),P=h.useRef(M);function E(N){const H=UO(M,N);A(N,H)}function D(N){A(N,v.current)}function R(){const N=P.current[v.current];M[v.current]!==N&&f(M)}function A(N,H,{commit:O}={commit:!1}){const U=XO(s),K=ZO(Math.round((N-r)/s)*s+r,U),B=Gc(K,[r,o]);C((F=[])=>{const j=zO(F,B,H);if(qO(j,c*s)){v.current=j.indexOf(B);const _=String(j)!==String(F);return _&&O&&f(j),_?j:F}else return F})}return m.jsx($O,{scope:e.__scopeSlider,name:n,disabled:i,min:r,max:o,valueIndexToChangeRef:v,thumbs:b.current,values:M,orientation:a,form:g,children:m.jsx(Ti.Provider,{scope:e.__scopeSlider,children:m.jsx(Ti.Slot,{scope:e.__scopeSlider,children:m.jsx(w,{"aria-disabled":i,"data-disabled":i?"":void 0,...y,ref:t,onPointerDown:$(y.onPointerDown,()=>{i||(P.current=M)}),min:r,max:o,inverted:p,onSlideStart:i?void 0:E,onSlideMove:i?void 0:D,onSlideEnd:i?void 0:R,onHomeKeyDown:()=>!i&&A(r,0,{commit:!0}),onEndKeyDown:()=>!i&&A(o,M.length-1,{commit:!0}),onStepKeyDown:({event:N,direction:H})=>{if(!i){const K=Mg.includes(N.key)||N.shiftKey&&Eg.includes(N.key)?10:1,B=v.current,F=M[B],j=s*K*H;A(F+j,B,{commit:!0})}}})})})})});Dg.displayName=br;var[Rg,Ag]=Pg(br,{startEdge:"left",endEdge:"right",size:"width",direction:1}),BO=h.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:a,onSlideMove:i,onSlideEnd:c,onStepKeyDown:u,...d}=e,[l,f]=h.useState(null),p=ce(t,w=>f(w)),g=h.useRef(void 0),y=vn(o),b=y==="ltr",v=b&&!s||!b&&s;function x(w){const M=g.current||l.getBoundingClientRect(),C=[0,M.width],E=Kc(C,v?[n,r]:[r,n]);return g.current=M,E(w-M.left)}return m.jsx(Rg,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:m.jsx(Og,{dir:y,"data-orientation":"horizontal",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const M=x(w.clientX);a==null||a(M)},onSlideMove:w=>{const M=x(w.clientX);i==null||i(M)},onSlideEnd:()=>{g.current=void 0,c==null||c()},onStepKeyDown:w=>{const C=Tg[v?"from-left":"from-right"].includes(w.key);u==null||u({event:w,direction:C?-1:1})}})})}),VO=h.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:a,onSlideEnd:i,onStepKeyDown:c,...u}=e,d=h.useRef(null),l=ce(t,d),f=h.useRef(void 0),p=!o;function g(y){const b=f.current||d.current.getBoundingClientRect(),v=[0,b.height],w=Kc(v,p?[r,n]:[n,r]);return f.current=b,w(y-b.top)}return m.jsx(Rg,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:m.jsx(Og,{"data-orientation":"vertical",...u,ref:l,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:y=>{const b=g(y.clientY);s==null||s(b)},onSlideMove:y=>{const b=g(y.clientY);a==null||a(b)},onSlideEnd:()=>{f.current=void 0,i==null||i()},onStepKeyDown:y=>{const v=Tg[p?"from-bottom":"from-top"].includes(y.key);c==null||c({event:y,direction:v?-1:1})}})})}),Og=h.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:a,onEndKeyDown:i,onStepKeyDown:c,...u}=e,d=Vs(br,n);return m.jsx(T.Primitive.span,{...u,ref:t,onKeyDown:$(e.onKeyDown,l=>{l.key==="Home"?(a(l),l.preventDefault()):l.key==="End"?(i(l),l.preventDefault()):Mg.concat(Eg).includes(l.key)&&(c(l),l.preventDefault())}),onPointerDown:$(e.onPointerDown,l=>{const f=l.target;f.setPointerCapture(l.pointerId),l.preventDefault(),d.thumbs.has(f)?f.focus():r(l)}),onPointerMove:$(e.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&o(l)}),onPointerUp:$(e.onPointerUp,l=>{const f=l.target;f.hasPointerCapture(l.pointerId)&&(f.releasePointerCapture(l.pointerId),s(l))})})}),kg="SliderTrack",Ng=h.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Vs(kg,n);return m.jsx(T.Primitive.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Ng.displayName=kg;var Pi="SliderRange",_g=h.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Vs(Pi,n),s=Ag(Pi,n),a=h.useRef(null),i=ce(t,a),c=o.values.length,u=o.values.map(f=>Lg(f,o.min,o.max)),d=c>1?Math.min(...u):0,l=100-Math.max(...u);return m.jsx(T.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:i,style:{...e.style,[s.startEdge]:d+"%",[s.endEdge]:l+"%"}})});_g.displayName=Pi;var Di="SliderThumb",Ig=h.forwardRef((e,t)=>{const n=LO(e.__scopeSlider),[r,o]=h.useState(null),s=ce(t,i=>o(i)),a=h.useMemo(()=>r?n().findIndex(i=>i.ref.current===r):-1,[n,r]);return m.jsx(WO,{...e,ref:s,index:a})}),WO=h.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,a=Vs(Di,n),i=Ag(Di,n),[c,u]=h.useState(null),d=ce(t,x=>u(x)),l=c?a.form||!!c.closest("form"):!0,f=mo(c),p=a.values[r],g=p===void 0?0:Lg(p,a.min,a.max),y=YO(r,a.values.length),b=f==null?void 0:f[i.size],v=b?GO(b,g,i.direction):0;return h.useEffect(()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}},[c,a.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[i.startEdge]:`calc(${g}% + ${v}px)`},children:[m.jsx(Ti.ItemSlot,{scope:e.__scopeSlider,children:m.jsx(T.Primitive.span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":a.min,"aria-valuenow":p,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...s,ref:d,style:p===void 0?{display:"none"}:e.style,onFocus:$(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),l&&m.jsx(jg,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:p},r)]})});Ig.displayName=Di;var HO="RadioBubbleInput",jg=h.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=h.useRef(null),s=ce(o,r),a=Bs(t);return h.useEffect(()=>{const i=o.current;if(!i)return;const c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&d){const l=new Event("input",{bubbles:!0});d.call(i,t),i.dispatchEvent(l)}},[a,t]),m.jsx(T.Primitive.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});jg.displayName=HO;function zO(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function Lg(e,t,n){const s=100/(n-t)*(e-t);return Gc(s,[0,100])}function YO(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function UO(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function GO(e,t,n){const r=e/2,s=Kc([0,50],[0,r]);return(r-s(t)*n)*n}function KO(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function qO(e,t){if(t>0){const n=KO(e);return Math.min(...n)>=t}return!0}function Kc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function XO(e){return(String(e).split(".")[1]||"").length}function ZO(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var QO=Dg,JO=Ng,ek=_g,tk=Ig;function nk({className:e,defaultValue:t,value:n,min:r=0,max:o=100,...s}){const a=h.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,o],[n,t,r,o]);return m.jsxs(QO,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:o,className:T.cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...s,children:[m.jsx(JO,{"data-slot":"slider-track",className:T.cn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:m.jsx(ek,{"data-slot":"slider-range",className:T.cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:a.length},(i,c)=>m.jsx(tk,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},c))]})}var qc="Progress",Xc=100,[rk]=Ne(qc),[ok,sk]=rk(qc),Fg=h.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=ak,...a}=e;(o||o===0)&&!Qd(o)&&console.error(ik(`${o}`,"Progress"));const i=Qd(o)?o:Xc;r!==null&&!Jd(r,i)&&console.error(ck(`${r}`,"Progress"));const c=Jd(r,i)?r:null,u=ls(c)?s(c,i):void 0;return m.jsx(ok,{scope:n,value:c,max:i,children:m.jsx(T.Primitive.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":ls(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Vg(c,i),"data-value":c??void 0,"data-max":i,...a,ref:t})})});Fg.displayName=qc;var $g="ProgressIndicator",Bg=h.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=sk($g,n);return m.jsx(T.Primitive.div,{"data-state":Vg(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Bg.displayName=$g;function ak(e,t){return`${Math.round(e/t*100)}%`}function Vg(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ls(e){return typeof e=="number"}function Qd(e){return ls(e)&&!isNaN(e)&&e>0}function Jd(e,t){return ls(e)&&!isNaN(e)&&e<=t&&e>=0}function ik(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Xc}\`.`}function ck(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
71
|
+
- a positive number
|
|
72
|
+
- less than the value passed to \`max\` (or ${Xc} if no \`max\` prop is set)
|
|
73
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
74
|
+
|
|
75
|
+
Defaulting to \`null\`.`}var lk=Fg,uk=Bg;const dk=100;function fk({className:e,value:t,...n}){return m.jsx(lk,{"data-slot":"progress",className:T.cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...n,children:m.jsx(uk,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${dk-(t??0)}%)`}})})}var Ws="Collapsible",[hk,Wg]=Ne(Ws),[mk,Zc]=hk(Ws),Hg=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:a,...i}=e,[c,u]=Ge({prop:r,defaultProp:o??!1,onChange:a,caller:Ws});return m.jsx(mk,{scope:n,disabled:s,contentId:_e(),open:c,onOpenToggle:h.useCallback(()=>u(d=>!d),[u]),children:m.jsx(T.Primitive.div,{"data-state":Jc(c),"data-disabled":s?"":void 0,...i,ref:t})})});Hg.displayName=Ws;var zg="CollapsibleTrigger",Yg=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Zc(zg,n);return m.jsx(T.Primitive.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Jc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:$(e.onClick,o.onOpenToggle)})});Yg.displayName=zg;var Qc="CollapsibleContent",Ug=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Zc(Qc,e.__scopeCollapsible);return m.jsx(Ie,{present:n||o.open,children:({present:s})=>m.jsx(pk,{...r,ref:t,present:s})})});Ug.displayName=Qc;var pk=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,a=Zc(Qc,n),[i,c]=h.useState(r),u=h.useRef(null),d=ce(t,u),l=h.useRef(0),f=l.current,p=h.useRef(0),g=p.current,y=a.open||i,b=h.useRef(y),v=h.useRef(void 0);return h.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),mt(()=>{const x=u.current;if(x){v.current=v.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();l.current=w.height,p.current=w.width,b.current||(x.style.transitionDuration=v.current.transitionDuration,x.style.animationName=v.current.animationName),c(r)}},[a.open,r]),m.jsx(T.Primitive.div,{"data-state":Jc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y,...s,ref:d,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:y&&o})});function Jc(e){return e?"open":"closed"}var gk=Hg,vk=Yg,yk=Ug,_t="Accordion",bk=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[el,xk,wk]=yo(_t),[Hs]=Ne(_t,[wk,Wg]),tl=Wg(),Gg=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return m.jsx(el.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?m.jsx(Ek,{...s,ref:t}):m.jsx(Mk,{...o,ref:t})})});Gg.displayName=_t;var[Kg,Sk]=Hs(_t),[qg,Ck]=Hs(_t,{collapsible:!1}),Mk=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...a}=e,[i,c]=Ge({prop:n,defaultProp:r??"",onChange:o,caller:_t});return m.jsx(Kg,{scope:e.__scopeAccordion,value:S.useMemo(()=>i?[i]:[],[i]),onItemOpen:c,onItemClose:S.useCallback(()=>s&&c(""),[s,c]),children:m.jsx(qg,{scope:e.__scopeAccordion,collapsible:s,children:m.jsx(Xg,{...a,ref:t})})})}),Ek=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,i]=Ge({prop:n,defaultProp:r??[],onChange:o,caller:_t}),c=S.useCallback(d=>i((l=[])=>[...l,d]),[i]),u=S.useCallback(d=>i((l=[])=>l.filter(f=>f!==d)),[i]);return m.jsx(Kg,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:m.jsx(qg,{scope:e.__scopeAccordion,collapsible:!0,children:m.jsx(Xg,{...s,ref:t})})})}),[Tk,zs]=Hs(_t),Xg=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...a}=e,i=S.useRef(null),c=ce(i,t),u=xk(n),l=vn(o)==="ltr",f=$(e.onKeyDown,p=>{var D;if(!bk.includes(p.key))return;const g=p.target,y=u().filter(R=>{var A;return!((A=R.ref.current)!=null&&A.disabled)}),b=y.findIndex(R=>R.ref.current===g),v=y.length;if(b===-1)return;p.preventDefault();let x=b;const w=0,M=v-1,C=()=>{x=b+1,x>M&&(x=w)},P=()=>{x=b-1,x<w&&(x=M)};switch(p.key){case"Home":x=w;break;case"End":x=M;break;case"ArrowRight":s==="horizontal"&&(l?C():P());break;case"ArrowDown":s==="vertical"&&C();break;case"ArrowLeft":s==="horizontal"&&(l?P():C());break;case"ArrowUp":s==="vertical"&&P();break}const E=x%v;(D=y[E].ref.current)==null||D.focus()});return m.jsx(Tk,{scope:n,disabled:r,direction:o,orientation:s,children:m.jsx(el.Slot,{scope:n,children:m.jsx(T.Primitive.div,{...a,"data-orientation":s,ref:c,onKeyDown:r?void 0:f})})})}),us="AccordionItem",[Pk,nl]=Hs(us),Zg=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,s=zs(us,n),a=Sk(us,n),i=tl(n),c=_e(),u=r&&a.value.includes(r)||!1,d=s.disabled||e.disabled;return m.jsx(Pk,{scope:n,open:u,disabled:d,triggerId:c,children:m.jsx(gk,{"data-orientation":s.orientation,"data-state":rv(u),...i,...o,ref:t,disabled:d,open:u,onOpenChange:l=>{l?a.onItemOpen(r):a.onItemClose(r)}})})});Zg.displayName=us;var Qg="AccordionHeader",Jg=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=zs(_t,n),s=nl(Qg,n);return m.jsx(T.Primitive.h3,{"data-orientation":o.orientation,"data-state":rv(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});Jg.displayName=Qg;var Ri="AccordionTrigger",ev=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=zs(_t,n),s=nl(Ri,n),a=Ck(Ri,n),i=tl(n);return m.jsx(el.ItemSlot,{scope:n,children:m.jsx(vk,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...i,...r,ref:t})})});ev.displayName=Ri;var tv="AccordionContent",nv=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=zs(_t,n),s=nl(tv,n),a=tl(n);return m.jsx(yk,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...a,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});nv.displayName=tv;function rv(e){return e?"open":"closed"}var Dk=Gg,Rk=Zg,Ak=Jg,Ok=ev,kk=nv;function Nk({...e}){return m.jsx(Dk,{"data-slot":"accordion",...e})}function _k({className:e,...t}){return m.jsx(Rk,{"data-slot":"accordion-item",className:T.cn("border-b last:border-b-0",e),...t})}function Ik({className:e,children:t,...n}){return m.jsx(Ak,{className:"flex",children:m.jsxs(Ok,{"data-slot":"accordion-trigger",className:T.cn("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,m.jsx(ke.ChevronDownIcon,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function jk({className:e,children:t,...n}){return m.jsx(kk,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...n,children:m.jsx("div",{className:T.cn("pt-0 pb-4",e),children:t})})}var Lo={exports:{}},$a={};/**
|
|
76
|
+
* @license React
|
|
77
|
+
* use-sync-external-store-shim.production.js
|
|
78
|
+
*
|
|
79
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the MIT license found in the
|
|
82
|
+
* LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/var ef;function Lk(){if(ef)return $a;ef=1;var e=S;function t(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(l,f){var p=f(),g=r({inst:{value:p,getSnapshot:f}}),y=g[0].inst,b=g[1];return s(function(){y.value=p,y.getSnapshot=f,c(y)&&b({inst:y})},[l,p,f]),o(function(){return c(y)&&b({inst:y}),l(function(){c(y)&&b({inst:y})})},[l]),a(p),p}function c(l){var f=l.getSnapshot;l=l.value;try{var p=f();return!n(l,p)}catch{return!0}}function u(l,f){return f()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return $a.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,$a}var Ba={};/**
|
|
84
|
+
* @license React
|
|
85
|
+
* use-sync-external-store-shim.development.js
|
|
86
|
+
*
|
|
87
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the MIT license found in the
|
|
90
|
+
* LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/var tf;function Fk(){return tf||(tf=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function t(p,g){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=g();if(!l){var b=g();s(y,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}b=a({inst:{value:y,getSnapshot:g}});var v=b[0].inst,x=b[1];return c(function(){v.value=y,v.getSnapshot=g,n(v)&&x({inst:v})},[p,y,g]),i(function(){return n(v)&&x({inst:v}),p(function(){n(v)&&x({inst:v})})},[p]),u(y),y}function n(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!s(p,y)}catch{return!0}}function r(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,s=typeof Object.is=="function"?Object.is:e,a=o.useState,i=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,l=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Ba.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ba}var nf;function $k(){return nf||(nf=1,process.env.NODE_ENV==="production"?Lo.exports=Lk():Lo.exports=Fk()),Lo.exports}var Bk=$k();function Vk(){return Bk.useSyncExternalStore(Wk,()=>!0,()=>!1)}function Wk(){return()=>{}}var rl="Avatar",[Hk]=Ne(rl),[zk,ov]=Hk(rl),sv=h.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=h.useState("idle");return m.jsx(zk,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:m.jsx(T.Primitive.span,{...r,ref:t})})});sv.displayName=rl;var av="AvatarImage",iv=h.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,a=ov(av,n),i=Yk(r,s),c=Ue(u=>{o(u),a.onImageLoadingStatusChange(u)});return mt(()=>{i!=="idle"&&c(i)},[i,c]),i==="loaded"?m.jsx(T.Primitive.img,{...s,ref:t,src:r}):null});iv.displayName=av;var cv="AvatarFallback",lv=h.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=ov(cv,n),[a,i]=h.useState(r===void 0);return h.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(c)}},[r]),a&&s.imageLoadingStatus!=="loaded"?m.jsx(T.Primitive.span,{...o,ref:t}):null});lv.displayName=cv;function rf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Yk(e,{referrerPolicy:t,crossOrigin:n}){const r=Vk(),o=h.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[a,i]=h.useState(()=>rf(s,e));return mt(()=>{i(rf(s,e))},[s,e]),mt(()=>{const c=l=>()=>{i(l)};if(!s)return;const u=c("loaded"),d=c("error");return s.addEventListener("load",u),s.addEventListener("error",d),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",u),s.removeEventListener("error",d)}},[s,n,t]),a}var Uk=sv,Gk=iv,Kk=lv;function qk({className:e,...t}){return m.jsx(Uk,{"data-slot":"avatar",className:T.cn("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function Xk({className:e,...t}){return m.jsx(Gk,{"data-slot":"avatar-image",className:T.cn("aspect-square size-full",e),...t})}function Zk({className:e,...t}){return m.jsx(Kk,{"data-slot":"avatar-fallback",className:T.cn("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}var Ys="Checkbox",[Qk]=Ne(Ys),[Jk,ol]=Qk(Ys);function eN(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:a,name:i,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:l}=e,[f,p]=Ge({prop:n,defaultProp:o??!1,onChange:c,caller:Ys}),[g,y]=h.useState(null),[b,v]=h.useState(null),x=h.useRef(!1),w=g?!!a||!!g.closest("form"):!0,M={checked:f,disabled:s,setChecked:p,control:g,setControl:y,name:i,form:a,value:d,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:cn(o)?!1:o,isFormControl:w,bubbleInput:b,setBubbleInput:v};return m.jsx(Jk,{scope:t,...M,children:tN(l)?l(M):r})}var uv="CheckboxTrigger",dv=h.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:a,disabled:i,checked:c,required:u,setControl:d,setChecked:l,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=ol(uv,e),y=ce(o,d),b=h.useRef(c);return h.useEffect(()=>{const v=s==null?void 0:s.form;if(v){const x=()=>l(b.current);return v.addEventListener("reset",x),()=>v.removeEventListener("reset",x)}},[s,l]),m.jsx(T.Primitive.button,{type:"button",role:"checkbox","aria-checked":cn(c)?"mixed":c,"aria-required":u,"data-state":vv(c),"data-disabled":i?"":void 0,disabled:i,value:a,...r,ref:y,onKeyDown:$(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:$(n,v=>{l(x=>cn(x)?!0:!x),g&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});dv.displayName=uv;var fv=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:a,disabled:i,value:c,onCheckedChange:u,form:d,...l}=e;return m.jsx(eN,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:i,required:a,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:f})=>m.jsxs(m.Fragment,{children:[m.jsx(dv,{...l,ref:t,__scopeCheckbox:n}),f&&m.jsx(gv,{__scopeCheckbox:n})]})})});fv.displayName=Ys;var hv="CheckboxIndicator",mv=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=ol(hv,n);return m.jsx(Ie,{present:r||cn(s.checked)||s.checked===!0,children:m.jsx(T.Primitive.span,{"data-state":vv(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});mv.displayName=hv;var pv="CheckboxBubbleInput",gv=h.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:a,required:i,disabled:c,name:u,value:d,form:l,bubbleInput:f,setBubbleInput:p}=ol(pv,e),g=ce(n,p),y=Bs(s),b=mo(r);h.useEffect(()=>{const x=f;if(!x)return;const w=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(w,"checked").set,P=!o.current;if(y!==s&&C){const E=new Event("click",{bubbles:P});x.indeterminate=cn(s),C.call(x,cn(s)?!1:s),x.dispatchEvent(E)}},[f,y,s,o]);const v=h.useRef(cn(s)?!1:s);return m.jsx(T.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??v.current,required:i,disabled:c,name:u,value:d,form:l,...t,tabIndex:-1,ref:g,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});gv.displayName=pv;function tN(e){return typeof e=="function"}function cn(e){return e==="indeterminate"}function vv(e){return cn(e)?"indeterminate":e?"checked":"unchecked"}function nN({className:e,...t}){return m.jsx(fv,{"data-slot":"checkbox",className:T.cn("peer data-[state=checked]:bg-secondary data-[state=checked]:text-icon-accent-marketing data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border border-subtle transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:border-subtle disabled:data-[state=checked]:opacity-50",e),...t,children:m.jsx(mv,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:m.jsx(ke.CheckIcon,{className:"size-3.5"})})})}var Va="rovingFocusGroup.onEntryFocus",rN={bubbles:!1,cancelable:!0},bo="RovingFocusGroup",[Ai,yv,oN]=yo(bo),[sN,yn]=Ne(bo,[oN]),[aN,iN]=sN(bo),bv=h.forwardRef((e,t)=>m.jsx(Ai.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Ai.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(cN,{...e,ref:t})})}));bv.displayName=bo;var cN=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...l}=e,f=h.useRef(null),p=ce(t,f),g=vn(s),[y,b]=Ge({prop:a,defaultProp:i??null,onChange:c,caller:bo}),[v,x]=h.useState(!1),w=Ue(u),M=yv(n),C=h.useRef(!1),[P,E]=h.useState(0);return h.useEffect(()=>{const D=f.current;if(D)return D.addEventListener(Va,w),()=>D.removeEventListener(Va,w)},[w]),m.jsx(aN,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:y,onItemFocus:h.useCallback(D=>b(D),[b]),onItemShiftTab:h.useCallback(()=>x(!0),[]),onFocusableItemAdd:h.useCallback(()=>E(D=>D+1),[]),onFocusableItemRemove:h.useCallback(()=>E(D=>D-1),[]),children:m.jsx(T.Primitive.div,{tabIndex:v||P===0?-1:0,"data-orientation":r,...l,ref:p,style:{outline:"none",...e.style},onMouseDown:$(e.onMouseDown,()=>{C.current=!0}),onFocus:$(e.onFocus,D=>{const R=!C.current;if(D.target===D.currentTarget&&R&&!v){const A=new CustomEvent(Va,rN);if(D.currentTarget.dispatchEvent(A),!A.defaultPrevented){const N=M().filter(B=>B.focusable),H=N.find(B=>B.active),O=N.find(B=>B.id===y),K=[H,O,...N].filter(Boolean).map(B=>B.ref.current);Sv(K,d)}}C.current=!1}),onBlur:$(e.onBlur,()=>x(!1))})})}),xv="RovingFocusGroupItem",wv=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=_e(),u=s||c,d=iN(xv,n),l=d.currentTabStopId===u,f=yv(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:y}=d;return h.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),m.jsx(Ai.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(T.Primitive.span,{tabIndex:l?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:$(e.onMouseDown,b=>{r?d.onItemFocus(u):b.preventDefault()}),onFocus:$(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:$(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const v=dN(b,d.orientation,d.dir);if(v!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=f().filter(M=>M.focusable).map(M=>M.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const M=w.indexOf(b.currentTarget);w=d.loop?fN(w,M+1):w.slice(M+1)}setTimeout(()=>Sv(w))}}),children:typeof a=="function"?a({isCurrentTabStop:l,hasTabStop:y!=null}):a})})});wv.displayName=xv;var lN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uN(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dN(e,t,n){const r=uN(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return lN[r]}function Sv(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function fN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Us=bv,Gs=wv,Oi=["Enter"," "],hN=["ArrowDown","PageUp","Home"],Cv=["ArrowUp","PageDown","End"],mN=[...hN,...Cv],pN={ltr:[...Oi,"ArrowRight"],rtl:[...Oi,"ArrowLeft"]},gN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xo="Menu",[Xr,vN,yN]=yo(xo),[$n,wo]=Ne(xo,[yN,pn,yn]),So=pn(),Mv=yn(),[Ev,bn]=$n(xo),[bN,Co]=$n(xo),Tv=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=So(t),[c,u]=h.useState(null),d=h.useRef(!1),l=Ue(s),f=vn(o);return h.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),m.jsx(po,{...i,children:m.jsx(Ev,{scope:t,open:n,onOpenChange:l,content:c,onContentChange:u,children:m.jsx(bN,{scope:t,onClose:h.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:d,dir:f,modal:a,children:r})})})};Tv.displayName=xo;var xN="MenuAnchor",sl=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=So(n);return m.jsx(go,{...o,...r,ref:t})});sl.displayName=xN;var al="MenuPortal",[wN,Pv]=$n(al,{forceMount:void 0}),Dv=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=bn(al,t);return m.jsx(wN,{scope:t,forceMount:n,children:m.jsx(Ie,{present:n||s.open,children:m.jsx(pr,{asChild:!0,container:o,children:r})})})};Dv.displayName=al;var xt="MenuContent",[SN,il]=$n(xt),Rv=h.forwardRef((e,t)=>{const n=Pv(xt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=bn(xt,e.__scopeMenu),a=Co(xt,e.__scopeMenu);return m.jsx(Xr.Provider,{scope:e.__scopeMenu,children:m.jsx(Ie,{present:r||s.open,children:m.jsx(Xr.Slot,{scope:e.__scopeMenu,children:a.modal?m.jsx(CN,{...o,ref:t}):m.jsx(MN,{...o,ref:t})})})})}),CN=h.forwardRef((e,t)=>{const n=bn(xt,e.__scopeMenu),r=h.useRef(null),o=ce(t,r);return h.useEffect(()=>{const s=r.current;if(s)return Mc(s)},[]),m.jsx(cl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:$(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MN=h.forwardRef((e,t)=>{const n=bn(xt,e.__scopeMenu);return m.jsx(cl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),EN=kn.createSlot("MenuContent.ScrollLock"),cl=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:f,onDismiss:p,disableOutsideScroll:g,...y}=e,b=bn(xt,n),v=Co(xt,n),x=So(n),w=Mv(n),M=vN(n),[C,P]=h.useState(null),E=h.useRef(null),D=ce(t,E,b.onContentChange),R=h.useRef(0),A=h.useRef(""),N=h.useRef(0),H=h.useRef(null),O=h.useRef("right"),U=h.useRef(0),K=g?Ms:h.Fragment,B=g?{as:EN,allowPinchZoom:!0}:void 0,F=_=>{var J,X;const Z=A.current+_,se=M().filter(re=>!re.disabled),k=document.activeElement,L=(J=se.find(re=>re.ref.current===k))==null?void 0:J.textValue,Y=se.map(re=>re.textValue),V=LN(Y,Z,L),Q=(X=se.find(re=>re.textValue===V))==null?void 0:X.ref.current;(function re(he){A.current=he,window.clearTimeout(R.current),he!==""&&(R.current=window.setTimeout(()=>re(""),1e3))})(Z),Q&&setTimeout(()=>Q.focus())};h.useEffect(()=>()=>window.clearTimeout(R.current),[]),Cc();const j=h.useCallback(_=>{var se,k;return O.current===((se=H.current)==null?void 0:se.side)&&$N(_,(k=H.current)==null?void 0:k.area)},[]);return m.jsx(SN,{scope:n,searchRef:A,onItemEnter:h.useCallback(_=>{j(_)&&_.preventDefault()},[j]),onItemLeave:h.useCallback(_=>{var Z;j(_)||((Z=E.current)==null||Z.focus(),P(null))},[j]),onTriggerLeave:h.useCallback(_=>{j(_)&&_.preventDefault()},[j]),pointerGraceTimerRef:N,onPointerGraceIntentChange:h.useCallback(_=>{H.current=_},[]),children:m.jsx(K,{...B,children:m.jsx(Ss,{asChild:!0,trapped:o,onMountAutoFocus:$(s,_=>{var Z;_.preventDefault(),(Z=E.current)==null||Z.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:m.jsx(mr,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:f,onDismiss:p,children:m.jsx(Us,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:P,onEntryFocus:$(c,_=>{v.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(Ls,{role:"menu","aria-orientation":"vertical","data-state":Uv(b.open),"data-radix-menu-content":"",dir:v.dir,...x,...y,ref:D,style:{outline:"none",...y.style},onKeyDown:$(y.onKeyDown,_=>{const se=_.target.closest("[data-radix-menu-content]")===_.currentTarget,k=_.ctrlKey||_.altKey||_.metaKey,L=_.key.length===1;se&&(_.key==="Tab"&&_.preventDefault(),!k&&L&&F(_.key));const Y=E.current;if(_.target!==Y||!mN.includes(_.key))return;_.preventDefault();const Q=M().filter(J=>!J.disabled).map(J=>J.ref.current);Cv.includes(_.key)&&Q.reverse(),IN(Q)}),onBlur:$(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(R.current),A.current="")}),onPointerMove:$(e.onPointerMove,Zr(_=>{const Z=_.target,se=U.current!==_.clientX;if(_.currentTarget.contains(Z)&&se){const k=_.clientX>U.current?"right":"left";O.current=k,U.current=_.clientX}}))})})})})})})});Rv.displayName=xt;var TN="MenuGroup",ll=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(T.Primitive.div,{role:"group",...r,ref:t})});ll.displayName=TN;var PN="MenuLabel",Av=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(T.Primitive.div,{...r,ref:t})});Av.displayName=PN;var ds="MenuItem",of="menu.itemSelect",Ks=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=h.useRef(null),a=Co(ds,e.__scopeMenu),i=il(ds,e.__scopeMenu),c=ce(t,s),u=h.useRef(!1),d=()=>{const l=s.current;if(!n&&l){const f=new CustomEvent(of,{bubbles:!0,cancelable:!0});l.addEventListener(of,p=>r==null?void 0:r(p),{once:!0}),T.dispatchDiscreteCustomEvent(l,f),f.defaultPrevented?u.current=!1:a.onClose()}};return m.jsx(Ov,{...o,ref:c,disabled:n,onClick:$(e.onClick,d),onPointerDown:l=>{var f;(f=e.onPointerDown)==null||f.call(e,l),u.current=!0},onPointerUp:$(e.onPointerUp,l=>{var f;u.current||(f=l.currentTarget)==null||f.click()}),onKeyDown:$(e.onKeyDown,l=>{const f=i.searchRef.current!=="";n||f&&l.key===" "||Oi.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});Ks.displayName=ds;var Ov=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=il(ds,n),i=Mv(n),c=h.useRef(null),u=ce(t,c),[d,l]=h.useState(!1),[f,p]=h.useState("");return h.useEffect(()=>{const g=c.current;g&&p((g.textContent??"").trim())},[s.children]),m.jsx(Xr.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:m.jsx(Gs,{asChild:!0,...i,focusable:!r,children:m.jsx(T.Primitive.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:$(e.onPointerMove,Zr(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$(e.onPointerLeave,Zr(g=>a.onItemLeave(g))),onFocus:$(e.onFocus,()=>l(!0)),onBlur:$(e.onBlur,()=>l(!1))})})})}),DN="MenuCheckboxItem",kv=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(Lv,{scope:e.__scopeMenu,checked:n,children:m.jsx(Ks,{role:"menuitemcheckbox","aria-checked":fs(n)?"mixed":n,...o,ref:t,"data-state":fl(n),onSelect:$(o.onSelect,()=>r==null?void 0:r(fs(n)?!0:!n),{checkForDefaultPrevented:!1})})})});kv.displayName=DN;var Nv="MenuRadioGroup",[RN,AN]=$n(Nv,{value:void 0,onValueChange:()=>{}}),_v=h.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ue(r);return m.jsx(RN,{scope:e.__scopeMenu,value:n,onValueChange:s,children:m.jsx(ll,{...o,ref:t})})});_v.displayName=Nv;var Iv="MenuRadioItem",jv=h.forwardRef((e,t)=>{const{value:n,...r}=e,o=AN(Iv,e.__scopeMenu),s=n===o.value;return m.jsx(Lv,{scope:e.__scopeMenu,checked:s,children:m.jsx(Ks,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":fl(s),onSelect:$(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});jv.displayName=Iv;var ul="MenuItemIndicator",[Lv,ON]=$n(ul,{checked:!1}),Fv=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=ON(ul,n);return m.jsx(Ie,{present:r||fs(s.checked)||s.checked===!0,children:m.jsx(T.Primitive.span,{...o,ref:t,"data-state":fl(s.checked)})})});Fv.displayName=ul;var kN="MenuSeparator",$v=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(T.Primitive.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});$v.displayName=kN;var NN="MenuArrow",Bv=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=So(n);return m.jsx(Fs,{...o,...r,ref:t})});Bv.displayName=NN;var dl="MenuSub",[_N,Vv]=$n(dl),Wv=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=bn(dl,t),a=So(t),[i,c]=h.useState(null),[u,d]=h.useState(null),l=Ue(o);return h.useEffect(()=>(s.open===!1&&l(!1),()=>l(!1)),[s.open,l]),m.jsx(po,{...a,children:m.jsx(Ev,{scope:t,open:r,onOpenChange:l,content:u,onContentChange:d,children:m.jsx(_N,{scope:t,contentId:_e(),triggerId:_e(),trigger:i,onTriggerChange:c,children:n})})})};Wv.displayName=dl;var Or="MenuSubTrigger",Hv=h.forwardRef((e,t)=>{const n=bn(Or,e.__scopeMenu),r=Co(Or,e.__scopeMenu),o=Vv(Or,e.__scopeMenu),s=il(Or,e.__scopeMenu),a=h.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const l=i.current;return()=>{window.clearTimeout(l),c(null)}},[i,c]),m.jsx(sl,{asChild:!0,...u,children:m.jsx(Ov,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Uv(n.open),...e,ref:un(t,o.onTriggerChange),onClick:l=>{var f;(f=e.onClick)==null||f.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:$(e.onPointerMove,Zr(l=>{s.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:$(e.onPointerLeave,Zr(l=>{var p,g;d();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const y=(g=n.content)==null?void 0:g.dataset.side,b=y==="right",v=b?-5:5,x=f[b?"left":"right"],w=f[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:l.clientX+v,y:l.clientY},{x,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x,y:f.bottom}],side:y}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(l),l.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:$(e.onKeyDown,l=>{var p;const f=s.searchRef.current!=="";e.disabled||f&&l.key===" "||pN[r.dir].includes(l.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),l.preventDefault())})})})});Hv.displayName=Or;var zv="MenuSubContent",Yv=h.forwardRef((e,t)=>{const n=Pv(xt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=bn(xt,e.__scopeMenu),a=Co(xt,e.__scopeMenu),i=Vv(zv,e.__scopeMenu),c=h.useRef(null),u=ce(t,c);return m.jsx(Xr.Provider,{scope:e.__scopeMenu,children:m.jsx(Ie,{present:r||s.open,children:m.jsx(Xr.Slot,{scope:e.__scopeMenu,children:m.jsx(cl,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var l;a.isUsingKeyboardRef.current&&((l=c.current)==null||l.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:$(e.onFocusOutside,d=>{d.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:$(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:$(e.onKeyDown,d=>{var p;const l=d.currentTarget.contains(d.target),f=gN[a.dir].includes(d.key);l&&f&&(s.onOpenChange(!1),(p=i.trigger)==null||p.focus(),d.preventDefault())})})})})})});Yv.displayName=zv;function Uv(e){return e?"open":"closed"}function fs(e){return e==="indeterminate"}function fl(e){return fs(e)?"indeterminate":e?"checked":"unchecked"}function IN(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function LN(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=jN(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function FN(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],u=i.x,d=i.y,l=c.x,f=c.y;d>r!=f>r&&n<(l-u)*(r-d)/(f-d)+u&&(o=!o)}return o}function $N(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return FN(n,t)}function Zr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var hl=Tv,ml=sl,pl=Dv,gl=Rv,vl=ll,yl=Av,bl=Ks,xl=kv,wl=_v,Sl=jv,Cl=Fv,Ml=$v,El=Bv,Tl=Wv,Pl=Hv,Dl=Yv,Rl="ContextMenu",[BN]=Ne(Rl,[wo]),tt=wo(),[VN,Gv]=BN(Rl),Kv=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:s=!0}=e,[a,i]=h.useState(!1),c=tt(t),u=Ue(r),d=h.useCallback(l=>{i(l),u(l)},[u]);return m.jsx(VN,{scope:t,open:a,onOpenChange:d,modal:s,children:m.jsx(hl,{...c,dir:o,open:a,onOpenChange:d,modal:s,children:n})})};Kv.displayName=Rl;var qv="ContextMenuTrigger",Xv=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,s=Gv(qv,n),a=tt(n),i=h.useRef({x:0,y:0}),c=h.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),u=h.useRef(0),d=h.useCallback(()=>window.clearTimeout(u.current),[]),l=f=>{i.current={x:f.clientX,y:f.clientY},s.onOpenChange(!0)};return h.useEffect(()=>d,[d]),h.useEffect(()=>void(r&&d()),[r,d]),m.jsxs(m.Fragment,{children:[m.jsx(ml,{...a,virtualRef:c}),m.jsx(T.Primitive.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:$(e.onContextMenu,f=>{d(),l(f),f.preventDefault()}),onPointerDown:r?e.onPointerDown:$(e.onPointerDown,Fo(f=>{d(),u.current=window.setTimeout(()=>l(f),700)})),onPointerMove:r?e.onPointerMove:$(e.onPointerMove,Fo(d)),onPointerCancel:r?e.onPointerCancel:$(e.onPointerCancel,Fo(d)),onPointerUp:r?e.onPointerUp:$(e.onPointerUp,Fo(d))})]})});Xv.displayName=qv;var WN="ContextMenuPortal",Zv=e=>{const{__scopeContextMenu:t,...n}=e,r=tt(t);return m.jsx(pl,{...r,...n})};Zv.displayName=WN;var Qv="ContextMenuContent",Jv=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Gv(Qv,n),s=tt(n),a=h.useRef(!1);return m.jsx(gl,{...s,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{var c;(c=e.onCloseAutoFocus)==null||c.call(e,i),!i.defaultPrevented&&a.current&&i.preventDefault(),a.current=!1},onInteractOutside:i=>{var c;(c=e.onInteractOutside)==null||c.call(e,i),!i.defaultPrevented&&!o.modal&&(a.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jv.displayName=Qv;var HN="ContextMenuGroup",ey=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(vl,{...o,...r,ref:t})});ey.displayName=HN;var zN="ContextMenuLabel",ty=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(yl,{...o,...r,ref:t})});ty.displayName=zN;var YN="ContextMenuItem",ny=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(bl,{...o,...r,ref:t})});ny.displayName=YN;var UN="ContextMenuCheckboxItem",ry=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(xl,{...o,...r,ref:t})});ry.displayName=UN;var GN="ContextMenuRadioGroup",oy=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(wl,{...o,...r,ref:t})});oy.displayName=GN;var KN="ContextMenuRadioItem",sy=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Sl,{...o,...r,ref:t})});sy.displayName=KN;var qN="ContextMenuItemIndicator",ay=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Cl,{...o,...r,ref:t})});ay.displayName=qN;var XN="ContextMenuSeparator",iy=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Ml,{...o,...r,ref:t})});iy.displayName=XN;var ZN="ContextMenuArrow",QN=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(El,{...o,...r,ref:t})});QN.displayName=ZN;var cy="ContextMenuSub",ly=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:s}=e,a=tt(t),[i,c]=Ge({prop:o,defaultProp:s??!1,onChange:r,caller:cy});return m.jsx(Tl,{...a,open:i,onOpenChange:c,children:n})};ly.displayName=cy;var JN="ContextMenuSubTrigger",uy=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Pl,{...o,...r,ref:t})});uy.displayName=JN;var e_="ContextMenuSubContent",dy=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Dl,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});dy.displayName=e_;function Fo(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var t_=Kv,n_=Xv,fy=Zv,r_=Jv,o_=ey,s_=ty,a_=ny,i_=ry,c_=oy,l_=sy,hy=ay,u_=iy,d_=ly,f_=uy,h_=dy;function m_({...e}){return m.jsx(t_,{"data-slot":"context-menu",...e})}function p_({...e}){return m.jsx(n_,{"data-slot":"context-menu-trigger",...e})}function g_({...e}){return m.jsx(o_,{"data-slot":"context-menu-group",...e})}function v_({...e}){return m.jsx(fy,{"data-slot":"context-menu-portal",...e})}function y_({...e}){return m.jsx(d_,{"data-slot":"context-menu-sub",...e})}function b_({...e}){return m.jsx(c_,{"data-slot":"context-menu-radio-group",...e})}function x_({className:e,inset:t,children:n,...r}){return m.jsxs(f_,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,m.jsx(ke.ChevronRightIcon,{className:"ml-auto"})]})}function w_({className:e,...t}){return m.jsx(h_,{"data-slot":"context-menu-sub-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function S_({className:e,...t}){return m.jsx(fy,{children:m.jsx(r_,{"data-slot":"context-menu-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...t})})}function C_({className:e,inset:t,variant:n="default",...r}){return m.jsx(a_,{"data-slot":"context-menu-item","data-inset":t,"data-variant":n,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function M_({className:e,children:t,checked:n,...r}){return m.jsxs(i_,{"data-slot":"context-menu-checkbox-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(hy,{children:m.jsx(ke.CheckIcon,{className:"size-4"})})}),t]})}function E_({className:e,children:t,...n}){return m.jsxs(l_,{"data-slot":"context-menu-radio-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(hy,{children:m.jsx(ke.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function T_({className:e,inset:t,...n}){return m.jsx(s_,{"data-slot":"context-menu-label","data-inset":t,className:T.cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function P_({className:e,...t}){return m.jsx(u_,{"data-slot":"context-menu-separator",className:T.cn("bg-border -mx-1 my-1 h-px",e),...t})}function D_({className:e,...t}){return m.jsx("span",{"data-slot":"context-menu-shortcut",className:T.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}var qs="DropdownMenu",[R_]=Ne(qs,[wo]),nt=wo(),[A_,my]=R_(qs),py=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,c=nt(t),u=h.useRef(null),[d,l]=Ge({prop:o,defaultProp:s??!1,onChange:a,caller:qs});return m.jsx(A_,{scope:t,triggerId:_e(),triggerRef:u,contentId:_e(),open:d,onOpenChange:l,onOpenToggle:h.useCallback(()=>l(f=>!f),[l]),modal:i,children:m.jsx(hl,{...c,open:d,onOpenChange:l,dir:r,modal:i,children:n})})};py.displayName=qs;var gy="DropdownMenuTrigger",vy=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=my(gy,n),a=nt(n);return m.jsx(ml,{asChild:!0,...a,children:m.jsx(T.Primitive.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:un(t,s.triggerRef),onPointerDown:$(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:$(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});vy.displayName=gy;var O_="DropdownMenuPortal",yy=e=>{const{__scopeDropdownMenu:t,...n}=e,r=nt(t);return m.jsx(pl,{...r,...n})};yy.displayName=O_;var by="DropdownMenuContent",xy=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=my(by,n),s=nt(n),a=h.useRef(!1);return m.jsx(gl,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:$(e.onCloseAutoFocus,i=>{var c;a.current||(c=o.triggerRef.current)==null||c.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:$(e.onInteractOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!o.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xy.displayName=by;var k_="DropdownMenuGroup",wy=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(vl,{...o,...r,ref:t})});wy.displayName=k_;var N_="DropdownMenuLabel",Sy=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(yl,{...o,...r,ref:t})});Sy.displayName=N_;var __="DropdownMenuItem",Cy=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(bl,{...o,...r,ref:t})});Cy.displayName=__;var I_="DropdownMenuCheckboxItem",My=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(xl,{...o,...r,ref:t})});My.displayName=I_;var j_="DropdownMenuRadioGroup",Ey=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(wl,{...o,...r,ref:t})});Ey.displayName=j_;var L_="DropdownMenuRadioItem",Ty=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Sl,{...o,...r,ref:t})});Ty.displayName=L_;var F_="DropdownMenuItemIndicator",Py=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Cl,{...o,...r,ref:t})});Py.displayName=F_;var $_="DropdownMenuSeparator",Dy=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Ml,{...o,...r,ref:t})});Dy.displayName=$_;var B_="DropdownMenuArrow",V_=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(El,{...o,...r,ref:t})});V_.displayName=B_;var W_=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=nt(t),[i,c]=Ge({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return m.jsx(Tl,{...a,open:i,onOpenChange:c,children:n})},H_="DropdownMenuSubTrigger",Ry=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Pl,{...o,...r,ref:t})});Ry.displayName=H_;var z_="DropdownMenuSubContent",Ay=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Dl,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ay.displayName=z_;var Y_=py,U_=vy,Oy=yy,G_=xy,K_=wy,q_=Sy,X_=Cy,Z_=My,Q_=Ey,J_=Ty,ky=Py,eI=Dy,tI=W_,nI=Ry,rI=Ay;function oI({...e}){return m.jsx(Y_,{"data-slot":"dropdown-menu",...e})}function sI({...e}){return m.jsx(Oy,{"data-slot":"dropdown-menu-portal",...e})}function aI({...e}){return m.jsx(U_,{"data-slot":"dropdown-menu-trigger",...e})}function iI({className:e,sideOffset:t=4,...n}){return m.jsx(Oy,{children:m.jsx(G_,{"data-slot":"dropdown-menu-content",sideOffset:t,className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function cI({...e}){return m.jsx(K_,{"data-slot":"dropdown-menu-group",...e})}function lI({className:e,inset:t,variant:n="default",...r}){return m.jsx(X_,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function uI({className:e,children:t,checked:n,...r}){return m.jsxs(Z_,{"data-slot":"dropdown-menu-checkbox-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(ky,{children:m.jsx(ke.CheckIcon,{className:"size-4"})})}),t]})}function dI({...e}){return m.jsx(Q_,{"data-slot":"dropdown-menu-radio-group",...e})}function fI({className:e,children:t,...n}){return m.jsxs(J_,{"data-slot":"dropdown-menu-radio-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(ky,{children:m.jsx(ke.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function hI({className:e,inset:t,...n}){return m.jsx(q_,{"data-slot":"dropdown-menu-label","data-inset":t,className:T.cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function mI({className:e,...t}){return m.jsx(eI,{"data-slot":"dropdown-menu-separator",className:T.cn("bg-border -mx-1 my-1 h-px",e),...t})}function pI({className:e,...t}){return m.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:T.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function gI({...e}){return m.jsx(tI,{"data-slot":"dropdown-menu-sub",...e})}function vI({className:e,inset:t,children:n,...r}){return m.jsxs(nI,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,m.jsx(ke.ChevronRightIcon,{className:"ml-auto size-4"})]})}function yI({className:e,...t}){return m.jsx(rI,{"data-slot":"dropdown-menu-sub-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}var Wa,Xs="HoverCard",[Ny]=Ne(Xs,[pn]),Zs=pn(),[bI,Qs]=Ny(Xs),_y=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:s,openDelay:a=700,closeDelay:i=300}=e,c=Zs(t),u=h.useRef(0),d=h.useRef(0),l=h.useRef(!1),f=h.useRef(!1),[p,g]=Ge({prop:r,defaultProp:o??!1,onChange:s,caller:Xs}),y=h.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>g(!0),a)},[a,g]),b=h.useCallback(()=>{clearTimeout(u.current),!l.current&&!f.current&&(d.current=window.setTimeout(()=>g(!1),i))},[i,g]),v=h.useCallback(()=>g(!1),[g]);return h.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),m.jsx(bI,{scope:t,open:p,onOpenChange:g,onOpen:y,onClose:b,onDismiss:v,hasSelectionRef:l,isPointerDownOnContentRef:f,children:m.jsx(po,{...c,children:n})})};_y.displayName=Xs;var Iy="HoverCardTrigger",jy=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Qs(Iy,n),s=Zs(n);return m.jsx(go,{asChild:!0,...s,children:m.jsx(T.Primitive.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:$(e.onPointerEnter,ms(o.onOpen)),onPointerLeave:$(e.onPointerLeave,ms(o.onClose)),onFocus:$(e.onFocus,o.onOpen),onBlur:$(e.onBlur,o.onClose),onTouchStart:$(e.onTouchStart,a=>a.preventDefault())})})});jy.displayName=Iy;var Al="HoverCardPortal",[xI,wI]=Ny(Al,{forceMount:void 0}),Ly=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,s=Qs(Al,t);return m.jsx(xI,{scope:t,forceMount:n,children:m.jsx(Ie,{present:n||s.open,children:m.jsx(pr,{asChild:!0,container:o,children:r})})})};Ly.displayName=Al;var hs="HoverCardContent",Fy=h.forwardRef((e,t)=>{const n=wI(hs,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,s=Qs(hs,e.__scopeHoverCard);return m.jsx(Ie,{present:r||s.open,children:m.jsx(SI,{"data-state":s.open?"open":"closed",...o,onPointerEnter:$(e.onPointerEnter,ms(s.onOpen)),onPointerLeave:$(e.onPointerLeave,ms(s.onClose)),ref:t})})});Fy.displayName=hs;var SI=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,...i}=e,c=Qs(hs,n),u=Zs(n),d=h.useRef(null),l=ce(t,d),[f,p]=h.useState(!1);return h.useEffect(()=>{if(f){const g=document.body;return Wa=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=Wa,g.style.webkitUserSelect=Wa}}},[f]),h.useEffect(()=>{if(d.current){const g=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var b;((b=document.getSelection())==null?void 0:b.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),h.useEffect(()=>{d.current&&EI(d.current).forEach(y=>y.setAttribute("tabindex","-1"))}),m.jsx(mr,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:$(s,g=>{g.preventDefault()}),onDismiss:c.onDismiss,children:m.jsx(Ls,{...u,...i,onPointerDown:$(i.onPointerDown,g=>{g.currentTarget.contains(g.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:l,style:{...i.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),CI="HoverCardArrow",MI=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Zs(n);return m.jsx(Fs,{...o,...r,ref:t})});MI.displayName=CI;function ms(e){return t=>t.pointerType==="touch"?void 0:e()}function EI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var TI=_y,PI=jy,DI=Ly,RI=Fy;function AI({...e}){return m.jsx(TI,{"data-slot":"hover-card",...e})}function OI({...e}){return m.jsx(PI,{"data-slot":"hover-card-trigger",...e})}function kI({className:e,align:t="center",sideOffset:n=4,...r}){return m.jsx(DI,{"data-slot":"hover-card-portal",children:m.jsx(RI,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}var Ol="Radio",[NI,$y]=Ne(Ol),[_I,II]=NI(Ol),By=h.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:a,value:i="on",onCheck:c,form:u,...d}=e,[l,f]=h.useState(null),p=ce(t,b=>f(b)),g=h.useRef(!1),y=l?u||!!l.closest("form"):!0;return m.jsxs(_I,{scope:n,checked:o,disabled:a,children:[m.jsx(T.Primitive.button,{type:"button",role:"radio","aria-checked":o,"data-state":zy(o),"data-disabled":a?"":void 0,disabled:a,value:i,...d,ref:p,onClick:$(e.onClick,b=>{o||c==null||c(),y&&(g.current=b.isPropagationStopped(),g.current||b.stopPropagation())})}),y&&m.jsx(Hy,{control:l,bubbles:!g.current,name:r,value:i,checked:o,required:s,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});By.displayName=Ol;var Vy="RadioIndicator",Wy=h.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=II(Vy,n);return m.jsx(Ie,{present:r||s.checked,children:m.jsx(T.Primitive.span,{"data-state":zy(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});Wy.displayName=Vy;var jI="RadioBubbleInput",Hy=h.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const a=h.useRef(null),i=ce(a,s),c=Bs(n),u=mo(t);return h.useEffect(()=>{const d=a.current;if(!d)return;const l=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==n&&p){const g=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(g)}},[c,n,r]),m.jsx(T.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Hy.displayName=jI;function zy(e){return e?"checked":"unchecked"}var LI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Js="RadioGroup",[FI]=Ne(Js,[yn,$y]),Yy=yn(),Uy=$y(),[$I,BI]=FI(Js),Gy=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:a=!1,disabled:i=!1,orientation:c,dir:u,loop:d=!0,onValueChange:l,...f}=e,p=Yy(n),g=vn(u),[y,b]=Ge({prop:s,defaultProp:o??null,onChange:l,caller:Js});return m.jsx($I,{scope:n,name:r,required:a,disabled:i,value:y,onValueChange:b,children:m.jsx(Us,{asChild:!0,...p,orientation:c,dir:g,loop:d,children:m.jsx(T.Primitive.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:g,...f,ref:t})})})});Gy.displayName=Js;var Ky="RadioGroupItem",qy=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=BI(Ky,n),a=s.disabled||r,i=Yy(n),c=Uy(n),u=h.useRef(null),d=ce(t,u),l=s.value===o.value,f=h.useRef(!1);return h.useEffect(()=>{const p=y=>{LI.includes(y.key)&&(f.current=!0)},g=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),m.jsx(Gs,{asChild:!0,...i,focusable:!a,active:l,children:m.jsx(By,{disabled:a,required:s.required,checked:l,...c,...o,name:s.name,ref:d,onCheck:()=>s.onValueChange(o.value),onKeyDown:$(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:$(o.onFocus,()=>{var p;f.current&&((p=u.current)==null||p.click())})})})});qy.displayName=Ky;var VI="RadioGroupIndicator",Xy=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Uy(n);return m.jsx(Wy,{...o,...r,ref:t})});Xy.displayName=VI;var WI=Gy,HI=qy,zI=Xy;function YI({className:e,...t}){return m.jsx(WI,{"data-slot":"radio-group",className:T.cn("grid gap-3",e),...t})}function UI({className:e,...t}){return m.jsx(HI,{"data-slot":"radio-group-item",className:T.cn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:m.jsx(zI,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:m.jsx(ke.CircleIcon,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function GI(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var kl="ScrollArea",[Zy]=Ne(kl),[KI,wt]=Zy(kl),Qy=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...a}=e,[i,c]=h.useState(null),[u,d]=h.useState(null),[l,f]=h.useState(null),[p,g]=h.useState(null),[y,b]=h.useState(null),[v,x]=h.useState(0),[w,M]=h.useState(0),[C,P]=h.useState(!1),[E,D]=h.useState(!1),R=ce(t,N=>c(N)),A=vn(o);return m.jsx(KI,{scope:n,type:r,dir:A,scrollHideDelay:s,scrollArea:i,viewport:u,onViewportChange:d,content:l,onContentChange:f,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:P,scrollbarY:y,onScrollbarYChange:b,scrollbarYEnabled:E,onScrollbarYEnabledChange:D,onCornerWidthChange:x,onCornerHeightChange:M,children:m.jsx(T.Primitive.div,{dir:A,...a,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});Qy.displayName=kl;var Jy="ScrollAreaViewport",eb=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,a=wt(Jy,n),i=h.useRef(null),c=ce(t,i,a.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(T.Primitive.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});eb.displayName=Jy;var Kt="ScrollAreaScrollbar",tb=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wt(Kt,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=o,i=e.orientation==="horizontal";return h.useEffect(()=>(i?s(!0):a(!0),()=>{i?s(!1):a(!1)}),[i,s,a]),o.type==="hover"?m.jsx(qI,{...r,ref:t,forceMount:n}):o.type==="scroll"?m.jsx(XI,{...r,ref:t,forceMount:n}):o.type==="auto"?m.jsx(nb,{...r,ref:t,forceMount:n}):o.type==="always"?m.jsx(Nl,{...r,ref:t}):null});tb.displayName=Kt;var qI=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wt(Kt,e.__scopeScrollArea),[s,a]=h.useState(!1);return h.useEffect(()=>{const i=o.scrollArea;let c=0;if(i){const u=()=>{window.clearTimeout(c),a(!0)},d=()=>{c=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(Ie,{present:n||s,children:m.jsx(nb,{"data-state":s?"visible":"hidden",...r,ref:t})})}),XI=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wt(Kt,e.__scopeScrollArea),s=e.orientation==="horizontal",a=ta(()=>c("SCROLL_END"),100),[i,c]=GI("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return h.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,o.scrollHideDelay,c]),h.useEffect(()=>{const u=o.viewport,d=s?"scrollLeft":"scrollTop";if(u){let l=u[d];const f=()=>{const p=u[d];l!==p&&(c("SCROLL"),a()),l=p};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[o.viewport,s,c,a]),m.jsx(Ie,{present:n||i!=="hidden",children:m.jsx(Nl,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:$(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:$(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),nb=h.forwardRef((e,t)=>{const n=wt(Kt,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,a]=h.useState(!1),i=e.orientation==="horizontal",c=ta(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(i?u:d)}},10);return cr(n.viewport,c),cr(n.content,c),m.jsx(Ie,{present:r||s,children:m.jsx(Nl,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Nl=h.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=wt(Kt,e.__scopeScrollArea),s=h.useRef(null),a=h.useRef(0),[i,c]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ib(i.viewport,i.content),d={...r,sizes:i,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>s.current=f,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:f=>a.current=f};function l(f,p){return nj(f,a.current,i,p)}return n==="horizontal"?m.jsx(ZI,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const f=o.viewport.scrollLeft,p=sf(f,i,o.dir);s.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=l(f,o.dir))}}):n==="vertical"?m.jsx(QI,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const f=o.viewport.scrollTop,p=sf(f,i);s.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=l(f))}}):null}),ZI=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=wt(Kt,e.__scopeScrollArea),[a,i]=h.useState(),c=h.useRef(null),u=ce(t,c,s.onScrollbarXChange);return h.useEffect(()=>{c.current&&i(getComputedStyle(c.current))},[c]),m.jsx(ob,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ea(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,l)=>{if(s.viewport){const f=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(f),lb(f,l)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:gs(a.paddingLeft),paddingEnd:gs(a.paddingRight)}})}})}),QI=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=wt(Kt,e.__scopeScrollArea),[a,i]=h.useState(),c=h.useRef(null),u=ce(t,c,s.onScrollbarYChange);return h.useEffect(()=>{c.current&&i(getComputedStyle(c.current))},[c]),m.jsx(ob,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ea(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,l)=>{if(s.viewport){const f=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(f),lb(f,l)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:gs(a.paddingTop),paddingEnd:gs(a.paddingBottom)}})}})}),[JI,rb]=Zy(Kt),ob=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:i,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:l,...f}=e,p=wt(Kt,n),[g,y]=h.useState(null),b=ce(t,R=>y(R)),v=h.useRef(null),x=h.useRef(""),w=p.viewport,M=r.content-r.viewport,C=Ue(d),P=Ue(c),E=ta(l,10);function D(R){if(v.current){const A=R.clientX-v.current.left,N=R.clientY-v.current.top;u({x:A,y:N})}}return h.useEffect(()=>{const R=A=>{const N=A.target;(g==null?void 0:g.contains(N))&&C(A,M)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[w,g,M,C]),h.useEffect(P,[r,P]),cr(g,E),cr(p.content,E),m.jsx(JI,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:Ue(s),onThumbPointerUp:Ue(a),onThumbPositionChange:P,onThumbPointerDown:Ue(i),children:m.jsx(T.Primitive.div,{...f,ref:b,style:{position:"absolute",...f.style},onPointerDown:$(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),v.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),D(R))}),onPointerMove:$(e.onPointerMove,D),onPointerUp:$(e.onPointerUp,R=>{const A=R.target;A.hasPointerCapture(R.pointerId)&&A.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),ps="ScrollAreaThumb",sb=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=rb(ps,e.__scopeScrollArea);return m.jsx(Ie,{present:n||o.hasThumb,children:m.jsx(ej,{ref:t,...r})})}),ej=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=wt(ps,n),a=rb(ps,n),{onThumbPositionChange:i}=a,c=ce(t,l=>a.onThumbChange(l)),u=h.useRef(void 0),d=ta(()=>{u.current&&(u.current(),u.current=void 0)},100);return h.useEffect(()=>{const l=s.viewport;if(l){const f=()=>{if(d(),!u.current){const p=rj(l,i);u.current=p,i()}};return i(),l.addEventListener("scroll",f),()=>l.removeEventListener("scroll",f)}},[s.viewport,d,i]),m.jsx(T.Primitive.div,{"data-state":a.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:$(e.onPointerDownCapture,l=>{const p=l.target.getBoundingClientRect(),g=l.clientX-p.left,y=l.clientY-p.top;a.onThumbPointerDown({x:g,y})}),onPointerUp:$(e.onPointerUp,a.onThumbPointerUp)})});sb.displayName=ps;var _l="ScrollAreaCorner",ab=h.forwardRef((e,t)=>{const n=wt(_l,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(tj,{...e,ref:t}):null});ab.displayName=_l;var tj=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=wt(_l,n),[s,a]=h.useState(0),[i,c]=h.useState(0),u=!!(s&&i);return cr(o.scrollbarX,()=>{var l;const d=((l=o.scrollbarX)==null?void 0:l.offsetHeight)||0;o.onCornerHeightChange(d),c(d)}),cr(o.scrollbarY,()=>{var l;const d=((l=o.scrollbarY)==null?void 0:l.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),u?m.jsx(T.Primitive.div,{...r,ref:t,style:{width:s,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function gs(e){return e?parseInt(e,10):0}function ib(e,t){const n=e/t;return isNaN(n)?0:n}function ea(e){const t=ib(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function nj(e,t,n,r="ltr"){const o=ea(n),s=o/2,a=t||s,i=o-a,c=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-i,d=n.content-n.viewport,l=r==="ltr"?[0,d]:[d*-1,0];return cb([c,u],l)(e)}function sf(e,t,n="ltr"){const r=ea(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,a=t.content-t.viewport,i=s-r,c=n==="ltr"?[0,a]:[a*-1,0],u=Gc(e,c);return cb([0,a],[0,i])(u)}function cb(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function lb(e,t){return e>0&&e<t}var rj=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},a=n.left!==s.left,i=n.top!==s.top;(a||i)&&t(),n=s,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function ta(e,t){const n=Ue(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function cr(e,t){const n=Ue(t);mt(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var oj=Qy,sj=eb,aj=ab;function ij({className:e,children:t,...n}){return m.jsxs(oj,{"data-slot":"scroll-area",className:T.cn("relative",e),...n,children:[m.jsx(sj,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),m.jsx(ub,{}),m.jsx(aj,{})]})}function ub({className:e,orientation:t="vertical",...n}){return m.jsx(tb,{"data-slot":"scroll-area-scrollbar",orientation:t,className:T.cn("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:m.jsx(sb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var na="Switch",[cj]=Ne(na),[lj,uj]=cj(na),db=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:a,disabled:i,value:c="on",onCheckedChange:u,form:d,...l}=e,[f,p]=h.useState(null),g=ce(t,w=>p(w)),y=h.useRef(!1),b=f?d||!!f.closest("form"):!0,[v,x]=Ge({prop:o,defaultProp:s??!1,onChange:u,caller:na});return m.jsxs(lj,{scope:n,checked:v,disabled:i,children:[m.jsx(T.Primitive.button,{type:"button",role:"switch","aria-checked":v,"aria-required":a,"data-state":pb(v),"data-disabled":i?"":void 0,disabled:i,value:c,...l,ref:g,onClick:$(e.onClick,w=>{x(M=>!M),b&&(y.current=w.isPropagationStopped(),y.current||w.stopPropagation())})}),b&&m.jsx(mb,{control:f,bubbles:!y.current,name:r,value:c,checked:v,required:a,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});db.displayName=na;var fb="SwitchThumb",hb=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=uj(fb,n);return m.jsx(T.Primitive.span,{"data-state":pb(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});hb.displayName=fb;var dj="SwitchBubbleInput",mb=h.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const a=h.useRef(null),i=ce(a,s),c=Bs(n),u=mo(t);return h.useEffect(()=>{const d=a.current;if(!d)return;const l=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==n&&p){const g=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(g)}},[c,n,r]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});mb.displayName=dj;function pb(e){return e?"checked":"unchecked"}var fj=db,hj=hb;function mj({className:e,...t}){return m.jsx(fj,{"data-slot":"switch",className:T.cn("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:m.jsx(hj,{"data-slot":"switch-thumb",className:T.cn("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}var ra="Tabs",[pj]=Ne(ra,[yn]),gb=yn(),[gj,Il]=pj(ra),vb=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:a="horizontal",dir:i,activationMode:c="automatic",...u}=e,d=vn(i),[l,f]=Ge({prop:r,onChange:o,defaultProp:s??"",caller:ra});return m.jsx(gj,{scope:n,baseId:_e(),value:l,onValueChange:f,orientation:a,dir:d,activationMode:c,children:m.jsx(T.Primitive.div,{dir:d,"data-orientation":a,...u,ref:t})})});vb.displayName=ra;var yb="TabsList",bb=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Il(yb,n),a=gb(n);return m.jsx(Us,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:r,children:m.jsx(T.Primitive.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});bb.displayName=yb;var xb="TabsTrigger",wb=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,a=Il(xb,n),i=gb(n),c=Mb(a.baseId,r),u=Eb(a.baseId,r),d=r===a.value;return m.jsx(Gs,{asChild:!0,...i,focusable:!o,active:d,children:m.jsx(T.Primitive.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...s,ref:t,onMouseDown:$(e.onMouseDown,l=>{!o&&l.button===0&&l.ctrlKey===!1?a.onValueChange(r):l.preventDefault()}),onKeyDown:$(e.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&a.onValueChange(r)}),onFocus:$(e.onFocus,()=>{const l=a.activationMode!=="manual";!d&&!o&&l&&a.onValueChange(r)})})})});wb.displayName=xb;var Sb="TabsContent",Cb=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...a}=e,i=Il(Sb,n),c=Mb(i.baseId,r),u=Eb(i.baseId,r),d=r===i.value,l=h.useRef(d);return h.useEffect(()=>{const f=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(f)},[]),m.jsx(Ie,{present:o||d,children:({present:f})=>m.jsx(T.Primitive.div,{"data-state":d?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:l.current?"0s":void 0},children:f&&s})})});Cb.displayName=Sb;function Mb(e,t){return`${e}-trigger-${t}`}function Eb(e,t){return`${e}-content-${t}`}var vj=vb,yj=bb,bj=wb,xj=Cb;function wj({className:e,...t}){return m.jsx(vj,{"data-slot":"tabs",className:T.cn("flex flex-col gap-2",e),...t})}function Sj({className:e,...t}){return m.jsx(yj,{"data-slot":"tabs-list",className:T.cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Cj({className:e,...t}){return m.jsx(bj,{"data-slot":"tabs-trigger",className:T.cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Mj({className:e,...t}){return m.jsx(xj,{"data-slot":"tabs-content",className:T.cn("flex-1 outline-none",e),...t})}var Ej=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Tj="VisuallyHidden",Tb=h.forwardRef((e,t)=>m.jsx(T.Primitive.span,{...e,ref:t,style:{...Ej,...e.style}}));Tb.displayName=Tj;var Pj=Tb,[oa]=Ne("Tooltip",[pn]),sa=pn(),Pb="TooltipProvider",Dj=700,ki="tooltip.open",[Rj,jl]=oa(Pb),Db=e=>{const{__scopeTooltip:t,delayDuration:n=Dj,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=h.useRef(!0),i=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),m.jsx(Rj,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:h.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:h.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:s})};Db.displayName=Pb;var Qr="Tooltip",[Aj,Mo]=oa(Qr),Rb=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=jl(Qr,e.__scopeTooltip),u=sa(t),[d,l]=h.useState(null),f=_e(),p=h.useRef(0),g=a??c.disableHoverableContent,y=i??c.delayDuration,b=h.useRef(!1),[v,x]=Ge({prop:r,defaultProp:o??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(ki))):c.onClose(),s==null||s(E)},caller:Qr}),w=h.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),M=h.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,x(!0)},[x]),C=h.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),P=h.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,x(!0),p.current=0},y)},[y,x]);return h.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),m.jsx(po,{...u,children:m.jsx(Aj,{scope:t,contentId:f,open:v,stateAttribute:w,trigger:d,onTriggerChange:l,onTriggerEnter:h.useCallback(()=>{c.isOpenDelayedRef.current?P():M()},[c.isOpenDelayedRef,P,M]),onTriggerLeave:h.useCallback(()=>{g?C():(window.clearTimeout(p.current),p.current=0)},[C,g]),onOpen:M,onClose:C,disableHoverableContent:g,children:n})})};Rb.displayName=Qr;var Ni="TooltipTrigger",Ab=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Mo(Ni,n),s=jl(Ni,n),a=sa(n),i=h.useRef(null),c=ce(t,i,o.onTriggerChange),u=h.useRef(!1),d=h.useRef(!1),l=h.useCallback(()=>u.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",l),[l]),m.jsx(go,{asChild:!0,...a,children:m.jsx(T.Primitive.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:$(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:$(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:$(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:$(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:$(e.onBlur,o.onClose),onClick:$(e.onClick,o.onClose)})})});Ab.displayName=Ni;var Ll="TooltipPortal",[Oj,kj]=oa(Ll,{forceMount:void 0}),Ob=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Mo(Ll,t);return m.jsx(Oj,{scope:t,forceMount:n,children:m.jsx(Ie,{present:n||s.open,children:m.jsx(pr,{asChild:!0,container:o,children:r})})})};Ob.displayName=Ll;var lr="TooltipContent",kb=h.forwardRef((e,t)=>{const n=kj(lr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=Mo(lr,e.__scopeTooltip);return m.jsx(Ie,{present:r||a.open,children:a.disableHoverableContent?m.jsx(Nb,{side:o,...s,ref:t}):m.jsx(Nj,{side:o,...s,ref:t})})}),Nj=h.forwardRef((e,t)=>{const n=Mo(lr,e.__scopeTooltip),r=jl(lr,e.__scopeTooltip),o=h.useRef(null),s=ce(t,o),[a,i]=h.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:l}=r,f=h.useCallback(()=>{i(null),l(!1)},[l]),p=h.useCallback((g,y)=>{const b=g.currentTarget,v={x:g.clientX,y:g.clientY},x=Lj(v,b.getBoundingClientRect()),w=Fj(v,x),M=$j(y.getBoundingClientRect()),C=Vj([...w,...M]);i(C),l(!0)},[l]);return h.useEffect(()=>()=>f(),[f]),h.useEffect(()=>{if(c&&d){const g=b=>p(b,d),y=b=>p(b,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",y)}}},[c,d,p,f]),h.useEffect(()=>{if(a){const g=y=>{const b=y.target,v={x:y.clientX,y:y.clientY},x=(c==null?void 0:c.contains(b))||(d==null?void 0:d.contains(b)),w=!Bj(v,a);x?f():w&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,a,u,f]),m.jsx(Nb,{...e,ref:s})}),[_j,Ij]=oa(Qr,{isInside:!1}),jj=kn.createSlottable("TooltipContent"),Nb=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=Mo(lr,n),u=sa(n),{onClose:d}=c;return h.useEffect(()=>(document.addEventListener(ki,d),()=>document.removeEventListener(ki,d)),[d]),h.useEffect(()=>{if(c.trigger){const l=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",l,{capture:!0}),()=>window.removeEventListener("scroll",l,{capture:!0})}},[c.trigger,d]),m.jsx(mr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l=>l.preventDefault(),onDismiss:d,children:m.jsxs(Ls,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(jj,{children:r}),m.jsx(_j,{scope:n,isInside:!0,children:m.jsx(Pj,{id:c.contentId,role:"tooltip",children:o||r})})]})})});kb.displayName=lr;var _b="TooltipArrow",Ib=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=sa(n);return Ij(_b,n).isInside?null:m.jsx(Fs,{...o,...r,ref:t})});Ib.displayName=_b;function Lj(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Fj(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function $j(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Bj(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],u=i.x,d=i.y,l=c.x,f=c.y;d>r!=f>r&&n<(l-u)*(r-d)/(f-d)+u&&(o=!o)}return o}function Vj(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Wj(t)}function Wj(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Hj=Db,zj=Rb,Yj=Ab,Uj=Ob,Gj=kb,Kj=Ib;function jb({delayDuration:e=0,...t}){return m.jsx(Hj,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function qj({...e}){return m.jsx(jb,{children:m.jsx(zj,{"data-slot":"tooltip",...e})})}function Xj({...e}){return m.jsx(Yj,{"data-slot":"tooltip-trigger",...e})}function Zj({className:e,sideOffset:t=0,children:n,...r}){return m.jsx(Uj,{children:m.jsxs(Gj,{"data-slot":"tooltip-content",sideOffset:t,className:T.cn("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,m.jsx(Kj,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function Qj(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Lb=S.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Eo=()=>{const e=S.useContext(Lb);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Qj(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
92
|
+
[data-state=closed]
|
|
93
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function Jj(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function eL(){return Fl(/^Mac/)}function tL(){return Fl(/^iPhone/)}function af(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function nL(){return Fl(/^iPad/)||eL()&&navigator.maxTouchPoints>1}function Fb(){return tL()||nL()}function Fl(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const rL=24,oL=typeof window<"u"?S.useLayoutEffect:S.useEffect;function cf(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Ha=typeof document<"u"&&window.visualViewport;function lf(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function $b(e){for(lf(e)&&(e=e.parentElement);e&&!lf(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const sL=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let $o=0,za;function aL(e={}){let{isDisabled:t}=e;oL(()=>{if(!t)return $o++,$o===1&&Fb()&&(za=iL()),()=>{$o--,$o===0&&(za==null||za())}},[t])}function iL(){let e,t=0,n=l=>{e=$b(l.target),!(e===document.documentElement&&e===document.body)&&(t=l.changedTouches[0].pageY)},r=l=>{if(!e||e===document.documentElement||e===document.body){l.preventDefault();return}let f=l.changedTouches[0].pageY,p=e.scrollTop,g=e.scrollHeight-e.clientHeight;g!==0&&((p<=0&&f>t||p>=g&&f<t)&&l.preventDefault(),t=f)},o=l=>{let f=l.target;_i(f)&&f!==document.activeElement&&(l.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},s=l=>{let f=l.target;_i(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",Ha&&(Ha.height<window.innerHeight?requestAnimationFrame(()=>{uf(f)}):Ha.addEventListener("resize",()=>uf(f),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},i=window.pageXOffset,c=window.pageYOffset,u=cf(cL(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=cf(Tr(document,"touchstart",n,{passive:!1,capture:!0}),Tr(document,"touchmove",r,{passive:!1,capture:!0}),Tr(document,"touchend",o,{passive:!1,capture:!0}),Tr(document,"focus",s,!0),Tr(window,"scroll",a));return()=>{u(),d(),window.scrollTo(i,c)}}function cL(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Tr(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function uf(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=$b(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,s=e.getBoundingClientRect().bottom;const a=n.getBoundingClientRect().bottom+rL;s>a&&(n.scrollTop+=o-r)}e=n.parentElement}}function _i(e){return e instanceof HTMLInputElement&&!sL.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function lL(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function uL(...e){return t=>e.forEach(n=>lL(n,t))}function Bb(...e){return h.useCallback(uL(...e),e)}const Vb=new WeakMap;function Ye(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,s])=>{if(o.startsWith("--")){e.style.setProperty(o,s);return}r[o]=e.style[o],e.style[o]=s}),!n&&Vb.set(e,r)}function dL(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Vb.get(e);n&&(e.style[t]=n[t])}const Be=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Bo(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Be(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Be(t)?5:4]):null)}function fL(e){return 8*(Math.log(e+1)-2)}function Ya(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function hL(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Pe={DURATION:.5,EASE:[.32,.72,0,1]},Wb=.4,mL=.25,pL=100,Hb=8,Mn=16,Ii=26,Ua="vaul-dragging";function zb(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function gL({defaultProp:e,onChange:t}){const n=S.useState(e),[r]=n,o=S.useRef(r),s=zb(t);return S.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}function Yb({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=gL({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:r,i=zb(n),c=S.useCallback(u=>{if(s){const l=typeof u=="function"?u(e):u;l!==e&&i(l)}else o(u)},[s,e,o,i]);return[a,c]}function vL({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:s,onSnapPointChange:a,direction:i="bottom",container:c,snapToSequentialPoint:u}){const[d,l]=Yb({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[f,p]=S.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);S.useEffect(()=>{function E(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);const g=S.useMemo(()=>d===(n==null?void 0:n[n.length-1])||null,[n,d]),y=S.useMemo(()=>{var E;return(E=n==null?void 0:n.findIndex(D=>D===d))!=null?E:null},[n,d]),b=n&&n.length>0&&(s||s===0)&&!Number.isNaN(s)&&n[s]===d||!n,v=S.useMemo(()=>{const E=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var D;return(D=n==null?void 0:n.map(R=>{const A=typeof R=="string";let N=0;if(A&&(N=parseInt(R,10)),Be(i)){const O=A?N:f?R*E.height:0;return f?i==="bottom"?E.height-O:-E.height+O:O}const H=A?N:f?R*E.width:0;return f?i==="right"?E.width-H:-E.width+H:H}))!=null?D:[]},[n,f,c]),x=S.useMemo(()=>y!==null?v==null?void 0:v[y]:null,[v,y]),w=S.useCallback(E=>{var D;const R=(D=v==null?void 0:v.findIndex(A=>A===E))!=null?D:null;a(R),Ye(r.current,{transition:`transform ${Pe.DURATION}s cubic-bezier(${Pe.EASE.join(",")})`,transform:Be(i)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`}),v&&R!==v.length-1&&s!==void 0&&R!==s&&R<s?Ye(o.current,{transition:`opacity ${Pe.DURATION}s cubic-bezier(${Pe.EASE.join(",")})`,opacity:"0"}):Ye(o.current,{transition:`opacity ${Pe.DURATION}s cubic-bezier(${Pe.EASE.join(",")})`,opacity:"1"}),l(n==null?void 0:n[Math.max(R,0)])},[r.current,n,v,s,o,l]);S.useEffect(()=>{if(d||e){var E;const D=(E=n==null?void 0:n.findIndex(R=>R===e||R===d))!=null?E:-1;v&&D!==-1&&typeof v[D]=="number"&&w(v[D])}},[d,e,n,v,w]);function M({draggedDistance:E,closeDrawer:D,velocity:R,dismissible:A}){if(s===void 0)return;const N=i==="bottom"||i==="right"?(x??0)-E:(x??0)+E,H=y===s-1,O=y===0,U=E>0;if(H&&Ye(o.current,{transition:`opacity ${Pe.DURATION}s cubic-bezier(${Pe.EASE.join(",")})`}),!u&&R>2&&!U){A?D():w(v[0]);return}if(!u&&R>2&&U&&v&&n){w(v[n.length-1]);return}const K=v==null?void 0:v.reduce((F,j)=>typeof F!="number"||typeof j!="number"?F:Math.abs(j-N)<Math.abs(F-N)?j:F),B=Be(i)?window.innerHeight:window.innerWidth;if(R>Wb&&Math.abs(E)<B*.4){const F=U?1:-1;if(F>0&&g&&n){w(v[n.length-1]);return}if(O&&F<0&&A&&D(),y===null)return;w(v[y+F]);return}w(K)}function C({draggedDistance:E}){if(x===null)return;const D=i==="bottom"||i==="right"?x-E:x+E;(i==="bottom"||i==="right")&&D<v[v.length-1]||(i==="top"||i==="left")&&D>v[v.length-1]||Ye(r.current,{transform:Be(i)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`})}function P(E,D){if(!n||typeof y!="number"||!v||s===void 0)return null;const R=y===s-1;if(y>=s&&D)return 0;if(R&&!D)return 1;if(!b&&!R)return null;const N=R?y+1:y-1,H=R?v[N]-v[N-1]:v[N+1]-v[N],O=E/Math.abs(H);return R?1-O:O}return{isLastSnapPoint:g,activeSnapPoint:d,shouldFade:b,getPercentageDragged:P,setActiveSnapPoint:l,activeSnapPointIndex:y,onRelease:M,onDrag:C,snapPointsOffset:v}}const yL=()=>()=>{};function bL(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Eo(),s=S.useRef(null),a=S.useMemo(()=>document.body.style.backgroundColor,[]);function i(){return(window.innerWidth-Ii)/window.innerWidth}S.useEffect(()=>{if(t&&n){s.current&&clearTimeout(s.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;hL(r&&!o?Ya(document.body,{background:"black"}):yL,Ya(c,{transformOrigin:Be(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Pe.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Pe.EASE.join(",")})`}));const u=Ya(c,{borderRadius:`${Hb}px`,overflow:"hidden",...Be(e)?{transform:`scale(${i()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${i()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),s.current=window.setTimeout(()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")},Pe.DURATION*1e3)}}},[t,n,a])}let Pr=null;function xL({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:s}){const[a,i]=S.useState(()=>typeof window<"u"?window.location.href:""),c=S.useRef(0),u=S.useCallback(()=>{if(af()&&Pr===null&&e&&!s){Pr={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:l,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-l}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=f-window.innerHeight;p&&c.current>=f&&(document.body.style.top=`${-(c.current+p)}px`)}),300)}},[e]),d=S.useCallback(()=>{if(af()&&Pr!==null&&!s){const l=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Pr),window.requestAnimationFrame(()=>{if(o&&a!==window.location.href){i(window.location.href);return}window.scrollTo(f,l)}),Pr=null}},[a]);return S.useEffect(()=>{function l(){c.current=window.scrollY}return l(),window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[]),S.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[t,d]),S.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,a,t,n,u,d]),{restorePositionSetting:d}}function wL({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:s,shouldScaleBackground:a=!1,setBackgroundColorOnScale:i=!0,closeThreshold:c=mL,scrollLockTimeout:u=pL,dismissible:d=!0,handleOnly:l=!1,fadeFromIndex:f=s&&s.length-1,activeSnapPoint:p,setActiveSnapPoint:g,fixed:y,modal:b=!0,onClose:v,nested:x,noBodyStyles:w=!1,direction:M="bottom",defaultOpen:C=!1,disablePreventScroll:P=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:D=!1,repositionInputs:R=!0,onAnimationEnd:A,container:N,autoFocus:H=!1}){var O,U;const[K=!1,B]=Yb({defaultProp:C,prop:e,onChange:W=>{t==null||t(W),!W&&!x&&Ze(),setTimeout(()=>{A==null||A(W)},Pe.DURATION*1e3),W&&!b&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),W||(document.body.style.pointerEvents="auto")}}),[F,j]=S.useState(!1),[_,Z]=S.useState(!1),[se,k]=S.useState(!1),L=S.useRef(null),Y=S.useRef(null),V=S.useRef(null),Q=S.useRef(null),J=S.useRef(null),X=S.useRef(!1),re=S.useRef(null),he=S.useRef(0),le=S.useRef(!1),G=S.useRef(!C),ue=S.useRef(0),I=S.useRef(null),te=S.useRef(((O=I.current)==null?void 0:O.getBoundingClientRect().height)||0),me=S.useRef(((U=I.current)==null?void 0:U.getBoundingClientRect().width)||0),pe=S.useRef(0),xe=S.useCallback(W=>{s&&W===Me.length-1&&(Y.current=new Date)},[]),{activeSnapPoint:ae,activeSnapPointIndex:ve,setActiveSnapPoint:Xe,onRelease:ge,snapPointsOffset:Me,onDrag:Le,shouldFade:Ke,getPercentageDragged:He}=vL({snapPoints:s,activeSnapPointProp:p,setActiveSnapPointProp:g,drawerRef:I,fadeFromIndex:f,overlayRef:L,onSnapPointChange:xe,direction:M,container:N,snapToSequentialPoint:E});aL({isDisabled:!K||_||!b||se||!F||!R||!P});const{restorePositionSetting:Ze}=xL({isOpen:K,modal:b,nested:x??!1,hasBeenOpened:F,preventScrollRestoration:D,noBodyStyles:w});function st(){return(window.innerWidth-Ii)/window.innerWidth}function at(W){var ne,q;!d&&!s||I.current&&!I.current.contains(W.target)||(te.current=((ne=I.current)==null?void 0:ne.getBoundingClientRect().height)||0,me.current=((q=I.current)==null?void 0:q.getBoundingClientRect().width)||0,Z(!0),V.current=new Date,Fb()&&window.addEventListener("touchend",()=>X.current=!1,{once:!0}),W.target.setPointerCapture(W.pointerId),he.current=Be(M)?W.pageY:W.pageX)}function Fe(W,ne){var q;let ee=W;const de=(q=window.getSelection())==null?void 0:q.toString(),z=I.current?Bo(I.current,M):null,fe=new Date;if(ee.tagName==="SELECT"||ee.hasAttribute("data-vaul-no-drag")||ee.closest("[data-vaul-no-drag]"))return!1;if(M==="right"||M==="left")return!0;if(Y.current&&fe.getTime()-Y.current.getTime()<500)return!1;if(z!==null&&(M==="bottom"?z>0:z<0))return!0;if(de&&de.length>0)return!1;if(J.current&&fe.getTime()-J.current.getTime()<u&&z===0||ne)return J.current=fe,!1;for(;ee;){if(ee.scrollHeight>ee.clientHeight){if(ee.scrollTop!==0)return J.current=new Date,!1;if(ee.getAttribute("role")==="dialog")return!0}ee=ee.parentNode}return!0}function gt(W){if(I.current&&_){const ne=M==="bottom"||M==="right"?1:-1,q=(he.current-(Be(M)?W.pageY:W.pageX))*ne,ee=q>0,de=s&&!d&&!ee;if(de&&ve===0)return;const z=Math.abs(q),fe=document.querySelector("[data-vaul-drawer-wrapper]"),ye=M==="bottom"||M==="top"?te.current:me.current;let we=z/ye;const Qe=He(z,ee);if(Qe!==null&&(we=Qe),de&&we>=1||!X.current&&!Fe(W.target,ee))return;if(I.current.classList.add(Ua),X.current=!0,Ye(I.current,{transition:"none"}),Ye(L.current,{transition:"none"}),s&&Le({draggedDistance:q}),ee&&!s){const Te=fL(q),Xt=Math.min(Te*-1,0)*ne;Ye(I.current,{transform:Be(M)?`translate3d(0, ${Xt}px, 0)`:`translate3d(${Xt}px, 0, 0)`});return}const be=1-we;if((Ke||f&&ve===f-1)&&(r==null||r(W,we),Ye(L.current,{opacity:`${be}`,transition:"none"},!0)),fe&&L.current&&a){const Te=Math.min(st()+we*(1-st()),1),Xt=8-we*8,it=Math.max(0,14-we*14);Ye(fe,{borderRadius:`${Xt}px`,transform:Be(M)?`scale(${Te}) translate3d(0, ${it}px, 0)`:`scale(${Te}) translate3d(${it}px, 0, 0)`,transition:"none"},!0)}if(!s){const Te=z*ne;Ye(I.current,{transform:Be(M)?`translate3d(0, ${Te}px, 0)`:`translate3d(${Te}px, 0, 0)`})}}}S.useEffect(()=>{window.requestAnimationFrame(()=>{G.current=!0})},[]),S.useEffect(()=>{var W;function ne(){if(!I.current||!R)return;const q=document.activeElement;if(_i(q)||le.current){var ee;const de=((ee=window.visualViewport)==null?void 0:ee.height)||0,z=window.innerHeight;let fe=z-de;const ye=I.current.getBoundingClientRect().height||0,we=ye>z*.8;pe.current||(pe.current=ye);const Qe=I.current.getBoundingClientRect().top;if(Math.abs(ue.current-fe)>60&&(le.current=!le.current),s&&s.length>0&&Me&&ve){const be=Me[ve]||0;fe+=be}if(ue.current=fe,ye>de||le.current){const be=I.current.getBoundingClientRect().height;let Te=be;be>de&&(Te=de-(we?Qe:Ii)),y?I.current.style.height=`${be-Math.max(fe,0)}px`:I.current.style.height=`${Math.max(Te,de-Qe)}px`}else Jj()||(I.current.style.height=`${pe.current}px`);s&&s.length>0&&!le.current?I.current.style.bottom="0px":I.current.style.bottom=`${Math.max(fe,0)}px`}}return(W=window.visualViewport)==null||W.addEventListener("resize",ne),()=>{var q;return(q=window.visualViewport)==null?void 0:q.removeEventListener("resize",ne)}},[ve,s,Me]);function $e(W){St(),v==null||v(),W||B(!1),setTimeout(()=>{s&&Xe(s[0])},Pe.DURATION*1e3)}function ze(){if(!I.current)return;const W=document.querySelector("[data-vaul-drawer-wrapper]"),ne=Bo(I.current,M);Ye(I.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Pe.DURATION}s cubic-bezier(${Pe.EASE.join(",")})`}),Ye(L.current,{transition:`opacity ${Pe.DURATION}s cubic-bezier(${Pe.EASE.join(",")})`,opacity:"1"}),a&&ne&&ne>0&&K&&Ye(W,{borderRadius:`${Hb}px`,overflow:"hidden",...Be(M)?{transform:`scale(${st()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${st()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Pe.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Pe.EASE.join(",")})`},!0)}function St(){!_||!I.current||(I.current.classList.remove(Ua),X.current=!1,Z(!1),Q.current=new Date)}function It(W){if(!_||!I.current)return;I.current.classList.remove(Ua),X.current=!1,Z(!1),Q.current=new Date;const ne=Bo(I.current,M);if(!W||!Fe(W.target,!1)||!ne||Number.isNaN(ne)||V.current===null)return;const q=Q.current.getTime()-V.current.getTime(),ee=he.current-(Be(M)?W.pageY:W.pageX),de=Math.abs(ee)/q;if(de>.05&&(k(!0),setTimeout(()=>{k(!1)},200)),s){ge({draggedDistance:ee*(M==="bottom"||M==="right"?1:-1),closeDrawer:$e,velocity:de,dismissible:d}),o==null||o(W,!0);return}if(M==="bottom"||M==="right"?ee>0:ee<0){ze(),o==null||o(W,!0);return}if(de>Wb){$e(),o==null||o(W,!1);return}var z;const fe=Math.min((z=I.current.getBoundingClientRect().height)!=null?z:0,window.innerHeight);var ye;const we=Math.min((ye=I.current.getBoundingClientRect().width)!=null?ye:0,window.innerWidth),Qe=M==="left"||M==="right";if(Math.abs(ne)>=(Qe?we:fe)*c){$e(),o==null||o(W,!1);return}o==null||o(W,!0),ze()}S.useEffect(()=>(K&&(Ye(document.documentElement,{scrollBehavior:"auto"}),Y.current=new Date),()=>{dL(document.documentElement,"scrollBehavior")}),[K]);function qt(W){const ne=W?(window.innerWidth-Mn)/window.innerWidth:1,q=W?-Mn:0;re.current&&window.clearTimeout(re.current),Ye(I.current,{transition:`transform ${Pe.DURATION}s cubic-bezier(${Pe.EASE.join(",")})`,transform:Be(M)?`scale(${ne}) translate3d(0, ${q}px, 0)`:`scale(${ne}) translate3d(${q}px, 0, 0)`}),!W&&I.current&&(re.current=setTimeout(()=>{const ee=Bo(I.current,M);Ye(I.current,{transition:"none",transform:Be(M)?`translate3d(0, ${ee}px, 0)`:`translate3d(${ee}px, 0, 0)`})},500))}function wn(W,ne){if(ne<0)return;const q=(window.innerWidth-Mn)/window.innerWidth,ee=q+ne*(1-q),de=-Mn+ne*Mn;Ye(I.current,{transform:Be(M)?`scale(${ee}) translate3d(0, ${de}px, 0)`:`scale(${ee}) translate3d(${de}px, 0, 0)`,transition:"none"})}function jt(W,ne){const q=Be(M)?window.innerHeight:window.innerWidth,ee=ne?(q-Mn)/q:1,de=ne?-Mn:0;ne&&Ye(I.current,{transition:`transform ${Pe.DURATION}s cubic-bezier(${Pe.EASE.join(",")})`,transform:Be(M)?`scale(${ee}) translate3d(0, ${de}px, 0)`:`scale(${ee}) translate3d(${de}px, 0, 0)`})}return S.useEffect(()=>{b||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[b]),S.createElement(ro,{defaultOpen:C,onOpenChange:W=>{!d&&!W||(W?j(!0):$e(!0),B(W))},open:K},S.createElement(Lb.Provider,{value:{activeSnapPoint:ae,snapPoints:s,setActiveSnapPoint:Xe,drawerRef:I,overlayRef:L,onOpenChange:t,onPress:at,onRelease:It,onDrag:gt,dismissible:d,shouldAnimate:G,handleOnly:l,isOpen:K,isDragging:_,shouldFade:Ke,closeDrawer:$e,onNestedDrag:wn,onNestedOpenChange:qt,onNestedRelease:jt,keyboardIsOpen:le,modal:b,snapPointsOffset:Me,activeSnapPointIndex:ve,direction:M,shouldScaleBackground:a,setBackgroundColorOnScale:i,noBodyStyles:w,container:N,autoFocus:H}},n))}const Ub=S.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:s,isOpen:a,modal:i,shouldAnimate:c}=Eo(),u=Bb(t,n),d=r&&r.length>0;if(!i)return null;const l=S.useCallback(f=>o(f),[o]);return S.createElement(so,{onMouseUp:l,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":a&&d?"true":"false","data-vaul-snap-points-overlay":a&&s?"true":"false","data-vaul-animate":c!=null&&c.current?"true":"false",...e})});Ub.displayName="Drawer.Overlay";const Gb=S.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:s,onPress:a,onRelease:i,onDrag:c,keyboardIsOpen:u,snapPointsOffset:d,activeSnapPointIndex:l,modal:f,isOpen:p,direction:g,snapPoints:y,container:b,handleOnly:v,shouldAnimate:x,autoFocus:w}=Eo(),[M,C]=S.useState(!1),P=Bb(o,s),E=S.useRef(null),D=S.useRef(null),R=S.useRef(!1),A=y&&y.length>0;bL();const N=(O,U,K=0)=>{if(R.current)return!0;const B=Math.abs(O.y),F=Math.abs(O.x),j=F>B,_=["bottom","right"].includes(U)?1:-1;if(U==="left"||U==="right"){if(!(O.x*_<0)&&F>=0&&F<=K)return j}else if(!(O.y*_<0)&&B>=0&&B<=K)return!j;return R.current=!0,!0};S.useEffect(()=>{A&&window.requestAnimationFrame(()=>{C(!0)})},[]);function H(O){E.current=null,R.current=!1,i(O)}return S.createElement(ao,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":M?"true":"false","data-vaul-snap-points":p&&A?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":x!=null&&x.current?"true":"false",...r,ref:P,style:d&&d.length>0?{"--snap-point-height":`${d[l??0]}px`,...t}:t,onPointerDown:O=>{v||(r.onPointerDown==null||r.onPointerDown.call(r,O),E.current={x:O.pageX,y:O.pageY},a(O))},onOpenAutoFocus:O=>{n==null||n(O),w||O.preventDefault()},onPointerDownOutside:O=>{if(e==null||e(O),!f||O.defaultPrevented){O.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:O=>{if(!f){O.preventDefault();return}},onPointerMove:O=>{if(D.current=O,v||(r.onPointerMove==null||r.onPointerMove.call(r,O),!E.current))return;const U=O.pageY-E.current.y,K=O.pageX-E.current.x,B=O.pointerType==="touch"?10:2;N({x:K,y:U},g,B)?c(O):(Math.abs(K)>B||Math.abs(U)>B)&&(E.current=null)},onPointerUp:O=>{r.onPointerUp==null||r.onPointerUp.call(r,O),E.current=null,R.current=!1,i(O)},onPointerOut:O=>{r.onPointerOut==null||r.onPointerOut.call(r,O),H(D.current)},onContextMenu:O=>{r.onContextMenu==null||r.onContextMenu.call(r,O),D.current&&H(D.current)}})});Gb.displayName="Drawer.Content";const SL=250,CL=120,ML=S.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:s,snapPoints:a,activeSnapPoint:i,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:l,onPress:f,onDrag:p}=Eo(),g=S.useRef(null),y=S.useRef(!1);function b(){if(y.current){w();return}window.setTimeout(()=>{v()},CL)}function v(){if(s||e||y.current){w();return}if(w(),!a||a.length===0){u||o();return}if(i===a[a.length-1]&&u){o();return}const C=a.findIndex(E=>E===i);if(C===-1)return;const P=a[C+1];c(P)}function x(){g.current=window.setTimeout(()=>{y.current=!0},SL)}function w(){g.current&&window.clearTimeout(g.current),y.current=!1}return S.createElement("div",{onClick:b,onPointerCancel:w,onPointerDown:M=>{d&&f(M),x()},onPointerMove:M=>{d&&p(M)},ref:r,"data-vaul-drawer-visible":l?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},S.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});ML.displayName="Drawer.Handle";function EL(e){const t=Eo(),{container:n=t.container,...r}=e;return S.createElement(oo,{container:n,...r})}const xn={Root:wL,Content:Gb,Overlay:Ub,Trigger:Ts,Portal:EL,Close:Ln,Title:Ps,Description:Ds};function TL({...e}){return m.jsx(xn.Root,{"data-slot":"drawer",...e})}function PL({...e}){return m.jsx(xn.Trigger,{"data-slot":"drawer-trigger",...e})}function Kb({...e}){return m.jsx(xn.Portal,{"data-slot":"drawer-portal",...e})}function DL({...e}){return m.jsx(xn.Close,{"data-slot":"drawer-close",...e})}function qb({className:e,...t}){return m.jsx(xn.Overlay,{"data-slot":"drawer-overlay",className:T.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function RL({className:e,children:t,...n}){return m.jsxs(Kb,{"data-slot":"drawer-portal",children:[m.jsx(qb,{}),m.jsxs(xn.Content,{"data-slot":"drawer-content",className:T.cn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...n,children:[m.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function AL({className:e,...t}){return m.jsx("div",{"data-slot":"drawer-header",className:T.cn("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",e),...t})}function OL({className:e,...t}){return m.jsx("div",{"data-slot":"drawer-footer",className:T.cn("mt-auto flex flex-col gap-2 p-4",e),...t})}function kL({className:e,...t}){return m.jsx(xn.Title,{"data-slot":"drawer-title",className:T.cn("text-foreground font-semibold",e),...t})}function NL({className:e,...t}){return m.jsx(xn.Description,{"data-slot":"drawer-description",className:T.cn("text-muted-foreground text-sm",e),...t})}function _L({...e}){return m.jsx(ro,{"data-slot":"sheet",...e})}function IL({...e}){return m.jsx(Ts,{"data-slot":"sheet-trigger",...e})}function jL({...e}){return m.jsx(Ln,{"data-slot":"sheet-close",...e})}function LL({...e}){return m.jsx(oo,{"data-slot":"sheet-portal",...e})}function FL({className:e,...t}){return m.jsx(so,{"data-slot":"sheet-overlay",className:T.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function $L({className:e,children:t,side:n="right",...r}){return m.jsxs(LL,{children:[m.jsx(FL,{}),m.jsxs(ao,{"data-slot":"sheet-content",className:T.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,m.jsxs(Ln,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[m.jsx(ke.XIcon,{className:"size-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function BL({className:e,...t}){return m.jsx("div",{"data-slot":"sheet-header",className:T.cn("flex flex-col gap-1.5 p-4",e),...t})}function VL({className:e,...t}){return m.jsx("div",{"data-slot":"sheet-footer",className:T.cn("mt-auto flex flex-col gap-2 p-4",e),...t})}function WL({className:e,...t}){return m.jsx(Ps,{"data-slot":"sheet-title",className:T.cn("text-foreground font-semibold",e),...t})}function HL({className:e,...t}){return m.jsx(Ds,{"data-slot":"sheet-description",className:T.cn("text-muted-foreground text-sm",e),...t})}var zL=(e,t,n,r,o,s,a,i)=>{let c=document.documentElement,u=["light","dark"];function d(p){(Array.isArray(e)?e:[e]).forEach(g=>{let y=g==="class",b=y&&s?o.map(v=>s[v]||v):o;y?(c.classList.remove(...b),c.classList.add(s&&s[p]?s[p]:p)):c.setAttribute(g,p)}),l(p)}function l(p){i&&u.includes(p)&&(c.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)d(r);else try{let p=localStorage.getItem(t)||n,g=a&&p==="system"?f():p;d(g)}catch{}},YL=h.createContext(void 0),UL={setTheme:e=>{},themes:[]},GL=()=>{var e;return(e=h.useContext(YL))!=null?e:UL};h.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:a,themes:i,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,s,e,i,a,r,o]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${zL.toString()})(${d})`}})});function KL(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const qL=e=>{switch(e){case"success":return QL;case"info":return eF;case"warning":return JL;case"error":return tF;default:return null}},XL=Array(12).fill(0),ZL=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},XL.map((n,r)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),QL=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),JL=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),eF=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),tF=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),nF=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),rF=()=>{const[e,t]=S.useState(document.hidden);return S.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let ji=1;class oF{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:ji++,a=this.toasts.find(c=>c.id===s),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:i,title:r}):c):this.addToast({title:r,...o,dismissible:i,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,a;const i=o.then(async u=>{if(a=["resolve",u],S.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(aF(u)&&!u.ok){s=!1;const l=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,g=typeof l=="object"&&!S.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:f,...g})}else if(u instanceof Error){s=!1;const l=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,g=typeof l=="object"&&!S.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:f,...g})}else if(n.success!==void 0){s=!1;const l=typeof n.success=="function"?await n.success(u):n.success,f=typeof n.description=="function"?await n.description(u):n.description,g=typeof l=="object"&&!S.isValidElement(l)?l:{message:l};this.create({id:r,type:"success",description:f,...g})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,l=typeof n.description=="function"?await n.description(u):n.description,p=typeof d=="object"&&!S.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:l,...p})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,d)=>i.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||ji++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ct=new oF,sF=(e,t)=>{const n=(t==null?void 0:t.id)||ji++;return ct.addToast({title:e,...t,id:n}),n},aF=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",iF=sF,cF=()=>ct.toasts,lF=()=>ct.getActiveToasts();Object.assign(iF,{success:ct.success,info:ct.info,warning:ct.warning,error:ct.error,custom:ct.custom,message:ct.message,promise:ct.promise,dismiss:ct.dismiss,loading:ct.loading},{getHistory:cF,getToasts:lF});KL("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Vo(e){return e.label!==void 0}const uF=3,dF="24px",fF="16px",df=4e3,hF=356,mF=14,pF=45,gF=200;function Lt(...e){return e.filter(Boolean).join(" ")}function vF(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const yF=e=>{var t,n,r,o,s,a,i,c,u;const{invert:d,toast:l,unstyled:f,interacting:p,setHeights:g,visibleToasts:y,heights:b,index:v,toasts:x,expanded:w,removeToast:M,defaultRichColors:C,closeButton:P,style:E,cancelButtonStyle:D,actionButtonStyle:R,className:A="",descriptionClassName:N="",duration:H,position:O,gap:U,expandByDefault:K,classNames:B,icons:F,closeButtonAriaLabel:j="Close toast"}=e,[_,Z]=S.useState(null),[se,k]=S.useState(null),[L,Y]=S.useState(!1),[V,Q]=S.useState(!1),[J,X]=S.useState(!1),[re,he]=S.useState(!1),[le,G]=S.useState(!1),[ue,I]=S.useState(0),[te,me]=S.useState(0),pe=S.useRef(l.duration||H||df),xe=S.useRef(null),ae=S.useRef(null),ve=v===0,Xe=v+1<=y,ge=l.type,Me=l.dismissible!==!1,Le=l.className||"",Ke=l.descriptionClassName||"",He=S.useMemo(()=>b.findIndex(z=>z.toastId===l.id)||0,[b,l.id]),Ze=S.useMemo(()=>{var z;return(z=l.closeButton)!=null?z:P},[l.closeButton,P]),st=S.useMemo(()=>l.duration||H||df,[l.duration,H]),at=S.useRef(0),Fe=S.useRef(0),gt=S.useRef(0),$e=S.useRef(null),[ze,St]=O.split("-"),It=S.useMemo(()=>b.reduce((z,fe,ye)=>ye>=He?z:z+fe.height,0),[b,He]),qt=rF(),wn=l.invert||d,jt=ge==="loading";Fe.current=S.useMemo(()=>He*U+It,[He,It]),S.useEffect(()=>{pe.current=st},[st]),S.useEffect(()=>{Y(!0)},[]),S.useEffect(()=>{const z=ae.current;if(z){const fe=z.getBoundingClientRect().height;return me(fe),g(ye=>[{toastId:l.id,height:fe,position:l.position},...ye]),()=>g(ye=>ye.filter(we=>we.toastId!==l.id))}},[g,l.id]),S.useLayoutEffect(()=>{if(!L)return;const z=ae.current,fe=z.style.height;z.style.height="auto";const ye=z.getBoundingClientRect().height;z.style.height=fe,me(ye),g(we=>we.find(be=>be.toastId===l.id)?we.map(be=>be.toastId===l.id?{...be,height:ye}:be):[{toastId:l.id,height:ye,position:l.position},...we])},[L,l.title,l.description,g,l.id,l.jsx,l.action,l.cancel]);const W=S.useCallback(()=>{Q(!0),I(Fe.current),g(z=>z.filter(fe=>fe.toastId!==l.id)),setTimeout(()=>{M(l)},gF)},[l,M,g,Fe]);S.useEffect(()=>{if(l.promise&&ge==="loading"||l.duration===1/0||l.type==="loading")return;let z;return w||p||qt?(()=>{if(gt.current<at.current){const we=new Date().getTime()-at.current;pe.current=pe.current-we}gt.current=new Date().getTime()})():(()=>{pe.current!==1/0&&(at.current=new Date().getTime(),z=setTimeout(()=>{l.onAutoClose==null||l.onAutoClose.call(l,l),W()},pe.current))})(),()=>clearTimeout(z)},[w,p,l,ge,qt,W]),S.useEffect(()=>{l.delete&&(W(),l.onDismiss==null||l.onDismiss.call(l,l))},[W,l.delete]);function ne(){var z;if(F!=null&&F.loading){var fe;return S.createElement("div",{className:Lt(B==null?void 0:B.loader,l==null||(fe=l.classNames)==null?void 0:fe.loader,"sonner-loader"),"data-visible":ge==="loading"},F.loading)}return S.createElement(ZL,{className:Lt(B==null?void 0:B.loader,l==null||(z=l.classNames)==null?void 0:z.loader),visible:ge==="loading"})}const q=l.icon||(F==null?void 0:F[ge])||qL(ge);var ee,de;return S.createElement("li",{tabIndex:0,ref:ae,className:Lt(A,Le,B==null?void 0:B.toast,l==null||(t=l.classNames)==null?void 0:t.toast,B==null?void 0:B.default,B==null?void 0:B[ge],l==null||(n=l.classNames)==null?void 0:n[ge]),"data-sonner-toast":"","data-rich-colors":(ee=l.richColors)!=null?ee:C,"data-styled":!(l.jsx||l.unstyled||f),"data-mounted":L,"data-promise":!!l.promise,"data-swiped":le,"data-removed":V,"data-visible":Xe,"data-y-position":ze,"data-x-position":St,"data-index":v,"data-front":ve,"data-swiping":J,"data-dismissible":Me,"data-type":ge,"data-invert":wn,"data-swipe-out":re,"data-swipe-direction":se,"data-expanded":!!(w||K&&L),"data-testid":l.testId,style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${V?ue:Fe.current}px`,"--initial-height":K?"auto":`${te}px`,...E,...l.style},onDragEnd:()=>{X(!1),Z(null),$e.current=null},onPointerDown:z=>{z.button!==2&&(jt||!Me||(xe.current=new Date,I(Fe.current),z.target.setPointerCapture(z.pointerId),z.target.tagName!=="BUTTON"&&(X(!0),$e.current={x:z.clientX,y:z.clientY})))},onPointerUp:()=>{var z,fe,ye;if(re||!Me)return;$e.current=null;const we=Number(((z=ae.current)==null?void 0:z.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Qe=Number(((fe=ae.current)==null?void 0:fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),be=new Date().getTime()-((ye=xe.current)==null?void 0:ye.getTime()),Te=_==="x"?we:Qe,Xt=Math.abs(Te)/be;if(Math.abs(Te)>=pF||Xt>.11){I(Fe.current),l.onDismiss==null||l.onDismiss.call(l,l),k(_==="x"?we>0?"right":"left":Qe>0?"down":"up"),W(),he(!0);return}else{var it,Ct;(it=ae.current)==null||it.style.setProperty("--swipe-amount-x","0px"),(Ct=ae.current)==null||Ct.style.setProperty("--swipe-amount-y","0px")}G(!1),X(!1),Z(null)},onPointerMove:z=>{var fe,ye,we;if(!$e.current||!Me||((fe=window.getSelection())==null?void 0:fe.toString().length)>0)return;const be=z.clientY-$e.current.y,Te=z.clientX-$e.current.x;var Xt;const it=(Xt=e.swipeDirections)!=null?Xt:vF(O);!_&&(Math.abs(Te)>1||Math.abs(be)>1)&&Z(Math.abs(Te)>Math.abs(be)?"x":"y");let Ct={x:0,y:0};const Vl=Sn=>1/(1.5+Math.abs(Sn)/20);if(_==="y"){if(it.includes("top")||it.includes("bottom"))if(it.includes("top")&&be<0||it.includes("bottom")&&be>0)Ct.y=be;else{const Sn=be*Vl(be);Ct.y=Math.abs(Sn)<Math.abs(be)?Sn:be}}else if(_==="x"&&(it.includes("left")||it.includes("right")))if(it.includes("left")&&Te<0||it.includes("right")&&Te>0)Ct.x=Te;else{const Sn=Te*Vl(Te);Ct.x=Math.abs(Sn)<Math.abs(Te)?Sn:Te}(Math.abs(Ct.x)>0||Math.abs(Ct.y)>0)&&G(!0),(ye=ae.current)==null||ye.style.setProperty("--swipe-amount-x",`${Ct.x}px`),(we=ae.current)==null||we.style.setProperty("--swipe-amount-y",`${Ct.y}px`)}},Ze&&!l.jsx&&ge!=="loading"?S.createElement("button",{"aria-label":j,"data-disabled":jt,"data-close-button":!0,onClick:jt||!Me?()=>{}:()=>{W(),l.onDismiss==null||l.onDismiss.call(l,l)},className:Lt(B==null?void 0:B.closeButton,l==null||(r=l.classNames)==null?void 0:r.closeButton)},(de=F==null?void 0:F.close)!=null?de:nF):null,(ge||l.icon||l.promise)&&l.icon!==null&&((F==null?void 0:F[ge])!==null||l.icon)?S.createElement("div",{"data-icon":"",className:Lt(B==null?void 0:B.icon,l==null||(o=l.classNames)==null?void 0:o.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||ne():null,l.type!=="loading"?q:null):null,S.createElement("div",{"data-content":"",className:Lt(B==null?void 0:B.content,l==null||(s=l.classNames)==null?void 0:s.content)},S.createElement("div",{"data-title":"",className:Lt(B==null?void 0:B.title,l==null||(a=l.classNames)==null?void 0:a.title)},l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title),l.description?S.createElement("div",{"data-description":"",className:Lt(N,Ke,B==null?void 0:B.description,l==null||(i=l.classNames)==null?void 0:i.description)},typeof l.description=="function"?l.description():l.description):null),S.isValidElement(l.cancel)?l.cancel:l.cancel&&Vo(l.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||D,onClick:z=>{Vo(l.cancel)&&Me&&(l.cancel.onClick==null||l.cancel.onClick.call(l.cancel,z),W())},className:Lt(B==null?void 0:B.cancelButton,l==null||(c=l.classNames)==null?void 0:c.cancelButton)},l.cancel.label):null,S.isValidElement(l.action)?l.action:l.action&&Vo(l.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||R,onClick:z=>{Vo(l.action)&&(l.action.onClick==null||l.action.onClick.call(l.action,z),!z.defaultPrevented&&W())},className:Lt(B==null?void 0:B.actionButton,l==null||(u=l.classNames)==null?void 0:u.actionButton)},l.action.label):null)};function ff(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function bF(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,a=s?"--mobile-offset":"--offset",i=s?fF:dF;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=i:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(i)}),n}const xF=S.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:c,className:u,offset:d,mobileOffset:l,theme:f="light",richColors:p,duration:g,style:y,visibleToasts:b=uF,toastOptions:v,dir:x=ff(),gap:w=mF,icons:M,containerAriaLabel:C="Notifications"}=t,[P,E]=S.useState([]),D=S.useMemo(()=>r?P.filter(L=>L.toasterId===r):P.filter(L=>!L.toasterId),[P,r]),R=S.useMemo(()=>Array.from(new Set([s].concat(D.filter(L=>L.position).map(L=>L.position)))),[D,s]),[A,N]=S.useState([]),[H,O]=S.useState(!1),[U,K]=S.useState(!1),[B,F]=S.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=S.useRef(null),_=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),Z=S.useRef(null),se=S.useRef(!1),k=S.useCallback(L=>{E(Y=>{var V;return(V=Y.find(Q=>Q.id===L.id))!=null&&V.delete||ct.dismiss(L.id),Y.filter(({id:Q})=>Q!==L.id)})},[]);return S.useEffect(()=>ct.subscribe(L=>{if(L.dismiss){requestAnimationFrame(()=>{E(Y=>Y.map(V=>V.id===L.id?{...V,delete:!0}:V))});return}setTimeout(()=>{Bi.flushSync(()=>{E(Y=>{const V=Y.findIndex(Q=>Q.id===L.id);return V!==-1?[...Y.slice(0,V),{...Y[V],...L},...Y.slice(V+1)]:[L,...Y]})})})}),[P]),S.useEffect(()=>{if(f!=="system"){F(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:Y})=>{F(Y?"dark":"light")})}catch{L.addListener(({matches:V})=>{try{F(V?"dark":"light")}catch(Q){console.error(Q)}})}},[f]),S.useEffect(()=>{P.length<=1&&O(!1)},[P]),S.useEffect(()=>{const L=Y=>{var V;if(a.every(X=>Y[X]||Y.code===X)){var J;O(!0),(J=j.current)==null||J.focus()}Y.code==="Escape"&&(document.activeElement===j.current||(V=j.current)!=null&&V.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[a]),S.useEffect(()=>{if(j.current)return()=>{Z.current&&(Z.current.focus({preventScroll:!0}),Z.current=null,se.current=!1)}},[j.current]),S.createElement("section",{ref:n,"aria-label":`${C} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((L,Y)=>{var V;const[Q,J]=L.split("-");return D.length?S.createElement("ol",{key:L,dir:x==="auto"?ff():x,tabIndex:-1,ref:j,className:u,"data-sonner-toaster":!0,"data-sonner-theme":B,"data-y-position":Q,"data-x-position":J,style:{"--front-toast-height":`${((V=A[0])==null?void 0:V.height)||0}px`,"--width":`${hF}px`,"--gap":`${w}px`,...y,...bF(d,l)},onBlur:X=>{se.current&&!X.currentTarget.contains(X.relatedTarget)&&(se.current=!1,Z.current&&(Z.current.focus({preventScroll:!0}),Z.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||se.current||(se.current=!0,Z.current=X.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{U||O(!1)},onDragEnd:()=>O(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},D.filter(X=>!X.position&&Y===0||X.position===L).map((X,re)=>{var he,le;return S.createElement(yF,{key:X.id,icons:M,index:re,toast:X,defaultRichColors:p,duration:(he=v==null?void 0:v.duration)!=null?he:g,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:o,visibleToasts:b,closeButton:(le=v==null?void 0:v.closeButton)!=null?le:c,interacting:U,position:L,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:k,toasts:D.filter(G=>G.position==X.position),heights:A.filter(G=>G.position==X.position),setHeights:N,expandByDefault:i,gap:w,expanded:H,swipeDirections:t.swipeDirections})})):null}))}),wF=({...e})=>{const{theme:t="system"}=GL();return m.jsx(xF,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};var Xb="Toggle",Zb=h.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=e,[a,i]=Ge({prop:n,onChange:o,defaultProp:r??!1,caller:Xb});return m.jsx(T.Primitive.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:$(e.onClick,()=>{e.disabled||i(!a)})})});Zb.displayName=Xb;var SF=Zb;const CF=T.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function MF({className:e,variant:t,size:n,...r}){return m.jsx(SF,{"data-slot":"toggle",className:T.cn(CF({variant:t,size:n,className:e})),...r})}var To="Menubar",[Li,EF,TF]=yo(To),[Qb]=Ne(To,[TF,yn]),rt=wo(),Jb=yn(),[PF,$l]=Qb(To),ex=h.forwardRef((e,t)=>{const{__scopeMenubar:n,value:r,onValueChange:o,defaultValue:s,loop:a=!0,dir:i,...c}=e,u=vn(i),d=Jb(n),[l,f]=Ge({prop:r,onChange:o,defaultProp:s??"",caller:To}),[p,g]=h.useState(null);return m.jsx(PF,{scope:n,value:l,onMenuOpen:h.useCallback(y=>{f(y),g(y)},[f]),onMenuClose:h.useCallback(()=>f(""),[f]),onMenuToggle:h.useCallback(y=>{f(b=>b?"":y),g(y)},[f]),dir:u,loop:a,children:m.jsx(Li.Provider,{scope:n,children:m.jsx(Li.Slot,{scope:n,children:m.jsx(Us,{asChild:!0,...d,orientation:"horizontal",loop:a,dir:u,currentTabStopId:p,onCurrentTabStopIdChange:g,children:m.jsx(T.Primitive.div,{role:"menubar",...c,ref:t})})})})})});ex.displayName=To;var Bl="MenubarMenu",[DF,tx]=Qb(Bl),nx=e=>{const{__scopeMenubar:t,value:n,...r}=e,o=_e(),s=n||o||"LEGACY_REACT_AUTO_VALUE",a=$l(Bl,t),i=rt(t),c=h.useRef(null),u=h.useRef(!1),d=a.value===s;return h.useEffect(()=>{d||(u.current=!1)},[d]),m.jsx(DF,{scope:t,value:s,triggerId:_e(),triggerRef:c,contentId:_e(),wasKeyboardTriggerOpenRef:u,children:m.jsx(hl,{...i,open:d,onOpenChange:l=>{l||a.onMenuClose()},modal:!1,dir:a.dir,...r})})};nx.displayName=Bl;var Fi="MenubarTrigger",rx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,disabled:r=!1,...o}=e,s=Jb(n),a=rt(n),i=$l(Fi,n),c=tx(Fi,n),u=h.useRef(null),d=ce(t,u,c.triggerRef),[l,f]=h.useState(!1),p=i.value===c.value;return m.jsx(Li.ItemSlot,{scope:n,value:c.value,disabled:r,children:m.jsx(Gs,{asChild:!0,...s,focusable:!r,tabStopId:c.value,children:m.jsx(ml,{asChild:!0,...a,children:m.jsx(T.Primitive.button,{type:"button",role:"menuitem",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?c.contentId:void 0,"data-highlighted":l?"":void 0,"data-state":p?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:d,onPointerDown:$(e.onPointerDown,g=>{!r&&g.button===0&&g.ctrlKey===!1&&(i.onMenuOpen(c.value),p||g.preventDefault())}),onPointerEnter:$(e.onPointerEnter,()=>{var y;!!i.value&&!p&&(i.onMenuOpen(c.value),(y=u.current)==null||y.focus())}),onKeyDown:$(e.onKeyDown,g=>{r||(["Enter"," "].includes(g.key)&&i.onMenuToggle(c.value),g.key==="ArrowDown"&&i.onMenuOpen(c.value),["Enter"," ","ArrowDown"].includes(g.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,g.preventDefault()))}),onFocus:$(e.onFocus,()=>f(!0)),onBlur:$(e.onBlur,()=>f(!1))})})})})});rx.displayName=Fi;var RF="MenubarPortal",ox=e=>{const{__scopeMenubar:t,...n}=e,r=rt(t);return m.jsx(pl,{...r,...n})};ox.displayName=RF;var $i="MenubarContent",sx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,align:r="start",...o}=e,s=rt(n),a=$l($i,n),i=tx($i,n),c=EF(n),u=h.useRef(!1);return m.jsx(gl,{id:i.contentId,"aria-labelledby":i.triggerId,"data-radix-menubar-content":"",...s,...o,ref:t,align:r,onCloseAutoFocus:$(e.onCloseAutoFocus,d=>{var f;!!!a.value&&!u.current&&((f=i.triggerRef.current)==null||f.focus()),u.current=!1,d.preventDefault()}),onFocusOutside:$(e.onFocusOutside,d=>{const l=d.target;c().some(p=>{var g;return(g=p.ref.current)==null?void 0:g.contains(l)})&&d.preventDefault()}),onInteractOutside:$(e.onInteractOutside,()=>{u.current=!0}),onEntryFocus:d=>{i.wasKeyboardTriggerOpenRef.current||d.preventDefault()},onKeyDown:$(e.onKeyDown,d=>{if(["ArrowRight","ArrowLeft"].includes(d.key)){const l=d.target,f=l.hasAttribute("data-radix-menubar-subtrigger"),p=l.closest("[data-radix-menubar-content]")!==d.currentTarget,y=(a.dir==="rtl"?"ArrowRight":"ArrowLeft")===d.key;if(!y&&f||p&&y)return;let x=c().filter(C=>!C.disabled).map(C=>C.value);y&&x.reverse();const w=x.indexOf(i.value);x=a.loop?WF(x,w+1):x.slice(w+1);const[M]=x;M&&a.onMenuOpen(M)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});sx.displayName=$i;var AF="MenubarGroup",ax=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(vl,{...o,...r,ref:t})});ax.displayName=AF;var OF="MenubarLabel",ix=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(yl,{...o,...r,ref:t})});ix.displayName=OF;var kF="MenubarItem",cx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(bl,{...o,...r,ref:t})});cx.displayName=kF;var NF="MenubarCheckboxItem",lx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(xl,{...o,...r,ref:t})});lx.displayName=NF;var _F="MenubarRadioGroup",ux=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(wl,{...o,...r,ref:t})});ux.displayName=_F;var IF="MenubarRadioItem",dx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Sl,{...o,...r,ref:t})});dx.displayName=IF;var jF="MenubarItemIndicator",fx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Cl,{...o,...r,ref:t})});fx.displayName=jF;var LF="MenubarSeparator",hx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Ml,{...o,...r,ref:t})});hx.displayName=LF;var FF="MenubarArrow",$F=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(El,{...o,...r,ref:t})});$F.displayName=FF;var mx="MenubarSub",px=e=>{const{__scopeMenubar:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=rt(t),[i,c]=Ge({prop:r,defaultProp:s??!1,onChange:o,caller:mx});return m.jsx(Tl,{...a,open:i,onOpenChange:c,children:n})};px.displayName=mx;var BF="MenubarSubTrigger",gx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Pl,{"data-radix-menubar-subtrigger":"",...o,...r,ref:t})});gx.displayName=BF;var VF="MenubarSubContent",vx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Dl,{...o,"data-radix-menubar-content":"",...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});vx.displayName=VF;function WF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var HF=ex,zF=nx,YF=rx,UF=ox,GF=sx,KF=ax,qF=ix,XF=cx,ZF=lx,QF=ux,JF=dx,yx=fx,e$=hx,t$=px,n$=gx,r$=vx;function o$({className:e,...t}){return m.jsx(HF,{"data-slot":"menubar",className:T.cn("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",e),...t})}function s$({...e}){return m.jsx(zF,{"data-slot":"menubar-menu",...e})}function a$({...e}){return m.jsx(KF,{"data-slot":"menubar-group",...e})}function bx({...e}){return m.jsx(UF,{"data-slot":"menubar-portal",...e})}function i$({...e}){return m.jsx(QF,{"data-slot":"menubar-radio-group",...e})}function c$({className:e,...t}){return m.jsx(YF,{"data-slot":"menubar-trigger",className:T.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",e),...t})}function l$({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,...o}){return m.jsx(bx,{children:m.jsx(GF,{"data-slot":"menubar-content",align:t,alignOffset:n,sideOffset:r,className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",e),...o})})}function u$({className:e,inset:t,variant:n="default",...r}){return m.jsx(XF,{"data-slot":"menubar-item","data-inset":t,"data-variant":n,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function d$({className:e,children:t,checked:n,...r}){return m.jsxs(ZF,{"data-slot":"menubar-checkbox-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(yx,{children:m.jsx(ke.CheckIcon,{className:"size-4"})})}),t]})}function f$({className:e,children:t,...n}){return m.jsxs(JF,{"data-slot":"menubar-radio-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(yx,{children:m.jsx(ke.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function h$({className:e,inset:t,...n}){return m.jsx(qF,{"data-slot":"menubar-label","data-inset":t,className:T.cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function m$({className:e,...t}){return m.jsx(e$,{"data-slot":"menubar-separator",className:T.cn("bg-border -mx-1 my-1 h-px",e),...t})}function p$({className:e,...t}){return m.jsx("span",{"data-slot":"menubar-shortcut",className:T.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function g$({...e}){return m.jsx(t$,{"data-slot":"menubar-sub",...e})}function v$({className:e,inset:t,children:n,...r}){return m.jsxs(n$,{"data-slot":"menubar-sub-trigger","data-inset":t,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",e),...r,children:[n,m.jsx(ke.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]})}function y$({className:e,...t}){return m.jsx(r$,{"data-slot":"menubar-sub-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}exports.Accordion=Nk;exports.AccordionContent=jk;exports.AccordionItem=_k;exports.AccordionTrigger=Ik;exports.AlertDialog=hT;exports.AlertDialogAction=xT;exports.AlertDialogCancel=wT;exports.AlertDialogContent=pT;exports.AlertDialogDescription=bT;exports.AlertDialogFooter=vT;exports.AlertDialogHeader=gT;exports.AlertDialogOverlay=$m;exports.AlertDialogPortal=Fm;exports.AlertDialogTitle=yT;exports.AlertDialogTrigger=mT;exports.Avatar=qk;exports.AvatarFallback=Zk;exports.AvatarImage=Xk;exports.Calendar=CR;exports.CalendarDayButton=hp;exports.Carousel=oA;exports.CarouselContent=sA;exports.CarouselItem=aA;exports.CarouselNext=cA;exports.CarouselPrevious=iA;exports.Checkbox=nN;exports.Combobox=yO;exports.Command=Lc;exports.CommandDialog=jA;exports.CommandEmpty=Ip;exports.CommandGroup=jp;exports.CommandInput=Np;exports.CommandItem=Lp;exports.CommandList=_p;exports.CommandSeparator=LA;exports.CommandShortcut=FA;exports.ContextMenu=m_;exports.ContextMenuCheckboxItem=M_;exports.ContextMenuContent=S_;exports.ContextMenuGroup=g_;exports.ContextMenuItem=C_;exports.ContextMenuLabel=T_;exports.ContextMenuPortal=v_;exports.ContextMenuRadioGroup=b_;exports.ContextMenuRadioItem=E_;exports.ContextMenuSeparator=P_;exports.ContextMenuShortcut=D_;exports.ContextMenuSub=y_;exports.ContextMenuSubContent=w_;exports.ContextMenuSubTrigger=x_;exports.ContextMenuTrigger=p_;exports.Dialog=Tp;exports.DialogClose=_A;exports.DialogContent=Rp;exports.DialogDescription=kp;exports.DialogFooter=IA;exports.DialogHeader=Ap;exports.DialogOverlay=Dp;exports.DialogPortal=Pp;exports.DialogTitle=Op;exports.DialogTrigger=NA;exports.Drawer=TL;exports.DrawerClose=DL;exports.DrawerContent=RL;exports.DrawerDescription=NL;exports.DrawerFooter=OL;exports.DrawerHeader=AL;exports.DrawerOverlay=qb;exports.DrawerPortal=Kb;exports.DrawerTitle=kL;exports.DrawerTrigger=PL;exports.DropdownMenu=oI;exports.DropdownMenuCheckboxItem=uI;exports.DropdownMenuContent=iI;exports.DropdownMenuGroup=cI;exports.DropdownMenuItem=lI;exports.DropdownMenuLabel=hI;exports.DropdownMenuPortal=sI;exports.DropdownMenuRadioGroup=dI;exports.DropdownMenuRadioItem=fI;exports.DropdownMenuSeparator=mI;exports.DropdownMenuShortcut=pI;exports.DropdownMenuSub=gI;exports.DropdownMenuSubContent=yI;exports.DropdownMenuSubTrigger=vI;exports.DropdownMenuTrigger=aI;exports.HoverCard=AI;exports.HoverCardContent=kI;exports.HoverCardTrigger=OI;exports.InputOTP=kO;exports.InputOTPGroup=NO;exports.InputOTPSeparator=IO;exports.InputOTPSlot=_O;exports.Menubar=o$;exports.MenubarCheckboxItem=d$;exports.MenubarContent=l$;exports.MenubarGroup=a$;exports.MenubarItem=u$;exports.MenubarLabel=h$;exports.MenubarMenu=s$;exports.MenubarPortal=bx;exports.MenubarRadioGroup=i$;exports.MenubarRadioItem=f$;exports.MenubarSeparator=m$;exports.MenubarShortcut=p$;exports.MenubarSub=g$;exports.MenubarSubContent=y$;exports.MenubarSubTrigger=v$;exports.MenubarTrigger=c$;exports.Popover=gg;exports.PopoverAnchor=vO;exports.PopoverContent=yg;exports.PopoverTrigger=vg;exports.Progress=fk;exports.RadioGroup=YI;exports.RadioGroupItem=UI;exports.ScrollArea=ij;exports.ScrollBar=ub;exports.Sheet=_L;exports.SheetClose=jL;exports.SheetContent=$L;exports.SheetDescription=HL;exports.SheetFooter=VL;exports.SheetHeader=BL;exports.SheetTitle=WL;exports.SheetTrigger=IL;exports.Slider=nk;exports.Switch=mj;exports.Tabs=wj;exports.TabsContent=Mj;exports.TabsList=Sj;exports.TabsTrigger=Cj;exports.TextReveal=TM;exports.Toaster=wF;exports.Toggle=MF;exports.Tooltip=qj;exports.TooltipContent=Zj;exports.TooltipProvider=jb;exports.TooltipTrigger=Xj;
|